summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/glsl_parser_extras.cpp2
-rw-r--r--src/glsl/linker.cpp7
2 files changed, 8 insertions, 1 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index 600658d9788..8f09cc7293a 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -1408,6 +1408,8 @@ set_shader_inout_layout(struct gl_shader *shader,
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:
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index 9a018774f80..a1bae297eaa 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -1210,7 +1210,8 @@ link_fs_input_layout_qualifiers(struct gl_shader_program *prog,
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++) {
@@ -2249,6 +2250,7 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
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.
*/
@@ -2275,6 +2277,9 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
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]++;