i965: Rename pipe formats.
authorJosé Fonseca <jfonseca@vmware.com>
Mon, 1 Mar 2010 18:12:25 +0000 (18:12 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 1 Mar 2010 18:53:32 +0000 (18:53 +0000)
src/gallium/drivers/i965/brw_misc_state.c
src/gallium/drivers/i965/brw_pipe_clear.c
src/gallium/drivers/i965/brw_screen.c
src/gallium/drivers/i965/brw_screen_texture.c
src/gallium/drivers/i965/brw_wm.c

index e4b24229db3f33e189c32fe17157a43d8e1cde4d..e3f25bdf622c4d570de7aeb9221a7ed5768e0e92 100644 (file)
@@ -265,8 +265,8 @@ static int emit_depthbuffer(struct brw_context *brw)
         format = BRW_DEPTHFORMAT_D16_UNORM;
         cpp = 2;
         break;
-      case PIPE_FORMAT_X8Z24_UNORM:
-      case PIPE_FORMAT_S8Z24_UNORM:
+      case PIPE_FORMAT_Z24X8_UNORM:
+      case PIPE_FORMAT_Z24S8_UNORM:
         format = BRW_DEPTHFORMAT_D24_UNORM_S8_UINT;
         cpp = 4;
         break;
index 452e1e89f93c9c624fd06ea51d10e62573eba8cf..d7048f769b2fde495fd4078d2ee18b3d2f0b5dbc 100644 (file)
@@ -139,8 +139,8 @@ static void zstencil_clear(struct brw_context *brw,
    unsigned value;
 
    switch (bsurface->base.format) {
-   case PIPE_FORMAT_X8Z24_UNORM:
-   case PIPE_FORMAT_S8Z24_UNORM:
+   case PIPE_FORMAT_Z24X8_UNORM:
+   case PIPE_FORMAT_Z24S8_UNORM:
       value = ((unsigned)(depth * MASK24) & MASK24);
       break;
    case PIPE_FORMAT_Z16_UNORM:
@@ -152,8 +152,8 @@ static void zstencil_clear(struct brw_context *brw,
    }
 
    switch (bsurface->base.format) {
-   case PIPE_FORMAT_X8Z24_UNORM:
-   case PIPE_FORMAT_S8Z24_UNORM:
+   case PIPE_FORMAT_Z24X8_UNORM:
+   case PIPE_FORMAT_Z24S8_UNORM:
       value = value | (stencil << 24);
       break;
 
index b03a782a2f61e860e235cc3a8d05223589938a82..66f3aad8b218dfeb75b3075458b3985fa92ea7f7 100644 (file)
@@ -229,15 +229,15 @@ brw_is_format_supported(struct pipe_screen *screen,
       PIPE_FORMAT_L16_UNORM,
       /*PIPE_FORMAT_I16_UNORM,*/
       /*PIPE_FORMAT_A16_UNORM,*/
-      PIPE_FORMAT_A8L8_UNORM,
-      PIPE_FORMAT_R5G6B5_UNORM,
-      PIPE_FORMAT_A1R5G5B5_UNORM,
-      PIPE_FORMAT_A4R4G4B4_UNORM,
-      PIPE_FORMAT_X8R8G8B8_UNORM,
-      PIPE_FORMAT_A8R8G8B8_UNORM,
+      PIPE_FORMAT_L8A8_UNORM,
+      PIPE_FORMAT_B5G6R5_UNORM,
+      PIPE_FORMAT_B5G5R5A1_UNORM,
+      PIPE_FORMAT_B4G4R4A4_UNORM,
+      PIPE_FORMAT_B8G8R8X8_UNORM,
+      PIPE_FORMAT_B8G8R8A8_UNORM,
       /* video */
-      PIPE_FORMAT_YCBCR,
-      PIPE_FORMAT_YCBCR_REV,
+      PIPE_FORMAT_UYVY,
+      PIPE_FORMAT_YUYV,
       /* compressed */
       /*PIPE_FORMAT_FXT1_RGBA,*/
       PIPE_FORMAT_DXT1_RGB,
@@ -245,14 +245,14 @@ brw_is_format_supported(struct pipe_screen *screen,
       PIPE_FORMAT_DXT3_RGBA,
       PIPE_FORMAT_DXT5_RGBA,
       /* sRGB */
-      PIPE_FORMAT_R8G8B8A8_SRGB,
-      PIPE_FORMAT_A8L8_SRGB,
+      PIPE_FORMAT_A8B8G8R8_SRGB,
+      PIPE_FORMAT_L8A8_SRGB,
       PIPE_FORMAT_L8_SRGB,
       PIPE_FORMAT_DXT1_SRGB,
       /* depth */
       PIPE_FORMAT_Z32_FLOAT,
-      PIPE_FORMAT_X8Z24_UNORM,
-      PIPE_FORMAT_S8Z24_UNORM,
+      PIPE_FORMAT_Z24X8_UNORM,
+      PIPE_FORMAT_Z24S8_UNORM,
       PIPE_FORMAT_Z16_UNORM,
       /* signed */
       PIPE_FORMAT_R8G8_SNORM,
@@ -260,15 +260,15 @@ brw_is_format_supported(struct pipe_screen *screen,
       PIPE_FORMAT_NONE  /* list terminator */
    };
    static const enum pipe_format render_supported[] = {
-      PIPE_FORMAT_X8R8G8B8_UNORM,
-      PIPE_FORMAT_A8R8G8B8_UNORM,
-      PIPE_FORMAT_R5G6B5_UNORM,
+      PIPE_FORMAT_B8G8R8X8_UNORM,
+      PIPE_FORMAT_B8G8R8A8_UNORM,
+      PIPE_FORMAT_B5G6R5_UNORM,
       PIPE_FORMAT_NONE  /* list terminator */
    };
    static const enum pipe_format depth_supported[] = {
       PIPE_FORMAT_Z32_FLOAT,
-      PIPE_FORMAT_X8Z24_UNORM,
-      PIPE_FORMAT_S8Z24_UNORM,
+      PIPE_FORMAT_Z24X8_UNORM,
+      PIPE_FORMAT_Z24S8_UNORM,
       PIPE_FORMAT_Z16_UNORM,
       PIPE_FORMAT_NONE  /* list terminator */
    };
index 38e99613981348e05f7c5bed81f5f96bafc4ca5b..e38fdf1869bbca6c29b5ea313a08967768725e0a 100644 (file)
@@ -85,32 +85,32 @@ static GLuint translate_tex_format( enum pipe_format pf )
       return BRW_SURFACEFORMAT_A16_UNORM; 
       */
 
-   case PIPE_FORMAT_A8L8_UNORM:
+   case PIPE_FORMAT_L8A8_UNORM:
       return BRW_SURFACEFORMAT_L8A8_UNORM;
 
-   case PIPE_FORMAT_R5G6B5_UNORM:
+   case PIPE_FORMAT_B5G6R5_UNORM:
       return BRW_SURFACEFORMAT_B5G6R5_UNORM;
 
-   case PIPE_FORMAT_A1R5G5B5_UNORM:
+   case PIPE_FORMAT_B5G5R5A1_UNORM:
       return BRW_SURFACEFORMAT_B5G5R5A1_UNORM;
 
-   case PIPE_FORMAT_A4R4G4B4_UNORM:
+   case PIPE_FORMAT_B4G4R4A4_UNORM:
       return BRW_SURFACEFORMAT_B4G4R4A4_UNORM;
 
-   case PIPE_FORMAT_X8R8G8B8_UNORM:
+   case PIPE_FORMAT_B8G8R8X8_UNORM:
       return BRW_SURFACEFORMAT_R8G8B8X8_UNORM;
 
-   case PIPE_FORMAT_A8R8G8B8_UNORM:
+   case PIPE_FORMAT_B8G8R8A8_UNORM:
       return BRW_SURFACEFORMAT_B8G8R8A8_UNORM;
 
    /*
     * Video formats
     */
 
-   case PIPE_FORMAT_YCBCR_REV:
+   case PIPE_FORMAT_YUYV:
       return BRW_SURFACEFORMAT_YCRCB_NORMAL;
 
-   case PIPE_FORMAT_YCBCR:
+   case PIPE_FORMAT_UYVY:
       return BRW_SURFACEFORMAT_YCRCB_SWAPUVY;
 
    /*
@@ -137,10 +137,10 @@ static GLuint translate_tex_format( enum pipe_format pf )
     * sRGB formats
     */
 
-   case PIPE_FORMAT_R8G8B8A8_SRGB:
+   case PIPE_FORMAT_A8B8G8R8_SRGB:
       return BRW_SURFACEFORMAT_B8G8R8A8_UNORM_SRGB;
 
-   case PIPE_FORMAT_A8L8_SRGB:
+   case PIPE_FORMAT_L8A8_SRGB:
       return BRW_SURFACEFORMAT_L8A8_UNORM_SRGB;
 
    case PIPE_FORMAT_L8_SRGB:
@@ -156,8 +156,8 @@ static GLuint translate_tex_format( enum pipe_format pf )
    case PIPE_FORMAT_Z16_UNORM:
          return BRW_SURFACEFORMAT_I16_UNORM;
 
-   case PIPE_FORMAT_S8Z24_UNORM:
-   case PIPE_FORMAT_X8Z24_UNORM:
+   case PIPE_FORMAT_Z24S8_UNORM:
+   case PIPE_FORMAT_Z24X8_UNORM:
          return BRW_SURFACEFORMAT_I24X8_UNORM;
 
    case PIPE_FORMAT_Z32_FLOAT:
index 5164c90ed60cf6261d41dd25a7a52d9df8dfc401..dfb718e64fe7d6b0991d8c289615faca233b5885 100644 (file)
@@ -254,10 +254,10 @@ static void brw_wm_populate_key( struct brw_context *brw,
    for (i = 0; i < brw->curr.num_textures; i++) {
       const struct brw_texture *tex = brw_texture(brw->curr.texture[i]);
         
-      if (tex->base.format == PIPE_FORMAT_YCBCR)
+      if (tex->base.format == PIPE_FORMAT_UYVY)
         key->yuvtex_mask |= 1 << i;
 
-      if (tex->base.format == PIPE_FORMAT_YCBCR_REV)
+      if (tex->base.format == PIPE_FORMAT_YUYV)
         key->yuvtex_swap_mask |= 1 << i;
 
       /* XXX: shadow texture