Mesa (master): panfrost: Correctly set modifier_constant

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Sep 9 12:04:33 UTC 2020


Module: Mesa
Branch: master
Commit: 23ad95227a8b2c8ee390665c71a70685f82f0ef9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=23ad95227a8b2c8ee390665c71a70685f82f0ef9

Author: Icecream95 <ixn at keemail.me>
Date:   Sat Sep  5 10:11:41 2020 +1200

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 <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6608>

---

 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 cb2e30ccf2c..aa8277f8cb5 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;



More information about the mesa-commit mailing list