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>
This commit is contained in:
Kenneth Graunke
2011-02-25 14:45:33 -08:00
parent 8f26b59f53
commit 1e3bcbdf31
11 changed files with 65 additions and 36 deletions
+3 -1
View File
@@ -222,7 +222,8 @@ ir_texture::clone(void *mem_ctx, struct hash_table *ht) const
new_tex->type = this->type;
new_tex->sampler = this->sampler->clone(mem_ctx, ht);
new_tex->coordinate = this->coordinate->clone(mem_ctx, ht);
if (this->coordinate)
new_tex->coordinate = this->coordinate->clone(mem_ctx, ht);
if (this->projector)
new_tex->projector = this->projector->clone(mem_ctx, ht);
if (this->shadow_comparitor) {
@@ -240,6 +241,7 @@ ir_texture::clone(void *mem_ctx, struct hash_table *ht) const
break;
case ir_txl:
case ir_txf:
case ir_txs:
new_tex->lod_info.lod = this->lod_info.lod->clone(mem_ctx, ht);
break;
case ir_txd: