From 2cc96907e4152291e0b6bca78a0bfbc69ddb8839 Mon Sep 17 00:00:00 2001 From: ArielG-NV <159081215+ArielG-NV@users.noreply.github.com> Date: Fri, 14 Jun 2024 01:29:35 -0400 Subject: Implement for metal `SV_GroupIndex` (#4385) * Implement for metal `SV_GroupIndex` 1. If we don't have `sv_GroupThreadId` available we create one using `SV_GroupIndex`s location data. 2. We emit code emulating `sv_GroupThreadId` from the same logic that CUDA/CPP uses. * address most review comments Addressed all but two: [1](https://github.com/shader-slang/slang/pull/4385#discussion_r1639058473) and [2](https://github.com/shader-slang/slang/pull/4385#issuecomment-2166934855) I want to enable tests and be sure there is no bugs using CI before I redesign the code so I have a working fallback. * address comment, enable tests enable now functioning tests due to `SV_GroupIndex` working with metal * syntax error with groupThreadID search did `= param` instead of `= i.param` * add `sv_groupid` for test + test fixes * disable test that won't work regardless --- tests/pipeline/compute/compute-system-values.slang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/pipeline/compute') diff --git a/tests/pipeline/compute/compute-system-values.slang b/tests/pipeline/compute/compute-system-values.slang index f7aef06ff..912827557 100644 --- a/tests/pipeline/compute/compute-system-values.slang +++ b/tests/pipeline/compute/compute-system-values.slang @@ -2,7 +2,7 @@ //TEST(compute):COMPARE_COMPUTE: -shaderobj //TEST(compute):COMPARE_COMPUTE: -cpu -shaderobj -//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl +//TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl //TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0], stride=4):out,name=outputBuffer RWStructuredBuffer outputBuffer; -- cgit v1.2.3