Explicitly specify GLSL version.

This commit is contained in:
Chinmay Garde 2021-05-14 13:43:20 -07:00 committed by Dan Field
parent ac2dcd68f5
commit 73f01575b6

View File

@ -222,9 +222,11 @@ Compiler::Compiler(const fml::Mapping& source_mapping,
options.SetOptimizationLevel(
shaderc_optimization_level::shaderc_optimization_level_zero);
// Expects GLSL 4.60 (Core Profile).
// https://www.khronos.org/registry/OpenGL/specs/gl/GLSLangSpec.4.60.pdf
options.SetSourceLanguage(
shaderc_source_language::shaderc_source_language_glsl);
options.SetForcedVersionProfile(450, shaderc_profile::shaderc_profile_core);
options.SetForcedVersionProfile(460, shaderc_profile::shaderc_profile_core);
options.SetTargetEnvironment(
shaderc_target_env::shaderc_target_env_vulkan,
shaderc_env_version::shaderc_env_version_vulkan_1_1);