[Mesa-dev] Building error in android-x86

Emil Velikov emil.l.velikov at gmail.com
Thu May 11 12:50:54 UTC 2017


Hi Mauro,

Mostly rewording what Marek already said.

On 6 May 2017 at 15:16, Mauro Rossi <issor.oruam at gmail.com> wrote:
> 2017-05-06 12:15 GMT+02:00 Marek Olšák <maraeo at gmail.com>:
>>
>> Hi,
>>
>> There are several options:
>> - Use Mesa 17.1 instead of master
>> - Drop support for radeonsi in Nougat if you have to use master
>> - Revert the commit removing LLVM 3.8 support, resolve merge conflicts, and send it for review.
>>
>> I'd be OK with any but I recommend the first one.
>>
>> Marek
>
>
> Thanks, I'd like to be able to test android build of radeonsi,
> even by just keeping an HACK in my private repo/branches
>
> May I just ask what is the risk in doing the following in our builds?
>
>
> From addb5cd258f849cd3ce78384623c96d2c027682d Mon Sep 17 00:00:00 2001
> From: Mauro Rossi <issor.oruam at gmail.com>
> Date: Sat, 6 May 2017 14:40:59 +0200
> Subject: [!!!!HACK!!!!] HACK: radeonsi: workaround to llvm 3.9 constraints
>
> Just to avoid the followinf building errors:
>
As-is this fixes the build issue, yet the driver will _not_ work.

Please don't try radeonsi on platforms that lack LLVM 3.9. You are the
only person who does this, so you'll quickly see lots of issues when
using the driver.



> From 2ac8fbbecb44ac92d6400d354fdfb34a953ad08c Mon Sep 17 00:00:00 2001
> From: Mauro Rossi <issor.oruam at gmail.com>
> Date: Sat, 6 May 2017 15:01:36 +0200
> Subject: [RFC] radeonsi: fix building error in performance counters
>
> Fixes the following building error:
>
> external/mesa/src/gallium/drivers/radeonsi/si_perfcounter.c:617:14:
> error: address of array 'regs->counters' will always evaluate to
> 'true' [-Werror,-Wpointer-bool-conversion]
>                         if (regs->counters)
>                         ~~  ~~~~~~^~~~~~~~
> 1 error generated.
> ---
>  src/gallium/drivers/radeonsi/si_perfcounter.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_perfcounter.c
> b/src/gallium/drivers/radeonsi/si_perfcounter.c
> index fd28d1176e..322e8d4728 100644
> --- a/src/gallium/drivers/radeonsi/si_perfcounter.c
> +++ b/src/gallium/drivers/radeonsi/si_perfcounter.c
> @@ -614,7 +614,7 @@ static void si_pc_emit_read(struct r600_common_context *ctx,
>              reg_delta = -reg_delta;
>
>          for (idx = 0; idx < count; ++idx) {
> -            if (regs->counters)
> +            if (regs->counters[idx])
>                  reg = regs->counters[idx];
>
Good bugfix. Try to explain what happens here (even if you don't know
the driver) add it to the commit message and resend.

-Emil


More information about the mesa-dev mailing list