diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2011-02-25 14:45:33 -0800 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2011-08-23 11:16:30 -0700 |
commit | 1e3bcbdf31f09666ba358f35ff9486faee3642ca (patch) | |
tree | 39562690d676bc99140a67492219475215d0c0bb /src/glsl/ir_hv_accept.cpp | |
parent | 8f26b59f53d6d80bf7d3c39a4dd3c438a2c305a4 (diff) | |
download | external_mesa3d-1e3bcbdf31f09666ba358f35ff9486faee3642ca.zip external_mesa3d-1e3bcbdf31f09666ba358f35ff9486faee3642ca.tar.gz external_mesa3d-1e3bcbdf31f09666ba358f35ff9486faee3642ca.tar.bz2 |
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 <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/glsl/ir_hv_accept.cpp')
-rw-r--r-- | src/glsl/ir_hv_accept.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/glsl/ir_hv_accept.cpp b/src/glsl/ir_hv_accept.cpp index 4a607dc..d33fc85 100644 --- a/src/glsl/ir_hv_accept.cpp +++ b/src/glsl/ir_hv_accept.cpp @@ -171,9 +171,11 @@ ir_texture::accept(ir_hierarchical_visitor *v) if (s != visit_continue) return (s == visit_continue_with_parent) ? visit_continue : s; - s = this->coordinate->accept(v); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; + if (this->coordinate) { + s = this->coordinate->accept(v); + if (s != visit_continue) + return (s == visit_continue_with_parent) ? visit_continue : s; + } if (this->projector) { s = this->projector->accept(v); @@ -203,6 +205,7 @@ ir_texture::accept(ir_hierarchical_visitor *v) break; case ir_txl: case ir_txf: + case ir_txs: s = this->lod_info.lod->accept(v); if (s != visit_continue) return (s == visit_continue_with_parent) ? visit_continue : s; |