Mesa (gallium-0.2): cell: fix some problems when displaying to a PIPE_FORMAT_B8G8R8A8_UNORM screen

Brian Paul brianp at kemper.freedesktop.org
Tue Oct 28 00:25:52 UTC 2008


Module: Mesa
Branch: gallium-0.2
Commit: d01324eb78da2d501ce33e2792713225090c84cd
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d01324eb78da2d501ce33e2792713225090c84cd

Author: Brian Paul <brian.paul at tungstengraphics.com>
Date:   Mon Oct 27 18:25:33 2008 -0600

cell: fix some problems when displaying to a PIPE_FORMAT_B8G8R8A8_UNORM screen

---

 src/gallium/drivers/cell/ppu/cell_texture.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/cell/ppu/cell_texture.c b/src/gallium/drivers/cell/ppu/cell_texture.c
index 8ae4439..7734381 100644
--- a/src/gallium/drivers/cell/ppu/cell_texture.c
+++ b/src/gallium/drivers/cell/ppu/cell_texture.c
@@ -310,6 +310,7 @@ cell_twiddle_texture(struct pipe_screen *screen,
 
    switch (ct->base.format) {
    case PIPE_FORMAT_A8R8G8B8_UNORM:
+   case PIPE_FORMAT_B8G8R8A8_UNORM:
       {
          int numFaces = ct->base.target == PIPE_TEXTURE_CUBE ? 6 : 1;
          int offset = bufWidth * bufHeight * 4 * surface->face;
@@ -357,6 +358,7 @@ cell_untwiddle_texture(struct pipe_screen *screen,
 
    switch (ct->base.format) {
    case PIPE_FORMAT_A8R8G8B8_UNORM:
+   case PIPE_FORMAT_B8G8R8A8_UNORM:
       {
          int numFaces = ct->base.target == PIPE_TEXTURE_CUBE ? 6 : 1;
          int offset = surface->stride * texHeight * 4 * surface->face;
@@ -442,6 +444,7 @@ cell_tex_surface_release(struct pipe_screen *screen,
 
    if ((*s)->usage & PIPE_BUFFER_USAGE_CPU_READ) {
       align_free(ct->untiled_data[level]);
+      ct->untiled_data[level] = NULL;
    }
 
    /* XXX if done rendering to teximage, re-tile */




More information about the mesa-commit mailing list