Skip to content

Commit 6544e04

Browse files
authored
Update common.hlsl
1 parent 547e518 commit 6544e04

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed
Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
1-
// Copyright (C) 2018-2024 - DevSH Graphics Programming Sp. z O.O.
2-
// This file is part of the "Nabla Engine".
3-
// For conditions of distribution and use, see copyright notice in nabla.h
41
#ifndef _BITONIC_SORT_COMMON_INCLUDED_
52
#define _BITONIC_SORT_COMMON_INCLUDED_
3+
#include "nbl/builtin/hlsl/cpp_compat.hlsl"
64

7-
struct BitonicPushData
5+
struct PushConstantData
86
{
9-
10-
uint64_t inputKeyAddress;
11-
uint64_t inputValueAddress;
12-
uint64_t outputKeyAddress;
13-
uint64_t outputValueAddress;
14-
uint32_t dataElementCount;
7+
uint64_t deviceBufferAddress;
158
};
169

17-
#endif
10+
NBL_CONSTEXPR uint32_t WorkgroupSizeLog2 = 7; // 128 threads
11+
NBL_CONSTEXPR uint32_t ElementsPerThreadLog2 = 1; // 2 elements per thread
12+
NBL_CONSTEXPR uint32_t elementCount = uint32_t(1) << (WorkgroupSizeLog2 + ElementsPerThreadLog2);
13+
#endif

0 commit comments

Comments
 (0)