diff options
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_setup.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c index cbf465e65d1..d728e85dcb6 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_setup.c @@ -802,7 +802,6 @@ lp_setup_set_fragment_sampler_views(struct lp_setup_context *setup, if (!lp_tex->dt) { /* regular texture - setup array of mipmap level offsets */ - void *mip_ptr; int j; unsigned first_level = 0; unsigned last_level = 0; @@ -812,22 +811,14 @@ lp_setup_set_fragment_sampler_views(struct lp_setup_context *setup, last_level = view->u.tex.last_level; assert(first_level <= last_level); assert(last_level <= res->last_level); - - /* - * The complexity here should no longer be necessary. - */ - mip_ptr = llvmpipe_get_texture_image_all(lp_tex, first_level, - LP_TEX_USAGE_READ); jit_tex->base = lp_tex->tex_data; } else { - mip_ptr = lp_tex->data; - jit_tex->base = mip_ptr; + jit_tex->base = lp_tex->data; } - if ((LP_PERF & PERF_TEX_MEM) || !mip_ptr) { - /* out of memory - use dummy tile memory */ - /* Note if using PERF_TEX_MEM will also skip tile conversion */ + if (LP_PERF & PERF_TEX_MEM) { + /* use dummy tile memory */ jit_tex->base = lp_dummy_tile; jit_tex->width = TILE_SIZE/8; jit_tex->height = TILE_SIZE/8; @@ -847,14 +838,7 @@ lp_setup_set_fragment_sampler_views(struct lp_setup_context *setup, if (llvmpipe_resource_is_texture(res)) { for (j = first_level; j <= last_level; j++) { - mip_ptr = llvmpipe_get_texture_image_all(lp_tex, j, - LP_TEX_USAGE_READ); - jit_tex->mip_offsets[j] = (uint8_t *)mip_ptr - (uint8_t *)jit_tex->base; - /* - * could get mip offset directly but need call above to - * invoke tiled->linear conversion. - */ - assert(lp_tex->mip_offsets[j] == jit_tex->mip_offsets[j]); + jit_tex->mip_offsets[j] = lp_tex->mip_offsets[j]; jit_tex->row_stride[j] = lp_tex->row_stride[j]; jit_tex->img_stride[j] = lp_tex->img_stride[j]; } |