summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_setup.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-09-23 18:18:40 -0600
committerBrian Paul <[email protected]>2010-09-24 09:47:37 -0600
commit61b7da074e2faebf03d3dfc30e910ee1367bcd5a (patch)
tree0151a5a1782d89392199435c1d49c3a870d4a7a7 /src/gallium/drivers/llvmpipe/lp_setup.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_setup.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c
index ea7002aafcf..28d202bd655 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup.c
@@ -617,7 +617,8 @@ lp_setup_set_vertex_info( struct lp_setup_context *setup,
void
lp_setup_set_fragment_sampler_views(struct lp_setup_context *setup,
unsigned num,
- struct pipe_sampler_view **views)
+ struct pipe_sampler_view **views,
+ const struct pipe_sampler_state **samplers)
{
unsigned i;
@@ -638,6 +639,11 @@ lp_setup_set_fragment_sampler_views(struct lp_setup_context *setup,
jit_tex->depth = tex->depth0;
jit_tex->last_level = tex->last_level;
+ /* sampler state */
+ jit_tex->min_lod = samplers[i]->min_lod;
+ jit_tex->max_lod = samplers[i]->max_lod;
+ jit_tex->lod_bias = samplers[i]->lod_bias;
+
/* We're referencing the texture's internal data, so save a
* reference to it.
*/