Jump to content
  • Advertisement
Sign in to follow this  
_void_

[D3D12] Disable shader resource view for back buffer

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

Hello!

 

I have been reworking my D3D12 framework and discovered that back buffer resource is missing D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE flag even if I create swap chain without DXGI_USAGE_SHADER_INPUT flag.

 

Basically, I am doing the following

DXGI_SWAP_CHAIN_DESC swapChainDesc;
swapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; // No DXGI_USAGE_SHADER_INPUT

IDXGISwapChain3* pDXSwapChain = ...;

ID3D12Resource* pDXBuffer = nullptr;
pDXSwapChain->GetBuffer(index, IID_PPV_ARGS(&pDXBuffer));

D3D12_RESOURCE_DESC texDesc = pDXBuffer->GetDesc();
assert((texDesc.Flags & D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE) == 1); // Whoopppss

I would expect D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE to be set on the back buffer as well.

Do you know if it is possible to disable shader resource view on the backbuffer? This is not a big problem for me - just curious :-)

 

Thanks

Edited by _void_

Share this post


Link to post
Share on other sites
Advertisement

Thank you Jesse for the prompt response.

Checked the documentation you are absolutely right :-)

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!