summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_jit.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-09-23 18:18:40 -0600
committerBrian Paul <brianp@vmware.com>2010-09-24 09:47:37 -0600
commit61b7da074e2faebf03d3dfc30e910ee1367bcd5a (patch)
tree0151a5a1782d89392199435c1d49c3a870d4a7a7 /src/gallium/drivers/llvmpipe/lp_jit.c
parent7967b46e652eeef5e3bb1101e53b4c15683ecd12 (diff)
llvmpipe: make min/max lod and lod bias dynamic state
Before, changing any of these sampler values triggered generation of new JIT code. Added a new flag for the special case of min_lod == max_lod which is hit during auto mipmap generation.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_jit.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_jit.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_jit.c b/src/gallium/drivers/llvmpipe/lp_jit.c
index 8e6dfb293d..4c7089892e 100644
--- a/src/gallium/drivers/llvmpipe/lp_jit.c
+++ b/src/gallium/drivers/llvmpipe/lp_jit.c
@@ -65,6 +65,11 @@ lp_jit_init_globals(struct llvmpipe_screen *screen)
LLVMArrayType(LLVMPointerType(LLVMInt8Type(), 0),
LP_MAX_TEXTURE_LEVELS);
+ elem_types[LP_JIT_TEXTURE_MIN_LOD] = LLVMFloatType();
+ elem_types[LP_JIT_TEXTURE_MAX_LOD] = LLVMFloatType();
+ elem_types[LP_JIT_TEXTURE_LOD_BIAS] = LLVMFloatType();
+
+
texture_type = LLVMStructType(elem_types, Elements(elem_types), 0);
LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, width,
@@ -88,6 +93,16 @@ lp_jit_init_globals(struct llvmpipe_screen *screen)
LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, data,
screen->target, texture_type,
LP_JIT_TEXTURE_DATA);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, min_lod,
+ screen->target, texture_type,
+ LP_JIT_TEXTURE_MIN_LOD);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, max_lod,
+ screen->target, texture_type,
+ LP_JIT_TEXTURE_MAX_LOD);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, lod_bias,
+ screen->target, texture_type,
+ LP_JIT_TEXTURE_LOD_BIAS);
+
LP_CHECK_STRUCT_SIZE(struct lp_jit_texture,
screen->target, texture_type);