summaryrefslogtreecommitdiff
path: root/tools/gfx/renderer-shared.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-02-09 15:30:38 -0800
committerGitHub <noreply@github.com>2022-02-09 15:30:38 -0800
commitb8982fcf43b86c1e39dcc3dd19bff2821633eda6 (patch)
tree0d66dbf46b50e760cce4aee232bd6a020976e6fb /tools/gfx/renderer-shared.h
parent59f3fdc0a372d19ce4e989514ee3e9ecbcbf234c (diff)
Various fixes to gfx. (#2120)
* Various fixes to gfx. * Fix. * Fixes. * Fix. Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tools/gfx/renderer-shared.h')
-rw-r--r--tools/gfx/renderer-shared.h32
1 files changed, 31 insertions, 1 deletions
diff --git a/tools/gfx/renderer-shared.h b/tools/gfx/renderer-shared.h
index a23cf9dfe..e6f54ae10 100644
--- a/tools/gfx/renderer-shared.h
+++ b/tools/gfx/renderer-shared.h
@@ -973,7 +973,35 @@ public:
SLANG_COM_OBJECT_IUNKNOWN_ALL
IShaderProgram* getInterface(const Slang::Guid& guid);
- ComPtr<slang::IComponentType> slangProgram;
+ Desc desc;
+
+ Slang::ComPtr<slang::IComponentType> slangGlobalScope;
+ Slang::List<ComPtr<slang::IComponentType>> slangEntryPoints;
+
+ // Linked program when linkingStyle is GraphicsCompute, or the original global scope
+ // when linking style is RayTracing.
+ Slang::ComPtr<slang::IComponentType> linkedProgram;
+
+ // Linked program for each entry point when linkingStyle is RayTracing.
+ Slang::List<Slang::ComPtr<slang::IComponentType>> linkedEntryPoints;
+
+ void init(const IShaderProgram::Desc& desc);
+
+ bool isSpecializable()
+ {
+ if (slangGlobalScope->getSpecializationParamCount() != 0)
+ {
+ return true;
+ }
+ for (auto& entryPoint : slangEntryPoints)
+ {
+ if (entryPoint->getSpecializationParamCount() != 0)
+ {
+ return true;
+ }
+ }
+ return false;
+ }
};
class InputLayoutBase
@@ -1369,6 +1397,8 @@ public:
Slang::Dictionary<slang::TypeReflection*, Slang::RefPtr<ShaderObjectLayoutBase>> m_shaderObjectLayoutCache;
};
+bool isDepthFormat(Format format);
+
IDebugCallback*& _getDebugCallback();
IDebugCallback* _getNullDebugCallback();
inline IDebugCallback* getDebugCallback()