diff options
Diffstat (limited to 'glx/glxdri2.c')
-rw-r--r-- | glx/glxdri2.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/glx/glxdri2.c b/glx/glxdri2.c index f2682d4d9..0b64298ca 100644 --- a/glx/glxdri2.c +++ b/glx/glxdri2.c @@ -222,9 +222,16 @@ __glXDRIbindTexImage(__GLXcontext *baseContext, if (texBuffer == NULL) return Success; - texBuffer->setTexBuffer(context->driContext, - glxPixmap->target, - drawable->driDrawable); + if (texBuffer->base.version >= 2 && texBuffer->setTexBuffer2 != NULL) { + (*texBuffer->setTexBuffer2)(context->driContext, + glxPixmap->target, + glxPixmap->format, + drawable->driDrawable); + } else { + texBuffer->setTexBuffer(context->driContext, + glxPixmap->target, + drawable->driDrawable); + } return Success; } |