turnip: do not emit draw states in draw_cs outside of renderpass
authorJonathan Marek <jonathan@marek.ca>
Thu, 3 Dec 2020 04:59:24 +0000 (23:59 -0500)
committerJonathan Marek <jonathan@marek.ca>
Tue, 8 Dec 2020 18:26:11 +0000 (13:26 -0500)
commitaed7c5aa31f3896137a5cdd60f87c30cee3798b8
tree11e4b3c45b7a8385811a48eb10140b9593056bc3
parent3f58d80823e297ffa4a478d9d600db5ac19227d1
turnip: do not emit draw states in draw_cs outside of renderpass

This avoids a possible issue with MSAA sysmem clears, which use a 3D clear
path which assumes draw states are disabled, and are emitted in draw_cs in
BeginRenderPass.

(checking for TU_CMD_DIRTY_DRAW_STATE also allows not emitting the draw
states if they will be re-emitted on the next draw anyway. the previous
patch makes it so TU_CMD_DIRTY_DRAW_STATE is always set outside of
renderpasses)

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7899>
src/freedreno/vulkan/tu_cmd_buffer.c