radeon: replace MESA_FORMAT_Z24_S8 with MESA_FORMAT_S8_Z24
authorBrian Paul <brianp@vmware.com>
Thu, 22 Oct 2009 03:12:23 +0000 (21:12 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 22 Oct 2009 03:14:44 +0000 (21:14 -0600)
Core Mesa deals with MESA_FORMAT_S8_Z24 everywhere it should so
we shouldn't have to use MESA_FORMAT_Z24_S8 anymore.

src/mesa/drivers/dri/r300/r300_texstate.c
src/mesa/drivers/dri/r600/r600_texstate.c
src/mesa/drivers/dri/radeon/radeon_span.c

index 1e9bd3e849338073e2740682960879e198fbc4dd..63f0154cd35356ae1fd9a7dcbcbaacd91b57a72c 100644 (file)
@@ -159,7 +159,7 @@ void r300SetDepthTexMode(struct gl_texture_object *tObj)
        case MESA_FORMAT_Z16:
                format = formats[0];
                break;
-       case MESA_FORMAT_Z24_S8:
+       case MESA_FORMAT_S8_Z24:
                format = formats[1];
                break;
        case MESA_FORMAT_Z32:
index 35186ef97040146cbd73afc5ca88122b2e1a027b..63d88f83d6f81127d3a3161e048daa1057d49a17 100644 (file)
@@ -77,7 +77,7 @@ void r600UpdateTextureState(GLcontext * ctx)
        }
 }
 
-static GLboolean r600GetTexFormat(struct gl_texture_object *tObj, GLuint mesa_format)
+static GLboolean r600GetTexFormat(struct gl_texture_object *tObj, gl_format mesa_format)
 {
        radeonTexObj *t = radeon_tex_obj(tObj);
 
@@ -479,14 +479,14 @@ static GLboolean r600GetTexFormat(struct gl_texture_object *tObj, GLuint mesa_fo
                         SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
                break;
        case MESA_FORMAT_Z16:
-       case MESA_FORMAT_Z24_S8:
+       case MESA_FORMAT_S8_Z24:
        case MESA_FORMAT_Z32:
                switch (mesa_format) {
                case MESA_FORMAT_Z16:
                        SETfield(t->SQ_TEX_RESOURCE1, FMT_16,
                                 SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
                        break;
-               case MESA_FORMAT_Z24_S8:
+               case MESA_FORMAT_S8_Z24:
                        SETfield(t->SQ_TEX_RESOURCE1, FMT_24_8,
                                 SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
                        break;
index 055f77a24b9984392c58314b151b8d29e2c746a5..4b47e756c7802d9ff8aa34783adb9df0e0de77df 100644 (file)
@@ -878,11 +878,11 @@ static void radeonSetSpanFunctions(struct radeon_renderbuffer *rrb)
                radeonInitDepthPointers_z16(&rrb->base);
        } else if (rrb->base.Format == GL_DEPTH_COMPONENT32) { /* XXX */
                radeonInitDepthPointers_z24(&rrb->base);
-       } else if (rrb->base.Format == MESA_FORMAT_Z24_S8) {
+       } else if (rrb->base.Format == MESA_FORMAT_S8_Z24) {
                radeonInitDepthPointers_z24_s8(&rrb->base);
        } else if (rrb->base.Format == MESA_FORMAT_S8) {
                radeonInitStencilPointers_z24_s8(&rrb->base);
        } else {
-               fprintf(stderr, "radeonSetSpanFunctions: bad actual format: 0x%04X\n", rrb->base.Format);
+               fprintf(stderr, "radeonSetSpanFunctions: bad format: 0x%04X\n", rrb->base.Format);
        }
 }