From 79e92395f8ce3d92c446e3bb3250d19ce33decd5 Mon Sep 17 00:00:00 2001 From: Yong He Date: Fri, 16 Apr 2021 10:34:26 -0700 Subject: Update `model-viewer` example and fixing compiler bugs. (#1795) --- tools/gfx/d3d12/render-d3d12.cpp | 1 + tools/gfx/slang-context.h | 1 + 2 files changed, 2 insertions(+) (limited to 'tools/gfx') diff --git a/tools/gfx/d3d12/render-d3d12.cpp b/tools/gfx/d3d12/render-d3d12.cpp index 15acb680c..e02f7d656 100644 --- a/tools/gfx/d3d12/render-d3d12.cpp +++ b/tools/gfx/d3d12/render-d3d12.cpp @@ -4804,6 +4804,7 @@ Result D3D12Device::createProgram(const IShaderProgram::Desc& desc, IShaderProgr (SlangInt)i, 0, kernelCode.writeRef(), diagnostics.writeRef()); if (diagnostics) { + printf("%s\n", diagnostics->getBufferPointer()); // TODO: report compile error. } SLANG_RETURN_ON_FAIL(compileResult); diff --git a/tools/gfx/slang-context.h b/tools/gfx/slang-context.h index d5bf261e4..be6539da5 100644 --- a/tools/gfx/slang-context.h +++ b/tools/gfx/slang-context.h @@ -34,6 +34,7 @@ namespace gfx targetDesc.profile = globalSession->findProfile(targetProfile); targetDesc.optimizationLevel = desc.optimizationLevel; targetDesc.floatingPointMode = desc.floatingPointMode; + targetDesc.flags = desc.targetFlags; slangSessionDesc.targetCount = 1; slangSessionDesc.targets = &targetDesc; SLANG_RETURN_ON_FAIL(globalSession->createSession(slangSessionDesc, session.writeRef())); -- cgit v1.2.3