mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-07 21:55:53 +00:00
WGSL supports select() with vectors, where the condition is a scalar. To support this in SPIR-V versions older than 1.4, we need to splat the condition operand to a vector of the same size as the objects. Fixed: tint:933 Change-Id: I571af46e74cd7bb24093524ccfed25a3ed612676 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/56340 Auto-Submit: James Price <jrprice@google.com> Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
25 lines
409 B
HLSL
25 lines
409 B
HLSL
void select_8fa62c() {
|
|
int3 res = (false ? int3(0, 0, 0) : int3(0, 0, 0));
|
|
}
|
|
|
|
struct tint_symbol {
|
|
float4 value : SV_Position;
|
|
};
|
|
|
|
tint_symbol vertex_main() {
|
|
select_8fa62c();
|
|
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
|
return tint_symbol_1;
|
|
}
|
|
|
|
void fragment_main() {
|
|
select_8fa62c();
|
|
return;
|
|
}
|
|
|
|
[numthreads(1, 1, 1)]
|
|
void compute_main() {
|
|
select_8fa62c();
|
|
return;
|
|
}
|