diff options
| author | Yong He <yonghe@outlook.com> | 2024-02-20 12:24:00 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-20 12:24:00 -0800 |
| commit | 4d20fd329956ac89408b1628a8291fea01bc9a6d (patch) | |
| tree | 8e62d9c1ec05142fd25d0b31073fdb56d44691b0 /tools/gfx/renderer-shared.h | |
| parent | 8e9b61e3bac69dbb37a1451b62302e688a017ced (diff) | |
Refactor compiler option representations. (#3598)
* Refactor compiler option representation.
* Fix binary compatibility.
* Add a test for specifying compiler options at link time.
* Fix binary compatibility.
* Fix binary compatibility.
* Fix backward compatibility on matrix layout.
* Fix.
* Fix.
* Fix.
* Fix gfx.
* Fix gfx.
* Fix dynamic dispatch.
* Polish.
Diffstat (limited to 'tools/gfx/renderer-shared.h')
| -rw-r--r-- | tools/gfx/renderer-shared.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/tools/gfx/renderer-shared.h b/tools/gfx/renderer-shared.h index 5c67de885..4d88f945b 100644 --- a/tools/gfx/renderer-shared.h +++ b/tools/gfx/renderer-shared.h @@ -390,6 +390,8 @@ protected: ShaderObjectContainerType m_containerType = ShaderObjectContainerType::None; public: + ComPtr<slang::ISession> m_slangSession; + ShaderObjectContainerType getContainerType() { return m_containerType; } static slang::TypeLayoutReflection* _unwrapParameterGroups( @@ -444,7 +446,7 @@ public: return m_componentID; } - void initBase(RendererBase* renderer, slang::TypeLayoutReflection* elementTypeLayout); + void initBase(RendererBase* renderer, slang::ISession* session, slang::TypeLayoutReflection* elementTypeLayout); }; class SimpleShaderObjectData @@ -495,7 +497,6 @@ protected: // The specialized shader object type. ExtendedShaderObjectType shaderObjectType = { nullptr, kInvalidComponentID }; - Result _getSpecializedShaderObjectType(ExtendedShaderObjectType* outType); slang::TypeLayoutReflection* _getElementTypeLayout() { @@ -1265,11 +1266,23 @@ public: ShaderObjectContainerType containerType, IShaderObject** outObject) SLANG_OVERRIDE; + virtual SLANG_NO_THROW Result SLANG_MCALL createShaderObject2( + slang::ISession* session, + slang::TypeReflection* type, + ShaderObjectContainerType containerType, + IShaderObject** outObject) SLANG_OVERRIDE; + virtual SLANG_NO_THROW Result SLANG_MCALL createMutableShaderObject( slang::TypeReflection* type, ShaderObjectContainerType containerType, IShaderObject** outObject) SLANG_OVERRIDE; + virtual SLANG_NO_THROW Result SLANG_MCALL createMutableShaderObject2( + slang::ISession* session, + slang::TypeReflection* type, + ShaderObjectContainerType containerType, + IShaderObject** outObject) SLANG_OVERRIDE; + virtual SLANG_NO_THROW Result SLANG_MCALL createShaderObjectFromTypeLayout( slang::TypeLayoutReflection* typeLayout, IShaderObject** outObject) override; @@ -1325,11 +1338,13 @@ public: slang::IBlob** outDiagnostics = nullptr); Result getShaderObjectLayout( + slang::ISession* session, slang::TypeReflection* type, ShaderObjectContainerType container, ShaderObjectLayoutBase** outLayout); Result getShaderObjectLayout( + slang::ISession* session, slang::TypeLayoutReflection* typeLayout, ShaderObjectLayoutBase** outLayout); @@ -1345,6 +1360,7 @@ public: virtual Result createShaderObjectLayout( + slang::ISession* session, slang::TypeLayoutReflection* typeLayout, ShaderObjectLayoutBase** outLayout) = 0; |
