summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/common
AgeCommit message (Collapse)AuthorFilesLines
2013-07-30st/dri: add a new driconf option disable_shader_bit_encoding for UnigineMarek Olšák2-0/+11
Now Unigine Heaven 3.0 finally works with r600g. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-07-30mesa,glsl,st/dri: add a new driconf option force_glsl_version for UnigineMarek Olšák2-0/+39
See documentation in mtypes.h. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-07-30driconf: enable app-specific workarounds for all driversMarek Olšák2-2/+6
They were only enabled for i965. Note that drirc must be installed in /etc. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-07-30driconf: remove the unused option allow_large_texturesMarek Olšák1-9/+0
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-07-18dri: Introduce new flags in __DRI_ATTRIB_RENDER_TYPETomasz Lis1-6/+0
Mark __DRI_ATTRIB_FLOAT_MODE as deprecated, and introduce new flags to __DRI_ATTRIB_RENDER_TYPE for float modes. Both signed float (fbconfig_float) and unsigned (packed_float) are introduced. The old attribute should be set for both float modes. v2 (idr): Require that the render mode from the DRI attributes matches the render mode of the config exactly. This is the behavior of the old code. Signed-off-by: Tomasz Lis <tomasz.lis@intel.com> Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-06-25xmlpool/build: Make sure to set mo properlyNaohiro Aota1-1/+1
Some shells does not set variables sequentially in a statement i.e. "a=X b=${a}" won't set "b" to "X" but empty value. This patch introduce ";" to make sure "mo" is set properly before "lang" assignment. Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=471302
2013-05-01build: remove unused API_DEFINESAndreas Boll1-1/+0
Reviewed-by: Matt Turner <mattst88@gmail.com>
2013-04-23mesa: Restore 78-column wrapping of license text in C-style comments.Kenneth Graunke1-3/+4
The previous commit introduced extra words, breaking the formatting. This text transformation was done automatically via the following shell command: $ git grep 'THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY' | sed 's/:.*$//' | xargs -I {} sh -c 'vim -e -s {} < vimscript where 'vimscript' is a file containing: /THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY/;/\*\// !fmt -w 78 -p ' * ' :wq Reviewed-by: Brian Paul <brianp@vmware.com>
2013-04-23mesa: Add "OR COPYRIGHT HOLDERS" to license text disclaiming liability.Kenneth Graunke1-1/+1
This brings the license text in line with the MIT License as published on the Open Source Initiative website: http://opensource.org/licenses/mit-license.php Generated automatically be the following shell command: $ git grep 'THE AUTHORS BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/THE AUTHORS/THE AUTHORS OR COPYRIGHT HOLDERS/' {} This introduces some wrapping issues, to be fixed in the next commit. Reviewed-by: Brian Paul <brianp@vmware.com>
2013-04-23mesa: Change "BRIAN PAUL" to "THE AUTHORS" in license text.Kenneth Graunke1-1/+1
Generated automatically be the following shell command: $ git grep 'BRIAN PAUL BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/BRIAN PAUL/THE AUTHORS/' {} The intention here is to protect all authors, not just Brian Paul. I believe that was already the sensible interpretation, but spelling it out is probably better. More practically, it also prevents people from accidentally copy & pasting the license into a new file which says Brian is not liable when he isn't even one of the authors. Reviewed-by: Brian Paul <brianp@vmware.com>
2013-04-19mesa: Use quotes on bool driconf options to prevent stdbool.h breakage.Eric Anholt2-15/+22
Since stdbool.h's "true" and "false" are #defines, they got expanded when used as macro arguments, and that expanded value was stored in the XML string, producing XML that driconf would then fail to parse. Currently no drivers included stdbool along with driconf, but I keep accidentally doing so on intel as we move towards using normal C. v2: rebase on master. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v1)
2013-04-01drirc: set always_have_depth_buffer for TopogonBrian Paul1-0/+6
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-03-25android: fix Android.mk bug in mesa/drivers/dri/commonAdrian Marius Negreanu1-1/+2
target-specific variables are undefined when used as pre-requisites. instead, use secondary-expansion. I noticed this when building the patch: i965: Add a driconf option to disable flush throttling Signed-off-by: Adrian Marius Negreanu <adrian.m.negreanu@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2013-03-21i965: Add a driconf option to disable flush throttling.Paul Berry1-0/+5
Normally when submitting the first batch buffer after a flush, we check whether the GPU has completed processing of the first batch buffer of the previous frame. If it hasn't, we wait for it to finish before submitting any more batches. This prevents GPU-heavy and CPU-light applications from racing too far ahead of the current frame, but at the expense of possibly lower frame rates. Sometimes when benchmarking we want to disable this mechanism. This patch adds the driconf option "disable_throttling" to disable the throttling mechanism. Reviewed-by: Eric Anholt <eric@anholt.net>
2013-03-15driconf: add a miscellaneous section and always_have_depth_buffer optionBrian Paul1-0/+14
This option is needed for some applications that neglect to request a depth buffer when choosing a visual/fbconfig. The Linux app Topogun is an example of this problem.
2013-03-15driconf: reorder options, reformat comments, etcBrian Paul1-60/+74
Move the options into the proper section (Debug, Quality, Performance, etc). Update comments and add some whitespace to improve readability.
2013-03-12xmlpool/.gitignore: Remove 'Makefile'Matt Turner1-1/+0
Handled by top level .gitignore. Reviewed-by: Eric Anholt <eric@anholt.net>
2013-02-08Consolidate some redundant definitions of ARRAY_SIZE() macro.Paul Berry1-2/+1
Previous to this patch, there were 13 identical definitions of this macro in Mesa source. That's ridiculous. This patch consolidates 6 of them to a single definition in src/mesa/main/macros.h. Unfortunately, I wasn't able to eliminate the remaining definitions, since they occur in places that don't include src/mesa/main/macros.h: - include/pci_ids/pci_id_driver_map.h - src/egl/drivers/dri2/egl_dri2.h - src/egl/main/egldefines.h - src/gbm/main/backend.c - src/gbm/main/gbm.c - src/glx/glxclient.h - src/mapi/mapi/stub.c I'm open to suggestions as to how to deal with the remaining redundancy. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-01-20xmlpool/build: generate options.h via BUILT_SOURCESMatt Turner1-1/+1
Fixes missing options.h when doing 'make check' in dri/common before 'make' has been run. Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
2013-01-15dri: Define enum __DRI_API_GLES3Chad Versace2-0/+2
This enum corresponds to EGL_OPENGL_ES3_BIT_KHR. Neither the GLX nor EGL layer use the enum yet. I don't like the GLES bits. I'd prefer that all GLES APIs be exposed through a single API bit, as is done in GLX_EXT_create_context_es_profile. But, we need this GLES3 enum in order to do the plumbing necessary to correctly support EGL_OPENGL_ES3_BIT_KHR as required by the EGL_KHR_create_context spec. Signed-off-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-13xmlpool: Fix out-of-tree builds.Johannes Obermayr1-1/+1
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-01-12scons: Update for xmlpool/options.h generation.José Fonseca1-0/+14
2013-01-11drirc: Add quirk to disable GLSL line continuations for Savage2Carl Worth1-0/+3
This application is known to contain shaders that: 1. Have a stray backslash as the last line of comment lines 2. Have a declaration immediately following that line Hence, interpreting that backslash as a line continuation causes the declaration to be hidden and the shader fails to compile. Fortunately, the shaders also: 3. Do not have any other intentional line-continuation characters So disabling line continuations entirely for the application fixes this problem without causing any other breakage. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-01-11driconf: Add a new option: disable_glsl_line_continuationsCarl Worth1-0/+5
This is to enable a quirk for Savage2 which includes a shader with a stray '\' at the end of a comment line. Interpreting that backslash as a line continuation will break the compilation of the shader, so we need a way to disable this. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-01-11driconf: Add proper dependency for compiling .mo files from .po files.Carl Worth2-21/+20
Previously this was happening unconditionally, leading to some excessive rebuilding/relinking during builds. Note that the .po files are not automatically updated due to changes to the t_options.h file. Instead, translators should continue to use "make po" manually. This is because after new strings are merged into the existing .po file, manual work is still required by translators to ensure that the translations are correct.
2013-01-11driconf: Add translation-generation to build system, don't track generated filesCarl Worth5-643/+54
Previously, the xmlpool directory had a lone Makefile to assist poeple in manually invoking a deep make in order to update the translations in options.h. We can observe that this wasn't happening in fact, (new translations had been added to de.po without being generated into options.h, and new options had been manually added directly to options.h rather than to t_options.h). Prevent both of these problems from occurring in the future by automatically generating options.h as part of the standard build of mesa. For this, the generated options.h is now removed from version control, (along with Makefile in favor of Makefile.am). [chadv: Port the Autotools changes to Android.] Signed-off-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-01-11driconf: Fix German translations by removing a couple of bogus backslashesCarl Worth1-2/+2
As can be seen, many other translation strings already include a single apostrophe just fine without any escaping. This strangely-escaped apostrophe was causing a build failure ("invalid escape sequence") resulting in no "de" translations in the final options.h file. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-01-11driconf: Fix gen_xmlpool.py script to allow running from any directoryChad Versace2-4/+18
The gen_xmlpool.py script would work correctly only when executed from the directory that contained the script. This shortcoming was due to some hard-coded paths in the script. In order to easily invoke the script from the Android build system, we must be able to execute the script from an arbitrary directory. To enable that, this patch replaces the two hard-coded paths with new command line arguments. Signed-off-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Carl Worth <cworth@cworth.org>
2013-01-11driconf: Add some translations which have been available, but were not compiledCarl Worth1-8/+8
These translations have existed in the de.po file, but were not in the generated options.h file. This was fixed by simply running "make options.h". Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-01-11driconf: Add option definitions to source file, not generated targetCarl Worth1-0/+10
For the last two most-recently-added driconf options, their definition was manually added to options.h, a file which is intended to be automatically generated, (as part of support for translated driconf option descriptions). This means that these options would be eliminated if the generation step were performed again. Fix this by correctly adding the definitions of these options to t_options.h, (the file used as input to the generator), and not the options.h file, which is generated. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-12-09drisw: fix up context and apis for software contextDave Airlie1-0/+16
This ports over from the dri2 code to the drisw bits. It means 3.1 core contexts now work for softpipe. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-29mesa: Rename API_OPENGL to API_OPENGL_COMPAT.Paul Berry2-7/+7
This should help avoid confusion now that we're using the gl_api enum to distinguishing between core and compatibility API's. The corresponding enum value for core API's is API_OPENGL_CORE. Acked-by: Eric Anholt <eric@anholt.net> Acked-by: Matt Turner <mattst88@gmail.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org>
2012-11-19dri: Use designated initializers for DRI extension structsChad Versace1-27/+30
The dri directory is compiled with -std=c99. There is no excuse to not use designated initializers. As a nice benefit, the code is now more friendly to grep. Without designated initializers, psychic prowess is required to find the initialization of DRI extension function pointers with grep. I have observed several people, when they first encounter the DRI code, fail at statically chasing the DRI function pointers due to this problem. Reviewed-by: Matt Turner <mattst88@gmail.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-11-09dri_util: Fix prologue comment for driCreateConfigsIan Romanick1-17/+5
The parameters and operation of this function changed, but I didn't bother to change the prologue comment. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-10-29dri: Support MESA_FORMAT_SARGB8 in driCreateConfigsIan Romanick1-1/+2
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-10-29dri: Convert driCreateConfigs to use a gl_format enumIan Romanick2-101/+41
This is instead of the pair of GLenums for format and type that were previously used. This is necessary for the Intel drivers to expose sRGB framebuffer formats. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-10-29dri_util: Elminiate the bytes_per_pixel tableIan Romanick1-9/+3
With fewer formats to support, it's kind of useless. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-10-29dri_util: Remove support for RGB332 framebuffersIan Romanick1-27/+7
None of the remaining DRI drivers in Mesa use this. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-10-16driconf: Remove force enable for NV_vertex_program.Kenneth Graunke6-32/+0
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2012-10-15r200: Remove support for software-only NV_vertex_program.Eric Anholt1-5/+0
It wasn't supported in hardware, and the comments in the code indicated no known uses (similar to my experience on Intel) and a possible intent to remove it. Reviewed-by: Brian Paul <brianp@vmware.com>
2012-10-01build: Set visibility CFLAGS in dri/commonMatt Turner1-1/+2
2012-09-28dri_util: Use calloc to allocate __DRIcontextIan Romanick1-1/+1
The __DRIcontext contains some pointers, and some drivers check for them to be NULL in some failure paths. Instead of sprinkling NULL assignments across the various drivers, just zero out the whole thing. NOTE: This is a candidate for the 9.0 branch. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-and-tested-by: Kenneth Graunke <kenneth@whitecape.org> Tested-by: Lu Hua <huax.lu@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53618 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54301
2012-09-17dri: Reuse dri_test.c for stub glapi symbols for unit testing.Eric Anholt2-1/+9
This file is used to provide stubs for the link test in gallium dri drivers. But the same stubs without the main can be used for making unit tests for code in a dri driver. Acked-by: Paul Berry <stereotype441@gmail.com>
2012-09-05Remove useless checks for NULL before freeingMatt Turner1-6/+3
This patch has been generated by the following Coccinelle semantic patch: // Remove useless checks for NULL before freeing // // free (NULL) is a no-op, so there is no need to avoid it @@ expression E; @@ + free (E); + E = NULL; - if (unlikely (E != NULL)) { - free(E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; type T; @@ + free ((T) E); + E = NULL; - if (unlikely (E != NULL)) { - free((T) E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; @@ + free (E); - if (unlikely (E != NULL)) { - free (E); - } @@ expression E; type T; @@ + free ((T) E); - if (unlikely (E != NULL)) { - free ((T) E); - } Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-01mesa: s/FREE/free/Brian Paul2-13/+13
v2: replace instances in dri/common/ dirs Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-09-01mesa: s/MALLOC/malloc/Brian Paul1-7/+7
v2: replace instances in dri/common/ dirs Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-08-31xmlconfig: use __progname when building for AndroidTapani Pälli1-1/+1
__progname symbol and strrchr are available with bionic. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-08-29mesa/dri: Allow creation of forward-compatible contextsIan Romanick1-5/+5
This is done by changing the API to API_OPENGL_CORE. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2012-08-14dri_util: Compare against the correct API enumsIan Romanick1-2/+2
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-08-13dri: Pass API_OPENGL_CORE through to the driversIan Romanick1-0/+16
This forces the drivers to do at least some validation of context API and version before creating the context. In r100 and r200 drivers, this means that they don't do any post-hoc validation. v2: Actually reject compatibility profile 3.2+ contexts. Thanks Ken. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>