summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorGert Wollny <[email protected]>2019-04-19 10:41:51 +0200
committerGert Wollny <[email protected]>2019-05-01 08:23:19 +0200
commitaacdce2879011d6f9afd12deac197297d53919f5 (patch)
tree87f2d383c9dc209c8d526e0480a321bc50ca67f0 /src/gallium
parentd4b6ae223f33b8c1ec2e601c494f162ce2b004f7 (diff)
softpipe: keep input lod for explicite derivatives
This only affects anisotropic interpolation. Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/softpipe/sp_tex_sample.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c b/src/gallium/drivers/softpipe/sp_tex_sample.c
index f8de104bae3..41bd57c9241 100644
--- a/src/gallium/drivers/softpipe/sp_tex_sample.c
+++ b/src/gallium/drivers/softpipe/sp_tex_sample.c
@@ -1932,10 +1932,12 @@ compute_lod(const struct pipe_sampler_state *sampler,
switch (control) {
case TGSI_SAMPLER_LOD_NONE:
case TGSI_SAMPLER_LOD_ZERO:
- /* XXX FIXME */
- case TGSI_SAMPLER_DERIVS_EXPLICIT:
lod[0] = lod[1] = lod[2] = lod[3] = CLAMP(biased_lambda, min_lod, max_lod);
break;
+ case TGSI_SAMPLER_DERIVS_EXPLICIT:
+ for (i = 0; i < TGSI_QUAD_SIZE; i++)
+ lod[i] = lod_in[i];
+ break;
case TGSI_SAMPLER_LOD_BIAS:
for (i = 0; i < TGSI_QUAD_SIZE; i++) {
lod[i] = biased_lambda + lod_in[i];