Commit Graph

530 Commits

Author SHA1 Message Date
Brian a3a480979b Regenerated (see bug 11893) 2008-02-19 08:39:12 -07:00
Brian fda62a6f2f Regenerated (raise GL_INVALID_VALUE if counter param is negative) 2008-02-19 08:29:17 -07:00
José Fonseca 90b2beb661 Simplify makefile boilerplate code.
Don't define ASM_SOURCES variable globally -- reserve that variable to be defined
locally by makefiles, together with C_SOURCES and CPP_SOURCES.
2008-02-19 14:06:11 +09:00
Dan Nicholson 7688791fc5 glapi: Generate xserver glapi sources in the mesa tree
Instead of generating the glapi sources for the xserver and commiting
them to the xserver tree, we can keep them in the mesa tree and change
the xserver build to use the files from the mesa tree.

This makes the xserver glx build more robust as it reduces the chances
for mismatches of the glX API used in the xserver vs. in mesa.
2008-02-17 17:40:43 -08:00
Brian 5c82549d9e fix pc vs. gc->ps usage (bug 14197) 2008-01-22 08:40:29 -07:00
José Fonseca eaa82d33bf Add src/mesa to include path. 2007-12-12 16:04:58 +00:00
Michel Dänzer 62f6e55013 Minor followup fixes for the previous commit. 2007-12-06 10:19:22 +01:00
George Nassas 17afc800c9 Always call dlopen in DriverOpen.
This increases the reference count for the driver binary, preventing it from
getting unloaded prematurely in driDestroyDisplay. See
https://bugs.freedesktop.org/show_bug.cgi?id=13541 .
2007-12-06 10:11:05 +01:00
WuNian 16099c15f5 remove drawable from hash table when window is deleted (see bug 13091) 2007-11-27 18:22:42 -07:00
Michel Dänzer 42108629e8 libGL: Make sure a valid value is returned for GLX_BIND_TO_MIPMAP_TEXTURE_EXT.
If the server didn't send a value, assume it's not supported.

