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:
Kenneth Graunke
2011-01-08 23:49:23 -08:00
parent 60c8e91c79
commit c5a27b5939
8 changed files with 42 additions and 29 deletions

View File

@@ -53,6 +53,7 @@ ir_rvalue_visitor::visit_leave(ir_texture *ir)
handle_rvalue(&ir->coordinate);
handle_rvalue(&ir->projector);
handle_rvalue(&ir->shadow_comparitor);
handle_rvalue(&ir->offset);
switch (ir->op) {
case ir_tex: