dawn-cmake/test/intrinsics/gen/frexp/4bdfc7.wgsl.expected.hlsl
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

42 lines
770 B
HLSL

struct frexp_result_vec2 {
float2 sig;
int2 exp;
};
frexp_result_vec2 tint_frexp(float2 param_0) {
float2 exp;
float2 sig = frexp(param_0, exp);
frexp_result_vec2 result = {sig, int2(exp)};
return result;
}
void frexp_4bdfc7() {
frexp_result_vec2 res = tint_frexp(float2(0.0f, 0.0f));
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
frexp_4bdfc7();
return float4(0.0f, 0.0f, 0.0f, 0.0f);
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
frexp_4bdfc7();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
frexp_4bdfc7();
return;
}