diff options
Diffstat (limited to 'slang-gfx.h')
| -rw-r--r-- | slang-gfx.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/slang-gfx.h b/slang-gfx.h index 233d963e9..18395e3f2 100644 --- a/slang-gfx.h +++ b/slang-gfx.h @@ -2052,6 +2052,25 @@ public: 0xbe91ba6c, 0x784, 0x4308, { 0xa1, 0x0, 0x19, 0xc3, 0x66, 0x83, 0x44, 0xb2 } \ } +// These are exclusively used to track hit/miss counts for shader cache entries. Entry hit and +// miss counts specifically indicate if the file containing relevant shader code was found in +// the cache, while the general hit and miss counts indicate whether the file was both found and +// up-to-date. +class IShaderCacheStatistics : public ISlangUnknown +{ +public: + virtual SLANG_NO_THROW GfxCount SLANG_MCALL getCacheMissCount() = 0; + virtual SLANG_NO_THROW GfxCount SLANG_MCALL getCacheHitCount() = 0; + virtual SLANG_NO_THROW GfxCount SLANG_MCALL getCacheEntryDirtyCount() = 0; + + virtual SLANG_NO_THROW Result SLANG_MCALL resetCacheStatistics() = 0; +}; + +#define SLANG_UUID_IShaderCacheStatistics \ + { \ + 0x8eccc8ec, 0x5c04, 0x4a51, { 0x99, 0x75, 0x13, 0xf8, 0xfe, 0xa1, 0x59, 0xf3 } \ + } + struct DeviceInfo { DeviceType deviceType; @@ -2089,7 +2108,7 @@ public: handleMessage(DebugMessageType type, DebugMessageSource source, const char* message) = 0; }; -class IDevice: public ISlangUnknown +class IDevice : public ISlangUnknown { public: struct SlangDesc @@ -2134,6 +2153,8 @@ public: ISlangUnknown* apiCommandDispatcher = nullptr; // The slot (typically UAV) used to identify NVAPI intrinsics. If >=0 NVAPI is required. GfxIndex nvapiExtnSlot = -1; + // The root directory for the shader cache. + const char* shaderCachePath = nullptr; // The file system for loading cached shader kernels. The layer does not maintain a strong reference to the object, // instead the user is responsible for holding the object alive during the lifetime of an `IDevice`. ISlangFileSystem* shaderCacheFileSystem = nullptr; @@ -2473,7 +2494,6 @@ public: 0x715bdf26, 0x5135, 0x11eb, { 0xAE, 0x93, 0x02, 0x42, 0xAC, 0x13, 0x00, 0x02 } \ } - class IPipelineCreationAPIDispatcher : public ISlangUnknown { public: |
