diff options
author | Kenneth Graunke <[email protected]> | 2011-01-08 23:49:23 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2011-01-31 11:10:59 -0800 |
commit | c5a27b5939427bdc95c926b450ed3de1ff4baafb (patch) | |
tree | ed0518338cbec7badc6a699a94167dbec5248429 /src/glsl/ir_hv_accept.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_hv_accept.cpp')
-rw-r--r-- | src/glsl/ir_hv_accept.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glsl/ir_hv_accept.cpp b/src/glsl/ir_hv_accept.cpp index be8b36a7cf8..4a607dc8749 100644 --- a/src/glsl/ir_hv_accept.cpp +++ b/src/glsl/ir_hv_accept.cpp @@ -187,6 +187,12 @@ ir_texture::accept(ir_hierarchical_visitor *v) return (s == visit_continue_with_parent) ? visit_continue : s; } + if (this->offset) { + s = this->offset->accept(v); + if (s != visit_continue) + return (s == visit_continue_with_parent) ? visit_continue : s; + } + switch (this->op) { case ir_tex: break; |