Skip to content

D3D11: Always use accurate depth#12836

Merged
hrydgard merged 2 commits intohrydgard:masterfrom
unknownbrackets:d3d-depth
Apr 19, 2020
Merged

D3D11: Always use accurate depth#12836
hrydgard merged 2 commits intohrydgard:masterfrom
unknownbrackets:d3d-depth

Conversation

@unknownbrackets
Copy link
Copy Markdown
Collaborator

The Direct3D APIs use a "min" and "max" value, and it's required that min must be less than or equal to max. If this requirement is not met, the viewport parameters are not updated.

I think we assumed this was at a driver level and forced accurate depth on for NVIDIA and AMD, but this just meant Intel was still broken and less people were reporting bugs about it.

Although the PSP GE has depth viewport transform, this is not used for clipping and is not actually the depth range. The minz and maxz GE registers are the depth range, and minz must be less than or equal to maxz for drawing to occur. It's just that it also uses depth clamping.

Fixes #12831.

-[Unknown]

If we flip this because of frameskip, we need to actually process.
The Direct3D APIs use a "min" and "max" value, and it's required that min
must be less than or equal to max.  If this requirement is not met, the
viewport parameters are not updated.

We forced accurate depth on for NVIDIA and AMD, but this just meant Intel
was still broken and less people were reporting bugs about it.

Although the PSP GE has depth viewport transform, this is not used for
clipping and is not actually the depth range.  The minz and maxz GE
registers are the depth range, and minz must be less than or equal to maxz
for drawing to occur.
@unknownbrackets unknownbrackets added this to the v1.10.0 milestone Apr 19, 2020
@hrydgard hrydgard merged commit 5fbe369 into hrydgard:master Apr 19, 2020
@unknownbrackets unknownbrackets deleted the d3d-depth branch April 19, 2020 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Burnout Dominator Things not rendering correctly with DX11 and DX9

2 participants