mesa: Enable GL_NV_pack_subimage

This just legalizes a few of the pixelstore pack parameters in GLES2
that are already legal in desktop and GLES3. glamor takes advantage of
this in the GetImage and software-fallback paths.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14977>
This commit is contained in:
Adam Jackson 2022-02-10 11:11:38 -05:00
parent 606ac8d61e
commit 2eb644e470
3 changed files with 5 additions and 3 deletions

View File

@ -1 +1,2 @@
d3d12 GL4.2
GL_NV_pack_subimage

View File

@ -402,6 +402,7 @@ EXT(NV_fragment_shader_interlock , ARB_fragment_shader_interlock
EXT(NV_half_float , ARB_half_float_vertex , GLL, x, x , x, 2001)
EXT(NV_image_formats , dummy_true , x , x , x , 31, 2014)
EXT(NV_light_max_exponent , dummy_true , GLL, x , x , x , 1999)
EXT(NV_pack_subimage , dummy_true , x , x , x , ES2, 2009)
EXT(NV_packed_depth_stencil , dummy_true , GLL, GLC, x , x , 2000)
EXT(NV_pixel_buffer_object , EXT_pixel_buffer_object , x , x , x , ES2, 2012)
EXT(NV_primitive_restart , NV_primitive_restart , GLL, x , x , x , 2002)

View File

@ -55,7 +55,7 @@ pixel_storei(GLenum pname, GLint param, bool no_error)
ctx->Pack.LsbFirst = param ? GL_TRUE : GL_FALSE;
break;
case GL_PACK_ROW_LENGTH:
if (!no_error && !_mesa_is_desktop_gl(ctx) && !_mesa_is_gles3(ctx))
if (!no_error && ctx->API == API_OPENGLES)
goto invalid_enum_error;
if (!no_error && param<0)
goto invalid_value_error;
@ -69,14 +69,14 @@ pixel_storei(GLenum pname, GLint param, bool no_error)
ctx->Pack.ImageHeight = param;
break;
case GL_PACK_SKIP_PIXELS:
if (!no_error && !_mesa_is_desktop_gl(ctx) && !_mesa_is_gles3(ctx))
if (!no_error && ctx->API == API_OPENGLES)
goto invalid_enum_error;
if (!no_error && param<0)
goto invalid_value_error;
ctx->Pack.SkipPixels = param;
break;
case GL_PACK_SKIP_ROWS:
if (!no_error && !_mesa_is_desktop_gl(ctx) && !_mesa_is_gles3(ctx))
if (!no_error && ctx->API == API_OPENGLES)
goto invalid_enum_error;
if (!no_error && param<0)
goto invalid_value_error;