summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_clone.cpp
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2012-04-25 14:59:25 -0700
committerEric Anholt <eric@anholt.net>2012-05-04 14:00:32 -0700
commit6508b0b9b0981662b9ae5bc559b4a6be524f7b86 (patch)
treee302a3b59f1962f6c68a0e8020f35334f2278056 /src/glsl/ir_clone.cpp
parentb7932e183c15a224adc4b04835f82f3c867a4a24 (diff)
downloadexternal_mesa3d-6508b0b9b0981662b9ae5bc559b4a6be524f7b86.zip
external_mesa3d-6508b0b9b0981662b9ae5bc559b4a6be524f7b86.tar.gz
external_mesa3d-6508b0b9b0981662b9ae5bc559b4a6be524f7b86.tar.bz2
glsl: Always copy the index when cloning a variable.
The index is also used for GL_ARB_blend_func_extended. Cloning in i965 was dropping a non-ARB_explicit_attrib_location index. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/glsl/ir_clone.cpp')
-rw-r--r--src/glsl/ir_clone.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/glsl/ir_clone.cpp b/src/glsl/ir_clone.cpp
index 5a7a71c..5046ac3 100644
--- a/src/glsl/ir_clone.cpp
+++ b/src/glsl/ir_clone.cpp
@@ -53,6 +53,7 @@ ir_variable::clone(void *mem_ctx, struct hash_table *ht) const
var->invariant = this->invariant;
var->interpolation = this->interpolation;
var->location = this->location;
+ var->index = this->index;
var->warn_extension = this->warn_extension;
var->origin_upper_left = this->origin_upper_left;
var->pixel_center_integer = this->pixel_center_integer;
@@ -72,12 +73,6 @@ ir_variable::clone(void *mem_ctx, struct hash_table *ht) const
sizeof(this->state_slots[0]) * var->num_state_slots);
}
- if (this->explicit_location)
- var->location = this->location;
-
- if (this->explicit_index)
- var->index = this->index;
-
if (this->constant_value)
var->constant_value = this->constant_value->clone(mem_ctx, ht);