summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-parameter-binding.cpp
diff options
context:
space:
mode:
authordavli-nv <davli@nvidia.com>2025-08-20 17:30:44 -0700
committerGitHub <noreply@github.com>2025-08-21 00:30:44 +0000
commit05f0f5603561daed2c134e13bc64649362759968 (patch)
treeff1ea0eb835dd636a459603ea0285290d504b9b7 /source/slang/slang-parameter-binding.cpp
parentcbd73dde3dd2da790bb663385a229ce22965c43c (diff)
Implement SV_VulkanSamplePosition (#8236)
-Adds semantic SV_VulkanSamplePosition that emits corresponding gl_SamplePosition and SpvBuiltinSamplePosition -Adds gl_SamplePosition property to glsl.meta.slang -Adds SPIRV and GLSL tests for the semantic and property -Plan is to later implement SV_SamplePosition that follows HLSL range of -0.5 to +0.5, and emits GetRenderTargetSamplePosition(SV_SampleIndex) which needs more complicated IR manipulation for HLSL and Metal Fixes #7906 --------- Co-authored-by: ArielG-NV <159081215+ArielG-NV@users.noreply.github.com>
Diffstat (limited to 'source/slang/slang-parameter-binding.cpp')
-rw-r--r--source/slang/slang-parameter-binding.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/slang/slang-parameter-binding.cpp b/source/slang/slang-parameter-binding.cpp
index 89e633857..4b91056fc 100644
--- a/source/slang/slang-parameter-binding.cpp
+++ b/source/slang/slang-parameter-binding.cpp
@@ -1821,11 +1821,12 @@ static RefPtr<TypeLayout> processSimpleEntryPointParameter(
// We need to compute whether an entry point consumes
// any sample-rate inputs, and along with explicitly
// `sample`-qualified parameters, we also need to
- // detect use of `SV_SampleIndex` as an input.
+ // detect use of `SV_SampleIndex` and
+ // `SV_VulkanSamplePosition` as an input.
//
if (state.directionMask & kEntryPointParameterDirection_Input)
{
- if (sn == "sv_sampleindex")
+ if (sn == "sv_sampleindex" || sn == "sv_vulkansampleposition")
{
state.isSampleRate = true;
}