tgsi: split tgsi_util_get_texture_coord_dim() function into two
authorBrian Paul <brianp@vmware.com>
Wed, 30 Mar 2016 22:54:08 +0000 (16:54 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 31 Mar 2016 15:48:00 +0000 (09:48 -0600)
commit9076e049340db0c55f57abb4ee9bbaffba61d45d
treef2da10d70e478471028cf0c53d1399e27f2c47ba
parent9d7cd439880d9334d21ed099efa15ccf8b709748
tgsi: split tgsi_util_get_texture_coord_dim() function into two

It was kind of overloaded, returning two different things.  Now get
the index of the shadow reference src register with a new
tgsi_util_get_shadow_ref_src_index() function.

To verify the new code, I added some temp/debug code which looped
over all TGSI_TEXTURE_x values, calling the old function and new and
checking that the returned indexes matched.

Also tested piglit "shadow" tests with softpipe/llvmpipe.
No testing of ilo and radeonsi changes.

Reviewed-by: Dave Airlie <airlied@redhat.com>
src/gallium/auxiliary/tgsi/tgsi_exec.c
src/gallium/auxiliary/tgsi/tgsi_util.c
src/gallium/auxiliary/tgsi/tgsi_util.h
src/gallium/drivers/ilo/shader/ilo_shader_fs.c
src/gallium/drivers/ilo/shader/ilo_shader_vs.c
src/gallium/drivers/radeonsi/si_shader.c