summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_tex_sample.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_tex_sample.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_tex_sample.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_tex_sample.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_tex_sample.c b/src/gallium/drivers/llvmpipe/lp_tex_sample.c
index 4e026cc8ff..151fe93cfb 100644
--- a/src/gallium/drivers/llvmpipe/lp_tex_sample.c
+++ b/src/gallium/drivers/llvmpipe/lp_tex_sample.c
@@ -151,6 +151,9 @@ LP_LLVM_TEXTURE_MEMBER(last_level, LP_JIT_TEXTURE_LAST_LEVEL, TRUE)
LP_LLVM_TEXTURE_MEMBER(row_stride, LP_JIT_TEXTURE_ROW_STRIDE, FALSE)
LP_LLVM_TEXTURE_MEMBER(img_stride, LP_JIT_TEXTURE_IMG_STRIDE, FALSE)
LP_LLVM_TEXTURE_MEMBER(data_ptr, LP_JIT_TEXTURE_DATA, FALSE)
+LP_LLVM_TEXTURE_MEMBER(min_lod, LP_JIT_TEXTURE_MIN_LOD, TRUE)
+LP_LLVM_TEXTURE_MEMBER(max_lod, LP_JIT_TEXTURE_MAX_LOD, TRUE)
+LP_LLVM_TEXTURE_MEMBER(lod_bias, LP_JIT_TEXTURE_LOD_BIAS, TRUE)
static void
@@ -217,6 +220,10 @@ lp_llvm_sampler_soa_create(const struct lp_sampler_static_state *static_state,
sampler->dynamic_state.base.row_stride = lp_llvm_texture_row_stride;
sampler->dynamic_state.base.img_stride = lp_llvm_texture_img_stride;
sampler->dynamic_state.base.data_ptr = lp_llvm_texture_data_ptr;
+ sampler->dynamic_state.base.min_lod = lp_llvm_texture_min_lod;
+ sampler->dynamic_state.base.max_lod = lp_llvm_texture_max_lod;
+ sampler->dynamic_state.base.lod_bias = lp_llvm_texture_lod_bias;
+
sampler->dynamic_state.static_state = static_state;
sampler->dynamic_state.context_ptr = context_ptr;