Bug 111665

Summary: 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]
Product: Mesa Reporter: Vinson Lee <vlee>
Component: Drivers/Gallium/FreedrenoAssignee: Rob Clark <robclark>
Status: RESOLVED FIXED QA Contact:
Severity: not set    
Priority: not set Keywords: bisected, regression
Version: 19.2   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

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.