xserver: Branch 'master' - 2 commits
Ian Romanick
idr at kemper.freedesktop.org
Wed Apr 8 15:11:14 PDT 2009
glx/glxdri2.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
New commits:
commit 03aebed519986c4dd03e02b3b3d4af1f64595ca7
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Wed Apr 8 14:54:30 2009 -0700
Use a #define instead of a magic number
The number of buffers is likely to change in the future, so having
this as a define is the right way to go.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index 77b5307..c896536 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -82,6 +82,8 @@ struct __GLXDRIcontext {
__DRIcontext *driContext;
};
+#define MAX_DRAWABLE_BUFFERS 5
+
struct __GLXDRIdrawable {
__GLXdrawable base;
__DRIdrawable *driDrawable;
@@ -90,7 +92,7 @@ struct __GLXDRIdrawable {
/* Dimensions as last reported by DRI2GetBuffers. */
int width;
int height;
- __DRIbuffer buffers[5];
+ __DRIbuffer buffers[MAX_DRAWABLE_BUFFERS];
int count;
};
@@ -407,7 +409,7 @@ dri2GetBuffers(__DRIdrawable *driDrawable,
buffers = DRI2GetBuffers(private->base.pDraw,
width, height, attachments, count, out_count);
- if (*out_count > 5) {
+ if (*out_count > MAX_DRAWABLE_BUFFERS) {
*out_count = 0;
return NULL;
}
commit 0d9f3ca7eabd4c514808114d30627f682c8bd030
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Wed Apr 8 14:53:46 2009 -0700
Allow GLX sources to build against Mesa 7.4 sources
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index 4df406b..77b5307 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -251,12 +251,15 @@ __glXDRIbindTexImage(__GLXcontext *baseContext,
if (texBuffer == NULL)
return Success;
+#if __DRI_TEX_BUFFER_VERSION >= 2
if (texBuffer->base.version >= 2 && texBuffer->setTexBuffer2 != NULL) {
(*texBuffer->setTexBuffer2)(context->driContext,
glxPixmap->target,
glxPixmap->format,
drawable->driDrawable);
- } else {
+ } else
+#endif
+ {
texBuffer->setTexBuffer(context->driContext,
glxPixmap->target,
drawable->driDrawable);
More information about the xorg-commit
mailing list