radv: fix optimizing needed states if some are marked as dynamic
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 13 Oct 2020 14:28:34 +0000 (16:28 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 14 Oct 2020 17:13:29 +0000 (17:13 +0000)
commitbb00a6860eeb5c92db3dc4b98df1f2e568fa162d
tree23c726b62cc823acfd00f8795b8a71fdaeff0974
parent68daac28df1b2f50a43740d1905932cfde0ddf1a
radv: fix optimizing needed states if some are marked as dynamic

From the Vulkan spec 1.2.157:

    "VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE_EXT specifies that the
     stencilTestEnable state in VkPipelineDepthStencilStateCreateInfo
     will be ignored and must be set dynamically with
     vkCmdSetStencilTestEnableEXT before any draw call."

So, stencilTestEnable should be ignored if dynamic. While we are
at it, fix depthBoundsTestEnable too.

Cc: 20.2
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3633
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7112>
src/amd/vulkan/radv_pipeline.c