[Mesa-dev] [PATCH 10/25] radeonsi: add code for dumping all shader parts together

Marek Olšák maraeo at gmail.com
Thu Feb 18 18:22:01 UTC 2016


A new version of the patch is attached.

Marek

On Tue, Feb 16, 2016 at 4:12 AM, Michel Dänzer <michel at daenzer.net> wrote:
> On 16.02.2016 08:59, Marek Olšák wrote:
>> From: Marek Olšák <marek.olsak at amd.com>
>
> [...]
>
>> @@ -4199,13 +4200,27 @@ static void si_shader_dump_stats(struct si_screen *sscreen,
>>  void si_shader_dump(struct si_screen *sscreen, struct si_shader *shader,
>>                   struct pipe_debug_callback *debug, unsigned processor)
>>  {
>> -     if (r600_can_dump_shader(&sscreen->b, processor))
>> -             if (!(sscreen->b.debug_flags & DBG_NO_ASM))
>> -                     si_shader_dump_disassembly(&shader->binary, debug);
>> +     unsigned code_size =
>> +             (shader->prolog ? shader->prolog->binary.code_size : 0) +
>> +             shader->binary.code_size +
>> +             (shader->epilog ? shader->epilog->binary.code_size : 0);
>
> This code is a bit messy and duplicated in at least two places. I'd
> suggest factoring this out into a helper function which uses normal if
> statements instead of ternary operators.
>
>
> --
> Earthling Michel Dänzer               |               http://www.amd.com
> Libre software enthusiast             |             Mesa and X developer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-radeonsi-add-code-for-dumping-all-shader-parts-toget.patch
Type: text/x-diff
Size: 3920 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160218/e217d89b/attachment-0001.patch>


More information about the mesa-dev mailing list