From debf00e5fc3828f63e0f99d72c7fa6cd6ce012c5 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Tue, 9 Feb 2010 15:26:14 -0500 Subject: dri_interface: Introduce DRI tokens for the texBuffer texture formats This used to take GLX tokens, but the DRI interface can't depend on GLX defines. We fix this by introducing DRI tokens that have the same value as the GLX texture format tokens. --- src/mesa/drivers/dri/intel/intel_tex_image.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mesa/drivers/dri/intel') diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c index 6402141170d..d63292edd31 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_image.c +++ b/src/mesa/drivers/dri/intel/intel_tex_image.c @@ -728,7 +728,7 @@ intelSetTexOffset(__DRIcontext *pDRICtx, GLint texname, void intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, - GLint glx_texture_format, + GLint texture_format, __DRIdrawable *dPriv) { struct gl_framebuffer *fb = dPriv->driverPrivate; @@ -758,7 +758,7 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, if (rb->region == NULL) return; - if (glx_texture_format == GLX_TEXTURE_FORMAT_RGB_EXT) + if (texture_format == __DRI_TEXTURE_FORMAT_RGB) internalFormat = GL_RGB; else internalFormat = GL_RGBA; @@ -788,7 +788,7 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, intelImage->face = target_to_face(target); intelImage->level = level; - if (glx_texture_format == GLX_TEXTURE_FORMAT_RGB_EXT) + if (texture_format == __DRI_TEXTURE_FORMAT_RGB) texImage->TexFormat = MESA_FORMAT_XRGB8888; else texImage->TexFormat = MESA_FORMAT_ARGB8888; @@ -808,7 +808,7 @@ intelSetTexBuffer(__DRIcontext *pDRICtx, GLint target, __DRIdrawable *dPriv) /* The old interface didn't have the format argument, so copy our * implementation's behavior at the time. */ - intelSetTexBuffer2(pDRICtx, target, GLX_TEXTURE_FORMAT_RGBA_EXT, dPriv); + intelSetTexBuffer2(pDRICtx, target, __DRI_TEXTURE_FORMAT_RGBA, dPriv); } -- cgit v1.2.3