Add ShaderProfileFeatures for more expendable shader feature sets

This commit is contained in:
Wojtek Figat
2026-03-04 16:55:04 +01:00
parent aff8090adb
commit ceebc68d18
12 changed files with 121 additions and 49 deletions

View File

@@ -152,20 +152,14 @@ bool ShadersCompilation::Compile(ShaderCompilationOptions& options)
options.SourceLength--;
const DateTime startTime = DateTime::NowUTC();
const FeatureLevel featureLevel = RenderTools::GetFeatureLevel(options.Profile);
// Process shader source to collect metadata
ShaderMeta meta;
if (ShaderProcessing::Parser::Process(options.TargetName, options.Source, options.SourceLength, options.Macros, featureLevel, &meta))
if (ShaderProcessing::Parser::Process(options.TargetName, options.Source, options.SourceLength, options.Macros, options.Profile, &meta))
{
LOG(Warning, "Failed to parse source code.");
return true;
}
const int32 shadersCount = meta.GetShadersCount();
if (shadersCount == 0 && featureLevel > FeatureLevel::ES2)
{
LOG(Warning, "Shader has no valid functions.");
}
// Perform actual compilation
bool result;