diff options
| author | cheneym2 <acheney@nvidia.com> | 2024-10-09 14:42:13 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-09 14:42:13 -0400 |
| commit | 1bbc421a663bd494cc1a4dd097852553049cc1d5 (patch) | |
| tree | 1cfc71191af7d75b440c45334dfb904e78bd75dc /tests | |
| parent | 8b2bd3c8ac1d365b872d02db6b03d082f132646b (diff) | |
Fix precompiled glsl modules (#5230)
When precompiling modules defined
with glsl, it's necessary to link in the
glsl definition module.
Reuse the public fillRequirements declaration
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/library/precompiled-glsl.slang | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/library/precompiled-glsl.slang b/tests/library/precompiled-glsl.slang new file mode 100644 index 000000000..f8a8ae58e --- /dev/null +++ b/tests/library/precompiled-glsl.slang @@ -0,0 +1,30 @@ +// precompiled-glsl.slang + +// A test that precompiles a slang-module using GLSL functions. + +//TEST:COMPILE: tests/library/precompiled-glsl.slang -target spirv -stage fragment -entry main +//TEST:COMPILE: tests/library/precompiled-glsl.slang -target spirv -stage fragment -entry main -embed-downstream-ir + +#version 310 es +precision highp float; +precision highp int; + +public vec3 func(vec3 v) +{ + return v; +} + +layout(location = 0) out mediump vec4 dEQP_FragColor; + +layout(location = 0) flat in uint out0; +layout(binding = 0, std140) uniform Reference +{ + uint out0; +} ref; + +void main() +{ + dEQP_FragColor = mix(vec4(0.0, 1.0, 0.0, 1.0), + vec4(0.0, 1.0, 0.0, 1.0), + vec4(0.0, 1.0, 0.0, 1.0)); +} |
