Vulkan rules relaxed for glslang C interface

- Added vulkan_rules_relaxed flag to glslang_input_t to turn on Vulkan
  rules relaxed during shader creation.
This commit is contained in:
Hai Nguyen 2021-11-30 04:55:25 -05:00
parent febbeb4f83
commit b8dfe1348a
2 changed files with 5 additions and 0 deletions

View File

@ -343,6 +343,10 @@ GLSLANG_EXPORT glslang_shader_t* glslang_shader_create(const glslang_input_t* in
shader->shader->setEnvTarget(c_shader_target_language(input->target_language),
c_shader_target_language_version(input->target_language_version));
if (input->vulkan_rules_relaxed) {
shader->shader->setEnvInputVulkanRulesRelaxed();
}
return shader;
}

View File

@ -166,6 +166,7 @@ typedef struct glslang_input_s {
glslang_profile_t default_profile;
int force_default_version_and_profile;
int forward_compatible;
int vulkan_rules_relaxed;
glslang_messages_t messages;
const glslang_resource_t* resource;
} glslang_input_t;