extern void r200SetTexBuffer(__DRIcontext *pDRICtx, GLint target, __DRIdrawable *dPriv);
extern void r200SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_format,
__DRIdrawable *dPriv);
-extern void r200SetTexOffset(__DRIcontext *pDRICtx, GLint texname,
- unsigned long long offset, GLint depth,
- GLuint pitch);
extern void r200UpdateTextureState( struct gl_context *ctx );
return GL_TRUE;
}
-void r200SetTexOffset(__DRIcontext * pDRICtx, GLint texname,
- unsigned long long offset, GLint depth, GLuint pitch)
-{
- r200ContextPtr rmesa = pDRICtx->driverPrivate;
- struct gl_texture_object *tObj =
- _mesa_lookup_texture(rmesa->radeon.glCtx, texname);
- radeonTexObjPtr t = radeon_tex_obj(tObj);
-
- if (!tObj)
- return;
-
- t->image_override = GL_TRUE;
-
- if (!offset)
- return;
-
- t->bo = NULL;
- t->override_offset = offset;
- t->pp_txpitch = pitch - 32;
-
- switch (depth) {
- case 32:
- t->pp_txformat = tx_table_le[MESA_FORMAT_ARGB8888].format;
- t->pp_txfilter |= tx_table_le[MESA_FORMAT_ARGB8888].filter;
- break;
- case 24:
- default:
- t->pp_txformat = tx_table_le[MESA_FORMAT_RGB888].format;
- t->pp_txfilter |= tx_table_le[MESA_FORMAT_RGB888].filter;
- break;
- case 16:
- t->pp_txformat = tx_table_le[MESA_FORMAT_RGB565].format;
- t->pp_txfilter |= tx_table_le[MESA_FORMAT_RGB565].filter;
- break;
- }
-}
-
void r200SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_format,
__DRIdrawable *dPriv)
{
}
#if defined(RADEON_R100)
-static const __DRItexOffsetExtension radeonTexOffsetExtension = {
- { __DRI_TEX_OFFSET, __DRI_TEX_OFFSET_VERSION },
- radeonSetTexOffset,
-};
-
static const __DRItexBufferExtension radeonTexBufferExtension = {
{ __DRI_TEX_BUFFER, __DRI_TEX_BUFFER_VERSION },
radeonSetTexBuffer,
#endif
#if defined(RADEON_R200)
-
-static const __DRItexOffsetExtension r200texOffsetExtension = {
- { __DRI_TEX_OFFSET, __DRI_TEX_OFFSET_VERSION },
- r200SetTexOffset,
-};
-
static const __DRItexBufferExtension r200TexBufferExtension = {
{ __DRI_TEX_BUFFER, __DRI_TEX_BUFFER_VERSION },
r200SetTexBuffer,
#ifndef __RADEON_TEX_H__
#define __RADEON_TEX_H__
-extern void radeonSetTexOffset(__DRIcontext *pDRICtx, GLint texname,
- unsigned long long offset, GLint depth,
- GLuint pitch);
-
extern void radeonSetTexBuffer(__DRIcontext *pDRICtx, GLint target, __DRIdrawable *dPriv);
extern void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_format,
__DRIdrawable *dPriv);
return GL_TRUE;
}
-void radeonSetTexOffset(__DRIcontext * pDRICtx, GLint texname,
- unsigned long long offset, GLint depth, GLuint pitch)
-{
- r100ContextPtr rmesa = pDRICtx->driverPrivate;
- struct gl_texture_object *tObj =
- _mesa_lookup_texture(rmesa->radeon.glCtx, texname);
- radeonTexObjPtr t = radeon_tex_obj(tObj);
-
- if (tObj == NULL)
- return;
-
- t->image_override = GL_TRUE;
-
- if (!offset)
- return;
-
- t->bo = NULL;
- t->override_offset = offset;
- t->pp_txpitch = pitch - 32;
-
- switch (depth) {
- case 32:
- t->pp_txformat = tx_table[MESA_FORMAT_ARGB8888].format;
- t->pp_txfilter |= tx_table[MESA_FORMAT_ARGB8888].filter;
- break;
- case 24:
- default:
- t->pp_txformat = tx_table[MESA_FORMAT_RGB888].format;
- t->pp_txfilter |= tx_table[MESA_FORMAT_RGB888].filter;
- break;
- case 16:
- t->pp_txformat = tx_table[MESA_FORMAT_RGB565].format;
- t->pp_txfilter |= tx_table[MESA_FORMAT_RGB565].filter;
- break;
- }
-}
-
void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_format,
__DRIdrawable *dPriv)
{