diff options
author | Roland Scheidegger <[email protected]> | 2014-08-01 23:50:35 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2014-08-05 04:13:17 +0200 |
commit | ea05cfaacac29d15c9c3d939e12546eba95f05d0 (patch) | |
tree | 64354a966d328b70cf08787598698c5f47a07271 /src/gallium/drivers/llvmpipe/lp_setup.c | |
parent | d308f57fe796a39d7d3f547aad62540cfd520675 (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_setup.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c index d728e85dcb6..e85c4ca9c3d 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_setup.c @@ -844,7 +844,8 @@ lp_setup_set_fragment_sampler_views(struct lp_setup_context *setup, } 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 @@ -856,6 +857,9 @@ lp_setup_set_fragment_sampler_views(struct lp_setup_context *setup, 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); } |