mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-06 12:15:43 +00:00
Remove `pre` and `out` parameters from most generator methods. Use the `out_` string stream in TextGenerator, add helpers to TextGenerator to simplify line printing. Remove the `pre` and `out` fields from TestHelper. Cleans up the `pre` aspects of the HLSL writer, so the same concept can be used by the MSL writer. Fixes indentation bugs in formatting. Change-Id: Ia35daf632c7c7b84a6fbf3b9ae42baaeb3c97649 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/55960 Auto-Submit: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com> Reviewed-by: David Neto <dneto@google.com> Reviewed-by: James Price <jrprice@google.com>
26 lines
523 B
HLSL
26 lines
523 B
HLSL
void pack2x16snorm_6c169b() {
|
|
int2 tint_tmp = int2(round(clamp(float2(0.0f, 0.0f), -1.0, 1.0) * 32767.0)) & 0xffff;
|
|
uint res = asuint(tint_tmp.x | tint_tmp.y << 16);
|
|
}
|
|
|
|
struct tint_symbol {
|
|
float4 value : SV_Position;
|
|
};
|
|
|
|
tint_symbol vertex_main() {
|
|
pack2x16snorm_6c169b();
|
|
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
|
return tint_symbol_1;
|
|
}
|
|
|
|
void fragment_main() {
|
|
pack2x16snorm_6c169b();
|
|
return;
|
|
}
|
|
|
|
[numthreads(1, 1, 1)]
|
|
void compute_main() {
|
|
pack2x16snorm_6c169b();
|
|
return;
|
|
}
|