[Mesa-dev] [PATCH mesa] swr: use ARRAY_SIZE macro

Alejandro Piñeiro apinheiro at igalia.com
Wed Sep 13 12:06:29 UTC 2017


On 13/09/17 14:03, Emil Velikov wrote:
> On 13 September 2017 at 12:35, Alejandro Piñeiro <apinheiro at igalia.com> wrote:
>> On 12/09/17 15:03, Eric Engestrom wrote:
>>> Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
>>> ---
>>>  src/gallium/drivers/swr/rasterizer/memory/StoreTile.h | 10 ++++++----
>>>  1 file changed, 6 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/src/gallium/drivers/swr/rasterizer/memory/StoreTile.h b/src/gallium/drivers/swr/rasterizer/memory/StoreTile.h
>>> index c3d14e9509..67bcf94f00 100644
>>> --- a/src/gallium/drivers/swr/rasterizer/memory/StoreTile.h
>>> +++ b/src/gallium/drivers/swr/rasterizer/memory/StoreTile.h
>>> @@ -40,6 +40,8 @@
>>>  #include <array>
>>>  #include <sstream>
>>>
>>> +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
>> You are also defining the macro here.  Isn't possible to use the
>> definition at util/macros.h?
>>
> See https://lists.freedesktop.org/archives/mesa-dev/2017-September/169210.html

Ups, I missed that email. Never mind then.

PS: shouldn't this patch being a v2 then?

BR


More information about the mesa-dev mailing list