From c5a27b5939427bdc95c926b450ed3de1ff4baafb Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sat, 8 Jan 2011 23:49:23 -0800 Subject: glsl: Change texel offsets to a single vector rvalue. Having these as actual integer values makes it difficult to implement the texture*Offset built-in functions, since the offset is actually a function parameter (which doesn't have a constant value). The original rationale was that some hardware needs these offset baked into the instruction opcode. However, at least i965 should be able to support non-constant offsets. Others should be able to rely on inlining and constant propagation. --- src/glsl/ir_clone.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/glsl/ir_clone.cpp') diff --git a/src/glsl/ir_clone.cpp b/src/glsl/ir_clone.cpp index 20a59b1e43..2c0574dc6b 100644 --- a/src/glsl/ir_clone.cpp +++ b/src/glsl/ir_clone.cpp @@ -217,8 +217,8 @@ ir_texture::clone(void *mem_ctx, struct hash_table *ht) const new_tex->shadow_comparitor = this->shadow_comparitor->clone(mem_ctx, ht); } - for (int i = 0; i < 3; i++) - new_tex->offsets[i] = this->offsets[i]; + if (this->offset != NULL) + new_tex->offset = this->offset->clone(mem_ctx, ht); switch (this->op) { case ir_tex: -- cgit v1.2.3