i915g: Rename pipe formats.
authorJosé Fonseca <jfonseca@vmware.com>
Mon, 1 Mar 2010 18:12:19 +0000 (18:12 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 1 Mar 2010 18:53:32 +0000 (18:53 +0000)
src/gallium/drivers/i915/i915_screen.c
src/gallium/drivers/i915/i915_state_emit.c
src/gallium/drivers/i915/i915_state_sampler.c

index eec2b2895f35956977f98f911d6d99ad63e4e760..72bd2635506d4851d22686ba2eb1f60d3cb9f30d 100644 (file)
@@ -165,22 +165,22 @@ i915_is_format_supported(struct pipe_screen *screen,
                          unsigned geom_flags)
 {
    static const enum pipe_format tex_supported[] = {
-      PIPE_FORMAT_R8G8B8A8_UNORM_REV,
-      PIPE_FORMAT_A8R8G8B8_UNORM,
-      PIPE_FORMAT_R5G6B5_UNORM,
+      PIPE_FORMAT_A8B8G8R8_UNORM,
+      PIPE_FORMAT_B8G8R8A8_UNORM,
+      PIPE_FORMAT_B5G6R5_UNORM,
       PIPE_FORMAT_L8_UNORM,
       PIPE_FORMAT_A8_UNORM,
       PIPE_FORMAT_I8_UNORM,
-      PIPE_FORMAT_A8L8_UNORM,
-      PIPE_FORMAT_YCBCR,
-      PIPE_FORMAT_YCBCR_REV,
-      PIPE_FORMAT_S8Z24_UNORM,
+      PIPE_FORMAT_L8A8_UNORM,
+      PIPE_FORMAT_UYVY,
+      PIPE_FORMAT_YUYV,
+      PIPE_FORMAT_Z24S8_UNORM,
       PIPE_FORMAT_NONE  /* list terminator */
    };
    static const enum pipe_format surface_supported[] = {
-      PIPE_FORMAT_A8R8G8B8_UNORM,
-      PIPE_FORMAT_R5G6B5_UNORM,
-      PIPE_FORMAT_S8Z24_UNORM,
+      PIPE_FORMAT_B8G8R8A8_UNORM,
+      PIPE_FORMAT_B5G6R5_UNORM,
+      PIPE_FORMAT_Z24S8_UNORM,
       PIPE_FORMAT_NONE  /* list terminator */
    };
    const enum pipe_format *list;
index a3d4e3b04e524ad55ff3aeda0a58df3fef31f83a..d2ab530d981d82422a036fca642306dfd108558b 100644 (file)
@@ -37,9 +37,9 @@
 static unsigned translate_format( enum pipe_format format )
 {
    switch (format) {
-   case PIPE_FORMAT_A8R8G8B8_UNORM:
+   case PIPE_FORMAT_B8G8R8A8_UNORM:
       return COLOR_BUF_ARGB8888;
-   case PIPE_FORMAT_R5G6B5_UNORM:
+   case PIPE_FORMAT_B5G6R5_UNORM:
       return COLOR_BUF_RGB565;
    default:
       assert(0);
@@ -50,7 +50,7 @@ static unsigned translate_format( enum pipe_format format )
 static unsigned translate_depth_format( enum pipe_format zformat )
 {
    switch (zformat) {
-   case PIPE_FORMAT_S8Z24_UNORM:
+   case PIPE_FORMAT_Z24S8_UNORM:
       return DEPTH_FRMT_24_FIXED_8_OTHER;
    case PIPE_FORMAT_Z16_UNORM:
       return DEPTH_FRMT_16_FIXED;
@@ -259,7 +259,7 @@ i915_emit_hardware_state(struct i915_context *i915 )
          if (cbuf_surface)
             cformat = cbuf_surface->format;
          else
-            cformat = PIPE_FORMAT_A8R8G8B8_UNORM; /* arbitrary */
+            cformat = PIPE_FORMAT_B8G8R8A8_UNORM; /* arbitrary */
          cformat = translate_format(cformat);
 
          if (depth_surface) 
index e5c6d87215bb57723434fd05c3389fc71a00e81c..9813290b51bcde45eaa97180655a73da98c0ae92 100644 (file)
@@ -87,8 +87,8 @@ static void update_sampler(struct i915_context *i915,
    state[1] = sampler->state[1];
    state[2] = sampler->state[2];
 
-   if (pt->format == PIPE_FORMAT_YCBCR ||
-       pt->format == PIPE_FORMAT_YCBCR_REV)
+   if (pt->format == PIPE_FORMAT_UYVY ||
+       pt->format == PIPE_FORMAT_YUYV)
       state[0] |= SS2_COLORSPACE_CONVERSION;
 
    /* 3D textures don't seem to respect the border color.
@@ -180,19 +180,19 @@ translate_texture_format(enum pipe_format pipeFormat)
       return MAPSURF_8BIT | MT_8BIT_I8;
    case PIPE_FORMAT_A8_UNORM:
       return MAPSURF_8BIT | MT_8BIT_A8;
-   case PIPE_FORMAT_A8L8_UNORM:
+   case PIPE_FORMAT_L8A8_UNORM:
       return MAPSURF_16BIT | MT_16BIT_AY88;
-   case PIPE_FORMAT_R5G6B5_UNORM:
+   case PIPE_FORMAT_B5G6R5_UNORM:
       return MAPSURF_16BIT | MT_16BIT_RGB565;
-   case PIPE_FORMAT_A1R5G5B5_UNORM:
+   case PIPE_FORMAT_B5G5R5A1_UNORM:
       return MAPSURF_16BIT | MT_16BIT_ARGB1555;
-   case PIPE_FORMAT_A4R4G4B4_UNORM:
+   case PIPE_FORMAT_B4G4R4A4_UNORM:
       return MAPSURF_16BIT | MT_16BIT_ARGB4444;
-   case PIPE_FORMAT_A8R8G8B8_UNORM:
+   case PIPE_FORMAT_B8G8R8A8_UNORM:
       return MAPSURF_32BIT | MT_32BIT_ARGB8888;
-   case PIPE_FORMAT_YCBCR_REV:
+   case PIPE_FORMAT_YUYV:
       return (MAPSURF_422 | MT_422_YCRCB_NORMAL);
-   case PIPE_FORMAT_YCBCR:
+   case PIPE_FORMAT_UYVY:
       return (MAPSURF_422 | MT_422_YCRCB_SWAPY);
 #if 0
    case PIPE_FORMAT_RGB_FXT1:
@@ -210,7 +210,7 @@ translate_texture_format(enum pipe_format pipeFormat)
    case PIPE_FORMAT_RGBA_DXT5:
       return (MAPSURF_COMPRESSED | MT_COMPRESS_DXT4_5);
 #endif
-   case PIPE_FORMAT_S8Z24_UNORM:
+   case PIPE_FORMAT_Z24S8_UNORM:
       return (MAPSURF_32BIT | MT_32BIT_xI824);
    default:
       debug_printf("i915: translate_texture_format() bad image format %x\n",