diff options
author | Roland Scheidegger <[email protected]> | 2012-11-12 20:35:04 +0100 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2012-11-12 21:02:59 +0100 |
commit | 26097c4855b97ee6e362c19df11d51fb7fd42192 (patch) | |
tree | dbc5018aa4b3a2c2fb2e1e0464be4776610cc044 /src/gallium/drivers/llvmpipe/lp_jit.h | |
parent | 8257bb963f0b21c0c35da479707b5cacbc1c2824 (diff) |
gallivm,draw,llvmpipe: use base ptr + mip offsets instead of mip pointers
This might have a slight overhead but handling mip offsets more like
the width (and image) strides should make some things easier (mip level
being just part of the offset calculation) later.
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_jit.h')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_jit.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_jit.h b/src/gallium/drivers/llvmpipe/lp_jit.h index 584d2c8fd81..94a2bb5ff36 100644 --- a/src/gallium/drivers/llvmpipe/lp_jit.h +++ b/src/gallium/drivers/llvmpipe/lp_jit.h @@ -53,9 +53,10 @@ struct lp_jit_texture uint32_t depth; uint32_t first_level; uint32_t last_level; + const void *base; uint32_t row_stride[LP_MAX_TEXTURE_LEVELS]; uint32_t img_stride[LP_MAX_TEXTURE_LEVELS]; - const void *data[LP_MAX_TEXTURE_LEVELS]; + uint32_t mip_offsets[LP_MAX_TEXTURE_LEVELS]; /* sampler state, actually */ float min_lod; float max_lod; @@ -70,9 +71,10 @@ enum { LP_JIT_TEXTURE_DEPTH, LP_JIT_TEXTURE_FIRST_LEVEL, LP_JIT_TEXTURE_LAST_LEVEL, + LP_JIT_TEXTURE_BASE, LP_JIT_TEXTURE_ROW_STRIDE, LP_JIT_TEXTURE_IMG_STRIDE, - LP_JIT_TEXTURE_DATA, + LP_JIT_TEXTURE_MIP_OFFSETS, LP_JIT_TEXTURE_MIN_LOD, LP_JIT_TEXTURE_MAX_LOD, LP_JIT_TEXTURE_LOD_BIAS, |