Jump to content

  • Log In with Google      Sign In   
  • Create Account


deferred contex, read from texture


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 gfxCahd   Members   -  Reputation: 200

Like
0Likes
Like

Posted 27 January 2014 - 09:22 AM

So in my D3D10 engine i loaded data on a separate thread.

I rendered on one thread, loaded on another, both using the same D3D10.device, everything working perfectly.

 

So, I switch to D3D11. Now, in my loading code, I need to Map a Staging texture.

(I keep my heightmap in a dds, I load it, then map it to access the texel data.)

Can't use the device for that anymore, you have to use a new class, the context.

Ok, so I tried that and my game crashes. Right, I need to be using a deferred context, not the immediate one.

 

But!

If you call Map on a deferred context, you can only pass D3D11_MAP_WRITE_DISCARD, D3D11_MAP_WRITE_NO_OVERWRITE, or both to the MapType parameter. Other D3D11_MAP-typed values are not supported for a deferred context.

 

http://msdn.microsoft.com/en-us/library/ff476457.aspx

 

 

But I want to read from my loaded texture, ergo i need to specify D3D11_MAP_READ.

ok, so what do I do now?



Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS