From 61b7da074e2faebf03d3dfc30e910ee1367bcd5a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 23 Sep 2010 18:18:40 -0600 Subject: 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. --- src/gallium/drivers/llvmpipe/lp_setup.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/llvmpipe/lp_setup.c') 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. */ -- cgit v1.2.3