dawn-cmake/test/tint/expressions/index/let/literal/vector.wgsl.expected.hlsl
Ben Clayton c1cb9dc1a5 tint/resolver: Evaluate constant index accessors
If the object and index are both constant expressions, resolve the
index as a constant.

Note: Expectations have been updated for indexing on 'let's. Once
'const' is introduced, 'let' will no longer be treated as a constant
expression, and these expectations will be reverted.

Bug: tint:1580
Change-Id: I42793d36c1a5f82890ccaa5dbbb71b4346493bef
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94329
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
2022-06-23 15:46:54 +00:00

10 lines
137 B
HLSL

[numthreads(1, 1, 1)]
void unused_entry_point() {
return;
}
float f() {
const float3 v = float3(1.0f, 2.0f, 3.0f);
return 2.0f;
}