src/libANGLE/renderer/wgpu/ProgramExecutableWgpu.cpp


Log

Author Commit Date CI Message
Tom Sepez 25390156 2025-08-21T00:13:19 Suppress unsafe buffers on a file-by-file basis in src/ [1 of N] In this CL, we suppress many files but stop short of actually enabling the warning by not removing the line from the unsafe_buffers_paths.txt file. That will happen in a follow-on CL, along with resolving any stragglers missed here. This is mostly a manual change so as to familiarize myself with the kinds of issues faced by the Angle codebase when applying buffer safety warnings. -- Re-generate affected hashes. -- Clang-format applied to all changed files. -- Add a few missing .reserve() calls to vectors as noticed. -- Fix some mismatches between file names and header comments. -- Be more consistent with header comment format (blank lines and trailing //-only lines when a filename comment adjoins license boilerplate). Bug: b/436880895 Change-Id: I3bde5cc2059acbe8345057289214f1a26f1c34aa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6869022 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 3158d638 2025-05-06T17:08:56 WebGPU: Store the WebGPU proc table in wrappers Instead of relying on the global WebGPU functions, pass the proc table to the object wrappers. Bug: angleproject:342213844 Change-Id: I79a5e819ffac5b366fed0a159a6cef116b5e82b3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6514676 Reviewed-by: Liza Burakova <liza@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Geoff Lang 147f4810 2025-05-05T16:33:19 WebGPU: Use WebGPU C API for Display and error utils Bug: angleproject:414831373 Change-Id: I56f90e453a746399c65956cc73eb4fcb020bcb5e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6512148 Reviewed-by: Matthew Denton <mpdenton@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Liza Burakova <liza@chromium.org>
Geoff Lang 1faf6ef2 2025-05-05T15:18:58 WebGPU: Use WebGPU C API for Programs and Buffers Bug: angleproject:414831373 Change-Id: I773f26483f53957bdfb8321b2a557df7febb376c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6512147 Reviewed-by: Matthew Denton <mpdenton@chromium.org> Reviewed-by: Liza Burakova <liza@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 69841d3c 2025-04-30T23:55:16 WebGPU: Use WebGPU C API for Textures and Framebuffers Bug: angleproject:414831373 Change-Id: I6b547a726b22e8eb5d407e2d6340b1d18bf39033 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6503024 Reviewed-by: Liza Burakova <liza@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 481000fd 2025-04-30T16:42:39 WebGPU: Move pipeline creation to the C API. Bug: angleproject:414831373 Change-Id: I3c4f7d22bce569d9813a580fd1f3d839ff165976 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6503023 Reviewed-by: Matthew Denton <mpdenton@chromium.org> Reviewed-by: Liza Burakova <liza@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Matthew Denton c60d98ce 2025-05-03T01:06:02 WGPU: Ship driver uniforms in the bind groups to the shader This writes driver uniforms to a WGPU buffer and ships that buffer to the shader. Right now this creates a new buffer every time a driver uniform changes. Bug: angleproject:389145696 Change-Id: Icfbce4d995ef593e703a597bb96e72173ec29cda Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6477136 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Matthew Denton 4b69ba93 2025-04-28T16:45:56 WGPU: upload texture bind groups and configured samplers GLSL samplers are split into separate sampler/texture variables in WGSL. Before this CL, the WGSL translator generated shaders that look like: @group(1) @binding(@@@@@@) var ANGLE_sampler_samp2D : sampler; @group(1) @binding(@@@@@@) var ANGLE_texture_samp2D : texture_2d<f32>; @group(1) @binding(@@@@@@) var ANGLE_sampler_sampCube : sampler; @group(1) @binding(@@@@@@) var ANGLE_texture_sampCube : texture_cube<f32>; This CL replaces those with actual binding numbers @group(1) @binding(0) var ANGLE_sampler_samp2D : sampler; @group(1) @binding(1) var ANGLE_texture_samp2D : texture_2d<f32>; ... Such that @binding(n*2) is the WGSL sampler variable corresponding to the n-th GLSL sampler and @binding(n*2+1) is the WGSL texture variable corresponding to the n-th GLSL sampler. This CL then generates binding group layouts matching the above, and uploads textures and configured samplers in bind groups. This makes some of the deqp_gles2 tests 2d texture tests pass, though some fail because they need a flipped y coordinate. Not yet supported: 1. arrays of samplers 2. shadow samplers 3. cube textures Bug: angleproject:389145696 Change-Id: I2ab18ae5ebb4d1289101266bd9451576aa04ce2a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6382272 Reviewed-by: Liza Burakova <liza@chromium.org> Auto-Submit: Matthew Denton <mpdenton@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang a41b798e 2024-11-21T11:07:34 WebGPU: Ensure mDefaultBindGroup is created mDefaultBindGroup would not be created if the program has no uniforms because they are not dirty. Mark all stages as dirty after linking. Bug: angleproject:376553328 Change-Id: I1663791fa1642be052948c5acb8e403fa8b844f9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6039006 Reviewed-by: Matthew Denton <mpdenton@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Matthew Denton 4a835cf2 2024-11-01T13:31:00 WebGPU: send uniforms to GPU for use in shader Basic uniforms should now be accessible in the shader during a draw call, rather than just via glGetUniform*(). This is unoptimized and creates a new GPU-side copy of all the uniforms, every time any uniform changes. This sets up the bind group layout for a pipeline and sets the bind groups in the renderer pass. Right now these bind groups only contain the default uniform blocks, but in the future will need to contain textures, samplers, and non-default uniform blocks (UBOs). Bug: angleproject:376553328 Change-Id: I50891b81ab2ee374d674213257f76319c0222120 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5980972 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Liza Burakova <liza@chromium.org> Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Matthew Denton 7e462c22 2024-09-17T15:32:41 WGPU: Implement SetUniform() enough so GetUniform() works Lays out a shadow buffer for basic uniforms per-shadertype in std140, which is close to matching WGPU's layout. This does not actually pass the buffer to WGPU as a uniform buffer. GetUniform() just reads from the shadow buffer. This is copied from the VK backend and so some code is deduplicated. Bug: angleproject:42267100 Change-Id: I727dc9e09a7ccabbb617f148dd68590469883b07 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5867444 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Matthew Denton <mpdenton@chromium.org> Reviewed-by: Liza Burakova <liza@chromium.org>
Geoff Lang c4274d54 2024-04-29T11:47:34 WebGPU: Add pipeline creation and caching. Bug: angleproject:342213825 Change-Id: I303f193d30fd6b9820efaefcae64e11042888009 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5497535 Reviewed-by: Liza Burakova <liza@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 67fc293a 2024-04-05T13:25:12 WebGPU: Add shader translation and program linking stubs. Add a TranslatorWGSL which outputs the same translated shaders every time. Implement the compile and link tasks. Bug: angleproject:8662 Change-Id: I62bbd6c528e1d671d0f4becc38f15f1eceb0336c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5428807 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Liza Burakova f2c00e8c 2024-01-18T18:36:33 Adding Dawn stub backend to ANGLE Bug: angleproject:8473 Change-Id: I81ea83986e4e566169aa82250b5cfb727985ed01 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5201413 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Liza Burakova <liza@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>