Skip to content

Commit 18a3427

Browse files
committed
Add get_ptr() to accessors
1 parent ee37b44 commit 18a3427

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CountingSort/app_resources/prefix_sum_shader.comp.hlsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ struct PtrAccessor
2525
deref().store(value);
2626
}
2727

28-
uint32_t atomicAdd(uint64_t index, uint32_t value)
28+
bda::__spv_ptr_t<uint32_t> get_ptr(uint64_t index)
2929
{
3030
return bda::__ptr < uint32_t > (addr + sizeof(uint32_t) * index).template
31-
deref().atomicAdd(value);
31+
deref().get_ptr();
3232
}
3333

3434
uint64_t addr;

CountingSort/app_resources/scatter_shader.comp.hlsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ struct PtrAccessor
2525
deref().store(value);
2626
}
2727

28-
uint32_t atomicAdd(uint64_t index, uint32_t value)
28+
bda::__spv_ptr_t<uint32_t> get_ptr(uint64_t index)
2929
{
3030
return bda::__ptr < uint32_t > (addr + sizeof(uint32_t) * index).template
31-
deref().atomicAdd(value);
31+
deref().get_ptr();
3232
}
3333

3434
uint64_t addr;

0 commit comments

Comments
 (0)