Commit Graph

530 Commits

Author SHA1 Message Date
RALOVICH, Kristóf 60aa0918a1 glx: indent -br -i3 -npcs --no-tabs drisw_glx.c 2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf 4e88ae5639 glx: indent -br -i3 -npcs --no-tabs dri_glx.c 2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf 09c889b318 glx: indent -br -i3 -npcs --no-tabs dri_common.h 2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf 4d86228321 glx: indent -br -i3 -npcs --no-tabs dri_common.c 2008-10-13 16:53:38 -06:00
RALOVICH, Kristóf 2e8d62be61 glx: indent -br -i3 -npcs --no-tabs dri2.h 2008-10-13 16:53:38 -06:00
RALOVICH, Kristóf bca6e79a45 glx: indent -br -i3 -npcs --no-tabs dri2_glx.c 2008-10-13 16:53:38 -06:00
RALOVICH, Kristóf 66cc150770 glx: indent -br -i3 -npcs --no-tabs dri2.c 2008-10-13 16:53:38 -06:00
RALOVICH, Kristóf f788a8ed69 glx: indent -br -i3 -npcs --no-tabs compsize.c 2008-10-13 16:53:38 -06:00
RALOVICH, Kristóf ee3a6cec36 glx: indent -br -i3 -npcs --no-tabs clientattrib.c 2008-10-13 16:53:38 -06:00
RALOVICH, Kristóf 58b72103d3 glx: add a line of Emacs helping variables 2008-10-13 16:53:38 -06:00
RALOVICH, Kristóf 61eb4f50eb glx: No need to zero a local variable.
My previous commit e206034863 introduced this.
2008-10-13 16:53:38 -06:00
RALOVICH, Kristóf 0b188d1cdc glx: make INIT_MESA_SPARC more robust
Embed the macro body into do { ... } while(0) .
2008-10-13 16:53:38 -06:00
Jakob Bornecrantz c9122c0c03 mesa: Remove left over merge conflicts 2008-09-22 12:47:57 +02:00
Keith Whitwell 45efcc44c7 Remove CVS keywords.
Cherry-picked from gallium-0.1

Conflicts:

	src/glu/sgi/libnurbs/interface/bezierEval.h
	src/glu/sgi/libnurbs/interface/bezierPatch.h
	src/glu/sgi/libnurbs/interface/bezierPatchMesh.h
	src/glu/sgi/libnurbs/internals/dataTransform.h
	src/glu/sgi/libnurbs/internals/displaymode.h
	src/glu/sgi/libnurbs/internals/sorter.h
	src/glu/sgi/libnurbs/nurbtess/definitions.h
	src/glu/sgi/libnurbs/nurbtess/directedLine.h
	src/glu/sgi/libnurbs/nurbtess/gridWrap.h
	src/glu/sgi/libnurbs/nurbtess/monoChain.h
	src/glu/sgi/libnurbs/nurbtess/monoPolyPart.h
	src/glu/sgi/libnurbs/nurbtess/monoTriangulation.h
	src/glu/sgi/libnurbs/nurbtess/partitionX.h
	src/glu/sgi/libnurbs/nurbtess/partitionY.h
	src/glu/sgi/libnurbs/nurbtess/polyDBG.h
	src/glu/sgi/libnurbs/nurbtess/polyUtil.h
	src/glu/sgi/libnurbs/nurbtess/primitiveStream.h
	src/glu/sgi/libnurbs/nurbtess/quicksort.h
	src/glu/sgi/libnurbs/nurbtess/rectBlock.h
	src/glu/sgi/libnurbs/nurbtess/sampleComp.h
	src/glu/sgi/libnurbs/nurbtess/sampleCompBot.h
	src/glu/sgi/libnurbs/nurbtess/sampleCompRight.h
	src/glu/sgi/libnurbs/nurbtess/sampleCompTop.h
	src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.h
	src/glu/sgi/libnurbs/nurbtess/sampledLine.h
	src/glu/sgi/libnurbs/nurbtess/searchTree.h
	src/glu/sgi/libnurbs/nurbtess/zlassert.h
	src/glu/sgi/libutil/error.c
	src/glu/sgi/libutil/glue.c
	src/glu/sgi/libutil/gluint.h
	src/glu/sgi/libutil/project.c
	src/glu/sgi/libutil/registry.c
	src/glx/x11/glxclient.h
	src/glx/x11/glxext.c
	src/mesa/drivers/dri/ffb/ffb_dd.h
	src/mesa/drivers/dri/ffb/ffb_points.h
	src/mesa/drivers/dri/gamma/gamma_context.h
	src/mesa/drivers/dri/gamma/gamma_macros.h
	src/mesa/drivers/dri/i810/i810context.h
	src/mesa/drivers/dri/r128/r128_dd.h
	src/mesa/drivers/dri/tdfx/tdfx_dd.h
