vulkan,lavapipe: Use a tri-state enum for depth clip enable
authorJason Ekstrand <jason.ekstrand@collabora.com>
Thu, 29 Sep 2022 16:55:03 +0000 (11:55 -0500)
committerMarge Bot <emma+marge@anholt.net>
Fri, 7 Oct 2022 06:22:32 +0000 (06:22 +0000)
commit650880105e6d2d6f5b507a9353cc1247f910b0df
treefcb73a5a6956d9cf52cf74d8e8e8bacdc9e1b9d2
parent0d3bc8c5b974a2e24ef3347a3252d93e5c27b813
vulkan,lavapipe: Use a tri-state enum for depth clip enable

This should make it a lot more clear how depth clip enables work.
Annoyingly, because of the way they originally worked in Vulkan 1.0,
it's dependent on the depth clamp if the state isn't set in the pipeline
and isn't declared dynamic.  The enum is explicitly set up so that
drivers don't need to be aware of this change unless they already
implement VK_EXT_extended_dynamic_state3.  If depth clamp/clamp are not
dynamic, depth clip will be either TRUE or FALSE which map to 1/0 so the
field can still be treated as a boolean.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18889>
src/gallium/frontends/lavapipe/lvp_execute.c
src/intel/vulkan/anv_pipeline.c
src/intel/vulkan_hasvk/anv_pipeline.c
src/vulkan/runtime/vk_graphics_state.c
src/vulkan/runtime/vk_graphics_state.h