Since switching to non-swizzled rendering we only have "normal", aka linear, offsets. Reviewed-by: Brian Paul <brianp@vmware.com>tags/10.3-branchpoint
@@ -854,7 +854,7 @@ lp_setup_set_fragment_sampler_views(struct lp_setup_context *setup, | |||
* could get mip offset directly but need call above to | |||
* invoke tiled->linear conversion. | |||
*/ | |||
assert(lp_tex->linear_mip_offsets[j] == jit_tex->mip_offsets[j]); | |||
assert(lp_tex->mip_offsets[j] == jit_tex->mip_offsets[j]); | |||
jit_tex->row_stride[j] = lp_tex->row_stride[j]; | |||
jit_tex->img_stride[j] = lp_tex->img_stride[j]; | |||
} |
@@ -254,7 +254,7 @@ prepare_shader_sampling( | |||
* could get mip offset directly but need call above to | |||
* invoke tiled->linear conversion. | |||
*/ | |||
assert(lp_tex->linear_mip_offsets[j] == mip_offsets[j]); | |||
assert(lp_tex->mip_offsets[j] == mip_offsets[j]); | |||
row_stride[j] = lp_tex->row_stride[j]; | |||
img_stride[j] = lp_tex->img_stride[j]; | |||
} |
@@ -730,7 +730,7 @@ llvmpipe_get_texture_image_address(struct llvmpipe_resource *lpr, | |||
unsigned offset; | |||
img = &lpr->linear_img; | |||
offset = lpr->linear_mip_offsets[level]; | |||
offset = lpr->mip_offsets[level]; | |||
if (face_slice > 0) | |||
offset += face_slice * tex_image_face_size(lpr, level); | |||
@@ -771,7 +771,7 @@ alloc_image_data(struct llvmpipe_resource *lpr) | |||
*/ | |||
for (level = 0; level <= lpr->base.last_level; level++) { | |||
uint buffer_size = tex_image_size(lpr, level); | |||
lpr->linear_mip_offsets[level] = offset; | |||
lpr->mip_offsets[level] = offset; | |||
offset += align(buffer_size, alignment); | |||
} | |||
lpr->linear_img.data = align_malloc(offset, alignment); | |||
@@ -809,7 +809,7 @@ llvmpipe_get_texture_image(struct llvmpipe_resource *lpr, | |||
} | |||
target_img = &lpr->linear_img; | |||
target_off_ptr = lpr->linear_mip_offsets; | |||
target_off_ptr = lpr->mip_offsets; | |||
target_data = target_img->data; | |||
if (!target_data) { |
@@ -74,7 +74,7 @@ struct llvmpipe_resource | |||
/** Number of 3D slices or cube faces per level */ | |||
unsigned num_slices_faces[LP_MAX_TEXTURE_LEVELS]; | |||
/** Offset to start of mipmap level, in bytes */ | |||
unsigned linear_mip_offsets[LP_MAX_TEXTURE_LEVELS]; | |||
unsigned mip_offsets[LP_MAX_TEXTURE_LEVELS]; | |||
/** | |||
* Display target, for textures with the PIPE_BIND_DISPLAY_TARGET |