v3dv: stencil state fixes
authorIago Toral Quiroga <itoral@igalia.com>
Wed, 18 Mar 2020 15:52:17 +0000 (16:52 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 13 Oct 2020 21:21:28 +0000 (21:21 +0000)
commit6bd4e69e9c64e4ac732a7be9b3668af527517e05
tree937ec103a51d45a43a3ff4751a7e5094a2e5657e
parentc5784fbef4c0ebc3a7a5ca0e9573a01c838c5108
v3dv: stencil state fixes

First this makes it so we only clear dirty stencil state if we actually
emit the stencil packets. Second, now we check if we need to emit stencil
whenever a new pipeline is bound, since a new pipeline may not change the
dynamic stencil state but might still be changing other aspects of stencil,
which means that even if the dynamic stencil state is not dirty, we might
still need to emit new stencil packets.

This fixes a regression in VkRunner test depth-buffer.vk_shader_test after
we dropped the redundant emission of stencil state, since that redundant
emission was happening unconditionally whenever we had a new pipeline.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
src/broadcom/vulkan/v3dv_cmd_buffer.c