Skip to content

Commit 56994a9

Browse files
committed
workgroup size 512 for sure this time
1 parent e95f09d commit 56994a9

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

31_HLSLPathTracer/app_resources/glsl/common.glsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ layout(set = 2, binding = 2) uniform usampler2D scramblebuf;
1616
layout(set=0, binding=0, rgba16f) uniform image2D outImage;
1717

1818
#ifndef _NBL_GLSL_WORKGROUP_SIZE_
19-
#define _NBL_GLSL_WORKGROUP_SIZE_ 1024
19+
#define _NBL_GLSL_WORKGROUP_SIZE_ 512
2020
layout(local_size_x=_NBL_GLSL_WORKGROUP_SIZE_, local_size_y=1, local_size_z=1) in;
2121
#endif
2222

31_HLSLPathTracer/app_resources/hlsl/render.comp.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
using namespace nbl::hlsl;
3939

40-
NBL_CONSTEXPR uint32_t WorkgroupSize = 1024;
40+
NBL_CONSTEXPR uint32_t WorkgroupSize = 512;
4141
NBL_CONSTEXPR uint32_t MAX_DEPTH_LOG2 = 4;
4242
NBL_CONSTEXPR uint32_t MAX_SAMPLES_LOG2 = 10;
4343

31_HLSLPathTracer/main.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class HLSLComputePathtracer final : public examples::SimpleWindowedApplication,
4848
constexpr static inline uint32_t2 WindowDimensions = { 1280, 720 };
4949
constexpr static inline uint32_t MaxFramesInFlight = 5;
5050
constexpr static inline clock_t::duration DisplayImageDuration = std::chrono::milliseconds(900);
51-
constexpr static inline uint32_t DefaultWorkGroupSize = 1024u;
51+
constexpr static inline uint32_t DefaultWorkGroupSize = 512u;
5252
constexpr static inline uint32_t MaxDescriptorCount = 256u;
5353
constexpr static inline uint32_t MaxDepthLog2 = 4u; // 5
5454
constexpr static inline uint32_t MaxSamplesLog2 = 10u; // 18
@@ -366,11 +366,11 @@ class HLSLComputePathtracer final : public examples::SimpleWindowedApplication,
366366
options.stage = IShader::E_SHADER_STAGE::ESS_COMPUTE; // should be compute
367367
options.targetSpirvVersion = m_device->getPhysicalDevice()->getLimits().spirvVersion;
368368
options.spirvOptimizer = nullptr;
369-
//#ifndef _NBL_DEBUG
370-
// ISPIRVOptimizer::E_OPTIMIZER_PASS optPasses = ISPIRVOptimizer::EOP_STRIP_DEBUG_INFO;
371-
// auto opt = make_smart_refctd_ptr<ISPIRVOptimizer>(std::span<ISPIRVOptimizer::E_OPTIMIZER_PASS>(&optPasses, 1));
372-
// options.spirvOptimizer = opt.get();
373-
//#endif
369+
#ifndef _NBL_DEBUG
370+
ISPIRVOptimizer::E_OPTIMIZER_PASS optPasses = ISPIRVOptimizer::EOP_STRIP_DEBUG_INFO;
371+
auto opt = make_smart_refctd_ptr<ISPIRVOptimizer>(std::span<ISPIRVOptimizer::E_OPTIMIZER_PASS>(&optPasses, 1));
372+
options.spirvOptimizer = opt.get();
373+
#endif
374374
options.debugInfoFlags |= IShaderCompiler::E_DEBUG_INFO_FLAGS::EDIF_LINE_BIT;
375375
options.preprocessorOptions.sourceIdentifier = source->getFilepathHint();
376376
options.preprocessorOptions.logger = m_logger.get();
@@ -1348,7 +1348,7 @@ class HLSLComputePathtracer final : public examples::SimpleWindowedApplication,
13481348
float camYAngle = 165.f / 180.f * 3.14159f;
13491349
float camXAngle = 32.f / 180.f * 3.14159f;
13501350
int PTPipline = E_LIGHT_GEOMETRY::ELG_SPHERE;
1351-
int renderMode = E_RENDER_MODE::ERM_GLSL;
1351+
int renderMode = E_RENDER_MODE::ERM_HLSL;
13521352
int spp = 32;
13531353
int depth = 3;
13541354

0 commit comments

Comments
 (0)