#include <RadientTesseraMaterialCache.hpp>
Public Member Functions | |
| RadientTesseraMaterialResolveResult | Resolve (IThreadPool &ThreadPool, IRadientMaterialAsset *pMaterial) |
| RADIENT_STATUS | PrepareMaterialBuffer (IRenderDevice *pDevice, IDeviceContext *pContext) |
| RADIENT_STATUS | Prepare (Uint32 TextureVersion, const ResolveTextureSRVCallbackType &ResolveTextureSRV, const CreateSRBCallbackType &CreateSRB) |
| RADIENT_STATUS | Prepare (Uint32 TextureVersion, Uint32 MaterialBufferVersion, Uint64 MaterialBufferGeneration, const ResolveTextureSRVCallbackType &ResolveTextureSRV, const CreateSRBCallbackType &CreateSRB) |
Cache of Tessera material binding data. Resolve() schedules at most one processing task for each material and texture-flag configuration. The cache owns the logical SRB entries and prepares their GPU SRBs on the render thread.
| RADIENT_STATUS Diligent::RadientTesseraMaterialCache::Prepare | ( | Uint32 | TextureVersion, |
| const ResolveTextureSRVCallbackType & | ResolveTextureSRV, | ||
| const CreateSRBCallbackType & | CreateSRB ) |
Creates pending material SRBs and refreshes existing SRBs after texture resources change. This method uses the material buffer snapshot owned by this cache and must only be called from the render thread.
| RADIENT_STATUS Diligent::RadientTesseraMaterialCache::Prepare | ( | Uint32 | TextureVersion, |
| Uint32 | MaterialBufferVersion, | ||
| Uint64 | MaterialBufferGeneration, | ||
| const ResolveTextureSRVCallbackType & | ResolveTextureSRV, | ||
| const CreateSRBCallbackType & | CreateSRB ) |
Testing-only overload that supplies a synthetic material buffer snapshot. Production code must use the overload above so the snapshot always comes from the cache-owned material buffer.
| RADIENT_STATUS Diligent::RadientTesseraMaterialCache::PrepareMaterialBuffer | ( | IRenderDevice * | pDevice, |
| IDeviceContext * | pContext ) |
Creates or grows the shared material buffer and uploads worker-produced material records. This method must be called from the render thread.
| RadientTesseraMaterialResolveResult Diligent::RadientTesseraMaterialCache::Resolve | ( | IThreadPool & | ThreadPool, |
| IRadientMaterialAsset * | pMaterial ) |
Returns or schedules Tessera data for the material. This method obtains the immutable render data from the asset and must be called from the render thread. Material PSO flags are derived by the worker task.