From e050035e0b7d3f257a46bc1cb644163026cb1b23 Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 25 Mar 2021 09:41:53 -0700 Subject: Improve Vulkan shader-objects implementation. (#1765) * Improve Vulkan shader-objects implementation. 1. Null bindings no longer crashes. 2. No longer copies push constants to staging CPU buffer before setting it into command buffer. The entry-point shader object now directly sets it into command buffer upon `bindObject` call. * Update comments * Fix * Re-enable 3 tests. Improved vulkan implementation so that each shader object is responsible for creating descriptor sets on-demand. Fixed slang reflection to correctly report `ParameterBlock` binding. * Fix gcc compile error. --- tools/gfx/d3d12/render-d3d12.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'tools/gfx/d3d12/render-d3d12.cpp') diff --git a/tools/gfx/d3d12/render-d3d12.cpp b/tools/gfx/d3d12/render-d3d12.cpp index e45eaad3a..fb9b3d143 100644 --- a/tools/gfx/d3d12/render-d3d12.cpp +++ b/tools/gfx/d3d12/render-d3d12.cpp @@ -2210,15 +2210,13 @@ public: public: virtual Result bindObject(PipelineCommandEncoder* encoder, RootBindingState* bindingState) override { - RootBindingState globalBindingState = *bindingState; SLANG_RETURN_ON_FAIL(Super::bindObject(encoder, bindingState)); auto entryPointCount = m_entryPoints.getCount(); for (Index i = 0; i < entryPointCount; ++i) { auto entryPoint = m_entryPoints[i]; - auto bindingStateCopy = globalBindingState; - SLANG_RETURN_ON_FAIL(entryPoint->bindObject(encoder, &bindingStateCopy)); + SLANG_RETURN_ON_FAIL(entryPoint->bindObject(encoder, bindingState)); } return SLANG_OK; -- cgit v1.2.3