Skip to content

Draft: lvp: Add support for VK_EXT_depth_clamp_control

Jules Blok requested to merge jules.blok/mesa:lvp-depth-clamp-control into main

What does this MR do and why?

This MR adds support to for VK_EXT_depth_clamp_control to llvmpipe. Since pipe does not have a separate parameter for the viewport depth clamp range this required expanding the viewport struct.

I opted to expand the viewport struct because all major GPU vendors have the clamp range as a per-viewport register even though the extension does not define the clamp range as a per-viewport parameter. This ensures that llvmpipe is not more limiting than other drivers and can be easily updated to support this as a per-viewport parameter if an extension makes use of it.

One open question that remains is when the new min/max depth clamp parameters should be valid: Should these always accurately represent the clamping range even when depth clamping is disabled? If we ensure these parameters are always valid and accurate that would alleviate drivers from having to check the depth clamp rasterizer state when updating the viewport.

Edited by Jules Blok

Merge request reports

Loading