Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

What do you do when you don't know in advance the total number of textures that will be used?

$
0
0
I don't know in advance the total number of textures my app will be using. I wanted to use this approach but it turned out to be impractical because D3D11 hardware may not allow binding more than 128 SRVs to the shaders. Next I decided to keep all the texture SRV's in a default heap that is invisible to the shaders, and when I need to render a texture I would copy its SRV from the invisible heap to another heap that is bound to the pixel shader, but this also seems impractical because ID3D12Device::CopyDescriptorsSimple cannot be used in a command list. It executes immediately when it is called. I would need to close, execute and reset the command list every time I need to switch the texture. What is the correct way to do this?

Viewing all articles
Browse latest Browse all 17825

Trending Articles