struct gl_shader **shader_list,
unsigned num_shaders)
{
- linked_shader->info.redeclares_gl_fragcoord = false;
+ bool redeclares_gl_fragcoord = false;
linked_shader->info.uses_gl_fragcoord = false;
linked_shader->info.origin_upper_left = false;
linked_shader->info.pixel_center_integer = false;
* it must be redeclared in all the fragment shaders in that program
* that have a static use gl_FragCoord."
*/
- if ((linked_shader->info.redeclares_gl_fragcoord
- && !shader->info.redeclares_gl_fragcoord
- && shader->info.uses_gl_fragcoord)
- || (shader->info.redeclares_gl_fragcoord
- && !linked_shader->info.redeclares_gl_fragcoord
- && linked_shader->info.uses_gl_fragcoord)) {
+ if ((redeclares_gl_fragcoord && !shader->redeclares_gl_fragcoord &&
+ shader->info.uses_gl_fragcoord)
+ || (shader->redeclares_gl_fragcoord && !redeclares_gl_fragcoord &&
+ linked_shader->info.uses_gl_fragcoord)) {
linker_error(prog, "fragment shader defined with conflicting "
"layout qualifiers for gl_FragCoord\n");
}
* "All redeclarations of gl_FragCoord in all fragment shaders in a
* single program must have the same set of qualifiers."
*/
- if (linked_shader->info.redeclares_gl_fragcoord &&
- shader->info.redeclares_gl_fragcoord &&
+ if (redeclares_gl_fragcoord && shader->redeclares_gl_fragcoord &&
(shader->info.origin_upper_left !=
linked_shader->info.origin_upper_left ||
shader->info.pixel_center_integer !=
* are multiple redeclarations, all the fields except uses_gl_fragcoord
* are already known to be the same.
*/
- if (shader->info.redeclares_gl_fragcoord ||
- shader->info.uses_gl_fragcoord) {
- linked_shader->info.redeclares_gl_fragcoord =
- shader->info.redeclares_gl_fragcoord;
+ if (shader->redeclares_gl_fragcoord || shader->info.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;