Table of Contents

Class EffectCompilerCache

Namespace
Stride.Shaders.Compiler
Assembly
Stride.Shaders.dll

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 EffectCompilerBase
database DatabaseFileProvider
taskSchedulerSelector TaskSchedulerSelector

Properties

CompileEffectAsynchronously

public bool CompileEffectAsynchronously { get; set; }

Property Value

bool

CurrentCache

If we have to compile a new shader, what kind of cache are we building?

public EffectBytecodeCacheLoadSource CurrentCache { get; set; }

Property Value

EffectBytecodeCacheLoadSource

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 ShaderMixinSource
effectParameters EffectCompilerParameters
compilerParameters CompilerParameters

Returns

TaskOrResult<EffectBytecodeCompilerResult>

The platform-dependent bytecode.

ResetCache(HashSet<string>)

Remove cached files for modified shaders

public override void ResetCache(HashSet<string> modifiedShaders)

Parameters

modifiedShaders HashSet<string>