diff options
author | Dave Airlie <[email protected]> | 2012-11-03 20:51:45 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2012-11-09 10:29:26 +1000 |
commit | 309fda2fb28dfe7e8b9be31806346125bef13b21 (patch) | |
tree | 97259d4e5a5a0971dc13d1e4e493916c066c9ce0 /src/gallium/auxiliary/tgsi/tgsi_exec.h | |
parent | 8c0ccce30038f5d28e74f7f4b5b5c0bbd8ac6dbe (diff) |
softpipe: add ARB_texture_cube_map_array support (v1.1)
This adds support to the softpipe texture sampler and tgsi exec.
In order to handle the extra input to the texture sampling,
I've had to expand the interfaces to take a c1 value for storing
the texture compare value for the TEX2 case.
v1.1: add comments (Brian)
Reviewed-by: Brian Paul <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_exec.h')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_exec.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.h b/src/gallium/auxiliary/tgsi/tgsi_exec.h index 0ecb4e952bb..fc1ee09abf3 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.h +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.h @@ -100,11 +100,24 @@ enum tgsi_sampler_control { struct tgsi_sampler { /** Get samples for four fragments in a quad */ + /* this interface contains 5 sets of channels that vary + * depending on the sampler. + * s - the first texture coordinate for sampling. + * t - the second texture coordinate for sampling - unused for 1D, + layer for 1D arrays. + * p - the third coordinate for sampling for 3D, cube, cube arrays, + * layer for 2D arrays. Compare value for 1D/2D shadows. + * c0 - lod value for lod variants, compare value for shadow cube + * and shadow 2d arrays. + * c1 - cube array only - lod for cube map arrays + * compare for shadow cube map arrays. + */ void (*get_samples)(struct tgsi_sampler *sampler, const float s[TGSI_QUAD_SIZE], const float t[TGSI_QUAD_SIZE], const float p[TGSI_QUAD_SIZE], const float c0[TGSI_QUAD_SIZE], + const float c1[TGSI_QUAD_SIZE], enum tgsi_sampler_control control, float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE]); void (*get_dims)(struct tgsi_sampler *sampler, int level, |