summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/softpipe/sp_texture.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2012-11-03 20:51:45 +1000
committerDave Airlie <[email protected]>2012-11-09 10:29:26 +1000
commit309fda2fb28dfe7e8b9be31806346125bef13b21 (patch)
tree97259d4e5a5a0971dc13d1e4e493916c066c9ce0 /src/gallium/drivers/softpipe/sp_texture.c
parent8c0ccce30038f5d28e74f7f4b5b5c0bbd8ac6dbe (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/drivers/softpipe/sp_texture.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_texture.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/softpipe/sp_texture.c b/src/gallium/drivers/softpipe/sp_texture.c
index b4bca076bda..9c31daa63f3 100644
--- a/src/gallium/drivers/softpipe/sp_texture.c
+++ b/src/gallium/drivers/softpipe/sp_texture.c
@@ -258,6 +258,7 @@ sp_get_tex_image_offset(const struct softpipe_resource *spr,
unsigned offset = spr->level_offset[level];
if (spr->base.target == PIPE_TEXTURE_CUBE ||
+ spr->base.target == PIPE_TEXTURE_CUBE_ARRAY ||
spr->base.target == PIPE_TEXTURE_3D ||
spr->base.target == PIPE_TEXTURE_2D_ARRAY) {
offset += layer * nblocksy * spr->stride[level];
@@ -364,6 +365,9 @@ softpipe_transfer_map(struct pipe_context *pipe,
else if (resource->target == PIPE_TEXTURE_CUBE) {
assert(box->z < 6);
}
+ else if (resource->target == PIPE_TEXTURE_CUBE_ARRAY) {
+ assert(box->z <= resource->array_size);
+ }
else {
assert(box->z + box->depth <= (u_minify(resource->depth0, level)));
}