mesa/src/glx
Andrii Simiklit 311c82e192 Revert "glx: convert glx_config_create_list to one big calloc"
This reverts commit 35fc7bdf0e.

Unfortunately mentioned commit introduced a memory leak because
`driwindowsMapConfigs` and `createDriMode` functions allocate
small memory portions for each element:
 21,576 (232 direct, 21,344 indirect) bytes in 1 blocks are definitely lost in loss record 1,411 of 1,414
    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
    by 0x5D4AA09: createDriMode (dri_common.c:291)
    by 0x5D4ABF5: driConvertConfigs (dri_common.c:310)
    by 0x5D58414: dri3_create_screen (dri3_glx.c:945)
    by 0x5D39829: AllocAndFetchScreenConfigs (glxext.c:815)
    by 0x5D39C57: __glXInitialize (glxext.c:941)
    by 0x5D3290A: GetGLXPrivScreenConfig (glxcmds.c:174)
    by 0x5D34F38: glXQueryExtensionsString (glxcmds.c:1307)
    by 0x4F83038: glXQueryExtensionsString (in /usr/local/lib/libGL.so.1.7.0)
    by 0x4F2EA6B: ??? (in /usr/lib/x86_64-linux-gnu/libwaffle-1.so.0.6.0)
    by 0x4F2A0D7: waffle_display_connect (in /usr/lib/x86_64-linux-gnu/libwaffle-1.so.0.6.0)
    by 0x498F42A: wfl_checked_display_connect (piglit-util-waffle.h:74)

There is one more thing which disallow us to easily fix it are different element sizes
for instance: `glx_config_create_list` allocates memory just for `glx_config`,
`driwindowsMapConfigs` for `driwindows_config` and
`createDriMode` for `__GLXDRIconfigPrivate`.
Yes it is possible but size of such fix
will be more big and complex than original one.
So it make sense only if the malloc overhead
really is a big problem there.

Acked-by: Eric Engestrom <eric@engestrom.ch>
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3406>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3406>
2020-03-04 10:19:48 +00:00
..
apple glx: Fix up glXQueryGLXPbufferSGIX on macOS. 2019-08-23 11:05:23 -04:00
tests Revert "glx: Implement GLX_EXT_no_config_context" 2019-09-26 11:07:13 -04:00
windows glx/windows: Fix compilation with -Werror-format 2019-06-07 11:28:48 -07:00
applegl_glx.c Revert "glx: Implement GLX_EXT_no_config_context" 2019-09-26 11:07:13 -04:00
clientattrib.c
clientinfo.c
compsize.c
create_context.c Revert "glx: Implement GLX_EXT_no_config_context" 2019-09-26 11:07:13 -04:00
dri2.c
dri2.h
dri2_glx.c glx: print FPS with 2 decimal places 2020-02-10 19:02:33 -05:00
dri2_priv.h glx: Add missing include guards 2018-10-30 06:19:10 -06:00
dri3_glx.c glx: print FPS with 2 decimal places 2020-02-10 19:02:33 -05:00
dri3_priv.h dri3: Return the current swap interval from glXGetSwapIntervalMESA(). 2019-04-01 16:06:38 -07:00
dri_common.c Revert "glx: Implement GLX_EXT_no_config_context" 2019-09-26 11:07:13 -04:00
dri_common.h glx: add support for GLX_ARB_create_context_no_error (v3) 2019-03-12 19:12:21 -04:00
dri_common_interop.c glx/meson: use full include path for dri_interface.h 2019-03-08 18:00:19 +00:00
dri_common_query_renderer.c glx/meson: use full include path for dri_interface.h 2019-03-08 18:00:19 +00:00
dri_glx.c glx: Move DRI extensions pointer loading to driOpenDriver(). 2018-11-16 15:38:18 -08:00
dri_sarea.h
drisw_glx.c glx/drisw: fix shm put image fallback 2020-02-25 01:23:01 +00:00
drisw_priv.h drisw: Cache the depth of the X drawable 2020-01-23 23:03:13 +00:00
driwindows_glx.c Revert "glx: Implement GLX_EXT_no_config_context" 2019-09-26 11:07:13 -04:00
eval.c
g_glxglvnddispatchfuncs.c Revert "glx: Implement GLX_EXT_no_config_context" 2019-09-26 11:07:13 -04:00
g_glxglvnddispatchindices.h
glx_error.c Revert "glx: Fix synthetic error generation in __glXSendError" 2019-05-08 13:16:44 +10:00
glx_error.h glx: Add missing include guards 2018-10-30 06:19:10 -06:00
glx_pbuffer.c glx: Make __glXGetDrawableAttribute return true sometimes 2019-08-22 13:29:06 -04:00
glx_query.c glx: Fix SEGV due to dereferencing a NULL ptr from XCB-GLX. 2019-09-04 16:00:10 +00:00
glxclient.h glx: Remove unused indirection for glx_context->fillImage 2019-09-12 13:23:32 -04:00
glxcmds.c Revert "glx: Implement GLX_EXT_no_config_context" 2019-09-26 11:07:13 -04:00
glxconfig.c Revert "glx: convert glx_config_create_list to one big calloc" 2020-03-04 10:19:48 +00:00
glxconfig.h glx: Add fields for color shifts 2019-08-21 18:36:57 +00:00
glxcurrent.c Revert "glx: Lift sending the MakeCurrent request to top-level code" 2019-09-26 11:07:42 -04:00
glxext.c glx: Avoid atof() when computing the server's GLX version 2019-09-19 20:50:01 -04:00
glxextensions.c Revert "glx: Implement GLX_EXT_no_config_context" 2019-09-26 11:07:13 -04:00
glxextensions.h Revert "glx: Implement GLX_EXT_no_config_context" 2019-09-26 11:07:13 -04:00
glxglvnd.c glx: fix glvnd pointer types 2019-06-20 17:21:37 +01:00
glxglvnd.h
glxglvnddispatchfuncs.h
glxhash.c meson: Test for random_r() 2019-07-30 11:49:09 -07:00
glxhash.h
indirect_glx.c Revert "glx: Lift sending the MakeCurrent request to top-level code" 2019-09-26 11:07:42 -04:00
indirect_init.h
indirect_texture_compression.c
indirect_transpose_matrix.c
indirect_vertex_array.c
indirect_vertex_array.h
indirect_vertex_array_priv.h
indirect_vertex_program.c
indirect_window_pos.c
meson.build meson: replace last uses of libxmlconfig with idep_xmlconfig 2019-08-03 00:08:37 +00:00
packrender.h
packsingle.h
pixel.c
pixelstore.c
query_renderer.c
render2.c
renderpix.c glx: Remove unused indirection for glx_context->fillImage 2019-09-12 13:23:32 -04:00
SConscript glx: make xf86vidmode mandatory for direct rendering 2018-11-20 11:13:20 +00:00
single2.c
singlepix.c
vertarr.c
XF86dri.c
xf86dri.h
xf86dristr.h
xfont.c glx: Fix drawable lookup bugs in glXUseXFont 2019-09-19 21:06:01 -04:00