wgpu/tests/in/hlsl-keyword.wgsl
Pieter-Jan Briers 544ccf88da
Handle case insensitive FXC HLSL keywords. (#2347)
There are a few keywords like "pass" in HLSL that are actually case-insensitive for FXC. This can be disabled with strict mode, but even if you do that FXC will continue to give an error if you try to use them in identifiers (at all, with any casing).

This changes the namer code to escape these keywords even if the casing is different.

If you're wondering where I got the list from: I looked at the list of strings in D3DCompiler_47.dll.
2023-05-31 15:00:23 +02:00

6 lines
167 B
WebGPU Shading Language

@fragment
fn fs_main() -> @location(0) vec4f {
// Make sure case-insensitive keywords are escaped in HLSL.
var Pass = vec4(1.0,1.0,1.0,1.0);
return Pass;
}