aboutsummaryrefslogtreecommitdiffstats
path: root/src/glx/glxconfig.c
Commit message (Collapse)AuthorAgeFilesLines
* Revert "glx: convert glx_config_create_list to one big calloc"Andrii Simiklit2020-03-041-26/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 35fc7bdf0e6ad6547e39099e7060a3d89539b56d. 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 <[email protected]> Signed-off-by: Andrii Simiklit <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3406> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3406>
* glx: Eliminate glx_config::{rgb,float,colorIndex}ModeAdam Jackson2019-08-201-1/+1
| | | | | These are redundant with glx_config::renderType, let's just use that consistently.
* glx: convert glx_config_create_list to one big callocAdam Jackson2019-08-201-37/+26
| | | | | | Simpler, less failure prone, less malloc overhead, what's not to like. Reviewed-by: Eric Engestrom <[email protected]>
* glx: convert a malloc+memset to callocAdam Jackson2019-08-201-2/+1
| | | | Reviewed-by: Eric Engestrom <[email protected]>
* glx: Fix parameter documentation of glx_config_create_listAdam Jackson2019-08-201-4/+0
| | | | | | 'minimum_size' is not, in fact, an argument to this function. Reviewed-by: Eric Engestrom <[email protected]>
* glx: Remove #include <GL/glxint.h>Adam Jackson2017-03-281-1/+0
| | | | | | | We're not using anything in it, and we don't want to inherit struct definitions from some other package anyway. Signed-off-by: Adam Jackson <[email protected]>
* Don't cast the return value of malloc/reallocMatt Turner2012-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch has been generated by the following Coccinelle semantic patch: // Don't cast the return value of malloc/realloc. // // Casting the return value of malloc/realloc only stands to hide // errors. @@ type T; expression E1, E2; @@ - (T) ( _mesa_align_calloc(E1, E2) | _mesa_align_malloc(E1, E2) | calloc(E1, E2) | malloc(E1) | realloc(E1, E2) )
* glx/dri: add initial dri interface for GLX_EXT_framebuffer_sRGB.Dave Airlie2011-03-061-2/+2
| | | | This realigns the name of the glx bit to align with the core mesa names.
* glx: add initial GLX_EXT_framebuffer_sRGB support.Dave Airlie2011-03-061-0/+5
| | | | | | | | | | this doesn't bind to drivers yet, just enough to in theory make indirect work against other servers. I'm really not sure what the rules for adding extensions to the known_gl_extensions list as it looks to be missing a few. are these GL extensions that have GLX protocol?? Signed-off-by: Dave Airlie <[email protected]>
* glx: Rename glcontextmodes.[ch] to glxconfig.[ch]Kristian Høgsberg2010-07-281-0/+304