summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorClay John <claynjohn@gmail.com>2022-10-24 12:02:06 -0700
committerGitHub <noreply@github.com>2022-10-24 12:02:06 -0700
commitc51a42778df3239fa3e9ef23e701146675985f3c (patch)
tree60f04b3a251c2c1a27afde97595fb9215dc669a1 /modules
parent040f49ed6e71a6e7f23d763c4b56095cbf319ef7 (diff)
parentae38d7930e3912b7259badcaa705d24137e5413c (diff)
Merge pull request #67541 from RandomShaper/refactor_subgroup_ads
Let the RD driver itself expose subgroup caps
Diffstat (limited to 'modules')
-rw-r--r--modules/glslang/register_types.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/glslang/register_types.cpp b/modules/glslang/register_types.cpp
index b1c2140039..53ec0fde34 100644
--- a/modules/glslang/register_types.cpp
+++ b/modules/glslang/register_types.cpp
@@ -53,7 +53,6 @@ static Vector<uint8_t> _compile_shader_glsl(RenderingDevice::ShaderStage p_stage
};
int ClientInputSemanticsVersion = 100; // maps to, say, #define VULKAN 100
- bool check_subgroup_support = true; // assume we support subgroups
glslang::EShTargetClientVersion ClientVersion = glslang::EShTargetVulkan_1_2;
glslang::EShTargetLanguageVersion TargetVersion = glslang::EShTargetSpv_1_5;
@@ -63,7 +62,6 @@ static Vector<uint8_t> _compile_shader_glsl(RenderingDevice::ShaderStage p_stage
if (capabilities->version_major == 1 && capabilities->version_minor == 0) {
ClientVersion = glslang::EShTargetVulkan_1_0;
TargetVersion = glslang::EShTargetSpv_1_0;
- check_subgroup_support = false; // subgroups are not supported in Vulkan 1.0
} else if (capabilities->version_major == 1 && capabilities->version_minor == 1) {
ClientVersion = glslang::EShTargetVulkan_1_1;
TargetVersion = glslang::EShTargetSpv_1_3;
@@ -88,7 +86,7 @@ static Vector<uint8_t> _compile_shader_glsl(RenderingDevice::ShaderStage p_stage
shader.setEnvClient(glslang::EShClientVulkan, ClientVersion);
shader.setEnvTarget(glslang::EShTargetSpv, TargetVersion);
- if (check_subgroup_support) {
+ {
uint32_t stage_bit = 1 << p_stage;
uint32_t subgroup_in_shaders = uint32_t(p_render_device->limit_get(RD::LIMIT_SUBGROUP_IN_SHADERS));