the ShaderCompilerService handles async shader compilation (#6848)
It supports KHR_parallel_shader_compile as well as a thread pool of GL contexts. - we have a new 2-priorities queue for shader compilation - use this feature in gltfio in the ubershader case
This commit is contained in:
@@ -119,6 +119,16 @@ Material* ArchiveCache::getMaterial(const ArchiveRequirements& reqs) {
|
||||
.package(spec.package, spec.packageByteCount)
|
||||
.build(mEngine);
|
||||
}
|
||||
|
||||
// compile everything at low priority
|
||||
mMaterials[i]->compile(Material::CompilerPriorityQueue::LOW);
|
||||
|
||||
// promote variants we care about to high priority
|
||||
mMaterials[i]->compile(Material::CompilerPriorityQueue::HIGH,
|
||||
UserVariantFilterBit::DIRECTIONAL_LIGHTING |
|
||||
UserVariantFilterBit::DYNAMIC_LIGHTING |
|
||||
UserVariantFilterBit::SHADOW_RECEIVER);
|
||||
|
||||
return mMaterials[i];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user