Mesa (master): intel: Merge identical cases in switch statement.

Brian Paul brianp at kemper.freedesktop.org
Thu Aug 26 14:44:20 UTC 2010


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

Author: Nick Bowler <nbowler at draconx.ca>
Date:   Wed Aug 25 06:14:42 2010 -0700

intel: Merge identical cases in switch statement.

Signed-off-by: Nick Bowler <nbowler at draconx.ca>
Signed-off-by: Brian Paul <brianp at vmware.com>

---

 src/mesa/drivers/dri/intel/intel_fbo.c |   16 +++++-----------
 1 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 6435857..2693b5f 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -137,27 +137,21 @@ intel_alloc_renderbuffer_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
       rb->Format = MESA_FORMAT_A8;
       rb->DataType = GL_UNSIGNED_BYTE;
       break;
+   case GL_DEPTH_COMPONENT16:
+      rb->Format = MESA_FORMAT_Z16;
+      rb->DataType = GL_UNSIGNED_SHORT;
+      break;
    case GL_STENCIL_INDEX:
    case GL_STENCIL_INDEX1_EXT:
    case GL_STENCIL_INDEX4_EXT:
    case GL_STENCIL_INDEX8_EXT:
    case GL_STENCIL_INDEX16_EXT:
-      /* alloc a depth+stencil buffer */
-      rb->Format = MESA_FORMAT_S8_Z24;
-      rb->DataType = GL_UNSIGNED_INT_24_8_EXT;
-      break;
-   case GL_DEPTH_COMPONENT16:
-      rb->Format = MESA_FORMAT_Z16;
-      rb->DataType = GL_UNSIGNED_SHORT;
-      break;
    case GL_DEPTH_COMPONENT:
    case GL_DEPTH_COMPONENT24:
    case GL_DEPTH_COMPONENT32:
-      rb->Format = MESA_FORMAT_S8_Z24;
-      rb->DataType = GL_UNSIGNED_INT_24_8_EXT;
-      break;
    case GL_DEPTH_STENCIL_EXT:
    case GL_DEPTH24_STENCIL8_EXT:
+      /* alloc a depth+stencil buffer */
       rb->Format = MESA_FORMAT_S8_Z24;
       rb->DataType = GL_UNSIGNED_INT_24_8_EXT;
       break;




More information about the mesa-commit mailing list