It is the maximum number of back buffers, but the name is confusing and is
easily read as the maximum back buffer index. Chage to DRI3_NUM_BACK to make
the intended usage a bit clearer.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
for (;;) {
- for (b = 0; b < DRI3_MAX_BACK; b++) {
+ for (b = 0; b < DRI3_NUM_BACK; b++) {
int id = DRI3_BACK_ID(b);
struct dri3_buffer *buffer = priv->buffers[id];
switch (buffer_type) {
case dri3_buffer_back:
first_id = DRI3_BACK_ID(0);
- n_id = DRI3_MAX_BACK;
+ n_id = DRI3_NUM_BACK;
break;
case dri3_buffer_front:
first_id = DRI3_FRONT_ID;
__DRIcontext *driContext;
};
-#define DRI3_MAX_BACK 2
+#define DRI3_NUM_BACK 2
#define DRI3_BACK_ID(i) (i)
-#define DRI3_FRONT_ID (DRI3_MAX_BACK)
+#define DRI3_FRONT_ID (DRI3_NUM_BACK)
static inline int
dri3_buf_id_next(int buf_id)
{
- if (buf_id == DRI3_MAX_BACK - 1)
+ if (buf_id == DRI3_NUM_BACK - 1)
return 0;
return buf_id + 1;
}
dri3_buf_id_prev(int buf_id)
{
if (buf_id == 0)
- return DRI3_MAX_BACK - 1;
+ return DRI3_NUM_BACK - 1;
return buf_id - 1;
}
return DRI3_FRONT_ID;
}
-#define DRI3_NUM_BUFFERS (1 + DRI3_MAX_BACK)
+#define DRI3_NUM_BUFFERS (1 + DRI3_NUM_BACK)
struct dri3_drawable {
__GLXDRIdrawable base;