diff options
| author | Darren Wihandi <65404740+fairywreath@users.noreply.github.com> | 2025-03-21 10:31:07 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-21 22:31:07 +0800 |
| commit | 16ac0efa3e1e834e3b12af8ac34cf47a6418bb34 (patch) | |
| tree | 1761fd5fa7186a3e9881be79b5ef9df6527f3a45 /tests | |
| parent | 32a5bd2f43d55453bb5ea15c888c7a90730bbcff (diff) | |
Apply pixel interlock execution mode to entry-point functions only (#6661)
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/pipeline/rasterization/fragment-shader-interlock-child-function.slang | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/pipeline/rasterization/fragment-shader-interlock-child-function.slang b/tests/pipeline/rasterization/fragment-shader-interlock-child-function.slang new file mode 100644 index 000000000..65dc39bdc --- /dev/null +++ b/tests/pipeline/rasterization/fragment-shader-interlock-child-function.slang @@ -0,0 +1,31 @@ +//TEST:SIMPLE(filecheck=CHECK):-target spirv -entry main -stage fragment + +RasterizerOrderedTexture2D<float4> texture; + +// +// Tests that an interlock region place at a non-entry point function will properly apply the SPIRV execution mode +// to the entry point function and not the child function. +// + +// CHECK: OpEntryPoint +// CHECK: OpExecutionMode %main PixelInterlockOrderedEXT + +float4 foo(float4 coords) +{ + float4 result; + + beginInvocationInterlock(); + { + result = texture[uint2(coords.xy)]; + texture[uint2(coords.xy)] = result + coords; + } + endInvocationInterlock(); + + return result; +} + +[shader("fragment")] +float4 main(float4 coords : COORDS) : SV_Target +{ + return foo(coords); +} |
