From ba24264275c640e0ac3732f0f5720e1f5816cded Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 25 May 2021 10:24:38 -0700 Subject: Allow overriding specialization args via `IShaderObject`. (#1854) * Allow overriding specialization args via `IShaderObject`. * Fixes. Co-authored-by: T. Foley --- tools/gfx/debug-layer.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools/gfx/debug-layer.h') diff --git a/tools/gfx/debug-layer.h b/tools/gfx/debug-layer.h index a4e201e4f..f9ecc7dfe 100644 --- a/tools/gfx/debug-layer.h +++ b/tools/gfx/debug-layer.h @@ -167,6 +167,9 @@ public: ShaderOffset const& offset, IResourceView* textureView, ISamplerState* sampler) override; + virtual SLANG_NO_THROW Result SLANG_MCALL setSpecializationArgs( + const slang::SpecializationArg* args, + uint32_t count) override; public: struct ShaderOffsetKey @@ -188,6 +191,8 @@ public: } }; Slang::String m_typeName; + slang::TypeReflection* m_slangType = nullptr; + DebugDevice* m_device; Slang::List> m_entryPoints; Slang::Dictionary> m_objects; Slang::Dictionary> m_resources; @@ -199,6 +204,8 @@ class DebugRootShaderObject : public DebugShaderObject public: virtual SLANG_NO_THROW uint32_t SLANG_MCALL addRef() override { return 1; } virtual SLANG_NO_THROW uint32_t SLANG_MCALL release() override { return 1; } + virtual SLANG_NO_THROW Result SLANG_MCALL + setSpecializationArgs(const slang::SpecializationArg* args, uint32_t count) override; }; class DebugCommandBuffer; -- cgit v1.2.3