Use GetInternalUsage in vulkan::TextureView::Initialize
We need to consider the real usage the texture was allocated as, not the public API usage. Fixes VVL violation in canvas_composite_alpha_bgra8_unorm_opaque_copy CTS ref test. Bug: chromium:1083478 Change-Id: I4461458f98750c1632b823536ff3846a9b31796b Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/83041 Reviewed-by: Loko Kung <lokokung@google.com> Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
parent
1554a7d8f9
commit
4f1596134e
|
@ -1305,7 +1305,7 @@ namespace dawn::native::vulkan {
|
|||
}
|
||||
|
||||
MaybeError TextureView::Initialize(const TextureViewDescriptor* descriptor) {
|
||||
if ((GetTexture()->GetUsage() &
|
||||
if ((GetTexture()->GetInternalUsage() &
|
||||
~(wgpu::TextureUsage::CopySrc | wgpu::TextureUsage::CopyDst)) == 0) {
|
||||
// If the texture view has no other usage than CopySrc and CopyDst, then it can't
|
||||
// actually be used as a render pass attachment or sampled/storage texture. The Vulkan
|
||||
|
|
Loading…
Reference in New Issue