From 7708d205cb186f2b95d8daa2d8e0c655488fc34a Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 28 Sep 2022 10:40:47 -0700 Subject: Fix gfx debug layer crashes. (#2416) Co-authored-by: Yong He --- tools/gfx/debug-layer/debug-command-encoder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/gfx/debug-layer/debug-command-encoder.cpp') diff --git a/tools/gfx/debug-layer/debug-command-encoder.cpp b/tools/gfx/debug-layer/debug-command-encoder.cpp index c2d146a8b..b8b005338 100644 --- a/tools/gfx/debug-layer/debug-command-encoder.cpp +++ b/tools/gfx/debug-layer/debug-command-encoder.cpp @@ -30,7 +30,7 @@ Result DebugComputeCommandEncoder::bindPipeline( { SLANG_GFX_API_FUNC; - auto innerState = static_cast(state)->baseObject; + auto innerState = getInnerObj(state); IShaderObject* innerRootObject = nullptr; commandBuffer->rootObject.reset(); auto result = baseObject->bindPipeline(innerState, &innerRootObject); @@ -72,7 +72,7 @@ Result DebugRenderCommandEncoder::bindPipeline( { SLANG_GFX_API_FUNC; - auto innerState = static_cast(state)->baseObject; + auto innerState = getInnerObj(state); IShaderObject* innerRootObject = nullptr; commandBuffer->rootObject.reset(); auto result = baseObject->bindPipeline(innerState, &innerRootObject); -- cgit v1.2.3