aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/common
Commit message (Collapse)AuthorAgeFilesLines
...
* mesa: Rename API_OPENGL to API_OPENGL_COMPAT.Paul Berry2012-11-292-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 <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
* dri: Use designated initializers for DRI extension structsChad Versace2012-11-191-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 <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* dri_util: Fix prologue comment for driCreateConfigsIan Romanick2012-11-091-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 <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* dri: Support MESA_FORMAT_SARGB8 in driCreateConfigsIan Romanick2012-10-291-1/+2
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* dri: Convert driCreateConfigs to use a gl_format enumIan Romanick2012-10-292-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 <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* dri_util: Elminiate the bytes_per_pixel tableIan Romanick2012-10-291-9/+3
| | | | | | | | With fewer formats to support, it's kind of useless. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* dri_util: Remove support for RGB332 framebuffersIan Romanick2012-10-291-27/+7
| | | | | | | | None of the remaining DRI drivers in Mesa use this. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* driconf: Remove force enable for NV_vertex_program.Kenneth Graunke2012-10-166-32/+0
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* r200: Remove support for software-only NV_vertex_program.Eric Anholt2012-10-151-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 <[email protected]>
* build: Set visibility CFLAGS in dri/commonMatt Turner2012-10-011-1/+2
|
* dri_util: Use calloc to allocate __DRIcontextIan Romanick2012-09-281-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 <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-and-tested-by: Kenneth Graunke <[email protected]> Tested-by: Lu Hua <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53618 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54301
* dri: Reuse dri_test.c for stub glapi symbols for unit testing.Eric Anholt2012-09-172-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 <[email protected]>
* Remove useless checks for NULL before freeingMatt Turner2012-09-051-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 <[email protected]>
* mesa: s/FREE/free/Brian Paul2012-09-012-13/+13
| | | | | | | v2: replace instances in dri/common/ dirs Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: s/MALLOC/malloc/Brian Paul2012-09-011-7/+7
| | | | | | | v2: replace instances in dri/common/ dirs Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* xmlconfig: use __progname when building for AndroidTapani Pälli2012-08-311-1/+1
| | | | | | | __progname symbol and strrchr are available with bionic. Signed-off-by: Tapani Pälli <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* mesa/dri: Allow creation of forward-compatible contextsIan Romanick2012-08-291-5/+5
| | | | | | This is done by changing the API to API_OPENGL_CORE. Signed-off-by: Ian Romanick <[email protected]>
* dri_util: Compare against the correct API enumsIan Romanick2012-08-141-2/+2
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* dri: Pass API_OPENGL_CORE through to the driversIan Romanick2012-08-131-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 <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* dri: Simplify use of driConcatConfigsChad Versace2012-08-071-0/+5
| | | | | | | | | | | | If either argument to driConcatConfigs(a, b) is null or the empty list, then simply return the other argument as the resultant list. All callers were accomplishing that same behavior anyway. And each caller accopmplished it with the same pattern. So this patch moves that external pattern into the function. Reviewed-by: <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* dri2: Fix bug in attribute handling for non-desktop OpenGL contextsIan Romanick2012-08-061-6/+17
| | | | | | | | | | | | | | | Previously an error would be generated if any attributes were specified when creating a non-desktop OpenGL context. This was a mistake, and it will prevent old drivers from working with new EGL libraries that add support for the createContextAttribs interface. Instead, match the behavior of EGL_KHR_create_context: allow versions that make sense, reject non-zero flags. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Ian Romanick <[email protected]> Cc: Kristian Høgsberg <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* drirc: Add disable_blend_func_extended workaround for Unigine OilRush.Kenneth Graunke2012-07-191-0/+6
| | | | | | | | | | The previous commit implemented the workaround, cited a bug report about OilRush, but actually only enabled the workaround for the demos. Turn it on for OilRush too. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50291 Signed-off-by: Kenneth Graunke <[email protected]>
* i965: Add a driconf option to disable GL_ARB_blend_func_extended.Kenneth Graunke2012-07-192-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unigine Heaven (at least) has a bug where it incorrectly uses the GL_ARB_blend_func_extended extension. Dual source blending allows two color outputs per render target; individual shader outputs can be assigned to be either the first or second blending input by setting the 'index' via one of two methods: - An API call: glBindFragDataLocationIndexed() - The GLSL 'layout' qualifier provided by GL_ARB_explicit_attrib_location Both of these only work on user defined fragment shader outputs; it's an error to use either on built-in outputs like gl_FragData. Unigine uses gl_FragData and gl_FragColor exclusively, and doesn't even attempt to use either method to set index == 1. However, it does set the blending function to SRC1 enums, which requires a fragment shader output with index == 1 or else rendering is undefined. In other words, enabling ARB_blend_func_extended causes Unigine to render incorrectly, resulting in an apparent regression, even though our driver code (as far as I can tell) is perfectly fine. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50291 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* dri2: Hard-code the DRI2 versionIan Romanick2012-07-111-1/+1
| | | | | | | | This allows revising the dri_interface.h separately from adding driver support. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* make: Fold ASM_CFLAGS into DEFINES.Eric Anholt2012-06-211-1/+0
| | | | | | Every place that uses ASM_FLAGS already uses DEFINES. Not including it in DEFINES is just a way to screw up potential users, as I've done several times while working on the build system.
* drirc: Add missing XML attributes that made the driconf application whine.Eric Anholt2012-03-211-4/+4
| | | | | | | These are used for pretty presentation of the application name in the UI. Tested-by: Kenneth Graunke <[email protected]>
* Add .deps/, .libs/, and *.la to toplevel .gitignorePaul Berry2012-03-201-3/+0
| | | | | | | To avoid redundancies, this patch also removes .deps, .libs, and *.la from .gitignore files in subdirectories. Reviewed-by: Kenneth Graunke <[email protected]>
* dri_util: add copyright/license blurbBrian Paul2012-03-171-0/+24
|
* drirc: Add force_glsl_extensions_warn workaround for Unigine Heaven.Kenneth Graunke2012-03-091-0/+6
| | | | | | | | | Unfortunately, Unigine Heaven 3.0 still needs this. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* dri: Add Unigine Tropics as an app that requires the GLSL warn workaround.Eric Anholt2012-02-031-0/+3
| | | | | | | I wasn't seeing it be needed because of the previous bug. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eugeni Dodonov <[email protected]>
* dri: Fix typo in xml file that made all applications use the workaround.Eric Anholt2012-02-031-1/+1
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eugeni Dodonov <[email protected]>
* dri: Add a default drirc to be installed to provide application workarounds.Eric Anholt2012-01-302-0/+9
| | | | | | | | Specifially, this being present works around a bug in Unigine Sanctuary on i965 which previously resulted in bad rendering. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add a driconf option to force GLSL extension behavior to "warn".Eric Anholt2012-01-301-0/+10
| | | | | | | | | This can be used to work around broken application behavior, like in Unigine where it attempts to use texture arrays without declaring either "#extension GL_EXT_texture_array : enable" or "#version 130". NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Kenneth Graunke <[email protected]>
* dri common: add .gitignoreMatt Turner2012-01-271-1/+3
|
* dri: Move the compile of the common files to a convenience library.Eric Anholt2012-01-261-0/+37
| | | | Reviewed-by: Matt Turner <[email protected]>
* dri: remove all the obsolete spantmp filesBrian Paul2012-01-244-1259/+0
|
* dri_util: Fix order of error and data parameters to dri2CreateContextAttribsIan Romanick2012-01-021-1/+1
| | | | Signed-off-by: Ian Romanick <[email protected]>
* dri2: Add plumbing to get context version requirements and flags to driversIan Romanick2012-01-023-18/+86
| | | | | | This adds support for DRI_DRI2 version 3 to all of the DRI2 drivers. Signed-off-by: Ian Romanick <[email protected]>
* dri_util: Mostly stub implementation of dri2CreateContextAttribsIan Romanick2012-01-021-12/+79
| | | | | | | | This adds the function and modifies dri2CreateNewContextForAPI to call it. At this point only version 2 of the DRI2 API is advertised to the loader. Signed-off-by: Ian Romanick <[email protected]>
* mesa: remove gl_renderbuffer::PutRowRGB()Brian Paul2011-12-243-43/+0
| | | | | | No longer used anywhere. Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove gl_renderbufer::PutMonoRow() and PutMonoValues()Brian Paul2011-12-243-235/+0
| | | | | | | The former was only used for clearing buffers. The later wasn't used anywhere! Remove them and all implementations of those functions. Reviewed-by: Eric Anholt <[email protected]>
* dri2: Add createContextAttribs entry point for DRISW version 3Ian Romanick2011-12-231-2/+6
| | | | Signed-off-by: Ian Romanick <[email protected]>
* dri2: Add createContextAttribs entry point for DRI2 version 3Ian Romanick2011-12-231-2/+6
| | | | Signed-off-by: Ian Romanick <[email protected]>
* dri: cosmeticGeorge Sapountzis2011-11-042-65/+42
| | | | To smooth minor diff between dri_util & drisw_util
* dri_util: move drawable functionsGeorge Sapountzis2011-11-041-27/+26
|
* dri_util: move context functionsGeorge Sapountzis2011-11-041-35/+36
|
* dri_util: move context functionsGeorge Sapountzis2011-11-041-86/+86
|
* dri_util: move screen functionsGeorge Sapountzis2011-11-041-100/+100
| | | | This is to reorder as screen/context/drawable similar to drisw_util
* dri: drop stray includes and typedefGeorge Sapountzis2011-11-041-11/+0
|
* dri: move __driUtilMessage to xmlconfig.cGeorge Sapountzis2011-11-043-28/+22
| | | | __driUtilMessage seems to have fallen out of favor and is only used by xmlconfig.c now