diff options
author | Kristian Høgsberg <krh@redhat.com> | 2008-03-07 14:12:28 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@redhat.com> | 2008-03-07 14:13:26 -0500 |
commit | 9abaad115cb6245b12b2adb3552ace99b634ab4a (patch) | |
tree | 9a9641075978ae868e9b177467584612fa01e6e9 /GL | |
parent | 3bf7ff70323d533a3a05c0f3e22393e63beada99 (diff) |
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.
Diffstat (limited to 'GL')
-rw-r--r-- | GL/glx/glxdri2.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/GL/glx/glxdri2.c b/GL/glx/glxdri2.c index b0082a040..27257d3e0 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; } |