2008-09-21 11:00:44 -07:00
Keith Whitwell 9644fa6c48 Merge branch 'master' into gallium-0.2
Conflicts:

	include/GLES/egl.h
	include/GLES/egltypes.h
	src/egl/main/eglconfig.c
	src/egl/main/eglconfig.h
	src/glu/sgi/libnurbs/interface/bezierEval.h
	src/glu/sgi/libnurbs/interface/bezierPatch.h
	src/glu/sgi/libnurbs/interface/bezierPatchMesh.h
	src/glu/sgi/libnurbs/internals/dataTransform.h
	src/glu/sgi/libnurbs/internals/displaymode.h
	src/glu/sgi/libnurbs/internals/sorter.h
	src/glu/sgi/libnurbs/nurbtess/definitions.h
	src/glu/sgi/libnurbs/nurbtess/directedLine.h
	src/glu/sgi/libnurbs/nurbtess/gridWrap.h
	src/glu/sgi/libnurbs/nurbtess/monoChain.h
	src/glu/sgi/libnurbs/nurbtess/monoPolyPart.h
	src/glu/sgi/libnurbs/nurbtess/monoTriangulation.h
	src/glu/sgi/libnurbs/nurbtess/partitionX.h
	src/glu/sgi/libnurbs/nurbtess/partitionY.h
	src/glu/sgi/libnurbs/nurbtess/polyDBG.h
	src/glu/sgi/libnurbs/nurbtess/polyUtil.h
	src/glu/sgi/libnurbs/nurbtess/primitiveStream.h
	src/glu/sgi/libnurbs/nurbtess/quicksort.h
	src/glu/sgi/libnurbs/nurbtess/rectBlock.h
	src/glu/sgi/libnurbs/nurbtess/sampleComp.h
	src/glu/sgi/libnurbs/nurbtess/sampleCompBot.h
	src/glu/sgi/libnurbs/nurbtess/sampleCompRight.h
	src/glu/sgi/libnurbs/nurbtess/sampleCompTop.h
	src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.h
	src/glu/sgi/libnurbs/nurbtess/sampledLine.h
	src/glu/sgi/libnurbs/nurbtess/searchTree.h
	src/glu/sgi/libnurbs/nurbtess/zlassert.h
	src/glu/sgi/libutil/error.c
	src/glu/sgi/libutil/glue.c
	src/glu/sgi/libutil/gluint.h
	src/glu/sgi/libutil/project.c
	src/glu/sgi/libutil/registry.c
	src/glx/x11/Makefile
	src/glx/x11/glxclient.h
	src/glx/x11/glxext.c
	src/mesa/drivers/dri/ffb/ffb_dd.h
	src/mesa/drivers/dri/ffb/ffb_points.h
	src/mesa/drivers/dri/gamma/gamma_context.h
	src/mesa/drivers/dri/gamma/gamma_macros.h
	src/mesa/drivers/dri/i810/i810context.h
	src/mesa/drivers/dri/r128/r128_dd.h
	src/mesa/drivers/dri/r128/r128_tex.h
	src/mesa/drivers/dri/tdfx/tdfx_dd.h
	src/mesa/drivers/x11/xm_buffer.c
	src/mesa/glapi/glapi.c
	src/mesa/main/dispatch.c
	src/mesa/main/state.c
	src/mesa/main/texstate.c
	src/mesa/shader/arbprogparse.c
	src/mesa/shader/arbprogram.c
	src/mesa/shader/nvfragparse.c
	src/mesa/shader/nvprogram.c
	src/mesa/shader/shader_api.c
	src/mesa/sources
	src/mesa/swrast/s_aaline.c
	src/mesa/swrast/s_aaline.h
	src/mesa/swrast/s_aatriangle.h
	src/mesa/swrast/s_accum.c
	src/mesa/swrast/s_alpha.h
	src/mesa/swrast/s_bitmap.c
	src/mesa/swrast/s_blend.h
	src/mesa/swrast/s_context.c
	src/mesa/swrast/s_copypix.c
	src/mesa/swrast/s_depth.c
	src/mesa/swrast/s_depth.h
	src/mesa/swrast/s_drawpix.c
	src/mesa/swrast/s_drawpix.h
	src/mesa/swrast/s_feedback.c
	src/mesa/swrast/s_feedback.h
	src/mesa/swrast/s_fog.h
	src/mesa/swrast/s_lines.h
	src/mesa/swrast/s_logic.h
	src/mesa/swrast/s_masking.h
	src/mesa/swrast/s_points.c
	src/mesa/swrast/s_points.h
	src/mesa/swrast/s_readpix.c
	src/mesa/swrast/s_span.c
	src/mesa/swrast/s_span.h
	src/mesa/swrast/s_stencil.h
	src/mesa/swrast/s_texcombine.c
	src/mesa/swrast/s_texcombine.h
	src/mesa/swrast/s_texfilter.c
	src/mesa/swrast/s_texfilter.h
	src/mesa/swrast/s_texstore.c
	src/mesa/swrast/s_triangle.c
	src/mesa/swrast/s_triangle.h
	src/mesa/swrast/s_zoom.h
	src/mesa/swrast_setup/ss_context.c
	src/mesa/swrast_setup/ss_triangle.h
	src/mesa/tnl/t_draw.c
	src/mesa/tnl/t_vb_light.c
	src/mesa/tnl/t_vertex_generic.c
	src/mesa/tnl/t_vertex_sse.c
	src/mesa/tnl/t_vp_build.h
	src/mesa/tnl/tnl.h
	src/mesa/x86/common_x86.c
