summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_state_sampler.c
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2014-08-01 23:50:35 +0200
committerRoland Scheidegger <[email protected]>2014-08-05 04:13:17 +0200
commitea05cfaacac29d15c9c3d939e12546eba95f05d0 (patch)
tree64354a966d328b70cf08787598698c5f47a07271 /src/gallium/drivers/llvmpipe/lp_state_sampler.c
parentd308f57fe796a39d7d3f547aad62540cfd520675 (diff)
llvmpipe: implement support for cube map arrays
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_sampler.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_sampler.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_sampler.c b/src/gallium/drivers/llvmpipe/lp_state_sampler.c
index a14a64f9a3d..0180e99fca0 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_sampler.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_sampler.c
@@ -246,12 +246,16 @@ prepare_shader_sampling(
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);
}