summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2014-09-29 10:17:15 -0600
committerBrian Paul <[email protected]>2014-09-30 12:08:49 -0600
commit59562e9ba5330cb2033757a582fe7f449140af46 (patch)
tree8120223327f809e01b5ab7b682525f5452a1b86d /src
parent3d77b80d80d3a85930ca0011a1d4f97578a36477 (diff)
softpipe: don't special case PIPE_TEXTURE_CUBE in softpipe_resource_layout()
As with the previous patch for llvmpipe. Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/softpipe/sp_texture.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/softpipe/sp_texture.c b/src/gallium/drivers/softpipe/sp_texture.c
index c2df71e41a5..e1ea5df24ca 100644
--- a/src/gallium/drivers/softpipe/sp_texture.c
+++ b/src/gallium/drivers/softpipe/sp_texture.c
@@ -68,8 +68,9 @@ softpipe_resource_layout(struct pipe_screen *screen,
nblocksy = util_format_get_nblocksy(pt->format, height);
if (pt->target == PIPE_TEXTURE_CUBE)
- slices = 6;
- else if (pt->target == PIPE_TEXTURE_3D)
+ assert(pt->array_size == 6);
+
+ if (pt->target == PIPE_TEXTURE_3D)
slices = depth;
else
slices = pt->array_size;