2008-09-21 10:28:06 -07:00
Adam Jackson dc8058c337 Update to SGI FreeB 2.0.
Under the terms of version 1.1, "once Covered Code has been published
under a particular version of the License, Recipient may, for the
duration of the License, continue to use it under the terms of that
version, or choose to use such Covered Code under the terms of any
subsequent version published by SGI."

FreeB 2.0 license refers to "dates of first publication".  They are here
taken to be 1991-2000, as noted in the original license text:

 ** Original Code. The Original Code is: OpenGL Sample Implementation,
 ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
 ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
 ** Copyright in any portions created by third parties is as indicated
 ** elsewhere herein. All Rights Reserved.

Official FreeB 2.0 text:

http://oss.sgi.com/projects/FreeB/SGIFreeSWLicB.2.0.pdf

As always, this code has not been tested for conformance with the OpenGL
specification.  OpenGL conformance testing is available from
http://khronos.org/ and is required for use of the OpenGL logo in
product advertising and promotion.
2008-09-19 17:16:53 -04:00
Brian 19d9c81b8c glx: re-add glapi/ path 2008-09-18 21:22:08 -06:00
Brian 4eb95ce807 glx: added "glapi/" prefix to include 2008-09-18 20:27:16 -06:00
Chris Rankin 8d41e4536d mesa: fix asst path/include mistakes in prev commits 2008-09-18 16:48:11 -06:00
Brian Paul a25e1aa0aa glx: remove #include "glheader.h" lines
Was only used to get the PUBLIC/USED macros.
Also, replace "GL_FALSE" with "False" in a couple places.
2008-09-18 13:26:30 -06:00
Brian Paul 3537da87de glx: remove depency on glheader.h and GLboolean type in XF86DRI code
Return Bool instead of GLboolean to match other functions.
Define PUBLIC/USED macros locally.
2008-09-18 13:23:06 -06:00
Keith Whitwell 89ab66448e Merge commit 'origin/master' into gallium-0.2
Conflicts:

	progs/trivial/Makefile
	src/mesa/glapi/glthread.c
2008-09-18 19:03:02 +01:00
George Sapountzis 841205e365 dri/swrast: fix swapBuffers after dri2 2008-09-18 18:52:14 +01:00
Guillaume Melquiond 811d8b86eb glx: fix 64-bit datatype issue 2008-09-13 14:24:31 -06:00
Eric Anholt bdc8ac4ae2 Finish off the previous fix for TFP.
A couple of those lines of debug printfs I deleted weren't actually debug
printfs.
2008-09-12 15:09:43 -07:00
George Sapountzis d3dc95e26a dri/swrast: fix swapBuffers after dri2 2008-09-12 12:43:10 +03:00
Alan Hourihane 47ad296a18 Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/mesa into gallium-0.2
Conflicts:

	src/mesa/drivers/dri/i915/intel_ioctl.c
	src/mesa/main/texstore.c
	src/mesa/tnl/t_vp_build.c
	src/mesa/vbo/vbo_exec_draw.c
