Skip to content

Commit 9aa7483

Browse files
author
devsh
committed
@AnastaZIuk I need your help for getting the mounting of common/include/nbl/examples under nbl/examples either as dir or builtin archive
1 parent be46ec3 commit 9aa7483

File tree

4 files changed

+22
-13
lines changed

4 files changed

+22
-13
lines changed

23_Arithmetic2UnitTest/app_resources/testWorkgroup.comp.hlsl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ typedef vector<uint32_t, config_t::ItemsPerInvocation_0> type_t;
1414
// final (level 1/2) scan needs to fit in one subgroup exactly
1515
groupshared uint32_t scratch[mpl::max_v<int16_t,config_t::SharedScratchElementCount,1>];
1616

17-
#include "../../common/include/WorkgroupDataAccessors.hlsl"
17+
#include "nbl/examples/workgroup/DataAccessors.hlsl"
18+
using namespace nbl::hlsl::examples::workgroup;
1819

1920
static ScratchProxy arithmeticAccessor;
2021

29_Arithmetic2Bench/app_resources/benchmarkWorkgroup.comp.hlsl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ typedef vector<uint32_t, config_t::ItemsPerInvocation_0> type_t;
1515
// final (level 1/2) scan needs to fit in one subgroup exactly
1616
groupshared uint32_t scratch[mpl::max_v<int16_t,config_t::SharedScratchElementCount,1>];
1717

18-
#include "../../common/include/WorkgroupDataAccessors.hlsl"
18+
#include "nbl/examples/workgroup/DataAccessors.hlsl"
19+
using namespace nbl::hlsl::examples::workgroup;
1920

2021
template<uint16_t WorkgroupSizeLog2, uint16_t VirtualWorkgroupSize, uint16_t ItemsPerInvocation>
2122
struct RandomizedInputDataProxy

29_Arithmetic2Bench/main.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
#include "SimpleWindowedApplication.hpp"
2-
#include "CEventCallback.hpp"
3-
#include "nbl/application_templates/MonoAssetManagerAndBuiltinResourceApplication.hpp"
1+
#include "nbl/examples/examples.hpp"
42
#include "app_resources/common.hlsl"
53
#include "nbl/builtin/hlsl/workgroup2/arithmetic_config.hlsl"
64
#include "nbl/builtin/hlsl/subgroup2/arithmetic_params.hlsl"
75

86
using namespace nbl;
9-
using namespace core;
10-
using namespace system;
11-
using namespace asset;
12-
using namespace ui;
13-
using namespace video;
7+
using namespace nbl::core;
8+
using namespace nbl::system;
9+
using namespace nbl::asset;
10+
using namespace nbl::ui;
11+
using namespace nbl::video;
12+
using namespace nbl::examples;
13+
1414

1515
template<typename SwapchainResources> requires std::is_base_of_v<ISimpleManagedSurface::ISwapchainResources, SwapchainResources>
1616
class CExplicitSurfaceFormatResizeSurface final : public ISimpleManagedSurface

common/include/WorkgroupDataAccessors.hlsl renamed to common/include/nbl/examples/workgroup/DataAccessors.hlsl

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1-
#ifndef _WORKGROUP_DATA_ACCESSORS_HLSL_
2-
#define _WORKGROUP_DATA_ACCESSORS_HLSL_
1+
#ifndef _NBL_EXAMPLES_WORKGROUP_DATA_ACCESSORS_HLSL_
2+
#define _NBL_EXAMPLES_WORKGROUP_DATA_ACCESSORS_HLSL_
3+
34

45
#include "nbl/builtin/hlsl/bda/legacy_bda_accessor.hlsl"
56

7+
68
namespace nbl
79
{
810
namespace hlsl
911
{
12+
namespace examples
13+
{
14+
namespace workgroup
15+
{
1016

1117
struct ScratchProxy
1218
{
@@ -120,5 +126,6 @@ struct PreloadedDataProxy
120126

121127
}
122128
}
123-
129+
}
130+
}
124131
#endif

0 commit comments

Comments
 (0)