deferred contex, read from texture

Started by
-1 comments, last by gfxCahd 10 years, 3 months ago

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?

This topic is closed to new replies.

Advertisement