2008-09-11 17:32:18 +01:00
Keith Whitwell 0397b2bb41 Merge branch 'gallium-0.1' into gallium-0.2
A first attempt at moving gallium onto a branch directly off master...

It will be interesting to see how much work this takes to get running.

Have resolved the conflicts semi-arbitarily, not compiled or tested.

Conflicts:

	.gitignore
	Makefile
	configs/config.mgw
	configs/darwin
	configs/darwin-x86ppc
	configs/default
	configs/freebsd-dri
	configs/linux-dri
	configs/linux-dri-xcb
	configs/linux-fbdev
	configs/linux-static
	configs/linux-x86-64-static
	configs/linux-x86-static
	doxygen/Makefile
	include/GL/gl.h
	progs/demos/Makefile
	progs/demos/descrip.mms
	progs/demos/texenv.c
	progs/egl/.gitignore
	progs/egl/Makefile
	progs/glsl/.gitignore
	progs/glsl/Makefile
	progs/glsl/convolutions.c
	progs/samples/Makefile.mgw
	progs/tests/.gitignore
	progs/trivial/.gitignore
	progs/trivial/point-param.c
	progs/trivial/tri.c
	progs/xdemos/.gitignore
	progs/xdemos/glthreads.c
	src/egl/drivers/demo/Makefile
	src/egl/drivers/dri/Makefile
	src/egl/main/Makefile
	src/glu/Makefile
	src/glu/sgi/Makefile
	src/glu/sgi/Makefile.mgw
	src/glut/glx/Makefile.mgw
	src/glut/os2/WarpWin.cpp
	src/glut/os2/glut_cindex.cpp
	src/glut/os2/glut_gamemode.cpp
	src/glut/os2/glut_win.cpp
	src/glut/os2/glut_winmisc.cpp
	src/glut/os2/os2_glx.cpp
	src/glut/os2/os2_menu.cpp
	src/glut/os2/os2_winproc.cpp
	src/glw/Makefile
	src/glx/x11/dri_glx.c
	src/glx/x11/glxext.c
	src/mesa/Makefile
	src/mesa/Makefile.mgw
	src/mesa/descrip.mms
	src/mesa/drivers/beos/Makefile
	src/mesa/drivers/common/descrip.mms
	src/mesa/drivers/common/driverfuncs.c
	src/mesa/drivers/directfb/Makefile
	src/mesa/drivers/dri/Makefile.template
	src/mesa/drivers/dri/common/dri_bufmgr.c
	src/mesa/drivers/dri/common/dri_bufmgr.h
	src/mesa/drivers/dri/common/dri_util.c
	src/mesa/drivers/dri/common/extension_helper.h
	src/mesa/drivers/dri/common/mmio.h
	src/mesa/drivers/dri/common/utils.c
	src/mesa/drivers/dri/common/utils.h
	src/mesa/drivers/dri/glcore/Makefile
	src/mesa/drivers/dri/i810/i810screen.c
	src/mesa/drivers/dri/i915/intel_ioctl.c
	src/mesa/drivers/dri/i915/intel_ioctl.h
	src/mesa/drivers/dri/i915/intel_screen.c
	src/mesa/drivers/dri/i915/server/i830_common.h
	src/mesa/drivers/dri/i915/server/i830_dri.h
	src/mesa/drivers/dri/i965/intel_screen.c
	src/mesa/drivers/dri/i965/server/i830_common.h
	src/mesa/drivers/dri/i965/server/i830_dri.h
	src/mesa/drivers/dri/mach64/mach64_screen.c
	src/mesa/drivers/dri/nouveau/nouveau_context.h
	src/mesa/drivers/dri/nouveau/nouveau_fifo.c
	src/mesa/drivers/dri/nouveau/nouveau_fifo.h
	src/mesa/drivers/dri/nouveau/nouveau_screen.c
	src/mesa/drivers/dri/nouveau/nouveau_screen.h
	src/mesa/drivers/dri/r128/r128_tex.h
	src/mesa/drivers/dri/savage/savageioctl.h
	src/mesa/drivers/fbdev/Makefile
	src/mesa/drivers/osmesa/Makefile
	src/mesa/drivers/osmesa/descrip.mms
	src/mesa/drivers/x11/Makefile
	src/mesa/drivers/x11/descrip.mms
	src/mesa/drivers/x11/xm_dd.c
	src/mesa/glapi/glapi.c
	src/mesa/glapi/glthread.c
	src/mesa/main/api_validate.c
	src/mesa/main/attrib.c
	src/mesa/main/bufferobj.c
	src/mesa/main/bufferobj.h
	src/mesa/main/buffers.c
	src/mesa/main/config.h
	src/mesa/main/context.c
	src/mesa/main/descrip.mms
	src/mesa/main/drawpix.c
	src/mesa/main/enums.c
	src/mesa/main/fbobject.c
	src/mesa/main/glheader.h
	src/mesa/main/imports.c
	src/mesa/main/mipmap.c
	src/mesa/main/mm.c
	src/mesa/main/mm.h
	src/mesa/main/mtypes.h
	src/mesa/main/points.c
	src/mesa/main/sources
	src/mesa/main/state.c
	src/mesa/main/texcompress_fxt1.c
	src/mesa/main/texenvprogram.c
	src/mesa/main/texobj.c
	src/mesa/main/texstate.c
	src/mesa/main/texstore.c
	src/mesa/math/descrip.mms
	src/mesa/shader/arbprogram.c
	src/mesa/shader/descrip.mms
	src/mesa/shader/prog_execute.c
	src/mesa/shader/prog_statevars.c
	src/mesa/shader/prog_statevars.h
	src/mesa/shader/prog_uniform.c
	src/mesa/shader/program.c
	src/mesa/shader/program.h
	src/mesa/shader/shader_api.c
	src/mesa/shader/slang/descrip.mms
	src/mesa/shader/slang/library/slang_vertex_builtin_gc.h
	src/mesa/sources
	src/mesa/swrast/descrip.mms
	src/mesa/swrast/s_drawpix.c
	src/mesa/swrast/s_fragprog.c
	src/mesa/swrast/s_readpix.c
	src/mesa/swrast/s_span.c
	src/mesa/swrast_setup/descrip.mms
	src/mesa/tnl/descrip.mms
	src/mesa/tnl/t_context.h
	src/mesa/tnl/t_vp_build.c
	src/mesa/tnl/tnl.h
	src/mesa/vbo/descrip.mms
	src/mesa/vbo/vbo_context.c
	src/mesa/vbo/vbo_exec_array.c
	src/mesa/x86-64/xform4.S
	src/mesa/x86/rtasm/x86sse.c
	src/mesa/x86/rtasm/x86sse.h
	windows/VC6/progs/glut/glut.dsp
	windows/VC7/mesa/gdi/gdi.vcproj
	windows/VC7/mesa/glu/glu.vcproj
	windows/VC7/mesa/mesa.sln
	windows/VC7/mesa/mesa/mesa.vcproj
	windows/VC7/mesa/osmesa/osmesa.vcproj
	windows/VC7/progs/glut/glut.vcproj
	windows/VC8/mesa/gdi/gdi.vcproj
	windows/VC8/mesa/glu/glu.vcproj
	windows/VC8/mesa/mesa.sln
	windows/VC8/mesa/mesa/mesa.vcproj
	windows/VC8/progs/glut/glut.vcproj
