mesa: Enable GL_NV_pack_subimage
authorAdam Jackson <ajax@redhat.com>
Thu, 10 Feb 2022 16:11:38 +0000 (11:11 -0500)
committerAdam Jackson <ajax@redhat.com>
Tue, 22 Feb 2022 15:45:28 +0000 (10:45 -0500)
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>

docs/relnotes/new_features.txt
src/mesa/main/extensions_table.h
src/mesa/main/pixelstore.c

index bb58655..602bdfc 100644 (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)
index b16881d..0f384b5 100644 (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;