diff options
| author | 2021-09-03 23:52:20 +0800 | |
|---|---|---|
| committer | 2021-09-03 23:52:20 +0800 | |
| commit | a7bbaa489755c9847416c8c96f0eefb9e78a50a0 (patch) | |
| tree | 341ab621a49becca148157877d6e57e2a31ba770 /src/shader_recompiler/backend | |
| parent | Fix create GraphicsPipelines crash (diff) | |
| download | yuzu-a7bbaa489755c9847416c8c96f0eefb9e78a50a0.tar.gz yuzu-a7bbaa489755c9847416c8c96f0eefb9e78a50a0.tar.xz yuzu-a7bbaa489755c9847416c8c96f0eefb9e78a50a0.zip | |
Rename parameters
Diffstat (limited to 'src/shader_recompiler/backend')
3 files changed, 9 insertions, 9 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_context.cpp b/src/shader_recompiler/backend/spirv/emit_context.cpp index 78ca97d91..3ec5a4570 100644 --- a/src/shader_recompiler/backend/spirv/emit_context.cpp +++ b/src/shader_recompiler/backend/spirv/emit_context.cpp | |||
| @@ -1209,7 +1209,7 @@ void EmitContext::DefineInputs(const IR::Program& program) { | |||
| 1209 | if (loads.AnyComponent(IR::Attribute::FixedFncTexture0S)) { | 1209 | if (loads.AnyComponent(IR::Attribute::FixedFncTexture0S)) { |
| 1210 | const Id id{DefineInput(*this, F32[4], true)}; | 1210 | const Id id{DefineInput(*this, F32[4], true)}; |
| 1211 | Decorate(id, spv::Decoration::Location, static_cast<u32>(12)); | 1211 | Decorate(id, spv::Decoration::Location, static_cast<u32>(12)); |
| 1212 | input_txt_coord = id; | 1212 | input_fixed_fnc_texture = id; |
| 1213 | } | 1213 | } |
| 1214 | if (loads[IR::Attribute::InstanceId]) { | 1214 | if (loads[IR::Attribute::InstanceId]) { |
| 1215 | if (profile.support_vertex_instance_id) { | 1215 | if (profile.support_vertex_instance_id) { |
| @@ -1332,7 +1332,7 @@ void EmitContext::DefineOutputs(const IR::Program& program) { | |||
| 1332 | if (info.stores.AnyComponent(IR::Attribute::FixedFncTexture0S)) { | 1332 | if (info.stores.AnyComponent(IR::Attribute::FixedFncTexture0S)) { |
| 1333 | const Id id{DefineOutput(*this, F32[4], invocations)}; | 1333 | const Id id{DefineOutput(*this, F32[4], invocations)}; |
| 1334 | Decorate(id, spv::Decoration::Location, static_cast<u32>(12)); | 1334 | Decorate(id, spv::Decoration::Location, static_cast<u32>(12)); |
| 1335 | output_txt_coord = id; | 1335 | output_fixed_fnc_texture = id; |
| 1336 | } | 1336 | } |
| 1337 | 1337 | ||
| 1338 | for (size_t index = 0; index < IR::NUM_GENERICS; ++index) { | 1338 | for (size_t index = 0; index < IR::NUM_GENERICS; ++index) { |
diff --git a/src/shader_recompiler/backend/spirv/emit_context.h b/src/shader_recompiler/backend/spirv/emit_context.h index 1023d0ee4..9a76e1ca9 100644 --- a/src/shader_recompiler/backend/spirv/emit_context.h +++ b/src/shader_recompiler/backend/spirv/emit_context.h | |||
| @@ -269,13 +269,13 @@ public: | |||
| 269 | 269 | ||
| 270 | Id input_position{}; | 270 | Id input_position{}; |
| 271 | Id input_front_color{}; | 271 | Id input_front_color{}; |
| 272 | Id input_txt_coord{}; | 272 | Id input_fixed_fnc_texture{}; |
| 273 | std::array<Id, 32> input_generics{}; | 273 | std::array<Id, 32> input_generics{}; |
| 274 | 274 | ||
| 275 | Id output_point_size{}; | 275 | Id output_point_size{}; |
| 276 | Id output_position{}; | 276 | Id output_position{}; |
| 277 | Id output_front_color{}; | 277 | Id output_front_color{}; |
| 278 | Id output_txt_coord; | 278 | Id output_fixed_fnc_texture; |
| 279 | std::array<std::array<GenericElementInfo, 4>, 32> output_generics{}; | 279 | std::array<std::array<GenericElementInfo, 4>, 32> output_generics{}; |
| 280 | 280 | ||
| 281 | Id output_tess_level_outer{}; | 281 | Id output_tess_level_outer{}; |
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp index 0444bbf8f..a546d06a5 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp | |||
| @@ -75,10 +75,10 @@ std::optional<OutAttr> OutputAttrPointer(EmitContext& ctx, IR::Attribute attr) { | |||
| 75 | } | 75 | } |
| 76 | } | 76 | } |
| 77 | if (attr >= IR::Attribute::FixedFncTexture0S && attr <= IR::Attribute::FixedFncTexture9Q) { | 77 | if (attr >= IR::Attribute::FixedFncTexture0S && attr <= IR::Attribute::FixedFncTexture9Q) { |
| 78 | const u32 index{IR::TxtCoordAttributeIndex(attr)}; | 78 | const u32 index{IR::FixedFncTextureAttributeIndex(attr)}; |
| 79 | const u32 element{IR::TxtCoordAttributeElement(attr)}; | 79 | const u32 element{IR::FixedFncTextureAttributeElement(attr)}; |
| 80 | const Id element_id{ctx.Const(element)}; | 80 | const Id element_id{ctx.Const(element)}; |
| 81 | return OutputAccessChain(ctx, ctx.output_f32, ctx.output_txt_coord, element_id); | 81 | return OutputAccessChain(ctx, ctx.output_f32, ctx.output_fixed_fnc_texture, element_id); |
| 82 | } | 82 | } |
| 83 | switch (attr) { | 83 | switch (attr) { |
| 84 | case IR::Attribute::PointSize: | 84 | case IR::Attribute::PointSize: |
| @@ -322,8 +322,8 @@ Id EmitGetAttribute(EmitContext& ctx, IR::Attribute attr, Id vertex) { | |||
| 322 | return type->needs_cast ? ctx.OpBitcast(ctx.F32[1], value) : value; | 322 | return type->needs_cast ? ctx.OpBitcast(ctx.F32[1], value) : value; |
| 323 | } | 323 | } |
| 324 | if (attr >= IR::Attribute::FixedFncTexture0S && attr <= IR::Attribute::FixedFncTexture9Q) { | 324 | if (attr >= IR::Attribute::FixedFncTexture0S && attr <= IR::Attribute::FixedFncTexture9Q) { |
| 325 | const u32 index{IR::TxtCoordAttributeIndex(attr)}; | 325 | const u32 index{IR::FixedFncTextureAttributeIndex(attr)}; |
| 326 | return ctx.OpLoad(ctx.F32[1], AttrPointer(ctx, ctx.input_f32, vertex, ctx.input_txt_coord, | 326 | return ctx.OpLoad(ctx.F32[1], AttrPointer(ctx, ctx.input_f32, vertex, ctx.input_fixed_fnc_texture, |
| 327 | ctx.Const(element))); | 327 | ctx.Const(element))); |
| 328 | } | 328 | } |
| 329 | switch (attr) { | 329 | switch (attr) { |