summaryrefslogtreecommitdiffstats
path: root/src/glsl/link_varyings.cpp
diff options
context:
space:
mode:
authorChris Forbes <[email protected]>2013-11-29 21:26:10 +1300
committerChris Forbes <[email protected]>2013-12-07 17:14:58 +1300
commit51c5fc85e11858b11cf2a3c89ff8052fbc67faab (patch)
treecdeccbdd94495f94a7977488c908932615d10a9d /src/glsl/link_varyings.cpp
parent51aa15aca2bf5764b8cd62bbf2329eda40f7a859 (diff)
glsl: Add ir support for `sample` qualifier; adjust compiler and linker
Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/glsl/link_varyings.cpp')
-rw-r--r--src/glsl/link_varyings.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp
index be36b5f8f6b..d2a4fc82d3c 100644
--- a/src/glsl/link_varyings.cpp
+++ b/src/glsl/link_varyings.cpp
@@ -105,6 +105,18 @@ cross_validate_types_and_qualifiers(struct gl_shader_program *prog,
return;
}
+ if (input->sample != output->sample) {
+ linker_error(prog,
+ "%s shader output `%s' %s sample qualifier, "
+ "but %s shader input %s sample qualifier\n",
+ _mesa_glsl_shader_target_name(producer_type),
+ output->name,
+ (output->sample) ? "has" : "lacks",
+ _mesa_glsl_shader_target_name(consumer_type),
+ (input->sample) ? "has" : "lacks");
+ return;
+ }
+
if (input->invariant != output->invariant) {
linker_error(prog,
"%s shader output `%s' %s invariant qualifier, "
@@ -753,10 +765,12 @@ varying_matches::record(ir_variable *producer_var, ir_variable *consumer_var)
* requirement by changing the interpolation type to flat here.
*/
producer_var->centroid = false;
+ producer_var->sample = false;
producer_var->interpolation = INTERP_QUALIFIER_FLAT;
if (consumer_var) {
consumer_var->centroid = false;
+ consumer_var->sample = false;
consumer_var->interpolation = INTERP_QUALIFIER_FLAT;
}
}