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

@@ -9,7 +9,6 @@
#include "RenderTask.h"
#include "Engine/Content/Assets/Model.h"
#include "Engine/Content/Assets/SkinnedModel.h"
#include "Engine/Core/Log.h"
#include "Engine/Core/Math/Packed.h"
#include "Engine/Core/Math/OrientedBoundingBox.h"
#include "Engine/Engine/Time.h"
@@ -281,6 +280,24 @@ FeatureLevel RenderTools::GetFeatureLevel(ShaderProfile profile)
}
}
ShaderProfileFeatures RenderTools::GetShaderProfileFeatures(ShaderProfile profile)
{
switch (profile)
{
case ShaderProfile::DirectX_SM6:
case ShaderProfile::DirectX_SM5:
case ShaderProfile::Vulkan_SM5:
return ShaderProfileFeatures::ComputeShaders | ShaderProfileFeatures::GeometryShaders | ShaderProfileFeatures::TessellationShaders;
case ShaderProfile::PS4:
case ShaderProfile::PS5:
return ShaderProfileFeatures::ComputeShaders | ShaderProfileFeatures::GeometryShaders;
case ShaderProfile::DirectX_SM4:
return ShaderProfileFeatures::GeometryShaders;
default:
return ShaderProfileFeatures::None;
}
}
bool RenderTools::CanSupportTessellation(ShaderProfile profile)
{
switch (profile)