panfrost: Correctly set modifier_constant
authorIcecream95 <ixn@keemail.me>
Fri, 4 Sep 2020 22:11:41 +0000 (10:11 +1200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 9 Sep 2020 11:54:01 +0000 (11:54 +0000)
This fixes the tiled-linear conversion optimisation.

Fixes: 56f9cc99487 ("panfrost: Account for modifiers when creating BO")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6608>

src/gallium/drivers/panfrost/pan_resource.c

index cb2e30c..aa8277f 100644 (file)
@@ -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;