Skip to content

Conversation

@TheLastRar
Copy link
Contributor

Description of Changes

Fixes validation warnings when performing depth testing and sampling

Rationale behind Changes

When depth testing and sampling, we switch the depth stencil to a read-only state, however, OMSetRenderTargets() would immediately switch it back to write-only.

Additionally, using a read-only depth-stencil with render passes has additional requirements (listed here), such as providing a read-only dsv.

This seems to fix run to run variances of the Time Crisis II _NTSC-U__SLUS-20219-targetsizecoord dump.

It looks like we don't use stencil here, but I'll note it seems that DX12 allows us to specify the read/write only nature of depth and stencil separately (I think depth and stencil are separate sub-resource planes?).

Suggested Testing Steps

Test DX12

Did you use AI to help find, test, or implement this issue or feature?

No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants