radeon: further cleanup of shared code

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Fabio Pedretti 2011-11-14 10:54:19 -05:00 committed by Alex Deucher
parent 494d005390
commit 8f55f5b77b
3 changed files with 6 additions and 23 deletions

View file

@ -1,7 +1,5 @@
#ifndef _RADEON_CHIPSET_H
#define _RADEON_CHIPSET_H
/* Including xf86PciInfo.h introduces a bunch of errors...
*/
/* General chip classes:
* r100 includes R100, RV100, RV200, RS100, RS200, RS250.
@ -35,13 +33,8 @@ enum {
CHIP_FAMILY_LAST
};
/* General classes of Radeons, as described above the device ID section */
#define RADEON_CLASS_R100 (0 << 0)
#define RADEON_CLASS_R200 (1 << 0)
#define RADEON_CLASS_MASK (3 << 0)
#define RADEON_CHIPSET_TCL (1 << 2) /* tcl support - any radeon */
#define RADEON_CHIPSET_BROKEN_STENCIL (1 << 3) /* r100 stencil bug */
#define R200_CHIPSET_YCBCR_BROKEN (1 << 4) /* r200 ycbcr bug */
#define RADEON_CHIPSET_TCL (1 << 0) /* tcl support - any radeon */
#define RADEON_CHIPSET_BROKEN_STENCIL (1 << 1) /* r100 stencil bug */
#define R200_CHIPSET_YCBCR_BROKEN (1 << 2) /* r200 ycbcr bug */
#endif /* _RADEON_CHIPSET_H */

View file

@ -177,9 +177,7 @@ static const __DRItexBufferExtension radeonTexBufferExtension = {
radeonSetTexBuffer,
radeonSetTexBuffer2,
};
#endif
#if defined(RADEON_R200)
#elif defined(RADEON_R200)
static const __DRItexBufferExtension r200TexBufferExtension = {
{ __DRI_TEX_BUFFER, __DRI_TEX_BUFFER_VERSION },
r200SetTexBuffer,
@ -517,20 +515,12 @@ radeonCreateScreen2(__DRIscreen *sPriv)
if (getenv("R300_NO_TCL"))
screen->chip_flags &= ~RADEON_CHIPSET_TCL;
#if defined(RADEON_R100)
screen->chip_flags |= RADEON_CLASS_R100;
#elif defined(RADEON_R200)
screen->chip_flags |= RADEON_CLASS_R200;
#endif
i = 0;
screen->extensions[i++] = &dri2ConfigQueryExtension.base;
#if defined(RADEON_R100)
screen->extensions[i++] = &radeonTexBufferExtension.base;
#endif
#if defined(RADEON_R200)
#elif defined(RADEON_R200)
screen->extensions[i++] = &r200TexBufferExtension.base;
#endif

View file

@ -337,8 +337,8 @@ static gl_format radeonChoose8888TexFormat(radeonContextPtr rmesa,
GLenum srcFormat,
GLenum srcType, GLboolean fbo)
{
/* r100 can only do this */
#if defined(RADEON_R100)
/* r100 can only do this */
return _radeon_texformat_argb8888;
#elif defined(RADEON_R200)
const GLuint ui = 1;