[Mesa-dev] [PATCH 4/5] mesa: Clean up bad code formatting left from previous commit

Ian Romanick idr at freedesktop.org
Thu Dec 19 11:39:39 PST 2013


From: Ian Romanick <ian.d.romanick at intel.com>

Also s/_EXT// on enums that are now part of core.  This could probably
be squashed with the previous commit when it is pushed.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 src/mesa/main/fbobject.c  | 20 +++++++++-----------
 src/mesa/main/glformats.c |  2 +-
 src/mesa/main/teximage.c  | 14 +++++++-------
 src/mesa/main/texparam.c  |  2 +-
 4 files changed, 18 insertions(+), 20 deletions(-)

diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 1a63355..2892784 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -782,7 +782,7 @@ test_attachment_completeness(const struct gl_context *ctx, GLenum format,
             /* OK */
          }
          else if (ctx->Extensions.ARB_depth_texture &&
-                  baseFormat == GL_DEPTH_STENCIL_EXT) {
+                  baseFormat == GL_DEPTH_STENCIL) {
             /* OK */
          }
          else {
@@ -794,7 +794,7 @@ test_attachment_completeness(const struct gl_context *ctx, GLenum format,
       else {
          ASSERT(format == GL_STENCIL);
          if (ctx->Extensions.ARB_depth_texture &&
-             baseFormat == GL_DEPTH_STENCIL_EXT) {
+             baseFormat == GL_DEPTH_STENCIL) {
             /* OK */
          }
          else {
@@ -828,7 +828,7 @@ test_attachment_completeness(const struct gl_context *ctx, GLenum format,
          if (baseFormat == GL_DEPTH_COMPONENT) {
             /* OK */
          }
-         else if (baseFormat == GL_DEPTH_STENCIL_EXT) {
+         else if (baseFormat == GL_DEPTH_STENCIL) {
             /* OK */
          }
          else {
@@ -839,10 +839,8 @@ test_attachment_completeness(const struct gl_context *ctx, GLenum format,
       }
       else {
          assert(format == GL_STENCIL);
-         if (baseFormat == GL_STENCIL_INDEX) {
-            /* OK */
-         }
-         else if (baseFormat == GL_DEPTH_STENCIL_EXT) {
+         if (baseFormat == GL_STENCIL_INDEX ||
+             baseFormat == GL_DEPTH_STENCIL) {
             /* OK */
          }
          else {
@@ -1453,10 +1451,10 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
    case GL_DEPTH_COMPONENT16:
    case GL_DEPTH_COMPONENT24:
       return GL_DEPTH_COMPONENT;
-   case GL_DEPTH_STENCIL_EXT:
-      return _mesa_is_desktop_gl(ctx) ? GL_DEPTH_STENCIL_EXT : 0;
-   case GL_DEPTH24_STENCIL8_EXT:
-      return GL_DEPTH_STENCIL_EXT;
+   case GL_DEPTH_STENCIL:
+      return _mesa_is_desktop_gl(ctx) ? GL_DEPTH_STENCIL : 0;
+   case GL_DEPTH24_STENCIL8:
+      return GL_DEPTH_STENCIL;
    case GL_DEPTH_COMPONENT32F:
       return ctx->Version >= 30
          || (ctx->API == API_OPENGL_COMPAT && ctx->Extensions.ARB_depth_buffer_float)
diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
index 8eed89b..bec7a9b 100644
--- a/src/mesa/main/glformats.c
+++ b/src/mesa/main/glformats.c
@@ -1481,7 +1481,7 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx,
          else
             return GL_INVALID_OPERATION;
 
-      case GL_DEPTH_STENCIL_EXT:
+      case GL_DEPTH_STENCIL:
          if (type == GL_UNSIGNED_INT_24_8)
             return GL_NO_ERROR;
          else if (ctx->Extensions.ARB_depth_buffer_float &&
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 4e981aa..9c3f1e8 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -301,13 +301,13 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
       }
    }
 
-      switch (internalFormat) {
-         case GL_DEPTH_STENCIL_EXT:
-         case GL_DEPTH24_STENCIL8_EXT:
-            return GL_DEPTH_STENCIL_EXT;
-         default:
-            ; /* fallthrough */
-      }
+   switch (internalFormat) {
+   case GL_DEPTH_STENCIL:
+   case GL_DEPTH24_STENCIL8:
+      return GL_DEPTH_STENCIL;
+   default:
+      ; /* fallthrough */
+   }
 
    if (ctx->Extensions.EXT_texture_sRGB) {
       switch (internalFormat) {
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index c02408c..94e498d 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -1162,7 +1162,7 @@ get_tex_level_parameter_image(struct gl_context *ctx,
             goto invalid_pname;
          *params = _mesa_get_format_bits(texFormat, pname);
          break;
-      case GL_TEXTURE_STENCIL_SIZE_EXT:
+      case GL_TEXTURE_STENCIL_SIZE:
          *params = _mesa_get_format_bits(texFormat, pname);
          break;
       case GL_TEXTURE_SHARED_SIZE:
-- 
1.8.1.4



More information about the mesa-dev mailing list