Skip to content

Commit 800802b

Browse files
authored
Update common.hlsl
1 parent 9923294 commit 800802b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

13_BitonicSort/app_resources/common.hlsl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ struct PushConstantData
77
uint64_t deviceBufferAddress;
88
};
99

10-
NBL_CONSTEXPR uint32_t WorkgroupSizeLog2 = 7; // 128 threads
11-
NBL_CONSTEXPR uint32_t ElementsPerThreadLog2 = 1; // 2 elements per thread
12-
NBL_CONSTEXPR uint32_t elementCount = uint32_t(1) << (WorkgroupSizeLog2 + ElementsPerThreadLog2);
10+
NBL_CONSTEXPR uint32_t WorkgroupSizeLog2 = 10; // 1024 threads (2^10)
11+
NBL_CONSTEXPR uint32_t ElementsPerThreadLog2 = 2; // 4 elements per thread (2^2) - VIRTUAL THREADING!
12+
NBL_CONSTEXPR uint32_t elementCount = uint32_t(1) << (WorkgroupSizeLog2 + ElementsPerThreadLog2); // 4096 elements (2^12)
1313
#endif

0 commit comments

Comments
 (0)