[Mesa-dev] [PATCH 1/6] llvmpipe: (trivial) rename linear_mip_offsets to mip_offsets

sroland at vmware.com sroland at vmware.com
Tue Jul 1 12:05:02 PDT 2014


From: Roland Scheidegger <sroland at vmware.com>

Since switching to non-swizzled rendering we only have "normal", aka linear,
offsets.
---
 src/gallium/drivers/llvmpipe/lp_setup.c         | 2 +-
 src/gallium/drivers/llvmpipe/lp_state_sampler.c | 2 +-
 src/gallium/drivers/llvmpipe/lp_texture.c       | 6 +++---
 src/gallium/drivers/llvmpipe/lp_texture.h       | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c
index 77ac3af..046611a 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup.c
@@ -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];
                   }
diff --git a/src/gallium/drivers/llvmpipe/lp_state_sampler.c b/src/gallium/drivers/llvmpipe/lp_state_sampler.c
index 09bc928..0b227ea 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_sampler.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_sampler.c
@@ -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];
                }
diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c
index 6df88d0..d60d101 100644
--- a/src/gallium/drivers/llvmpipe/lp_texture.c
+++ b/src/gallium/drivers/llvmpipe/lp_texture.c
@@ -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) {
diff --git a/src/gallium/drivers/llvmpipe/lp_texture.h b/src/gallium/drivers/llvmpipe/lp_texture.h
index af11848..e26d044 100644
--- a/src/gallium/drivers/llvmpipe/lp_texture.h
+++ b/src/gallium/drivers/llvmpipe/lp_texture.h
@@ -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
-- 
1.9.1


More information about the mesa-dev mailing list