2008-09-11 16:05:15 +01:00
Kristian Høgsberg f56b569e9a DRI2: Drop sarea, implement swap buffers in the X server. 2008-08-29 12:13:14 -04:00
Kristof Ralovich 8434c65bb9 glx: free driScreen in FreeScreenConfigs() 2008-08-20 15:33:03 -06:00
Kristof Ralovich 8b51278134 glx: free context in driDestroyContext() 2008-08-20 15:33:03 -06:00
Kristof Ralovich e206034863 glx: free vertex array state when context is destroyed 2008-08-20 15:33:03 -06:00
Kristof Ralovich fb36a54a1c fix mem leak (free psc->visuals) 2008-08-20 15:33:03 -06:00
Zack Rusin d8be393cb6 fix compilation 2008-08-13 07:14:47 -04:00
Jeremy Huddleston 98e7c1cf38 Fixed 'make install' for darwin 2008-08-12 10:59:40 -07:00
Jeremy Huddleston ac0d19601c Apple: Cleaned up some linking and dylib ids issues 2008-08-11 09:17:06 -07:00
Jeremy Huddleston 919ec22ecf glx/x11: Added some #ifdef GLX_DIRECT_RENDERING protection 2008-08-08 02:52:10 -07:00
Jeremy Huddleston ec770150ed glx/x11: Fix missing __GL_EXT_BYTES declaration 2008-08-08 02:37:14 -07:00
Adam Jackson 62fb5f7b9a Drop unused 'entries' field from __glxHashTable. 2008-08-04 15:44:34 -04:00
Ian Romanick 27e3f7f21d glx: Update my e-mail address. :) 2008-07-15 11:06:31 -07:00
Ian Romanick 67108adb48 glx: Trivial clean-ups to __glXSetArrayEnable 2008-07-15 11:06:04 -07:00
Dave Airlie 4fab47b13c glx/dri: only report DRI2 extensions when DRI2 is enabled.
Fixes bug 15477
2008-07-13 19:00:46 +10:00
Dan Nicholson db072baaaf Call mklib with $(SHELL) so the user controls the interpreter
Respect the user's choice of shell when running mklib rather than always
using /bin/sh.
2008-07-12 10:25:40 -07:00
Brian Paul df2c9424d3 glx: added __glXPreferEGL() to tell libGL to prefer "egl_" drivers over regular DRI drivers.
Also, clean-up, consolidate the dlopen() code a bit.
2008-07-11 15:45:03 -06:00
George Sapountzis a36bf890e8 glx: add LIBGL_ALWAYS_SOFTWARE
this disables accelerated DRI and fallbacks to client-side software rendering.

