|
fecb8ead
|
2025-09-04T12:27:48
|
|
WGSL: implement inc/dec with generated functions
Implements inc/dec with generated WGSL functions that take pointers
and perform a post/pre inc/decrement. This works with scalars, vectors,
and matrices, both float and int.
WGSL supports inc/dec only on integer types, and only as statements
(not as expressions). https://www.w3.org/TR/WGSL/#increment-decrement.
The regular ++ and -- are used in this specific case.
The WGSL outputter records usage of increment/decrement and produces
a call to the correct function. A new class is introduced to keep the
record of which types need generated inc/dec WGSL functions.
Bug: angleproject:42267100
Change-Id: I0e70760ba5bd00f978e216f958216ae3137a146e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6935269
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|