Hash :
718cdb91
Author :
Date :
2025-09-08T15:32:34
[WebGPU] Set ReadPixels to use context's command encoder. This change modifies ContextWgpu::getCurrentCommandEncoder() such that it now ends a render pass if there's an active one, ensures a command encoder is created, then sets an outHandle command encoder. This streamlines a lot of repetitive calls when getting the command encoder. This change also modifies ImageHelper::readPixels such that it now gets the command encoder from the context instead of making its own. This ensure that when the queue is submitted for a read call, that any draw/clear/etc calls in the queue are also submitted for a texture so that a read call can properly read from the texture. Bug: angleproject:438268609 Change-Id: Iec6d7f7ca27c7640cc8bdb42da53f64e4836dc5a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6923328 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Liza Burakova <liza@chromium.org> Reviewed-by: Matthew Denton <mpdenton@chromium.org>