anv: fix index buffer emission
In the following case :
vkCmdBindPipeline(compute_pipeline);
vkCmdDispatch(...);
vkCmdBindPipeline(graphics_pipeline);
vkCmdBindIndexBuffer(buffer)
vkCmdDraw(...);
We're emitting the 3DSTATE_INDEX_BUFFER instruction while the HW is still in GPGPU mode, because we're dealing the pipeline selection in vkCmdDraw().
Found while debugging Age Of Empire 4, HW is hung on 3DSTATE_INDEX_BUFFER instruction.
Signed-off-by: Lionel Landwerlin lionel.g.landwerlin@intel.com Cc: mesa-stable
Edited by Lionel Landwerlin