[D3D12] MRT only updates the first texture (kinda)?

Started by
5 comments, last by Funkymunky 7 years, 11 months ago

I have a weird situation. I am trying to use a single shader to write to two textures simultaneously. These textures are both dynamic; I pass in a time value and the textures change based on that. I've ensured that my call to OMSetRenderTargets is correct, and indeed when I look at the first texture I can see it changing as I'd expect. When I look at the second texture, it doesn't change. But if I set a breakpoint, let the code stop, clear the breakpoint and continue running... I see that the second texture has changed.

It seems like when I run I just see the first iteration of the second texture. Then when I break, I give the GPU time to complete it's work, and running again shows me that updated texture. But it's static again, until I do another break, etc. Both textures have ResourceBarrier Transitions inserted into the command list before being used as render targets or pixel shader resources.

I'm at a loss for how to proceed...

Advertisement

Have you tried WARP?

Are you drawing the textures to the screen after they've been rendered to? Is that what you mean when you say you're "looking" at them?

Adam Miles - Principal Software Development Engineer - Microsoft Xbox Advanced Technology Group

I get "The specified device interface or feature level is not supported on this system" when I try to use a WARP device.

I am drawing the texture to a quad, yes.

Sounds like you haven't installed the Graphics Tools (including Debug Layer) from Windows' Optional Features?

Can you follow this and see if you can use WARP after that?

https://msdn.microsoft.com/library/windows/apps/dn914047.aspx

Adam Miles - Principal Software Development Engineer - Microsoft Xbox Advanced Technology Group

I installed the Graphics Tools and it works as expected when run with WARP. I updated to the latest nVidia driver to no avail...

Did you try enabling the Debug Layer now that you have the Graphics Tools? Does the validation layer emit any warnings or errors?

Adam Miles - Principal Software Development Engineer - Microsoft Xbox Advanced Technology Group

Yes! Which led me to realize that I was creating the Pipeline State with 1 Render Target. That is some sharp remote debugging sir. Thank you!

This topic is closed to new replies.

Advertisement