Skip to content

Commit

Permalink
Remove RenderAttachment usage for multi-planar format resource
Browse files Browse the repository at this point in the history
This CL fix a bug about adding RenderAttachment usage when importing
multi-planar resource into Dawn. The bug causes validation error and
fails import op.

Bug: chromium:1354412
Change-Id: I58a0701195c53a94199ed70b4c8757010aac1081
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3840195
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1037545}
  • Loading branch information
shaoboyan authored and Chromium LUCI CQ committed Aug 22, 2022
1 parent 9c2c62a commit efe0448
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,11 @@ WGPUTexture BeginAccess(WGPUTextureUsage usage) final {
// copyTextureForBrowser.
WGPUDawnTextureInternalUsageDescriptor internalDesc = {};
internalDesc.chain.sType = WGPUSType_DawnTextureInternalUsageDescriptor;
internalDesc.internalUsage = WGPUTextureUsage_CopySrc |
WGPUTextureUsage_RenderAttachment |
WGPUTextureUsage_TextureBinding;
internalDesc.internalUsage =
WGPUTextureUsage_CopySrc | WGPUTextureUsage_TextureBinding;
if (wgpu_format_ != WGPUTextureFormat_R8BG8Biplanar420Unorm) {
internalDesc.internalUsage |= WGPUTextureUsage_RenderAttachment;
}

texture_descriptor.nextInChain =
reinterpret_cast<WGPUChainedStruct*>(&internalDesc);
Expand Down

0 comments on commit efe0448

Please sign in to comment.