|
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>
|
|
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>
|
|
bc40362b
|
2025-02-18T13:24:31
|
|
Add line loop emulation for draw arrays
Bug: angleproject:383356846
Change-Id: I43f4835e17ecb2401418f77555fd70332612e1bf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6090912
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Liza Burakova <liza@chromium.org>
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
|
|
e746fb06
|
2025-01-23T13:23:30
|
|
WebGPU: Implement blending
Constant alpha is not handled yet. It needs to be emualted or added
to WebGPU.
Bug: angleproject:370690274
Change-Id: I5f8402f74ab08345b2f02c18e2d43fa39b2479a7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6194554
Reviewed-by: Liza Burakova <liza@chromium.org>
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
9f8d7cc2
|
2025-01-23T13:27:19
|
|
WebGPU: Stream incompatible vertex and index data.
Support reading back index and vertex buffers to stream incompatible
source data. For now this includes:
* Non-multiple-of-4 stride vertex data
* Stride not a multiple of the type size
* Unsigned byte indices
Fix fallback formats so that all GLES formats have a fallback.
Fix CopyToFloatVertexData writing the alpha channel as Float32One
with a static_cast which converted Float32One (an integer) to a
float instead of bit-casting.
Bug: angleproject:368602384
Change-Id: I7eb1ba7ad1ec4292060c18de22f5948136cbb0a3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6194556
Reviewed-by: Liza Burakova <liza@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
40523499
|
2025-01-29T12:13:45
|
|
WebGPU: Emulate line loops for drawElements
Bug: angleproject:383356846
Change-Id: I82a6dfad4a1c5d434f029701611e4b61344655f8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6086120
Commit-Queue: Liza Burakova <liza@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
885a8060
|
2025-01-24T12:27:10
|
|
WebGPU: Implement depth/stencil test.
Force the compare function to Always when depth or stencil tests are
disabled.
Bug: angleproject:392604945
Change-Id: I67265b2e5eabe8e9fc3d1222140ee1b6a7c5cefa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6198040
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Liza Burakova <liza@chromium.org>
|
|
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>
|
|
37dd8e92
|
2024-09-20T17:49:11
|
|
WebGPU: Stream client arrays
Add support for vertex attributes and index data without buffer
backings. Stream the data to buffers at draw time.
Bug: angleproject:368602384
Change-Id: I697b7882cdebf0dfab08fcffabd2d36048920547
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5878137
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
0b610712
|
2024-09-20T12:00:17
|
|
WebGPU: Sync index buffers, add indexed draw calls
Bug: angleproject:368600230
Change-Id: Ibf1c4921635b525b7650e70ce7dc939e2bad2ebb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5828229
Reviewed-by: Liza Burakova <liza@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
bb14aa4d
|
2024-09-19T11:17:05
|
|
WebGPU: set vertex buffers.
This change actually sets the vertex attributes that are added to the
render pipeline description owned by the context, as well as sets
the vertex buffer in the pipeline.
Bug: angleproject:359823692
Change-Id: I5e94b357a4e6eadc1bbba54965cef94f90113b4e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5789155
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Liza Burakova <liza@chromium.org>
|
|
84492ff3
|
2024-09-10T13:11:07
|
|
Sync vertex attributs in VertexArrayWgpu.
This change only sets vertex attributes within VertexArrayWgpu and
sets them in the render pipeline description owned by the context.
It does not yet set attributes in the output pipeline created in
CreatePipeline, as vertex buffers are also not set yet.
Bug: angleproject:359823692
Change-Id: I1c3848e15d790026d53d4ab5614b1125f773e06a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5781788
Commit-Queue: Liza Burakova <liza@chromium.org>
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
e10e31ed
|
2024-08-26T12:56:42
|
|
WebGPU: Add error handling macros for debugging.
Add a ANGLE_WGPU_SCOPED_DEBUG_TRY to create an error scope, execute
some commands and pop the scope in builds with assertions enabled.
A follow-up with full error handling at frame boundaries is still
needed.
Bug: angleproject:362191737
Change-Id: I4af9e1587f6d70bf14a3f6435b487e26424624ef
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5813006
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
b36d94dc
|
2024-08-02T16:23:03
|
|
WebGPU: Implement viewport and scissor
Tested using samples. dEQP tests covering viewport and scissor require
more shader translation to be completed.
Bug: angleproject:0
Change-Id: Ia76f2edeea5a07af1881704a21fafb64ab7df43a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5756127
Reviewed-by: Liza Burakova <liza@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
057bc0f0
|
2024-08-07T11:38:54
|
|
WebGPU: Set multiple parameters in RenderPipelineDesc.
This change adds multiple setters to RenderPipelineDesc to set
various parameters within the DepthStencilState.
Bug: angleproject:42267012
Change-Id: I71eed7195477572295de6575bfa18d2c58ca93de
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5765553
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Commit-Queue: Liza Burakova <liza@chromium.org>
|
|
31c0f439
|
2024-08-02T09:18:33
|
|
WebGPU: Centralize caps generation
All GL and EGL caps can be generated at display creation time for
WebGPU. Move all existing logic into a centralized GenerateCaps
function.
Bug: angleproject:357017322
Change-Id: I7398d4ee539192d64971023d9a598ac1f11592ad
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5759279
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Liza Burakova <liza@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
9da7fb15
|
2024-07-30T21:21:45
|
|
WebGPU: Don't log all renderpass closure reasons
This logging line spams the console excessively. For now, just make
sure there is a message associated with each renderpass closure reason.
Bug: angleproject:356399840
Change-Id: I2313d439837ffb11f11cd56194511e80fb312eba
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5748444
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
84e54d88
|
2024-07-22T14:39:22
|
|
WebGPU: Add command buffers and renderpass management
Add a CommandBuffer class to serialize and replay WebGPU commands. Only
Draw and SetPipeline are implemented in this patch.
Manage render pass begin and end events due to framebuffer changes and
swapping.
Handle the color mask dirty bits so that a non-zero color mask will be
used.
All togther, this is enough to draw a triangle using a hard-coded
shader without inputs.
Bug: angleproject:0
Change-Id: I0fbf0296563c02c7f0774ad4197b83f4c93c22bb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5731594
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Liza Burakova <liza@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
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>
|
|
1d0ef518
|
2024-05-07T16:56:43
|
|
Fixing glClear tests.
This CL makes a few changes to fix up the basic glClear test
RGBA8Framebuffer, as well as adding a test that uploads a
texture before clearing a RGBA8 framebuffer.
It moves the wgpu::RenderPassDescriptor(RPD), as well as helper
methods for comparing RPDs from the context to the framebuffer.
The color attachments that are created in when FramebufferWgpu::clear
is called are also stored in the framebuffer now as well.
This CL also changes texture creation to use the RGBA8Unorm format
instead of RGBA8Uint format. It also adds the wgpu viewFormats
parameter to an ImageHelper. Future formats support is still TBD.
Bug: angleproject:8582
Change-Id: Idfc4182eb4d6de8a771f2f91d337564ee71df010
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5503549
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Commit-Queue: Liza Burakova <liza@chromium.org>
|
|
ead98ed9
|
2024-05-02T14:04:14
|
|
Implement basic texture upload.
This change modifies ImageHelper's methods to upload textures to
fix webgpu API calls, as well as fully implements uploading texture
data via TextureWgpu::setImage for RGBA8 formats.
Bug: angleproject:8457
Change-Id: I1c5be3d79ad996a709086ca7157cca6229a336ce
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5398002
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Commit-Queue: Liza Burakova <liza@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
041b0a4d
|
2024-04-15T13:42:17
|
|
Begin initializing caps for webgpu
Bug: angleproject:8457
Change-Id: Idde0673297ec675a13bd3e4fd4d220ec47392153
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5391987
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Liza Burakova <liza@chromium.org>
|
|
5c6a531e
|
2024-04-03T02:53:13
|
|
Add ContextWgpu methods for managing current render pass
For simplicity ensureRenderPassStarted() just ends the current
render pass and starts a new one.
Bug: angleproject:8582
Change-Id: I929526cf2574fa33309310e7f60191c10ab3bf7a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5388075
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Liza Burakova <liza@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
6c379733
|
2024-03-21T14:25:52
|
|
Add more helper methods for textures.
This change adds a DisplayWgpu member variable to ContextWgpu
as well as a getter for the display so other objects can access
a webgpu device. This change also adds helper methods to translate
GL texture information (size, dimension, mip level count, etc.)
to webgpu compatible texture information.
Bug: angleproject:8547
Change-Id: Ifb2c5d021b1cbb95304a732c57d3250f1731496b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5385574
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Commit-Queue: Liza Burakova <liza@chromium.org>
|
|
4e6fe5e0
|
2024-02-29T15:01:06
|
|
Vulkan: Cache ImageLoadContext in context
This avoids the need to requery this from the display every time.
Bug: angleproject:8564
Change-Id: Ied650e7789741f59b7662c0f97c55132b105778d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5332074
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
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>
|