Merge pull request #517 from DrChat/vfetch_fix

Fix vfetch_mini instructions using stale data
This commit is contained in:
Ben Vanik 2016-01-16 23:38:25 -08:00
commit ca135eb0e7
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;