summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/dri
Commit message (Collapse)AuthorAgeFilesLines
...
* scons: don't build the kms-dri winsysEmil Velikov2015-07-221-1/+0
| | | | | | | | | Same as previous commit - unused (gbm is not a thing outside the autotools build). v2: Remove trailing HAVE_LIBDRM. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* android: don't build the kms-dri winsysEmil Velikov2015-07-221-1/+0
| | | | | | | | | | GBM (the only user of kms-dri) is currently not available under Android. Considering we have no way of testing/using this let's not bother building it for now. Cc: Chih-Wei Huang <cwhuang@linux.org.tw> Cc: Eric Anholt <eric@anholt.net> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* st/dri: unwrap/remove __NOT_HAVE_DRM_H magicEmil Velikov2015-07-224-23/+1
| | | | | | | | | | | | | | | With the dri_interface.h clean of the macro, we can remove the final only st/dri specific use of the very same. Seemingly it was incorrectly used, as the build-time presence of dri2 is not libdrm specific. At run-time, the code is already limited to dri2 use-cases plus returning true, when the extension is not present (or too old) will likely lead to a crash as one tries to use it shortly after the dri_with_format() call. As a side effect this gives us a nice cleanup the builds. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* gallium: replace INLINE with inlineIlia Mirkin2015-07-215-13/+13
| | | | | | | | | | | | | | | | Generated by running: git grep -l INLINE src/gallium/ | xargs sed -i 's/\bINLINE\b/inline/g' git grep -l INLINE src/mesa/state_tracker/ | xargs sed -i 's/\bINLINE\b/inline/g' git checkout src/gallium/state_trackers/clover/Doxyfile and manual edits to src/gallium/include/pipe/p_compiler.h src/gallium/README.portability to remove mentions of the inline define. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Acked-by: Marek Olšák <marek.olsak@amd.com>
* pipe-loader: remove pipe_loader_drm_probe_fd() x_auth argumentEmil Velikov2015-07-131-1/+1
| | | | | | | | No longer used by anyone, as of last commit. Cc: Tom Stellard <thomas.stellard@amd.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
* st/dri: don't set PIPE_BIND_SCANOUT for MSAA surfacesMarek Olšák2015-07-071-1/+1
| | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91231 Reviewed-by: Brian Paul <brianp@vmware.com>
* st/dri: check pscreen is valid before querying paramDave Airlie2015-06-101-1/+1
| | | | | | | | | we don't check the validity of pscreen until dri_init_screen_helper hit this trying to init glamor on a device with no driver (udl). Acked-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* android: add rules to build gallium/state_trackers/driChih-Wei Huang2015-06-091-0/+64
| | | | | Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw> Reviewed-by: Eric Anholt <eric@anholt.net>
* st/dri: fix postprocessing crash when there's no depth bufferMarek Olšák2015-05-291-5/+4
| | | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89131 Cc: 10.6 10.5 <mesa-stable@lists.freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
* st/dri: add support for create_context_robustness GLX and EGL extensionsMarek Olšák2015-05-123-9/+42
| | | | Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* egl/swrast: Enable config extension for swrastAxel Davy2015-05-111-0/+1
| | | | | | | | Enables to use dri config for swrast, like vblank_mode. Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Axel Davy <axel.davy@ens.fr>
* st/dri: implement the fence interface for CL eventsMarek Olšák2015-04-303-1/+81
|
* st/dri: implement the fence interfaceMarek Olšák2015-04-301-0/+80
|
* egl: add initial EGL_MESA_image_dma_buf_export v2.4Dave Airlie2015-04-011-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | At the moment to get an EGL image to a dma-buf file descriptor, you have to use EGL_MESA_drm_image, and then use libdrm to convert this to a file descriptor. This extension just provides an API modelled on EGL_MESA_drm_image, to return a dma-buf file descriptor. v2: update spec for new API proposal add internal queries to get the fourcc back from intel driver. v2.1: add gallium pieces. v2.2: add offsets to spec and API, rename fd->fds, stride->strides in API. rewrite spec a bit more, add some q/a v2.3: add modifiers to query interface and 64-bit type for that (Daniel Stone) specifiy what happens to num fds vs num planes differences. (Chad Versace) v2.4: fix grammar (Daniel Stone) Signed-off-by: Dave Airlie <airlied@redhat.com>
* st/dri: remove unused include from the automake/scons buildEmil Velikov2015-03-162-2/+0
| | | | | | | st/dri/common hasn't been around for a while. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* st/dri: replace Elements() with ARRAY_SIZE()Brian Paul2015-03-021-4/+4
| | | | Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
* gallium/dri: Shut up a compiler warning.Eric Anholt2015-02-181-1/+1
| | | | | | | The compiler doesn't see that buffers is set in the !image case and used in the !image case. Reviewed-by: Matt Turner <mattst88@gmail.com>
* st/dri: Make depth buffer optional for postprocessingPark, Jeongmin2015-02-072-2/+2
| | | | | | Since only pp_jimenezmlaa uses depth buffer, we can make it optional. Signed-off-by: Marek Olšák <marek.olsak@amd.com>
* gallium/postprocessing: fix crash at context destructionMarek Olšák2015-02-061-4/+3
| | | | Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* gallium: Plumb the swap INVALIDATE_ANCILLARY flag through more layers.Eric Anholt2015-01-061-0/+6
| | | | | | | | | v2: Instead of telling the driver that the window system ancillaries have been invalidated (when the driver doesn't know which of its buffers are the window system's!), introduce a method for invalidating specific surfaces. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* st/dri: Support EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR/GLX_CONTEXT_DEBUG_BIT_ARB ↵José Fonseca2014-11-141-3/+3
| | | | | | | | | | | | | on ES contexts. The latest version of the specs explicitly allow it, and given that Mesa universally supports KHR_debug we should definitely support it. Totally untested. (Just happened to noticed this while implementing GLX_EXT_create_context_es2_profile for st/xlib.) Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* targets/pipe-loader: drop unused authenticationEmil Velikov2014-09-241-1/+1
| | | | | | | | | The dri, vdpau, omx, xvmc and gbm targets don't need any authentication even the VL ones never used it. Either the respective loader or the library itself (vl) is doing its auth prior to calling create_screen() Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Matt Turner <mattst88@gmail.com>
* st/dri: remove GALLIUM_MSAA and __GL_FSAA_MODE environment variablesMarek Olšák2014-09-191-35/+0
| | | | | | | | | | | | | | | | | | | | Some users don't understand that these variables can break OpenGL. The general is rule is that if an app supports MSAA, you mustn't use GALLIUM_MSAA. For example, if an app has an 8xMSAA FBO and GALLIUM_MSAA=4 is set, resolving the FBO to the back buffer will be rejected which will look like this on all gallium drivers: http://www.phoronix.com/scan.php?page=article&item=amd_radeonsi_msaa The environment variables also have no effect on modern apps like TF2, but there is still a performance hit due to wasted bandwidth and VRAM. In a nutshell, it does more harm than good. Cc: 10.2 10.3 <mesa-stable@lists.freedesktop.org> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* st/dri: ship the scons buildscript in the release tarballEmil Velikov2014-09-051-0/+2
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Matt Turner <mattst88@gmail.com>
* kms-swrast: Support Prime fd handlingAndreas Pokorny2014-09-051-0/+8
| | | | | | | | Allows using prime fds as display target and from display target. Test for PRIME capability after initializing kms_swrast screen. Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
* st/dri: Add __DRI2rendererQueryExtension supportEmil Velikov2014-08-155-0/+88
| | | | | | | | | | | The final step to get GLX_MESA_query_renderer working with gallium drivers. v2: Remove __DRI2_RENDERER_PREFERRED_PROFILE handling. It's already handled in dri/common. Spotted by Marek. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* st/dri: define GALLIUM_SOFTPIPE when building kms_swrastEmil Velikov2014-08-123-3/+9
| | | | | | | | | | | | | | | To avoid unresolved symbols in the DRI modules with earlier commit we wrapped the innards of dri_kms_init_screen() in a DRI_TARGET/GALLIUM_SOFTPIPE ifdef. At the same time we forgot to adds the defines to the st/dri build systems, breaking kms_swrast and gnome-continuous. Drop the DRI_TARGET define, we're already in st/DRI. Reported-by: Jasper St. Pierre <jstpierre@mecheye.net> Reported-by: Vadim Rutkovsky <vrutkovs@redhat.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* gallium: pass st_config_options to query_versionsMarek Olšák2014-08-113-23/+27
| | | | | | | So move it from dri_context to dri_screen. This will be needed for version computations. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* gallium/stapi: move setting GL versions to the state trackerMarek Olšák2014-08-111-12/+5
| | | | | | | All flags are set for st/mesa, so the state tracker doesn't have to check them. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* util: Gather some common macrosJason Ekstrand2014-08-041-0/+1
| | | | | | | | | | This gathers macros that have been included across components into util so that the include chain can be more vertical. In particular, this makes util stand on its own without any dependence whatsoever on the rest of mesa. Signed-off-by: "Jason Ekstrand" <jason.ekstrand@intel.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* st/dri: Fix driver loading if swrast isn't builtAaron Watry2014-08-031-0/+4
| | | | | | | | | | | | | | | | | | | | If building hardware drivers only, then kms_swrast_create_screen won't be defined in inline_drm_helper.h and hardware drivers will fail to dlopen as a result. Copy the #if guards from inline_drm_helper.h to dri_kms_init_screen to make the definition/use of the function match. Fixes radeonsi_dri.so dlopen with the following configure: ./configure --with-dri-drivers= --with-dri-driverdir=/usr/local/lib/dri/ \ --enable-gbm --enable-gallium-gbm --enable-debug --enable-opencl \ --enable-opencl-icd --with-gallium-drivers=radeonsi \ --with-egl-platforms=drm --enable-glx-tls --enable-texture-float \ --enable-omx Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* dri: Add a new capabilities for drivers that can't share buffersGiovanni Campagna2014-07-302-4/+22
| | | | | | | | | | | | | | | | | | | The kms-dri swrast driver cannot share buffers using the GEM, so it must tell the loader to disable extensions relying on that, without disabling the image DRI extension altogether (which would prevent the loader from working at all). This requires a new gallium capability (which is queried on the pipe_screen and for swrast drivers it's forwarded to the winsys), and requires a new version of the DRI image extension. [Emil Velikov] - Rebased on top of gallium-dri megadrivers. - Drop PIPE_CAP_BUFFER_SHARE and sw_winsys::get_param hook. The can_share_buffer cap is set at InitScreen. We use a different InitScreen (and thus value for the cap) function for kms_dri, due to deeper differences originating from dri megadrivers. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* gallium: Add a dumb drm/kms winsys backed swrast providerGiovanni Campagna2014-07-302-0/+66
| | | | | | | | | | | | | | | | | | | | | | Add a new winsys and target that can be used with a dri2 state tracker and loader instead of drisw. This allows to use gbm as a dri2/image loader and avoid the extra copy from the backbuffer to the shadow frontbuffer. The new driver is called "kms_swrast", and is loaded by gbm as a fallback, because it is only useful with the gbm platform (as no buffer sharing is possible) To force select the driver set the environment variable GBM_ALWAYS_SOFTWARE [Emil Velikov] - Rebase on top of gallium megadriver. - s/text/test/ in configure.ac (Spotted by Andreas Pokorny). - Add scons support for winsys/sw/kms-dri and fix the build. - Provide separate DriverAPI, due to different InitScreen hook. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* st/mesa,gallium: add a workaround for Unigine Heaven 4.0 and Valley 1.0Marek Olšák2014-07-182-0/+3
| | | | | | | Most (all?) Unigine shaders fail to compile without this if sample shading is advertised. This is, of course, Unigine developers' fault. Reviewed-by: Brian Paul <brianp@vmware.com>
* st/dri: merge dri/drm and dri/sw backendsEmil Velikov2014-07-1024-184/+89
| | | | | | | | | | | | | | Move the driver_name to dri2/drisw and remove all the SPLIT_TAGETS mayhem. In the next step we'll unify the dri and dri-swrast targets, completing the gallium DRI megadriver. v2: Remove leftover st/dri Makefiles from CONFIG_FILES. Spotted by Thomas Helland. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Rob Clark <robclark@freedesktop.org> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <thomas.stellard@amd.com>
* targets/dri-swrast: convert to gallium megadrivers :)Emil Velikov2014-07-102-2/+4
| | | | | | | | | | | | | | Export the approapriate new symbol, and keep backwards compat via the megadriver_stub helper library. Our next step would be to unify dri/drm and dri/sw, leading to a complete megadrivers solution, and having a single library that provides dri across all targets. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Rob Clark <robclark@freedesktop.org> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <thomas.stellard@amd.com>
* st/dri/drm: remove __driDriverExtensions and driDriverAPIEmil Velikov2014-07-101-22/+0
| | | | | | | | | | | | ... and use libmegadriver_stub as their provider. Teach scons how to build the library archive and use it. v2: scons: fix build on a drm-less system. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Rob Clark <robclark@freedesktop.org> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <thomas.stellard@amd.com>
* targets/dri: Add __driDriverGetExtensions_nouveau symbolEmil Velikov2014-07-102-0/+24
| | | | | | | | | | | | | The symbol is introduced by the mesa megadrivers, and adding gallium support for it will allow us to merge st/dri/drm and st/dri/sw. Resulting in a single dri library across gallium. v2: Rebase on top of gallium dri3. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Rob Clark <robclark@freedesktop.org> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <thomas.stellard@amd.com>
* st/dri: Remove the old libdridrm libraryEmil Velikov2014-07-021-10/+3
| | | | | | | | | | With all the hw drivers converted, we can go back to having a single libdridrm provider. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Rob Clark <robclark@freedesktop.org> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <thomas.stellard@amd.com>
* targets/dri-vmwgfx: Convert to static/shared pipe-driversEmil Velikov2014-07-021-1/+1
| | | | | | | | | | | | | | | Convert the final hardware driver to a single dri provider which includes all the pipe-drivers. Update the scons build and drop the unused vmw_powf.c. Cc: José Fonseca <jfonseca@vmware.com> Cc: Brian Paul <brianp@vmware.com> Cc: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Rob Clark <robclark@freedesktop.org> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <thomas.stellard@amd.com>
* st/dri/drm: Add a second libdridrm libraryEmil Velikov2014-07-021-1/+9
| | | | | | | | | | | Will be used to create the single dri target library, on our way to convert all the dri targets during the conversion to to static/shared pipe-drivers. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Rob Clark <robclark@freedesktop.org> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <thomas.stellard@amd.com>
* st/dri: Allow separate dri-targetsEmil Velikov2014-07-027-2/+56
| | | | | | | | | | | With this commit we add a couple of DEFINES making the ST code conditional, in a way that we can use it to gradually convert the dri-targets from separate libraries into a single one. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Rob Clark <robclark@freedesktop.org> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <thomas.stellard@amd.com>
* gallium/dri2: implement blitImageAxel Davy2014-06-271-3/+51
| | | | | | | | | V3: call flush_resource before flush V4: Add new flags Signed-off-by: Axel Davy <axel.davy@ens.fr> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* gallium: Add __DRIimageDriverExtension support to galliumAxel Davy2014-06-271-183/+286
| | | | | | | | | | | | | | | | | | __DRIimageDriverExtension is used by GLX DRI3 and Wayland. This patch is a rewrite of http://lists.freedesktop.org/archives/mesa-dev/2014-May/060318.html and http://lists.freedesktop.org/archives/mesa-dev/2014-May/060317.html Previous patches were: Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Axel Davy <axel.davy@ens.fr> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* Make DRI dependencies and build depend on the targetJon TURNEY2014-05-231-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Don't require xcb-dri[23] etc. if we aren't building for a target with DRM, as we won't be using dri[23] - Enable a more fine-grained control of what DRI code is built, so that a libGL using direct swrast can be built on targets which don't have DRM. The HAVE_DRI automake conditional is retired in favour of a number of other conditionals: HAVE_DRI2 enables building of code using the DRI2 interface (and possibly DRI3 with HAVE_DRI3) HAVE_DRISW enables building of DRI swrast HAVE_DRICOMMON enables building of target-independent DRI code, and also enables some makefile cases where a more detailled decision is made at a lower level. HAVE_APPLEDRI enables building of an Apple-specific direct rendering interface, still which requires additional fixing up to build properly. v2: Place xfont.c and drisw_glx.c into correct categories. Update 'make check' as well Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* targets/dri: use a single version script to restict exported symbolsEmil Velikov2014-05-021-5/+0
| | | | | | | | | Rather than having multiple (almost) identical version scripts use a single one. Cc: Christian König <christian.koenig@amd.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* st/dri: cleanup dri extension handlingEmil Velikov2014-04-282-25/+30
| | | | | | | | | | | | | | | Explicitly set the version that is implemented, as that may differ from the one defined in dri_interface.h. Use designated initialisers and constify whereever possible. Note: __DRIimageExtension should not be made const as it's modified at runtime. This patch should have no side effects on compilers that do not support designated initialisers, as the existing code in dri/common already uses them. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
* st/dri: flush drawable textures before unreferencingMarek Olšák2014-03-111-0/+8
| | | | | | This fixes piglit/fbo-sys-blit with fast clear on radeonsi. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* st/dri: build the drm backend when libdrm is presentEmil Velikov2014-03-111-1/+5
| | | | | | | Prevent build issues on systems lacking libdrm. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* st/dri: add support for dma-buf importer (DRIimage v8)Dave Airlie2014-03-032-1/+57
| | | | | | | | This is just a simple implementation that stores the extra values into the DRIimage struct and just uses the fd importer. I haven't looked into what is required to import YUV or deal with the extra parameters. Signed-off-by: Dave Airlie <airlied@redhat.com>