dawn-cmake/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.msl
dan sinclair 92af2b5693 Add const-eval for trunc
This CL adds const-eval for `trunc`.

Bug: tint:1581
Change-Id: If58f79ea70fe490746e30ed118d847c61edd8023
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110173
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2022-11-16 20:07:31 +00:00

34 lines
530 B
Plaintext

#include <metal_stdlib>
using namespace metal;
void trunc_cc2b0d() {
half res = 1.0h;
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
trunc_cc2b0d();
return float4(0.0f);
}
vertex tint_symbol vertex_main() {
float4 const inner_result = vertex_main_inner();
tint_symbol wrapper_result = {};
wrapper_result.value = inner_result;
return wrapper_result;
}
fragment void fragment_main() {
trunc_cc2b0d();
return;
}
kernel void compute_main() {
trunc_cc2b0d();
return;
}