radeon: further cleanup of shared code
authorFabio Pedretti <fabio.ped@libero.it>
Mon, 14 Nov 2011 15:54:19 +0000 (10:54 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 14 Nov 2011 15:54:19 +0000 (10:54 -0500)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
src/mesa/drivers/dri/radeon/radeon_chipset.h
src/mesa/drivers/dri/radeon/radeon_screen.c
src/mesa/drivers/dri/radeon/radeon_texture.c

index 445e0854fc45d375407b6b2951a44cf4472858b5..10cf348fb5a4d93d52f8891f8054a9dfb6e23126 100644 (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 */
index 627987aac55937a03e7d1793d993aa6c5cd44634..74b2ad15d3cb80d78fac9364c80e72bb5d0760eb 100644 (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
 
index 6d32189d0b2a6e5b2e5d7d8bf0868b6a41b744bb..178ff0925c3fb26cb1d8b2eb62b37094aeb5e3be 100644 (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;