Commit a92b9e60 authored by Ian Romanick's avatar Ian Romanick

mesa: GL_EXT_packed_depth_stencil is not optional

Every driver supports it.  All current and future Gallium drivers always
support it, and all existing classic drivers support it.
Signed-off-by: default avatarIan Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul's avatarBrian Paul <brianp@vmware.com>
parent b66edff4
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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)
......
......@@ -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)
......
......@@ -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;
......
......@@ -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) {
......
......@@ -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:
......
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment