Mesa (main): mesa: Enable GL_NV_pack_subimage

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Feb 22 16:14:32 UTC 2022


Module: Mesa
Branch: main
Commit: 2eb644e470e79d2619a71af59c1e6936445cad06
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2eb644e470e79d2619a71af59c1e6936445cad06

Author: Adam Jackson <ajax at redhat.com>
Date:   Thu Feb 10 11:11:38 2022 -0500

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 at gmail.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14977>

---

 docs/relnotes/new_features.txt   | 1 +
 src/mesa/main/extensions_table.h | 1 +
 src/mesa/main/pixelstore.c       | 6 +++---
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt
index cbc77485aba..11393c35c67 100644
--- a/docs/relnotes/new_features.txt
+++ b/docs/relnotes/new_features.txt
@@ -1 +1,2 @@
 d3d12 GL4.2
+GL_NV_pack_subimage
diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
index bb58655a17b..602bdfc68ef 100644
--- a/src/mesa/main/extensions_table.h
+++ b/src/mesa/main/extensions_table.h
@@ -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)
diff --git a/src/mesa/main/pixelstore.c b/src/mesa/main/pixelstore.c
index b16881df727..0f384b5f86e 100644
--- a/src/mesa/main/pixelstore.c
+++ b/src/mesa/main/pixelstore.c
@@ -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;



More information about the mesa-commit mailing list