This just covers the resource side of things, not the actual sampling.
Here things are trivial as cube map arrays are identical to 2d arrays in
all respects.
Reviewed-by: Brian Paul <brianp@vmware.com>
target == PIPE_TEXTURE_2D_ARRAY ||
target == PIPE_TEXTURE_RECT ||
target == PIPE_TEXTURE_3D ||
- target == PIPE_TEXTURE_CUBE);
+ target == PIPE_TEXTURE_CUBE ||
+ target == PIPE_TEXTURE_CUBE_ARRAY);
if (sample_count > 1)
return FALSE;
}
if (res->target == PIPE_TEXTURE_1D_ARRAY ||
- res->target == PIPE_TEXTURE_2D_ARRAY) {
+ res->target == PIPE_TEXTURE_2D_ARRAY ||
+ res->target == PIPE_TEXTURE_CUBE_ARRAY) {
/*
* For array textures, we don't have first_layer, instead
* adjust last_layer (stored as depth) plus the mip level offsets
jit_tex->mip_offsets[j] += view->u.tex.first_layer *
lp_tex->img_stride[j];
}
+ if (res->target == PIPE_TEXTURE_CUBE_ARRAY) {
+ assert(jit_tex->depth % 6 == 0);
+ }
assert(view->u.tex.first_layer <= view->u.tex.last_layer);
assert(view->u.tex.last_layer < res->array_size);
}
img_stride[j] = lp_tex->img_stride[j];
}
if (res->target == PIPE_TEXTURE_1D_ARRAY ||
- res->target == PIPE_TEXTURE_2D_ARRAY) {
+ res->target == PIPE_TEXTURE_2D_ARRAY ||
+ res->target == PIPE_TEXTURE_CUBE_ARRAY) {
num_layers = view->u.tex.last_layer - view->u.tex.first_layer + 1;
for (j = first_level; j <= last_level; j++) {
mip_offsets[j] += view->u.tex.first_layer *
lp_tex->img_stride[j];
}
+ if (res->target == PIPE_TEXTURE_CUBE_ARRAY) {
+ assert(num_layers % 6 == 0);
+ }
assert(view->u.tex.first_layer <= view->u.tex.last_layer);
assert(view->u.tex.last_layer < res->array_size);
}
else if (lpr->base.target == PIPE_TEXTURE_3D)
num_slices = depth;
else if (lpr->base.target == PIPE_TEXTURE_1D_ARRAY ||
- lpr->base.target == PIPE_TEXTURE_2D_ARRAY)
+ lpr->base.target == PIPE_TEXTURE_2D_ARRAY ||
+ lpr->base.target == PIPE_TEXTURE_CUBE_ARRAY)
num_slices = layers;
else
num_slices = 1;
case PIPE_TEXTURE_RECT:
case PIPE_TEXTURE_3D:
case PIPE_TEXTURE_CUBE:
+ case PIPE_TEXTURE_CUBE_ARRAY:
return TRUE;
default:
assert(0);
case PIPE_TEXTURE_RECT:
case PIPE_TEXTURE_3D:
case PIPE_TEXTURE_CUBE:
+ case PIPE_TEXTURE_CUBE_ARRAY:
return FALSE;
default:
assert(0);