X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fsoftpipe%2Fsp_texture.c;h=e1ea5df24ca420a1dbe836cf8a9ae597c855c2dc;hb=525921ed51176255474c73adacfc6801a7bf2783;hp=c2df71e41a520af50882868398cf7b5df33aeaac;hpb=3d29e75a5f59639c3b9dfed26cd41ab13c0d60fc;p=mesa.git 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;