|
1 |
| -#ifndef _NBL_GLSL_SCAN_DEFAULT_SCHEDULER_INCLUDED_ |
2 |
| -#define _NBL_GLSL_SCAN_DEFAULT_SCHEDULER_INCLUDED_ |
| 1 | +#ifndef _NBL_HLSL_SCAN_DEFAULT_SCHEDULER_INCLUDED_ |
| 2 | +#define _NBL_HLSL_SCAN_DEFAULT_SCHEDULER_INCLUDED_ |
3 | 3 |
|
4 |
| -#include <nbl/builtin/glsl/scan/parameters_struct.hlsl> |
| 4 | +#include <nbl/builtin/hlsl/scan/parameters_struct.hlsl> |
5 | 5 |
|
6 | 6 | #ifdef __cplusplus
|
7 | 7 | #define uint uint32_t
|
@@ -139,7 +139,7 @@ namespace scheduler
|
139 | 139 | if(gl_LocalInvocationIndex == 0u)
|
140 | 140 | {
|
141 | 141 | uint64_t original;
|
142 |
| - InterlockedAdd(scanScratch.workgroupsStarted, 1u, original); // TODO (PentaKon): Refactor this when the ScanScratch descriptor set is declared |
| 142 | + InterlockedAdd(scanScratch.workgroupsStarted, 1u, original); // REVIEW: Refactor InterlockedAdd with GLSL terminology? // TODO (PentaKon): Refactor this when the ScanScratch descriptor set is declared |
143 | 143 | sharedScratch.set(gl_LocalInvocationIndex, original);
|
144 | 144 | }
|
145 | 145 | else if (gl_LocalInvocationIndex == 1u)
|
@@ -189,16 +189,16 @@ namespace scheduler
|
189 | 189 | dependentsFinishedFlagOffset /= _NBL_HLSL_WORKGROUP_SIZE_;
|
190 | 190 | dependentsFinishedFlagOffset += params.finishedFlagOffset[prevLevel];
|
191 | 191 | while (scanScratch.data[dependentsFinishedFlagOffset]!=dependentsCount) // TODO (PentaKon): Refactor this when the ScanScratch descriptor set is declared
|
192 |
| - GroupMemoryBarrierWithGroupSync(); |
| 192 | + GroupMemoryBarrierWithGroupSync(); // TODO (PentaKon): Possibly refactor? |
193 | 193 | }
|
194 | 194 | }
|
195 |
| - GroupMemoryBarrierWithGroupSync(); |
| 195 | + GroupMemoryBarrierWithGroupSync(); // TODO (PentaKon): Possibly refactor? |
196 | 196 | return false;
|
197 | 197 | }
|
198 | 198 |
|
199 | 199 | void markComplete(in DefaultSchedulerParameters_t params, in uint topLevel, in uint treeLevel, in uint localWorkgroupIndex)
|
200 | 200 | {
|
201 |
| - GroupMemoryBarrierWithGroupSync(); // must complete writing the data before flags itself as complete |
| 201 | + GroupMemoryBarrierWithGroupSync(); // must complete writing the data before flags itself as complete // TODO (PentaKon): Possibly refactor? |
202 | 202 | if (gl_LocalInvocationIndex==0u)
|
203 | 203 | {
|
204 | 204 | uint finishedFlagOffset = params.finishedFlagOffset[treeLevel];
|
|
0 commit comments