|
35f01e7f
|
2024-06-26T14:30:27
|
|
ESSL -> WGSL: Support basic control flow
If/else, while, do/while, for.
Return, break, continue, discard
Bug: angleproject:42267100
Change-Id: I0c8ef30b45aec639a07323e333db970d4c42dec0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5661103
Reviewed-by: Liza Burakova <liza@chromium.org>
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
89ef2812
|
2024-06-26T11:19:54
|
|
ESSL -> WGSL: unary and binary exprs, operators, array access
Array indexing is always checked to be within bounds. For runtime-sized
arrays, this requires emitting a clamp(). For now this includes a bug
the left-side-expression (the array itself) has any side effects, which
shouldn't actually be possible but may be in future versions of WGSL.
Implementing unary, binary, and remaining aggregate expressions requires
implementing operators, many of which do not have exact corresponding
versions between GLSL and WGSL. This implements many operators but for
simplicity leaves some unimplemented and some half-implemented.
See WGSLOutput_test.cpp for some code examples.
Bug: angleproject:42267100
Change-Id: I3737abb5dffd156deba0429fa86570270d711d3c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5651994
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
7ca9f46a
|
2024-06-21T13:09:24
|
|
ESSL -> WGSL: Emit func calls, struct access, constants
Also includes constructor calls, swizzles, and a slightly incorrect
version of the ternary operator.
The ternary operator doesn't exist in WGSL, only a non-short-circuiting
select() builtin. For now the ternary is implemented with select()
but that isn't correct if any of the true/false expressions have side
effects, and may have perf implications by computing both true/false
expressions.
Constants are mostly done after this, however NaN and infinity are not
valid constants in WGSL and it's unclear what we can do about this as
WGPU implementations are allowed to assume NaNs and infinities are
never operated on.
Bug: angleproject:42267100
Change-Id: Ie6190091a7b95d3d372736ab7cea45868846e7be
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5648990
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
a04239d8
|
2024-06-18T11:38:52
|
|
ESSL -> WGSL: Emit most types and function params
This emits struct declarations, as well as array/matrix/vec types.
As a result this also emits function parameters.
Bug: angleproject:42267100
Change-Id: Ib9c7e543fd38f7c1dfa64d8e63b054fc5111b336
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5598298
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
|
|
af72bf7f
|
2024-05-24T15:00:44
|
|
ESSL -> WGSL: emit basic types
This emits dimensionless types (no vectors, matrices, arrays).
Function signatures will emit their return type (assuming it
is dimensionless).
Bug: angleproject:42267100
Change-Id: I0d2479f71408eb20b9c329a99c70a6bf6426a72f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5590384
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
d68395fe
|
2024-05-24T15:14:46
|
|
ESSL->WGSL: Emit basic function signatures
...signatures don't yet include types or parameters.
See WGSLOutput_test.cpp for a sample translation.
Bug: angleproject:8662
Change-Id: I93273156f72ba193441e737074bd1a8a054f2ea9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5582949
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Liza Burakova <liza@chromium.org>
|