[Mesa-dev] [PATCH 14/25] mesa: expose EXT_memory_object and EXT_memory_object_fd v2

Andres Rodriguez andresx7 at gmail.com
Fri Jul 7 04:24:46 UTC 2017


v2: use PIPE_CAP_MEMOBJ to guard the extension

Signed-off-by: Andres Rodriguez <andresx7 at gmail.com>
---
 src/mesa/main/extensions_table.h       | 2 ++
 src/mesa/main/mtypes.h                 | 2 ++
 src/mesa/state_tracker/st_extensions.c | 5 +++++
 3 files changed, 9 insertions(+)

diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
index 757b7bf..347a619 100644
--- a/src/mesa/main/extensions_table.h
+++ b/src/mesa/main/extensions_table.h
@@ -226,6 +226,8 @@ EXT(EXT_gpu_program_parameters              , EXT_gpu_program_parameters
 EXT(EXT_gpu_shader4                         , EXT_gpu_shader4                        , GLL, GLC,  x ,  x , 2006)
 EXT(EXT_gpu_shader5                         , ARB_gpu_shader5                        ,  x ,  x ,  x ,  31, 2014)
 EXT(EXT_map_buffer_range                    , ARB_map_buffer_range                   ,  x ,  x , ES1, ES2, 2012)
+EXT(EXT_memory_object                       , EXT_memory_object                      , GLL, GLC,  x , ES2, 2017)
+EXT(EXT_memory_object_fd                    , EXT_memory_object_fd                   , GLL, GLC,  x , ES2, 2017)
 EXT(EXT_multi_draw_arrays                   , dummy_true                             , GLL,  x , ES1, ES2, 1999)
 EXT(EXT_packed_depth_stencil                , dummy_true                             , GLL, GLC,  x ,  x , 2005)
 EXT(EXT_packed_float                        , EXT_packed_float                       , GLL, GLC,  x ,  x , 2004)
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 8dcc1a8..463f444 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -4125,6 +4125,8 @@ struct gl_extensions
    GLboolean EXT_framebuffer_sRGB;
    GLboolean EXT_gpu_program_parameters;
    GLboolean EXT_gpu_shader4;
+   GLboolean EXT_memory_object;
+   GLboolean EXT_memory_object_fd;
    GLboolean EXT_packed_float;
    GLboolean EXT_pixel_buffer_object;
    GLboolean EXT_point_parameters;
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 74193cc..b00d7e8 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -1321,4 +1321,9 @@ void st_init_extensions(struct pipe_screen *screen,
       extensions->ARB_texture_cube_map_array &&
       extensions->ARB_texture_stencil8 &&
       extensions->ARB_texture_multisample;
+
+   if (screen->get_param(screen, PIPE_CAP_MEMOBJ)) {
+      extensions->EXT_memory_object = GL_TRUE;
+      extensions->EXT_memory_object_fd = GL_TRUE;
+   }
 }
-- 
2.9.3



More information about the mesa-dev mailing list