diff options
author | Roland Scheidegger <[email protected]> | 2012-11-29 04:08:32 +0100 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2012-11-29 15:30:19 +0100 |
commit | 6d50148742512606f2abd76a2dcef6c87a5c7471 (patch) | |
tree | b4462102a3c05026995126a4e10f717923a0eb0b /src/gallium/drivers/llvmpipe/lp_setup.c | |
parent | 95e03914d82f4a3722cda00cd6eda54a6f328a73 (diff) |
llvmpipe: support array textures
This adds array (1d,2d) texture support to llvmpipe.
Though probably should do something about 1d array textures requiring gobs
of memory (this issue is not strictly limited to arrays but it is probably
worse there).
Initial code by Jakob Bornecrantz <[email protected]>
Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_setup.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c index a06acb27b83..84defc65054 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_setup.c @@ -653,10 +653,16 @@ lp_setup_set_fragment_sampler_views(struct lp_setup_context *setup, jit_tex = &setup->fs.current.jit_context.textures[i]; jit_tex->width = tex->width0; jit_tex->height = tex->height0; - jit_tex->depth = tex->depth0; jit_tex->first_level = view->u.tex.first_level; jit_tex->last_level = tex->last_level; + if (tex->target == PIPE_TEXTURE_3D) { + jit_tex->depth = tex->depth0; + } + else { + jit_tex->depth = tex->array_size; + } + /* We're referencing the texture's internal data, so save a * reference to it. */ |