summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/platform_surfaceless.c
Commit message (Collapse)AuthorAgeFilesLines
* egl/surfaceless: Fix segfault in eglSwapBuffersChad Versace2016-10-181-0/+12
| | | | | | | | | | | Since commit 63c5d5c6c46c8472ee7a8241a0f80f13d79cb8cd, the surfaceless platform has allowed creation of pbuffer surfaces. But the vtable entry for eglSwapBuffers has remained NULL. Discovered by running a little pbuffer test. Cc: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* loader: remove loader_get_driver_for_fd() driver_typeEmil Velikov2016-10-181-1/+1
| | | | | | | | | | | | | | Reminiscent from the pre-loader days, were we had multiple instances of the loader logic in separate places and one could build a "GALLIUM_ONLY" version. Since that is no longer the case and the loaders (glx/egl/gbm) do not (and should not) require to know any classic/gallium specific we can drop the argument and the related code. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Axel Davy <axel.davy@ens.fr> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
* egl/surfaceless: Fix comparison between pointer and integerChad Versace2016-10-161-1/+1
| | | | | | | | | Fixes GCC warning: drivers/dri2/platform_surfaceless.c:196:18: warning: comparison between pointer and integer Fixes: 4b8a55809eb ("egl/surfaceless: tweak surfaceless_add_configs_for_visuals()") Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* egl/surfaceless: use correct index when accesing the visualEmil Velikov2016-10-161-1/+1
| | | | | | | | | | i is used for the driver_configs, while j is for the visuals. Fixes: 4b8a55809eb ("egl/surfaceless: tweak surfaceless_add_configs_for_visuals()") Reported-by: Chad Versace <chadversary@chromium.org> Tested-by: Chad Versace <chadversary@chromium.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* egl/surfaceless: tweak surfaceless_add_configs_for_visuals()Emil Velikov2016-10-141-7/+8
| | | | | | | | | | | Analogous to previous commit. v2: Use correct comparison in loop conditional (Eric) Use valid C initializer (Gurchetan) Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* egl/surfaceless: print out a message on zero configs for given formatEmil Velikov2016-10-141-9/+18
| | | | | | | | | | | | Currently we print a debug message if the total configs is non-zero only to do the same (at an error level) as we return from the function. Rework the message to print if we're missing a config for the given format. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* egl/dri2: rework dri2_egl_display::extensions storageEmil Velikov2016-10-141-4/+8
| | | | | | | | | | | Remove the error prone fixed size array. While we're here also rename to loader_extensions like in the GLX code. v2: Rebase. Keep image_loader_extension within the wayland_drm dri2_loader_extensions list. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* egl/surfaceless: trivial coding style fixesEmil Velikov2016-10-141-4/+1
| | | | | | | | | Remove a few gratious blank lines and use the correct level of indentation. Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* egl/surfaceless: don't check the mask(s) prior to calling dri2_add_configEmil Velikov2016-10-141-20/+3
| | | | | | | | | | | The latter already does it for us. As we're here annotate the masks as const and use unsigned for the index(es). Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* egl/surfaceless: remove unused dri2_loader_extension implementationEmil Velikov2016-10-141-33/+0
| | | | | | | | | Earlier commit introduced support for image_loader and left the dri2_loader code dangling/unused. Let's remove it. Fixes: 63c5d5c6c46 ("Added pbuffer hooks for surfaceless platform") Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
* egl/android: don't populate dri2_dpy->dri2_loader_extensionEmil Velikov2016-10-141-0/+8
| | | | | | | | The extension stored in struct dri2_egl_display isn't used, thus we can create a static const instance of the extension and point extensions[] to it. Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
* egl/dri2: move surface refcounting out of the platform codeEmil Velikov2016-10-141-3/+0
| | | | | | | | All the platforms are duplicating what should be a driver/dri2 thing - refcounting. Just fold it accordingly. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* egl/surfaceless: Set disp->DriverData to NULL on errorNicolas Boichat2016-08-151-0/+1
| | | | | | | | | | Avoid use-after-free on error. Fixes: 9ee683f877 (egl/dri2: Add reference count for dri2_egl_display) Cc: "12.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Martin Peres <martin.peres@linux.intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* Added pbuffer hooks for surfaceless platformGurchetan Singh2016-06-141-4/+209
| | | | | | | | | | This change enables the creation of pbuffer surfaces on the surfaceless platform. v3: Going back to single-buffered pbuffer plus additional code review changes Reviewed-by: Chad Versace <chad.versace@intel.com>
* egl: Remove every double semi-colonJakob Sinclair2016-04-261-1/+1
| | | | | | | | Removes all accidental semi-colons in egl. Signed-off-by: Jakob Sinclair <sinclair.jakob@openmailbox.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
* egl: Use the loader_open_device() helper to do open with CLOEXECDerek Foreman2015-06-231-10/+1
| | | | | | | | | | | We've moved the open with CLOEXEC idiom into a helper function, so call it instead of duplicating the code. This also replaces a couple of opens that didn't properly do CLOEXEC. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* egl/dri2: implement platform_surfacelessHaixia Shi2015-06-161-0/+171
The surfaceless platform is for off-screen rendering only. Render node support is required. Only consider the render nodes. Do not use normal nodes as they require auth hooks. v3: change platform_null to platform_surfaceless v4: make libdrm required for surfaceless v5: remove modified include guards with defined(HAVE_SURFACELESS_PLATFORM) v6: use O_CLOEXEC for drm fd Signed-off-by: Haixia Shi <hshi@chromium.org> Signed-off-by: Zach Reizner <zachr@google.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>