compile-tested only.
2008-07-07 18:34:17 +03:00
Alan Hourihane 9157b1e09a glcontextmodes.c is required remove the reference in .gitignore 2008-07-04 13:54:49 +01:00
Alan Coopersmith 4ba39c40ae Fix builds with compilers other than gcc 3.0 & newer
Add #include "glheader.h" for definition of __builtin_expect for compilers
that don't support it.

Signed-off-by: Brian Paul <brian.paul@tungstengraphics.com>
2008-06-21 10:19:45 -06:00
George Sapountzis 1087cc61b3 glx: load swrast_dri.so
caveats:

- does not work with old (i.e. libGLcore) xserver:

- made unbindContext a noop

- extensions:

  GLX_SGI_make_current_read
  GLX_EXT_texture_from_pixmap
  GLX_MESA_copy_sub_buffer
2008-06-13 15:54:08 +03:00
George Sapountzis 4297413656 glx: use ErrorMessageF 2008-06-13 15:48:06 +03:00
Alan Hourihane 6f7ed99b30 revert the DRI2 commits 2008-06-12 00:11:54 +01:00
Alan Hourihane 5e9fe62c70 add missed files for DRI2 merge 2008-06-11 15:25:35 +01:00
Alan Hourihane 1bcb817167 Hook gallium i915 up to DRI2 2008-06-11 14:52:55 +01:00
Alan Hourihane 4566b006f1 Bring in DRI2 changes 2008-06-11 14:10:08 +01:00
Roland Scheidegger 17ec0dbd75 copy msaa visuals capability 2008-06-10 15:45:20 +02:00
Roland Scheidegger d85f1e95d3 copy msaa visuals capability 2008-06-10 15:44:48 +02:00
George Sapountzis 906e189bd3 glx: use goto's vs. nested if's ala xserver
compile tested only
2008-06-09 17:47:49 +03:00
George Sapountzis 0793457039 glx: add dri_common.c ala xserver
also drop driFilterModes which is unused

in preparation of loading swrast_dri.so
2008-06-09 17:47:09 +03:00
Brian Paul f82d5cf769 mesa: disable visual warning unless LIBGL_DEBUG is defined 2008-06-06 15:52:47 -06:00
Alan Hourihane b2a9788ec6 Silence warning 2008-06-05 11:47:20 +01:00
Brian Paul 5429d4a04a replace make with $(MAKE) (bug 16133) 2008-05-28 08:53:53 -06:00
José Fonseca 77ce568ff7 Remove CVS keywords. 2008-05-26 20:14:40 +09:00
Kristian Høgsberg 1b359bc88e Revert "glapi: Generate xserver glapi sources in the mesa tree"
This reverts commit 7688791fc5, and takes
us back to generating the glapi files straight into the xserver tree.

Conflicts:

	src/glx/x11/indirect_size_get.c
