Sign in to follow this  
Followers 0
gfxCahd

deferred contex, read from texture

0 posts in this topic

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?

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0