summaryrefslogtreecommitdiff
path: root/source/slang/glsl.meta.slang
diff options
context:
space:
mode:
authordavli-nv <davli@nvidia.com>2025-08-05 10:55:52 -0700
committerGitHub <noreply@github.com>2025-08-05 17:55:52 +0000
commit83675103a1a4fefde11b314aed26f4d37860efe7 (patch)
tree136f597da62532f4b9361ff0d9e785d413fef2f1 /source/slang/glsl.meta.slang
parent2d775b54d2ab7772785c2196075d4c7c174407ab (diff)
Implement SPV_EXT_fragment_invocation_density (SPV_NV_shading_rate) (#8037)
* Implement SPV_EXT_fragment_invocation_density -Adds semantics SV_FragSize and SV_FragInvocationCount and implements them for SPIRV and GLSL using the appropriate target builtins from extensions. -Adds test case checking for expected target builtins from these semantics. -For future work, could implement SV_FragSize using pixel shader input SV_ShadingRate for HLSL, and SV_FragInvocationCount needs research. Fixes #7974 Generated with Claude Code * address review feedback https://github.com/shader-slang/slang/pull/8037#pullrequestreview-3084645845 * fixup format * review feedback https://github.com/shader-slang/slang/pull/8037#pullrequestreview-3086442819
Diffstat (limited to 'source/slang/glsl.meta.slang')
-rw-r--r--source/slang/glsl.meta.slang3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/slang/glsl.meta.slang b/source/slang/glsl.meta.slang
index dfa858eca..782c09bb9 100644
--- a/source/slang/glsl.meta.slang
+++ b/source/slang/glsl.meta.slang
@@ -216,6 +216,9 @@ public in int gl_ViewportIndex : SV_ViewportArrayIndex;
public in int gl_BaseVertex : SV_StartVertexLocation;
public in int gl_BaseInstance : SV_StartInstanceLocation;
+public in int gl_FragInvocationCountEXT : SV_FragInvocationCount;
+public in int2 gl_FragSizeEXT : SV_FragSize;
+
// Override operator* behavior to compute algebric product of matrices and vectors.