From: José Fonseca Date: Mon, 1 Mar 2010 18:14:12 +0000 (+0000) Subject: svga: Rename pipe formats. X-Git-Tag: mesa-7.8~271^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b34d138d8453d45f29632d4dcbe040be11265d26;p=platform%2Fupstream%2Fmesa.git svga: Rename pipe formats. --- diff --git a/src/gallium/drivers/svga/svga_pipe_clear.c b/src/gallium/drivers/svga/svga_pipe_clear.c index 409b3b4..8483a3f 100644 --- a/src/gallium/drivers/svga/svga_pipe_clear.c +++ b/src/gallium/drivers/svga/svga_pipe_clear.c @@ -54,7 +54,7 @@ try_clear(struct svga_context *svga, if ((buffers & PIPE_CLEAR_COLOR) && fb->cbufs[0]) { flags |= SVGA3D_CLEAR_COLOR; - util_pack_color(rgba, PIPE_FORMAT_A8R8G8B8_UNORM, &uc); + util_pack_color(rgba, PIPE_FORMAT_B8G8R8A8_UNORM, &uc); rect.w = fb->cbufs[0]->width; rect.h = fb->cbufs[0]->height; @@ -63,7 +63,7 @@ try_clear(struct svga_context *svga, if ((buffers & PIPE_CLEAR_DEPTHSTENCIL) && fb->zsbuf) { flags |= SVGA3D_CLEAR_DEPTH; - if (svga->curr.framebuffer.zsbuf->format == PIPE_FORMAT_Z24S8_UNORM) + if (svga->curr.framebuffer.zsbuf->format == PIPE_FORMAT_S8Z24_UNORM) flags |= SVGA3D_CLEAR_STENCIL; rect.w = MAX2(rect.w, fb->zsbuf->width); diff --git a/src/gallium/drivers/svga/svga_pipe_misc.c b/src/gallium/drivers/svga/svga_pipe_misc.c index 49b43be..95bf0e6 100644 --- a/src/gallium/drivers/svga/svga_pipe_misc.c +++ b/src/gallium/drivers/svga/svga_pipe_misc.c @@ -118,10 +118,10 @@ static void svga_set_framebuffer_state(struct pipe_context *pipe, case PIPE_FORMAT_Z16_UNORM: svga->curr.depthscale = 1.0f / DEPTH_BIAS_SCALE_FACTOR_D16; break; - case PIPE_FORMAT_S8Z24_UNORM: - case PIPE_FORMAT_X8Z24_UNORM: case PIPE_FORMAT_Z24S8_UNORM: case PIPE_FORMAT_Z24X8_UNORM: + case PIPE_FORMAT_S8Z24_UNORM: + case PIPE_FORMAT_X8Z24_UNORM: svga->curr.depthscale = 1.0f / DEPTH_BIAS_SCALE_FACTOR_D24S8; break; case PIPE_FORMAT_Z32_UNORM: diff --git a/src/gallium/drivers/svga/svga_pipe_sampler.c b/src/gallium/drivers/svga/svga_pipe_sampler.c index 224c4f4..acba2b8 100644 --- a/src/gallium/drivers/svga/svga_pipe_sampler.c +++ b/src/gallium/drivers/svga/svga_pipe_sampler.c @@ -201,7 +201,7 @@ static void svga_set_sampler_textures(struct pipe_context *pipe, if (!texture[i]) continue; - if (texture[i]->format == PIPE_FORMAT_A8R8G8B8_SRGB) + if (texture[i]->format == PIPE_FORMAT_B8G8R8A8_SRGB) flag_srgb |= 1 << i; if (texture[i]->target == PIPE_TEXTURE_1D) diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index 414ac52..6022c38 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -196,23 +196,23 @@ svga_translate_format_cap(enum pipe_format format) { switch(format) { - case PIPE_FORMAT_A8R8G8B8_UNORM: + case PIPE_FORMAT_B8G8R8A8_UNORM: return SVGA3D_DEVCAP_SURFACEFMT_A8R8G8B8; - case PIPE_FORMAT_X8R8G8B8_UNORM: + case PIPE_FORMAT_B8G8R8X8_UNORM: return SVGA3D_DEVCAP_SURFACEFMT_X8R8G8B8; - case PIPE_FORMAT_R5G6B5_UNORM: + case PIPE_FORMAT_B5G6R5_UNORM: return SVGA3D_DEVCAP_SURFACEFMT_R5G6B5; - case PIPE_FORMAT_A1R5G5B5_UNORM: + case PIPE_FORMAT_B5G5R5A1_UNORM: return SVGA3D_DEVCAP_SURFACEFMT_A1R5G5B5; - case PIPE_FORMAT_A4R4G4B4_UNORM: + case PIPE_FORMAT_B4G4R4A4_UNORM: return SVGA3D_DEVCAP_SURFACEFMT_A4R4G4B4; case PIPE_FORMAT_Z16_UNORM: return SVGA3D_DEVCAP_SURFACEFMT_Z_D16; - case PIPE_FORMAT_Z24S8_UNORM: + case PIPE_FORMAT_S8Z24_UNORM: return SVGA3D_DEVCAP_SURFACEFMT_Z_D24S8; - case PIPE_FORMAT_Z24X8_UNORM: + case PIPE_FORMAT_X8Z24_UNORM: return SVGA3D_DEVCAP_SURFACEFMT_Z_D24X8; case PIPE_FORMAT_A8_UNORM: @@ -254,8 +254,8 @@ svga_is_format_supported( struct pipe_screen *screen, /* Often unsupported/problematic. This means we end up with the same * visuals for all virtual hardware implementations. */ - case PIPE_FORMAT_A4R4G4B4_UNORM: - case PIPE_FORMAT_A1R5G5B5_UNORM: + case PIPE_FORMAT_B4G4R4A4_UNORM: + case PIPE_FORMAT_B5G5R5A1_UNORM: return FALSE; /* Simulate ability to render into compressed textures */ diff --git a/src/gallium/drivers/svga/svga_screen_texture.c b/src/gallium/drivers/svga/svga_screen_texture.c index 12f3531..e9792e0 100644 --- a/src/gallium/drivers/svga/svga_screen_texture.c +++ b/src/gallium/drivers/svga/svga_screen_texture.c @@ -59,21 +59,21 @@ svga_translate_format(enum pipe_format format) { switch(format) { - case PIPE_FORMAT_A8R8G8B8_UNORM: + case PIPE_FORMAT_B8G8R8A8_UNORM: return SVGA3D_A8R8G8B8; - case PIPE_FORMAT_X8R8G8B8_UNORM: + case PIPE_FORMAT_B8G8R8X8_UNORM: return SVGA3D_X8R8G8B8; /* Required for GL2.1: */ - case PIPE_FORMAT_A8R8G8B8_SRGB: + case PIPE_FORMAT_B8G8R8A8_SRGB: return SVGA3D_A8R8G8B8; - case PIPE_FORMAT_R5G6B5_UNORM: + case PIPE_FORMAT_B5G6R5_UNORM: return SVGA3D_R5G6B5; - case PIPE_FORMAT_A1R5G5B5_UNORM: + case PIPE_FORMAT_B5G5R5A1_UNORM: return SVGA3D_A1R5G5B5; - case PIPE_FORMAT_A4R4G4B4_UNORM: + case PIPE_FORMAT_B4G4R4A4_UNORM: return SVGA3D_A4R4G4B4; @@ -83,9 +83,9 @@ svga_translate_format(enum pipe_format format) */ case PIPE_FORMAT_Z16_UNORM: return SVGA3D_Z_D16; - case PIPE_FORMAT_Z24S8_UNORM: + case PIPE_FORMAT_S8Z24_UNORM: return SVGA3D_Z_D24S8; - case PIPE_FORMAT_Z24X8_UNORM: + case PIPE_FORMAT_X8Z24_UNORM: return SVGA3D_Z_D24X8; case PIPE_FORMAT_A8_UNORM: @@ -111,13 +111,13 @@ SVGA3dSurfaceFormat svga_translate_format_render(enum pipe_format format) { switch(format) { - case PIPE_FORMAT_A8R8G8B8_UNORM: - case PIPE_FORMAT_X8R8G8B8_UNORM: - case PIPE_FORMAT_A1R5G5B5_UNORM: - case PIPE_FORMAT_A4R4G4B4_UNORM: - case PIPE_FORMAT_R5G6B5_UNORM: - case PIPE_FORMAT_Z24S8_UNORM: - case PIPE_FORMAT_Z24X8_UNORM: + case PIPE_FORMAT_B8G8R8A8_UNORM: + case PIPE_FORMAT_B8G8R8X8_UNORM: + case PIPE_FORMAT_B5G5R5A1_UNORM: + case PIPE_FORMAT_B4G4R4A4_UNORM: + case PIPE_FORMAT_B5G6R5_UNORM: + case PIPE_FORMAT_S8Z24_UNORM: + case PIPE_FORMAT_X8Z24_UNORM: case PIPE_FORMAT_Z32_UNORM: case PIPE_FORMAT_Z16_UNORM: case PIPE_FORMAT_L8_UNORM: @@ -403,9 +403,9 @@ svga_texture_blanket(struct pipe_screen * screen, if (sbuf->key.format == 1) - tex->base.format = PIPE_FORMAT_X8R8G8B8_UNORM; + tex->base.format = PIPE_FORMAT_B8G8R8X8_UNORM; else if (sbuf->key.format == 2) - tex->base.format = PIPE_FORMAT_A8R8G8B8_UNORM; + tex->base.format = PIPE_FORMAT_B8G8R8A8_UNORM; pipe_reference_init(&tex->base.reference, 1); tex->base.screen = screen; @@ -462,9 +462,9 @@ svga_screen_texture_wrap_surface(struct pipe_screen *screen, if (format == 1) - tex->base.format = PIPE_FORMAT_X8R8G8B8_UNORM; + tex->base.format = PIPE_FORMAT_B8G8R8X8_UNORM; else if (format == 2) - tex->base.format = PIPE_FORMAT_A8R8G8B8_UNORM; + tex->base.format = PIPE_FORMAT_B8G8R8A8_UNORM; pipe_reference_init(&tex->base.reference, 1); tex->base.screen = screen; diff --git a/src/gallium/drivers/svga/svga_state_framebuffer.c b/src/gallium/drivers/svga/svga_state_framebuffer.c index b4cafb8..7b12c66 100644 --- a/src/gallium/drivers/svga/svga_state_framebuffer.c +++ b/src/gallium/drivers/svga/svga_state_framebuffer.c @@ -70,7 +70,7 @@ static int emit_framebuffer( struct svga_context *svga, return ret; if (curr->zsbuf && - curr->zsbuf->format == PIPE_FORMAT_Z24S8_UNORM) { + curr->zsbuf->format == PIPE_FORMAT_S8Z24_UNORM) { ret = SVGA3D_SetRenderTarget(svga->swc, SVGA3D_RT_STENCIL, curr->zsbuf); if (ret != PIPE_OK) return ret; diff --git a/src/gallium/drivers/svga/svga_state_need_swtnl.c b/src/gallium/drivers/svga/svga_state_need_swtnl.c index dd13a89..d3644fe 100644 --- a/src/gallium/drivers/svga/svga_state_need_swtnl.c +++ b/src/gallium/drivers/svga/svga_state_need_swtnl.c @@ -43,7 +43,7 @@ svga_translate_vertex_format(enum pipe_format format) case PIPE_FORMAT_R32G32_FLOAT: return SVGA3D_DECLTYPE_FLOAT2; case PIPE_FORMAT_R32G32B32_FLOAT: return SVGA3D_DECLTYPE_FLOAT3; case PIPE_FORMAT_R32G32B32A32_FLOAT: return SVGA3D_DECLTYPE_FLOAT4; - case PIPE_FORMAT_B8G8R8A8_UNORM: return SVGA3D_DECLTYPE_D3DCOLOR; + case PIPE_FORMAT_A8R8G8B8_UNORM: return SVGA3D_DECLTYPE_D3DCOLOR; case PIPE_FORMAT_R8G8B8A8_USCALED: return SVGA3D_DECLTYPE_UBYTE4; case PIPE_FORMAT_R16G16_SSCALED: return SVGA3D_DECLTYPE_SHORT2; case PIPE_FORMAT_R16G16B16A16_SSCALED: return SVGA3D_DECLTYPE_SHORT4;