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.
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user