Re-add heap usage tracking for textures in a pass
Heap usage tracking for textures in a pass was mistakenly removed when texture subresource transitions was implemented. This must be re-added for residency management to work (and not crash the application). Bug: dawn:193 Change-Id: Ie5e9622f88a70d153232d5d72bb11846f4164e87 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/26461 Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
This commit is contained in:
parent
1662e97f32
commit
ccf01e74ec
|
@ -722,6 +722,12 @@ namespace dawn_native { namespace d3d12 {
|
|||
CommandRecordingContext* commandContext,
|
||||
std::vector<D3D12_RESOURCE_BARRIER>* barriers,
|
||||
const PassTextureUsage& textureUsages) {
|
||||
if (mResourceAllocation.GetInfo().mMethod != AllocationMethod::kExternal) {
|
||||
// Track the underlying heap to ensure residency.
|
||||
Heap* heap = ToBackend(mResourceAllocation.GetResourceHeap());
|
||||
commandContext->TrackHeapUsage(heap, GetDevice()->GetPendingCommandSerial());
|
||||
}
|
||||
|
||||
HandleTransitionSpecialCases(commandContext);
|
||||
|
||||
const Serial pendingCommandSerial = ToBackend(GetDevice())->GetPendingCommandSerial();
|
||||
|
|
Loading…
Reference in New Issue