Bug 111665 - fd6_blitter.c:724:31: error: passing 'const struct pipe_resource *' to parameter of type 'struct pipe_resource *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
Summary: fd6_blitter.c:724:31: error: passing 'const struct pipe_resource *' to parame...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/Freedreno (show other bugs)
Version: 19.2
Hardware: x86-64 (AMD64) Linux (All)
: not set not set
Assignee: Rob Clark
QA Contact:
URL:
Whiteboard:
Keywords: bisected, regression
Depends on:
Blocks:
 
Reported: 2019-09-11 19:41 UTC by Vinson Lee
Modified: 2019-09-14 06:56 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vinson Lee 2019-09-11 19:41:27 UTC
Build error with clang.

../src/gallium/drivers/freedreno/a6xx/fd6_blitter.c:724:31: error: passing 'const struct pipe_resource *' to parameter of type 'struct pipe_resource *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
        if (fd_resource_level_linear(tmpl, 0))
                                     ^~~~


85a23a8991cfb78960362114bf16304ea987f7f4 is the first bad commit
commit 85a23a8991cfb78960362114bf16304ea987f7f4
Author: Rob Clark <robdclark@chromium.org>
Date:   Mon Sep 9 16:19:40 2019 -0700

    freedreno/a6xx: don't tile things that are too small
    
    If the lowest (largest) mipmap level is too small to tile, then don't
    bother pretending.
    
    Note that this requires initializing pipe->screen before
    fd_resource_level_linear() is called.
    
    Signed-off-by: Rob Clark <robdclark@chromium.org>
    Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>

:040000 040000 224f9224dded47bd71337c9719e31b9b563b9a05 d97a1574f8e1d00fced3a09c5c52d56e837178d3 M	src
bisect run success
Comment 1 Rob Clark 2019-09-11 19:57:58 UTC
fwiw, will be fixed by:
https://gitlab.freedesktop.org/robclark/mesa/commit/983368942bbc89707047dccb146fa7f6155aa6dc

(just testing some other changes on that branch before pushing a MR.. but if this is blocking you feel free to push it earlier)
Comment 2 Vinson Lee 2019-09-14 06:56:14 UTC
commit 966b7c3ed21092deabe4dadccca07dcf34ddd6e8
Author: Rob Clark <robdclark@chromium.org>
Date:   Wed Sep 11 09:52:53 2019 -0700

    freedreno: fix compiler warning
    
    fd6_blitter.c:724:31: warning: passing argument 1 of ‘fd_resource_level_linear’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
    
    Signed-off-by: Rob Clark <robdclark@chromium.org>
    Reviewed-by: Eric Anholt <eric@anholt.net>


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.