2008-05-21 12:13:39 -04:00
Brian Paul 1bb30b02dd Regenerated API dispatch files
Follow on to cherry-pick from master
2008-05-18 15:23:03 -06:00
Dan Nicholson 5dbbde5b22 Default DRI driver directory to match X.Org xserver
Since the only valid consumer of the DRI drivers is the X.Org xserver,
this changes the default DRI driver directory to match xorg-server:
${libdir}/dri. The old default of /usr/X11R6/modules/dri was wrong for
nearly all current systems.
2008-05-09 07:06:52 -07:00
Dan Nicholson c5e2b850ad Always cleanup the makedepend backup files
Consistently cleanup the depend.bak files created by makedepend. Also,
realclean has been changed to use a single find command, which speeds it
up considerably.
2008-05-06 14:00:43 -07:00
Alan Hourihane 6497d50924 include <X11/Xlib.h> 2008-04-23 15:59:23 +01:00
George Sapountzis f027f8d3a8 glx: nitpick renames 2008-04-23 11:12:31 +03:00
George Sapountzis df04ffbf02 glx: split out current context code
also clean header inclusion after code movement
2008-04-23 11:12:31 +03:00
Michel Dänzer 23635510e3 Get the default GLXPixmap texture target from the server when appropriate.
Fixes compiz with direct rendering when both GLX_TEXTURE_2D_EXT and
GLX_TEXTURE_RECTANGLE_EXT are supported for a GLXPixmap and the
application didn't specify the texture target as a GLX drawable attribute
when creating the GLX drawable.
2008-04-10 15:47:46 -04:00
Jie Luo 2771862adc Handle fbconfig comparison correctly for attributes the X server didn't send. 2008-04-08 19:17:06 -04:00
Kristian Høgsberg c016f329ab Only convert configs if screen creation was successful.
Thanks to Adam Jackson for pointing it out.
2008-04-08 18:31:07 -04:00
Kristian Høgsberg e786924bf0 Pick up dri2proto from the standard proto header include path. 2008-04-02 19:17:31 -04:00
Kristian Høgsberg dc836edf49 Initialize GLX_EXT_texture_from_pixmap attributes correctly. 2008-04-02 19:05:43 -04:00
Kristian Høgsberg e82dd8c6e1 DRI interface changes and DRI2 direct rendering support.
Add DRI2 direct rendering support to libGL and add DRI2 client side
protocol code.  Extend the GLX 1.3 create drawable functions in
glx_pbuffer.c to call into the DRI driver when possible.

Introduce __DRIconfig, opaque struct that represents a DRI driver
configuration.  Get's rid of the open coded __GLcontextModes in the
DRI driver interface and the context modes create and destroy
functions that the loader was requires to provide.  glcore.h is no
longer part of the DRI driver interface.  The DRI config is GL binding
agnostic, that is, not specific to GLX, EGL or other bindings.

The core API is now also an extension, and the driver exports a list
of extensions as the symbol __driDriverExtensions, which the loader
must dlsym() for.  The list of extension will always include the DRI
core extension, which allows creating and manipulating DRI screens,
drawables and contexts.  The DRI legacy extension, when available,
provides alternative entry points for creating the DRI objects that
work with the XF86DRI infrastructure.

Change DRI2 client code to not use drm drawables or contexts.  We
never used drm_drawable_t's and the only use for drm_context_t was as
a unique identifier when taking the lock.  We now just allocate a
unique lock ID out of the DRILock sarea block.  Once we get rid of the
lock entirely, we can drop this hack.

Change the interface between dri_util.c and the drivers, so that the
drivers now export the DriverAPI struct as driDriverAPI instead of the
InitScreen entry point.  This lets us avoid dlsym()'ing for the DRI2
init screen function to see if DRI2 is supported by the driver.
2008-03-31 16:51:26 -04:00
Xiang, Haihao ae2c31ed66 glx: Add isDirect back to __GLXcontextRec. It is needed
to check whether oldGC is used for direct rendering in
function MakeContextCurrent. However it is possible
oldGC->driContext is already freed. fix bug #14926.
2008-03-18 15:02:57 +08:00
Kristian Høgsberg 98e13fecd0 Test createNewScreen for NULL, not createNewScreenName in driCreateScreen(). 2008-03-15 14:06:42 -04:00
Xiang, Haihao 42c279a03b glx: fix rotation regression. bug #14963 2008-03-14 15:27:15 +08:00
Kristian Høgsberg 9110425c72 libGL: Pull the drawable hash back out in the generic code.
This will be shared between dri and dri2 code.
2008-03-12 02:18:12 -04:00
Kristian Høgsberg 94f39f2e7c Add another missing check for uninitialized DRI.
Spotted by Chris Taylor.
2008-03-12 02:04:16 -04:00
Kristian Høgsberg fe23dc5eca Move make install logic for libGL back into src/mesa/Makefile.
This makes make install work again for non-glx libGL implementations.
The make install logic is split into three sub-targets: install-libgl,
install-osmesa, install-drivers.  The install target in src/glx/x11
is then implemented using the src/mesa make install-libgl rule.

