Commit 89ef2812d4bea52048751abc0299bdd90cc1185d

Matthew Denton 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>