From e67af5b1a3993529c702ff2924dea11fd1017d2e Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 2 Jun 2021 16:58:25 -0700 Subject: Various Fixes to gfx, reflection and emit. (#1867) * Various Fixes to gfx, reflection and emit. - Fix GLSL emit to properly output `*bitsTo*` functions for `IRBitCast` insts. - Add line directive mode setting for `ISession`. - Extend `TypeLayout::getElementStride` to handle `VectorType` case. - Fix `IDevice::readBufferResource` 's D3D12 implementation to copy only the requested bytes out. - Fix `render-test` to use the `ISession` from `gfx` instead of creating its own `ISession` to make sure `gfx` and `render-test` agree on WitnessTable and RTTI IDs. - Extend `render-test` to support filling vector and matrix values in the new `set x = ...` TEST_INPUT syntax. - Add a `dynamic-dispatch-15` test case to make sure packing / unpacking works correctly across all targets, and to make sure render-test's RTTI/WitnessTable ID filling logic is correct for non-trivial cases. * Remove default-major test * Fix cyclic reference in `ExtendedTypeLayout`. * Move `lineDirectiveMode` setting to `TargetDesc`. Add `structureSize` to `TargetDesc` and `SessionDesc` for future binary compatibility. * Cleanup. Co-authored-by: Yong He --- tools/render-test/slang-support.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tools/render-test/slang-support.h') diff --git a/tools/render-test/slang-support.h b/tools/render-test/slang-support.h index 3404aac1d..da1f379fd 100644 --- a/tools/render-test/slang-support.h +++ b/tools/render-test/slang-support.h @@ -67,10 +67,10 @@ struct ShaderCompilerUtil IShaderProgram::Desc desc = {}; /// Compile request that owns the lifetime of compiled kernel code. - SlangCompileRequest* m_requestForKernels = nullptr; + ComPtr m_requestForKernels = nullptr; /// Compile request that owns the lifetime of reflection information. - SlangCompileRequest* m_extraRequestForReflection = nullptr; + ComPtr m_extraRequestForReflection = nullptr; SlangCompileRequest* getRequestForKernels() const { return m_requestForKernels; } SlangCompileRequest* getRequestForReflection() const { return m_extraRequestForReflection ? m_extraRequestForReflection : m_requestForKernels; } @@ -86,12 +86,12 @@ struct ShaderCompilerUtil Slang::String sourcePath; }; - static SlangResult compileWithLayout(SlangSession* session, const Options& options, const ShaderCompilerUtil::Input& input, OutputAndLayout& output); + static SlangResult compileWithLayout(slang::ISession* session, const Options& options, const ShaderCompilerUtil::Input& input, OutputAndLayout& output); static SlangResult readSource(const Slang::String& inSourcePath, Slang::List& outSourceText); - static SlangResult _compileProgramImpl(SlangSession* session, const Options& options, const Input& input, const ShaderCompileRequest& request, Output& out); - static SlangResult compileProgram(SlangSession* session, const Options& options, const Input& input, const ShaderCompileRequest& request, Output& out); + static SlangResult _compileProgramImpl(slang::ISession* session, const Options& options, const Input& input, const ShaderCompileRequest& request, Output& out); + static SlangResult compileProgram(slang::ISession* session, const Options& options, const Input& input, const ShaderCompileRequest& request, Output& out); }; -- cgit v1.2.3