summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/radeon/radeon_texstate.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-02-09 15:26:14 -0500
committerKristian Høgsberg <krh@bitplanet.net>2010-02-09 15:55:25 -0500
commitdebf00e5fc3828f63e0f99d72c7fa6cd6ce012c5 (patch)
treec0e64c0a66bdb72a4616bac7efc4fa078b3cad66 /src/mesa/drivers/dri/radeon/radeon_texstate.c
parent8c593d3ea9fa137290480e73aeebcf807c920f50 (diff)
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.
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_texstate.c')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texstate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_texstate.c b/src/mesa/drivers/dri/radeon/radeon_texstate.c
index 84ddcfd4fd..f852116dee 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texstate.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texstate.c
@@ -639,7 +639,7 @@ void radeonSetTexOffset(__DRIcontext * pDRICtx, GLint texname,
}
}
-void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_format,
+void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_format,
__DRIdrawable *dPriv)
{
struct gl_texture_unit *texUnit;
@@ -656,7 +656,7 @@ void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_
type = GL_BGRA;
format = GL_UNSIGNED_BYTE;
- internalFormat = (glx_texture_format == GLX_TEXTURE_FORMAT_RGB_EXT ? 3 : 4);
+ internalFormat = (texture_format == __DRI_TEXTURE_FORMAT_RGB ? 3 : 4);
radeon = pDRICtx->driverPrivate;
rmesa = pDRICtx->driverPrivate;
@@ -705,7 +705,7 @@ void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_
t->override_offset = 0;
switch (rb->cpp) {
case 4:
- if (glx_texture_format == GLX_TEXTURE_FORMAT_RGB_EXT)
+ if (texture_format == __DRI_TEXTURE_FORMAT_RGB)
t->pp_txformat = tx_table[MESA_FORMAT_RGB888].format;
else
t->pp_txformat = tx_table[MESA_FORMAT_ARGB8888].format;
@@ -740,7 +740,7 @@ void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_
void radeonSetTexBuffer(__DRIcontext *pDRICtx, GLint target, __DRIdrawable *dPriv)
{
- radeonSetTexBuffer2(pDRICtx, target, GLX_TEXTURE_FORMAT_RGBA_EXT, dPriv);
+ radeonSetTexBuffer2(pDRICtx, target, __DRI_TEXTURE_FORMAT_RGBA, dPriv);
}