Class EffectCompilerCache
Checks if an effect has already been compiled in its cache before deferring to a real IEffectCompiler.
[DataSerializerGlobal(null, typeof(KeyValuePair<HashSourceCollection, EffectBytecode>), DataSerializerGenericMode.None, false, false)]
public class EffectCompilerCache : EffectCompilerChain, IReferencable, IEffectCompiler, IDisposable
- Inheritance
-
EffectCompilerCache
- Implements
- Inherited Members
- Extension Methods
Constructors
EffectCompilerCache(EffectCompilerBase, DatabaseFileProvider, TaskSchedulerSelector)
public EffectCompilerCache(EffectCompilerBase compiler, DatabaseFileProvider database, TaskSchedulerSelector taskSchedulerSelector = null)
Parameters
compiler
EffectCompilerBasedatabase
DatabaseFileProvidertaskSchedulerSelector
TaskSchedulerSelector
Properties
CompileEffectAsynchronously
public bool CompileEffectAsynchronously { get; set; }
Property Value
CurrentCache
If we have to compile a new shader, what kind of cache are we building?
public EffectBytecodeCacheLoadSource CurrentCache { get; set; }
Property Value
Methods
Compile(ShaderMixinSource, EffectCompilerParameters, CompilerParameters)
Compiles the ShaderMixinSource into a platform bytecode.
public override TaskOrResult<EffectBytecodeCompilerResult> Compile(ShaderMixinSource mixin, EffectCompilerParameters effectParameters, CompilerParameters compilerParameters)
Parameters
mixin
ShaderMixinSourceeffectParameters
EffectCompilerParameterscompilerParameters
CompilerParameters
Returns
- TaskOrResult<EffectBytecodeCompilerResult>
The platform-dependent bytecode.
ResetCache(HashSet<string>)
Remove cached files for modified shaders
public override void ResetCache(HashSet<string> modifiedShaders)