vega: Rename pipe formats.
authorJosé Fonseca <jfonseca@vmware.com>
Mon, 1 Mar 2010 18:11:46 +0000 (18:11 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 1 Mar 2010 18:53:32 +0000 (18:53 +0000)
src/gallium/state_trackers/vega/api_filters.c
src/gallium/state_trackers/vega/image.c
src/gallium/state_trackers/vega/mask.c
src/gallium/state_trackers/vega/paint.c
src/gallium/state_trackers/vega/vg_tracker.c

index 20c72c1ff5456074462e7175e7c18b61a8a0248c..02248ad4337479ac2bb1bc76e3cee1eb28204f64 100644 (file)
@@ -67,7 +67,7 @@ static INLINE struct pipe_texture *create_texture_1d(struct vg_context *ctx,
 
    memset(&templ, 0, sizeof(templ));
    templ.target = PIPE_TEXTURE_1D;
-   templ.format = PIPE_FORMAT_A8R8G8B8_UNORM;
+   templ.format = PIPE_FORMAT_B8G8R8A8_UNORM;
    templ.last_level = 0;
    templ.width0 = color_data_len;
    templ.height0 = 1;
index 2e10965be4f41768fad8e05cd3aa7adf7c1245c7..41c979bfecf078748b3f76f73a8c3206d90c5c13 100644 (file)
@@ -48,16 +48,16 @@ static enum pipe_format vg_format_to_pipe(VGImageFormat format)
 {
    switch(format) {
    case VG_sRGB_565:
-      return PIPE_FORMAT_R5G6B5_UNORM;
+      return PIPE_FORMAT_B5G6R5_UNORM;
    case VG_sRGBA_5551:
-      return PIPE_FORMAT_A1R5G5B5_UNORM;
+      return PIPE_FORMAT_B5G5R5A1_UNORM;
    case VG_sRGBA_4444:
-      return PIPE_FORMAT_A4R4G4B4_UNORM;
+      return PIPE_FORMAT_B4G4R4A4_UNORM;
    case VG_sL_8:
    case VG_lL_8:
       return PIPE_FORMAT_L8_UNORM;
    case VG_BW_1:
-      return PIPE_FORMAT_A8R8G8B8_UNORM;
+      return PIPE_FORMAT_B8G8R8A8_UNORM;
    case VG_A_8:
       return PIPE_FORMAT_A8_UNORM;
 #ifdef OPENVG_VERSION_1_1
@@ -66,7 +66,7 @@ static enum pipe_format vg_format_to_pipe(VGImageFormat format)
       return PIPE_FORMAT_A8_UNORM;
 #endif
    default:
-      return PIPE_FORMAT_A8R8G8B8_UNORM;
+      return PIPE_FORMAT_B8G8R8A8_UNORM;
    }
 }
 
index 467b95b7519a7fabb1d10df6c38cb8263b9db3b4..839dc19a3b837f5fef1ee42d3c152e1e40cb67ea 100644 (file)
@@ -488,7 +488,7 @@ struct vg_mask_layer * mask_layer_create(VGint width, VGint height)
 
       memset(&pt, 0, sizeof(pt));
       pt.target = PIPE_TEXTURE_2D;
-      pt.format = PIPE_FORMAT_A8R8G8B8_UNORM;
+      pt.format = PIPE_FORMAT_B8G8R8A8_UNORM;
       pt.last_level = 0;
       pt.width0 = width;
       pt.height0 = height;
index 3405d635f0cf1c7c59e40f74f6dad881161fa518..caf0c14b7453cfb697cf1fb9468b9304c5855607 100644 (file)
@@ -151,7 +151,7 @@ static INLINE struct pipe_texture *create_gradient_texture(struct vg_paint *p)
 
    memset(&templ, 0, sizeof(templ));
    templ.target = PIPE_TEXTURE_1D;
-   templ.format = PIPE_FORMAT_A8R8G8B8_UNORM;
+   templ.format = PIPE_FORMAT_B8G8R8A8_UNORM;
    templ.last_level = 0;
    templ.width0 = 1024;
    templ.height0 = 1;
index a94dfb160c9cbf9628fae430872999c38cd2e657..57d3baad7fba47606164f521cd29d83cf52e834d 100644 (file)
@@ -51,7 +51,7 @@ create_texture(struct pipe_context *pipe, enum pipe_format format,
       templ.format = format;
    }
    else {
-      templ.format = PIPE_FORMAT_A8R8G8B8_UNORM;
+      templ.format = PIPE_FORMAT_B8G8R8A8_UNORM;
    }
 
    templ.target = PIPE_TEXTURE_2D;
@@ -186,7 +186,7 @@ struct st_framebuffer * st_create_framebuffer(const void *visual,
       if (stencilFormat == depthFormat)
          stfb->dsrb = st_new_renderbuffer_fb(stencilFormat);
       else
-         stfb->dsrb = st_new_renderbuffer_fb(PIPE_FORMAT_S8Z24_UNORM);
+         stfb->dsrb = st_new_renderbuffer_fb(PIPE_FORMAT_Z24S8_UNORM);
 
       /*### currently we always allocate it but it's possible it's
         not necessary if EGL_ALPHA_MASK_SIZE was 0
@@ -209,12 +209,12 @@ static void setup_new_alpha_mask(struct vg_context *ctx,
    struct pipe_texture *old_texture = stfb->alpha_mask;
 
    /*
-     we use PIPE_FORMAT_A8R8G8B8_UNORM because we want to render to
+     we use PIPE_FORMAT_B8G8R8A8_UNORM because we want to render to
      this texture and use it as a sampler, so while this wastes some
      space it makes both of those a lot simpler
    */
    stfb->alpha_mask =
-      create_texture(pipe, PIPE_FORMAT_A8R8G8B8_UNORM, width, height);
+      create_texture(pipe, PIPE_FORMAT_B8G8R8A8_UNORM, width, height);
 
    if (!stfb->alpha_mask) {
       if (old_texture)
@@ -327,7 +327,7 @@ void st_resize_framebuffer(struct st_framebuffer *stfb,
    setup_new_alpha_mask(ctx, stfb, width, height);
 
    pipe_texture_reference( &stfb->blend_texture, NULL );
-   stfb->blend_texture = create_texture(ctx->pipe, PIPE_FORMAT_A8R8G8B8_UNORM,
+   stfb->blend_texture = create_texture(ctx->pipe, PIPE_FORMAT_B8G8R8A8_UNORM,
                                         width, height);
 }