From 23ad95227a8b2c8ee390665c71a70685f82f0ef9 Mon Sep 17 00:00:00 2001 From: Icecream95 Date: Sat, 5 Sep 2020 10:11:41 +1200 Subject: [PATCH] panfrost: Correctly set modifier_constant This fixes the tiled-linear conversion optimisation. Fixes: 56f9cc99487 ("panfrost: Account for modifiers when creating BO") Reviewed-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/panfrost/pan_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c index cb2e30c..aa8277f 100644 --- a/src/gallium/drivers/panfrost/pan_resource.c +++ b/src/gallium/drivers/panfrost/pan_resource.c @@ -537,7 +537,7 @@ panfrost_resource_create_bo(struct panfrost_device *dev, struct panfrost_resourc * linear, and if we control the modifier, and if the resource can be * linear. */ pres->modifier_constant = !((pres->modifier != DRM_FORMAT_MOD_LINEAR) - && (modifier == DRM_FORMAT_INVALID) + && (modifier == DRM_FORMAT_MOD_INVALID) && panfrost_can_linear(dev, pres)); size_t bo_size; -- 2.7.4