• Advertisement
Sign in to follow this  

[D3D12] Disable shader resource view for back buffer

This topic is 672 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
Sign in to follow this  

  • Advertisement