xserver: Branch 'master'
Kristian Høgsberg
krh at kemper.freedesktop.org
Fri Mar 7 11:14:19 PST 2008
GL/glx/glxdri2.c | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
New commits:
commit 9abaad115cb6245b12b2adb3552ace99b634ab4a
Author: Kristian Høgsberg <krh at redhat.com>
Date: Fri Mar 7 14:12:28 2008 -0500
Fix DRI2 texture target for GLX_EXT_texture_from_pixmap.
Thanks to Dennis Kasprzyk for pointing it out and for reminding me to
commit it.
diff --git a/GL/glx/glxdri2.c b/GL/glx/glxdri2.c
index b0082a0..27257d3 100644
--- a/GL/glx/glxdri2.c
+++ b/GL/glx/glxdri2.c
@@ -216,8 +216,6 @@ __glXDRIcontextForceCurrent(__GLXcontext *baseContext)
#ifdef __DRI_TEX_BUFFER
-#define isPowerOfTwo(n) (((n) & ((n) - 1 )) == 0)
-
static int
__glXDRIbindTexImage(__GLXcontext *baseContext,
int buffer,
@@ -228,26 +226,17 @@ __glXDRIbindTexImage(__GLXcontext *baseContext,
PixmapPtr pixmap;
__GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
unsigned int flags;
- int w, h, target;
if (screen->texBuffer == NULL)
return Success;
pixmap = (PixmapPtr) glxPixmap->pDraw;
- w = pixmap->drawable.width;
- h = pixmap->drawable.height;
-
- if (!isPowerOfTwo(w) || !isPowerOfTwo(h))
- target = GL_TEXTURE_RECTANGLE_ARB;
- else
- target = GL_TEXTURE_2D;
-
screen->texBuffer->setTexBuffer(&context->driContext,
- target,
+ glxPixmap->target,
DRI2GetPixmapHandle(pixmap, &flags),
pixmap->drawable.depth,
pixmap->devKind,
- h);
+ pixmap->drawable.height);
return Success;
}
More information about the xorg-commit
mailing list