Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Conversation

CrossVR
Copy link

@CrossVR CrossVR commented Aug 3, 2025

The current implementation does not respect the following line from the extension description:

It can be used to set a smaller or larger clamping range than the viewport depth range without affecting the depth mapping of the viewport transform.

Instead the driver currently implements this extension as a global override of the viewport depth range, which incorrectly does affect the viewport transform.

The implementation is also not consistent with the definition in the Vulkan specification section 30.10.1, which specifies that depth clamp control only overrides the minDepth and maxDepth of the viewport for the purposes of clamping the depth value.

To implement the extension correctly the registers for the viewport transform and the depth clamp need to be set separately. To achieve this the PR moves the depthClampOverride member from XGL to the PAL::ViewportParams struct in the Platform Abstraction Layer.

Additionally, the depth clamp override was previously treated as a global all-gpu parameter which seems to be incorrect for a device extension. Thus the new implementation now treats it as a per-gpu parameter.

Depends on the following PAL PR: GPUOpen-Drivers/pal#110

I've also submitted an additional conformance test to cover this case: KhronosGroup/VK-GL-CTS#532

Closes issue #182

@jinjianrong
Copy link
Member

@CrossVR Thanks for your contribution. The AMDVLK open source project is discontinued as announced here. We will get the issue fixed in our Windows proprietary Vulkan driver.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants