diff --git a/3rdparty/glsl-optimizer/src/glsl/builtin_functions.cpp b/3rdparty/glsl-optimizer/src/glsl/builtin_functions.cpp index ee85b44b..c7931fab 100644 --- a/3rdparty/glsl-optimizer/src/glsl/builtin_functions.cpp +++ b/3rdparty/glsl-optimizer/src/glsl/builtin_functions.cpp @@ -172,7 +172,8 @@ es_lod_exists_in_stage(const _mesa_glsl_parse_state *state) * is enabled. */ return - state->stage == MESA_SHADER_FRAGMENT && +// BK - EXT_shader_texture_lod is available in vertex and fragment shaders. +// state->stage == MESA_SHADER_FRAGMENT && state->es_shader && state->is_version(110, 100) && state->EXT_shader_texture_lod_enable; diff --git a/3rdparty/glsl-optimizer/src/glsl/builtin_variables.cpp b/3rdparty/glsl-optimizer/src/glsl/builtin_variables.cpp index e52ac1c9..91beeb0a 100644 --- a/3rdparty/glsl-optimizer/src/glsl/builtin_variables.cpp +++ b/3rdparty/glsl-optimizer/src/glsl/builtin_variables.cpp @@ -949,6 +949,13 @@ builtin_variable_generator::generate_fs_special_vars() var->enable_extension_warning("GL_EXT_shader_framebuffer_fetch"); } + { + // BK - gl_PrimitiveID + ir_variable *var; + var = add_output(VARYING_SLOT_PRIMITIVE_ID, int_t, "gl_PrimitiveID", glsl_precision_high); + var->data.interpolation = INTERP_QUALIFIER_FLAT; + } + if (state->ARB_sample_shading_enable) { add_system_value(SYSTEM_VALUE_SAMPLE_ID, int_t, "gl_SampleID", glsl_precision_high); add_system_value(SYSTEM_VALUE_SAMPLE_POS, vec2_t, "gl_SamplePosition", glsl_precision_high);