mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-20 03:24:49 +00:00
shader_recompiler: Exclude defaulted fragment inputs from quad/rect passthrough. (#2383)
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
This commit is contained in:
parent
b51c767296
commit
40eef6a066
3 changed files with 15 additions and 3 deletions
|
@ -254,10 +254,14 @@ private:
|
|||
gl_per_vertex = AddOutput(gl_per_vertex_type);
|
||||
}
|
||||
for (int i = 0; i < fs_info.num_inputs; i++) {
|
||||
const auto& input = fs_info.inputs[i];
|
||||
if (input.IsDefault()) {
|
||||
continue;
|
||||
}
|
||||
outputs[i] = AddOutput(model == spv::ExecutionModel::TessellationControl
|
||||
? TypeArray(vec4_id, Int(4))
|
||||
: vec4_id);
|
||||
Decorate(outputs[i], spv::Decoration::Location, fs_info.inputs[i].param_index);
|
||||
Decorate(outputs[i], spv::Decoration::Location, input.param_index);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -273,8 +277,12 @@ private:
|
|||
gl_in = AddInput(gl_per_vertex_array);
|
||||
const Id float_arr{TypeArray(vec4_id, Int(32))};
|
||||
for (int i = 0; i < fs_info.num_inputs; i++) {
|
||||
const auto& input = fs_info.inputs[i];
|
||||
if (input.IsDefault()) {
|
||||
continue;
|
||||
}
|
||||
inputs[i] = AddInput(float_arr);
|
||||
Decorate(inputs[i], spv::Decoration::Location, fs_info.inputs[i].param_index);
|
||||
Decorate(inputs[i], spv::Decoration::Location, input.param_index);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -316,7 +316,7 @@ void EmitContext::DefineInputs() {
|
|||
const auto& input = runtime_info.fs_info.inputs[i];
|
||||
const u32 semantic = input.param_index;
|
||||
ASSERT(semantic < IR::NumParams);
|
||||
if (input.is_default && !input.is_flat) {
|
||||
if (input.IsDefault()) {
|
||||
input_params[semantic] = {
|
||||
MakeDefaultValue(*this, input.default_value), input_f32, F32[1], 4, false, true,
|
||||
};
|
||||
|
|
|
@ -174,6 +174,10 @@ struct FragmentRuntimeInfo {
|
|||
bool is_flat;
|
||||
u8 default_value;
|
||||
|
||||
[[nodiscard]] bool IsDefault() const {
|
||||
return is_default && !is_flat;
|
||||
}
|
||||
|
||||
auto operator<=>(const PsInput&) const noexcept = default;
|
||||
};
|
||||
AmdGpu::Liverpool::PsInput en_flags;
|
||||
|
|
Loading…
Add table
Reference in a new issue