From 1e3bcbdf31f09666ba358f35ff9486faee3642ca Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 25 Feb 2011 14:45:33 -0800 Subject: glsl: Add a new ir_txs (textureSize) opcode to ir_texture. One unique aspect of TXS is that it doesn't have a coordinate. Signed-off-by: Kenneth Graunke Reviewed-by: Ian Romanick Reviewed-by: Dave Airlie --- src/glsl/ir_print_visitor.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'src/glsl/ir_print_visitor.cpp') diff --git a/src/glsl/ir_print_visitor.cpp b/src/glsl/ir_print_visitor.cpp index 518910b..ea78582 100644 --- a/src/glsl/ir_print_visitor.cpp +++ b/src/glsl/ir_print_visitor.cpp @@ -244,19 +244,21 @@ void ir_print_visitor::visit(ir_texture *ir) ir->sampler->accept(this); printf(" "); - ir->coordinate->accept(this); + if (ir->op != ir_txs) { + ir->coordinate->accept(this); - printf(" "); + printf(" "); - if (ir->offset != NULL) { - ir->offset->accept(this); - } else { - printf("0"); - } + if (ir->offset != NULL) { + ir->offset->accept(this); + } else { + printf("0"); + } - printf(" "); + printf(" "); + } - if (ir->op != ir_txf) { + if (ir->op != ir_txf && ir->op != ir_txs) { if (ir->projector) ir->projector->accept(this); else @@ -280,6 +282,7 @@ void ir_print_visitor::visit(ir_texture *ir) break; case ir_txl: case ir_txf: + case ir_txs: ir->lod_info.lod->accept(this); break; case ir_txd: -- cgit v1.1