From 8f55f5b77b1f3f6b5777d0e75ba390b67c7a0901 Mon Sep 17 00:00:00 2001 From: Fabio Pedretti Date: Mon, 14 Nov 2011 10:54:19 -0500 Subject: [PATCH] radeon: further cleanup of shared code Signed-off-by: Alex Deucher --- src/mesa/drivers/dri/radeon/radeon_chipset.h | 13 +++---------- src/mesa/drivers/dri/radeon/radeon_screen.c | 14 ++------------ src/mesa/drivers/dri/radeon/radeon_texture.c | 2 +- 3 files changed, 6 insertions(+), 23 deletions(-) diff --git a/src/mesa/drivers/dri/radeon/radeon_chipset.h b/src/mesa/drivers/dri/radeon/radeon_chipset.h index 445e0854fc4..10cf348fb5a 100644 --- a/src/mesa/drivers/dri/radeon/radeon_chipset.h +++ b/src/mesa/drivers/dri/radeon/radeon_chipset.h @@ -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 */ diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c index 627987aac55..74b2ad15d3c 100644 --- a/src/mesa/drivers/dri/radeon/radeon_screen.c +++ b/src/mesa/drivers/dri/radeon/radeon_screen.c @@ -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 diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c index 6d32189d0b2..178ff0925c3 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texture.c +++ b/src/mesa/drivers/dri/radeon/radeon_texture.c @@ -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; -- 2.30.2