A more generic solution might be better for this kind of problem, but an
attempt for this failed (see https://bugs.freedesktop.org/show_bug.cgi?id=9264)
and this allows compiz to work with drivers that support
GL_EXT_framebuffer_object.
2007-11-25 14:20:36 +01:00
Roland Scheidegger 7b3ab451a8 recreate from changed gl_API.xml 2007-11-09 14:49:01 +01:00
Kristian Høgsberg 286ce27193 Fix compilation for !GLX_DIRECT_RENDERING. 2007-11-06 14:34:15 -05:00
Kristian Høgsberg 001de0ac4e Remove a couple of "deprecated" fields from __GLXcontextRec.
The __GLXcontextRec struct is internal to the libGL implementation.  No point
in "deprecating", just get rid of it.
2007-11-06 13:32:33 -05:00
Kristian Høgsberg 866d271aa8 Don't return 0 in a void function. 2007-11-06 13:32:33 -05:00
Kristian Høgsberg 559ae0ab1b Pass the visual id to XF86DRICreateContextWithConfig(), not fbconfig id. 2007-11-06 11:23:27 -05:00
Kristian Høgsberg 8e66c3d755 Lookup visual in visual list, not fbconfig list.
Also, handle visual not found error case by throwing X error.
2007-11-05 17:02:29 -05:00
Kristian Høgsberg e2c2df5c23 Filter both visuals and fbconfigs against driver supported configs. 2007-11-05 17:02:29 -05:00
Michel Dänzer d2f19a554a Fix some build warnings, mostly with XCB. 2007-10-30 17:58:50 +01:00
Jesse Barnes ad8ee7db3b Merge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesa 2007-10-29 12:06:36 -07:00
Jesse Barnes 38fdb47d26 Refactor and fix core vblank support
Consolidate support for synchronizing to and retrieving vblank counters.  Also
fix the core vblank code to return monotonic MSC counters, which are required
by some GLX extensions.  Adding support for multiple pipes to a low level
driver is fairly easy, the Intel 965 driver provides simple example code (see
intel_buffers.c:intelWindowMoved()).

The new code bumps the media stream counter extension version to 2 and adds a
new getDrawableMSC callback.  This callback takes a drawablePrivate pointer,
which is used to calculate the MSC value seen by clients based on the actual
vblank counter(s) returned from the kernel.  The new drawable private fields
are as follows:
  - vblSeq - used for tracking vblank counts for buffer swapping
  - vblFlags - flags (e.g. current pipe), updated by low level driver
  - msc_base - MSC counter from the last time the current pipe changed
  - vblank_base - kernel DRM vblank counter from the last time the pipe changed

Using the above variables, the core vblank code (in vblank.c) can calculate a
monotonic MSC value.  The low level DRI drivers are responsible for updating
the current pipe (by setting VBLANK_FLAG_SECONDARY for example in vblFlags)
along with msc_base and vblank_base whenever the pipe associated with a given
drawable changes (again, see intelWindowMoved for an example of this).

Drivers should fill in the GetDrawableMSC DriverAPIRec field to point to
driDrawableGetMSC32 and add code for pipe switching as outlined above to fully
support the new scheme.
2007-10-29 12:06:00 -07:00
Chris Rankin 1421bffb18 Remember to call XSync() before resetting X error handler. 2007-10-29 14:37:32 -04:00
Kristian Høgsberg 6c753ad51d Pull workaround for unset GLX_DRAWABLE_TYPE back in.
The old version just set GLX_DRAWABLE_TYPE to GLX_WINDOW_BIT for
configs received through glXGetVisualConfigs and to
GLX_WINDOW_BIT | GLX_PIXMAP_BIT for configs received as FBConfigs.
The X server needs to send this info, but keep the workaround for now.

Fixes #12835.
2007-10-17 15:06:11 -04:00
Kristian Høgsberg 6c533ea2d1 Handle fbconfigs and glx visuals separately.
The old implementation fetches fbconfigs or glx visuals once and assumes the list
describes both fbconfigs and glx visuals.  This patch splits it up and fetches
visuals and fbconfigs in two steps and keep the two lists separate.  A server
could have no glx visuals or no glx fbconfigs and the old code wouldn't know the
difference.
2007-10-16 16:07:52 -04:00
Kristian Høgsberg 7a88ecbd1a Roll back premature version bump. 2007-10-15 12:16:45 -04:00
Kristian Høgsberg a87e9a3479 Dont add fbconfigs to array that we didn't allocate for. 2007-10-15 10:59:06 -04:00
George Sapountzis d7c137b0df Drop include "dri_interface.h" from xf86dri.h
Thanks to dri2, xf86dri no longer uses __DRI types.
2007-10-14 20:08:31 +03:00
Kristian Høgsberg 8b20411915 Get the width and height from the attrib list in glXCreatePbuffer. 2007-10-13 18:44:52 -04:00
Kristian Høgsberg ecdb45cb29 Convert a left-over private void * to __DRIcontext *. 2007-10-11 11:27:51 -04:00
Kristian Høgsberg 3eaec7dc5d Move enabling of DRI extensions into glxextensions.c 2007-10-11 11:26:47 -04:00
Kristian Høgsberg 594006d8b2 Remove now unused getProcAddress from DRIinterfaceMethods. 2007-10-11 11:25:37 -04:00
Kristian Høgsberg f968f67e62 Add a DRI_ReadDrawable marker extension to signal read drawable capability. 2007-10-11 11:22:55 -04:00
Kristian Høgsberg 106a6f29bb Move media stream counter entry points to new extension. 2007-10-11 11:21:29 -04:00
Kristian Høgsberg a7a0a2beb5 Move GLX_MESA_swap_frame_usage DRI entry points to the new mechanism. 2007-10-11 11:11:12 -04:00
Kristian Høgsberg 78a6aa57a0 Move GLX_MESA_allocate_memory related functions to new extension mechanism. 2007-10-11 11:09:57 -04:00
Kristian Høgsberg efaf90b03e Move swap_interval to new extension mechanism. 2007-10-10 19:14:10 -04:00
Kristian Høgsberg ac3e838fa7 Move the copySubBuffer extension over to the new mechanism. 2007-10-10 18:57:57 -04:00
Kristian Høgsberg f616a263a2 Implement new screen extension API.
This new API lets the loader examine DRI level extensions provided by the
driver in a forward compatible manner.

Much of the churn in the DRI interface is adding support for new
extensions or removing old, unused extensions.  This new extension
mechanism lets the loader query the extensions provided by the driver
and implement the extensions it knows about.  Deprecating extensions
is done by not exporting that extension in the list, which doesn't
require keeping old function pointers around to preserve ABI.
2007-10-10 18:47:22 -04:00
Kristian Høgsberg 295dc2d225 Stop passing in unused fbconfigs to createNewScreen. 2007-10-10 18:46:51 -04:00
Kristian Høgsberg 5987a03f99 Convert all DRI entrypoints to take pointers to __DRI* types.
The entrypoints take a mix of __DRIscreen * and void * (screen private)
arguments (similarly for contexts and drawables).  This patch does away
with passing the private void pointer and always only passes the fully
typed __DRIscreen pointer and always as the first argument.

This makes the interface more consistent and increases type safety, and
catches a bug where we would pass a screen private to DRIdrawable::getSBC.
2007-10-10 18:00:18 -04:00
Kristian Høgsberg aac367f48a Remove screenConfigs from __DRIscreen.
The screenConfigs field of __DRIscreen points back to the containing
__GLXscreenConfigs struct.  This is a serious abstraction violation; it
assumes that the loader is libGL and that there *is* a __GLXscreenConfigs
type in the loader.

Using the containerOf macro, we can get from the __DRIscreen pointer to
the containing __GLXscreenConfigs struct, at a place in the stack
where the above is a valid assumption.  Besides, the __DRI* structs shouldn't
hold state other than the private pointer.
2007-10-10 18:00:13 -04:00
Kristian Høgsberg fa72013ada Drop mostly unused __DRIid typedef. 2007-10-10 17:09:48 -04:00
Kristian Høgsberg 9590ba97ad Avoid deadlock in GarbageCollectDRIDrawables.
__glXinitialize() can't be called with the GLX lock held.  Just
pass in the __GLXscreenConfigs pointer so we don't have to look it
up in __GLXdisplayPrivate.
2007-10-10 17:09:36 -04:00
Kristian Høgsberg 8ed5c7ca05 Drop createContext and destroyContext from DRIinterfaceMethods.
As for createDrawable and destroyDrawable, these functions immediately
upon entry to driCreateNewContext and immediately before exit from
driDestroyContext.  Instead of passing function pointers back and forth
just obtain the drm_context_t prior to calling DRIscreen::createNewContext
and pass it as a parameter.

This change also lets us keep the DRI context XID in the libGL loader only.
2007-10-10 17:09:16 -04:00
Kristian Høgsberg 4ff95e78e1 Drop createDrawable and destroyDrawable fron DRIinterfaceMethods.
All the DRI driver did was call the createDrawable callback immediately
upon entry to DRIscreen::createNewDrawable to get the drm_drawable_t.
We can just call that before calling into the DRI driver and pass the
returned drm_drawable_t as an argument to the DRI entry point.

Likewise for destroyDrawable.

Also, DRIdrawablePrivate::draw isn't used anywhere, and since the
driver no longer needs the XID of the drawable we can now drop that.
2007-10-10 17:07:26 -04:00
Kristian Høgsberg aceccda56b Drop __DRInativeDisplay and pass in __DRIscreen pointers instead.
Many DRI entry points took a __DRInativeDisplay pointer and a screen
index as arguments.  The only use for the native display pointer was to
pass it back to the loader when looking up the __DRIscreen for the given
screen index.

Instead, let's just pass in the __DRIscreen pointer directly, which
let's drop the __DRInativeDisplay type and the getScreen function.

The assumption is now that the loader will be able to retrieve context
from the __DRIscreen pointer when necessary.
2007-10-10 15:32:15 -04:00
Kristian Høgsberg b42152061c Add macros to generate CreateNewScreen entrypoint. 2007-10-05 00:12:30 -04:00
Kristian Høgsberg 4a22ae8d44 Remove XIDs from DRI interface (see #5714). 2007-10-05 00:09:32 -04:00
Kristian Høgsberg 4ceefccbfa Pull in the drm hash. 2007-10-05 00:09:23 -04:00
Dan Nicholson 2a3e33865d add support for LDFLAGS env var 2007-09-28 18:42:21 -06:00
Colin McDonald d62be3d4ca fixed problem with big glDrawArrays (see bug 12141) 2007-08-27 10:47:32 -06:00
Roland Scheidegger a6d4dddb38 suppress warning about ncon visuals (bug #6689) 2007-08-16 02:41:03 +02:00
Keith Whitwell 90ee7a4144 Gutsy oopses on touch of existing file. Workaround. 2007-08-07 10:18:30 +01:00
Brian 57ca033885 get rid of needless static function declarations at top of file 2007-05-17 15:28:42 -06:00
Brian 7fcf231c57 In DestroyPbuffer(), use GetReq() intead of GetReqExtra(). See bug 10983. 2007-05-17 15:28:42 -06:00
Bruce Merry 6efdf648f5 in __glXGetArrayType() return type, not enabled (bug 10938) 2007-05-14 09:38:23 -06:00
Brian 702c8f1e6c remove unneeded initialization code (see bug 10569) 2007-04-09 11:21:51 -06:00
Brian f9574c3f6b allocate __GLXdisplayPrivate w/ Xcalloc instead of Xmalloc (bug 10569) 2007-04-09 08:49:26 -06:00
Adam Jackson d8bfc42bb7 Make sure GLX entrypoints are marked PUBLIC.
Fedora bug #229808.
2007-04-08 14:40:03 -04:00
Wei Wang ca7885f733 fix bug 9823: GL_CLIENT_ATTRIB_STACK_DEPTH query fails for indirect rendering 2007-04-08 11:24:08 -06:00
Brian 4647f13c43 fix etags command to find headers 2007-04-07 19:36:58 -06:00
George Sapountzis aa1c79eaea glx: minor cosmetic in glcontextmodes.c
move memory macros to separate block and unwrap malloc/free for miniglx towards
cleaning Mesa core glitches in glx...
2007-04-05 19:00:47 +03:00
George Sapountzis 885111518e Move glcontextmodes.c to glx.
It is no longer linked with DRI drivers, libGL passes function pointers through
the DRI interface.
2007-04-05 18:59:42 +03:00
Bernardo Innocenti a835939222 always print error messages, unless LIBGL_DEBUG=quiet 2007-03-27 08:05:33 -06:00
Panagiotis Papadakos eab92fcdc2 fix mem leaks 2007-02-05 08:17:50 -07:00
Panagiotis Papadakos 3805ccf020 break if we removed driver from Drivers list in driDestroyDisplay
Else we read memory we just released, in for statement.
2007-02-05 10:35:52 +01:00
Brian af1d1e08e4 Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa 2007-02-01 07:22:50 -07:00
Brian 0930248bb1 fix mem leak in __glXReportDamage (Panagiotis Papadakos) 2007-02-01 07:22:25 -07:00
Michel Dänzer 8628b382e4 driDestroyDisplay: Fix comment, it is called now. 2007-02-01 10:45:51 +01:00
Michel Dänzer bed026e7dd driDestroyDisplay: Remove Drivers list entry when dlclosing its handle.
This fixes a regression from commit f81b1dbe374fe446f6ef676e70a72952ffb47d4e:
Since then, driDestroyDisplay gets called from __glXFreeDisplayPrivate. It
dlcloses the handles associated with the display but fails to remove their
references from the Drivers list, so subsequent calls to OpenDriver return a
stale handle and an invalid createNewScreenFunc pointer. The attempt to call
the latter results in a segfault when running amoeba, e.g.
2007-02-01 10:43:10 +01:00
Brian 876e372567 regenerated 2007-01-30 08:13:49 -07:00
Brian d2c62e6065 s/params/pointer/ for glGetVertexAttribPointer 2007-01-30 08:13:02 -07:00
Eric Anholt 3dd243c59e Track rename of DamagePost -> DamageAdd. 2007-01-09 16:39:10 -08:00
Eric Anholt c2b185cff8 Add reporting of damage by DRI drivers when the extension support is available.
With this, tools like ximagesrc in gstreamer correctly see updates from GL
rendering.  Support requires that the Xdamage library be current (but will be
disabled if not present) plus a new X Server with support for the new
XDamagePost request.  libGL now has a new interface version, and also links
against libXdamage and libXfixes to support it, but backwards compatibility
is retained.

Currently, all drivers report damage at SwapBuffers time through common code --
front buffer rendering doesn't result in damage being reported.  Also, the
damage is against the root window, as our drivers don't yet render to backing
store when they should (composited environments).
2007-01-05 18:23:57 -08:00
Brian 8d287d0f5e s/unsigned/size_t/ (Matthias Hopf) 2007-01-04 07:53:32 -07:00
Michel Dänzer 14f92636b0 Make git ignore files only generated at build time. 2006-12-06 14:17:56 +01:00
Alan Hourihane 33d2835182 Don't define as const's to avoid compiler optimization & warning. 2006-11-21 10:59:31 +00:00
Dave Airlie 4bb39f5899 remove drm stuff from libGL, this is now in libdrm 2.3.0 2006-11-08 22:25:52 +00:00
Brian Paul 83a5c2bf63 Update gl_API.xml with OpenGL 2.0 functions, regenerate derived files. 2006-11-02 23:58:27 +00:00
Brian Paul 26b5904d70 disable debug printf 2006-11-01 18:49:41 +00:00
Keith Whitwell 48e6fff3a9 merge the (rest of) texmem branch 2006-11-01 14:26:10 +00:00
Ian Romanick 6ae157f9e7 Fix bug #8563.
Fixes a GLX protocol problem when binding an indirect rendering context
after a direct rendering context.  In this case, the oldContetTag sent to
the server should be None, but the currectContextTag stored in the direct
rendering context (i.e., -1) was sent instead.
2006-10-16 17:50:19 +00:00
Ian Romanick 4616513577 Fix dumb build errors.
I always build with -DGLX_USE_TLS, so I never hit these paths.  glapi.h is
required in some places because _glapi_Dispatch is declared there, but
_glapi_tls_Dispatch is declared in glthread.h.
2006-10-13 17:34:01 +00:00
Brian Paul c28d0f779a include glapi.h to fix broken build 2006-10-13 13:28:48 +00:00
Ian Romanick f3f51bc844 Fix bug #4681.
glDeleteTextures and glDeleteTexturesEXT were erroneously listed as
aliases of each other.  For anything /except/ GLX protocol they are
aliases.  This set of changes allows functions that are functionally
identical but have different GLX protocol to be listed as aliases.

When building with GLX_INDIRECT_RENDERING set, different static
functions are used.  These functions determine whether the current
context is direct rendering or not.  If the context is direct
rendering, the aliased function (e.g., glDeleteTextures in the case of
glDeleteTexturesEXT) is called.  If the context is not direct
rendering, the correct GLX protocol is sent.

For a deeper explanation of what is changed, please see:
http://dri.freedesktop.org/wiki/PartiallyAliasedFunctions
2006-10-11 22:37:14 +00:00
Brian Paul d3b257374e added a SyncHandle() call, remove UnlockDisplay() call. (bug 8521) 2006-10-09 14:57:50 +00:00
Brian Paul 0a0cd3a8ae Updates for XCB. Bug 8560. 2006-10-09 14:55:46 +00:00
Ian Romanick dba173077e Major clean up of MakeContextCurrent
Rearrange most of the internals of MakeContextCurrent.	Put all of the code to
bind the new context up front.	If that is successful, unbind the old context.
This saves a lot of code and removes some locking crazyiness.

This patch has been tested for indirect rendering with glxinfo, glxgears,
manywin, and wincopy.
2006-10-07 02:52:18 +00:00
Ian Romanick 6921063520 Changes to generated code caused by the previous commits. 2006-10-04 22:33:54 +00:00
Brian Paul 25e441e8e9 in MakeContextCurrent() use old display pointer for __glXSetupForCommand(), bug 8443 2006-10-04 16:22:24 +00:00
Jeremy Kolb 07bacc2263 Update to use the new XCB naming convention. 2006-09-26 23:56:20 +00:00
Ian Romanick d6c675f497 Fix problems with vertex program protocol
There were two sets of bugs in the vertex program (ARB and NV)
protocol.  First, several of the ARB functions were missing the
'doubles_in_order="true"' annotation.  Second, after the ARB decided
that glVertexAttrib*ARB functions must not alias fixed-function state
for GLSL, Nvidia re-assigned GLX protocol opcodes for
glVertexAttrib*NV (circa Septeber 2004).  For some reason gl_API.xml
was never updated to reflect this, and the updated version of the
GL_NV_vertex_program spec never made into the registry.
2006-08-31 20:41:16 +00:00
Ian Romanick a70d56485a Add missing parenthesis so that glXSwapIntervalSGI protocol is
correctly generated.
2006-08-30 23:15:02 +00:00
Ian Romanick 8d675aa637 Deprecate GL_EXT_vertex_weighting.
Nvidia no longer supports this extension, and they no longer export its
entry points from their libGL.  There's no reason for us to keep dragging it
around either.
2006-08-29 17:44:45 +00:00
Ian Romanick fc5b57b713 Clean up GLX function exports.
Make functions for the following extensions only accessable via
glXGetProcAddress:

    - GLX_EXT_texture_from_pixmap
    - GLX_MESA_copy_sub_buffer
    - GLX_MESA_release_buffers
    - GLX_MESA_swap_control
    - GLX_MESA_swap_frame_usage
    - GLX_OML_sync_control
    - GLX_SGI_make_current_read
    - GLX_SGI_swap_control
    - GLX_SGI_video_sync
    - GLX_SGIX_swap_barrier
    - GLX_SGIX_swap_group

Removed all remnants of the following extensions:

    - GLX_MESA_set_3dfx_mode
    - GLX_SGI_cushion
    - GLX_SGIX_dmbuffer
    - GLX_SGIX_video_resize
    - GLX_SGIX_video_source
    - GLX_SUN_get_transparent_index
    -
2006-08-29 15:38:19 +00:00
Ian Romanick 3fea5910b9 Add a couple of the missing GL 2.0 functions. Enable GLX protocol for
glBlendEquationSeparateEXT.  Add missing enum "get" information for
GL_EXT_texture_filter_anisotropic.
2006-08-25 19:57:37 +00:00
Ian Romanick a5f2206077 GL_EXT_paletted_texture functions should alias GL_SGI_color_table functions.
The functions for GL_EXT_paletted_texture that do not share GLX
protocol with GL_ARB_imaging are supposed to alias the similar
functions from GL_SGI_color_table.  They didn't.  This patch corrects
this problem and enables GLX protocol for both extensions.

Since this removes 3 entries from the dispatch table, this change
creates a lot of changes in the generated files.
2006-08-24 21:42:38 +00:00
Ian Romanick bf83e652f6 Add a new offset mode to the GL API XML. This mode, called "assign,"
tells the scripts to assign an available offset to the function.  The
important changes are in src/mesa/glapi/gl_XML.py and
src/mesa/glapi/*.xml.

Since the DRI drivers only depend on functions required by the ABI
(e.g., GL 1.2 + ARB_multitexture) having fixed offsets, all functions
not in the ABI use "assign" mode.  This has caused the offset of
basically every function outside the ABI to change.  I have verified
that a libGL with this patch works with a DRI driver without the patch.

Futher, several function were removed from the dispatch tables
altogether.  These are the functions for the following extensions:

	GL_SGIS_texture_filter4
	GL_SGIS_texture4D
	GL_SGIS_detail_texture
	GL_SGIS_sharpen_texture
	GL_SGIX_sprite
	GL_SGIX_instruments
	GL_SGIX_framezoom
	GL_SGIX_tag_sample_buffer
	GL_SGIX_reference_plane
	GL_SGIX_flush_raster
	GL_SGIX_list_priority
	GL_SGIX_fragment_lighting
	GL_PGI_misc_hints
	GL_EXT_index_material
	GL_EXT_index_func
	GL_3DFX_tbuffer

This removes 50 functions from the dispatch table.
2006-08-24 20:14:45 +00:00
Michel Dänzer 061a3fe340 Bug #7169: Attempt to make libGL symbols visible to drivers.
Some applications end up dlopening libGL without RTLD_GLOBAL, so the libGL
symbols referenced by the driver can't be unresolved when libGL dlopens it.
This attempts to make the libGL symbols visible to the driver by dlopening
libGL (again) with RTLD_GLOBAL before dlopening the driver and dlclosing
the obtained handle afterwards.
2006-08-14 15:53:37 +00:00
Adam Jackson be85fde82b linux-indirect target fixes. 2006-08-10 20:19:57 +00:00
Tilman Sauerbeck f81b1dbe37 fix a memleak (that code block has been commented out for years for unknown reasons) 2006-07-15 12:09:27 +00:00
Ian Romanick 7ef4a07165 Move initialization of server_support from __glXProcessServerString to
__glXCalcualteUsableExtensions.  By having both callers of
__glXProcessServerString initialize the bit-fields passed in, we guarantee
that the correct amount of data is initialized:

This fixes bugzilla #7353.
2006-07-13 15:27:37 +00:00
Brian Paul 883f9891cb LIB_DIR is now just 'lib' or 'lib64'
Replaced $(LIB_DIR) with $(TOP)/$(LIB_DIR), use LIB_DIR in install targets.
Patch by Hanno Böck.
2006-07-13 02:50:27 +00:00
Brian Paul b8528ea55e New config var DRI_DRIVER_SEARCH_DIR to specify where libGL should search
(at runtime) for the DRI drivers.
See bug 2372.
2006-07-12 19:40:59 +00:00
Tilman Sauerbeck e77875dcbe fix a memleak 2006-07-12 16:49:07 +00:00
Brian Paul 0e794a1bc6 New 'install' targets in makefile. See bug 2372. 2006-06-22 22:50:48 +00:00
Kristian Høgsberg c25eb99f95 Fix all instances of calling __glXSetupForCommand before GetReqExtra. 2006-06-13 01:41:18 +00:00
Brian Paul d2fb24a671 make do_vertex_attrib_enable() static 2006-06-12 19:59:34 +00:00
Brian Paul f2ce358331 include glxclient.h to silence missing prototypes warning 2006-06-12 19:56:57 +00:00
Brian Paul 88cf5aa783 In __glXPushArrayState() we weren't pushing the index field.
But later, in __glXPopArrayState(), we were using that field to set
the active_texture_unit.  The value was garbage and could lead to
things blowing up.
See bug 6863.
2006-05-11 16:27:39 +00:00
Brian Paul 791e7b385a When error-checking 'unit' against num_texture_units, need to use >=, not >.
See bug 6863.
2006-05-09 14:36:58 +00:00
Adam Jackson 0157624557 Update function signatures for EXT_tfp entrypoints. 2006-05-01 22:25:18 +00:00
David Reveman ba23f699f0 FBConfig support for EXT_tfp 2006-04-11 12:21:48 +00:00
David Reveman c6f8ae1085 Add attrib_list to glXBindTexImageEXT 2006-04-11 12:12:13 +00:00
David Reveman 342d1de38c Fix CreateDrawable 2006-04-11 12:07:41 +00:00
Adam Jackson d25ad506f2 Coverity #943: Avoid a NULL chase. 2006-04-07 00:05:50 +00:00
Adam Jackson 5ab5517ba8 Coverity #468: Fill in the rest of the error_list to match the error codes
defined in glxproto.h.  Avoids reading semi-random memory (and probably
crashing) when calling __glXErrorString().
2006-04-03 00:00:53 +00:00
Brian Paul f2ad1b60c0 Dave Reveman's patch for GLX_MESA_copy_sub_buffer support 2006-03-31 15:48:04 +00:00
Brian Paul 2a0d441ebb Set always_array=true for glGenProgramsNV (Dave Reveman) 2006-03-14 15:41:53 +00:00
Brian Paul 841a823d6d s/GLint/int/, to fit GLX conventions 2006-03-09 16:25:46 +00:00
Brian Paul 0d57301ba2 Instead of adding extra flags to DEFINES with +=, define EXTRA_DEFINES instead.
This eliminates a bunch of duplication in the compilation commmands.
2006-03-09 16:24:46 +00:00
Brian Paul 1aad408b5a EXT_framebuffer_object (Dave Reveman) 2006-02-24 15:36:24 +00:00
Brian Paul d5aca8bf0c remove stray 'foo' line 2006-02-15 04:10:55 +00:00
Brian Paul 0c1438d331 replace size_t * w/ unsigned int * (Jurg Billeter) 2006-02-14 15:04:45 +00:00
Brian Paul 42725d6f54 David Reveman's GLX_EXT_texture_from_pixmap extension patch 2006-02-07 00:39:56 +00:00
Brian Paul 1b3128cc9a Test sizeof(drm_handle_t) instead of LONG64 when returning handles 2005-12-02 18:17:11 +00:00
Ian Romanick 5910dfacf1 This is a major re-work of the __indirect_glInterleavedArrays routine. The
big, ugly, error prone switch-statement is replaced with a compact table.
I also added numerous comments, including a comment explaining how the
format parameter is validated.

Explicitly pass GL_FLOAT as the type in the cases where that is the only
possible value (e.g., everywhere except the call to glColorPointer).

Validate that stride is >= 0.

Tested with all modes (including the two error modes) of
progs/tests/interleave.c.

Bug: #5001, #5058
Reviewed by: Brian Paul
2005-11-30 00:06:48 +00:00
Brian Paul f468dfde17 restore FASTCALL stuff 2005-10-20 22:51:50 +00:00
Brian Paul adfd5510c0 fix bad loops in TransposeMatrix[fd]() 2005-10-20 22:04:01 +00:00
Brian Paul c8f86105d0 Disable the FASTCALL optimization because it still breaks server-side GLX. 2005-10-20 21:12:35 +00:00
Brian Paul 28569c25f6 use ASM_API variable, bug 4415 2005-09-12 15:19:19 +00:00
Adam Jackson ca1ac986a1 /dri/msg 2005-08-26 17:50:39 +00:00
Alan Hourihane f4166a1fd7 Fix the scripts for the cygwin & mingw changes 2005-08-26 09:37:41 +00:00
Alan Hourihane 8de9d92acf update for mingw 2005-08-25 18:08:16 +00:00
Alan Hourihane c58cea0085 Fix Windows build problems.
GCC's visibility attribute is for ELF systems, so undef INTERNAL
GCC's fastcall attribute interferes with __stdcall so undef FASTCALL
2005-08-24 09:08:06 +00:00
Adam Jackson 8fcd1e0287 Convert libGL and DRI drivers to require libdrm.
libdrm can be had from:

http://people.freedesktop.org/~ajax/libdrm/
2005-08-19 20:20:03 +00:00
Ian Romanick 2ae5645115 Fix a realloc problem with indirect vertex arrays. The actual head pointer
wasn't tracked and used for the realloc, so it tended to explode.
2005-08-19 18:53:26 +00:00
Ian Romanick f2876d1ee3 Remove the logic that determines at compile time whether or not HAVE_ALIAS
should be defined.  It was flawed on some platforms (e.g., Darwin & mingw).
Instead, rely on the build system to define it on the compiler command line.

This also reverts ajax's hand-edit to indirect_size.c.  I'll fix that on the
X.org side of things later today.
2005-08-11 20:29:45 +00:00
Ian Romanick 4c4e4bfa4e Makefile cleanups suggested by George Fufutos (bugzilla #3899). 2005-08-11 19:37:55 +00:00
Brian Paul 82dfd4b71f fix X #includes so they're relative to X11/ directory (bug 4047) 2005-08-11 14:18:53 +00:00
Ian Romanick 967b006f51 Remove _glapi_check_multithread from the interface exported by the loader to
the driver.  The loader now takes care of this for the driver.

Remove _glapi_DispatchTSD and give _glapi_Dispatch its semantic (i.e.,
having a NULL value means that the application is multithreaded and
_glapi_get_dispatch must be called).

Gut all of the dispatch override code.  This removes _glapi_RealDispatch,
_glapi_tls_RealDispatch, _glapi_begin_dispatch_override,
_glapi_end_dispatch_override, and _glapi_get_override_dispatch.

Remove _glapi_get_proc_address, _glapi_get_proc_name, _glapi_get_version,
and _glapi_check_table from the loader / driver interface.

Reviewed by: Brian Paul
2005-08-10 23:54:15 +00:00
Ian Romanick 23a4f50c5b Fixes bugzilla #1730.
Make sure that all the values used in the clean-up code are initialized at
some point.  It is still unclear to me as to why GCC does not complain.  I
suspect the problem may be due to the depth of if-statement nesting.
2005-08-05 23:13:13 +00:00
Ian Romanick 6bc24c5c05 In order to create the set of available extensions, we have to know if
direct-rendering is possible on a given screen.  It is not possible to
determine this by just looking at driDisplay.private in the display
structure.  However, it is possible to determine this by looking at
driScreen.private in the screen structure.  This field is only non-NULL if a
DRI driver has been successfully loaded and bootstrapped.  Once we get to
that point, we know that direct-rendering is at least theoretically
possible.

This fixes bugzilla #2875.
2005-08-05 19:13:51 +00:00
Ian Romanick 711555d1e3 Convert all instances of XTHREADS to USE_XTHREADS. This fixes one of
serveral things that are broken when building on a system with X.org 7.0rc0
installed.
2005-08-03 23:05:25 +00:00
Ian Romanick 7adcedcd54 Fix build problems related to finding Xthreads.h. 2005-08-01 16:30:24 +00:00
Ian Romanick 29206ae569 Remove unused structures and data fields. These had been left in because
DRI drivers using the "old" interface relied on certain fields being at
certain offsets.  Removing the structures would break that.  Now that the
old interface is no longer supported, the dead data can finally die.
2005-07-29 17:30:18 +00:00
Ian Romanick dc6e2c778a Add a new config called linux-indirect. This build the GLX libGL just like
linux-dri, but it disables support for direct-rendering in it.  This config
mainly exists so that I can verify that changes to libGL haven't broken
builds on non-DRI platforms.
2005-07-29 17:25:50 +00:00
Ian Romanick 1585c234e0 Major rip-up of internal function insertion interface. The old
_glapi_add_entrypoint has been replaced by a new routine called
_glapi_add_dispatch.  This new routine dynamically assignes dispatch offsets
to functions added.  This allows IHVs to add support for extension functions
that do not have assigned dispatch offsets.

It also means that a driver has no idea what offset will be assigned to a
function.  The vast majority of the changes in this commit account for that.
An additional table, driDispatchRemapTable, is added.  Functions not in the
Linux OpenGL ABI (i.e., anything not in GL 1.2 + ARB_multitexture) has a
fixed offset in this new table.  The entry in this table specifies the
offset in of the function in the real dispatch table.

The internal interface was also bumped from version 20050725 to 20050727.

This has been tested with various programs in progs/demos on:

radeon (Radeon Mobility M6)
r128 (Rage 128 Pro)
mga (G400)
2005-07-28 00:29:51 +00:00
Ian Romanick ab7c6ffadc Remove the last remnants of GLX_BUILT_IN_XMESA. This allows the removal of
the evil, ugly GLX_PREFIX macro as well.
2005-07-26 22:53:38 +00:00
Ian Romanick 5c6fd3dd4c No, really, get rid of all the remaining references to DRI_USE_NEW_INTERFACE.
A couple other remnants of the old interfaces hit the dust too.  Thanks
Jon. :)
2005-07-26 05:57:24 +00:00
Ian Romanick a08d8a095c Quote $(CC) and $(CXX) so that 'CC=ccache gcc' and 'CXX=ccache g++' will
work again.
2005-07-26 05:55:56 +00:00
Ian Romanick 5f1ba3e21b Fixes the glXGetProcAddress portion of the interface. Most of the functions
that are currently obtained via glXGetProcAddress and all of the XF86DRI
functions are replaced with a funciton table.  This table will be passed to
__driCreateNewScreen.

One of the functions in the table is getProcAddress.  This allows some
loaders to expose functionality not in all loaders.  This will be immediatly
used for glxEnableExtension (formerly known to drivers as
__glXScrEnableExtension).  libGL (and in the future libglx) expose this
function so that drivers can enable GLX extensions.  libEGL should exposed
eglEnableExtension to enable EGL extensions.  The same function cannot be
used for both because the extensions have different names and (possibly)
different semantics.  Drivers can optionally use one, both, or neither.

The key parts are in the __DRIinterfaceMethodsRec structure in
dri_interface.h.  A pointer to one of these structures is passed into
__driCreateNewScreen.  Because of this, the version of the API is bumped to
20050725.  Since the previous version(s) were never in a release, their
existance is erased.

I was actually a little surprised by how much code this cuts from the
drivers.  A lot of glXGetProcAddress calls disappear, and a lot of
version checks go with them.  Nice.

The one thing I'm not sure of is removing __glXInitialize.  For some
reason that function was in the glXGetProcAddress table, but *nothing*
in the Mesa tree used it.  Did something with DRI conf. use this
function?  It seems odd...
2005-07-26 02:44:01 +00:00
Brian Paul 8dcc6736ab Added -linker option to mklib, used to specify a particular program for
linking, if relevant.
Updated Makefiles to use -linker option instead of setting CC, CXX env vars.
2005-07-25 22:59:58 +00:00
Ian Romanick e9dbe58b8b Gut a few more dead bits. Replace uses of the CreateNewScreenFunc typedef
(from glxclient.h) with PFNCREATENEWSCREEN (from dri_interface.h).

Remove the prototype for __driCreateScreen and fix the prototype for
__driCreateNewScreen (append the API version) in dri_interface.h.
2005-07-24 07:38:23 +00:00
Ian Romanick c39bf5e273 All elements of pre-DRI_NEW_INTERFACE_ONLY are removed. This allows
1,402 lines of code to be removed from Mesa (drivers and libGL).  The
big winner is dri_util.c.

Primary changes are:

1. Remove all "deprecated" entry-points from the various structures in
dri_interface.h.

2. Rename the remaining fields to removed "version numbers."  So,
bindContext3 becomes bindContext.  Functions with "New" in the name
(e.g., CreateNewContext) were *not* changed, but that is an option.
Having "New" in the name is less annoying to me than having "3" in the name.

3. Remove all compatibility code that handles cases where the driver or
the loader is too old to support the latest interfaces.

4. Append the API version to the __driCreateNewScreen function name.
This is currently done by hand.  In the future (i.e., the next time we
make an incompatible change to the interface) we'll want to come up with
a better way to do this.  This prevents old loaders from being able to load
new (incompatible) drivers.

5. Bump the API version to 20050722.  All drivers (by way of dri_util.c)
require this version.

6. All drivers are *required* to expose GLX_SGIX_fbconfig and
GLX_OML_swap_method (or the moral equivalents).  Support for these
functions in implicit in the use of the "new" interface.

7. Some cases still exist that need to be compiled differently in a loader
or core Mesa versus in a driver.  These are identified by the define
IN_DRI_DRIVER.
2005-07-24 06:29:14 +00:00
Adam Jackson 7d40d230fa Add two aliases for some PointParameters entrypoints for libglx compatibility.
Doing this here rather than on the GLX side since the X monolith hasn't had
Mesa 6.3 imported yet.

idr, I know this is touching a generated file, but I haven't figured out what
needs changing in the generator scripts to make this change happen.  If you
could add that I'd appreciate it.
2005-07-23 02:09:58 +00:00
Ian Romanick f0ff50d4ed Add support for assembly (static) dispatch functions on x86-64. This
is basically patch #2939 from X.org bugzilla #3379.  This does *not*
fix the bug as it does not dynamically generate stubs at run-time.  It
just gets things one step closer.
2005-07-02 08:29:57 +00:00
Ian Romanick 5aafea03af Fix non-x86 specific builds. The changes from glTexImage3DEXT to
glTexImage3D that caused me so many problems during the re-development
of the API scripts reared its ugly head again.  This has been fixed by
tracking the parameter string for each entry-point individually.

This has the annoying side-effect that the names of the parameters in
all aliases of a function must be the same or gl_apitemp.py will
generate bad code. :(  The changes in
src/mesa/glapi/{gl_API.xml,glapitable.h} and src/glx/x11/* are caused
by fixing the parameter names in various function aliases that didn't
match.

Reported by: Eric Anholt, Jacob Jansen
2005-06-24 18:35:31 +00:00
Jeremy Kolb 3fb86eefe8 Fixed the XCB implementation when always_array is true, thanks to Ian Romanick for pointing it out. Please review. 2005-06-24 02:28:02 +00:00
Ian Romanick 2636e853f6 Mark GenQueriesARB at 'always_array="true"'. This eliminates the need
to special-case the handling of that function in glX_proto_send.py.
2005-06-22 17:11:20 +00:00
Jeremy Kolb 814e5360b0 Fixed a bug where GenQueriesARB was generating the wrong code for XCB and wouldn't compile. Not sure how that slipped through before but it should work now. 2005-06-22 02:36:23 +00:00
Ian Romanick 66a5548fbb Mammoth update to the Python code generator scripts that live in
src/mesa/glapi.  Basically, the scripts that did simple things (like
gl_offsets.py) were simple, and the scripts that did more complicated things
(like glX_proto_send.py) were getting progressively more and more out of
control.  So, I re-write the foundation classes on which everything is based.

One problem with the existing code is that the division between the GL API
database representation and the way the output code is generated was either
blury or nonexistant.  The new code somewhat follows the
Model-View-Controller pattern, minus the Controller.  There is a distinct
set of classes that model the API data, and there is a distinct set of
classes that generate code from that data.

One big change is in the class that represents GL functions (was glFunction,
is now gl_function).  There used to be an instance of this calls for each
function and for each alias to that function.  For example, there was an
instance for PointParameterivSGIS, PointParameterivEXT, PointParameterivARB,
and PointParameteriv.  In the new code, there is one instance.  Each
instance has a list of entrypoint names for the function. In the next
revision, this will allow a couple useful things.  The script will be able
to verify that the parameters, return type, and GLX protocol for a function
and all it's aliases match.

It will also allow aliases to be represented in the XML more compactly.
Instead of repeating all the information, an alias can be listed as:

     <function name="PointParameterivARB" alias="PointParameterivEXT"/>

Because the data representation was changed, the order that the alias
functions are processed by the scripts also changed.  This accounts for at
least 2,700 of the ~3,600 lines of diffs in the generated code.

Most of the remaining ~900 lines of diffs are the result of bugs *fixed* by
the new scripts.  The old scripts also generated code with some bugs in it.
These bugs were discovered while the new code was being written.

These changes were discussed on the mesa3d-dev mailing list back at the end
of May:

http://marc.theaimsgroup.com/?t=111714569000004&r=1&w=2

Xorg bug: 3197, 3208
2005-06-21 23:42:43 +00:00
Jeremy Kolb a6a3e01b09 ran "make" after update to glX_proto_send.py. 2005-06-20 03:18:16 +00:00
Dave Airlie 22b0a42465 use shared-core 2005-05-28 10:55:23 +00:00
Ian Romanick 249db89b00 Make a couple minor corrections to gl_API.xml. Fixes the name of an
extension that was missing the GL_ part and uses the core GL type names for
vertex buffer object functions instead of the ARB names.

Also commits the resulting changes to the generated code.  Some how, the
#if sequence disappeared in the 1.52 version of glapi_x86.S.
2005-05-26 16:24:35 +00:00
Ian Romanick f387c83ec1 Commit the changes propagated from Jeremy Kolb's changes to the Python
scripts in src/mesa/glapi.
2005-05-25 03:30:06 +00:00
Brian Paul 2eb147e7f5 Patches for XCB (Jeremy Kolb) 2005-05-07 17:14:50 +00:00
Ian Romanick 02986cb2cc Add support for pthreads and TLS to libGL for __glXLock / __glXUnlock and
for tracking the current GLX context.

This fixes bug #3024.
2005-04-18 16:59:53 +00:00
Ian Romanick 2e823f29e4 Send GL_PACK_INVERT_MESA state to the server. This fixes bug #2538. 2005-04-18 16:40:36 +00:00
Ian Romanick f434e07a6a Add missing includes of indirect.h. 2005-04-14 20:35:33 +00:00
Ian Romanick 25fe93f0a1 Add TLS support to libGL and, by virtue of using glthread.h and GL_CALL, all
DRI drivers.  A TLS enabled libGL can load a TLS or a non-TLS DRI driver,
but a TLS DRI driver requires a TLS enabled libGL.

This fixes bug #1822.
2005-04-13 20:59:15 +00:00
Ian Romanick a657c1aee8 Use the same dispatch.c source file for "normal" Mesa builds and DRI
libGL builds.
2005-04-07 23:58:51 +00:00
Ian Romanick c51ed8c236 Follow the GLX_SGIX_fbconfig spec and return the complete list of
available fbconfigs if attrList is NULL.  This fixes bug #2917.
2005-04-07 00:05:55 +00:00
Ian Romanick 979f35fb78 Minor vertex array support tweaks. These are in preparation for the
(eventual) addition of support for ARB_vertex_buffer_object.  Elminitate the
need for array_state_vector::large_header.  Make some very minor tweaks to
the handling of the indices pointer in emit_DrawElements_old.
2005-03-17 20:36:20 +00:00
Ian Romanick b81efaaa1a Minor vertex array support tweaks. Most of these are in preparation for the
(eventual) addition of support for ARB_vertex_buffer_object.

Move all the private vertex array data structures out of
indirect_vertex_array.c and into indirect_va_private.h.

Rename array_state_vector::enabled_array_count to
array_state_vector::enabled_client_array_count.

Make sure that both the GL extension string and the server GL version are
available when __glXInitVertexState is called.

Make sure that array_state::normalized is set correctly in the array's
gl*Pointer function.
2005-03-17 20:13:09 +00:00
Ian Romanick 3f35fbbf66 Fix the handling of zero-sized output parameters (i.e., those with type
'GLvoid *').  This fixes the GLX protocol for glGetProgramStringARB.  This
fixes bugzilla #2747.

Remove the 'ignore="true"' from glVertexAttrib4bvARB.  This fixes bugzilla
#2746.
2005-03-17 01:48:11 +00:00
Ian Romanick 9eae0b9f19 Hard-code the client-side maximum GL version. It turns out that there are
some flaws in the calculation code when the highest version listed in
known_gl_extensions is supported.  This code would also have some problems
with some of the new features (that don't have an associated extension) on
GL 2.0.
2005-03-17 01:36:24 +00:00
Ian Romanick 91c219d906 Add support for ARB_draw_buffers and ARB_occlusion_query. The GLX protocol
for these extensions (as well as ARB_vertex_program and ARB_matrix_palette)
was just approved by the ARB on 8-Mar-2005.  Now the only extension missing
for 1.5 support is ARB_vertex_buffer_object.

The opcodes for ARB_matrix_palette were also added to gl_API.xml.  Since
this extension isn't supported by Mesa, no code is generated for it.  Some
tabs were also converted to spaces in the comment for
GetCompressedTexImageARB.
2005-03-11 20:55:03 +00:00
Ian Romanick 0bd5373d94 Actually *use* the count_scale value associated with a parameter. 2005-03-06 08:55:39 +00:00
Ian Romanick b47731f24d Import fixes from X.org tree (Søren Sandmann <sandmann@redhat.com>). 2005-03-04 17:53:24 +00:00
Ian Romanick fdb5a87f91 Fix some errors in the parameter descriptions in serveral vertex / fragment
program related functions.
2005-03-03 21:22:46 +00:00
Ian Romanick 03dc437363 Clean-up some warnings caused by the addition of vertex / fragment program
protocol support (reported by Adam Jackson).  Added code to validate the
'type' parameter to the draw element functions.
2005-02-28 19:37:10 +00:00
Ian Romanick 4e262cfb07 Accidentally committed wrong version with the previous commit set. 2005-02-25 23:02:33 +00:00
Ian Romanick 40af76bbaa Add GLX protocol support for ARB_fragement_program,
ARB_fragment_program_shadow, ARB_vertex_program, NV_fragment_program,
NV_fragment_program_option, NV_fragment_program2, NV_vertex_program,
NV_vertex_program1_1, NV_vertex_program2, NV_vertex_program2_option,
NV_vertex_program3, and ATI_text_fragment_shader.
2005-02-25 22:46:30 +00:00
Ian Romanick 1fd3bbc42e Convert the static functions read_pixel_reply, read_reply,
setup_single_request, and setup_vendor_request to the global functions
__glXReadPixelReply, __glXReadReply, __glXSetupSingleRequest, and
__glXSetupVendorRequest.  This will make it easier to add handcoded Single /
VendorPrivate / VendorPrivteWithReply functions.
2005-02-25 01:48:25 +00:00
Ian Romanick 365a0a7c15 Missed the commit of glxext.c yesterday.
Fixed a flow control problem in glGet*v that could result in the display
not being unlocked.  This also resulted in refactoring a lot more code
out of the glGet*v routines into get_array_data, which was renamed to
get_client_data.
2005-02-23 20:06:52 +00:00
Ian Romanick 6614766f3e Corrected the value for X_GLrop_SecondaryColor3svEXT. 2005-02-23 00:47:11 +00:00
Ian Romanick 57b5e8538e Missed the Makefile with the previous commit. 2005-02-23 00:24:18 +00:00
Ian Romanick fdb07636f2 Added __glExtensionBiIsEnabled and __GLXcontext::gl_extension_bits. This
enables libGL to query which extension are exported to applications.

Refactored array-query functionality (from glGet*v) in src/glx/x11/single2.c.

Massive re-write of indirect vertex array support.  The most noticable
effect is that glDrawElements now generates DrawArrays protocol.  The
side-effects (and the main reasons for the re-work) are that it is much
easier to add support for new arrays (e.g., GL_VERTEX_ATTRIB_ARRAY,
GL_WEIGHT_ARRAY_ARB, etc.) and it is much easier to add support for the new
DrawArrays protocol (required to support ARB_vertex_buffer_object).

These changes were primarilly tested with progs/demos/isosurf.
2005-02-22 22:36:31 +00:00
Ian Romanick d863424032 Generate GLX protocol for pixel single commands. 2005-02-09 03:11:23 +00:00
Ian Romanick a02b83115a Fix some mixed spaces / tabs issues in generated code. Commit generated
files that have been trivially changed by other recent commits.
2005-02-05 00:59:57 +00:00
Ian Romanick 0a755ade51 Enable client-side GLX support for texture compression extensions. 2005-02-04 19:29:30 +00:00
Ian Romanick 94a20cbadf Added a bunch of extensions that were previously supported but weren't
in the gl_API.xml database.  Add "official" support for SGI_color_matrix
and SGI_texture_color_table.  These were previously supported only by
way of ARB_imaging.
2005-02-03 00:38:40 +00:00
Ian Romanick 16c3c74018 Refactor the code to emit multiple-inclusion protection to
FilterGLAPISpecBase.  Since the size_h mode of glX_proto_size.py will be
used to generate multiple header files, add an option to specify the define
that is used for multiple-inclusion protection.

The changes to the header files in this commit are just a side-effect of the
changes to the Python scripts.
2005-01-28 19:00:54 +00:00
Ian Romanick 20b8d9c1b9 Fix some get / set errors with COLOR_TABLE_*. SCALE and BIAS can be
parameters to GetColorTableParameter[if]v.  FORMAT, WIDTH, and the SIZE
enums cannot be parameters to ColorTableParameter[if]v.
2005-01-28 17:58:58 +00:00
Ian Romanick 6398a97aff Mark a couple more function parameters as counters. 2005-01-27 19:50:59 +00:00
Ian Romanick 82e22f50f1 Add numerous 'get'-type functions to most of the enums supported by the
server-side GLX implementation.

Correct the protocol for EXT_convolution.  Several functions were
incorrectly listed as 'sop' that should have been 'vendorpriv'.

Remove TexParameter[if]v from the list of functions associated with
TEXTURE_RESIDENT.  The state associated with this enum is read-only.

Sort the enums by value for each particular size.  This ensures that the
signature is the same no matter what the ordering is of the enums in the XML
file.  The side effect is that there are some extra changes in
indirect_size.c.
2005-01-27 19:39:16 +00:00
Adam Jackson 999534216d HAVE_ALIAS was never defined anywhere, add some logic to turn it on
automagically.
2005-01-23 03:54:38 +00:00
Keith Whitwell 520e56f232 Depend tweaks 2005-01-19 11:10:27 +00:00
Ian Romanick 591b72b6a9 Added a couple missing proxy types. 2005-01-11 23:50:01 +00:00
Ian Romanick d24e49f301 Put quotes around the CC and CXX variables passed to mklib. This make
them work with multi-work compiler names (e.g., "ccache gcc").
2005-01-11 22:43:45 +00:00
Adam Jackson 1074eae704 Enable libGL to be built with DRI_NEW_INTERFACE_ONLY (but don't do it yet). 2005-01-08 03:54:38 +00:00
Ian Romanick 70d2f152f8 Refactor the code that converts a transpose-matrix enum to a
regular-matrix enum.
2005-01-07 02:53:04 +00:00
Ian Romanick 5f1f229f8d Pixel oriented render functions are now generated by the
glX_proto_send.py script.  This eliminates ~600 lines of non-generated
code.  With proper compiler optimization settings, it also decreases the
size of libGL.so by about 3KB.
2005-01-07 02:39:09 +00:00
Ian Romanick 3385d7cec3 The generic_*_byte functions did not rount the command size to a
multiple of 4 correctly in some cases.
2005-01-07 02:29:42 +00:00
Ian Romanick 3276c192b7 The opcode and command length fields of RenderLarge commands were
mistakenly emitted in the wrong order.
2005-01-03 21:03:03 +00:00
Ian Romanick 83fcf49647 Fixed two problems with the handling of GLX protocol replies. The logic
for determining when extra data needed to be read after a reply (to ensure
4-byte alignment) and the logic to determine whether or not to read reply
data after the SingleReply packet were both slightly wrong.
2004-12-27 08:29:54 +00:00
Ian Romanick 990dec7ea0 Used GCC's __builtin_expect when available. Change the way code is
generated for commands that can use RenderLarge packets.  Tweak the code for
__glXFlushRenderBuffer slightly.
2004-12-21 23:06:02 +00:00
Ian Romanick 0d84c68313 Use GLX protocol code generated by glX_proto_send.py. 2004-12-20 04:53:00 +00:00
Adam Jackson 4890f2605e Mark the XF86DRI client-side extension API as PUBLIC. 2004-12-15 23:07:55 +00:00
Adam Jackson 489ccef398 Fix up glx/x11 to work when built with -fvisibility=hidden. 2004-12-15 17:18:06 +00:00
Keith Whitwell fc23672327 Improve the behaviour of the build system wrt depend files.
- Remove the -Y option for makedepend, so that the standard
	  directories are searched
	- No longer pipe the multiple errors that the -Y option caused
	  into /dev/null -- we want to know about these failures.
	- Fix up a few other misc makedepend failures.
2004-12-08 15:16:36 +00:00
Ian Romanick 00d153eb72 Corrected a problem with the sizes of the MAP[12]_* enums. 2004-12-01 23:53:43 +00:00
Ian Romanick 77e297c368 Refactor ExtractDir and OpenDriver to be a bit more clear. 2004-12-01 09:41:14 +00:00
Ian Romanick 9bba1cfc39 Use indirect_size.c and indirect_size.h generated by using
src/mesa/glapi/glX_proto_send.py with the '-m size_c' and '-m size_h'
options.
2004-12-01 09:11:04 +00:00
Ian Romanick 548435215d Use the indirect_init.c generate by using src/mesa/glapi/glX_proto_send.py
with the '-m init_c' option.
2004-12-01 08:49:41 +00:00
Ian Romanick 4f4854a4af Make the transition to script-genereated GLX code easier.
Convert GL 1.4 function names to EXT_blend_func_separate names.
2004-12-01 08:47:35 +00:00
Ian Romanick 529381ff75 Make the transition to script-genereated GLX code easier.
Convert GL 1.4 / ARB_point_parameter function names to EXT_point_parameter /
NV_point_sprite names.
2004-12-01 08:42:31 +00:00
Ian Romanick 6b89a8363b Make the transition to script-genereated GLX code easier.
Move "handcoded" ARB_window_pos / MESA_window_pos functions to their own
file.  Modify the ARB_window_pos functions to use the MESA_window_pos names.
2004-12-01 08:31:15 +00:00
Ian Romanick bb427b10b1 Make the transition to script-genereated GLX code easier.
Move "handcoded" ARB_transpose_matrix functions to their own file.  From
here on out, such handcoded functions should go in a file named
indirect_FOO.c, where "FOO" is some logical name for the functionality
(e.g., part of the extension name, etc.).
2004-12-01 08:22:44 +00:00
Ian Romanick c8c24d049d Make the transition to script-genereated GLX code easier.
Move EXT_vertex_array wrapper functions from indirect_init.c to vertarr.c.
Fix problems with EXT_multi_draw_arrays function names.
2004-12-01 08:15:01 +00:00
Ian Romanick 345ed3ac8c Make the transition to script-genereated GLX code easier.
Eliminate the need for indirect_wrap.h and NEED_GL_FUNCS_WRAPPED.
Basically, this means prepending __indirect_ to all the definitions and
calls of GL functions that don't already have it.
2004-12-01 08:02:50 +00:00
Ian Romanick 249a5552f1 Make the transition to script-genereated GLX code easier.
Convert GL_ARB_texture_compression related functions to use the extension
version of the names instead of the GL 1.3 versions.
2004-12-01 07:34:25 +00:00
Ian Romanick fc43857cc9 Add trivial support ARB_texture_rectangle and OES_read_format. 2004-12-01 00:20:22 +00:00
Ian Romanick 05f4a2b92d Missed GL_OES_read_format_bit in last commit. 2004-12-01 00:18:01 +00:00
Ian Romanick f1f18cd1b8 Since we know the problem with HP_occlusion_test is / was on the server-side,
re-enable the extension on the client-side.
2004-11-30 23:29:51 +00:00
Adam Jackson ad919c30df Sync with Xorg head: mingw build fixes from Alexander Gottwald. 2004-11-15 15:31:32 +00:00
Adam Jackson 473fe6d6bf constify a few arrays. 2004-11-03 18:55:31 +00:00
Adam Jackson 5dd18e95d9 static char * -> static char [] 2004-11-03 18:55:20 +00:00
Adam Jackson 1cda832fd9 remove a -Werror from testing. 2004-10-25 22:19:43 +00:00
Adam Jackson cb3610e37c Import the GLX client side library, formerly from xc/lib/GL/glx. Build it
by adding 'glx/x11' to SRC_DIRS in your build config.
2004-10-25 21:09:16 +00:00