summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe/sp_texture.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2011-01-25 20:27:10 -0700
committerBrian Paul <brianp@vmware.com>2011-01-25 20:27:10 -0700
commit779e9cb658dba4ef44fae7e8aa62409f7227f46c (patch)
tree2ef0ef43f345ea86f00fda5762b2b43f0c1c65f4 /src/gallium/drivers/softpipe/sp_texture.c
parent9b56a2cb626b254bcb7b7202e6babd1b5570208f (diff)
softpipe: support for 1D/2D texture arrays
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_texture.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_texture.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/softpipe/sp_texture.c b/src/gallium/drivers/softpipe/sp_texture.c
index 509d9982b1..2daed2022e 100644
--- a/src/gallium/drivers/softpipe/sp_texture.c
+++ b/src/gallium/drivers/softpipe/sp_texture.c
@@ -227,9 +227,13 @@ 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_3D) {
+ spr->base.target == PIPE_TEXTURE_3D ||
+ spr->base.target == PIPE_TEXTURE_2D_ARRAY) {
offset += layer * nblocksy * spr->stride[level];
}
+ else if (spr->base.target == PIPE_TEXTURE_1D_ARRAY) {
+ offset += layer * spr->stride[level];
+ }
else {
assert(layer == 0);
}