diff --git a/include/nbl/builtin/hlsl/bitonic_sort/common.hlsl b/include/nbl/builtin/hlsl/bitonic_sort/common.hlsl new file mode 100644 index 0000000000..0b5bfb69ac --- /dev/null +++ b/include/nbl/builtin/hlsl/bitonic_sort/common.hlsl @@ -0,0 +1,53 @@ +#ifndef _NBL_BUILTIN_HLSL_BITONIC_SORT_COMMON_INCLUDED_ +#define _NBL_BUILTIN_HLSL_BITONIC_SORT_COMMON_INCLUDED_ + +#include +#include +#include +#include + +namespace nbl +{ +namespace hlsl +{ +namespace bitonic_sort +{ + +template +void compareExchangeWithPartner( + bool takeLarger, + NBL_REF_ARG(pair) loPair, + NBL_CONST_REF_ARG(pair) partnerLoPair, + NBL_REF_ARG(pair) hiPair, + NBL_CONST_REF_ARG(pair) partnerHiPair, + NBL_CONST_REF_ARG(Comparator) comp) +{ + const bool loSelfSmaller = comp(loPair.first, partnerLoPair.first); + const bool takePartnerLo = takeLarger ? loSelfSmaller : !loSelfSmaller; + if (takePartnerLo) + loPair = partnerLoPair; + + const bool hiSelfSmaller = comp(hiPair.first, partnerHiPair.first); + const bool takePartnerHi = takeLarger ? hiSelfSmaller : !hiSelfSmaller; + if (takePartnerHi) + hiPair = partnerHiPair; +} + +template +void compareSwap( + bool ascending, + NBL_REF_ARG(pair) loPair, + NBL_REF_ARG(pair) hiPair, + NBL_CONST_REF_ARG(Comparator) comp) +{ + const bool shouldSwap = comp(hiPair.first, loPair.first); + const bool doSwap = (shouldSwap == ascending); + + if (doSwap) + swap(loPair, hiPair); +} +} +} +} + +#endif diff --git a/include/nbl/builtin/hlsl/concepts/accessors/bitonic_sort.hlsl b/include/nbl/builtin/hlsl/concepts/accessors/bitonic_sort.hlsl new file mode 100644 index 0000000000..a39e91ffb3 --- /dev/null +++ b/include/nbl/builtin/hlsl/concepts/accessors/bitonic_sort.hlsl @@ -0,0 +1,31 @@ +#ifndef _NBL_BUILTIN_HLSL_CONCEPTS_ACCESSORS_BITONIC_SORT_INCLUDED_ +#define _NBL_BUILTIN_HLSL_CONCEPTS_ACCESSORS_BITONIC_SORT_INCLUDED_ + +#include "nbl/builtin/hlsl/concepts/accessors/generic_shared_data.hlsl" + +namespace nbl +{ +namespace hlsl +{ +namespace workgroup +{ +namespace bitonic_sort +{ +// The SharedMemoryAccessor MUST provide the following methods: +// * void get(uint32_t index, NBL_REF_ARG(uint32_t) value); +// * void set(uint32_t index, in uint32_t value); +// * void workgroupExecutionAndMemoryBarrier(); +template +NBL_BOOL_CONCEPT BitonicSortSharedMemoryAccessor = concepts::accessors::GenericSharedMemoryAccessor; + +// The Accessor MUST provide the following methods: +// * void get(uint32_t index, NBL_REF_ARG(pair) value); +// * void set(uint32_t index, in pair value); +template +NBL_BOOL_CONCEPT BitonicSortAccessor = concepts::accessors::GenericDataAccessor, I>; + +} +} +} +} +#endif diff --git a/include/nbl/builtin/hlsl/memory_accessor.hlsl b/include/nbl/builtin/hlsl/memory_accessor.hlsl index 2194b1e917..cee8617e1a 100644 --- a/include/nbl/builtin/hlsl/memory_accessor.hlsl +++ b/include/nbl/builtin/hlsl/memory_accessor.hlsl @@ -22,18 +22,6 @@ namespace nbl { namespace hlsl { - -// TODO: flesh out and move to `nbl/builtin/hlsl/utility.hlsl` -template -struct pair -{ - using first_type = T1; - using second_type = T2; - - first_type first; - second_type second; -}; - namespace accessor_adaptors { namespace impl @@ -227,4 +215,4 @@ struct Offset : impl::OffsetBase } } } -#endif \ No newline at end of file +#endif diff --git a/include/nbl/builtin/hlsl/subgroup/bitonic_sort.hlsl b/include/nbl/builtin/hlsl/subgroup/bitonic_sort.hlsl new file mode 100644 index 0000000000..64ca5e1ced --- /dev/null +++ b/include/nbl/builtin/hlsl/subgroup/bitonic_sort.hlsl @@ -0,0 +1,83 @@ +#ifndef NBL_BUILTIN_HLSL_SUBGROUP_BITONIC_SORT_INCLUDED +#define NBL_BUILTIN_HLSL_SUBGROUP_BITONIC_SORT_INCLUDED +#include "nbl/builtin/hlsl/bitonic_sort/common.hlsl" +#include "nbl/builtin/hlsl/glsl_compat/subgroup_basic.hlsl" +#include "nbl/builtin/hlsl/glsl_compat/subgroup_shuffle.hlsl" +#include "nbl/builtin/hlsl/functional.hlsl" +namespace nbl +{ +namespace hlsl +{ +namespace subgroup +{ + +template > +struct bitonic_sort_config +{ + using key_t = KeyType; + using value_t = ValueType; + using comparator_t = Comparator; +}; + +template +struct bitonic_sort; + +template +struct bitonic_sort, device_capabilities> +{ + using config_t = bitonic_sort_config; + using key_t = typename config_t::key_t; + using value_t = typename config_t::value_t; + using comparator_t = typename config_t::comparator_t; + + static void mergeStage(uint32_t stage, bool bitonicAscending, uint32_t invocationID, + NBL_REF_ARG(pair) loPair, NBL_REF_ARG(pair) hiPair) + { + comparator_t comp; + + [unroll] + for (uint32_t pass = 0; pass <= stage; pass++) + { + const uint32_t stride = 1u << (stage - pass); // Element stride + const uint32_t threadStride = stride >> 1; + if (threadStride == 0) + { + // Local compare and swap for stage 0 + nbl::hlsl::bitonic_sort::compareSwap(bitonicAscending, loPair, hiPair, comp); + } + else + { + // Shuffle from partner using XOR + const key_t pLoKey = glsl::subgroupShuffleXor(loPair.first, threadStride); + const value_t pLoVal = glsl::subgroupShuffleXor(loPair.second, threadStride); + const key_t pHiKey = glsl::subgroupShuffleXor(hiPair.first, threadStride); + const value_t pHiVal = glsl::subgroupShuffleXor(hiPair.second, threadStride); + + const pair partnerLoPair = make_pair(pLoKey, pLoVal); + const pair partnerHiPair = make_pair(pHiKey, pHiVal); + + const bool isUpper = bool(invocationID & threadStride); + const bool takeLarger = isUpper == bitonicAscending; + + nbl::hlsl::bitonic_sort::compareExchangeWithPartner(takeLarger, loPair, partnerLoPair, hiPair, partnerHiPair, comp); + } + } + } + + static void __call(bool ascending, NBL_REF_ARG(pair) loPair, NBL_REF_ARG(pair) hiPair) + { + const uint32_t invocationID = glsl::gl_SubgroupInvocationID(); + const uint32_t subgroupSizeLog2 = glsl::gl_SubgroupSizeLog2(); + [unroll] + for (uint32_t stage = 0; stage <= subgroupSizeLog2; stage++) + { + const bool bitonicAscending = (stage == subgroupSizeLog2) ? ascending : !bool(invocationID & (1u << stage)); + mergeStage(stage, bitonicAscending, invocationID, loPair, hiPair); + } + } +}; + +} +} +} +#endif diff --git a/include/nbl/builtin/hlsl/utility.hlsl b/include/nbl/builtin/hlsl/utility.hlsl index 21f1eb1909..07c4b10624 100644 --- a/include/nbl/builtin/hlsl/utility.hlsl +++ b/include/nbl/builtin/hlsl/utility.hlsl @@ -1,40 +1,70 @@ -// Copyright (C) 2024 - DevSH Graphics Programming Sp. z O.O. -// This file is part of the "Nabla Engine". -// For conditions of distribution and use, see copyright notice in nabla.h -#ifndef _NBL_BUILTIN_HLSL_UTILITY_INCLUDED_ -#define _NBL_BUILTIN_HLSL_UTILITY_INCLUDED_ - - -#include - - -// for now we only implement declval -namespace nbl -{ -namespace hlsl -{ -template -const static bool always_true = true; -#ifndef __HLSL_VERSION - -template -std::add_rvalue_reference_t declval() noexcept -{ - static_assert(false,"Actually calling declval is ill-formed."); -} - -#else - -namespace experimental -{ - -template -T declval() {} - -} - -#endif -} -} - -#endif +// Copyright (C) 2024 - DevSH Graphics Programming Sp. z O.O. +// This file is part of the "Nabla Engine". +// For conditions of distribution and use, see copyright notice in nabla.h +#ifndef _NBL_BUILTIN_HLSL_UTILITY_INCLUDED_ +#define _NBL_BUILTIN_HLSL_UTILITY_INCLUDED_ + + +#include + + +namespace nbl +{ +namespace hlsl +{ + +template +struct pair +{ + using first_type = T1; + using second_type = T2; + + first_type first; + second_type second; +}; + +template +pair make_pair(T1 f, T2 s) +{ + pair p; + p.first = f; + p.second = s; + return p; +} + +template +void swap(NBL_REF_ARG(pair) a, NBL_REF_ARG(pair) b) +{ + T1 temp_first = a.first; + T2 temp_second = a.second; + a.first = b.first; + a.second = b.second; + b.first = temp_first; + b.second = temp_second; +} + +template +const static bool always_true = true; +#ifndef __HLSL_VERSION + +template +std::add_rvalue_reference_t declval() noexcept +{ + static_assert(false,"Actually calling declval is ill-formed."); +} + +#else + +namespace experimental +{ + +template +T declval() {} + +} + +#endif +} +} + +#endif diff --git a/include/nbl/builtin/hlsl/workgroup/bitonic_sort.hlsl b/include/nbl/builtin/hlsl/workgroup/bitonic_sort.hlsl new file mode 100644 index 0000000000..4ae393fbca --- /dev/null +++ b/include/nbl/builtin/hlsl/workgroup/bitonic_sort.hlsl @@ -0,0 +1,253 @@ +#ifndef NBL_BUILTIN_HLSL_WORKGROUP_BITONIC_SORT_INCLUDED +#define NBL_BUILTIN_HLSL_WORKGROUP_BITONIC_SORT_INCLUDED +#include "nbl/builtin/hlsl/bitonic_sort/common.hlsl" +#include "nbl/builtin/hlsl/memory_accessor.hlsl" +#include "nbl/builtin/hlsl/functional.hlsl" +#include "nbl/builtin/hlsl/subgroup/bitonic_sort.hlsl" +#include "nbl/builtin/hlsl/bit.hlsl" +#include "nbl/builtin/hlsl/workgroup/shuffle.hlsl" +#include "nbl/builtin/hlsl/workgroup/basic.hlsl" +#include "nbl/builtin/hlsl/concepts/accessors/bitonic_sort.hlsl" + +namespace nbl +{ +namespace hlsl +{ +namespace workgroup +{ +namespace bitonic_sort +{ + +template NBL_PRIMARY_REQUIRES(_ElementsPerInvocationLog2 >= 1 && _WorkgroupSizeLog2 >= 5) +struct bitonic_sort_config +{ + using key_t = KeyType; + using value_t = ValueType; + using comparator_t = Comparator; + NBL_CONSTEXPR_STATIC_INLINE uint16_t ElementsPerInvocationLog2 = _ElementsPerInvocationLog2; + NBL_CONSTEXPR_STATIC_INLINE uint16_t WorkgroupSizeLog2 = _WorkgroupSizeLog2; + + NBL_CONSTEXPR_STATIC_INLINE uint32_t ElementsPerInvocation = 1u << ElementsPerInvocationLog2; + NBL_CONSTEXPR_STATIC_INLINE uint32_t WorkgroupSize = 1u << WorkgroupSizeLog2; + NBL_CONSTEXPR_STATIC_INLINE uint32_t SharedmemDWORDs = sizeof(pair) / sizeof(uint32_t) * WorkgroupSize; + +}; +} + +template +struct BitonicSort; + +// ==================== ElementsPerThreadLog2 = 1 Specialization (No Virtual Threading) ==================== +// This handles arrays of size WorkgroupSize * 2 using subgroup + workgroup operations +template +struct BitonicSort, device_capabilities> +{ + using config_t = bitonic_sort::bitonic_sort_config<1, WorkgroupSizeLog2, KeyType, ValueType, Comparator>; + using key_t = KeyType; + using value_t = ValueType; + using comparator_t = Comparator; + + using SortConfig = subgroup::bitonic_sort_config; + + template + static void shuffleXor(NBL_REF_ARG(pair) p, uint32_t ownedIdx, uint32_t mask, NBL_REF_ARG(key_adaptor_t) keyAdaptor, NBL_REF_ARG(value_adaptor_t) valueAdaptor) + { + keyAdaptor.template set(ownedIdx, p.first); + valueAdaptor.template set(ownedIdx, p.second); + + // Wait until all writes are done before reading - only barrier on one adaptor here + keyAdaptor.workgroupExecutionAndMemoryBarrier(); + + keyAdaptor.template get(ownedIdx ^ mask, p.first); + valueAdaptor.template get(ownedIdx ^ mask, p.second); + } + + + template + static void mergeStage(NBL_REF_ARG(SharedMemoryAccessor) sharedmemAccessor, uint32_t stage, bool bitonicAscending, uint32_t invocationID, + NBL_REF_ARG(nbl::hlsl::pair) lopair, NBL_REF_ARG(nbl::hlsl::pair) hipair) + { + const uint32_t WorkgroupSize = config_t::WorkgroupSize; + const uint32_t subgroupSizeLog2 = glsl::gl_SubgroupSizeLog2(); + comparator_t comp; + + + using key_adaptor_t = accessor_adaptors::StructureOfArrays; + using value_adaptor_t = accessor_adaptors::StructureOfArrays >; + + key_adaptor_t keyAdaptor; + keyAdaptor.accessor = sharedmemAccessor; + value_adaptor_t valueAdaptor; + valueAdaptor.accessor = sharedmemAccessor; + + [unroll] + for (uint32_t pass = 0; pass <= stage; pass++) + { + if (pass) + sharedmemAccessor.workgroupExecutionAndMemoryBarrier(); + + const uint32_t stridePower = (stage - pass + 1) + subgroupSizeLog2; + const uint32_t stride = 1u << stridePower; + const uint32_t threadStride = stride >> 1; + + nbl::hlsl::pair plopair = lopair; + shuffleXor(plopair, invocationID, threadStride, keyAdaptor, valueAdaptor); + + nbl::hlsl::pair phipair = hipair; + shuffleXor(phipair, invocationID ^ threadStride, threadStride, keyAdaptor, valueAdaptor); + + const bool isUpper = (invocationID & threadStride) != 0; + const bool takeLarger = isUpper == bitonicAscending; + + nbl::hlsl::bitonic_sort::compareExchangeWithPartner(takeLarger, lopair, plopair, hipair, phipair, comp); + } + } + + template&& bitonic_sort::BitonicSortSharedMemoryAccessor) + static void __call(NBL_REF_ARG(Accessor) accessor, NBL_REF_ARG(SharedMemoryAccessor) sharedmemAccessor) + { + const uint32_t WorkgroupSize = config_t::WorkgroupSize; + + const uint32_t invocationID = glsl::gl_LocalInvocationID().x; + const uint32_t subgroupSizeLog2 = glsl::gl_SubgroupSizeLog2(); + const uint32_t subgroupSize = 1u << subgroupSizeLog2; + const uint32_t subgroupID = glsl::gl_SubgroupID(); + const uint32_t numSubgroups = WorkgroupSize / subgroupSize; + const uint32_t numSubgroupsLog2 = findMSB(numSubgroups); + + const uint32_t loIdx = invocationID * 2; + const uint32_t hiIdx = loIdx | 1; + + nbl::hlsl::pair lopair, hipair; + accessor.template get >(loIdx, lopair); + accessor.template get >(hiIdx, hipair); + + const bool subgroupAscending = (subgroupID & 1) == 0; + subgroup::bitonic_sort::__call(subgroupAscending, lopair, hipair); + + const uint32_t subgroupInvocationID = glsl::gl_SubgroupInvocationID(); + + [unroll] + for (uint32_t stage = 0; stage < numSubgroupsLog2; ++stage) + { + const bool bitonicAscending = !bool(invocationID & (subgroupSize << (stage + 1))); + + mergeStage(sharedmemAccessor, stage, bitonicAscending, invocationID, lopair, hipair); + + subgroup::bitonic_sort::mergeStage(subgroupSizeLog2, bitonicAscending, subgroupInvocationID, lopair, hipair); + } + + accessor.template set >(loIdx, lopair); + accessor.template set >(hiIdx, hipair); + } +}; + +// ==================== ElementsPerThreadLog2 > 1 Specialization (Virtual Threading) ==================== +// This handles larger arrays by combining global memory stages with recursive E=1 workgroup sorts +template +struct BitonicSort, device_capabilities> +{ + using config_t = bitonic_sort::bitonic_sort_config; + using simple_config_t = bitonic_sort::bitonic_sort_config<1, WorkgroupSizeLog2, KeyType, ValueType, Comparator>; + + using key_t = KeyType; + using value_t = ValueType; + using comparator_t = Comparator; + + template + static void __call(NBL_REF_ARG(Accessor) accessor, NBL_REF_ARG(SharedMemoryAccessor) sharedmemAccessor) + { + const uint32_t WorkgroupSize = config_t::WorkgroupSize; + const uint32_t ElementsPerThread = config_t::ElementsPerInvocation; + const uint32_t TotalElements = WorkgroupSize * ElementsPerThread; + const uint32_t ElementsPerSimpleSort = WorkgroupSize * 2; + + const uint32_t threadID = glsl::gl_LocalInvocationID().x; + comparator_t comp; + + // PHASE 1: Sub-sorts in chunks of size WorkgroupSize*2 + accessor_adaptors::Offset offsetAccessor; + offsetAccessor.accessor = accessor; + + const uint32_t numSub = TotalElements / ElementsPerSimpleSort; + + [unroll] + for (uint32_t sub = 0; sub < numSub; sub++) + { + if (sub) + sharedmemAccessor.workgroupExecutionAndMemoryBarrier(); + + offsetAccessor.offset = sub * ElementsPerSimpleSort; + + // Call E=1 workgroup sort + BitonicSort::template __call(offsetAccessor, sharedmemAccessor); + } + sharedmemAccessor.workgroupExecutionAndMemoryBarrier(); + + // PHASE 2: Reverse odd-indexed chunks to form bitonic sequences + const uint32_t simpleLog = hlsl::findMSB(ElementsPerSimpleSort - 1) + 1u; + [unroll] + for (uint32_t sub = 1; sub < numSub; sub += 2) + { + offsetAccessor.offset = sub * ElementsPerSimpleSort; + [unroll] + for (uint32_t strideLog = simpleLog - 1u; strideLog + 1u > 0u; strideLog--) + { + const uint32_t stride = 1u << strideLog; + [unroll] + for (uint32_t virtualThreadID = threadID; virtualThreadID < ElementsPerSimpleSort / 2; virtualThreadID += WorkgroupSize) + { + const uint32_t loIx = (((virtualThreadID & (~(stride - 1u))) << 1u) | (virtualThreadID & (stride - 1u))) + offsetAccessor.offset; + const uint32_t hiIx = loIx | stride; + + nbl::hlsl::pair lopair, hipair; + accessor.template get >(loIx, lopair); + accessor.template get >(hiIx, hipair); + + swap(lopair, hipair); + + accessor.template set >(loIx, lopair); + accessor.template set >(hiIx, hipair); + } + sharedmemAccessor.workgroupExecutionAndMemoryBarrier(); + } + } + + // PHASE 3: Global memory bitonic merge + const uint32_t totalLog = hlsl::findMSB(TotalElements - 1) + 1u; + [unroll] + for (uint32_t blockLog = simpleLog + 1u; blockLog <= totalLog; blockLog++) + { + const uint32_t k = 1u << blockLog; + [unroll] + for (uint32_t strideLog = blockLog - 1u; strideLog + 1u > 0u; strideLog--) + { + const uint32_t stride = 1u << strideLog; + [unroll] + for (uint32_t virtualThreadID = threadID; virtualThreadID < TotalElements / 2; virtualThreadID += WorkgroupSize) + { + const uint32_t loIx = ((virtualThreadID & (~(stride - 1u))) << 1u) | (virtualThreadID & (stride - 1u)); + const uint32_t hiIx = loIx | stride; + + const bool bitonicAscending = ((loIx & k) == 0u); + + nbl::hlsl::pair lopair, hipair; + accessor.template get >(loIx, lopair); + accessor.template get >(hiIx, hipair); + + nbl::hlsl::bitonic_sort::compareSwap(bitonicAscending, lopair, hipair, comp); + + accessor.template set >(loIx, lopair); + accessor.template set >(hiIx, hipair); + } + sharedmemAccessor.workgroupExecutionAndMemoryBarrier(); + } + } + } +}; + +} +} +} + +#endif diff --git a/src/nbl/builtin/CMakeLists.txt b/src/nbl/builtin/CMakeLists.txt index cc81b093a2..c56a468112 100644 --- a/src/nbl/builtin/CMakeLists.txt +++ b/src/nbl/builtin/CMakeLists.txt @@ -15,7 +15,15 @@ LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "shader/loader/gltf/fragment_impl.g LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "shader/loader/gltf/uv.frag") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "shader/loader/gltf/color.frag") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "shader/loader/gltf/no_uv_color.frag") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "material/lambertian/singletexture/specialized_shader.vert") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "material/lambertian/singletexture/specialized_shader.frag") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "material/debug/vertex_color/specialized_shader.vert") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "material/debug/vertex_normal/specialized_shader.vert") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "material/debug/vertex_normal/specialized_shader.frag") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "material/debug/vertex_uv/specialized_shader.frag") # generic GLSL headers after this line +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/macros.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/algorithm.glsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/ieee754.glsl") # barycentric LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/barycentric/extensions.glsl") @@ -31,6 +39,30 @@ LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/bda/legacy_bda_accessor.hlsl" # bump mapping LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/bump_mapping/fragment.glsl") # TODO: rename to `frag.glsl` LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/bump_mapping/utils.glsl") +# bxdf +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/bxdf/common.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/bxdf/common_samples.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/bxdf/fresnel.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/bxdf/ndf/common.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/bxdf/ndf/blinn_phong.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/bxdf/ndf/beckmann.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/bxdf/ndf/ggx.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/bxdf/geom/smith/common.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/bxdf/geom/smith/beckmann.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/bxdf/geom/smith/ggx.glsl") +# brdf +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/bxdf/brdf/diffuse/lambert.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/bxdf/brdf/diffuse/oren_nayar.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/bxdf/brdf/specular/blinn_phong.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/bxdf/brdf/specular/beckmann.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/bxdf/brdf/specular/ggx.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/bxdf/brdf/diffuse/fresnel_correction.glsl") +# bsdf +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/bxdf/bsdf/diffuse/lambert.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/bxdf/bsdf/specular/common.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/bxdf/bsdf/specular/dielectric.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/bxdf/bsdf/specular/beckmann.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/bxdf/bsdf/specular/ggx.glsl") # colorspace LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/colorspace/EOTF.glsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/colorspace/OETF.glsl") @@ -55,15 +87,19 @@ LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/format/constants.glsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/loader/mtl/common.glsl") # LoD Library LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/lod_library/structs.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/lod_library/descriptor_set.glsl") # math and limits LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/math/constants.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/math/complex.glsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/math/functions.glsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/math/quaternions.glsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/math/typeless_arithmetic.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/limits/numeric.glsl") # material_compiler LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/material_compiler/common.glsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/material_compiler/common_declarations.glsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/material_compiler/common_invariant_declarations.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/material_compiler/rasterization/impl.glsl") # property pool LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/property_pool/transfer.glsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/property_pool/copy.comp") @@ -73,7 +109,6 @@ LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/random/xoroshiro.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/random/pcg.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/random/lcg.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/random/tea.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/random/dim_adaptor_recursive.hlsl") # sampling LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/sampling/bilinear.glsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/sampling/box_muller_transform.glsl") @@ -84,6 +119,14 @@ LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/sampling/projected_spherical_ LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/sampling/spherical_rectangle.glsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/sampling/spherical_triangle.glsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/sampling/quantized_sequence.glsl") +# global exclusive scan +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/scan/direct.comp") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/scan/declarations.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/scan/descriptors.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/scan/default_scheduler.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/scan/indirect.comp") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/scan/parameters_struct.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/scan/virtual_workgroup.glsl") # faster and easier scan LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/scanning_append/scanning_append.glsl") # scene @@ -102,11 +145,30 @@ LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/skinning/debug.vert") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/skinning/linear.glsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/skinning/render_descriptor_set.glsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/skinning/update_descriptor_set.glsl") +# subgroup emulation +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/subgroup/arithmetic_portability.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/subgroup/arithmetic_portability_impl.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/subgroup/basic_portability.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/subgroup/fft.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/subgroup/shared_arithmetic_portability.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/subgroup/shared_shuffle_portability.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/subgroup/shuffle_portability.glsl") # utilities LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/utils/common.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/utils/culling.glsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/utils/compressed_normal_matrix_t.glsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/utils/normal_decode.glsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/utils/normal_encode.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/utils/transform.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/utils/morton.glsl") +# workgroup "intrinsics" +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/workgroup/arithmetic.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/workgroup/basic.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/workgroup/ballot.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/workgroup/fft.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/workgroup/shared_arithmetic.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/workgroup/shared_ballot.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/workgroup/shared_fft.glsl") #transform_tree LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/transform_tree/global_transform_update.comp") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/transform_tree/global_transform_and_normal_matrix_update.comp") @@ -120,7 +182,14 @@ LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/transform_tree/relative_trans LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/transform_tree/relative_transform_update_common.glsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/transform_tree/relative_transform_update_descriptor_set.glsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/transform_tree/debug.vert") -# +# ext shouldn't be built into the engine, but there's no harm including some non-dynamic GLSL source to make life easier +#LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/ext/.glsl") +# radix sort +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/ext/FFT/default_compute_fft.comp") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/ext/FFT/fft.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/ext/FFT/parameters_struct.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/ext/FFT/parameters.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/ext/FFT/types.glsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/ext/LumaMeter/common.glsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/ext/LumaMeter/impl.glsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/ext/ToneMapper/operators.glsl") @@ -133,6 +202,10 @@ LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/ext/MitsubaLoader/material_co LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/ext/OIT/oit.glsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/ext/OIT/insert_node.glsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/ext/OIT/resolve.frag") +# virtual geometry +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/virtual_geometry/descriptors.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/virtual_geometry/virtual_attribute.glsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/virtual_geometry/virtual_attribute_fetch.glsl") # depth pyramid generator LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/ext/DepthPyramidGenerator/common.glsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/ext/DepthPyramidGenerator/push_constants_struct_common.h") @@ -141,7 +214,6 @@ LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "glsl/ext/DepthPyramidGenerator/vir # HLSL LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/macros.h") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/indirect_commands.hlsl") # emulated LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/emulated/float64_t.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/emulated/float64_t_impl.hlsl") @@ -195,6 +267,7 @@ LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/limits.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/type_traits.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/tuple.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/utility.hlsl") + #metaprogramming LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/mpl.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/member_test_macros.hlsl") @@ -218,12 +291,10 @@ LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/format/shared_exp.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/format.hlsl") #linear algebra LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/math/linalg/fast_affine.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/math/linalg/transform.hlsl") # TODO: rename `equations` to `polynomials` probably LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/math/functions.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/math/geometry.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/math/intutil.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/math/angle_adding.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/math/equations/quadratic.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/math/equations/cubic.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/math/equations/quartic.hlsl") @@ -246,52 +317,24 @@ LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/shapes/circle.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/shapes/ellipse.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/shapes/line.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/shapes/beziers.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/shapes/aabb.hlsl") -#sampling -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/sampling/concentric_mapping.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/sampling/cos_weighted_spheres.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/sampling/quotient_and_pdf.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/sampling/uniform_spheres.hlsl") # LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/ndarray_addressing.hlsl") # LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/shapes/util.hlsl") #FFT LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/fft/common.hlsl") +#Bitonic_sort +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/bitonic_sort/common.hlsl") #sort LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/sort/common.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/sort/counting.hlsl") -#bxdf -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/bxdf/common.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/bxdf/fresnel.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/bxdf/ndf.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/bxdf/config.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/bxdf/cook_torrance_base.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/bxdf/reflection.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/bxdf/transmission.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/bxdf/bxdf_traits.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/bxdf/ndf/beckmann.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/bxdf/ndf/ggx.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/bxdf/ndf/microfacet_to_light_transform.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/bxdf/base/lambertian.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/bxdf/base/oren_nayar.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/bxdf/reflection/beckmann.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/bxdf/reflection/ggx.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/bxdf/reflection/lambertian.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/bxdf/reflection/oren_nayar.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/bxdf/reflection/delta_distribution.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/bxdf/transmission/beckmann.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/bxdf/transmission/ggx.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/bxdf/transmission/lambertian.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/bxdf/transmission/oren_nayar.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/bxdf/transmission/smooth_dielectric.hlsl") -LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/bxdf/transmission/delta_distribution.hlsl") #subgroup LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/subgroup/ballot.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/subgroup/basic.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/subgroup/arithmetic_portability.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/subgroup/arithmetic_portability_impl.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/subgroup/fft.hlsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/subgroup/bitonic_sort.hlsl") #subgroup2 LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/subgroup2/ballot.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/subgroup2/arithmetic_params.hlsl") @@ -305,6 +348,7 @@ LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/workgroup/basic.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/workgroup/ballot.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/workgroup/broadcast.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/workgroup/fft.hlsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/workgroup/bitonic_sort.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/workgroup/scratch_size.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/workgroup/shared_scan.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/workgroup/shuffle.hlsl") @@ -338,6 +382,7 @@ LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/concepts/accessors/mip_mapped LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/concepts/accessors/storable_image.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/concepts/accessors/generic_shared_data.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/concepts/accessors/fft.hlsl") +LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/concepts/accessors/bitonic_sort.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/concepts/accessors/workgroup_arithmetic.hlsl") #tgmath LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/tgmath.hlsl") @@ -347,4 +392,4 @@ LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/tgmath/output_structs.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/prefix_sum_blur/blur.hlsl") LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/prefix_sum_blur/box_sampler.hlsl") -ADD_CUSTOM_BUILTIN_RESOURCES(nblBuiltinResourceData NBL_RESOURCES_TO_EMBED "${NBL_ROOT_PATH}/include" "nbl/builtin" "nbl::builtin" "${NBL_ROOT_PATH_BINARY}/include" "${NBL_ROOT_PATH_BINARY}/src" "STATIC" "INTERNAL") \ No newline at end of file +ADD_CUSTOM_BUILTIN_RESOURCES(nblBuiltinResourceData NBL_RESOURCES_TO_EMBED "${NBL_ROOT_PATH}/include" "nbl/builtin" "nbl::builtin" "${NBL_ROOT_PATH_BINARY}/include" "${NBL_ROOT_PATH_BINARY}/src" "STATIC" "INTERNAL")