Commit Graph

1440 Commits

Author SHA1 Message Date
Brian Paul 827bdee7d1 glapi: add const qualifier to glShaderSourceARB() parameter
Fixes the es2 build with gcc.

Note: in glext.h the prototypes for glShaderSource() and glShaderSourceARB()
disagree:  only the former has the extra const qualifier.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-06-27 15:37:10 -06:00
Vincent Lejeune 3e17d38457 glapi: Add uniform buffer object API
v2: Fix a typo spotted by Eric Anholt.
v3: Fix missing "GL" on types, fix style, fix Studly_Caps extension name,
    drop commented code duplicated with GL3x.xml [anholt]

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-06-21 10:57:45 -07:00
Eric Anholt 27383cbb0b automake: Convert src/mapi/glapi/gen to silent build. 2012-06-21 10:08:26 -07:00
Eric Anholt 3a70f7526a automake: Convert src/mapi/glapi/gen/Makefile to automake. 2012-06-21 10:08:24 -07:00
Fredrik Höglund ae5d7d5e89 mesa: Add support for GL_ARB_base_instance
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-19 07:57:22 -06:00
Kristian Høgsberg 2d7b2d7a87 gles2: Add GL_NV_read_buffer extension
This lets us select the front buffer for reading under GLES2.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-06-18 11:53:18 -04:00
Paul Berry 4b7b4c46c5 glx/tests and mesa/tests: Update .gitignore files.
This patch updates .gitignore files to account for the new build
artifacts introduced by the following commits:

ae376f0 glx/tests: Rename test as glx-test
8fecdcc mesa/tests: Add tests for _mesa_lookup_enum_by_{name,nr} functions
a29ad2b mesa/tests: Add tests for the generated dispatch table
2012-06-14 10:08:57 -07:00
Ian Romanick f18d3fe0cb glapi: Remove GL_NV_vertex_array_range from the dispatch table
There is no GLX protocol for these functions.  Open-source Linux
driver have not supported this extension for many years, and it seems
unlikely at this point that this support will return.  There's no
reason to have slots for these functions in the dispatch table.

The unit tests (GetProcAddress::TableDidntShrink and others) are also updated.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-13 13:17:56 -07:00
Ian Romanick 69d1851757 glapi: Remove GL_NV_fence from the dispatch table
There is no GLX protocol for these functions.  No open-source Linux
driver has ever supported this extension, and it seems unlikely at
this point that one ever will.  There's no reason to have slots for
these functions in the dispatch table.

The unit tests (GetProcAddress::TableDidntShrink and others) are also updated.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-13 13:17:56 -07:00
Ian Romanick 6db7cf29b5 glapi: Remove GL_NV_register_combiners from the dispatch table
There is no GLX protocol for these functions.  No open-source Linux
driver has ever supported this extension, and it seems unlikely at
this point that one ever will.  There's no reason to have slots for
these functions in the dispatch table.

The unit tests (GetProcAddress::TableDidntShrink and others) are also updated.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-13 13:17:56 -07:00
Ian Romanick a6002909a3 glapi: Remove GL_APPLE_texture_range from the dispatch table
There is no GLX protocol for these functions, and no Linux driver has
ever supported this extension.  There's no reason to have slots for
these functions in the dispatch table.

The unit tests (GetProcAddress::TableDidntShrink and others) are also updated.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-13 13:17:54 -07:00
Ian Romanick e62c4c765c glapi: Remove GL_SGIX_pixel_texture from the dispatch table
There is no GLX protocol for this function.  Open-source Linux driver
have not supported this extension for many years, and it seems
unlikely at this point that this support will return.  There's no
reason to have slots for this function in the dispatch table.

The unit tests (GetProcAddress::TableDidntShrink and others) are also updated.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-13 13:17:54 -07:00
Ian Romanick 933714aabe glapi: Remove GL_SGIS_pixel_texture from the dispatch table
There is no GLX protocol for these functions, and no Linux driver has
ever supported this extension.  There's no reason to have slots for
these functions in the dispatch table.

The unit tests (GetProcAddress::TableDidntShrink and others) are also updated.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-13 13:17:54 -07:00
Ian Romanick a29ad2b421 mesa/tests: Add tests for the generated dispatch table
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-13 13:17:53 -07:00
Ian Romanick e08f9080ff glapi: Add missing GL_EXT_texture_sRGB_decode enums
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-13 11:50:26 -07:00
Ian Romanick 1c25984b23 glapi: Add missing GL_EXT_framebuffer_sRGB enums
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-13 11:50:26 -07:00
Ian Romanick 75c516c959 glapi: Add missing GL_EXT_packed_float enums
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-13 11:50:26 -07:00
Ian Romanick ffbccb8cef glapi: Add missing framebuffer sRGB enum
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-13 11:50:26 -07:00
Ian Romanick 2d8d85d7fb glapi: Add uniform buffer object enums
These are from OpenGL 3.1 and ARB_uniform_buffer_object.  I only added
them to 3.1 because that required the least work.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-13 11:50:26 -07:00
Ian Romanick c5071825b0 glapi: Add missing enums for GL_NV_fragment_program
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-13 11:50:26 -07:00
Ian Romanick 2485a1332e glapi: Add missing enums for GL_ARB_occlusion_query2
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-13 11:50:26 -07:00
Ian Romanick 22cdd7d817 glapi: Remove extraneous GL_ from TEXTURE_IMMUTABLE_FORMAT
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-13 11:50:25 -07:00
Ian Romanick 21af1e9a0e glapi: Add missing enums for GL_ATI_fragment_shader
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-13 11:50:25 -07:00
Ian Romanick 502449d71f glapi: Add texture swizzle enums
These are from OpenGL 3.3, ARB_texture_swizzle, and
EXT_texture_swizzle (with different names).  I only added them to 3.3
because that required the least work.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-13 11:50:25 -07:00
Ian Romanick a4a0c1f09d glapi: Add a couple missing 3.0 enums
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-13 11:50:25 -07:00
Ian Romanick cc1e74bd19 glapi: Add missing _NV extension on COMBINE4
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-13 11:50:25 -07:00
Ian Romanick 78b30938cc glapi: Add missing enums for GL_EXT_vertex_array
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-13 11:50:25 -07:00
Ian Romanick 8fcec14417 glapi: Add missing enums for GL_EXT_compiled_vertex_array
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-13 11:50:25 -07:00
Eric Anholt 743e505315 automake: Globally add stub automake targets to the old Makefiles.
I tried to update all the old Makefiles that included the default
config to be sure they had a default target if they didn't previously
have one, since this new all target will always point at it.  Almost
everything had one.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-06-11 09:28:00 -07:00
Andreas Boll 6224e90247 glapi: .gitignore cleanup
remove archaic .cvsignore
*.pyo is already in toplevel .gitignore
*.pyc is already in toplevel .gitignore

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-06-08 11:18:38 -07:00
Brian Paul 091a61a8d5 scons: generate the glapitable.h file too 2012-06-01 08:27:21 -06:00
Brian Paul dff36e900c scons: add code to generate the various GL API files
This fixes recent build breakage when we began building the generated
API files from xml as part of the normal build process.

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=50475
2012-05-31 09:40:35 -06:00
Eric Anholt 79273b1a7a glapi: Enable silent rules for generation when used from automake.
This variable won't be set when called from non-automake makefiles,
but it cleans up shared-glapi's output.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-05-29 12:39:37 -07:00
Eric Anholt 559d592448 shared-glapi: Don't forget to clean our built file.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-05-29 12:39:33 -07:00
Eric Anholt 0ce0f7c0c8 mesa: Remove the generated glapi from source control, and just build it.
Mesa already always depends on python to build.  The checked in
changes are not reviewed (because any trivial change rewrites the
world).  We also have been pushing commits between xml change and
regen where at-build-time xml-generated code disagrees with committed
xml-generated code.  And worst of all, sometimes we ("I") check in
*stale* xml-generated code.

