mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-20 10:24:58 +00:00
shader_recompiler: Define fragment output type based on number format. (#1097)
* shader_recompiler: Define fragment output type based on number format. * shader_recompiler: Fix GetAttribute SPIR-V output type. * shader_recompiler: Don't bitcast on SetAttribute unless integer target.
This commit is contained in:
parent
75adf7c8d1
commit
e68774d449
7 changed files with 97 additions and 38 deletions
|
@ -166,6 +166,7 @@ public:
|
|||
Id input_s32{};
|
||||
Id output_u32{};
|
||||
Id output_f32{};
|
||||
Id output_s32{};
|
||||
|
||||
boost::container::small_vector<Id, 16> interfaces;
|
||||
|
||||
|
@ -177,8 +178,6 @@ public:
|
|||
Id frag_coord{};
|
||||
Id front_facing{};
|
||||
Id frag_depth{};
|
||||
std::array<Id, 8> frag_color{};
|
||||
std::array<u32, 8> frag_num_comp{};
|
||||
Id clip_distances{};
|
||||
Id cull_distances{};
|
||||
|
||||
|
@ -237,11 +236,13 @@ public:
|
|||
Id pointer_type;
|
||||
Id component_type;
|
||||
u32 num_components;
|
||||
bool is_integer{};
|
||||
bool is_default{};
|
||||
s32 buffer_handle{-1};
|
||||
};
|
||||
std::array<SpirvAttribute, 32> input_params{};
|
||||
std::array<SpirvAttribute, 32> output_params{};
|
||||
std::array<SpirvAttribute, 8> frag_outputs{};
|
||||
|
||||
private:
|
||||
void DefineArithmeticTypes();
|
||||
|
@ -254,7 +255,7 @@ private:
|
|||
void DefineImagesAndSamplers();
|
||||
void DefineSharedMemory();
|
||||
|
||||
SpirvAttribute GetAttributeInfo(AmdGpu::NumberFormat fmt, Id id);
|
||||
SpirvAttribute GetAttributeInfo(AmdGpu::NumberFormat fmt, Id id, bool output);
|
||||
};
|
||||
|
||||
} // namespace Shader::Backend::SPIRV
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue