diff options
| author | Julius Ikkala <julius.ikkala@gmail.com> | 2025-04-14 17:59:13 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-14 14:59:13 +0000 |
| commit | 0f0818722268464775981520c2d6e975a9cf14fa (patch) | |
| tree | 2519a57506f026d2c116112fe81a5c9c6d5282ef /tests | |
| parent | b9af45ff3f2288e2aa325c1d910544e368eb9538 (diff) | |
Add SV_PointCoord to match gl_PointCoord (#6795)
* Add gl_PointCoord support in GLSL compat mode
* Add SV_PointCoord
* Test on metal as well
* Update SPIRV system value semantics table in docs
* Update metal docs for SV_PointCoord
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/glsl-intrinsic/point-coord.slang | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/glsl-intrinsic/point-coord.slang b/tests/glsl-intrinsic/point-coord.slang new file mode 100644 index 000000000..2681b93b7 --- /dev/null +++ b/tests/glsl-intrinsic/point-coord.slang @@ -0,0 +1,17 @@ +//TEST:SIMPLE(filecheck=CHECK_SPIRV): -entry main -stage fragment -target spirv +//TEST:SIMPLE(filecheck=CHECK_GLSL): -entry main -stage fragment -target glsl +//TEST:SIMPLE(filecheck=CHECK_METAL): -entry main -stage fragment -target metal + +#version 460 + +out vec4 fragColor; + +void main() +{ + fragColor = vec4(gl_PointCoord.xy, 0, 0); + + // CHECK_SPIRV: BuiltIn PointCoord + // CHECK_GLSL: gl_PointCoord + // CHECK_METAL: point_coord +} + |