Acked-by: Ian Romanick <ian.d.romanick@intel.com>
2012-05-29 11:51:57 -07:00
Jonas Maebe 8d09f4d0cc glapi: Correct size of allocated _glapi_table struct
The __glapi_gentable_set_remaining_noop() routine treats the _glapi_struct
as an array of _glapi_get_dispatch_table_size() pointers, so we have to
allocate _glapi_get_dispatch_table_size()*sizeof(void*) bytes rather
than sizeof(struct _glapi_struct) bytes.

Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-04-22 20:39:32 -07:00
Chad Versace 5154b45217 mapi: Fix Android build
The Android build was broken by
    commit ca760181b4
    Author: Kristian Høgsberg <krh@bitplanet.net>
    Date:   Fri Mar 16 12:55:40 2012 -0400

    shared-glapi: Convert to automake

The offending change was that it redefined the filepaths in sources.mak
like this:
    - FOO_FILES := bar.c
    + FOO_FILES := $(TOP)/src/mapi/mapi/bar.c
This broke the build because source filepaths in Android makefiles must be
relative to the makefile.

Ideally, this could be fixed by reverting the change in sources.mak and
making shared-glapi's Makefile.am use $(addprefix $(TOP)/src/mapi/mapi,
$(FOO_FILES)). However, automake doesn't understand builtin GNU make
functions, such as addprefix. So, it seems that automake and Android can
no longer share sources.mak.

Fix the build by duplicating the source lists from sources.mak into
Android.mk.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-04-10 21:07:12 -07:00
Eric Anholt 62bdb187f8 glapi: regen for TBO change. 2012-04-09 14:33:53 -07:00
Eric Anholt 0be44a3541 glapi: Mark TexBuffer as an alias of TexBufferARB.
This is set correctly in gl.spec, but was missed in Mesa.  As a
result, only one of the two was hooked up in Mesa.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-04-09 14:33:41 -07:00
Kristian Høgsberg 2402ce04ae shared-glapi: Include from builddir
Fixes out-of-tree builds.

https://bugs.freedesktop.org/show_bug.cgi?id=47649
2012-03-29 09:25:15 -04:00
Dylan Noblesmith 91c8bedb8a glapi: add GL_ARB_texture_float
And add some missing core GL 3.0 enums that came from this
extension, too.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-26 21:35:17 +00:00
Dylan Noblesmith 50fa821854 glapi: add GL_ARB_depth_buffer_float
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-26 21:35:04 +00:00
Dylan Noblesmith faf954f151 glapi: add GL_ARB_texture_compression_rgtc
Noticed this was missing when writing the "glapi: sort ARB extensions
by number" commit, which at least shows it was effective.

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-03-26 21:28:25 +00:00
Dylan Noblesmith bae4cd6882 glapi: add ARB_texture_rg
Noticed it was missing based on the lack of a descriptive enum
name from this bug's error message:

https://bugs.freedesktop.org/show_bug.cgi?id=44039

This moves two enums out of GL3x.xml. Though since this and
GL_ARB_texture_compression_rgtc are both strict subsets of GL3,
both extensions should have had all their enums in that file
to begin with, not just two of them.

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-03-26 21:28:25 +00:00
Dylan Noblesmith a419595a87 regen for "glapi: sort ARB extensions by number" 2012-03-26 21:28:10 +00:00
Dylan Noblesmith 1ae2e39d01 glapi: sort ARB extensions by number
And add comments to fill in for extensions that aren't there.

Noticed the comment about "ARB extensions sorted by extension number"
didn't extend to the <xi:include> directives when it became clear
GL_ARB_texture_rg was missing, going by the error message seen here:

https://bugs.freedesktop.org/show_bug.cgi?id=44039

This makes it easier to notice in the future if an extension is missing
when it shouldn't be.

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-03-26 21:27:15 +00:00
Dave Airlie a83c1d61c2 glapi: ARB_blend_func_extended support + regen. (v2)
This adds the xml file covering ARB_blend_func_extended.

v2: fix SRC1_ALPHA

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-03-26 18:42:41 +01:00
Jon TURNEY 0bc4407744 mapi: Use -no-undefined libtool flag in src/mapi/shared-glapi/Makefile.am
Use -no-undefined to assure libtool that the library has no unresolved
symbols at link time, so that libtool will build a shared library on
platforms that require that all symbols are resolved when the library
is linked.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-03-21 11:31:45 -07:00
Kenneth Graunke 2097af9728 Add Makefile to shared-glapi .gitignore 2012-03-20 11:50:51 -07:00
Kristian Høgsberg ca760181b4 shared-glapi: Convert to automake
This fixes a build problem where EGL links to libgbm.la, which encodes
a relative path to it's libglapi.so dependency.  The relative path
breaks when the linker tries to resolve it from src/egl/main instead
of src/gbm.  Typically we silently fall back to the system
libglapi.so, which is wrong and breaks when there isn't one.

Morale of the story: don't mix mklib and libtool.
2012-03-19 11:13:06 -04:00
José Fonseca 5ea18503e7 mapi/glapi: Fix glDebugMessageCallbackARB arg type to GLDEBUGPROCARB
Necessary to prevent type mismatches on MinGW.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-03-11 16:50:30 +00:00
José Fonseca 10d3b6500b glapi/gen: Add support for pointer types.
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-03-11 16:50:29 +00:00
Marek Olšák 3917503b9a glapi: regenerate files 2012-03-10 21:42:05 +01:00
nobled a0d6732182 glapi: add ARB_debug_output.xml
Marek v2: replace GLDEBUGPROCARB with void*
2012-03-10 21:42:04 +01:00
Vinson Lee c5e6460022 scons: Don't build the assembly sources on Mac OS X.
This patch allows the Mac OS X SCons build to complete. The assembly
sources contain psuedo-ops that not are supported on Mac OS X.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-02-25 00:25:43 -08:00
Paul Berry bc39de8c0b glapi: Fix incorrect enum value.
From http://www.opengl.org/registry/specs/ARB/seamless_cube_map.txt:

    Accepted by the <cap> parameter of Enable, Disable and IsEnabled,
    and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv
    and GetDoublev:

    TEXTURE_CUBE_MAP_SEAMLESS                   0x884F

This caused a change in enums.c, which is manually built from the .xml
files.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-02-23 09:35:44 -08:00
Ian Romanick 8f3be33985 glapi: Include GLES2 headers for ES2 extension functions
This fixes build errors like

In file included from glapi_dispatch.c:91:
../../../src/mapi/glapi/glapitemp.h:4641: error: no previous prototype for
'glDrawBuffersNV'

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Lucas Stach <dev@lynxeye.de>
2012-02-15 14:50:00 -08:00
José Fonseca efd73f72d8 mapi/glapi: Never use a generic no-op entry-point on Windows.
When GLAPIENTRY is __stdcall (ie Windows), the stack is popped by the
callee making the number/type of arguments significant, therefore
using a generic no-op causes stack corruption for many entry-points.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-02-02 14:45:24 +00:00
José Fonseca 6549e721ad mapi: Make initMagic unsigned.
To avoid signed/unsigned comparison warnings against INIT_MAGIC
0xff8adc98, which doesn't fit on signed integers.
2012-01-26 17:33:33 +00:00
José Fonseca 1d1033926d scons: Remove references to u_thread.c
For future reference: always run "git grep" on refactorings.
2012-01-26 17:29:38 +00:00
Matt Turner b7a81b6e51 Fix visibility of u_thread functions by inlining them
-fvisibility=hidden was preventing them from being exported, which
combined with shared-glapi was causing undefined symbol errors at
runtime.

We don't want to make these functions part of the ABI, and given
how simple they are, we simply inline them.
2012-01-26 12:05:33 -05:00
Matt Turner 027ce0c493 Revert "Always build shared glapi"
This reverts commit adefee50d9.

Shared glapi was never tested with --enable-xlib-glx and turns out
to cause a lot of problems.

Conflicts:

	configure.ac