Thanks to Dan Nicholson for pointing out the breakage.
2008-03-10 18:46:19 -04:00
Kristian Høgsberg 3731159ec6 Only try to call DRI function if DRI got initialized properly. 2008-03-10 18:46:19 -04:00
Brian 9162bc8f48 remove extra #include of assert.h (bug 14932) 2008-03-10 07:43:40 -06:00
Dave Airlie 20e0a8a1ca dri: fix function call to add new parameter.
This may not be correct but it should get the build going.
2008-03-10 19:13:34 +10:00
Kristian Høgsberg b0f8025434 Properly revert the libGL loader path breakage. 2008-03-09 19:02:56 -04:00
Kristian Høgsberg 03db9c8acb libGL: Fall back to DEFAULT_DRIVER_DIR properly.
After commit 6fd82f6fbd, we would
overwrite the libPath default value with NULL if libGL was running
non-setuid and none of the env vars were set.

Thanks to Magnus Kessler <Magnus.Kessler@gmx.net> for spotting it.
2008-03-09 16:29:17 -04:00
Kristian Høgsberg 3d28a2690f Use _X_HIDDEN to hide a bunch of leaked symbols. 2008-03-08 22:28:01 -05:00
Kristian Høgsberg 020c64b2cf Move DRI context functions into dri_glx.c.
Also drop isDirect flag; if gc->driContext is non-NULL, it's direct.
2008-03-08 21:57:29 -05:00
Kristian Høgsberg 20b9230ce1 Move DRI drawable creation into dri_glx.c. 2008-03-08 21:02:23 -05:00
Kristian Høgsberg 92d2a78f8d Introduce __GLXDRIscreen so we can start moving function pointers in there.
Temporarily rename the __DRIscreen member to __driScreen.  Eventually,
we'll move that into __GLXDRIscreen and only access it in dri_glx.c.
2008-03-08 20:34:24 -05:00
Kristian Høgsberg 53dc863636 Move DRI specific parts of CreateContext into dri_glx.c. 2008-03-08 20:02:22 -05:00
Kristian Høgsberg a1ea6f6198 Convert driCreateScreen and driDestroyScreen to function pointers.
We avoid leaking the symbols and will be able to replace them with
DRI2 implementation later on.
2008-03-08 19:15:50 -05:00
Kristian Høgsberg 425f9ed44e Abstract __DRIdisplayPrivateRec away in dri_glx.c.
This patch moves __DRIdisplayPrivateRec definition into dri_glx.c and
let's dri_glx.c allocate the __DRIdisplay struct pointer to from
__GLXdisplayPrivate.

A small step towards moving more of the dri functionality into dri_glx.c.
2008-03-08 19:10:21 -05:00
Kristian Høgsberg f585cb29b8 Make __glXCloseDisplay static instead of prototyping it to avoid warning. 2008-03-08 17:38:02 -05:00
Kristian Høgsberg 47d563006d Move libGL install target to the libGL Makefile. 2008-03-08 17:19:39 -05:00
Kristian Høgsberg 6fd82f6fbd Simplify LIBGL_DRIVERS_PATH walking. 2008-03-08 16:19:39 -05:00
Kristian Høgsberg 0f2723cacb Simplify dri loading code by eliminating dlopen "cache".
No need to jump through hoops to track __DRIdrivers and avoid dlopening the
same .so more than twice, dlopen() does this internally.  Besides, we
were already bypassing this and dlopening drivers for each screen,
whether or not they were already dlopened.
2008-03-08 16:19:39 -05:00
Kristian Høgsberg 890d44e54f libGL: Consolidate DRI initialization in dri_glx.c
Move a lot of code over from glx_ext.c.
2008-03-08 16:19:39 -05:00
Kristian Høgsberg 3c5a1e4c2d Update libGL DRI loader to latest DRI interface changes. 2008-02-29 16:42:29 -05:00
Kristian Høgsberg bcecea6ea6 autoconf: Add gcc search patch to MKDEP_OPTIONS to eliminate warnings.
Also, use -include to avoid error message when make initially fails to
include the non-existent depend file.
2008-02-25 19:02:07 -05:00
Kristian Høgsberg 6e8d21d72f Remove GetMSC DriverAPI function.
The DriverAPI is internal to the DRI drivers and GetDrawableMSC
obsoletes GetMSC.  Also, since the DRI driver interface has not yet
been released, just drop the getMSC function from the DRI interface
instead using the ABI preserving version mechanism.

Finally, using void pointer privates in the DRI interface is not allowed,
always pass the actual types around (__DRIdrawable in this case) to
enhance type safety and readability of the code.
2008-02-25 19:02:06 -05:00
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