summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend/maxwell/translate_program.cpp
diff options
context:
space:
mode:
authorGravatar FengChen2022-10-17 09:40:44 +0800
committerGravatar FengChen2022-10-17 09:40:44 +0800
commit20139f8a551098633e4ea3eab079b590c47ee0f5 (patch)
tree8d0366b23080e91b43611ae599a2ba8f69387642 /src/shader_recompiler/frontend/maxwell/translate_program.cpp
parentvideo_core: Fix legacy to generic location unpaired (diff)
downloadyuzu-20139f8a551098633e4ea3eab079b590c47ee0f5.tar.gz
yuzu-20139f8a551098633e4ea3eab079b590c47ee0f5.tar.xz
yuzu-20139f8a551098633e4ea3eab079b590c47ee0f5.zip
Address feedback
Diffstat (limited to 'src/shader_recompiler/frontend/maxwell/translate_program.cpp')
-rw-r--r--src/shader_recompiler/frontend/maxwell/translate_program.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/translate_program.cpp b/src/shader_recompiler/frontend/maxwell/translate_program.cpp
index 3aee33a96..b58741d4d 100644
--- a/src/shader_recompiler/frontend/maxwell/translate_program.cpp
+++ b/src/shader_recompiler/frontend/maxwell/translate_program.cpp
@@ -272,14 +272,14 @@ IR::Program MergeDualVertexPrograms(IR::Program& vertex_a, IR::Program& vertex_b
272void ConvertLegacyToGeneric(IR::Program& program, const Shader::RuntimeInfo& runtime_info) { 272void ConvertLegacyToGeneric(IR::Program& program, const Shader::RuntimeInfo& runtime_info) {
273 auto& stores = program.info.stores; 273 auto& stores = program.info.stores;
274 if (stores.Legacy()) { 274 if (stores.Legacy()) {
275 std::queue<IR::Attribute> ununsed_output_generics{}; 275 std::queue<IR::Attribute> unused_output_generics{};
276 for (size_t index = 0; index < IR::NUM_GENERICS; ++index) { 276 for (size_t index = 0; index < IR::NUM_GENERICS; ++index) {
277 if (!stores.Generic(index)) { 277 if (!stores.Generic(index)) {
278 ununsed_output_generics.push(IR::Attribute::Generic0X + index * 4); 278 unused_output_generics.push(IR::Attribute::Generic0X + index * 4);
279 } 279 }
280 } 280 }
281 program.info.legacy_stores_mapping = 281 program.info.legacy_stores_mapping =
282 GenerateLegacyToGenericMappings(stores, ununsed_output_generics, {}); 282 GenerateLegacyToGenericMappings(stores, unused_output_generics, {});
283 for (IR::Block* const block : program.post_order_blocks) { 283 for (IR::Block* const block : program.post_order_blocks) {
284 for (IR::Inst& inst : block->Instructions()) { 284 for (IR::Inst& inst : block->Instructions()) {
285 switch (inst.GetOpcode()) { 285 switch (inst.GetOpcode()) {
@@ -300,16 +300,16 @@ void ConvertLegacyToGeneric(IR::Program& program, const Shader::RuntimeInfo& run
300 300
301 auto& loads = program.info.loads; 301 auto& loads = program.info.loads;
302 if (loads.Legacy()) { 302 if (loads.Legacy()) {
303 std::queue<IR::Attribute> ununsed_input_generics{}; 303 std::queue<IR::Attribute> unused_input_generics{};
304 for (size_t index = 0; index < IR::NUM_GENERICS; ++index) { 304 for (size_t index = 0; index < IR::NUM_GENERICS; ++index) {
305 const AttributeType input_type{runtime_info.generic_input_types[index]}; 305 const AttributeType input_type{runtime_info.generic_input_types[index]};
306 if (!runtime_info.previous_stage_stores.Generic(index) || !loads.Generic(index) || 306 if (!runtime_info.previous_stage_stores.Generic(index) || !loads.Generic(index) ||
307 input_type == AttributeType::Disabled) { 307 input_type == AttributeType::Disabled) {
308 ununsed_input_generics.push(IR::Attribute::Generic0X + index * 4); 308 unused_input_generics.push(IR::Attribute::Generic0X + index * 4);
309 } 309 }
310 } 310 }
311 auto mappings = GenerateLegacyToGenericMappings( 311 auto mappings = GenerateLegacyToGenericMappings(
312 loads, ununsed_input_generics, runtime_info.previous_stage_legacy_stores_mapping); 312 loads, unused_input_generics, runtime_info.previous_stage_legacy_stores_mapping);
313 for (IR::Block* const block : program.post_order_blocks) { 313 for (IR::Block* const block : program.post_order_blocks) {
314 for (IR::Inst& inst : block->Instructions()) { 314 for (IR::Inst& inst : block->Instructions()) {
315 switch (inst.GetOpcode()) { 315 switch (inst.GetOpcode()) {