summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_state_sampler.c
diff options
context:
space:
mode:
authorFabian Bieler <[email protected]>2011-03-31 12:32:52 +0200
committerMarek Olšák <[email protected]>2011-04-08 04:47:04 +0200
commit08070cead0bb79d4441d8c5b900d1571bb63c670 (patch)
treee0d48b89d5defed950110c757463621db43724fc /src/gallium/drivers/llvmpipe/lp_state_sampler.c
parent9acdd7739b729375444f8669fc2419d9eb57acc5 (diff)
llvmpipe: Take the sampler view's first_level into account when sampling.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_sampler.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_sampler.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_sampler.c b/src/gallium/drivers/llvmpipe/lp_state_sampler.c
index 1dd866195d3..df9fb89cc8e 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_sampler.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_sampler.c
@@ -269,7 +269,7 @@ llvmpipe_prepare_vertex_sampling(struct llvmpipe_context *lp,
if (!lp_tex->dt) {
/* regular texture - setup array of mipmap level pointers */
int j;
- for (j = 0; j <= tex->last_level; j++) {
+ for (j = view->u.tex.first_level; j <= tex->last_level; j++) {
data[j] =
llvmpipe_get_texture_image_all(lp_tex, j, LP_TEX_USAGE_READ,
LP_TEX_LAYOUT_LINEAR);
@@ -293,7 +293,7 @@ llvmpipe_prepare_vertex_sampling(struct llvmpipe_context *lp,
draw_set_mapped_texture(lp->draw,
i,
tex->width0, tex->height0, tex->depth0,
- tex->last_level,
+ view->u.tex.first_level, tex->last_level,
row_stride, img_stride, data);
}
}