Skip to content

Commit 51d0c1c

Browse files
authoredMar 25, 2024
HelloWorkGraphs shader tweak (#862)
* error printing fixes * helloWorkGraph shader tweak
1 parent 2ec4257 commit 51d0c1c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎Samples/Desktop/D3D12HelloWorld/src/HelloWorkGraphs/D3D12HelloWorkGraphs.hlsl

+4-4
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void firstNode(
8080
}
8181

8282
// --------------------------------------------------------------------------------------------------------------------------------
83-
// seconcNode is thread launch, so one thread per input record.
83+
// secondNode is thread launch, so one thread per input record.
8484
//
8585
// Logs to the UAV and then sends a task to thirdNode
8686
// --------------------------------------------------------------------------------------------------------------------------------
@@ -121,7 +121,7 @@ void thirdNode(
121121
// flushing the current work.
122122
if (threadIndex >= inputData.Count())
123123
return;
124-
124+
125125
for (uint i = 0; i < c_numEntryRecords; i++)
126126
{
127127
g_sum[i] = 0;
@@ -141,6 +141,6 @@ void thirdNode(
141141
for (uint l = 0; l < c_numEntryRecords; l++)
142142
{
143143
uint recordIndex = c_numEntryRecords + l;
144-
UAV[recordIndex] = g_sum[l];
144+
InterlockedAdd(UAV[recordIndex],g_sum[l]);
145145
}
146-
}
146+
}

0 commit comments

Comments
 (0)
Please sign in to comment.