Fix vfetch_mini instructions using stale data when following a vfetch_full that doesn't fetch anything

This commit is contained in:
Dr. Chat 2016-01-16 22:39:00 -06:00
parent 3f6784b10c
commit 34e03294ef
1 changed files with 4 additions and 3 deletions

View File

@ -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;