mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-12 08:05:53 +00:00
PromoteInitializersToLet was not handling sem::Materialize nodes. This can happen for const arrays when they are dynamically indexed. Fixed: tint:1653 Change-Id: I3d67d8139e481c89b31a3a30c7ef44384b7545ba Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/99500 Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
11 lines
244 B
WebGPU Shading Language
11 lines
244 B
WebGPU Shading Language
const TRI_VERTICES = array(
|
|
vec4(0., 0., 0., 1.),
|
|
vec4(0., 1., 0., 1.),
|
|
vec4(1., 1., 0., 1.),
|
|
);
|
|
|
|
@vertex
|
|
fn vs_main(@builtin(vertex_index) in_vertex_index: u32) -> @builtin(position) vec4<f32> {
|
|
return TRI_VERTICES[in_vertex_index];
|
|
}
|