Commit Graph

1275 Commits

Author SHA1 Message Date
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
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
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
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 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
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
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
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
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
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 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
José Fonseca 4e6c880ea2 glapi: Generate PIC objects.
Fixes fdo 28336.
2010-05-31 22:11:38 +01: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
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
José Fonseca 5569faf05a mapi: Avoid Data Execution Prevention on windows. 2010-05-07 06:57:11 +01: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