Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buffer Device Address in HLSL #690

Merged
Merged
Changes from 1 commit
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
95ca151
Change submodule dep
nipunG314 Mar 25, 2024
f803f11
Add integral bda type that supports atomics
nipunG314 Apr 30, 2024
c2b0409
Add workaround for DXC issue #6576
nipunG314 May 1, 2024
bc1f092
Refactor the counting sort logic into general utility
nipunG314 May 2, 2024
42edf28
Separate the bda types into their own headers
nipunG314 May 3, 2024
397f018
Clean up barriers
nipunG314 May 3, 2024
2c57524
Load consecutive values in consecutive invocations
nipunG314 May 3, 2024
a169f62
Wrap bda::__ptr in bda::PtrAccessor
nipunG314 May 6, 2024
c7a71b6
Move Accessor definition to userspace
nipunG314 May 6, 2024
f00c21c
__ptr always returns __ref<T,alignment,false>
nipunG314 May 7, 2024
6d47af6
Remove obsolete TODO
nipunG314 May 7, 2024
04f2eb4
Don't hardcode SPIRV opcodes
nipunG314 May 7, 2024
9b77858
Don't hardcode SPIRV capabilities and storage class
nipunG314 May 7, 2024
7fb1818
Refactor addrof into free floating pointer_to
nipunG314 May 7, 2024
8ec4e12
Use NBL_REF_ARG for Accessors
nipunG314 May 7, 2024
724f997
Add atomic overloads for DXC workaround
nipunG314 May 8, 2024
5d5a473
Add bitcast overload for DXC workaround
nipunG314 May 8, 2024
ac73aff
Fix missing typename syntax
nipunG314 May 8, 2024
2c5852c
Add conditional_capability_v and is_physical_storage_ptr type traits
nipunG314 May 8, 2024
9bc9936
Revert "Add conditional_capability_v and is_physical_storage_ptr type…
nipunG314 May 9, 2024
0fe8368
Make atomicAdd a free floating operation
nipunG314 May 9, 2024
fbd3911
Check for 64bit integers in atomicAdd
nipunG314 May 9, 2024
79958df
Add the enable_if checking to all atomics
nipunG314 May 9, 2024
923c1c5
Move OpLoad and OpStore instructions to spirv_intrinsics
nipunG314 May 9, 2024
ad506c7
Remove unused bitcast
nipunG314 May 20, 2024
6f7214a
Add enable_if<is_spirv_type_v<>> checks to all atomics
nipunG314 May 20, 2024
fb2d887
Remove accessChain for now
nipunG314 May 20, 2024
147ab16
spriv => spirv
nipunG314 May 20, 2024
790926e
Fix typo
nipunG314 May 20, 2024
3fdbfb2
Correctly namespace bda
nipunG314 May 20, 2024
b366ef0
Add operator + and - to __ptr
nipunG314 May 20, 2024
acf9556
Add alignment_of_v
nipunG314 May 20, 2024
dd9734a
Fix alignment_of_v
nipunG314 May 20, 2024
1c9aaee
Use alignment_of_v in __ref
nipunG314 May 20, 2024
d471a8c
Use enable_if for int64atomic checks
nipunG314 May 20, 2024
52a1d84
Fix missing variable in pointer_to()
nipunG314 May 20, 2024
f1988bc
Remove unnecessary nbl::hlsl:: tags
nipunG314 May 22, 2024
11ebb07
Add enable_if_t
nipunG314 May 22, 2024
9c5d833
Add integral checks on atomic intrinsics
nipunG314 May 22, 2024
48b6c8c
Merge nbl::hlsl::experimental into nbl::hlsl::spirv
nipunG314 May 24, 2024
37dbcb4
Refactor CountingPushData into CountingParameters
nipunG314 May 24, 2024
1531a07
Replace get_ptr with atommicAdd in the accessor
nipunG314 May 25, 2024
551d928
Remove unnecessary barrier
nipunG314 May 25, 2024
5f2bedb
Add variable names for better readability
nipunG314 May 25, 2024
bbaac65
Compute buckets_per_thread using integer division
nipunG314 May 25, 2024
b0c3bcf
Move the globals into userspace code
nipunG314 May 25, 2024
993737b
Use sdata's barrier
nipunG314 May 25, 2024
1c22895
Rename index to baseIndex
nipunG314 May 25, 2024
09723eb
Refactor histogram to use inclusive scans and reuse sdata
nipunG314 May 26, 2024
480d13c
Minimize the number of atomic calls to global scratch buffer
nipunG314 May 26, 2024
1f80270
Separate histogram building into one method
nipunG314 May 26, 2024
6b0df6f
Add robust parameter
nipunG314 May 26, 2024
128478d
Move PtrAccessor into a templated BdaAccessor
nipunG314 May 26, 2024
2ef2980
Replace scratch with histogram
nipunG314 May 27, 2024
839ec27
Pass bda::__ptr<T> into BdaAccessor
nipunG314 May 27, 2024
d445e92
Add atomicSub instruction
nipunG314 May 27, 2024
492456c
Call sdata.get(index) only once
nipunG314 May 28, 2024
5447231
Fetch value only after robustness has been checked
nipunG314 May 28, 2024
9c0a80d
Move bitcast after its overloads
nipunG314 May 28, 2024
a52f3a1
Make the buckets_per_thread calculation simpler
nipunG314 May 28, 2024
4418274
Rename data to params
nipunG314 May 28, 2024
79ec69f
Pass workGroupIndex as a parameter
nipunG314 May 28, 2024
71953a1
Hoist the is_last_wg_invocation check
nipunG314 May 28, 2024
08d005e
Only check uint32_t for Unsigned and Signed for int32_t
nipunG314 May 28, 2024
11cccc5
Add enable_if_t checks to bitFieldExtract functions
nipunG314 May 28, 2024
78d7462
Simplify the loops in build_histogram
nipunG314 May 28, 2024
db707af
Simplify the loops in scatter
nipunG314 May 28, 2024
092ef9f
Clamp endIndex to params.dataElementCount
nipunG314 May 28, 2024
f53f6c4
Update index correctly
nipunG314 May 28, 2024
e1e028b
Simplify the loop in histogram
nipunG314 May 28, 2024
f46073d
Add toroidal_histogram_add
nipunG314 May 28, 2024
f4d7249
Make changes to counting.hlsl
nipunG314 May 31, 2024
ad26699
Fix the histogram loop
nipunG314 May 31, 2024
4648b14
Rework the toroidal access on the scatter shader and add comments
nipunG314 May 31, 2024
309ab59
Guard histogram.atomicAdd
nipunG314 Jun 1, 2024
248a2a8
Update submodule
nipunG314 Jun 1, 2024
5a4ad9e
Compute inclusive_scan outside of conditional
nipunG314 Jun 1, 2024
9179d1e
Update examples_tests
nipunG314 Jun 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions include/nbl/builtin/hlsl/spirv_intrinsics/core.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ template<class T, class U>
[[vk::ext_instruction(spv::OpBitcast)]]
T bitcast(U);

template<class T> // DXC Workaround issue TODO https://github.com/microsoft/DirectXShaderCompiler/issues/6576
[[vk::ext_capability(spv::CapabilityPhysicalStorageBufferAddresses)]]
[[vk::ext_instruction(spv::OpBitcast)]]
T bitcast(uint64_t);
devshgraphicsprogramming marked this conversation as resolved.
Show resolved Hide resolved

template<typename Unsigned>
[[vk::ext_instruction( spv::OpBitFieldUExtract )]]
Unsigned bitFieldUExtract( Unsigned val, uint32_t offsetBits, uint32_t numBits );
Expand Down