dri/radeon: use ARRAY_SIZE macro
authorEric Engestrom <eric.engestrom@imgtec.com>
Mon, 4 Sep 2017 12:54:52 +0000 (13:54 +0100)
committerEric Engestrom <eric.engestrom@imgtec.com>
Thu, 14 Sep 2017 08:56:00 +0000 (09:56 +0100)
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/radeon/radeon_tcl.c

index 3e2f4261600ee97777327e32fdeb8093f9cd0a0f..61ff2311e95109c4856f19cc9d2aa1ca5b264538 100644 (file)
@@ -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;