Sign in to follow this  

Porting execting directx code for Windows store app

This topic is 818 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

Hey guys,

I have an existing directx 11 code working fine on win32 application but when I have integrated the same code in an universal platform app or in windows 8 store app I had some issue with all post process effect in my game. I get nothing when I bind a render target texture as a shader resource.

After that I activated debugging mode it shows me only the following info:

D3D11 INFO: ID3D11DeviceContext::OMSetRenderTargets: Forcing OM Render Target slot 0 to NULL , since calling Present for DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL SwapChains unbinds backbuffer 0 from all GPU writeable bind points, except for DXGI_PRESENT_DO_NOT_SEQUENCE or DXGI_PRESENT_TEST usage. [ STATE_SETTING INFO #49: OMSETRENDERTARGETS_UNBINDDELETINGOBJECT].

Even more when I try to get a screenshot at the runtime using directXTex all I got is a black empty image.

Could anyone help me please !

Thank you guys smile.png

Edited by IromY44

Share this post


Link to post
Share on other sites

You probably wrote your initial code with a swap chain using DXGI_SWAP_EFFECT_DISCARD, which allowed you to use buffer 0 in your swap chain as a single access point to all buffers in your swap chain.

 

With the introduction of the flip swap effects (DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL and DXGI_SWAP_EFFECT_FLIP_DISCARD), which are required for store apps, you need to manage your back buffers by yourself. Each frame you need to query the swap chain to get an index to the active back buffer. After that you proceed to use that back buffer as you would normally.

 

It's a fairly simple change, but if your application heavily relies on the back buffer being a single entity (which in all honestly it never was if you were using double or triple buffering in D3D11, the driver just hid it very well) it might be a bit annoying to work around.

Share this post


Link to post
Share on other sites

This topic is 818 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.

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