2012-01-24 11:34:42 -05:00
Matt Turner adefee50d9 Always build shared glapi
libglapi.so, libGL.so, libGLESv2.so, libGLESv1_CM.so must all
come from the same version of Mesa or bad things may happen.

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2012-01-20 14:56:42 -05:00
Ian Romanick 7e9cb2ac6d Regenerate files from previous commits
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-12-13 16:07:17 -08:00
Ian Romanick 0c6b930322 glapi/glx: For GLX code, use the existing _X_HIDDEN and _X_INTERNAL defines
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-12-13 16:07:17 -08:00
Ian Romanick bc35da409b glapi/glx: Generate glapi_gentable.c so that the xserver can use it
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-12-13 16:07:17 -08:00
Ian Romanick af50f3bf44 glapi/glx: Generate dispatch.h so that the xserver can use it
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-12-13 16:07:17 -08:00
Ian Romanick 2e16875873 glapi/glx: Xserver wants dispatch.h, not glapidispatch.h
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-12-13 16:07:17 -08:00
Ian Romanick c0d2f4c123 glapi/glx: Don't send GL API files to the xserver
The versions in the xserver and in libGL have diverged enough that the
xserver doesn't want these.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-12-13 16:07:17 -08:00
Ian Romanick e089a0e2ee glapi: Remove mention of nonexistent enums
glext.h doesn't have GL_MIN_PROGRAM_TEXEL_OFFSET_EXT or
GL_MAX_PROGRAM_TEXEL_OFFSET_EXT.  Using them in the XML causes code to
be generated for the xserver that won't compile.  Use the names that
exist instead.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-12-13 16:07:17 -08:00
Ian Romanick 090dd9428d glapi/glx: Remove g_disptab.h from xserver generated files
That file was removed from the xserver with commit:

    commit a80780a7638f847c3be20e5e0c7fe85e83d9bdd1
    Author: Adam Jackson <ajax@redhat.com>
    Date:   Wed Nov 17 09:03:06 2010 -0500

        glx: Remove swap barrier and hyperpipe support

        Never implemented in any open source driver.  The implementation
        assumed explicit DDX driver knowledge of how the client-side driver
        worked, since at the time the server's GL renderer was not a DRI driver.
        But now, it is, so any implementation of these should be done with
        additional DRI driver API, like the swap control extension.

        Reviewed-by: Julien Cristau <jcristau@debian.org>
        Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
        Signed-off-by: Adam Jackson <ajax@redhat.com>

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-12-13 16:07:17 -08:00
Chia-I Wu 35b506148e glapi: add GL_OES_compressed_ETC1_RGB8_texture for GLES
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-12-02 08:43:44 +08:00
Brian Paul 919c835835 glapi: s/INLINE/inline/ for dispatch.h file 2011-11-30 06:57:36 -07:00
José Fonseca 10b07665be Remove windows kernel support code.
Not actively used.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-11-29 17:34:56 +00:00
Dave Airlie 8c1037042f glapi: add ARB_texture_rgb10_a2ui support.
This just adds one enum.

regenerate enums.c.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-27 16:25:12 +00:00
Chia-I Wu 169ef48c85 android: clean up libglapi bulid rules a bit
Make the output prettier.  Make the rules reusable if we ever want to add
other modules, such as libGLESv2_mesa.
2011-11-26 11:42:01 +08:00
José Fonseca 63e7a4c6e5 mesa,glsl,mapi: Put extern "C" { ... } where appropriate.
Probably a several places missing, but enough to cover all headers
(in)directly included by uniform_query.cpp, and fix the MSVC build.
2011-11-09 10:24:37 +00:00
Chia-I Wu 6e093935bb glapi: add entry points for OES_EGL_image_external
Only enums actually.

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
2011-11-03 15:09:43 +08:00
Brian Paul ae9bef240d glapi: regenerated API files for GL_ARB_texture_storage 2011-10-31 10:52:56 -06:00
Brian Paul af95504dad glapi: new API specs for GL_ARB_texture_storage 2011-10-31 10:52:56 -06:00
Kenneth Graunke d38839a498 glapi: Enclose glapi.h in an extern "C" block when included by C++.
Fixes a build failure introduced in commit
b7fa0d0727.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-and-tested-by: Paul Berry <stereotype441@gmail.com>
2011-10-04 15:11:42 -07:00
Ian Romanick efd027a8b5 glapi: regen API files for new extension
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2011-10-04 12:25:58 -07:00
Ian Romanick 188123ca06 glapi: Add entry point for NV_draw_buffers
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-04 12:25:57 -07:00
Ian Romanick b2f23438a2 glapi: Move ARB_draw_buffers extension to a separate file
This also moves ATI_draw_buffers.  This is to facilitate enabling
NV_draw_buffers in OpenGL ES 2.0.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-04 12:25:56 -07:00
Ian Romanick c78baae796 glapi: Don't emit remap data for individual extensions
All of the extensions actually supported by Mesa have been remapped by
remap.c for a long time.  Emitting all of these data structures is
just clutter.

Drivers that need additional functions remapped, should add
'offset="assign"' to the function definition in the .xml file.

The changes to remap_helper.h are in a follow-on ~8700 line patch that
would surely be rejected by the mailing list.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chia-I Wu <olv@lunarg.com>
2011-09-19 12:02:21 -07:00
José Fonseca 1cf808c86e Define INLINE macro in terms of inline. 2011-09-08 09:17:42 +01:00
Dave Airlie 2b3da6b01e glapi: regen API files for new extension
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-06 10:16:16 +01:00
Dave Airlie 3543160f56 glapi: add ARB_vertex_type_2_10_10_10_rev entrypoints. (v2)
These are the new API entrypoints for ARB_vertex_type_2_10_10_10_rev
extension, along with the new INT_2_10_10_10_REV enum.

v2: fixup crazy whitespace cut-n-paste mess

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-09-06 10:15:59 +01:00
Ian Romanick 3a1ed4eaf2 mapi: Commit generated files modified by previous commit
Some of the changes are spurious because somebody forgot to do this
when adding glFramebufferTextureLayerARB.
2011-08-26 23:33:23 -07:00
Ian Romanick f40c291ed6 mapi: Silence many "warning: unused parameter"
When generating dispatch templates, emit the '(void) blah;' magic to
make GCC happy.  This reduces a lot of warning spam if you build with
-Wunused-parameter or -Wextra.

Reviewed-by: Chia-I Wu <olv@lunarg.com>
2011-08-26 23:33:12 -07:00
Ian Romanick 93db12a721 mesa: Remove support for BeOS
Acked-by: Kristian Høgsberg <krh@bitplanet.net>
Acked-by: Marek Olšák <maraeo@gmail.com>
Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Build-Tested-by: Jakob Bornecrantz <jakob@vmware.com>
Tested-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-08-26 23:31:23 -07:00
Brian Paul cdb7396390 scons: don't compile some files with -gstabs if using mingw32
Compiling some (large) files with i686-pc-mingw32-gcc 4.2.2 (at least)
and the -gstabs option triggers a compiler error.  Use this work-around
to simply compile the effected files without -gstabs.
2011-08-26 08:05:36 -06:00
Chia-I Wu ee41fc898d android: build shared glapi
This builds the shared library libglapi from shared glapi.

Reviewed-by: Chad Versace <chad@chad-versace.us>
2011-08-21 02:01:49 +08:00
Paul Berry e9ae4cadf5 glapi: update .gitignore for generated ES dispatch headers
Commit 6eff33dc (glapi: generate ES dispatch headers from core mesa)
replaced the autogenerated files
src/mapi/es1api/main/{dispatch,remap_helper}.h with new autogenerated
files src/mesa/main/api_exec_es{1,2}_{dispatch,remap_helper}.h.  This
patch updates the .gitignore files to properly ignore the new
autogenerated files, and stop ignoring the old autogenerated files.

Reviewed-by: Chia-I Wu <olv@lunarg.com>
2011-08-18 10:18:22 -07:00
Chia-I Wu e09b706c9e glapi: remove gen-es
Not used anymore.
2011-08-13 15:14:24 +08:00
Chia-I Wu 6eff33dc7f glapi: generate ES dispatch headers from core mesa
GLESv1 and GLESv2 have their own dispatch.h and remap_helper.h.  These
headers are only used by api_exec_es1.c and api_exec_es2.c in core mesa.
Move the rules to generate them from glapi to core mesa.

