Is it ok to bind nullptr shader resource views and sample them in some shader? I.e. is the resulting behavior deterministic and consistent across GPU drivers? Or should one rather bind an SRV to a texture having just a single black texel?
nullptr SRV
In D3D11, yes it's well defined behavior. Reads from null resources return 0, and writes (to UAV/RTV/DSV) become no-ops.
In D3D12, it can be undefined behavior depending on how the SRV was bound to the shader... SRVs supplied as root-descriptors must be valid if they're used from the shader or you might crash the GPU!
. 22 Racing Series .
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement