Don't clear depth stencil textures when created as committed resource
The toggle D3D12ForceClearCopyableDepthStencilTextureOnCreation can be disabled when the toggle D3D12Allocate2DTexturewithCopyDstAsCommittedResource is enabled because with D3D12Allocate2DTexturewithCopyDstAsCommittedResource all the depth stencil textures (can only be 2D textures) with CopyDst usage have already been created with CreateCommittedResource() instead of CreatePlacedResource(), thus the driver issue about creating depth stencil texture on a dirty heap with CreatePlacedResource() won't be triggered. Bug: dawn:1487, chromium:1237175 Change-Id: I872d4d95e6e05e1bcf9489b31a72e61f957de3e5 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/116129 Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Jiawei Shao <jiawei.shao@intel.com> Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
3e61641e12
commit
786d4b12dd
|
@ -733,6 +733,10 @@ void Device::InitTogglesFromDriver() {
|
|||
if ((gpu_info::IsIntelGen9(vendorId, deviceId) && !gpu_info::IsSkylake(deviceId)) ||
|
||||
gpu_info::IsIntelGen11(vendorId, deviceId)) {
|
||||
SetToggle(Toggle::D3D12Allocate2DTexturewithCopyDstAsCommittedResource, true);
|
||||
// Now we don't need to force clearing depth stencil textures with CopyDst as all the depth
|
||||
// stencil textures (can only be 2D textures) will be created with CreateCommittedResource()
|
||||
// instead of CreatePlacedResource().
|
||||
SetToggle(Toggle::D3D12ForceClearCopyableDepthStencilTextureOnCreation, false);
|
||||
}
|
||||
|
||||
// Currently this toggle is only needed on Intel Gen9 and Gen9.5 GPUs.
|
||||
|
|
Loading…
Reference in New Issue