Restore vertex fetch state update from context -> state This is required to have the vertex fetch state actually available at JIT time. Bug: b/124177079 Change-Id: Ibb548c372ee349d3a5312bb46dddcf13257dc294 Reviewed-on: https://swiftshader-review.googlesource.com/c/25188 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by: Chris Forbes <chrisforbes@google.com> Reviewed-by: Nicolas Capens <nicolascapens@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
diff --git a/src/Device/VertexProcessor.cpp b/src/Device/VertexProcessor.cpp index 16a38d0..00af07b 100644 --- a/src/Device/VertexProcessor.cpp +++ b/src/Device/VertexProcessor.cpp
@@ -320,6 +320,16 @@ DrawType type = static_cast<DrawType>(static_cast<unsigned int>(drawType) & 0xF); state.verticesPerPrimitive = 1 + (type >= DRAW_LINELIST) + (type >= DRAW_TRIANGLELIST); + for(int i = 0; i < MAX_VERTEX_INPUTS; i++) + { + state.input[i].type = context->input[i].type; + state.input[i].count = context->input[i].count; + state.input[i].normalized = context->input[i].normalized; + // TODO: get rid of attribType -- just keep the VK format all the way through, this fully determines + // how to handle the attribute. + state.input[i].attribType = context->vertexShader->inputs[i*4].Type; + } + state.hash = state.computeHash(); return state;