summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_exec.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@gmail.com>2012-11-03 20:51:45 +1000
committerDave Airlie <airlied@redhat.com>2012-11-09 10:29:26 +1000
commit309fda2fb28dfe7e8b9be31806346125bef13b21 (patch)
tree97259d4e5a5a0971dc13d1e4e493916c066c9ce0 /src/gallium/auxiliary/tgsi/tgsi_exec.h
parent8c0ccce30038f5d28e74f7f4b5b5c0bbd8ac6dbe (diff)
downloadexternal_mesa3d-309fda2fb28dfe7e8b9be31806346125bef13b21.zip
external_mesa3d-309fda2fb28dfe7e8b9be31806346125bef13b21.tar.gz
external_mesa3d-309fda2fb28dfe7e8b9be31806346125bef13b21.tar.bz2
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 <brianp@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_exec.h')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_exec.h13
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 0ecb4e9..fc1ee09 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,