From 34e03294efbc7668e5679727c131e35e0563cdc6 Mon Sep 17 00:00:00 2001 From: "Dr. Chat" Date: Sat, 16 Jan 2016 22:39:00 -0600 Subject: [PATCH] Fix vfetch_mini instructions using stale data when following a vfetch_full that doesn't fetch anything --- src/xenia/gpu/shader_translator.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/xenia/gpu/shader_translator.cc b/src/xenia/gpu/shader_translator.cc index 689bcbf97..11affc7ea 100644 --- a/src/xenia/gpu/shader_translator.cc +++ b/src/xenia/gpu/shader_translator.cc @@ -203,13 +203,14 @@ void ShaderTranslator::GatherBindingInformation( void ShaderTranslator::GatherVertexBindingInformation( const VertexFetchInstruction& op) { + ParsedVertexFetchInstruction fetch_instr; + ParseVertexFetchInstruction(op, &fetch_instr); + + // Don't bother setting up a binding for an instruction that fetches nothing. if (!op.fetches_any_data()) { return; } - ParsedVertexFetchInstruction fetch_instr; - ParseVertexFetchInstruction(op, &fetch_instr); - // Try to allocate an attribute on an existing binding. // If no binding for this fetch slot is found create it. using VertexBinding = Shader::VertexBinding;