OSDN Git Service

tgsi: clean up exec_tex()
authorChia-I Wu <olvaffe@gmail.com>
Tue, 7 May 2013 06:50:02 +0000 (14:50 +0800)
committerChia-I Wu <olvaffe@gmail.com>
Wed, 8 May 2013 03:00:07 +0000 (11:00 +0800)
commit61d57ec2768fde57cb3926d6757044593d6e9a08
treead7187bbf33cebf867034a76d87f25fec5a575c9
parent80857d2c8b867f6060451c14e5aff5438f5d30f7
tgsi: clean up exec_tex()

Make use of tgsi_util_get_texture_coord_dim() to replace the big switch table.

There is a subtle difference with this change.  When TXP is used with an array
texture, the layer is now also projected.  This behavior matches the TGSI doc.
Since GLSL does not allow TXP on an array texture, I am not sure which
behavior is correct or preferred.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Acked-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/tgsi/tgsi_exec.c