Reviewed-by: Brian Paul <brianp@vmware.com>

[olv: updated after reviewing to fix SCons build]
2011-08-13 15:14:00 +08:00
Chia-I Wu 786e5a2fb4 glapi: add glapi_gen.mk to help header generation
glapi_gen.mk is supposed to be included by glapi users to simplify
header generation.  This commit also makes es1api, es2api, and
shared-glapi use it.

Reviewed-by: Brian Paul <brianp@vmware.com>

[olv: updated after reviewing to prefix all variables in glapi_gen.mk by
 glapi_gen]
2011-08-13 13:57:10 +08:00
Chia-I Wu 5076561b35 glapi: use gl_and_es_API.xml to generate GLES headers
glapi/gen-es/ defines two sets of GLAPI XMLs for OpenGL ES 1.1
(es1_API.xml) and 2.0 (es2_API.xml) respectively.  They are used to
generate dispatch.h and remap_helper.h for GLES.  Together with
gl_and_es_API.xml, we have to maintain three sets of GLAPI XMLs.

This commit makes dispatch.h and remap_helper.h for GLES be generated
from gl_and_es_API.xml.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-08-13 13:54:57 +08:00
Chia-I Wu b8202b3d44 glapi: add methods to filter functions
add gl_api::filter_functions and gl_function::filter_entry_points to
filter out unwanted functions and entry points.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-08-13 13:54:54 +08:00
Chia-I Wu 281947b351 glapi: add gles_api.py
Move the list of entry points belong to GLES from mapi_abi.py to a new
file.

Until we figure out how to describe the APIs an entry point belongs to
in the XML file, and how to handle the case where an entry point others
alias is missing in some APIs, this is an easier solution than
maintaining another two sets of XMLs in glapi/gen-es/.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-08-13 13:54:30 +08:00
Jeremy Huddleston fbd7448977 glapi: Update specs to correctly list FramebufferTextureLayerARB as an alias of FramebufferTextureLayerEXT
FramebufferTextureLayer is an alias of FramebufferTextureLayerEXT, so
FramebufferTextureLayerARB needs to be listed as an alias of
FramebufferTextureLayerEXT rather than FramebufferTextureLayer.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-20 16:54:58 -07:00
José Fonseca d6a0fe19e8 scons: Correct glapi USE_xxx_ASM flags. 2011-06-17 20:13:16 +01:00
Jeremy Huddleston 1e16c34c5c glapi: _glapi_create_table_from_handle: Set missing pointers to NoOp rather than NULL
This change to _glapi_create_table_from_handle causes it to fill the dispatch
table with NoOps for unimplemented functionality.  This matches what is done
in indirect_init.c and also allows us to enable logging (when built with
-DDEBUG and the MESA_DEBUG or LIBGL_DEBUG environment variables are set) to
catch cases where clients are trying to use these unimplemented extentions.

Additionally, this fixes some gcc -pedantic warnings.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-14 18:22:01 -07:00
Jeremy Huddleston b44d13e67b glapi: Add check for NULL symbol_prefix in gentable and fix warnings
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-13 14:50:37 -07:00
Chia-I Wu 77b7e1b58f mapi: declare x86_entry_start/end static
x86_entry_start and x86_entry_end are defined by the inline assembly.
Declaring them static saves one instruction in entry_get_public.
2011-06-13 12:19:47 +08:00
Benjamin Franzke 3e1caf5d26 mapi: Fix tls with shared/es-glapi on x86-64
x86_64_entry_start needs to be declared static in the C code,
in order to have the correct address in entry_get_public
(seems not to be needed on x86).

The compiler needs to lookup a local not a global object.

Otherwise addresses needed for _glapi_proc_address will be computed
from some random offset (0x6400229a61058b48 in my case).
2011-06-13 12:19:47 +08:00
Jeremy Huddleston 85937f4c0d glapi: Add API that can create a _glapi_table from a dlfcn handle
Example usage:

void *handle = dlopen(opengl_library_path, RTLD_LOCAL);
struct _glapi_table *disp = _glapi_create_table_from_handle(handle, "gl");

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-11 21:55:01 -07:00
Chia-I Wu 4bb748b609 mesa: merge glapidispatch.h into dispatch.h
glapidispatch.h was located in glapi and shared with mesa core.  Because
the way it was shared, mesa core must include it indirectly via
main/dispatch.h.

Now that it is no longer needed by glapi and is located in core mesa,
merging it with main/dispatch.h to avoid wrong uses.
2011-06-08 23:19:01 +08:00
Chia-I Wu fed482f5e3 mesa: fix GLES remap table setup again
Generate different glapidispatch.h's for GL and GLES.  For GLES, we want
a local remap table.

This reverts commit 5af46e8360.  The
commit will break GL remap table setup when main/glapidispatch.h is
regenerated.
2011-06-08 23:17:57 +08:00
Pierre-Eric Pelloux-Prayer 0dae94610e glapi: regenerated files
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-06-02 17:55:13 -06:00
Brian Paul 898f4c5133 glapi: add glDrawElementsInstancedBaseVertex() function to xml
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-06-02 17:54:55 -06:00
Nathan Kidd f3652f0983 glapi: Make xserver location error more helpful
glx code hasn't lived under xserver/GL for a long time now.

Signed-off-by: Nathan Kidd <nkidd@opentext.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-06-01 08:30:59 -06:00
Thierry Reding 5af46e8360 mesa: Fix remap_table setup.
Since the SET_xxx and GET_xxx macros used to initialize the remap_table
have been replaced by inline functions, the missing late macro expansion
leads to driDispatchRemapTable not being redefined to remap_table, which
in turn causes the remap_table not to be setup properly.

This commit fixes the issue by moving the table redefinition after the
definition of driDispatchRemapTable but in front of the inline function
definitions.
2011-05-23 16:19:44 +01:00
José Fonseca 075d2bfb72 glapi: More type-checking in Get_xxx too. 2011-05-20 12:59:23 +01:00
José Fonseca ec4dfc2aad glapi: Implement SET_xxx as inline functions instead of macros.
In order to have the benefit of type checking, and detect missing
GLAPIENTRY keywords on public entrypoints.
2011-05-19 16:49:49 +01:00
Marek Olšák 3be1c7f260 glapi: regenerate files for AMD_draw_buffers_blend 2011-05-03 00:35:50 +02:00
Marek Olšák 9ecb46f59e glapi: add functions for AMD_draw_buffers_blend
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-05-03 00:35:50 +02:00
Brian Paul 6b329b9274 Squashed commit of the following:
commit 864fe253b04105b7469e5f7b064dc37637b944f8
Author: Brian Paul <brianp@vmware.com>
Date:   Thu Apr 21 20:13:07 2011 -0600

    mesa: s/exec/disp/ in _mesa_init_histogram_dispatch()

    This function isn't normally compiled (FEATURE_histogram).

commit f4bf45e2b94b582cacd19cdca873c5be627e4250
Author: nobled <nobled@dreamwidth.org>
Date:   Thu Apr 21 07:53:58 2011 -0600

    mesa: hook up GL_ARB_robustness dispatch functions

    ...and advertise the extension.

    Signed-off-by: Brian Paul <brianp@vmware.com>

commit 2b89e38e5f572dc40cebc06381ae7c5d04386998
Author: nobled <nobled@dreamwidth.org>
Date:   Thu Apr 21 07:53:58 2011 -0600

    mesa: regenerated API files for GL_ARB_robustness

    Signed-off-by: Brian Paul <brianp@vmware.com>

commit 5d5ebfb7135cec9d833adef86cbf4d0f3d9beca8
Author: nobled <nobled@dreamwidth.org>
Date:   Thu Apr 21 07:53:57 2011 -0600

    glapi: add ARB_robustness xml

    Signed-off-by: Brian Paul <brianp@vmware.com>

commit 0159d1d6d99f4bbc18381dc2081c20d3aff17ac9
Author: nobled <nobled@dreamwidth.org>
Date:   Thu Apr 21 07:53:57 2011 -0600

    mesa: implement GL_ARB_robustness functions

    Signed-off-by: Brian Paul <brianp@vmware.com>

