diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2011-01-08 23:49:23 -0800 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2011-01-31 11:10:59 -0800 |
commit | c5a27b5939427bdc95c926b450ed3de1ff4baafb (patch) | |
tree | ed0518338cbec7badc6a699a94167dbec5248429 /src/glsl/ir_print_visitor.cpp | |
parent | 60c8e91c795dc604c08977d5773f96a4de8e402b (diff) |
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.
Diffstat (limited to 'src/glsl/ir_print_visitor.cpp')
-rw-r--r-- | src/glsl/ir_print_visitor.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/glsl/ir_print_visitor.cpp b/src/glsl/ir_print_visitor.cpp index d0373cb631..630850048f 100644 --- a/src/glsl/ir_print_visitor.cpp +++ b/src/glsl/ir_print_visitor.cpp @@ -192,7 +192,15 @@ void ir_print_visitor::visit(ir_texture *ir) ir->coordinate->accept(this); - printf(" (%d %d %d) ", ir->offsets[0], ir->offsets[1], ir->offsets[2]); + printf(" "); + + if (ir->offset != NULL) { + ir->offset->accept(this); + } else { + printf("0"); + } + + printf(" "); if (ir->op != ir_txf) { if (ir->projector) |