Mesa (master): st/mesa: set the correct window renderbuffer internal format

Marek Olšák mareko at kemper.freedesktop.org
Mon Jul 23 17:26:55 UTC 2012


Module: Mesa
Branch: master
Commit: 07b9b3c37b33e4994ff71930aed77821e758f0c9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=07b9b3c37b33e4994ff71930aed77821e758f0c9

Author: Marek Olšák <maraeo at gmail.com>
Date:   Sun Jul 22 01:08:49 2012 +0200

st/mesa: set the correct window renderbuffer internal format

The multisample-resolve blit relies on this being correct.

Reviewed-by: Brian Paul <brianp at vmware.com>

---

 src/mesa/state_tracker/st_cb_fbo.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
index e1818ab..7eef5c6 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -291,13 +291,21 @@ st_new_renderbuffer_fb(enum pipe_format format, int samples, boolean sw)
    case PIPE_FORMAT_R8G8B8A8_UNORM:
    case PIPE_FORMAT_B8G8R8A8_UNORM:
    case PIPE_FORMAT_A8R8G8B8_UNORM:
+      strb->Base.InternalFormat = GL_RGBA8;
+      break;
    case PIPE_FORMAT_R8G8B8X8_UNORM:
    case PIPE_FORMAT_B8G8R8X8_UNORM:
    case PIPE_FORMAT_X8R8G8B8_UNORM:
+      strb->Base.InternalFormat = GL_RGB8;
+      break;
    case PIPE_FORMAT_B5G5R5A1_UNORM:
+      strb->Base.InternalFormat = GL_RGB5_A1;
+      break;
    case PIPE_FORMAT_B4G4R4A4_UNORM:
+      strb->Base.InternalFormat = GL_RGBA4;
+      break;
    case PIPE_FORMAT_B5G6R5_UNORM:
-      strb->Base.InternalFormat = GL_RGBA;
+      strb->Base.InternalFormat = GL_RGB565;
       break;
    case PIPE_FORMAT_Z16_UNORM:
       strb->Base.InternalFormat = GL_DEPTH_COMPONENT16;




More information about the mesa-commit mailing list