summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shader_query.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/shader_query.cpp')
-rw-r--r--src/mesa/main/shader_query.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp
index 64e68b4a26d..6712bb45fb2 100644
--- a/src/mesa/main/shader_query.cpp
+++ b/src/mesa/main/shader_query.cpp
@@ -1634,7 +1634,13 @@ validate_io(struct gl_program *producer, struct gl_program *consumer)
* Note that location mismatches are detected by the loops above that
* find the producer variable that goes with the consumer variable.
*/
- if (producer_var->interpolation != consumer_var->interpolation) {
+ unsigned producer_interpolation = producer_var->interpolation;
+ unsigned consumer_interpolation = consumer_var->interpolation;
+ if (producer_interpolation == INTERP_MODE_NONE)
+ producer_interpolation = INTERP_MODE_SMOOTH;
+ if (consumer_interpolation == INTERP_MODE_NONE)
+ consumer_interpolation = INTERP_MODE_SMOOTH;
+ if (producer_interpolation != consumer_interpolation) {
valid = false;
goto out;
}