Add more improvements to optional tess/geo shaders

This commit is contained in:
Wojtek Figat
2024-04-04 18:35:26 +02:00
parent d12630d815
commit 84e04de23d
13 changed files with 131 additions and 39 deletions

View File

@@ -126,13 +126,17 @@ bool GPUShader::Create(MemoryReadStream& stream)
LOG(Warning, "Failed to create {} Shader program '{}' ({}).", ::ToString(type), String(initializer.Name), name);
continue;
}
GPUShaderProgram* shader = CreateGPUShaderProgram(type, initializer, cache, cacheSize, stream);
if (shader == nullptr)
{
#if !GPU_ALLOW_TESSELLATION_SHADERS
if (type == ShaderStage::Hull || type == ShaderStage::Domain)
continue;
#endif
GPUShaderProgram* shader = CreateGPUShaderProgram(type, initializer, cache, cacheSize, stream);
if (shader == nullptr)
{
#if !GPU_ALLOW_GEOMETRY_SHADERS
if (type == ShaderStage::Geometry)
continue;
#endif
LOG(Error, "Failed to create {} Shader program '{}' ({}).", ::ToString(type), String(initializer.Name), name);
return true;
}