summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/common
Commit message (Collapse)AuthorAgeFilesLines
* dri/common: allow BGRX sRGB visualsMarek Olšák2015-07-031-0/+1
|
* dri: don't touch the shader compilerErik Faye-Lund2015-06-291-3/+0
| | | | | | | | | | | | | This function is for deleting per-screen resources, and the shader compiler resources are not of such nature. Besides, dri shouldn't need to even know about the presence of a shader compiler. These resources will already be released when mesa gets unloaded, and that should be sufficient. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: build xmlconfig to a separate static libraryErik Faye-Lund2015-06-124-4/+12
| | | | | | | | | | | | | | | | | | | | As we use the file from both the dri modules and loader, we end up with multiple definition of the symbols provided in our gallium dri modules. Additionally we compile the file twice. Resolve both issues, effectively enabling the build on toolchains which don't support -Wl,--allow-multiple-definition. v2: [Emil Velikov] - Fix the Scons/Android build. - Resolve libgbm build issues (bring back the missing -lm) Cc: Julien Isorce <j.isorce@samsung.com> Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90310 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90905 Acked-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* android: export more dirs from libmesa_dri_commonChih-Wei Huang2015-06-091-1/+3
| | | | | | | | The include paths of libmesa_dri_common are also used by modules that need libmesa_dri_common. Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw> Reviewed-by: Eric Anholt <eric@anholt.net>
* dri_util: make version var unsigned to silence warningsBrian Paul2015-05-291-1/+1
| | | | | | | _mesa_override_gl_version_contextless() takes an unsigned version parameter. Reviewed-by: Matt Turner <mattst88@gmail.com>
* mesa: Allow overriding the version of ES2+ contextsIan Romanick2015-05-281-0/+4
| | | | | Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
* dri_util: Use _mesa_override_gl_version_contextlessIan Romanick2015-05-281-7/+11
| | | | | | | | | Remove _mesa_get_gl_version_override. We don't need two functions that do basically the same thing. This change seemed easier (esp. with the next patch) than going the other way. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
* android: xmlpool: cleanup the generation rulesEmil Velikov2015-04-221-3/+2
| | | | | | | | | - Do not attempt to create the save folder twice - both dir $@ and PRIVATE_LOCALEDIR point to the same place. - Use @ and $(hide), for mkdir and python, to avoid spamming the output. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* android: xmlpool: Get rid of the last use of intermediates-dir-forChih-Wei Huang2015-04-221-7/+7
| | | | | | | | | v2 [Emil Velikov] - Keep the PRIVATE_LOCALEDIR variable. - Do not use $(@D) but the more widespead $(dir $@) Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* android: export the path of the generated headersChih-Wei Huang2015-04-221-0/+2
| | | | | | | The modules need the headers can get the path automatically. Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* android: fix the building rules for Android 5.0Chih-Wei Huang2015-04-221-2/+1
| | | | | | | | | | | | | | | | | Android 5.0 allows modules to generate source into $OUT/gen, which will then be copied into $OUT/obj and $OUT/obj_$(TARGET_2ND_ARCH) as necessary. Modules will need to change calls to local-intermediates-dir into local-generated-sources-dir. The patch changes local-intermediates-dir into local-generated-sources-dir. If the Android version is less than 5.0, fallback to local-intermediates-dir. The patch also fixes the 64-bit building issue of Android 5.0. v2 [Emil Velikov] - Keep the LOCAL_UNSTRIPPED_PATH variable. Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
* android: dri/common: conditionally include drm_cflags/set __NOT_HAVE_DRM_HEmil Velikov2015-04-221-0/+14
| | | | | | | Otherwise we'll fail to find the drm.h header. Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* drirc: Add "Second Life" quirk (allow_glsl_extension_directive_midshader).Kenneth Graunke2015-04-211-0/+4
| | | | | | | | | | | | Appears to fix shader compilation. Tested by starting the client, dragging the "quality and speed" slider back and forth, and watching the console output - instead of piles of "shader failed to compile", the CPU seems to be busy compiling shaders. I haven't actually tried to play. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69226 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71591 Cc: mesa-stable@lists.freedesktop.org
* adjust a couple of ifdefs to handle NetBSD correctlyTobias Nygren2015-04-171-1/+1
| | | | | Acked-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Tobias Nygren <tnn@NetBSD.org>
* i965: replace __FUNCTION__ with __func__Marius Predut2015-04-141-1/+1
| | | | | | | | Consistently just use C99's __func__ everywhere. No functional changes. Acked-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Marius Predut <marius.predut@intel.com>
* xmlpool: remove the clean targetEmil Velikov2015-04-011-6/+4
| | | | | | | | ... by folding it into CLEANFILES. Don't worry about $(LANG) as it is essentially the first folder of $(POS). With the latter already handled. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* xmlpool: don't forget to ship the MOSEmil Velikov2015-04-011-1/+8
| | | | | | | | | | | | This will allow us to finally remove python from the build time dependencies list. Considering that you're building from a release tarball of course :-) Cc: Bernd Kuhls <bernd.kuhls@t-online.de> Reported-by: Bernd Kuhls <bernd.kuhls@t-online.de> Cc: "10.5" <mesa-stable@lists.freedesktop.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* dri: add _glapi_set_nop_handler(), _glapi_new_nop_table() to dri_test.cBrian Paul2015-03-181-0/+11
| | | | | | | | I wasn't aware of these _glapi_ stub functions when I committed 4bdbb588a9d385509f9168e38bfdb76952ba469c. Fixes "make check" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89662 Reviewed-by: Mark Janes <mark.a.janes@intel.com>
* xmlpool: make sure we ship options.hEmil Velikov2015-03-051-1/+1
| | | | | | | | | | | | The header is included in ../xmlpool.h. With the latter of which used directly in a number of places in mesa. Note that we can also add it (alongside t_option.h) to noinst_HEADERS, but neither solution fixes the issue that brough us here - namely: Do not regenerate the headers, if it already exists. Cc: "10.5" <mesa-stable@lists.freedesktop.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* dri/common: include stdio.h where neededBrian Paul2015-03-052-0/+2
| | | | | Acked-by: Matt Turner <mattst88@gmail.com> Reviewed-by: José Fonseca <jfonseca@vmware.com>
* mesa: don't include math.h in compiler.hBrian Paul2015-02-261-0/+1
| | | | | | | | Not needed by anything in that header. Include math.h or c99_math.h where needed instead. Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* mesa: include stdarg.h only where it's usedBrian Paul2015-02-261-0/+1
| | | | | Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* dri/common: Update comment about driQueryRendererIntegerCommonAndreas Boll2015-02-251-0/+1
| | | | | | | | | Since 87d3ae0b45b6b6bb50b583dafa55eb109449a005 driQueryRendererIntegerCommon handles __DRI2_RENDERER_PREFFERED_PROFILE too. Signed-off-by: Andreas Boll <andreas.boll.dev@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* driconf: Update Catalan translationAlex Henrie2015-02-241-18/+34
| | | | Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
* driconf: Update Spanish translationAlex Henrie2015-02-241-5/+21
| | | | Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
* mesa: Add gallium include dirs to more parts of the tree.Eric Anholt2015-02-201-0/+2
| | | | | | v2: Try to patch up the scons bits. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* drirc: set allow_glsl_extension_directive_midshader for Dead Island.Sven Arvidsson2015-01-281-0/+4
| | | | | | Signed-off-by: Sven Arvidsson <sa@whiz.se> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87076 Signed-off-by: Marek Olšák <marek.olsak@amd.com>
* mesa: Add scons files to distribution.Matt Turner2014-12-122-2/+2
|
* xmlpool: Add $(MOS) and options.h to CLEANFILES.Matt Turner2014-12-121-0/+1
|
* dri/common: Add files to distribution.Matt Turner2014-12-123-1/+7
|
* dri/common: Drop unused mmio.h.Matt Turner2014-12-121-62/+0
| | | | Unused since commit 7550a24f.
* Remove useless checks for NULL before freeingMatt Turner2014-12-081-2/+1
| | | | | | | See commits 5067506e and b6109de3 for the Coccinelle script. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* nine: Implement threadpoolAxel Davy2014-11-181-0/+5
| | | | | | | | | | | | | | | DRI_PRIME setups have different issues due the lack of dma-buf fences support in the drivers. For DRI3 DRI_PRIME, a race can appear, making tearings visible, or worse showing older content than expected. Until dma-buf fences are well supported (and by all drivers), an alternative is to send the buffers to the server only when rendering has finished. Since waiting the rendering has finished in the main thread has a performance impact, this patch uses an additional thread to offload the wait and the sending of the buffers to the server. Acked-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: David Heidelberg <david@ixit.cz> Signed-off-by: Axel Davy <axel.davy@ens.fr>
* nine: Add drirc options (v2)Axel Davy2014-11-181-0/+13
| | | | | | | | | Implements vblank_mode and throttling, which allows us change default ratio between framerate and input lag. Acked-by: Jose Fonseca <jfonseca@vmware.com> Signed-off-by: David Heidelberg <david@ixit.cz> Signed-off-by: Axel Davy <axel.davy@ens.fr>
* st/dri: Support EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR/GLX_CONTEXT_DEBUG_BIT_ARB ↵José Fonseca2014-11-141-8/+6
| | | | | | | | | | | | | 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>
* Releasing a surfaceless EGL context doesn't release underlying DRI context.Alexandros Frantzis2014-11-061-2/+6
| | | | | | | | | | | | | | | | | | driUnbindContext() checks for valid drawables before calling the driver unbind function. In case of Surfaceless contexts, the drawables are always Null and we end up not releasing the underlying DRI context. Moving the call to the driver function before the drawable validity checks fixes things. Steps to trigger this bug are following: - create surfaceless context and make it current - make some other context current - {another thread} destroy surfaceless context - make another context current Signed-off-by: Alexandros Frantzis <Alexandros.Frantzis@canonical.com> Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74563
* driconf: Correct and update Catalan translationAlex Henrie2014-09-291-8/+8
| | | | | Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Eric Anholt <eric@anholt.net>
* driconf: Update Spanish translationAlex Henrie2014-09-291-5/+5
| | | | | Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Eric Anholt <eric@anholt.net>
* driconf: Synchronize po filesAlex Henrie2014-09-296-319/+390
| | | | | Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Eric Anholt <eric@anholt.net>
* xmlconfig: suppress libGL warnings when LIBGL_DEBUG == "quiet"Stefan Dirsch2014-09-091-1/+3
| | | | | | | | Let's handle LIBGL_DEBUG env. variable in Mesa in a consistent way. Fixes: https://bugzilla.novell.com/show_bug.cgi?id=895730 Signed-off-by: Stefan Dirsch <sndirsch@suse.de> Reviewed-by: Courtney Goeltzenleuchter <courtney@lunarg.com>
* Eliminate several cases of multiplication in arguments to callocCarl Worth2014-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | In commit 32f2fd1c5d6088692551c80352b7d6fa35b0cd09, several calls to _mesa_calloc(x) were replaced with calls to calloc(1, x). This is strictly equivalent to what the code was doing previously. But for cases where "x" involves multiplication, now that we are explicitly using the two-argument calloc, we can do one step better and replace: calloc(1, A * B); with: calloc(A, B); The advantage of the latter is that calloc will detect any overflow that would have resulted from the multiplication and will fail the allocation, (whereas the former would return a small allocation). So this fix can change potentially exploitable buffer overruns into segmentation faults. Reviewed-by: Matt Turner <mattst88@gmail.com>
* dri/common: Move __DRI2_RENDERER_PREFFERED_PROFILE handling to ↵Emil Velikov2014-08-151-0/+4
| | | | | | | | | | | | driQueryRendererIntegerCommon Essentially all drivers would like to use to opengl core profile if available, so avoid duplication by moving the code to a common fallback within driQueryRendererIntegerCommon. If a driver uses different approach they can handle it separately. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* android: megadriver_stub: prefix static libraries with libmesa_Emil Velikov2014-08-131-2/+2
| | | | | | | Will make it easier on us as CleanSpec.mk comes along and improves consistency across the Android build. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* dri/xmlconfig: s/uint/unsigned int/Vinson Lee2014-08-051-2/+2
| | | | | | | | | | | | | | | | This patch fixes this build error on Mac OS X. ./xmlconfig.h:61:5: error: unknown type name 'uint'; did you mean 'int'? uint nRanges; /**< \brief Number of ranges */ ^~~~ int ./xmlconfig.h:79:5: error: unknown type name 'uint'; did you mean 'int'? uint tableSize; ^~~~ int Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
* 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>
* xmlconfig: Use program_invocation_short_name when building for cygwinYaakov Selkowitz2014-07-291-0/+2
| | | | | | | | | mesa/mesa/src/mesa/drivers/dri/common/xmlconfig.c:104:10: warning: #warning "Per application configuration won't work with your OS version." [-Wcpp] # warning "Per application configuration won't work with your OS version." Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Brian Paul <brianp@vmware.com>
* st/mesa,gallium: add a workaround for Unigine Heaven 4.0 and Valley 1.0Marek Olšák2014-07-182-3/+22
| | | | | | | 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>
* scons: build and use a single dri_common libraryEmil Velikov2014-07-101-45/+10
| | | | | | | | | | Rather than building two identical ones for dri-vmwgfx and dri-swrast build a single library, and drop some duplication in the build. 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-0/+27
| | | | | | | | | | | | ... 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>
* xmlconfig/dri: bool -> unsigned charDave Airlie2014-07-023-10/+8
| | | | | | | | | Drop stdbool, due to the X server being a pain and having struct members called bool, although I've sent a patch to fix that we should retain stupidity here. Use unsigned char which is what GLboolean is anyways. Signed-off-by: Dave Airlie <airlied@redhat.com>