dawn-cmake/test/intrinsics/gen/modf/ec2dbc.wgsl.expected.msl
James Price 1bf5af25ad reader/wgsl: Allow identifiers to start with an underscore
Try to lex identifiers before punctuation, and backtrack if we only
see a single underscore or something that starts with two underscores.

Rename the modf and frexp return types to start with two underscores.

Spec PR:
https://github.com/gpuweb/gpuweb/pull/2326

Change-Id: Id283af100babfe84faa183345cb8a60848140caa
Fixed: tint:1292
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70160
Reviewed-by: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
2021-11-19 21:52:13 +00:00

45 lines
739 B
Plaintext

#include <metal_stdlib>
using namespace metal;
struct modf_result_vec4 {
float4 fract;
float4 whole;
};
modf_result_vec4 tint_modf(float4 param_0) {
float4 whole;
float4 fract = modf(param_0, whole);
return {fract, whole};
}
struct tint_symbol {
float4 value [[position]];
};
void modf_ec2dbc() {
modf_result_vec4 res = tint_modf(float4());
}
float4 vertex_main_inner() {
modf_ec2dbc();
return float4();
}
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() {
modf_ec2dbc();
return;
}
kernel void compute_main() {
modf_ec2dbc();
return;
}