summaryrefslogtreecommitdiffstats
path: root/src/loader
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2017-01-31 12:41:32 +0000
committerLionel Landwerlin <[email protected]>2017-02-02 01:32:58 +0000
commit543d5db4e250a48e976a529b5e45047d5c53ab80 (patch)
tree05dbfdbc36f54ca30f434a3d2d0431ced08feb4d /src/loader
parent289aef771df79726b5463b2d6d22bb8531846ec1 (diff)
anv: always allocate a vertex element with vertexid or instanceid
Up to now on Gen8+ we only allocated a vertex element for gl_InstanceIndex or gl_VertexIndex when a vertex shader uses gl_BaseInstanceARB or gl_BaseVertexARB. This is because we would configure the VF_SGVS packet to make the VF unit write the gl_InstanceIndex & gl_VertexIndex values right behind the values computed from the vertex buffers. In the next commit we will also write the gl_DrawIDARB value. Our backend expects to pull the gl_DrawIDARB value from the element following the element containing gl_InstanceIndex, gl_VertexIndex, gl_BaseInstanceARB and gl_BaseVertexARB (see vec4_vs_visitor::setup_attributes). Therefore we need to allocate an element for the SGVS elements as long as at least one of the SGVS element is read by the shader. Otherwise our shader will use a gl_DrawIDARB value pulled from the URB one element too far (most likely garbage). v2: Fix my english (Lionel) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/loader')
0 files changed, 0 insertions, 0 deletions