commit 938fd71f4c4742f274922d53492a7290ab8d9c9b
Author: nobled <nobled@dreamwidth.org>
Date:   Thu Apr 21 07:53:57 2011 -0600

    mesa: add context fields for GL_ARB_robustness

    Signed-off-by: Brian Paul <brianp@vmware.com>

commit 72075137bc79e65be03dac7e97b6dba93c3a86a4
Author: nobled <nobled@dreamwidth.org>
Date:   Thu Apr 21 07:53:57 2011 -0600

    mesa: standardize more bounds-checking error messages

    Signed-off-by: Brian Paul <brianp@vmware.com>

commit 32a3fc23746db49da903fbc08afa0135af3007d2
Author: nobled <nobled@dreamwidth.org>
Date:   Thu Apr 21 07:53:57 2011 -0600

    mesa: standardize some bounds-checking error messages

    Signed-off-by: Brian Paul <brianp@vmware.com>

commit cecbf1f4d164207de373dec0cadee2e84e1f9656
Author: nobled <nobled@dreamwidth.org>
Date:   Thu Apr 21 07:53:57 2011 -0600

    mesa: add more bounds-checking support for client memory buffers

    Signed-off-by: Brian Paul <brianp@vmware.com>

commit edc895b52383d5bd274422db56adead1d81daf5f
Author: nobled <nobled@dreamwidth.org>
Date:   Thu Apr 21 07:53:57 2011 -0600

    mesa: add bounds-checking support for client memory buffers

    Signed-off-by: Brian Paul <brianp@vmware.com>

commit 3a96ef28a538f158a219b406cd090dee70470c85
Author: nobled <nobled@dreamwidth.org>
Date:   Thu Apr 21 07:53:57 2011 -0600

    mesa: use is_bufferobj() helper function

    Signed-off-by: Brian Paul <brianp@vmware.com>
2011-04-26 14:54:41 -06:00
José Fonseca c89cca648d mapi/glapi: Avoid warnings about visibility being unsupported on MinGW. 2011-04-23 12:14:39 +01:00
Brian Paul 1cbd3a1cc7 glapi: regenerated files for GL_ARB_sampler_objects 2011-04-10 13:12:49 -06:00
Brian Paul d40ec9a884 glapi: interface for GL_ARB_sampler_objects 2011-04-10 13:12:49 -06:00
Brian Paul 9a77e285e8 mesa: regenerated API entrypoints for GL_ARB_texture_buffer_object 2011-04-05 18:50:39 -06:00
Brian Paul 13ba6b7369 mesa: API spec for GL_ARB_texture_buffer_object 2011-04-05 18:48:26 -06:00
Marek Olšák e5c6a92a12 mesa: implement clamping controls (ARB_color_buffer_float)
Squashed commit of the following:

Author: Marek Olšák <maraeo@gmail.com>

    mesa: fix getteximage so that it doesn't clamp values
    mesa: update the compute_version function
    mesa: add display list support for ARB_color_buffer_float
    mesa: fix glGet query with GL_ALPHA_TEST_REF and ARB_color_buffer_float

commit b2f6ddf907935b2594d2831ddab38cf57a1729ce
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Tue Aug 31 16:50:57 2010 +0200

    mesa: document known possible deviations from ARB_color_buffer_float

commit 5458935be800c1b19d1c9d1569dc4fa30a97e8b8
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Tue Aug 24 21:54:56 2010 +0200

    mesa: expose GL_ARB_color_buffer_float

