diff options
author | Brian Paul <[email protected]> | 2016-03-30 16:54:08 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-03-31 09:48:00 -0600 |
commit | 9076e049340db0c55f57abb4ee9bbaffba61d45d (patch) | |
tree | f2da10d70e478471028cf0c53d1399e27f2c47ba /src/gallium/auxiliary/tgsi/tgsi_util.h | |
parent | 9d7cd439880d9334d21ed099efa15ccf8b709748 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_util.h')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_util.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_util.h b/src/gallium/auxiliary/tgsi/tgsi_util.h index 6175d95fcd6..3a049ee5667 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_util.h +++ b/src/gallium/auxiliary/tgsi/tgsi_util.h @@ -80,7 +80,10 @@ struct tgsi_src_register tgsi_util_get_src_from_ind(const struct tgsi_ind_register *reg); int -tgsi_util_get_texture_coord_dim(int tgsi_tex, int *shadow_or_sample); +tgsi_util_get_texture_coord_dim(unsigned tgsi_tex); + +int +tgsi_util_get_shadow_ref_src_index(unsigned tgsi_tex); boolean tgsi_is_shadow_target(unsigned target); |