[Mesa-dev] [PATCH] i965: Replace 'noann' debug flag with 'ann'.

Ian Romanick idr at freedesktop.org
Fri Dec 5 21:41:56 PST 2014


On 12/05/2014 09:34 PM, Ben Widawsky wrote:
> On Fri, Dec 05, 2014 at 08:57:27PM -0800, Ian Romanick wrote:
>> On 12/05/2014 05:23 PM, Ben Widawsky wrote:
>>> On Fri, Dec 05, 2014 at 05:08:40PM -0800, Matt Turner wrote:
>>>> ---
>>>> Eric was against making this the default when I first suggested a flag.
>>>> Have opinions changed since then? I rarely use the annotations, and they
>>>> do make the assembly harder to read, when the assembly is what you're
>>>> interested in.
>>>>
>>>>  src/mesa/drivers/dri/i965/intel_asm_annotation.c | 2 +-
>>>>  src/mesa/drivers/dri/i965/intel_debug.c          | 2 +-
>>>>  src/mesa/drivers/dri/i965/intel_debug.h          | 2 +-
>>>>  3 files changed, 3 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/src/mesa/drivers/dri/i965/intel_asm_annotation.c b/src/mesa/drivers/dri/i965/intel_asm_annotation.c
>>>> index 37ad090..ac12655 100644
>>>> --- a/src/mesa/drivers/dri/i965/intel_asm_annotation.c
>>>> +++ b/src/mesa/drivers/dri/i965/intel_asm_annotation.c
>>>> @@ -109,7 +109,7 @@ void annotate(struct brw_context *brw,
>>>>  
>>>>     struct annotation *ann = &annotation->ann[annotation->ann_count++];
>>>>     ann->offset = offset;
>>>> -   if ((INTEL_DEBUG & DEBUG_NO_ANNOTATION) == 0) {
>>>> +   if ((INTEL_DEBUG & DEBUG_ANNOTATION) != 0) {
>>>
>>> if (INTEL_DEBUG & DEBUG_ANNOTATION)
>>
>> Doesn't this result in a GCC warning?
>>
> 
> Perhaps I am missing something. Do you mean because there is no, '{'?
> It should be fine, I think.

It seems like there are some cases where using & in an if-condition
causes a warning... and it suggests putting parenthesis around it.  That
seems to be cases like

    if (x & y != 0)

foo.c:3:2: warning: suggest parentheses around comparison in operand of
‘&’ [-Wparentheses]

The thing you suggest doesn't generate that warning, so never mind. :)

> [snip]



More information about the mesa-dev mailing list