From e272aec6a9ddb8b0af82f72c061f5393f2b2bdab Mon Sep 17 00:00:00 2001 From: Yong He Date: Sat, 19 Feb 2022 00:15:17 -0800 Subject: Optimize d3d12 mutable shader object implementation. (#2138) * Optimize d3d12 mutable shader object implementation. * Disable mismatched clear value warning message from d3d sdk. * Fix. * Fix. * gfx: Avoid redundant d3d12 QueryInterface call. Co-authored-by: Yong He --- tools/gfx/debug-layer.cpp | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'tools/gfx/debug-layer.cpp') diff --git a/tools/gfx/debug-layer.cpp b/tools/gfx/debug-layer.cpp index 6d735fb8d..8ecdf405a 100644 --- a/tools/gfx/debug-layer.cpp +++ b/tools/gfx/debug-layer.cpp @@ -1063,6 +1063,13 @@ Result DebugComputeCommandEncoder::bindPipeline( return result; } +Result DebugComputeCommandEncoder::bindPipelineWithRootObject( + IPipelineState* state, IShaderObject* rootObject) +{ + SLANG_GFX_API_FUNC; + return baseObject->bindPipelineWithRootObject(getInnerObj(state), getInnerObj(rootObject)); +} + void DebugComputeCommandEncoder::dispatchCompute(int x, int y, int z) { SLANG_GFX_API_FUNC; @@ -1098,6 +1105,13 @@ Result DebugRenderCommandEncoder::bindPipeline( return result; } +Result DebugRenderCommandEncoder::bindPipelineWithRootObject( + IPipelineState* state, IShaderObject* rootObject) +{ + SLANG_GFX_API_FUNC; + return baseObject->bindPipelineWithRootObject(getInnerObj(state), getInnerObj(rootObject)); +} + void DebugRenderCommandEncoder::setViewports(uint32_t count, const Viewport* viewports) { SLANG_GFX_API_FUNC; @@ -1485,6 +1499,13 @@ void DebugRayTracingCommandEncoder::bindPipeline( *outRootObject = &commandBuffer->rootObject; } +Result DebugRayTracingCommandEncoder::bindPipelineWithRootObject( + IPipelineState* state, IShaderObject* rootObject) +{ + SLANG_GFX_API_FUNC; + return baseObject->bindPipelineWithRootObject(getInnerObj(state), getInnerObj(rootObject)); +} + void DebugRayTracingCommandEncoder::dispatchRays( uint32_t rayGenShaderIndex, IShaderTable* shaderTable, @@ -1767,12 +1788,6 @@ Result DebugShaderObject::getCurrentVersion( return SLANG_OK; } -Result DebugShaderObject::copyFrom(IShaderObject* other, ITransientResourceHeap* transientHeap) -{ - SLANG_GFX_API_FUNC; - return baseObject->copyFrom(getInnerObj(other), getInnerObj(transientHeap)); -} - const void* DebugShaderObject::getRawData() { SLANG_GFX_API_FUNC; -- cgit v1.2.3