#include <X11/Xlib-xcb.h>
#include "loader_dri3_helper.h"
+#include "util/macros.h"
/* From xmlpool/options.h, user exposed so should be stable */
#define DRI_CONF_VBLANK_NEVER 0
draw->ext->core->destroyDrawable(draw->dri_drawable);
- for (i = 0; i < LOADER_DRI3_NUM_BUFFERS; i++) {
+ for (i = 0; i < ARRAY_SIZE(draw->buffers); i++) {
if (draw->buffers[i])
dri3_free_render_buffer(draw, draw->buffers[i]);
}
xcb_present_idle_notify_event_t *ie = (void *) ge;
int b;
- for (b = 0; b < sizeof(draw->buffers) / sizeof(draw->buffers[0]); b++) {
+ for (b = 0; b < ARRAY_SIZE(draw->buffers); b++) {
struct loader_dri3_buffer *buf = draw->buffers[b];
if (buf && buf->pixmap == ie->pixmap)
'loader_dri3_helper',
['loader_dri3_helper.c', 'loader_dri3_helper.h'],
c_args : c_vis_args,
- include_directories : inc_include,
+ include_directories : [inc_include, inc_src],
dependencies : [
dep_libdrm, dep_xcb_dri3, dep_xcb_present, dep_xcb_sync, dep_xshmfence,
],