Mesa (main): dzn: Enable the depthClamp feature

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jun 27 10:20:02 UTC 2022


Module: Mesa
Branch: main
Commit: ab0e09803a53ac574751c48215d3240347cc9bc3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ab0e09803a53ac574751c48215d3240347cc9bc3

Author: Boris Brezillon <boris.brezillon at collabora.com>
Date:   Fri Jun 24 08:42:34 2022 -0700

dzn: Enable the depthClamp feature

depthClampEnable is actually the case we support properly.

!depthClampEnable requires extra work to make sure the
depth clamping that's forced by D3D12 is inactive (setting the
viewport depth range to [0,1] and dealing with the actual range
at the shader level), and clamp the depth value read by the
fragment shader in that case. This will be addressed separately.

Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17231>

---

 src/microsoft/vulkan/dzn_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/microsoft/vulkan/dzn_device.c b/src/microsoft/vulkan/dzn_device.c
index 8ccc3c22ace..f72a46a8ae0 100644
--- a/src/microsoft/vulkan/dzn_device.c
+++ b/src/microsoft/vulkan/dzn_device.c
@@ -1068,7 +1068,7 @@ dzn_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
       .logicOp = false,
       .multiDrawIndirect = true,
       .drawIndirectFirstInstance = true,
-      .depthClamp = false,
+      .depthClamp = true,
       .depthBiasClamp = true,
       .fillModeNonSolid = false,
       .depthBounds = dzn_physical_device_supports_depth_bounds(pdev),



More information about the mesa-commit mailing list