aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 673c0f6b67a..00799b4a872 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -123,6 +123,7 @@ struct inout_decl {
enum glsl_interp_mode interp;
enum glsl_base_type base_type;
ubyte usage_mask; /* GLSL-style usage-mask, i.e. single bit per double */
+ bool invariant;
};
static struct inout_decl *
@@ -2508,6 +2509,8 @@ glsl_to_tgsi_visitor::visit(ir_dereference_variable *ir)
unsigned num_components;
num_outputs++;
+ decl->invariant = var->data.invariant;
+
if (type_without_array->is_64bit())
component = component / 2;
if (type_without_array->vector_elements)
@@ -6443,14 +6446,15 @@ st_translate_program(
(enum tgsi_semantic) outputSemanticName[slot],
outputSemanticIndex[slot],
decl->gs_out_streams,
- slot, tgsi_usage_mask, decl->array_id, decl->size);
-
+ slot, tgsi_usage_mask, decl->array_id, decl->size, decl->invariant);
+ dst.Invariant = decl->invariant;
for (unsigned j = 0; j < decl->size; ++j) {
if (t->outputs[slot + j].File != TGSI_FILE_OUTPUT) {
/* The ArrayID is set up in dst_register */
t->outputs[slot + j] = dst;
t->outputs[slot + j].ArrayID = 0;
t->outputs[slot + j].Index += j;
+ t->outputs[slot + j].Invariant = decl->invariant;
}
}
}