diff options
author | Brian Paul <[email protected]> | 2011-01-25 20:27:10 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-01-25 20:27:10 -0700 |
commit | 779e9cb658dba4ef44fae7e8aa62409f7227f46c (patch) | |
tree | 2ef0ef43f345ea86f00fda5762b2b43f0c1c65f4 /src/gallium/drivers/softpipe/sp_texture.c | |
parent | 9b56a2cb626b254bcb7b7202e6babd1b5570208f (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.c | 6 |
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 509d9982b17..2daed2022e9 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); } |