Fixed EXT_shader_texture_lod ESSL extension for vertex shaders.
This commit is contained in:
parent
a528554e67
commit
705b135666
2 changed files with 9 additions and 1 deletions
3rdparty/glsl-optimizer/src/glsl
|
@ -172,7 +172,8 @@ es_lod_exists_in_stage(const _mesa_glsl_parse_state *state)
|
||||||
* is enabled.
|
* is enabled.
|
||||||
*/
|
*/
|
||||||
return
|
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->es_shader &&
|
||||||
state->is_version(110, 100) &&
|
state->is_version(110, 100) &&
|
||||||
state->EXT_shader_texture_lod_enable;
|
state->EXT_shader_texture_lod_enable;
|
||||||
|
|
|
@ -949,6 +949,13 @@ builtin_variable_generator::generate_fs_special_vars()
|
||||||
var->enable_extension_warning("GL_EXT_shader_framebuffer_fetch");
|
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) {
|
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_ID, int_t, "gl_SampleID", glsl_precision_high);
|
||||||
add_system_value(SYSTEM_VALUE_SAMPLE_POS, vec2_t, "gl_SamplePosition", glsl_precision_high);
|
add_system_value(SYSTEM_VALUE_SAMPLE_POS, vec2_t, "gl_SamplePosition", glsl_precision_high);
|
||||||
|
|
Reference in a new issue