aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/panfrost
diff options
context:
space:
mode:
authorIcecream95 <[email protected]>2020-01-09 15:13:58 +1300
committerTomeu Vizoso <[email protected]>2020-01-10 06:51:42 +0000
commitf2f12776248874b2a689cbba8faeb6e4e2144354 (patch)
tree1358d91e93a6bafe93716654e52b49153ff65f6c /src/gallium/drivers/panfrost
parentdaf1d5ad4c901f7ffc2d78e0741fa16675ce8150 (diff)
panfrost: Add negative lod bias support
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost')
-rw-r--r--src/gallium/drivers/panfrost/pan_context.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index 647aa704ed3..d65d2863334 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -1801,9 +1801,9 @@ panfrost_create_sampler_state(
cso->border_color.f[2],
cso->border_color.f[3]
},
- .min_lod = FIXED_16(cso->min_lod),
- .max_lod = FIXED_16(cso->max_lod),
- .lod_bias = FIXED_16(cso->lod_bias),
+ .min_lod = FIXED_16(cso->min_lod, false), /* clamp at 0 */
+ .max_lod = FIXED_16(cso->max_lod, false),
+ .lod_bias = FIXED_16(cso->lod_bias, true), /* can be negative */
.seamless_cube_map = cso->seamless_cube_map,
};