mesa: Enable GL_MESA_pack_invert unconditionally

This newly enables the extension for r100 and vieux. As far as I can
tell, that's safe to do. vieux's ReadPixels is just _mesa_readpixels,
which clearly already handles it correctly because the extension is
enabled for classic swrast. r100 has some custom acceleration paths
before falling down to _mesa_readpixels, which winds its way through to
r100_blit, which already has code to handle pack->Invert being set.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3156>
This commit is contained in:
Adam Jackson 2019-12-18 12:58:36 -05:00 committed by Marge Bot
parent 923577c066
commit 4506e4db4d
8 changed files with 2 additions and 9 deletions

View File

@ -70,7 +70,6 @@ intelInitExtensions(struct gl_context *ctx)
ctx->Extensions.EXT_texture_env_dot3 = true;
ctx->Extensions.EXT_texture_filter_anisotropic = true;
ctx->Extensions.APPLE_object_purgeable = true;
ctx->Extensions.MESA_pack_invert = true;
ctx->Extensions.MESA_ycbcr_texture = true;
ctx->Extensions.NV_texture_rectangle = true;
ctx->Extensions.TDFX_texture_compression_FXT1 = true;

View File

@ -126,7 +126,6 @@ intelInitExtensions(struct gl_context *ctx)
ctx->Extensions.APPLE_object_purgeable = true;
ctx->Extensions.ATI_texture_env_combine3 = true;
ctx->Extensions.MESA_framebuffer_flip_y = true;
ctx->Extensions.MESA_pack_invert = true;
ctx->Extensions.NV_conditional_render = true;
ctx->Extensions.NV_fog_distance = true;
ctx->Extensions.NV_primitive_restart = true;

View File

@ -351,7 +351,6 @@ GLboolean r200CreateContext( gl_api api,
ctx->Extensions.EXT_texture_env_dot3 = true;
ctx->Extensions.EXT_texture_filter_anisotropic = true;
ctx->Extensions.EXT_texture_mirror_clamp = true;
ctx->Extensions.MESA_pack_invert = true;
ctx->Extensions.NV_fog_distance = true;
ctx->Extensions.NV_texture_rectangle = true;
ctx->Extensions.OES_EGL_image = true;

View File

@ -177,7 +177,6 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
ctx->Extensions.EXT_texture_swizzle = GL_TRUE;
/*ctx->Extensions.EXT_transform_feedback = GL_TRUE;*/
ctx->Extensions.EXT_vertex_array_bgra = GL_TRUE;
ctx->Extensions.MESA_pack_invert = GL_TRUE;
ctx->Extensions.MESA_ycbcr_texture = GL_TRUE;
ctx->Extensions.NV_conditional_render = GL_TRUE;
ctx->Extensions.NV_point_sprite = GL_TRUE;

View File

@ -364,7 +364,7 @@ EXT(KHR_texture_compression_astc_ldr , KHR_texture_compression_astc_ldr
EXT(KHR_texture_compression_astc_sliced_3d , KHR_texture_compression_astc_sliced_3d , GLL, GLC, x , ES2, 2015)
EXT(MESA_framebuffer_flip_y , MESA_framebuffer_flip_y , 43, 43, x , 30, 2018)
EXT(MESA_pack_invert , MESA_pack_invert , GLL, GLC, x , x , 2002)
EXT(MESA_pack_invert , dummy_true , GLL, GLC, x , x , 2002)
EXT(MESA_shader_integer_functions , MESA_shader_integer_functions , GLL, GLC, x , 30, 2016)
EXT(MESA_texture_signed_rgba , EXT_texture_snorm , GLL, GLC, x , x , 2009)
EXT(MESA_tile_raster_order , MESA_tile_raster_order , GLL, GLC, x , ES2, 2017)

View File

@ -4445,7 +4445,6 @@ struct gl_extensions
GLboolean KHR_texture_compression_astc_sliced_3d;
GLboolean MESA_framebuffer_flip_y;
GLboolean MESA_tile_raster_order;
GLboolean MESA_pack_invert;
GLboolean EXT_shader_framebuffer_fetch;
GLboolean EXT_shader_framebuffer_fetch_non_coherent;
GLboolean MESA_shader_integer_functions;

View File

@ -94,8 +94,7 @@ pixel_storei(GLenum pname, GLint param, bool no_error)
ctx->Pack.Alignment = param;
break;
case GL_PACK_INVERT_MESA:
if (!no_error &&
(!_mesa_is_desktop_gl(ctx) || !ctx->Extensions.MESA_pack_invert))
if (!no_error && !_mesa_is_desktop_gl(ctx))
goto invalid_enum_error;
ctx->Pack.Invert = param;
break;

View File

@ -1079,7 +1079,6 @@ void st_init_extensions(struct pipe_screen *screen,
extensions->ATI_texture_env_combine3 = GL_TRUE;
extensions->MESA_framebuffer_flip_y = GL_TRUE;
extensions->MESA_pack_invert = GL_TRUE;
extensions->NV_copy_image = GL_TRUE;
extensions->NV_fog_distance = GL_TRUE;