mesa: GL_EXT_packed_depth_stencil is not optional
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 13 Nov 2013 22:10:34 +0000 (14:10 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Sat, 21 Dec 2013 00:43:08 +0000 (16:43 -0800)
Every driver supports it.  All current and future Gallium drivers always
support it, and all existing classic drivers support it.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 files changed:
src/mesa/drivers/dri/i915/intel_extensions.c
src/mesa/drivers/dri/i965/intel_extensions.c
src/mesa/drivers/dri/nouveau/nouveau_context.c
src/mesa/drivers/dri/r200/r200_context.c
src/mesa/drivers/dri/radeon/radeon_context.c
src/mesa/main/extensions.c
src/mesa/main/fbobject.c
src/mesa/main/glformats.c
src/mesa/main/mtypes.h
src/mesa/main/teximage.c
src/mesa/main/texparam.c
src/mesa/state_tracker/st_extensions.c

index 1e48231ba6e1eed14b754f398e81496e39ed39bc..a5cff703aea9327c97fce355bc23500ee92e45cf 100644 (file)
@@ -65,7 +65,6 @@ intelInitExtensions(struct gl_context *ctx)
    ctx->Extensions.EXT_blend_minmax = true;
    ctx->Extensions.EXT_framebuffer_blit = true;
    ctx->Extensions.EXT_gpu_program_parameters = true;
-   ctx->Extensions.EXT_packed_depth_stencil = true;
    ctx->Extensions.EXT_pixel_buffer_object = true;
    ctx->Extensions.EXT_point_parameters = true;
    ctx->Extensions.EXT_provoking_vertex = true;
index 1ad3f49fbfc1c742a5215cf757e9eb3f9ee04322..de07b7fdab8a1e030c2dee436b55155b4b6979d9 100644 (file)
@@ -209,7 +209,6 @@ intelInitExtensions(struct gl_context *ctx)
    ctx->Extensions.EXT_framebuffer_blit = true;
    ctx->Extensions.EXT_framebuffer_sRGB = true;
    ctx->Extensions.EXT_gpu_program_parameters = true;
-   ctx->Extensions.EXT_packed_depth_stencil = true;
    ctx->Extensions.EXT_packed_float = true;
    ctx->Extensions.EXT_pixel_buffer_object = true;
    ctx->Extensions.EXT_point_parameters = true;
index 18c6e776f2bf0bccb9d248a65977b8991566300f..181c9d0f2e4a48cf79f585bdae790d65f8faf93c 100644 (file)
@@ -185,7 +185,6 @@ nouveau_context_init(struct gl_context *ctx, struct nouveau_screen *screen,
        ctx->Extensions.EXT_blend_color = true;
        ctx->Extensions.EXT_blend_minmax = true;
        ctx->Extensions.EXT_framebuffer_blit = true;
-       ctx->Extensions.EXT_packed_depth_stencil = true;
        ctx->Extensions.EXT_texture_filter_anisotropic = true;
        ctx->Extensions.NV_texture_env_combine4 = true;
 
index 331214b76e5bdd5766e9ebadee1c2e236bca31cb..5c53720d1b1c2cc6fe20de8a4c7032f8937b933e 100644 (file)
@@ -383,7 +383,6 @@ GLboolean r200CreateContext( gl_api api,
    ctx->Extensions.EXT_blend_func_separate = true;
    ctx->Extensions.EXT_blend_minmax = true;
    ctx->Extensions.EXT_gpu_program_parameters = true;
-   ctx->Extensions.EXT_packed_depth_stencil = true;
    ctx->Extensions.EXT_point_parameters = true;
    ctx->Extensions.EXT_texture_env_dot3 = true;
    ctx->Extensions.EXT_texture_filter_anisotropic = true;
index cc1e62f54cdda8da45c1fe20326fe33d9c064592..02dbe0644218b90e9ca544877d42c9185218c354 100644 (file)
@@ -336,7 +336,6 @@ r100CreateContext( gl_api api,
    ctx->Extensions.ARB_texture_mirror_clamp_to_edge = true;
    ctx->Extensions.ATI_texture_env_combine3 = true;
    ctx->Extensions.ATI_texture_mirror_once = true;
-   ctx->Extensions.EXT_packed_depth_stencil = true;
    ctx->Extensions.EXT_texture_env_dot3 = true;
    ctx->Extensions.EXT_texture_filter_anisotropic = true;
    ctx->Extensions.EXT_texture_mirror_clamp = true;
index 16962d63c09a8284bab00b5e6b3d1405a3014528..f0e1858e420a781b9a7c2ae75786a15978e52786 100644 (file)
@@ -201,7 +201,7 @@ static const struct extension extension_table[] = {
    { "GL_EXT_gpu_shader4",                         o(EXT_gpu_shader4),                         GL,             2006 },
    { "GL_EXT_map_buffer_range",                    o(ARB_map_buffer_range),                          ES1 | ES2, 2012 },
    { "GL_EXT_multi_draw_arrays",                   o(dummy_true),                              GLL | ES1 | ES2, 1999 },
-   { "GL_EXT_packed_depth_stencil",                o(EXT_packed_depth_stencil),                GL,             2005 },
+   { "GL_EXT_packed_depth_stencil",                o(dummy_true),                              GL,             2005 },
    { "GL_EXT_packed_float",                        o(EXT_packed_float),                        GL,             2004 },
    { "GL_EXT_packed_pixels",                       o(dummy_true),                              GLL,            1997 },
    { "GL_EXT_pixel_buffer_object",                 o(EXT_pixel_buffer_object),                 GL,             2004 },
@@ -274,7 +274,7 @@ static const struct extension extension_table[] = {
    { "GL_OES_framebuffer_object",                  o(dummy_true),                                   ES1,       2005 },
    { "GL_OES_get_program_binary",                  o(dummy_true),                                         ES2, 2008 },
    { "GL_OES_mapbuffer",                           o(dummy_true),                                   ES1 | ES2, 2005 },
-   { "GL_OES_packed_depth_stencil",                o(EXT_packed_depth_stencil),                     ES1 | ES2, 2007 },
+   { "GL_OES_packed_depth_stencil",                o(dummy_true),                                   ES1 | ES2, 2007 },
    { "GL_OES_point_size_array",                    o(dummy_true),                                   ES1,       2004 },
    { "GL_OES_point_sprite",                        o(ARB_point_sprite),                             ES1,       2004 },
    { "GL_OES_query_matrix",                        o(dummy_true),                                   ES1,       2003 },
@@ -334,7 +334,7 @@ static const struct extension extension_table[] = {
    { "GL_NV_fog_distance",                         o(NV_fog_distance),                         GLL,            2001 },
    { "GL_NV_fragment_program_option",              o(NV_fragment_program_option),              GLL,            2005 },
    { "GL_NV_light_max_exponent",                   o(dummy_true),                              GLL,            1999 },
-   { "GL_NV_packed_depth_stencil",                 o(EXT_packed_depth_stencil),                GL,             2000 },
+   { "GL_NV_packed_depth_stencil",                 o(dummy_true),                              GL,             2000 },
    { "GL_NV_point_sprite",                         o(NV_point_sprite),                         GL,             2001 },
    { "GL_NV_primitive_restart",                    o(NV_primitive_restart),                    GLL,            2002 },
    { "GL_NV_read_buffer",                          o(dummy_true),                              ES2,            2011 },
@@ -437,7 +437,6 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
    ctx->Extensions.EXT_depth_bounds_test = GL_TRUE;
    ctx->Extensions.EXT_draw_buffers2 = GL_TRUE;
    ctx->Extensions.EXT_framebuffer_blit = GL_TRUE;
-   ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE;
    ctx->Extensions.EXT_pixel_buffer_object = GL_TRUE;
    ctx->Extensions.EXT_point_parameters = GL_TRUE;
    ctx->Extensions.EXT_provoking_vertex = GL_TRUE;
index 861885dd3f7c98d0673dde0bda9fed7fdfee38ac..1a633556f591eaea676362005ecb530bbd512d7c 100644 (file)
@@ -781,8 +781,7 @@ test_attachment_completeness(const struct gl_context *ctx, GLenum format,
          if (baseFormat == GL_DEPTH_COMPONENT) {
             /* OK */
          }
-         else if (ctx->Extensions.EXT_packed_depth_stencil &&
-                  ctx->Extensions.ARB_depth_texture &&
+         else if (ctx->Extensions.ARB_depth_texture &&
                   baseFormat == GL_DEPTH_STENCIL_EXT) {
             /* OK */
          }
@@ -794,8 +793,7 @@ test_attachment_completeness(const struct gl_context *ctx, GLenum format,
       }
       else {
          ASSERT(format == GL_STENCIL);
-         if (ctx->Extensions.EXT_packed_depth_stencil &&
-             ctx->Extensions.ARB_depth_texture &&
+         if (ctx->Extensions.ARB_depth_texture &&
              baseFormat == GL_DEPTH_STENCIL_EXT) {
             /* OK */
          }
@@ -830,8 +828,7 @@ test_attachment_completeness(const struct gl_context *ctx, GLenum format,
          if (baseFormat == GL_DEPTH_COMPONENT) {
             /* OK */
          }
-         else if (ctx->Extensions.EXT_packed_depth_stencil &&
-                  baseFormat == GL_DEPTH_STENCIL_EXT) {
+         else if (baseFormat == GL_DEPTH_STENCIL_EXT) {
             /* OK */
          }
          else {
@@ -845,8 +842,7 @@ test_attachment_completeness(const struct gl_context *ctx, GLenum format,
          if (baseFormat == GL_STENCIL_INDEX) {
             /* OK */
          }
-         else if (ctx->Extensions.EXT_packed_depth_stencil &&
-                  baseFormat == GL_DEPTH_STENCIL_EXT) {
+         else if (baseFormat == GL_DEPTH_STENCIL_EXT) {
             /* OK */
          }
          else {
@@ -1458,12 +1454,9 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
    case GL_DEPTH_COMPONENT24:
       return GL_DEPTH_COMPONENT;
    case GL_DEPTH_STENCIL_EXT:
-      return _mesa_is_desktop_gl(ctx)
-         && ctx->Extensions.EXT_packed_depth_stencil
-         ? GL_DEPTH_STENCIL_EXT : 0;
+      return _mesa_is_desktop_gl(ctx) ? GL_DEPTH_STENCIL_EXT : 0;
    case GL_DEPTH24_STENCIL8_EXT:
-      return ctx->Extensions.EXT_packed_depth_stencil
-         ? GL_DEPTH_STENCIL_EXT : 0;
+      return GL_DEPTH_STENCIL_EXT;
    case GL_DEPTH_COMPONENT32F:
       return ctx->Version >= 30
          || (ctx->API == API_OPENGL_COMPAT && ctx->Extensions.ARB_depth_buffer_float)
index 1ab8b239a871cb5771fd6354e1937f78b9e12869..8eed89bec3e3a5af0989bfe276a5559b50de4ecc 100644 (file)
@@ -1301,9 +1301,6 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx,
       return GL_INVALID_OPERATION;
 
    case GL_UNSIGNED_INT_24_8:
-      if (!ctx->Extensions.EXT_packed_depth_stencil) {
-         return GL_INVALID_ENUM;
-      }
       if (format != GL_DEPTH_STENCIL) {
          return GL_INVALID_OPERATION;
       }
@@ -1485,8 +1482,7 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx,
             return GL_INVALID_OPERATION;
 
       case GL_DEPTH_STENCIL_EXT:
-         if (ctx->Extensions.EXT_packed_depth_stencil &&
-             type == GL_UNSIGNED_INT_24_8)
+         if (type == GL_UNSIGNED_INT_24_8)
             return GL_NO_ERROR;
          else if (ctx->Extensions.ARB_depth_buffer_float &&
              type == GL_FLOAT_32_UNSIGNED_INT_24_8_REV)
index 534c3bc50f717c25889f2003a5d2e5bd62119c60..f93bb56410d764da5da4ac9e040f63cf4be99d7c 100644 (file)
@@ -3408,7 +3408,6 @@ struct gl_extensions
    GLboolean EXT_framebuffer_sRGB;
    GLboolean EXT_gpu_program_parameters;
    GLboolean EXT_gpu_shader4;
-   GLboolean EXT_packed_depth_stencil;
    GLboolean EXT_packed_float;
    GLboolean EXT_pixel_buffer_object;
    GLboolean EXT_point_parameters;
index 211fc798701176ad3e211fca008e6adbbe26b7f7..4e981aa8c908e6b62d6fafe26c88cbe77f7153a2 100644 (file)
@@ -301,7 +301,6 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
       }
    }
 
-   if (ctx->Extensions.EXT_packed_depth_stencil) {
       switch (internalFormat) {
          case GL_DEPTH_STENCIL_EXT:
          case GL_DEPTH24_STENCIL8_EXT:
@@ -309,7 +308,6 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
          default:
             ; /* fallthrough */
       }
-   }
 
    if (ctx->Extensions.EXT_texture_sRGB) {
       switch (internalFormat) {
index 60499aa94ec1828f3bb0fc76696a9819d694a856..c02408c624b89ad70f46269eb15b6a79681173a1 100644 (file)
@@ -1163,9 +1163,6 @@ get_tex_level_parameter_image(struct gl_context *ctx,
          *params = _mesa_get_format_bits(texFormat, pname);
          break;
       case GL_TEXTURE_STENCIL_SIZE_EXT:
-         if (!ctx->Extensions.EXT_packed_depth_stencil &&
-             !ctx->Extensions.ARB_framebuffer_object)
-            goto invalid_pname;
          *params = _mesa_get_format_bits(texFormat, pname);
          break;
       case GL_TEXTURE_SHARED_SIZE:
index c2f3b94b5325ab5399fe3b38fdddbe8130d7551a..5e4a3b39864954a5673f783eaf40469433bc9e37 100644 (file)
@@ -443,11 +443,6 @@ void st_init_extensions(struct st_context *st)
       { { o(ARB_depth_buffer_float) },
         { PIPE_FORMAT_Z32_FLOAT,
           PIPE_FORMAT_Z32_FLOAT_S8X24_UINT } },
-
-      { { o(EXT_packed_depth_stencil) },
-        { PIPE_FORMAT_S8_UINT_Z24_UNORM,
-          PIPE_FORMAT_Z24_UNORM_S8_UINT },
-        GL_TRUE }, /* at least one format must be supported */
    };
 
    /* Required: sampler support */
@@ -764,8 +759,7 @@ void st_init_extensions(struct st_context *st)
                              PIPE_BUFFER, PIPE_BIND_SAMPLER_VIEW);
    }
 
-   if (screen->get_param(screen, PIPE_CAP_MIXED_FRAMEBUFFER_SIZES) &&
-       ctx->Extensions.EXT_packed_depth_stencil) {
+   if (screen->get_param(screen, PIPE_CAP_MIXED_FRAMEBUFFER_SIZES)) {
       ctx->Extensions.ARB_framebuffer_object = GL_TRUE;
    }