You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking through the Enhanced Barriers specs, I see that when activating aliased resources, a texture barrier using LayoutBefore = D3D12_BARRIER_LAYOUT_UNDEFINED, AccessBefore = D3D12_BARRIER_ACCESS_NO_ACCESS, and (D3D12_TEXTURE_BARRIER::)Flags = D3D12_TEXTURE_BARRIER_FLAG_DISCARD is the way to ensure any leftover data in place of the newly activated, aliased resource's colour/depth metadata is suitably initialised, but I can't see anything that specifies exactly what the effect of such discard initialisation is.
Even the documentation on ID3D12GraphicsCommandList::DiscardResource has nothing more than the same mysterious 'may initialize metadata' comment, which makes me wonder whether the resultant state is intentionally undefined for reasons like helping out driver implementations. But with it being so undefined, it does leave a few questions for the user. For example -
Does it have the effect of clearing a depth or colour target? And if so, is it always guaranteed to be the pOptimizedClearValue set on the resource's creation?
What does it do to a target without any metadata to initialise?
If use of an activated aliased texture resource needs it cleared to a specific value/depth, then after a suitable discard barrier, is a clearing 'Draw...' or 'Clear...View' ever redundant or is it still always necessary... or is it implementation-dependent, leaving the user to have to 'play it safe' by always performaing a clear even if, for some implementations, a metadata init might be sufficient to clear the resource?
The text was updated successfully, but these errors were encountered:
Looking through the Enhanced Barriers specs, I see that when activating aliased resources, a texture barrier using
LayoutBefore = D3D12_BARRIER_LAYOUT_UNDEFINED
,AccessBefore = D3D12_BARRIER_ACCESS_NO_ACCESS
, and(D3D12_TEXTURE_BARRIER::)Flags = D3D12_TEXTURE_BARRIER_FLAG_DISCARD
is the way to ensure any leftover data in place of the newly activated, aliased resource's colour/depth metadata is suitably initialised, but I can't see anything that specifies exactly what the effect of such discard initialisation is.Even the documentation on ID3D12GraphicsCommandList::DiscardResource has nothing more than the same mysterious 'may initialize metadata' comment, which makes me wonder whether the resultant state is intentionally undefined for reasons like helping out driver implementations. But with it being so undefined, it does leave a few questions for the user. For example -
pOptimizedClearValue
set on the resource's creation?The text was updated successfully, but these errors were encountered: