Skip to content

Commit

Permalink
WebGPU GL: Add RenderAttachment texture usage.
Browse files Browse the repository at this point in the history
Add RenderAttachment internal texture usage to DawnGLTextureRepresentation.

This allows transfers to offscreen imageBitmap with alphaMode="opaque"
to work correctly.

Bug: dawn:2187
Change-Id: Ice4d5db55bae9c8e49bd8f176d041532a2f86968
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5020359
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1223156}
  • Loading branch information
SenorBlanco authored and Chromium LUCI CQ committed Nov 10, 2023
1 parent dc97f89 commit 9f8aa78
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ wgpu::Texture DawnGLTextureRepresentation::BeginAccess(

// Add internal TextureBinding usage for copyTextureForBrowser().
wgpu::DawnTextureInternalUsageDescriptor internalDesc;
internalDesc.internalUsage = wgpu::TextureUsage::TextureBinding;
internalDesc.internalUsage =
wgpu::TextureUsage::TextureBinding | wgpu::TextureUsage::RenderAttachment;

texture_descriptor.nextInChain = &internalDesc;

Expand Down

0 comments on commit 9f8aa78

Please sign in to comment.