[Mesa-dev] [PATCH mesa 02/16] anv: tie anv_assert() enablement to regular assert()

Timothy Arceri tarceri at itsqueeze.com
Sat Nov 25 23:12:46 UTC 2017


On 25/11/17 08:02, Timothy Arceri wrote:
> On 25/11/17 05:07, Eric Engestrom wrote:
>> Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
>> ---
>>   src/intel/vulkan/anv_private.h | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/intel/vulkan/anv_private.h 
>> b/src/intel/vulkan/anv_private.h
>> index 6d4e43f2e687cbf26ccd..6474abf0f3694c7fcd3a 100644
>> --- a/src/intel/vulkan/anv_private.h
>> +++ b/src/intel/vulkan/anv_private.h
>> @@ -382,7 +382,7 @@ void anv_debug_report(struct anv_instance *instance,
>>      } while (0)
>>   /* A non-fatal assert.  Useful for debugging. */
>> -#ifdef DEBUG
>> +#ifndef NDEBUG
> 
> I'm confused by all these assert patches. Doesn't NDEBUG mean no debug 
> or non-debug why are you switching things around? Won't this add all 
> this code to release builds and remove it from debug builds?

Oh you are using ifndef, I still don't get what you are trying to do 
with these patches. Can you please explain?

> 
> 
>>   #define anv_assert(x) ({ \
>>      if (unlikely(!(x))) \
>>         intel_loge("%s:%d ASSERT: %s", __FILE__, __LINE__, #x); \
>>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list