case MESA_SHADER_FRAGMENT:
shader->redeclares_gl_fragcoord = state->fs_redeclares_gl_fragcoord;
- shader->info.uses_gl_fragcoord = state->fs_uses_gl_fragcoord;
+ shader->uses_gl_fragcoord = state->fs_uses_gl_fragcoord;
shader->info.pixel_center_integer = state->fs_pixel_center_integer;
shader->info.origin_upper_left = state->fs_origin_upper_left;
shader->ARB_fragment_coord_conventions_enable =
unsigned num_shaders)
{
bool redeclares_gl_fragcoord = false;
- linked_shader->info.uses_gl_fragcoord = false;
+ bool uses_gl_fragcoord = false;
linked_shader->info.origin_upper_left = false;
linked_shader->info.pixel_center_integer = false;
* that have a static use gl_FragCoord."
*/
if ((redeclares_gl_fragcoord && !shader->redeclares_gl_fragcoord &&
- shader->info.uses_gl_fragcoord)
+ shader->uses_gl_fragcoord)
|| (shader->redeclares_gl_fragcoord && !redeclares_gl_fragcoord &&
- linked_shader->info.uses_gl_fragcoord)) {
+ uses_gl_fragcoord)) {
linker_error(prog, "fragment shader defined with conflicting "
"layout qualifiers for gl_FragCoord\n");
}
* are multiple redeclarations, all the fields except uses_gl_fragcoord
* are already known to be the same.
*/
- if (shader->redeclares_gl_fragcoord || shader->info.uses_gl_fragcoord) {
+ if (shader->redeclares_gl_fragcoord || shader->uses_gl_fragcoord) {
redeclares_gl_fragcoord = shader->redeclares_gl_fragcoord;
- linked_shader->info.uses_gl_fragcoord =
- linked_shader->info.uses_gl_fragcoord ||
- shader->info.uses_gl_fragcoord;
+ uses_gl_fragcoord |= shader->uses_gl_fragcoord;
linked_shader->info.origin_upper_left =
shader->info.origin_upper_left;
linked_shader->info.pixel_center_integer =
*/
struct gl_shader_info
{
- bool uses_gl_fragcoord;
bool PostDepthCoverage;
bool InnerCoverage;
bool ARB_fragment_coord_conventions_enable;
bool redeclares_gl_fragcoord;
+ bool uses_gl_fragcoord;
struct gl_shader_info info;
};