commit aef5c3c6be6edd076e955e37c80905bc447f8a82
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 18:12:34 2010 +0200

    mesa, mesa/st: handle read color clamping properly

    (I'll squash the st/mesa part to a separate commit. -Marek)

    We set IMAGE_CLAMP_BIT in the caller based on _ClampReadColor, where
    the operation mandates it.

    TODO: did I get the set of operations mandating it right?

commit 3a9cb5e59b676b6148c50907ce6eef5441677e36
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 18:09:41 2010 +0200

    mesa: respect color clamping in texenv programs (v2)

    Changes in v2:
    - Fix attributes other than vertex color sometimes getting clamped

commit de26f9e47e886e176aab6e5a2c3d4481efb64362
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 18:05:53 2010 +0200

    mesa: restore color clamps on glPopAttrib

commit a55ac3c300c189616627c05d924c40a8b55bfafa
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 18:04:26 2010 +0200

    mesa: clamp color queries if and only if fragment clamping is enabled

commit 9940a3e31c2fb76cc3d28b15ea78dde369825107
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Wed Aug 25 00:00:16 2010 +0200

    mesa: introduce derived _ClampXxxColor state resolving FIXED_ONLY

    To do this, we make ClampColor call FLUSH_VERTICES with the appropriate
    _NEW flag.

    We introduce _NEW_FRAG_CLAMP since fragment clamping has wide-ranging
    effects, despite being in the Color attrib group.

    This may be easily changed by s/_NEW_FRAG_CLAMP/_NEW_COLOR/g

commit 6244c446e3beed5473b4e811d10787e4019f59d6
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 17:58:24 2010 +0200

    mesa: add unclamped color parameters
2011-03-29 12:04:55 +02:00
Marek Olšák 3bdd12ecb5 mesa: regenerate glapi files 2011-03-29 12:04:54 +02:00
José Fonseca acd7ce57f7 mesa,mapi: Remove spurious const keyword from ClearBufferfi args. 2011-03-25 16:22:26 +00:00
Dave Airlie 9b13c988ac glapi: drop glapi.[ch] and glapitemp.h from being copied to the X server.
These files are no longer considered shared as the X code is a lot simpler
without sharing them.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-03-21 12:03:20 +10:00
Marek Olšák 7fa53f37e6 mesa: regenerate glapi files
Be sure to type "make clean" after this commit, otherwise your binaries
will segfault.
2011-03-15 15:58:00 +01:00
Marek Olšák 867f9b07d4 mesa: add NV_texture_barrier 2011-03-15 15:47:27 +01:00
Dave Airlie fedc5b03db glx: add ARB_create_context functions/ops to glx xml 2011-03-15 14:27:27 +10:00
Dave Airlie 340e15c79b glx: the server still needs __GLXcontext.
This file generates code for the X server and it still uses
the __GLXcontext structure name.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-03-14 15:03:53 +10:00
José Fonseca b531b01b70 mapi: _glthread_DECLARE_STATIC_MUTEX is not broken on Windows. 2011-03-06 09:11:59 +00:00
Chia-I Wu b825e49552 mapi: Workaround a bug in makedepend.
makedepend would crash when a source includes a header indirectly, such
as

  #define HEADER "some-header.h"
  #include HEADER

Do not define HEADER (makedepend would detects this as an incomplete
include) and add the dependency manually in the Makefile.

This should hopefully fix bug #33374.
2011-01-29 19:22:54 +08:00
Dimitry Andric cfb9aae3ec glapi: add @GOTPCREL relocation type
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=33440
This replaces commit 731ec60da3

NOTE: This is a candidate for the 7.9 and 7.10 branches

Signed-off-by: Brian Paul <brianp@vmware.com>
2011-01-27 18:04:57 -07:00
Brian Paul ba0953da5b Revert "glapi: adding missing @GOTPCREL qualifer in glapi_x86-64.S"
This reverts commit 731ec60da3.

This change causes crashes in the x86-64 dispatch code.
2011-01-25 12:12:34 -07:00
Dimitry Andric 37bffe8d12 glapi: adding @ char before type specifier in glapi_x86.S
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=33433
NOTE: This is a candidate for the 7.9 and 7.10 branches.

Signed-off-by: Brian Paul <brianp@vmware.com>
2011-01-25 09:23:46 -07:00
Dimitry Andric 731ec60da3 glapi: adding missing @GOTPCREL qualifer in glapi_x86-64.S
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=33440
NOTE: This is a candidate for the 7.9 and 7.10 branches

Signed-off-by: Brian Paul <brianp@vmware.com>
2011-01-25 09:22:14 -07:00
Tim Wiederhake d14764815c add machine generated files to .gitignore
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-01-24 09:17:57 -07:00
Chia-I Wu bb770af3a5 scons: Add support for GLES.
GLES can be enabled by running scons with

  $ scons gles=yes

When gles=yes is given, the build is changed in three ways.  First,
libmesa.a will be built with FEATURE_ES1 and FEATURE_ES2.  This makes
DRI drivers and libEGL support and advertise GLES support.  Second, GLES
libraries will be created.  They are libGLESv1_CM, libGLESv2, and
libglapi.  Last, libGL or opengl32 will link to libglapi.  This change
is required as _glapi_* will be declared as __declspec(dllimport) in
libmesa.a on windows.  libmesa.a expects those symbols to be defined in
another DLL.  Due to this change to GL, GLES support is marked
experimental.

Note that GLES requires libxml2-python to generate some of its sources.
2011-01-22 11:59:05 +08:00
Chia-I Wu 3f04314ae2 mapi: ENTRY_CURRENT_TABLE_GET should be stringified.
So that it can be renamed to _glapi_get_dispatch.
2011-01-22 11:58:38 +08:00
Brian Paul 887d2b647b mesa: clean-up _mesa_lookup_prim_by_nr()
Remove the redundant public _mesa_prim_name[] array.
2011-01-20 09:44:33 -07:00
Chia-I Wu e8c7d7598f glapi: Fix OpenGL and OpenGL ES interop.
When --enable-shared-glapi is specified, libGL will share libglapi with
OpenGL ES instead of defining its own copy of glapi.  This makes sure an
app will get only one copy of glapi in its address space.

The new option is disabled by default.  When enabled, libGL and libglapi
must be built from the same source tree and distributed together.  This
requirement comes from the fact that the dispatch offsets used by these
libraries are re-assigned whenever GLAPI XMLs are changed.

For GLX, indirect rendering for has_different_protocol() functions is
tricky.  A has_different_protocol() function is assigned only one
dispatch offset, yet each entry point needs a different protocol opcode.
It cannot be supported by the shared glapi.  The fix to this is to make
glXGetProcAddress handle such functions specially before calling
_glapi_get_proc_address.

Note that these files are automatically generated/re-generated

 src/glx/indirect.c
 src/glx/indirect.h
 src/mapi/glapi/glapi_mapi_tmp.h
2011-01-20 17:15:50 +08:00
Chia-I Wu 9767d3b5ad glapi: Fix OpenGL ES 1.1 and 2.0 interop.
Move _glapi_* symbols from libGLESv1_CM.so and libGLESv2.so to
libglapi.so.  This makes sure an app will get only one copy of glapi in
its address space.

Note that with this change, libGLES* and libglapi must be built from the
same source tree and distributed together.  This requirement comes from
the fact that the dispatch offsets used by these libraries are
re-assigned whenever GLAPI XMLs are changed.
2011-01-20 17:15:50 +08:00
Chia-I Wu 97185bf265 mapi: Add support for bridge mode.
In bridge mode, mapi no longer implements glapi.h.  It becomes a user of
glapi.h.  Imagine an app that uses both libGL.so and libGLESv2.so.
There will be two copies of glapi in the app's memory.  It is possible
that _glapi_get_dispatch does not return what _glapi_set_dispatch set,
if they access different copies of the global variables.  The solution
to this situation to build either one of the libraries as a bridge to
the other.  Or build both libraries as bridges to another shared
glapi library.
2011-01-20 17:15:50 +08:00
Chia-I Wu 96c52d16c1 mapi: u_current_table may be renamed.
When MAPI_MODE_GLAPI is defined, u_current_table is renamed to
_glapi_Dispatch or _glapi_tls_Dispatch.  The ASM dispatchers should not
use hardcoded name.
2011-01-20 17:15:50 +08:00
Chia-I Wu 6fc152f660 mapi: Add a new glapi.h implementation.
The new implementation is based on mapi.  No new script is needed.  As
noted in sources.mk, the way to use it is to compile MAPI_GLAPI_SOURCES
with MAPI_MODE_GLAPI defined.
2011-01-20 17:15:50 +08:00
Chia-I Wu 23a89f1872 mapi: Fix glapi printers for gl_and_es_API.xml.
Fix GLAPIPrinter, ES1APIPrinter, and ES2APIPrinter to output files that
are ready for compilation.  Since gl_and_es_API.xml is based on
gl_API.xml, the hidden and handcode attributes of entries have to be
overridden for ES1APIPrinter and ES2APIPrinter.
2011-01-20 17:15:50 +08:00
Chia-I Wu 7828f554ab mapi: Allow prefix to be macro.
Treat prefix as macro when it is all uppercase.  Generate PREFIX(name)
instead of PREFIXname when it is a macro.
2011-01-20 17:15:49 +08:00
Chia-I Wu f71a9acf59 mapi: Add the ability to parse GLAPI XML.
A prerequisite if we want to convert vgapi.csv to vgapi.xml, or to use
mapi for glapi.
2011-01-20 17:15:49 +08:00
Chia-I Wu 323b5e323a glapi: Add gl_and_es_API.xml.
gl_and_es_API.xml defines OpenGL ES 1.1 and 2.0 API as well as OpenGL
API.  It consists of gl_API.xml and the newly added es_EXT.xml,
ARB_get_program_binary.xml, OES_single_precision.xml, and
OES_fixed_point.xml.
2011-01-20 17:15:49 +08:00
twied aec19381ec Add machine generated files to .gitignore 2011-01-19 23:48:47 -08:00
Brian Paul 561307844f glapi: regenerated files 2011-01-15 18:35:45 -07:00
Brian Paul 1cf6ff3046 glapi: new entrypoint specs for GL_ARB_draw_buffers_blend 2011-01-15 18:35:45 -07:00
Brian Paul 1250e2330b glapi: regenerated files 2011-01-15 17:37:41 -07:00
Brian Paul caee0d024f glapi: GL_ARB_instanced_arrays support 2011-01-15 17:37:40 -07:00
Eric Anholt 841ad6bfad glapi: Regenerate for GL_ARB_ES2_compatibility. 2011-01-14 15:28:01 -08:00
Eric Anholt 8560cb939b glapi: Add entrypoints and enums for GL_ARB_ES2_compatibility. 2011-01-14 15:28:00 -08:00
José Fonseca 9277a62aa3 scons: Ensure the OpenVG/EGL import libs are also prefixed with 'lib'. 2011-01-13 12:33:41 +00:00
José Fonseca 63528c4510 scons: Build libOpenVG.dll & libEGL.dll
But without creating liblibOpenVG or liblibEGL elsewhere.

Thanks Chia-I Wu for pointing this out.
2011-01-13 11:54:43 +00:00
José Fonseca b07ad1d6bd scons: Fix build on systems without libOpenVG.so 2011-01-12 15:06:57 +00:00
Chia-I Wu a8b6b6555c scons: Updates for targets/egl-static.
Update SConscripts to re-enable or add support for EGL on windows and
x11 platforms respectively.  targets/egl-gdi is replaced by
targets/egl-static, where "-static" means pipe drivers and state
trackers are linked to statically by egl_gallium, and egl_gallium is a
built-in driver of libEGL.  There is no more egl_gallium.dll on Windows.
2011-01-12 17:40:01 +08:00
Brian Paul 1eceb9d323 mapi: add missing newline in error message 2010-12-31 16:37:41 -07:00
Chia-I Wu a91a337a7d mapi: Move mapi_func typedef to entry.h.
Make it clear that entry.h does not depend on stub.h.
2010-12-24 17:33:50 +08:00
Chia-I Wu a33e9f049d mapi: Define MAPI_TMP_DEFINES only when needed.
Since struct mapi_table is opaque, MAPI_TMP_DEFINES is not needed in
table.h.
2010-12-24 17:33:49 +08:00
Chia-I Wu e6a7ef3ca6 mapi: Add and use entry_get_public.
Given a dispatch slot, entry_get_public returns the address of the
corresponding public entry point.  There may be more than one of them.
But since they are all equivalent, it is fine to return any one of them.

With entry_get_public, the address of any public entry point can be
calculated at runtime when an assembly dispatcher is used.  There is no
need to have a mapping table in such case.  This omits the unnecessary
relocations from the binary.
2010-12-24 17:33:49 +08:00
Chia-I Wu 897bff6773 mapi: Make struct mapi_stub opaque.
Add accessors for struct mapi_stub and make it opaque.
2010-12-24 17:28:52 +08:00
Chia-I Wu 0c205484bf mapi: Allow blocks to be disabled from the output.
For example, a printer may ask not to output noop dispatch table.
2010-12-24 17:28:52 +08:00
Chia-I Wu b765b1269f mapi: Fix hidden entries.
Hidden entries are just like normal entries except that they are not
exported.  Since it is not always possible to hide them, and two hidden
aliases can share the same entry, the name of hidden aliases are mangled
to '_dispatch_stub_<slot>'.
2010-12-24 17:28:52 +08:00
Chia-I Wu 52ca153349 mapi: Add "handcode" attribute to the script.
Entries with handcode attribute will be handled normally, except no
entry point will be generated for them.
2010-12-24 17:28:52 +08:00
Chia-I Wu 8eee1d522e mapi: Minor ABIPrinter refactoring.
Split out function name generation from _c_decl to _c_function, and use
it everywhere.  Add an optional 'export' argument to _cdecl.  It is
prepended to the returned string.
2010-12-24 17:28:51 +08:00
Chia-I Wu 86d29eab48 mapi: Store alias entry instead of alias name.
An entry can hold more info than plain name.
2010-12-24 17:28:51 +08:00
Vinson Lee 0b76255714 mapi: Remove unnecessary header. 2010-12-23 15:25:38 -08:00
Chia-I Wu 7048095513 mapi: Clean up sources.mk.
Rename MAPI_GLAPI_SOURCES to MAPI_UTIL_SOURCES.  Rename macro
MAPI_GLAPI_CURRENT to MAPI_MODE_UTIL.  Update the comments to make it
clear that mapi may be used in two ways and how.
2010-12-18 15:05:58 +08:00
Chia-I Wu c17d4999f1 mapi: Clean up u_current interface.
Try not to use macros to make u_current.h appear to be glapi.h.  Use
u_current.h to implement glapi.h instead whenever possible.
2010-12-18 15:05:52 +08:00
Chia-I Wu c7119e281b mapi: Add ABI-tag note.
TLS requires kernel >= 2.4.20.  Per glapi.
2010-12-18 14:46:10 +08:00
Chia-I Wu 1c01bedb02 mapi: Fix a warning in !THREADS build.
It should be u_thread_self, not _glthread_GetID.
2010-12-12 17:59:47 +08:00
Chia-I Wu 8f2a974cf2 mapi: Rewrite mapi_abi.py to get rid of preprocessor magic.
The preprocessor magic in mapi was nothing but obfuscation.  Rewrite
mapi_abi.py to generate real C code.

This commit removes the hack added in
43121f2086.
2010-12-06 15:40:37 +08:00
José Fonseca 43121f2086 mapi: Hack to avoid vgCreateFont being generated as vgCreateFontA.
Right fix is probably stop C-preprocessor abuse and stick 100% with
scripted code generation.
2010-12-02 19:39:55 +00:00
José Fonseca e3659329e0 WIN32_THREADS -> WIN32
Fixes nasty bug where some parts of the code didn't define WIN32_THREADS
and were using the integer mutex implementation, causing even confusion
to the debuggers.

And there is little interest of other thread implemenation on Win32
besides Win32 threads.
2010-12-02 17:35:03 +00:00
Chia-I Wu 56f02cedfa st/vega: Update to latest headers. 2010-12-01 11:23:51 +08:00
Adam Jackson 1ccef926be drivers/x11: unifdef XFree86Server
This code was for the old GLcore build of the software rasteriser.  The
X server switched to a DRI driver for software indirect GLX long ago.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-29 17:37:54 -05:00
Brian Paul 5ed51e950f mesa: hook up GL 3.x entrypoints
Fix up some details in the xml files and regenerate dispatch files.
2010-11-21 09:20:44 -07:00
Brian Paul 81c347ef79 glapi: rename GL3.xml to GL3x.xml as it covers all GL 3.x versions 2010-11-21 09:20:43 -07:00
Brian Paul 48af60b465 mesa: upgrade to glext.h version 66
The type of the num/count parameter to glProgramParameters4[df]vNV()
changed so some API dispatch code needed updates too.
2010-11-17 20:04:45 -07:00
José Fonseca 601498ae73 scons: Revamp how to specify targets to build.
Use scons target and dependency system instead of ad-hoc options.

Now is simply a matter of naming what to build. For example:

  scons libgl-xlib

  scons libgl-gdi

  scons graw-progs

  scons llvmpipe

and so on. And there is also the possibility of scepcified subdirs, e.g.

  scons src/gallium/drivers

If nothing is specified then everything will be build.

There might be some rough corners over the next days. Please bare with me.
2010-11-01 13:30:22 +00:00
Chia-I Wu 9de5c6a1cb Merge branch 'glapi-reorg'
Conflicts:
	src/mapi/glapi/glapi_sparc.S
	src/mapi/glapi/glapi_x86.S
	src/mapi/glapi/glapidispatch.h
	src/mapi/glapi/glapioffsets.h
	src/mapi/glapi/glprocs.h
2010-10-29 12:46:59 +08:00
Brian Paul a6fb2acfdb glapi: regenerated API files 2010-10-28 21:17:41 -06:00
Brian Paul 20371d40b8 glapi: include EXT_gpu_shader4.xml 2010-10-28 21:17:41 -06:00
Brian Paul a52dbaa99a glapi: xml spec file for GL_EXT_gpu_shader4 2010-10-28 21:17:41 -06:00
Ian Romanick 44f6e17ebb glapi: Commit files changed by previous commit 2010-10-27 13:35:53 -07:00
Ian Romanick 206e904f3c glapi: Add GL_EXT_separate_shader_objects 2010-10-27 13:35:52 -07:00
Chia-I Wu 07b85457d9 glapi: Merge glapioffsets.h into glapidispath.h.
Move defines in glapioffsets.h to glapidispatch.h.  Rename
_gloffset_FIRST_DYNAMIC to _gloffset_COUNT, which is equal to the number
of entries in _glapi_table.

Consistently use SET_by_offset, GET_by_offset, CALL_by_offset, and
_gloffset_* to recursively define all SET/GET/CALL macros.
2010-10-27 11:07:29 +08:00
Chia-I Wu e4dbfa44ed glapi: Do not use glapioffsets.h.
glapioffsets.h exists for the same reason as glapidispatch.h does.  It
is of no use to glapi.  This commit also drops the use of glapioffsets.h
in glx as glx is considered an extension to glapi when it comes to
defining public GL entries.
2010-10-27 10:49:33 +08:00
Chia-I Wu e213968f2b glapi: Move glapidispatch.h to core mesa.
It is a core mesa header, not a glapi header.
2010-10-27 10:08:27 +08:00
Chia-I Wu b5022ad035 glapi: Do not use glapidispatch.h.
glapidispatch.h exists so that core mesa (libmesa.a) can be built for
DRI drivers or for non-DRI drivers as a compile time decision (whether
IN_DRI_DRIVER is defined).  It is of no use to glapi.  This commit also
drops the use of glapidispatch.h in glx and libgl-xlib as they are
considered extensions to glapi when it comes to defining public GL
entries.
2010-10-27 10:06:25 +08:00
Brian Paul 01e13a7d75 mesa: regenerated API files for GL_EXT_texture_integer 2010-10-23 10:19:31 -06:00
Brian Paul fd6f17c21a glapi: include/build EXT_texture_integer.xml 2010-10-23 10:19:31 -06:00
Brian Paul 9d73c4a9d5 glapi: GL_EXT_texture_integer API 2010-10-23 10:19:31 -06:00
Brian Paul 4f495ec20e mesa: regenerated files with primitive restart 2010-10-21 19:03:38 -06:00
Brian Paul 1cae8b5448 mesa: API spec for primitive restart 2010-10-21 19:03:38 -06:00
Kristian Høgsberg f9995b3075 Drop GLcontext typedef and use struct gl_context instead 2010-10-13 09:43:25 -04:00
Chia-I Wu ebeb4a7e8a mapi: Fix compiler warnings.
Do not use "void *" in arithmetics.
2010-09-30 17:09:59 +08:00
Ian Romanick 78db8c8b66 Regenerate files changed by previous commit 2010-09-27 15:23:14 -07:00
Chia-I Wu e3c46cf586 glapi: Fix ES build errors again.
This fixes an error in GLAPI ES.  My build is ok with or without this
patch, and the error affects others' setups.

[Patch from Francesco Marella]
2010-09-15 21:19:44 +08:00
Chia-I Wu cad87ebc3a glapi: Fix build errors for ES.
The latest glext.h defines GL_FIXED.  Test GL_OES_fixed_point instead to
decide whether to define GLfixed and GLclampx.

This fixes fdo bug #30205.
2010-09-15 17:45:26 +08:00
Brian Paul 7993832c12 mesa: update to version 64 of GL/glext.h
A number of other files had to be updated as well because const
qualifiers were added to the glMultiDrawArrays() function.
Also, GL_FIXED is now defined in glext.h.
2010-09-14 09:37:37 -06:00
Kristian Høgsberg 042a333028 Revert "glapi: Implement optional dispatch logging"
This reverts commit b9abc6139a and the
follow on fixes (7aae704 and 6fe1b47).  It's changing the glapi/driver
ABI and causes a number of problems for debug/non-debug builds.
2010-09-09 19:02:55 -04:00
Jakob Bornecrantz 7aae70406b glapi: Fix non-debug builds 2010-09-09 22:47:42 +02:00
Kristian Høgsberg b9abc6139a glapi: Implement optional dispatch logging
There's a useful feature buried in glapi to log all API calls to stderr.
Unfortunately it requires editing the code and then it's enabled
unconditionally for that build.  This patch builds in API logging for
debug builds and makes it run-time switchable by setting MESA_DEBUG=dispatch.
2010-09-09 13:21:15 -04:00
Luca Barbieri 699c82e30c glapi: fix generator which got out of sync with the codebase
The __GLapi typedef was removed in c356f5867f,
but the code generator hasn't been updated.
2010-08-30 20:51:49 +02:00
Chia-I Wu e607b67ebc glapi: Clean up header inclusions.
Do not rely on PUBLIC being defined in glapi.h.  Do not include core
mesa headers.
2010-08-23 18:28:14 +08:00
Chia-I Wu 29cff9ce2e mapi: Use MAPI_EXPORT to export public functions.
mapi.h is included by vgapi and st/vega.  On win32, the macro expands to
dllexport and dllimport respectively.
2010-08-21 14:13:59 +08:00
Chia-I Wu df98423f24 mapi: Prefix functions in u_current.h by u_current.
That is, replace the old _glapi_* names by new names that start with
u_current_.  When MAPI_GLAPI_CURRENT is defined, u_current.h defines
rename macros to restore the old names.  That is done for ABI
compatibility.
2010-08-21 14:13:59 +08:00
Chia-I Wu 760451baae glapi: Move public function/variable declarations to glapi.h.
glapi defines an interface that is used by DRI drivers.  It must not be
changed in an ABI incompatible way.  This commit moves all
functions/variables belong to the interface to glapi.h.  Instead of
including u_current.h from glapi.h, u_current.h now includes glapi.h.
2010-08-21 14:13:59 +08:00
Kristian Høgsberg c491e585e4 glx: Move bind and unbind to context vtable 2010-07-28 16:45:25 -04:00
Kristian Høgsberg c356f5867f glx: Rename __GLXcontext and __GLXdisplayPrivate to struct types. 2010-07-28 16:45:25 -04:00
Vinson Lee 9b85818698 glapi: Fix VMware spelling. 2010-07-28 01:11:34 -07:00
Brian Paul 672f6cdc19 glapi: use _mesa_snprintf()
Note that the enums.c file is generated with this script.
This will preserve the change from commit
c4066b78c0.
2010-07-13 07:44:35 -06:00
Zack Rusin da7bd6a90e mesa: initial support for ARB_geometry_shader4
laying down the foundation for everything and implementing most of the
stuff.
linking, gl_VerticesIn and multidimensional inputs are left.
2010-06-28 22:53:21 -04:00
Vinson Lee 7f6754af25 mapi: Add missing stdlib.h header for malloc declaration. 2010-06-20 01:03:00 -07:00
Chia-I Wu 79e5bea3cb vgapi: Generate PIC objects.
Fixes "...; recompile with -fPIC" error on x86-64.  See fdo 28336.
2010-06-01 07:33:29 +08:00
José Fonseca 4e6c880ea2 glapi: Generate PIC objects.
Fixes fdo 28336.
2010-05-31 22:11:38 +01:00
Chia-I Wu 60558b1594 mapi/vgapi: Add SConscript for Windows build. 2010-05-31 13:27:53 +08:00
Chia-I Wu ba26631d0d Define PUBLIC to dllexport on MSVC.
Define PUBLIC to __declspec(dllexport) when _MVC_VER is defined.
2010-05-31 11:31:07 +08:00
Chia-I Wu fa97399f42 glapi: Update SConscript for Windows.
Define macros to enable dllexport and thread support.  Adjust the output
path of mapi sources.
2010-05-31 10:53:29 +08:00
Eric Anholt 111dce90c1 Fix a substitution in glesv1_cm.pc 2010-05-20 13:57:10 -07:00
Brian Paul 903986ca12 glapi: fix generator scripts w.r.t. GLX_USE_APPLEGL
Commit 80b280db88 changed the .c files
instead of the .py generator scripts.
2010-05-11 21:40:56 -06:00
Brian Paul 6c06e2f053 glapi: added GL_ARB_transform_feedback2 entrypoints 2010-05-11 21:31:08 -06:00
Chia-I Wu 559046e791 mapi: Add install rules for OpenGL ES.
Move the install rules for OpenGL ES from src/mesa/Makefile to mapi.
2010-05-08 14:55:57 +08:00
Chia-I Wu bc918efb56 mapi: Install .pc file for OpenVG. 2010-05-08 14:55:57 +08:00
Chia-I Wu b0749fd09b mapi: Update vgapi to build libOpenVG.so.
Unlike the one produced by st/vega, this is a dispatch-only library.
2010-05-08 14:55:57 +08:00
Chia-I Wu 3e1ccb2508 mapi: Merge src/gles/.
Remove src/gles and have mapi/{es1api,es2api} build libGLESv1_CM.so and
libGLESv2.so.
2010-05-08 14:55:57 +08:00
José Fonseca 5065d33276 mapi/glapi: Don't allocate a page for every function on windows. 2010-05-07 07:31:44 +01:00
José Fonseca 5569faf05a mapi: Avoid Data Execution Prevention on windows. 2010-05-07 06:57:11 +01:00
Chia-I Wu de3994076e mapi: Add x86-64 dispatcher. 2010-05-07 10:41:12 +08:00
Chia-I Wu 56eb5d7e85 mapi: Add x86 dispatcher. 2010-05-07 10:41:12 +08:00
Chia-I Wu bdc4504252 mapi: Add vgapi.
vgapi is a dispatcher for OpenVG.
2010-05-07 10:41:12 +08:00
Chia-I Wu d4589d3816 mapi: Add a generic C dispatcher.
The idea is to have an API generate a header using mapi_abi.py.  The API
can then use the header to build a dispatcher.
2010-05-07 10:41:12 +08:00
Chia-I Wu a73c6540d9 mapi: Add mapi and share the code with glapi.
Specifically, move all or most of

      glapi/glapi.c         to mapi/u_current.c,
      glapi/glapi_execmem.c to mapi/u_execmem.c,
      glapi/glthread.[ch]   to mapi/u_thread.[ch]

and remove their dependencies on core Mesa headers.
2010-05-07 10:41:11 +08:00
Chia-I Wu 296adbd545 glapi: Move to src/mapi/.
Move glapi to src/mapi/{glapi,es1api,es2api}.
2010-05-07 10:41:11 +08:00