Skip to content

Commit 6168bb2

Browse files
Added more Slang logs
1 parent 3b67c81 commit 6168bb2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

samples/VulkanApp.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,9 +496,10 @@ std::vector<uint8_t> compileSlangToSPIRV(const char* code, lvk::ShaderStage stag
496496
SlangResult result = session->createCompositeComponentType(
497497
componentTypes.getBuffer(), componentTypes.getCount(), composedProgram.writeRef(), diagnosticBlob.writeRef());
498498
if (diagnosticBlob) {
499-
LLOGW("%s", (const char*)diagnosticBlob->getBufferPointer());
499+
LLOGW("%s\n", (const char*)diagnosticBlob->getBufferPointer());
500500
}
501501
if (SLANG_FAILED(result)) {
502+
LVK_ASSERT_MSG(false, "Slang failed");
502503
return {};
503504
}
504505
}
@@ -509,9 +510,10 @@ std::vector<uint8_t> compileSlangToSPIRV(const char* code, lvk::ShaderStage stag
509510
const int entryPoint = stage == lvk::Stage_Vert ? vertexEntryPointIndex : fragmentEntryPointIndex;
510511
SlangResult result = composedProgram->getEntryPointCode(entryPoint, 0, spirvCode.writeRef(), diagnosticBlob.writeRef());
511512
if (diagnosticBlob) {
512-
LLOGW("%s", (const char*)diagnosticBlob->getBufferPointer());
513+
LLOGW("%s\n", (const char*)diagnosticBlob->getBufferPointer());
513514
}
514515
if (SLANG_FAILED(result)) {
516+
LVK_ASSERT_MSG(false, "Slang failed");
515517
return {};
516518
}
517519
}

0 commit comments

Comments
 (0)