shader->uses_gl_fragcoord = state->fs_uses_gl_fragcoord;
shader->pixel_center_integer = state->fs_pixel_center_integer;
shader->origin_upper_left = state->fs_origin_upper_left;
+ shader->ARB_fragment_coord_conventions_enable =
+ state->ARB_fragment_coord_conventions_enable;
break;
default:
linked_shader->origin_upper_left = false;
linked_shader->pixel_center_integer = false;
- if (linked_shader->Stage != MESA_SHADER_FRAGMENT || prog->Version < 150)
+ if (linked_shader->Stage != MESA_SHADER_FRAGMENT ||
+ (prog->Version < 150 && !prog->ARB_fragment_coord_conventions_enable))
return;
for (unsigned i = 0; i < num_shaders; i++) {
ralloc_free(prog->AtomicBuffers);
prog->AtomicBuffers = NULL;
prog->NumAtomicBuffers = 0;
+ prog->ARB_fragment_coord_conventions_enable = false;
/* Separate the shaders into groups based on their type.
*/
goto done;
}
+ prog->ARB_fragment_coord_conventions_enable |=
+ prog->Shaders[i]->ARB_fragment_coord_conventions_enable;
+
gl_shader_stage shader_type = prog->Shaders[i]->Stage;
shader_list[shader_type][num_shaders[shader_type]] = prog->Shaders[i];
num_shaders[shader_type]++;
bool uses_builtin_functions;
bool uses_gl_fragcoord;
bool redeclares_gl_fragcoord;
+ bool ARB_fragment_coord_conventions_enable;
/**
* Fragment shader state from GLSL 1.50 layout qualifiers.
* \c NULL.
*/
struct gl_shader *_LinkedShaders[MESA_SHADER_STAGES];
+
+ /* True if any of the fragment shaders attached to this program use:
+ * #extension ARB_fragment_coord_conventions: enable
+ */
+ GLboolean ARB_fragment_coord_conventions_enable;
};