[Mesa-dev] [PATCH mesa 2/6] dri/radeon: use ARRAY_SIZE macro

Ian Romanick idr at freedesktop.org
Wed Sep 13 21:35:51 UTC 2017


Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

On 09/07/2017 03:21 AM, Eric Engestrom wrote:
> Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
> ---
>  src/mesa/drivers/dri/radeon/radeon_tcl.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/src/mesa/drivers/dri/radeon/radeon_tcl.c b/src/mesa/drivers/dri/radeon/radeon_tcl.c
> index 3e2f426160..61ff2311e9 100644
> --- a/src/mesa/drivers/dri/radeon/radeon_tcl.c
> +++ b/src/mesa/drivers/dri/radeon/radeon_tcl.c
> @@ -39,6 +39,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
>  #include "main/enums.h"
>  #include "main/state.h"
>  
> +#include "util/macros.h"
> +
>  #include "vbo/vbo.h"
>  #include "tnl/tnl.h"
>  #include "tnl/t_pipeline.h"
> @@ -297,7 +299,7 @@ static GLuint radeonEnsureEmitSize( struct gl_context * ctx , GLuint inputs )
>      VERT_BIT_FOG
>    };
>    /* predict number of aos to emit */
> -  for (i=0; i < sizeof(flags_to_check)/sizeof(flags_to_check[0]); ++i)
> +  for (i=0; i < ARRAY_SIZE(flags_to_check); ++i)
>    {
>      if (inputs & flags_to_check[i])
>        ++nr_aos;
> 



More information about the mesa-dev mailing list