D3D12: Empty CPU written range in Unmap calls on READBACK heaps
In order to remove a warning in the D3D debug layer, this patch passes an empty range CPU written range to calls of Unmap on READBACK buffers. Bug: dawn:419 Change-Id: Ic4dcbf31beb3a257c3d88896f4bb97e19caf0cc6 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24301 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
c98988de11
commit
c9fc175bba
|
@ -143,10 +143,6 @@ namespace dawn_native { namespace d3d12 {
|
||||||
// Temporary IDs: list of warnings that should be fixed or promoted
|
// Temporary IDs: list of warnings that should be fixed or promoted
|
||||||
//
|
//
|
||||||
|
|
||||||
// Remove after warning have been addressed
|
|
||||||
// https://crbug.com/dawn/419
|
|
||||||
D3D12_MESSAGE_ID_UNMAP_RANGE_NOT_EMPTY,
|
|
||||||
|
|
||||||
// Remove after warning have been addressed
|
// Remove after warning have been addressed
|
||||||
// https://crbug.com/dawn/421
|
// https://crbug.com/dawn/421
|
||||||
D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_INCOMPATIBLE_RESOURCE_STATE,
|
D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_INCOMPATIBLE_RESOURCE_STATE,
|
||||||
|
|
|
@ -265,7 +265,9 @@ namespace dawn_native { namespace d3d12 {
|
||||||
}
|
}
|
||||||
|
|
||||||
MaybeError Buffer::MapAtCreationImpl() {
|
MaybeError Buffer::MapAtCreationImpl() {
|
||||||
DAWN_TRY(MapInternal(true, "D3D12 map at creation"));
|
// Setting isMapWrite to false on MapRead buffers to silence D3D12 debug layer warning.
|
||||||
|
bool isMapWrite = (GetUsage() & wgpu::BufferUsage::MapWrite) != 0;
|
||||||
|
DAWN_TRY(MapInternal(isMapWrite, "D3D12 map at creation"));
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue