mesa: remove ctx->Extensions.EXT_pixel_buffer_object capability flag
authorMarek Olšák <marek.olsak@amd.com>
Thu, 17 Nov 2022 16:15:56 +0000 (11:15 -0500)
committerMarge Bot <emma+marge@anholt.net>
Tue, 22 Nov 2022 11:12:28 +0000 (11:12 +0000)
to get rid of the fail path in get_buffer_target.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19844>

src/mesa/main/bufferobj.c
src/mesa/main/consts_exts.h
src/mesa/main/extensions.c
src/mesa/main/extensions_table.h
src/mesa/main/get.c
src/mesa/main/get_hash_params.py
src/mesa/main/version.c

index bb41c51..3948141 100644 (file)
@@ -670,11 +670,8 @@ get_buffer_target(struct gl_context *ctx, GLenum target)
       switch (target) {
       case GL_ARRAY_BUFFER:
       case GL_ELEMENT_ARRAY_BUFFER:
-         break;
       case GL_PIXEL_PACK_BUFFER:
       case GL_PIXEL_UNPACK_BUFFER:
-         if (!ctx->Extensions.EXT_pixel_buffer_object)
-            return NULL;
          break;
       default:
          return NULL;
index ea00879..42ff903 100644 (file)
@@ -178,7 +178,6 @@ struct gl_extensions
    GLboolean EXT_memory_object_win32;
    GLboolean EXT_multisampled_render_to_texture;
    GLboolean EXT_packed_float;
-   GLboolean EXT_pixel_buffer_object;
    GLboolean EXT_provoking_vertex;
    GLboolean EXT_render_snorm;
    GLboolean EXT_semaphore;
index 84fdcf8..6fdc1f2 100644 (file)
@@ -283,7 +283,6 @@ _mesa_init_extensions(struct gl_extensions *extensions)
 
    extensions->EXT_EGL_image_storage = GL_TRUE;
    extensions->EXT_gpu_program_parameters = GL_TRUE;
-   extensions->EXT_pixel_buffer_object = GL_TRUE;
    extensions->EXT_provoking_vertex = GL_TRUE;
    extensions->EXT_stencil_two_side = GL_TRUE;
    extensions->EXT_texture_env_dot3 = GL_TRUE;
index 307b5d3..07b1442 100644 (file)
@@ -102,7 +102,7 @@ EXT(ARB_occlusion_query                     , ARB_occlusion_query
 EXT(ARB_occlusion_query2                    , ARB_occlusion_query2                   , GLL, GLC,  x ,  x , 2003)
 EXT(ARB_parallel_shader_compile             , dummy_true                             , GLL, GLC,  x ,  x , 2015)
 EXT(ARB_pipeline_statistics_query           , ARB_pipeline_statistics_query          , GLL, GLC,  x ,  x , 2014)
-EXT(ARB_pixel_buffer_object                 , EXT_pixel_buffer_object                , GLL, GLC,  x ,  x , 2004)
+EXT(ARB_pixel_buffer_object                 , dummy_true                             , GLL, GLC,  x ,  x , 2004)
 EXT(ARB_point_parameters                    , dummy_true                             , GLL,  x ,  x ,  x , 1997)
 EXT(ARB_point_sprite                        , dummy_true                             , GLL, GLC,  x ,  x , 2003)
 EXT(ARB_polygon_offset_clamp                , ARB_polygon_offset_clamp               , GLL, GLC,  x ,  x , 2017)
@@ -271,7 +271,7 @@ EXT(EXT_occlusion_query_boolean             , ARB_occlusion_query2
 EXT(EXT_packed_depth_stencil                , dummy_true                             , GLL, GLC,  x ,  x , 2005)
 EXT(EXT_packed_float                        , EXT_packed_float                       , GLL, GLC,  x ,  x , 2004)
 EXT(EXT_packed_pixels                       , dummy_true                             , GLL,  x ,  x ,  x , 1997)
-EXT(EXT_pixel_buffer_object                 , EXT_pixel_buffer_object                , GLL, GLC,  x ,  x , 2004)
+EXT(EXT_pixel_buffer_object                 , dummy_true                             , GLL, GLC,  x ,  x , 2004)
 EXT(EXT_point_parameters                    , dummy_true                             , GLL,  x ,  x ,  x , 1997)
 EXT(EXT_polygon_offset_clamp                , ARB_polygon_offset_clamp               , GLL, GLC, ES1, ES2, 2014)
 EXT(EXT_primitive_bounding_box              , OES_primitive_bounding_box             ,  x ,  x ,  x ,  31, 2014)
@@ -409,7 +409,7 @@ EXT(NV_image_formats                        , dummy_true
 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_pixel_buffer_object                  , dummy_true                             ,  x ,  x ,  x , ES2, 2012)
 EXT(NV_primitive_restart                    , NV_primitive_restart                   , GLL,  x ,  x ,  x , 2002)
 EXT(NV_read_buffer                          , dummy_true                             ,  x ,  x ,  x , ES2, 2011)
 EXT(NV_read_depth                           , dummy_true                             ,  x ,  x ,  x , ES2, 2011)
index ae61a18..20b1cc0 100644 (file)
@@ -542,7 +542,6 @@ EXTRA_EXT(ARB_sync);
 EXTRA_EXT(ARB_vertex_shader);
 EXTRA_EXT(EXT_transform_feedback);
 EXTRA_EXT(ARB_transform_feedback3);
-EXTRA_EXT(EXT_pixel_buffer_object);
 EXTRA_EXT(ARB_vertex_program);
 EXTRA_EXT2(ARB_vertex_program, ARB_fragment_program);
 EXTRA_EXT(ARB_color_buffer_float);
index e1ee26e..089cfaa 100644 (file)
@@ -393,8 +393,8 @@ descriptor=[
   [ "ALPHA_TO_COVERAGE_DITHER_MODE_NV", "CONTEXT_ENUM(Multisample.SampleAlphaToCoverageDitherControl ), NO_EXTRA" ],
 
 # GL_EXT_pixel_buffer_object
-  [ "PIXEL_PACK_BUFFER_BINDING_EXT", "LOC_CUSTOM, TYPE_INT, 0, extra_EXT_pixel_buffer_object" ],
-  [ "PIXEL_UNPACK_BUFFER_BINDING_EXT", "LOC_CUSTOM, TYPE_INT, 0, extra_EXT_pixel_buffer_object" ],
+  [ "PIXEL_PACK_BUFFER_BINDING_EXT", "LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA" ],
+  [ "PIXEL_UNPACK_BUFFER_BINDING_EXT", "LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA" ],
 
 # GL_ARB_framebuffer_object or GL_EXT_framebuffer_multisample or GL_EXT_multisampled_render_to_texture
   [ "MAX_SAMPLES", "CONTEXT_INT(Const.MaxSamples), extra_ARB_framebuffer_object_or_EXT_framebuffer_multisample_or_EXT_multisampled_render_to_texture" ],
index a564b8c..05e8a11 100644 (file)
@@ -261,7 +261,6 @@ compute_version(const struct gl_extensions *extensions,
                          extensions->EXT_blend_equation_separate &&
                          extensions->EXT_stencil_two_side);
    const bool ver_2_1 = (ver_2_0 &&
-                         extensions->EXT_pixel_buffer_object &&
                          extensions->EXT_texture_sRGB);
    /* We lie about the minimum number of color attachments. Strictly, OpenGL
     * 3.0 requires 8, whereas OpenGL ES requires 4. OpenGL ES 3.0 class