Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[d3d9] Handle sampling from DS_READONLY properly #3624

Merged
merged 1 commit into from
Aug 19, 2023

Conversation

K0bin
Copy link
Collaborator

@K0bin K0bin commented Aug 17, 2023

Fixes #3593

Instead of an enum or read/write flags like we discussed, I took a step back and thought about what CommonTexture::m_hazardous was actually used for. It's used to track whether the image has been transition to the hazard layout (GENERAL or FEEDBACK_LOOP). That's it. The actual hazard tracking happens in the device.

So the image layout strategy for DS is now as follows:

  • If there's a hazard with depth write enabled, we transition to LAYOUT_FEEDBACK_LOOP and keep using that, just like we do for color RTs.
  • If there's a hazard with depth write disabled (so technically not a hazard), we use LAYOUT_DEPTH_READ_ONLY for the render pass and transition back to the regular layout afterwards.

Before we would transition between LAYOUT_FEEDBACK_LOOP and LAYOUT_DEPTH_READ_ONLY per render pass.

@K0bin K0bin added the d3d9 label Aug 17, 2023
@K0bin K0bin requested a review from misyltoad August 17, 2023 01:07
@K0bin K0bin force-pushed the ds-readonly-feedbackloop branch from 2086ea1 to 27ca48b Compare August 17, 2023 01:08
@misyltoad misyltoad merged commit bcaaac4 into doitsujin:master Aug 19, 2023
@K0bin K0bin deleted the ds-readonly-feedbackloop branch August 19, 2023 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[regression] Spider-Man Shattered Dimensions blocky effect
2 participants