Skip to content

Commit 44ce6b1

Browse files
committed
Saving work
1 parent dc3d31e commit 44ce6b1

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

03_DeviceSelectionAndSharedSources/Testers.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ class MergeTester final : public IntrospectionTesterBase
178178
confirmExpectedOutput(logger, pplnIntroData->merge(introspections[0].get()), true);
179179
// should merge successfully since pipeline layout of "shader_1.comp.hlsl" is compatible with "shader_0.comp.hlsl"
180180
confirmExpectedOutput(logger, pplnIntroData->merge(introspections[1].get()), true);
181-
// should not merge since pipeline layout of "shader_2.comp.hlsl" is not compatible with "shader_0.comp.hlsl"
182-
confirmExpectedOutput(logger, pplnIntroData->merge(introspections[2].get()), false);
181+
// should merge since pipeline layout of "shader_2.comp.hlsl" is not compatible with "shader_0.comp.hlsl"
182+
confirmExpectedOutput(logger, pplnIntroData->merge(introspections[2].get()), true);
183183

184184
pplnIntroData = core::make_smart_refctd_ptr<CSPIRVIntrospector::CPipelineIntrospectionData>();
185185

@@ -190,8 +190,8 @@ class MergeTester final : public IntrospectionTesterBase
190190

191191
// should merge successfully since shader is not messed up and it is the first merge
192192
confirmExpectedOutput(logger, pplnIntroData->merge(introspections[4].get()), true);
193-
// TODO: idk what should happen when last binding in introspection is fixed-length sized array and last binding in introspection to merge is run-time sized array
194-
confirmExpectedOutput(logger, pplnIntroData->merge(introspections[5].get()), false);
193+
// TODO: should merge successfully since shader 5 is compatible with shader 4, it is allowed for last binding in one shader to be run-time sized and statically sized in the other
194+
confirmExpectedOutput(logger, pplnIntroData->merge(introspections[5].get()), true);
195195
}
196196
};
197197

03_DeviceSelectionAndSharedSources/main.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,28 +51,25 @@ class DeviceSelectionAndSharedSourcesApp final : public application_templates::M
5151
mergeTester.performTests(m_physicalDevice, m_device.get(), m_logger.get(), m_assetMgr.get());
5252

5353
// testing creation of compute pipeline layouts compatible for multiple shaders
54-
PredefinedLayoutTester layoutTester("");
54+
PredefinedLayoutTester layoutTester("CPSIRVIntrospector::createApproximateComputePipelineFromIntrospection");
5555
layoutTester.performTests(m_physicalDevice, m_device.get(), m_logger.get(), m_assetMgr.get());
5656

5757
SandboxTester sandboxTester("unknown");
5858
sandboxTester.performTests(m_physicalDevice, m_device.get(), m_logger.get(), m_assetMgr.get());
5959
}
60-
6160

62-
m_logger->log("------- shader.comp.hlsl INTROSPECTION -------", ILogger::E_LOG_LEVEL::ELL_WARNING);
6361
CSPIRVIntrospector introspector;
6462
auto mainShader = this->compileShaderAndTestIntrospection("app_resources/shader.comp.hlsl", introspector);
6563
auto source = mainShader.first;
6664
auto mainShaderIntrospection = mainShader.second;
65+
6766
//mainShaderIntrospection->debugPrint(m_logger.get());
68-
// auto source2 = this->compileShaderAndTestIntrospection("app_resources/shader.comp.hlsl", introspector); // to make sure caching works
6967

7068
// We've now skipped the manual creation of a descriptor set layout, pipeline layout
7169
ICPUShader::SSpecInfo specInfo;
7270
specInfo.entryPoint = "main";
7371
specInfo.shader = source.get();
7472

75-
m_logger->log("------- shader.comp.hlsl PIPELINE CREATION -------", ILogger::E_LOG_LEVEL::ELL_WARNING);
7673
smart_refctd_ptr<nbl::asset::ICPUComputePipeline> cpuPipeline = introspector.createApproximateComputePipelineFromIntrospection(specInfo);
7774

7875
smart_refctd_ptr<IGPUShader> shader = m_device->createShader(source.get());

0 commit comments

Comments
 (0)