Jump to content
  • Advertisement
Sign in to follow this  
wil_

Is it possible to bind an ID3D11RenderTargetView to different slots at the same time?

This topic is 1371 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi.

 

I am writing a rendering library and was wondering if it was possible to bind an ID3D11RenderTargetView to different OMSetRenderTargets() slots at the same time.

It would be easier for me if I did not have to support that case. I feel like it's impossible, but I am not completely sure.

 

I don't see any case where that would work, but I ask just to be sure. For example could a shader write to one part of the render target via one of the slots, and to an other part of the same target via an other slot?

I am not yet familiar with Unordered Access Views and wondered if they could be used to such a thing? Or am I safe in ignoring that case?

Share this post


Link to post
Share on other sites
Advertisement

I haven't actually tried it, but I'm fairly certain that it won't work since it would result in ambiguity as to which pixel shader output actually gets written to memory. You could verify very easily by trying it with the debug runtimes enabled, and checking for errors in the debugger output.

Share this post


Link to post
Share on other sites

http://msdn.microsoft.com/en-us/library/windows/desktop/ff476464%28v=vs.85%29.aspx

 

 

It is invalid to try to set the same subresource to multiple render target slots.

 

And also:

 

 

The same resource view cannot be bound to multiple render target slots simultaneously. However, you can set multiple non-overlapping resource views of a single resource as simultaneous multiple render targets.

 

Where I guess you need to be careful is with a setup like render-to-cubemap where you may have multiple render target views of the same resource.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!