Fix D3D12 render-pass failure when GPU does not support sampling positions.
It is invalid to specify a resolve source region on GPUs that do not support sample positions. Instead, the entire region rect should be set to all zeros or "empty" to always resolve the entire region. Bug: dawn:36 Change-Id: I23575b2186bffbcb2e236988558b78f97375a126 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13501 Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
This commit is contained in:
parent
1954436fe2
commit
12e780d709
|
@ -92,8 +92,11 @@ namespace dawn_native { namespace d3d12 {
|
||||||
subresourceParameters.SrcSubresource = 0;
|
subresourceParameters.SrcSubresource = 0;
|
||||||
subresourceParameters.DstSubresource = resolveDestinationTexture->GetSubresourceIndex(
|
subresourceParameters.DstSubresource = resolveDestinationTexture->GetSubresourceIndex(
|
||||||
resolveDestination->GetBaseMipLevel(), resolveDestination->GetBaseArrayLayer());
|
resolveDestination->GetBaseMipLevel(), resolveDestination->GetBaseArrayLayer());
|
||||||
subresourceParameters.SrcRect = {0, 0, resolveDestinationTexture->GetSize().width,
|
// Resolving a specified sub-rect is only valid on hardware that supports sample
|
||||||
resolveDestinationTexture->GetSize().height};
|
// positions. This means even {0, 0, width, height} would be invalid if unsupported. To
|
||||||
|
// avoid this, we assume sub-rect resolves never work by setting them to all zeros or
|
||||||
|
// "empty" to resolve the entire region.
|
||||||
|
subresourceParameters.SrcRect = {0, 0, 0, 0};
|
||||||
|
|
||||||
return subresourceParameters;
|
return subresourceParameters;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue