Compare commits

...

441 Commits

Author SHA1 Message Date
Brian Paul
53e595017e updates for 6.4.1 release 2005-11-30 01:15:50 +00:00
Brian Paul
f8be78367d 6.4.1 release notes 2005-11-30 01:15:15 +00:00
Ian Romanick
89568e0509 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:09:28 +00:00
Brian Paul
149675017f assorted fixes for server-side direct rendering (bug 5199) 2005-11-29 23:02:47 +00:00
Brian Paul
4d87d19a60 remove dri_client/ dir from tarball 2005-11-29 22:41:42 +00:00
Brian Paul
7a46bf5e1b use the drm files from the drm tree/package, not these 2005-11-29 22:35:28 +00:00
Brian Paul
c2cabc6755 use xf86drm.h from the drm tree 2005-11-29 15:49:04 +00:00
Michel Dänzer
3fa7668f99 If the DDX driver didn't reserve any video RAM for textures, fall back to
using only GART memory for textures instead of segfaulting in the texture
management code. (Bug 5115)
2005-11-29 13:36:43 +00:00
Brian Paul
2370d426cf fix BSD X server compilation problem 2005-11-27 23:49:44 +00:00
Brian Paul
d8eb2d49dd include stdint.h for BSD 2005-11-27 23:47:15 +00:00
Brian Paul
fcda7131b4 use ADD_POINTERS macro instead of (uintptr_t) cast 2005-11-25 17:07:28 +00:00
Keith Whitwell
6ff7b66f4a Use _mesa_exec_free for fp->func. 2005-11-24 11:00:17 +00:00
Brian Paul
e037150407 added bug 5131 work-around 2005-11-22 23:31:09 +00:00
Brian Paul
c2e6917e14 disable freeing of fp->func, see comment (bug 5131) 2005-11-22 23:28:12 +00:00
Keith Whitwell
2048fabe04 Use correct enums for program output variables. Fixes
fp/tri-depthwrite.
2005-11-22 12:29:18 +00:00
Keith Whitwell
b7da962caf Make sure tnl->_DoVertexFog is kept uptodate. Fixes fog in i915
driver.
2005-11-22 10:59:05 +00:00
Brian Paul
040bdbe2e6 in run_texnorm_stage() check if the texture unit is really enabled before trying to normalize the texcoords 2005-11-19 17:08:36 +00:00
Thomas Hellström
471c17cc84 Fixes for x86_64 Unichrome. 2005-11-16 19:22:58 +00:00
Brian Paul
ad9a205ba8 Added error checking in _tnl_Begin to detect incomplete framebuffer.
Set new tnl->DiscardPrimitive field to true when such error is
detected to discard the glBegin/End primitive when flushing.
2005-11-16 02:46:06 +00:00
Brian Paul
45c30dbead add GL_INVALID_FRAMEBUFFER_OPERATION_EXT in _mesa_error() 2005-11-16 01:11:35 +00:00
Brian Paul
eeb4f1aff9 fix color interpolation problem reported on VMS 2005-11-15 15:08:16 +00:00
Brian Paul
1ea4669fce check for ctx==NULL, should help with bug 4087 2005-11-15 14:49:34 +00:00
Brian Paul
a110f0f407 fix problem in stencil_and_ztest_span() when using hardware stencil 2005-11-15 03:58:42 +00:00
Brian Paul
4f42aa83f1 fix incorrect depth/stencil size checks 2005-11-15 03:57:41 +00:00
Brian Paul
eb72779ef1 fix bug 5005 2005-11-10 16:23:39 +00:00
Brian Paul
47604ffc2f fix popping of GL_SPOT_DIRECTION (bug 5005) 2005-11-10 16:17:10 +00:00
Brian Paul
5889e4b775 fix bug 4996 2005-11-09 16:54:19 +00:00
Brian Paul
f9d66b2a44 fix popping of GL_EYE_PLANE state (bug 4996) 2005-11-09 16:52:31 +00:00
Brian Paul
2119711dac Bug 4996.
Replace use of FLOAT_TO_USHORT with either CLAMPED_FLOAT_TO_USHORT or
UNCLAMPED_FLOAT_TO_USHORT.  Same should be done for UBYTE, UINT, etc.
2005-11-09 16:30:03 +00:00
Brian Paul
fcc21abbc6 fix bug 4992 2005-11-09 01:18:56 +00:00
Brian Paul
c331aef105 use UNCLAMPED_FLOAT_TO_USHORT/UBYTE in clear_rgba_buffer() (bug #4992) 2005-11-09 01:16:48 +00:00
Brian Paul
2fc89f126a remove unneeded HIDDEN definition (bug 4956) 2005-11-04 00:57:46 +00:00
Brian Paul
22c8686dad fix MinGW problems (bug 4956) 2005-11-04 00:51:07 +00:00
Brian Paul
7a12ad5a08 added USE_MGL_NAMESPACE for x86-64 fix 2005-11-02 21:02:10 +00:00
Brian Paul
c6165ec3b3 added osdemos/ dir to DEMO_FILES 2005-11-02 21:01:41 +00:00
Brian Paul
67ef9d76e7 implement USE_MGL_NAMESPACE for x86-64 dispatch code (Mark Bolstad) 2005-11-02 20:59:08 +00:00
Brian Paul
aa5f5d54a8 fix problems found with gcc 2.96 (bug 4934) 2005-10-31 21:53:17 +00:00
Brian Paul
c18fd3a3bf fix fragment program fog option w/ glDrawPixels 2005-10-31 19:50:26 +00:00
Brian Paul
d799fbf78e check swrast->_FogEnabled instead of ctx->Fog.Enabled 2005-10-31 19:46:18 +00:00
Brian Paul
48d7f01740 need to use absolute value for RSQ 2005-10-30 16:51:41 +00:00
Brian Paul
59f84d5723 Free old parameter list before assigning new one. FIxes memory leak. 2005-10-29 17:06:49 +00:00
Brian Paul
6f9ff2af81 s/lenght/length/ 2005-10-29 16:11:53 +00:00
Brian Paul
4591406e21 added LOGF wrapper 2005-10-29 16:10:58 +00:00
Brian Paul
2c6cf3d0aa fix LIT 2005-10-29 16:09:55 +00:00
Brian Paul
154a8be6a7 fix a few bugs in SWZ execution 2005-10-29 16:03:07 +00:00
Brian Paul
db03e55efa fix two fragment/vertex program bugs 2005-10-29 15:59:32 +00:00
Brian Paul
d038563a60 fix errors in RoughApproxPower(), do_LIT(), _tnl_program_string() 2005-10-29 15:57:02 +00:00
Brian Paul
469bd21184 If parsing a program fails, don't change the vertex/fragment program object.
Specifically, don't attach a dummy program.
This change also fixes an occasional segfault.
Some code clean-ups.  Use GLboolean instead of GLuint to return pass/fail.
2005-10-29 15:52:16 +00:00
Brian Paul
13a5235305 Keith's fixes for RSW and XPD (need temporaries) 2005-10-28 15:51:53 +00:00
Brian Paul
4e4f6a29f3 include tnl.h to silence warning 2005-10-28 15:22:54 +00:00
Brian Paul
87855fd59b bump version to 6.4.1 2005-10-28 14:35:51 +00:00
Brian Paul
546b020144 6.4 checksums 2005-10-28 14:35:40 +00:00
Brian Paul
84663e12d0 first 6.4.1 bug fix 2005-10-28 14:35:22 +00:00
Brian Paul
c16bb264e8 TNL module needs to implement ctx->Driver.ProgramStringNotify() function
so that calls to glProgramStringARB() to specify a new program causes the
TNL-attached data to get recomputed.
2005-10-28 14:33:36 +00:00
Brian Paul
8ef980af6e silence a bunch of compiler warnings 2005-10-28 13:09:08 +00:00
Brian Paul
7cd7a78d72 update 6.4 release date 2005-10-24 23:12:29 +00:00
Brian Paul
5c57efd6b4 fix writes to result.depth.z 2005-10-24 19:31:18 +00:00
Brian Paul
ea9ed5849f fragment program writing to result.depth.z was broken 2005-10-24 19:28:18 +00:00
Thomas Hellström
1ef0939a64 Bug #4277:
Bump via dri-ddx protocol  major version to reflect the binary change in the
interface with the DDX. Needs updated Xorg DDX to work. (Luc Verhaegen)
2005-10-24 06:54:55 +00:00
Thomas Hellström
d0f9c2887c unichrome: bug #4327,
Don't upload texture images while texture is rendering.
	Handle 32-bit breadcrumb wraparounds correctly.
	Fix possible infinite-wait-for-idle condition.
2005-10-22 16:13:47 +00:00
Thomas Hellström
ed75287003 Remove via_common.h in favour of via_drm.h in the libdrm source.
This requires an up-to-date libdrm.
2005-10-22 15:36:41 +00:00
Eric Anholt
c01c2fb542 Merge from HEAD:
Fix FreeBSD build by building libGL in the order desired, and doing a fix to
  my mklib changes.
2005-10-22 01:42:25 +00:00
Brian Paul
e1d7297812 fix GLX server resize/crash when resizing windows 2005-10-21 21:38:27 +00:00
Brian Paul
b4227f0d98 assorted updates 2005-10-21 20:47:33 +00:00
Brian Paul
c868c1ee14 6.4 release updates 2005-10-21 20:35:47 +00:00
Brian Paul
a1dcb43658 check span.y >=0 (bug 4842) 2005-10-21 18:35:45 +00:00
Ian Romanick
cc7b6810e2 Make execmem.c compile in the server (libGLcore). Since xf86mmap
doesn't know about MAP_ANONYMOUS, this is the only viable fix.  This
issue will likely have to be revisited at some point.
2005-10-21 18:09:24 +00:00
Brian Paul
7b9fecee10 Darwin version fix (SF bug 1334274) 2005-10-21 15:39:20 +00:00
Brian Paul
8856180e4f remove some debug code 2005-10-21 15:34:22 +00:00
Brian Paul
df51dfbdc3 fix broken KIL, SWZ 2005-10-21 15:23:37 +00:00
Brian Paul
2fd1ed1b45 fix broken SWZ instruction 2005-10-21 15:23:13 +00:00
Brian Paul
66b928e95e fix broken KIL 2005-10-21 14:23:05 +00:00
Brian Paul
d5e9cca0b2 use PROGRAM_UNDEFINED instead of -1 to init register fields 2005-10-21 03:57:28 +00:00
Brian Paul
c072c17a8c change test for missing depth or stencil buffer 2005-10-21 03:56:43 +00:00
Brian Paul
8367420be9 remove extra arg to _mesa_exec_malloc() 2005-10-20 23:30:54 +00:00
Brian Paul
e2a2ed06b2 restore FASTCALL stuff 2005-10-20 22:53:27 +00:00
Brian Paul
0cc3703188 added GLX transpose matrix fix 2005-10-20 22:43:56 +00:00
Brian Paul
fb6c1492fb fix bad loops in TransposeMatrix[fd]() 2005-10-20 22:03:58 +00:00
Brian Paul
89ad797f9a fix another renderbuffer wrapping bug 2005-10-20 21:26:05 +00:00
Brian Paul
fa67028ae7 Disable the FASTCALL optimization because it still breaks server-side GLX. 2005-10-20 21:12:12 +00:00
Eric Anholt
8e1724dfe9 Merge from head: bump driver dates for yesterday's crasher fixes. 2005-10-20 20:12:57 +00:00
Brian Paul
fbdb5c9b14 remove extra arg to _mesa_exec_malloc() 2005-10-20 13:31:58 +00:00
Brian Paul
4b2728f95c s/glut_gz2/glut_bz2/ 2005-10-19 20:25:51 +00:00
Brian Paul
3a7437399f added mm.c mm.h exemem.c 2005-10-19 18:15:50 +00:00
Eric Anholt
3338f04be7 Merge from head:
Fix a missed merge for idr's dispatch changes: failure to do driInitExtensions
  in __driCreateNewScreen_20050727 resulted in crashing in dispatch.
2005-10-19 02:47:09 +00:00
Eric Anholt
047f7bb11c Merge the dispatch fix from HEAD today:
Fix a missed merge for idr's dispatch changes: failure to do driInitExtensions
  in __driCreateNewScreen_20050727 resulted in crashing in dispatch.
2005-10-19 02:03:40 +00:00
Brian Paul
5b25acdac7 updated for new mm.c, execmem.c files 2005-10-19 01:29:04 +00:00
Brian Paul
cb16208ec0 Import exec-malloc changes from trunk. 2005-10-19 01:21:12 +00:00
Brian Paul
88107bea56 file mm.h was added on branch mesa_6_4_branch on 2005-10-19 01:21:12 +0000 2005-10-18 15:01:19 +00:00
Brian Paul
b4d25157f2 file mm.c was added on branch mesa_6_4_branch on 2005-10-19 01:21:12 +0000 2005-10-18 15:01:19 +00:00
Brian Paul
c6d1f32ebe file execmem.c was added on branch mesa_6_4_branch on 2005-10-19 01:21:12 +0000 2005-10-18 15:01:19 +00:00
Brian Paul
281f388e03 added some header files to DRI_FILES (Donnie Berkholz) 2005-10-17 22:38:28 +00:00
Brian Paul
c0a0dfeb96 fix GLAPI/extern problem (bug 4757) 2005-10-12 19:37:53 +00:00
Ian Romanick
ab07593563 ifdef out some code to make glapi.c linkable in libglx.so (on the
server).  This isn't strictly needed yet, but it doesn't hurt anything
either.  However, the patches for fd.o bug #2996 require this to build.
2005-10-11 16:56:27 +00:00
Brian Paul
5b08058604 check for PIXMAP in clip routine (SF bug 1323215) 2005-10-11 01:22:05 +00:00
Brian Paul
3bf13d3c4b set tentative release date 2005-10-11 00:24:18 +00:00
Brian Paul
2b05784084 fixed glFogCoord bug 4729 2005-10-10 18:46:28 +00:00
Brian Paul
2292262de4 added EXPF() macro 2005-10-10 18:45:42 +00:00
Brian Paul
a9358bb3b0 from trunk: fix fogcoord bug 4729 2005-10-10 18:45:28 +00:00
Ian Romanick
b9d111f202 Add 'get' data for glGetFramebufferAttachmentParameterivEXT enums.
Remove an extra closing parenthesis in the Linux version of the SWAP_32 macro.
2005-10-10 17:11:21 +00:00
Brian Paul
20fd105e2a change test for presence of accum buffer 2005-10-08 21:37:24 +00:00
Brian Paul
1faaa0090a Fix some issues with state updates and renderbuffers. Querying GL_RED_BITS,
etc. after calling glRenderBufferStorageEXT gave undefined results.
2005-10-08 14:41:57 +00:00
Brian Paul
23803bd5fb updates from trunk 2005-10-08 14:39:35 +00:00
Brian Paul
c000250504 fix renderbuffer, point size bugs 2005-10-07 03:57:04 +00:00
Brian Paul
b854297bab Fix a number of point size attenuation problems.
Move size clamping into the rasterization function.
2005-10-07 03:56:12 +00:00
Brian Paul
3c1b44ad55 fix byteswapping bug in _mesa_texstore_ycbcr() (Benjamin Herrenschmidt) 2005-10-05 13:35:50 +00:00
Brian Paul
bdab2cc216 added GL_INVALID_FRAMEBUFFER_OPERATION_EXT to gluErrorString() 2005-10-05 02:08:30 +00:00
Brian Paul
91ade9ad68 check if deleting currently bound frame/renderbuffer object 2005-10-04 16:01:15 +00:00
Brian Paul
7355bbce55 fix behaviour of glIsFrame/Renderbuffer() 2005-10-04 15:03:08 +00:00
Adam Jackson
1d2671e6cb Bug #1155: Define IEEE_ONE on Super-H as well. 2005-10-03 20:01:28 +00:00
Brian Paul
0a405dcc5f added glReadPixels / texture renderbuffer fix 2005-10-03 16:12:51 +00:00
Brian Paul
b210ffaadf disable a warning 2005-10-03 16:10:35 +00:00
Brian Paul
b1e8471898 added a few calls to _mesa_update_framebuffer_visual() 2005-10-03 16:10:21 +00:00
Brian Paul
aefe0dabec finish up some missing code 2005-10-03 16:10:02 +00:00
Ian Romanick
758c5b9a7e Change the 'count' for COMPRESSED_TEXTURE_FORMATS from "?" to "-1". This
signals to the script (glX_proto_size.py) that generates the server-side
size functions that a handcoded query is needed to determine the data size.

Also do s/FOG_COORD_SOURCE/FOG_COORD_SRC/.

When initializing the count in glx_enum::__init__, cast the local property
to int.  Thanks to Python's dynamic typing, if this isn't done the type of
stored count will be a string instead of an int.
2005-10-03 15:05:53 +00:00
Ian Romanick
44db6d7cb8 Remove the non-existant --get-alias-set option from the help text.
Update printPixelFunction (which is only used to generate code for the
server-side) to use the correct method for obtaining the dimensions of the
image parameter to a function.

Only use byteswap.h when building generated code on Linux.  Elsewhere use
the (horrible!) macros from X11/misc.h.

Make sure that enums associated with the generic "Get" function get applied
to GetIntegerv, GetBooleanv, GetFloatv, and GetDoublev.
2005-10-03 14:59:35 +00:00
Brian Paul
04f1fdc755 use fmod() to prevent overflow of angle variable 2005-09-30 15:03:54 +00:00
Brian Paul
b181773d02 call glFinish if drawing to front buffer 2005-09-29 18:46:46 +00:00
Brian Paul
4218cddfb1 add error checks for framebuffer completeness 2005-09-28 16:20:47 +00:00
Brian Paul
a4e35c21d2 check for framebuffer completeness, code clean-up 2005-09-28 15:46:13 +00:00
Brian Paul
5d63323d34 tweak glAccum error checking 2005-09-27 16:10:36 +00:00
Brian Paul
419a350499 remove previous accum buffer fix, the error was already detected 2005-09-27 16:10:07 +00:00
Brian Paul
db78ec7018 added glAccum / GL_INVALID_OPERATION fix 2005-09-27 15:53:34 +00:00
Brian Paul
291911aeb5 generate GL_INVALID_OPERATION in glAccum if read/draw buffers aren't the same 2005-09-27 15:52:19 +00:00
Brian Paul
e15a7d4883 added glDraw/CopyPixels stencil mask fix 2005-09-26 23:07:01 +00:00
Brian Paul
2e95fdc5d8 glDraw/CopyPixels of stencil data didn't obey the stencil write mask. Fixed. 2005-09-26 23:05:33 +00:00
Ian Romanick
6e03f6ed43 Update VERSIONS with recent commit (e.g., "Enable
GL_ARB_texture_mirrored_repeat on Savage4.")
2005-09-26 22:07:46 +00:00
Ian Romanick
97790948f6 Enable GL_ARB_texture_mirrored_repeat on Savage4. Refactor the code that
sets the texture wrap mode and texture filter mode for Savage4 to the new
functions savage4_set_wrap_mode and savage4_set_filter_mode.

This was tested with texwrap and tunnel.
2005-09-26 22:01:32 +00:00
Brian Paul
a882648023 Added XMesaDrawable to xmesa_renderbuffer. Use it in a few places instead
of the XMesaPixmap field to avoid some X server-side issues with casting.
2005-09-26 00:36:44 +00:00
Brian Paul
b7f8d69bb3 added XOR line function 2005-09-23 13:50:46 +00:00
Brian Paul
5bad790e56 fast xor line function from trunk 2005-09-23 13:49:06 +00:00
Brian Paul
382b00f483 added clipped glReadPixels fix 2005-09-23 02:19:49 +00:00
Brian Paul
718bd385ed fix clipped glReadPixels bug 2005-09-23 02:16:20 +00:00
Brian Paul
402ca8903f added alpha renderbuffer memory corruption fix 2005-09-23 01:43:13 +00:00
Brian Paul
25a9c9f370 Bring in gl_renderbuffer wrapping fix from trunk. 2005-09-23 01:27:07 +00:00
Brian Paul
d73a838f01 fix glGetTexLevelParameter GL_TEXTURE_DEPTH_SIZE_ARB query 2005-09-21 21:21:28 +00:00
Brian Paul
c72b2fb2db s/GL_DEPTH_BITS/GL_TEXTURE_DEPTH_SIZE_ARB/ in _mesa_GetTexLevelParameteriv() 2005-09-21 21:19:07 +00:00
Brian Paul
5a6ce051ef remove some old debug code 2005-09-21 02:48:27 +00:00
Brian Paul
e7c2fa9cff fix potential renderbuffer GetValues segfault 2005-09-16 21:16:58 +00:00
Brian Paul
5919aec5c3 Fix potential segfault when trying to read pixels outside renderbuffer bounds.
Use _swrast_get_values() which does clipping.
2005-09-16 21:15:02 +00:00
Brian Paul
f5a6175d83 update like for MD2 viewer 2005-09-13 18:18:39 +00:00
Brian Paul
e41ea35fee print version with debug info 2005-09-13 14:49:37 +00:00
Brian Paul
38cf2b14f4 fix FreeBSD problem (bug 4435) 2005-09-13 13:37:11 +00:00
Brian Paul
66725dca81 bunch of updates 2005-09-10 16:57:46 +00:00
Brian Paul
59ad040754 separate GLUT tarball 2005-09-10 16:55:52 +00:00
Brian Paul
5e16f314d6 put GLUT sources into a separate tarball 2005-09-10 16:53:57 +00:00
Roland Scheidegger
2376438410 add _tnl_arb_vertex_program_stage to all drivers which already have _tnl_vertex_program_stage. Fixes crashes when using vertex programs. Tested on r200 only (fix by Keith Whitwell) 2005-09-09 23:30:51 +00:00
Brian Paul
1be13df2c3 fix bug 4395, fix glBitmap/glCopy/DrawPixels selection bug 2005-09-09 16:42:29 +00:00
Brian Paul
1f6892527b don't generate selection hits for glBitmap, glDraw/CopyPixels. Misc clean-ups 2005-09-09 16:41:02 +00:00
Roland Scheidegger
e5f6f26c87 fix wrong fallback bit being set when ARB_vertex_program is enabled. Add missing fallback string for ARB_vertex_program. Disable ARB_vertex_program by default (just plain doesn't work). In fact, maybe it should be thrown out altogether in this branch? 2005-09-09 12:50:20 +00:00
Brian Paul
e14b3baca0 check for either GL_ARB_depth_texture or GL_SGIX_depth_texture in a few places 2005-09-08 15:28:58 +00:00
Brian Paul
5eb129de76 fix precision problem in depth clearing (bug 4395) 2005-09-08 13:55:34 +00:00
Brian Paul
3f27b6ffeb fudge set_component_sizes() a bit, see comments 2005-09-03 17:33:55 +00:00
Brian Paul
270572e543 prepare 6.4 release notes 2005-09-01 02:54:58 +00:00
Dave Airlie
7b56e1a443 port over fix from unstable branch to fix miniglx 2005-08-31 01:25:24 +00:00
Alan Hourihane
cfaac5dc4f drmUnmap correct size 2005-08-30 20:38:03 +00:00
Alan Hourihane
1e5c3e977f move via_dri.h to server as when X is building it's pulled from the DDX. 2005-08-30 19:44:35 +00:00
Alan Hourihane
831b4143f7 define Bool for solo builds 2005-08-30 19:22:04 +00:00
Alan Hourihane
b26b565f91 Fixes from https://bugs.freedesktop.org/attachment.cgi?id=3077 2005-08-30 19:15:04 +00:00
Brian Paul
f4d1dafc18 fix APP_LIB_DEPS 2005-08-29 22:46:55 +00:00
Alan Hourihane
db70c3f9b6 remove drmAddress 2005-08-29 15:26:57 +00:00
Brian Paul
384b1d03e4 added note about IEEE vs VAX floating point (bug 4270) 2005-08-29 14:45:37 +00:00
Brian Paul
e3c1b594ae fix bugs 4242 and 4270 2005-08-28 17:31:06 +00:00
Brian Paul
453eb90128 fix a few proxy color table bugs (bug 4270) 2005-08-28 17:12:15 +00:00
Adam Jackson
cb505bf744 /dri/msg 2005-08-26 17:52:25 +00:00
Alan Hourihane
133112c71a fix the scripts for cygwin & mingw changes 2005-08-26 09:38:23 +00:00
Brian Paul
a66eebc579 fix comment and #if test 2005-08-25 22:10:29 +00:00
Brian Paul
89ea47182d don't compile debug code (bug 4242: rand undefined) 2005-08-25 19:43:54 +00:00
Alan Hourihane
2efe639f26 fix build problems on cygwin & mingw 2005-08-25 18:17:59 +00:00
Brian Paul
39e4095560 added glXCreatePbuffer fix, bug 4235 2005-08-25 14:09:23 +00:00
Brian Paul
b19ec5009f fix segfault in Fake_glXCreatePBuffer(), bug 4235 2005-08-25 14:07:40 +00:00
Brian Paul
afed3e55ba fix bugs 4207, 4237 2005-08-25 13:20:49 +00:00
Brian Paul
46cf4fa1bd s/GLX_RGBA_BIT/GLX_RGBA_TYPE/ (bug 4237) 2005-08-25 13:19:13 +00:00
Brian Paul
b4198e821a added bordered texture sampling bug fix 2005-08-25 03:08:12 +00:00
Brian Paul
5a1fb7db0e also check for texture border in sample_linear_2d() 2005-08-25 03:03:32 +00:00
Dave Airlie
f16fbf03bd fix miniglx for new event size check in the drivers 2005-08-24 05:03:03 +00:00
Brian Paul
ec0c42a3be GLw demo doesn't belong here 2005-08-23 14:49:30 +00:00
Brian Paul
a4c1895d07 added tarball fix 2005-08-23 13:42:44 +00:00
Brian Paul
b2971358ad removed lines that caused some files to be included in tarballs multiple times 2005-08-23 13:40:43 +00:00
Brian Paul
24a36c26fa set version to 6.4 2005-08-23 00:46:43 +00:00
Brian Paul
247e27d0b8 first fix for 6.4: GLX_X_RENDERABLE in glXChooseFBConfig 2005-08-22 14:30:11 +00:00
Brian Paul
912bcb2386 added .S DRI files to tarball (Donnie Berkholz), bumped version to 6.4 2005-08-22 14:29:38 +00:00
Brian Paul
cee416863f set version to 6.4 2005-08-22 14:29:17 +00:00
Brian Paul
8e946792dc added GL_X_RENDERABLE to glXChooseFBConfig (bug 4181) 2005-08-22 14:28:35 +00:00
Brian Paul
dfb6c56ed8 added GL_X_RENDERABLE to glXChooseFBConfig (bug 4181) 2005-08-22 14:28:19 +00:00
Brian Paul
dcf14aa3a7 bump version to 6.5 2005-08-22 14:27:33 +00:00
Brian Paul
1e71d6af48 added .S DRI files to tarball (Donnie Berkholz), bumped version to 6.5 2005-08-22 14:27:13 +00:00
Dave Airlie
298af7a609 fix up libdrm for egl 2005-08-21 03:17:52 +00:00
Brian Paul
ae27ef2219 fix typo 2005-08-19 23:44:35 +00:00
Brian Paul
f350e22716 md5 sums for 6.3.2 2005-08-19 23:42:29 +00:00
Brian Paul
eacd347fce update MESA_DEBUG with FP info 2005-08-19 23:34:10 +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
Brian Paul
b7c727e500 updates for 6.3.2 release, plus other assorted clean-ups 2005-08-19 16:57:50 +00:00
Alan Hourihane
d912f6cfe3 Commit missing piece from Egbert's 32/64 bit patches 2005-08-19 16:07:33 +00:00
Ian Romanick
f7eb54a12f Enable ARB_texture_compression. The code has been in place for a long time,
but, for whatever reason, the extension wasn't enabled.

Add some comments to i810ChooseTextureFormat.  There's some strangeness with
i810 texture formats.
2005-08-19 00:48:25 +00:00
Ian Romanick
e0029b33ef Add support for NV_blend_square. This was tested with
progs/tests/blendsquare.
2005-08-18 22:27:37 +00:00
Ian Romanick
ab5be2c5f7 Make sure extension entry point offsets are properly initialized. This is
primarilly needed to support functions that are internally implemented using
extension entry points (e.g., glBlendFunc uses glBlendFuncSeparate).
2005-08-18 22:16:46 +00:00
Ian Romanick
61ac29e7c6 Don't try to update hardware texture fields if there is no hardware texture.
This can happen when all the texture enables for a texture unit are disabled.

This fixes bugzilla #3195.
2005-08-18 20:01:01 +00:00
Ian Romanick
b462855c24 Add simple regression test for bugzilla #3195. 2005-08-18 19:52:44 +00:00
Ian Romanick
e918bac8cd Make the i810 driver use driGetRendererString like all the other drivers.
The GL_RENDERER string now accurately contains the chip name.  This was only
tested on a "plain" i810 (PCI ID 8086:7121).
2005-08-18 19:51:11 +00:00
Brian Paul
aa2a357bae Replace mult/div operators with bitwise operators in texel fetch routines
for better performance. (Roland Scheidegger)
2005-08-18 14:33:26 +00:00
Brian Paul
05fe2871e3 Bump version to 6.3.2 2005-08-16 23:13:25 +00:00
Brian Paul
926a19e108 updates for 6.3.2 2005-08-16 23:12:37 +00:00
Brian Paul
160b3284dd include stdint.h if WIN32 and GNUC (Colin Harrison). Patch forwarded to SGI. 2005-08-15 23:25:33 +00:00
Brian Paul
c2c2600728 test the standard stencil op modes too (Philipp Klaus Krause) 2005-08-15 22:57:30 +00:00
Roland Scheidegger
7a362deb8c In _mesa_TexEnvfv, do not accept values for GL_OPERAND2_ALPHA and GL_OPERAND2_RGB which are only valid with ARB_texture_env_combine but not with EXT_texture_env_combine, when only EXT_texture_env_combine is supported. 2005-08-15 18:24:12 +00:00
Ian Romanick
a3dd6efb00 Put back '-I/usr/X11R6/include'.
Make 'USING_EGL=0' the default for now.  It's causing too much confusion for
too many non-developers (which in turn wastes too much developer time).  It
is trivially overridden from the make command line.  See comments in
linux-dri.
2005-08-15 15:01:39 +00:00
Alan Hourihane
dabec11d27 Add Egberts fixes for 64bit architectures
Add additional checks for the *DRIRec info structure passed in from the
device driver. This ensures that things fallback to indirect rendering if
the DDX driver has had modifications (i.e. removal of the drmAddress field).
2005-08-15 06:59:24 +00:00
Alan Hourihane
69dc32cfac Add a check which compares the passed in size of the DDX driver private DRI
structure to the 3D drivers view of it, and abort if they don't match.

This traps the case with the drmAddress removal in the DDX driver.
2005-08-14 12:16:51 +00:00
Ian Romanick
33f9c98aa6 Enable support for EXT_stencil_wrap. The code was already there, but the
extension wasn't enabled.  I have verified its correct function with Mesa's
stencil_wrap test.  It is enabled on both Savage4 and Savage3D.  Since
Savage3D uses a software fallback for *all* stencil operations, this is safe.
2005-08-13 01:43:28 +00:00
Brian Paul
6fe7a0dc01 added FREXPF() macro (bug 4060) 2005-08-12 18:56:56 +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
fbcc5aedf2 Remove support for the R200_NO_VTXFMT environment variable. Instead use
'tcl_mode=1'.  This fixes bugzilla #3972.
2005-08-11 19:47:06 +00:00
Ian Romanick
4c4e4bfa4e Makefile cleanups suggested by George Fufutos (bugzilla #3899). 2005-08-11 19:37:55 +00:00
Ian Romanick
ac7c147aaf Don't link with libGL, libEGL, or libEGLdri. On EGL setups libGL isn't
available, and on libGL setups libEGL and libEGLdri aren't available.
2005-08-11 19:29:25 +00:00
Ian Romanick
b7ae3e4787 Since Brian's recent commit, "-I/usr/X11R6/include/X11/extensions" is no
longer needed.
2005-08-11 19:23:23 +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
ac887d4211 Make ffb driver build on x86-64. The fix is two fold. First, use the
proper DRM_CAS_RESULT to declare the variable used to store the result
of DRM_CAS.  Second, only use the "real" versions of LOCK_HARDWARE and
UNLOCK_HARDWARE on SPARC.  That's the only platform where the hardware
can really exist.
2005-08-11 04:25:36 +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
1b8d0f149e Mesa uses the glVertexAttrib*NV functions to implement fixed-function
attributes in display lists.  If a driver doesn't add entry points for
GL_NV_vertex_program, it will explode.  This patch adds GL_NV_vertex_program
to the list of default extensions whose entry points are added by
driInitExtensions.

Thanks go to Roland Scheidegger for tracking the problem down and suggesting
the fix.
2005-08-10 23:39:42 +00:00
Brian Paul
8c9cd63c89 the PIXEL_MAP_I_TO_I table should be GLfloat, not GLint 2005-08-10 17:04:03 +00:00
Brian Paul
63c9ebeaff fix static assertion problem for gcc (bug 4022) 2005-08-10 14:42:21 +00:00
Brian Paul
6b563bda43 disable the pointer size assertions (bug 4021) 2005-08-10 14:40:05 +00:00
Brian Paul
5d40169436 fix indentation 2005-08-10 14:38:39 +00:00
Keith Whitwell
738c9a073f Check for prim/vertex store non-null before messing with refcounts. 2005-08-10 14:13:45 +00:00
Ian Romanick
258f005c6b Add rules and target to build src/mesa/x86-64/glapi_x86-64.S. 2005-08-09 18:54:12 +00:00
Keith Whitwell
c91720fb1a Decrement the context's refcounts on part-used storage structs on
context destroy.  Fixes memory leak.
2005-08-09 16:11:28 +00:00
Brian Paul
d2e289c70f actually free the renderbuffer in xmesa_delete_renderbuffer(), fixes a memory leak 2005-08-09 15:17:19 +00:00
Brian Paul
e78a3c42e4 delete display lists upon exit 2005-08-09 15:14:51 +00:00
Brian Paul
a1a6fa2fa1 free display lists and destroy window upon exit 2005-08-09 15:13:32 +00:00
Brian Paul
ecde87054c _mesa_free_framebuffer_data() call frees the renderbuffers, no need to call the Delete methods after 2005-08-09 15:07:55 +00:00
Brian Paul
24d55a1145 free context structure (bug 1252316) and s/free/_mesa_free/ 2005-08-09 14:23:28 +00:00
Ian Romanick
aba4864a25 Make the linux-dri-x86 builds work on x86-64 again. mklib now
determines the bits (either 32 or 64) for libraries without the lib
prefix.  progs/egl/Makefile passes CFLAGS on the link commands so that
things like '-m32' get propagated.
2005-08-08 23:22:46 +00:00
Brian Paul
7bf08c23fd s/Disaptch/Dispatch/ (bug 3918) 2005-08-08 21:42:51 +00:00
Brian Paul
63dffa4e77 added directfbgl.h to tarball 2005-08-08 21:30:12 +00:00
Ian Romanick
da0c5b2e2c Since glcontextmodes.[ch] are no longer used in the DRI drivers, removed the
IN_DRI_DRIVER cruft.  This was suggested by George Fufutos.
2005-08-08 17:22:44 +00:00
Dave Airlie
0d942b740c fix up color tiling in miniglx radeon server code 2005-08-08 04:34:35 +00:00
Dave Airlie
ac54de021a fix miniglx setting virtual size of 832 for 800x600 2005-08-08 04:17:52 +00:00
Jon Smirl
ae4e58c9ab Remove platform specific bits from radeon_egl.c 2005-08-08 03:58:26 +00:00
Eric Anholt
81b3c5e85c Dike out the linux-specific EGL bits unless it's a linux build. 2005-08-08 03:27:28 +00:00
Eric Anholt
f1a261377f Since this isn't a bash script, don't use function and instead inline the usage
into the one place that it's used.
2005-08-08 03:26:18 +00:00
Vladimir Dergachev
8e653f12bc Allow R300 driver to build on x86-64 and PowerPC. 2005-08-07 21:50:33 +00:00
Jon Smirl
bf54a28384 Add missing egldri.h header file 2005-08-07 02:30:32 +00:00
Jon Smirl
9a4dbf1cff Fix up some of the sample to work with the r200 EGL driver 2005-08-07 02:15:27 +00:00
Jon Smirl
7e5da5d526 Enable EGL support in 'linux-dri' config 2005-08-07 02:13:14 +00:00
Vladimir Dergachev
94a4eb1e78 Follow suggestion by Aapo Tahkola to fix giant memory leak from forgetting to free the key when entry was already found (presumably a common case). 2005-08-06 05:19:42 +00:00
Vladimir Dergachev
b8731903df Fix card_extensions by following corresponding r200 code.
Fix suggested by Ian Romanick.
R300 driver now works without segfault.
2005-08-06 04:39:27 +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
6965f2cb0a Fixes bugzillla #812.
The weak version of _glapi_DispatchTSD was removed from dri_util.c.  As
stated in the bug report, this was only needed to support versions of libGL
that did not have this symbol.  Versions of libGL without this symbol are no
longer supported at all, so it is totally irrelevant.
2005-08-05 22:12:49 +00:00
Alan Hourihane
928218a283 remove the drmAddress 2005-08-05 20:47:59 +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
126c89e35f Fix recent problems with display lists and other parts of the code.
CALL_by_offset, SET_by_offset, and GET_by_offset all had various problems.

The core issue is that parts of the device-independent code in Mesa assumes
that all functions have slots in the dispatch table.  This is especially
true in the display list code.  It will merrilly try to set dispatch
pointers for glVertexAttrib1fARB even if GL_ARB_vertex_program is not
supported.  When the GET/SET/CALL macros are invoked, they would read a 0
from the remap table.  The problem is that 0 is the dispatch offset for
glNewList!

One change is that the remap table is now initialized to be full of -1
values.  In addtion, all of the *_by_offset marcos misbehave in an obvious
way if the specified offset is -1.  SET_by_offset will do nothing,
GET_by_offset will return NULL, and CALL_by_offset, since it uses
GET_by_offset, will segfault.

I also had to add GL_EXT_blend_func_separate to the list of default
extensions in all_mesa_extensions (src/mesa/drivers/dri/common/utils.c).
Even though many drivers do not export this extension, glBlendFunc is
internally implemented by calling glBlendFuncSeparate.  Without this
addition, glBlendFunc stopped working on drivers (such as mga) that do not
export GL_EXT_blend_func_separate.

There are still a few assertions / crashes in GL_ARB_vertex_program tests,
but I don't think that these are related to any of my changes.
2005-08-05 18:13:37 +00:00
Jon Smirl
33f5e47faf Remove EGL from linux-solo makefile 2005-08-05 03:48:15 +00:00
Jon Smirl
485528f2ac More EGL prep. No impact on anything outside of EGL 2005-08-05 03:33:59 +00:00
Jon Smirl
b507bd4160 New files for radeon egl driver.
Still a work in progress.
2005-08-04 22:23:34 +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
Dave Airlie
7f5925d57c Add color tiling support to miniglx for radeon
(Stephane Marchesin + Dave Airlie)
2005-08-03 10:22:31 +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
Jon Smirl
4508bcc72c Leave the AGP_BASE code in. It is pointless to bump the interface
for X on a miniglx fix. It can be removed later.
2005-07-29 16:53:02 +00:00
Jon Smirl
a7d4bfed8a Remove OUTREG(RADEON_AGP_BASE, info->ringHandle); from DRI driver
Code is already in DRM driver to do this.
2005-07-29 13:58:22 +00:00
Jon Smirl
4ce390b933 Commit Ian's fixes from Bug 3877
I have tested these on miniglx and they seem to be working.
I'm sure Dave will give them a better test.
2005-07-29 00:48:12 +00:00
Jon Smirl
df68d11b47 Fix a == vs !- typo for glx_enable_extension 2005-07-29 00:19:36 +00:00
Ian Romanick
82e3ecf413 Use the routines supplied in the __DRIinterfaceMethods structure to create a
destroy __GLcontextModes structures.  This eliminates the need for DRI
drivers to ever link with glcontextmodes.c.
2005-07-28 23:33:18 +00:00
Ian Romanick
f7c9eafa85 glxEnableExtension is a platform-specific function exported by the loader.
Therefore, drivers should not require it to run.
2005-07-28 21:57:17 +00:00
Ian Romanick
68679d2b9e Remove '#if 0' block that was accidentally left in. 2005-07-28 20:55:26 +00:00
Brian Paul
960467443e SPARC, DRI interface changes for 6.3.1 2005-07-28 02:46:26 +00:00
Ian Romanick
14fa5f6a60 The dri/*/depend files don't exist on a raw check-out, and that makes 'make
tarballs' have issues.
2005-07-28 01:15:45 +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
9f23a3a1bf Fix SPARC assembly for 64-bit
- The test for whether or not we're building for 64-bit is '#ifdef __arch64__'.
 This appears to be correct on both Linux and Solaris.

- The test for Solaris is now '#if defined(SVR4) || defined(__SVR4) ||
defined(__svr4__)'.  GCC 3.4.0 has all three defined on Solaris 9.

- Enables assembly language clip routines.

- Fixes to make GLSL code build on Solaris.

- Update gl_SPARC_asm.py.
2005-07-28 00:11:10 +00:00
Philippe Houdoin
3e36986e5a This precious BeOS include file was lost since some released MesaLibs. Fixed. ;-) 2005-07-27 19:56:33 +00:00
Roland Scheidegger
67d94e5a86 test for the proper drm version, at least 1.17 is required 2005-07-27 18:21:34 +00:00
Alan Hourihane
a7df74ea02 typo 2005-07-26 23:09:50 +00:00
Alan Hourihane
36d6e9df16 support GLX_DIRECT_COLOR in 1.4.0 2005-07-26 23:06:10 +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
Alan Hourihane
1361398600 Bump the required ddx to 1.4.0 as drmAddress has been removed so that 32/64bit
combinations work.
2005-07-26 21:53:16 +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
1201348a33 improve comments about win[0..3] values (bug 2554) 2005-07-26 01:04:53 +00:00
Brian Paul
800c72ae61 Fix bug 1858 - array subscript out of range in gamma driver.
Set ctx->Const.MaxTextureLevels = GAMMA_TEX_MAXLEVELS = 12
Remove bogus WRITE(level 12).
Max gamma texture size is 2kx2k  (note: 2k = 1 << (MaxLevels - 1))
2005-07-26 00:10:53 +00:00
Brian Paul
7c1ab40898 Add license/copyright.
Add -h/--help option for usage.
Minor clean-ups.
2005-07-25 23:49:50 +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
Brian Paul
3e2419a7cc Break the long list of MAIN_FILES and DEMO_FILES into subgroups.
rm/touch the depend files when making tarballs so they don't include
RedHat-specific paths (bug 3842).
2005-07-22 15:52:46 +00:00
Jouk Jansen
70cf1f0cf8 ----------------------------------------------------------------------
Committing in .

 _mesa_sprintf crashes on OpenVMS -> replaced it by the OS-supplied sprintf

 Modified Files:
 	Mesa/src/mesa/drivers/x11/fakeglx.c
 ----------------------------------------------------------------------
2005-07-22 09:30:54 +00:00
Brian Paul
60a6a0eb51 some GLuint idx -> GLint idx changes 2005-07-22 02:55:36 +00:00
Brian Paul
fea5a428e9 added vp negative addressing bug fix 2005-07-22 02:54:14 +00:00
Brian Paul
61e694f270 Make the vertex program source register Index field a signed int since
relative addressing can be negative.
Change some GLuint indexes to GLint in the t_vp_build.c file.
Added PROGRAM_UNDEFINED token for initializing the register File field to
avoid a gcc 4.0 warning.
2005-07-22 02:53:38 +00:00
Brian Paul
db251d72c8 bump version to 6.3.1 2005-07-21 18:46:49 +00:00
Brian Paul
7a37189adc 6.3.1 updates 2005-07-21 18:45:54 +00:00
Brian Paul
f87bb14b0b updated with DRI building instructions 2005-07-21 18:45:44 +00:00
Brian Paul
dff11bb9a8 bump version to 6.3.1 and include DRI/GLX files in tarballs 2005-07-21 18:44:52 +00:00
Brian Paul
98b06bcbeb make i810PrintSetupFlags() static, first param const 2005-07-21 18:11:24 +00:00
Brian Paul
7b5c506c0e first 6.3.1 bug fixes 2005-07-21 15:58:16 +00:00
Brian Paul
7cf480e6fe s/2004/2005/ 2005-07-21 15:57:29 +00:00
Brian Paul
951dbf08e7 check for FEATURE_EXT_framebuffer_object to enable EXT_framebuffer_object 2005-07-21 15:48:39 +00:00
Brian Paul
49e74989c3 remove ^M chars, disable shading language extensions 2005-07-21 15:41:56 +00:00
Eric Anholt
3e8efc3753 Clean up warnings in r300 code by making some symbols static, adding prototypes
for others, and being cleaner with types in fragment/vertex program structures.
One warning in r300_shader.c is still concerning.
2005-07-20 23:24:55 +00:00
Eric Anholt
aeb0ee771b Connect the r300 bits up to the build. 2005-07-20 22:08:06 +00:00
Eric Anholt
6ae76788a7 Add some missing defines, copied from linux-dri. 2005-07-20 22:07:29 +00:00
Eric Anholt
e98494d0a4 Forced commit to note repocopy from r300.sf.net CVS. 2005-07-20 21:35:27 +00:00
Brian Paul
18014525a1 fix some URLs 2005-07-20 18:25:01 +00:00
Brian Paul
2276679c53 added md5 checksums for 6.3 2005-07-20 18:20:45 +00:00
Brian Paul
d4596584f6 more updates for 6.3 release 2005-07-20 18:07:11 +00:00
Brian Paul
6bb49eacfd updates for 6.3 release 2005-07-19 21:01:46 +00:00
Brian Paul
bfb5ea307e replace fprintf() calls with _mesa_problem() 2005-07-19 18:20:04 +00:00
Brian Paul
364ae78e69 remove fprintf() 2005-07-19 18:18:49 +00:00
Brian Paul
8d7d9c22f6 include driverfuncs.h 2005-07-19 15:34:44 +00:00
Brian Paul
2d47c07398 overlay planes test 2005-07-19 15:27:03 +00:00
Brian Paul
7e152b83cb s/clippping/clipping/ 2005-07-18 20:07:19 +00:00
Philippe Houdoin
ed886336e1 Fixed warnings by using GLUTProc type instead of anonymous (void *) for
GLUT callbacks.
2005-07-18 19:27:49 +00:00
Alan Hourihane
5343ae8304 re-enable the ffb driver 2005-07-18 13:53:03 +00:00
Alan Hourihane
df88dfe1df Fix the FFB driver for the renderbuffer changes
Support NEW INTERFACE as well
2005-07-18 13:52:34 +00:00
Alan Hourihane
c235a96a71 pass in the renderbuffer 2005-07-18 13:50:06 +00:00
Ian Romanick
aa8ff1e75d Missed this on the previous commit. 2005-07-18 12:33:03 +00:00
Ian Romanick
9bdfee3a47 Wrap every place that accesses a dispatch table with a macro. A new script-
generated file, called src/mesa/glapi/dispatch.h, is added.  This file
contains three macros for each API function.  It contains a GET, a SET, and
a CALL.  Each of the macros take a pointer to the context and a pointer to
the dispatch table.

In several threads on mesa3d-dev we discussed replacing _glapi_add_entrypoint
with a new function called _glapi_add_dispatch.  For this discussion, the
important difference between the two is that the caller of _glapi_add_dispatch
does *not* know what the dispatch offset will be at compile time.  Because of
this callers need to track the dispatch offset returned by
_glapi_add_dispatch.

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

The downside is that driver code then has to access the dispatch table two
different ways.  It accesses it using structure tags (e.g., exec->Begin) for
functions with fixed offsets and via a remap table (e.g., exec[
remap->NewExtensionFunction ]) for functions without fixed offsets. Yuck!

Using the macros allows both types of functions to be accessed
identically.  If a driver needs to set a pointer for Begin, it does
'SET_Begin(ctx, exec, my_begin_function)'.  If it needs to set a pointer
for NewExtensionFunction, it does 'SET_NewExtensionFunction(ctx, exec,
my_NewExtensionFunction_function)'.  Furthermore, if at some point in
the future a static offset is assigned for NewExtensionFunction, only
the macros need to change (instead of every single place that accesses a
table for that function).

This code differs slightly from the originally posted patches in that the
CALL, GET, and SET marcos no longer take a context pointer as a parameter.
Brian Paul had suggested that the remap table could be stored as a global
since it would be set at CreateScreen time and would be constant for all
contexts.  This change reflects that feedback.

http://marc.theaimsgroup.com/?t=112087194700001&r=1&w=2
2005-07-18 12:31:24 +00:00
Adam Jackson
e0e993c5ff XMesaResizeBuffers needs separate paths for client and server builds 2005-07-16 04:02:05 +00:00
Adam Jackson
c529f6bf70 strip out vestigial #ifdef HAVE_CONFIG_H stanzas, they're confusing the
modular X build
2005-07-16 00:56:20 +00:00
Brian Paul
8d3aca655e disable call to via_sse_memcpy() until it's fixed 2005-07-15 23:13:46 +00:00
Brian Paul
1f88391747 need to flush vertices for GL_OCCLUSION_TEST_RESULT_HP query 2005-07-15 23:08:06 +00:00
Brian Paul
d39760d718 Check for null program->Parameters pointer in validate_vertex_program().
GL_NV_vertex_program programs can't directly reference GL state so this
pointer is always NULL.
2005-07-15 22:48:09 +00:00
Brian Paul
df0350b7ec added comments 2005-07-15 22:47:00 +00:00
Brian Paul
b0489d4f82 remove duplicate "User disable" string 2005-07-15 20:17:02 +00:00
Brian Paul
8ec981c469 redo previous check-in, just set ARCH_FLAGS = -m32 2005-07-15 14:31:31 +00:00
Brian Paul
4eb3a0f076 define CFLAGS and CXXflags with -m32 (Egbert Eich) 2005-07-15 13:58:58 +00:00
Brian Paul
4c72778251 replace gcc with $(CC) (Egbert Eich) 2005-07-15 13:55:20 +00:00
Brian Paul
badad72383 eglgears demo (Dane Rushton) 2005-07-14 23:16:41 +00:00
Brian Paul
c62c24c72f added a few more fallbackStrings (Andreas Stenglein) 2005-07-14 23:10:21 +00:00
Keith Whitwell
b127cfeb7a Use the LDEXPF wrapper macro. 2005-07-13 17:49:22 +00:00
Keith Whitwell
3f7cb794ea Add a LDEXPF wrapper macro. 2005-07-13 17:47:40 +00:00
Keith Whitwell
c472dcdac0 Wrap RESTORE_FPU/RND_NEG_FPU declarations with check for USE_SSE_ASM. 2005-07-13 13:50:31 +00:00
Keith Whitwell
ce721143b4 Cache texenv programs to avoid repeated compilation (Ben Skeggs) 2005-07-11 10:10:38 +00:00
Keith Whitwell
9311bc253e Add runtime compiled x87 implementations for most of the remaining
opcodes.  When enabled via environment vars, gears runs and almost
looks right but other apps are still quite buggy.
2005-07-10 11:23:10 +00:00
Keith Whitwell
0cfbd849ec Add lots of x87 fpu instructions. 2005-07-10 11:14:00 +00:00
Ian Romanick
6d5d1f8a41 Restore linux-x86-32 config for Brian. 2005-07-08 21:55:56 +00:00
Ian Romanick
38e2fa385d Put back the glPopMatrix. This test was derived from blendminmax.c.
When extra code was cut from blendminmax.c's Display function, the
glPopMatrix call was also accidentally cut.
2005-07-07 20:43:01 +00:00
Ian Romanick
2550844c6e Correct the comments in the file headers. Oops. 2005-07-07 19:35:30 +00:00
Ian Romanick
259f096ed8 Add regression test for bug #3101. 2005-07-07 19:34:06 +00:00
Roland Scheidegger
f3186e5789 Re-enable r200InitSpanFuncs, which was ifdefed out (probably by mistake?),
so r200SetBuffer, r200SpanRenderStart and r200SpanRenderFinish get called again.
Bugzilla #3705, #3706.
2005-07-06 12:49:46 +00:00
Brian Paul
4cf6718725 The old MESA_PBUFFER_ALLOC() function allocated memory on 512-byte boundaries.
Restore that behavior with new _mesa_alloc_texmemory() function.
Should fix via_sse_memcpy() problem in found with flightgear.
2005-07-05 14:13:42 +00:00
Jon Smirl
78be0b5dad Put default back to the normal DRM path 2005-07-02 21:28:01 +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
1a9cac10b8 linux-x86-32 is unnecessary. The same thing can be acomplished by
'make linux-x86 ARCH_FLAGS=-m32'.
2005-07-02 07:48:41 +00:00
Ian Romanick
9204e87b2e Massive refactor of (most of) the Linux config files. This reduces
the length of each config and brings a lot of much needed uniformity
to them.
2005-07-02 07:38:40 +00:00
Ian Romanick
4f178c6e3a Add $(CFLAGS) to the link commands. This makes 'make linux-x86
ARCH_FLAGS=-m32' work correctly on x86-64 systems.
2005-07-02 07:12:44 +00:00
Ian Romanick
ef2ce9d003 Make linux-x86 more like the other linux configs. 2005-07-02 07:11:54 +00:00
Vladimir Dergachev
c1c684b0f3 Expose the fact that we do not do either selection of feedback buffers - either with software or hardware rendering. 2005-07-02 01:09:10 +00:00
Jerome Glisse
666dcaaf05 Adding RV350_NJ ID. 2005-07-01 21:26:43 +00:00
Jerome Glisse
7b12220256 Adapt extension string to new GL dispatch schema proposed
by Idr. This  patch is based on Idr patch to radeon driver.
Change #if 1 to #if 0 (r300_context.c:l69) for old dispatch
tab.
2005-07-01 21:22:05 +00:00
Karl Schultz
5f79d27b82 Update notes with VC7 info. 2005-07-01 21:08:00 +00:00
Karl Schultz
c136b41b09 Add windows VC7 project files to filelist for tar/zip files. 2005-07-01 20:31:41 +00:00
Karl Schultz
ee850657e6 VC7 project file for building glut lib 2005-07-01 20:25:57 +00:00
Karl Schultz
0cf67634bb VC7 project file for gears demo 2005-07-01 20:25:23 +00:00
Karl Schultz
101d05ad94 VC7 Solution file for building glut and demos 2005-07-01 20:24:49 +00:00
Karl Schultz
c5b6580c6f VC7 project file for osmesa 2005-07-01 20:23:52 +00:00
Karl Schultz
35a11c14ee VC7 project file for core mesa lib 2005-07-01 20:23:23 +00:00
Karl Schultz
ec171b7d02 VC7 project file for glu 2005-07-01 20:22:41 +00:00
Karl Schultz
2de5f6e252 VC7 project file for gdi driver 2005-07-01 20:21:45 +00:00
Karl Schultz
b64d60a2a6 Visual Studio 7 solution file for mesa lib 2005-07-01 20:19:47 +00:00
Karl Schultz
eac7688231 Don't #define __FUNCTION__ on a Microsoft C compiler new enough to have it. 2005-07-01 20:11:46 +00:00
Keith Whitwell
219f3c4489 Set fp->Opcode for OP_TEX_KILL case, fix from Ben Skeggs. 2005-07-01 17:12:29 +00:00
Karl Schultz
06abb854f0 Add new files to project. 2005-07-01 15:59:33 +00:00
Karl Schultz
7fe8696d01 Use frexp on Windows; frexpf is not available. 2005-07-01 15:58:02 +00:00
Karl Schultz
9b56781986 Fix a prototype 2005-07-01 15:56:14 +00:00
Roland Scheidegger
758f334717 convert sis and radeon driver to use spantmp2 instead of spantmp template. Remove old (pre-renderbuffer) span code instead of converting that too. Remove this old code from mach64 (the dead code was not fully converted to spantmp2 previously) too. 2005-07-01 11:28:14 +00:00
Brian Paul
8e8fa63cb4 comment-out some unused code to silence warnings 2005-07-01 02:03:33 +00:00
Brian Paul
559c494fc8 replace some free() calls with _mesa_free() 2005-07-01 02:03:00 +00:00
Brian Paul
03f52fea63 updates to file list for tarballs 2005-07-01 01:55:30 +00:00
Brian Paul
6d3284efd4 fix dependencies 2005-07-01 01:54:38 +00:00
Brian Paul
58a9573b08 added some glGetRenderbufferParameterivEXT calls, printfs, and assertions 2005-07-01 01:34:29 +00:00
Brian Paul
0d34c0158d fix typo in assertions 2005-07-01 01:30:03 +00:00
Brian Paul
f4f1c29597 Move the PYTHON2 and PYTHON_FLAGS assignments to configs/current, and
include $(TOP)/configs/current in glapi/Makefile so those vars can be
easily overridden by any system config, if needed.
2005-07-01 01:27:00 +00:00
Brian Paul
bb5c84fcbc Remove NEW_RENDERBUFFER stuff.
Now, OLD_RENDERBUFFER marks code that needs to eventually be removed when
all the drivers are updated to no longer need the SetBuffer() function.
2005-07-01 01:22:25 +00:00
Brian Paul
446e258940 remove OLD_RENDERBUFFER code 2005-07-01 01:10:36 +00:00
Brian Paul
54fb9226e4 remove OLD_RENDERBUFFER stuff 2005-07-01 01:08:29 +00:00
Brian Paul
30aea49cf6 minor fixes 2005-07-01 01:04:31 +00:00
Roland Scheidegger
cf5b2f7419 remove common macros used in the span functions of most drivers from the individual drivers and put them in common code. It is still possible for a driver to define its own macros if it has special needs. This affects CLIPPIXEL, CLIPSPAN, HW_CLIPLOOP, HW_ENDCLIPLOOP, and for drivers using the spantmp2 template also GET_SRC_PTR and GET_DST_PTR. 2005-07-01 00:08:46 +00:00
Ian Romanick
c212abf99a Replace add_newer_entrypoints (src/mesa/main/context.c) with
device-specific code.  A new Python script
(src/mesa/glapi/extension_helper.py) generates a list of all
entry-points for all known extensions.  Each driver the selects only
the extensions that it needs and enables the via either
driInitExtensions or driInitSingleExtension.

This code has been compile-tested on a drivers, but has only been
run-tested on mga and i915 (on i830 hardware).

These changes were discussed at length on the mesa3d-dev mailing list.

http://marc.theaimsgroup.com/?t=111947074700001&r=1&w=2
2005-06-30 16:00:48 +00:00
Brian Paul
1ac8ae446a remove \n from warning message string 2005-06-30 14:24:44 +00:00
Brian Paul
aa70253cbb added newline at end of file 2005-06-30 14:23:40 +00:00
Brian Paul
049e320f46 Add a set of predicate functions for testing matrices instead of directly
testing the flags field.
Move definition of all the MAT_FLAGs into the m_matrix.c file since they're
now private.
2005-06-30 14:22:23 +00:00
Brian Paul
f138b977d0 Redo all the GL_LINEAR interpolation code in terms of LERP macros/functions.
This cleans up and simplifies the arithmetic quite a bit.
2005-06-30 13:42:10 +00:00
Roland Scheidegger
4d652b7855 Fix crashes with pixel readback when using the optimized assembly functions.
Pixel count can be negative (this could be fixed elsewhere), so adapt the
functions to work with such inputs correctly (same behaviour as non-optimized
functions).
Bugzilla #2317
Submitted by idr
2005-06-30 11:42:56 +00:00
Aapo Tahkola
b0d62880e8 -"fix" page flipping
-use depth tiling if tiling is enabled
2005-06-30 04:37:19 +00:00
Brian Paul
0e55891674 fix a few glitches 2005-06-30 02:34:07 +00:00
Brian Paul
ccda2162f6 fix Darwin dynamic lib naming 2005-06-30 02:33:25 +00:00
Brian Paul
b6c0d753fa just code clean-ups and new comments 2005-06-28 03:48:08 +00:00
Vladimir Dergachev
ec17e7941a Uncomment a couple of helper functions.
Fix slipup from CVS update that was commented out and did not show up during compilation.
2005-06-27 18:46:31 +00:00
Vladimir Dergachev
b6c5116171 Rename unchecked state to match DRM driver.
Emit wait idle and pacify r300 before emitting state - this seems to improve stability.
2005-06-27 15:56:14 +00:00
Brian Paul
84f8d7aafb include t_vp_build.h 2005-06-27 00:45:36 +00:00
Brian Paul
39a488ed63 remove unused MEMSET16 macro 2005-06-27 00:39:33 +00:00
Brian Paul
2dbffb30f0 Get rid of the MESA_PBUFFER_ALLOC/FREE() macros.
If that stuff is still needed, lots of other updates are needed anyway.
Also, some misc MALLOC/FREE -> _mesa_malloc/free() changes.
2005-06-27 00:34:17 +00:00
Brian Paul
397088ff5e added _tnl_ProgramCacheDestroy() prototype 2005-06-27 00:30:56 +00:00
Brian Paul
c43f03e38d make create_new_program() static 2005-06-27 00:30:37 +00:00
Eric Anholt
3f9839a52b Fix crashes during rasterization fallback by avoiding _tnl_need_projected_coords
during fallbacks.  In one case, _swsetup_Wakeup had just been called, covering
the need there, and in the other case, we can simply exit the entire
radeonChooseVertexState function, knowing that it will be called again once we
leave the fallback.

Bugzilla #:	2516
Submitted by:	sroland
2005-06-26 21:57:23 +00:00
Eric Anholt
a4eb693b5f Remove the #if 0-ed out old span code. 2005-06-26 21:54:43 +00:00
Eric Anholt
32b898126e Explain the reason for TCL fallback when GL_SPHERE_MAP happens with
RADEON_DEBUG=fall.
2005-06-26 21:53:11 +00:00
Eric Anholt
3b817fde88 Zero out the ENGPACKET allocated on the stack, to avoid sending uninitialized
values to reserved fields on the card, resulting in all-black output and
sometimes hangs.

Submitted by:	Thomas Winischhofer
2005-06-26 21:02:58 +00:00
Brian Paul
845f2a7350 fix for-loop in _mesa_GetDouble to avoid out of bounds memory read 2005-06-26 20:08:23 +00:00
Brian Paul
f8582b6c1f check for null oldBuffer in _mesa_realloc(), cleaned up some comments 2005-06-26 19:57:17 +00:00
Brian Paul
394fd40a53 need parenthesis in realloc call 2005-06-26 19:53:52 +00:00
Ian Romanick
4e1aae6e0e Ignore files generated as part of the build process. 2005-06-24 18:54: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
Brian Paul
1c5caba184 Remove the xmesa_set_buffer() function. No longer needed since the
span functions pass in a gl_renderbuffer to indicate which color
buffer should be drawn into.  Optimized line/triangle routines are
smart enough to know which buffer to draw into as well.
The swrast->SetBuffer() routine should eventually be removed from
all drivers.
2005-06-23 15:09:32 +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
Nicolai Haehnle
f292e13a20 Back out the actual enabling of depth tiling.
Depth tiling breaks software fallbacks and depth buffer reads.
radeon_span.c **must** be updated for anything that is related to tiling.
2005-06-21 17:18:00 +00:00
Nicolai Haehnle
1e4744d2b9 Add PCI ID for R420 JI.
The driver appears to work reliably (i.e. lockup-free) with a card based
on this chip. However, I have not explored whether we could get anything
in terms of 3D performance "for free" just by setting some magic bits
in those registers that are still a mystery to us.
2005-06-21 17:03:29 +00:00
Aapo Tahkola
ebd99043ed r300 driver side of color tiling support. 2005-06-21 15:41:03 +00:00
Nicolai Haehnle
a5fb15cb87 Make sure texture base addresses are used correctly.
They are relative to the card's address space, not relative to fbLocation,
which will be important once we program MC_FB/AGP_LOCATION in the way
they are programmed on older Radeon chips.
2005-06-21 15:21:14 +00:00
Brian Paul
04f863e856 check for NULL swrast->Driver.SetBuffer before calling it 2005-06-21 14:39:43 +00:00
Brian Paul
23606a5704 updated to version 29 2005-06-21 14:30:46 +00:00
Brian Paul
90b40c33e7 include light.h to silence warning 2005-06-21 03:38:10 +00:00
Brian Paul
dc137ddb3f DirectFB updates (Claudio Ciccani) 2005-06-20 18:29:28 +00:00
Jeremy Kolb
a6a3e01b09 ran "make" after update to glX_proto_send.py. 2005-06-20 03:18:16 +00:00
Jeremy Kolb
4378dee78c Fixed some issues where XCB replies were being freed and data was not being copied. 2005-06-20 03:12:35 +00:00
Brian Paul
38332a6d94 Define __FUNCTION__ as a preprocessor symbol in glheader.h if we're not
using GCC or VMS.
2005-06-19 14:57:34 +00:00
Aapo Tahkola
4e7df27466 Fix gloss breakage when using hw tnl. 2005-06-16 11:57:45 +00:00
Aapo Tahkola
3c6f17be32 Use depth tiling. 2005-06-16 11:41:19 +00:00
Aapo Tahkola
af02907b4c Support 16-bit modes. 2005-06-16 10:40:39 +00:00
Aapo Tahkola
463c1d6c57 Fix problems with elts when immediate mode is on. 2005-06-16 10:27:04 +00:00
Aapo Tahkola
0e288e58ef Turn off VBO's. 2005-06-16 10:21:01 +00:00
Aapo Tahkola
3176f8e2e1 lost_context never gets reset. 2005-06-16 10:05:18 +00:00
Jon Smirl
6c2098ffd4 Fix a few compiler warnings 2005-06-16 04:25:45 +00:00
Jon Smirl
f445aaa67a Fix linux-solo build for mga check-in 2005-06-16 03:45:48 +00:00
Ian Romanick
aa26915472 Adds support for MGA DRM version 3.2.
This patch makes use of two of the new ioctls added in MGA DRM version
3.2.  Specifically, the DRM_MGA_SET_FENCE and DRM_MGA_WAIT_FENCE
ioctls are used in mgaWaitForFrameCompletion.  As a result the MMIO
register region and the primary DMA region are *not* mapped (if DRM
3.2 is available).

This patch does *not* make use of the new get_param query was added to
differentiate between G4x0 cards and G550 cards.  That is left to a
future update.

Xorg bug: 3259
Reviewed by: Eric Anholt
2005-06-14 22:51:44 +00:00
Jouk Jansen
fb818a0b11 Committing in .
OpenVMS updates

 Modified Files:
 	Mesa/src/mesa/tnl/descrip.mms Mesa/src/mesa/tnl/t_vp_build.c
 ----------------------------------------------------------------------
2005-06-14 10:27:05 +00:00
Jon Smirl
6b9d9c5039 fbSwapBuffers needs to return a status 2005-06-13 14:21:34 +00:00
Brian Paul
2d218885ec mingw changes (Nolan Leake) 2005-06-13 14:07:14 +00:00
Vladimir Dergachev
902e70875d Fixed typos. 2005-06-12 14:57:02 +00:00
Vladimir Dergachev
b675c48027 Add definition for memory controller latency registers.. 2005-06-10 16:10:50 +00:00
Keith Whitwell
4476978856 remove debug prints 2005-06-10 14:58:32 +00:00
Brian Paul
252d8e78cc be sure we have span texcoords before calling _swrast_texture_span() 2005-06-10 14:37:32 +00:00
Brian Paul
5d6ecf25f8 pass mask array to PutRowRGB() in simple_z_textured_triangle() 2005-06-10 14:36:55 +00:00
474 changed files with 66965 additions and 39498 deletions

225
Makefile
View File

@@ -89,6 +89,7 @@ linux-dri \
linux-dri-x86 \
linux-dri-x86-64 \
linux-dri-ppc \
linux-indirect \
linux-fbdev \
linux-glide \
linux-icc \
@@ -133,11 +134,12 @@ ultrix-gcc:
# Rules for making release tarballs
DIRECTORY = Mesa-6.3
LIB_NAME = MesaLib-6.3
DEMO_NAME = MesaDemos-6.3
DIRECTORY = Mesa-6.4.1
LIB_NAME = MesaLib-6.4.1
DEMO_NAME = MesaDemos-6.4.1
GLUT_NAME = MesaGLUT-6.4.1
LIB_FILES = \
MAIN_FILES = \
$(DIRECTORY)/Makefile* \
$(DIRECTORY)/descrip.mms \
$(DIRECTORY)/mms-config. \
@@ -151,8 +153,9 @@ LIB_FILES = \
$(DIRECTORY)/docs/VERSIONS \
$(DIRECTORY)/docs/*.spec \
$(DIRECTORY)/include/GL/internal/glcore.h \
$(DIRECTORY)/include/GL/dmesa.h \
$(DIRECTORY)/include/GL/amesa.h \
$(DIRECTORY)/include/GL/dmesa.h \
$(DIRECTORY)/include/GL/directfbgl.h \
$(DIRECTORY)/include/GL/fxmesa.h \
$(DIRECTORY)/include/GL/ggimesa.h \
$(DIRECTORY)/include/GL/gl.h \
@@ -173,6 +176,7 @@ LIB_FILES = \
$(DIRECTORY)/include/GL/xmesa.h \
$(DIRECTORY)/include/GL/xmesa_x.h \
$(DIRECTORY)/include/GL/xmesa_xf86.h \
$(DIRECTORY)/include/GLView.h \
$(DIRECTORY)/src/Makefile \
$(DIRECTORY)/src/descrip.mms \
$(DIRECTORY)/src/mesa/Makefile* \
@@ -210,10 +214,8 @@ LIB_FILES = \
$(DIRECTORY)/src/mesa/drivers/directfb/*.[ch] \
$(DIRECTORY)/src/mesa/drivers/directfb/Makefile \
$(DIRECTORY)/src/mesa/drivers/dos/*.[chS] \
$(DIRECTORY)/src/mesa/drivers/dri/common/*.[ch] \
$(DIRECTORY)/src/mesa/drivers/fbdev/glfbdev.c \
$(DIRECTORY)/src/mesa/drivers/glide/*.[ch] \
$(DIRECTORY)/src/mesa/drivers/glide/*.def \
$(DIRECTORY)/src/mesa/drivers/ggi/*.[ch] \
$(DIRECTORY)/src/mesa/drivers/ggi/ggimesa.conf.in \
$(DIRECTORY)/src/mesa/drivers/ggi/default/*.c \
@@ -230,10 +232,49 @@ LIB_FILES = \
$(DIRECTORY)/src/mesa/drivers/windows/*/*.def \
$(DIRECTORY)/src/mesa/drivers/x11/descrip.mms \
$(DIRECTORY)/src/mesa/drivers/x11/*.[ch] \
$(DIRECTORY)/src/mesa/ppc/*.[ch] \
$(DIRECTORY)/src/mesa/sparc/*.[chS] \
$(DIRECTORY)/src/mesa/x86/Makefile \
$(DIRECTORY)/src/mesa/x86/*.[ch] \
$(DIRECTORY)/src/mesa/x86/*.S \
$(DIRECTORY)/src/mesa/x86/rtasm/*.[ch] \
$(DIRECTORY)/src/mesa/x86-64/*.[chS] \
$(DIRECTORY)/src/mesa/x86-64/Makefile \
$(DIRECTORY)/progs/Makefile \
$(DIRECTORY)/progs/util/README \
$(DIRECTORY)/progs/util/*.[ch] \
$(DIRECTORY)/progs/util/sampleMakefile \
$(DIRECTORY)/vms/analyze_map.com \
$(DIRECTORY)/vms/xlib.opt \
$(DIRECTORY)/vms/xlib_share.opt \
$(DIRECTORY)/windows/VC6/mesa/gdi/gdi.dsp \
$(DIRECTORY)/windows/VC6/mesa/glu/*.txt \
$(DIRECTORY)/windows/VC6/mesa/glu/glu.dsp \
$(DIRECTORY)/windows/VC6/mesa/mesa.dsw \
$(DIRECTORY)/windows/VC6/mesa/mesa/mesa.dsp \
$(DIRECTORY)/windows/VC6/mesa/osmesa/osmesa.dsp \
$(DIRECTORY)/windows/VC7/mesa/gdi/gdi.vcproj \
$(DIRECTORY)/windows/VC7/mesa/glu/glu.vcproj \
$(DIRECTORY)/windows/VC7/mesa/mesa.sln \
$(DIRECTORY)/windows/VC7/mesa/mesa/mesa.vcproj \
$(DIRECTORY)/windows/VC7/mesa/osmesa/osmesa.vcproj
DRI_FILES = \
$(DIRECTORY)/include/GL/internal/dri_interface.h \
$(DIRECTORY)/include/GL/internal/sarea.h \
$(DIRECTORY)/src/glx/Makefile \
$(DIRECTORY)/src/glx/x11/Makefile \
$(DIRECTORY)/src/glx/x11/*.[ch] \
$(DIRECTORY)/src/mesa/drivers/dri/Makefile \
$(DIRECTORY)/src/mesa/drivers/dri/Makefile.template \
$(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.[ch] \
$(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.po \
$(DIRECTORY)/src/mesa/drivers/dri/*/*.[chS] \
$(DIRECTORY)/src/mesa/drivers/dri/*/Makefile \
$(DIRECTORY)/src/mesa/drivers/dri/*/Doxyfile \
$(DIRECTORY)/src/mesa/drivers/dri/*/server/*.[ch]
SGI_GLU_FILES = \
$(DIRECTORY)/src/glu/Makefile \
$(DIRECTORY)/src/glu/descrip.mms \
$(DIRECTORY)/src/glu/sgi/Makefile \
@@ -253,32 +294,53 @@ LIB_FILES = \
$(DIRECTORY)/src/glu/sgi/libtess/README \
$(DIRECTORY)/src/glu/sgi/libtess/alg-outline \
$(DIRECTORY)/src/glu/sgi/libtess/*.[ch] \
$(DIRECTORY)/src/glu/sgi/libutil/*.[ch] \
$(DIRECTORY)/src/glu/mesa/README[12] \
$(DIRECTORY)/src/glu/mesa/Makefile* \
$(DIRECTORY)/src/glu/mesa/descrip.mms \
$(DIRECTORY)/src/glu/mesa/mms_depend \
$(DIRECTORY)/src/glu/mesa/*.def \
$(DIRECTORY)/src/glu/mesa/depend \
$(DIRECTORY)/src/glu/mesa/*.[ch] \
$(DIRECTORY)/src/glw/*.[ch] \
$(DIRECTORY)/src/glw/Makefile* \
$(DIRECTORY)/src/glw/README \
$(DIRECTORY)/src/glw/depend \
$(DIRECTORY)/progs/Makefile \
$(DIRECTORY)/progs/util/README \
$(DIRECTORY)/progs/util/*.[ch] \
$(DIRECTORY)/progs/util/sampleMakefile \
$(DIRECTORY)/vms/analyze_map.com \
$(DIRECTORY)/vms/xlib.opt \
$(DIRECTORY)/vms/xlib_share.opt \
$(DIRECTORY)/windows/VC?/mesa/gdi/gdi.dsp \
$(DIRECTORY)/windows/VC?/mesa/glu/*.txt \
$(DIRECTORY)/windows/VC?/mesa/glu/glu.dsp \
$(DIRECTORY)/windows/VC?/mesa/mesa.dsw \
$(DIRECTORY)/windows/VC?/mesa/mesa/mesa.dsp \
$(DIRECTORY)/windows/VC?/mesa/osmesa/osmesa.dsp
$(DIRECTORY)/src/glu/sgi/libutil/*.[ch]
MESA_GLU_FILES = \
$(DIRECTORY)/src/glu/mesa/README[12] \
$(DIRECTORY)/src/glu/mesa/Makefile* \
$(DIRECTORY)/src/glu/mesa/descrip.mms \
$(DIRECTORY)/src/glu/mesa/mms_depend \
$(DIRECTORY)/src/glu/mesa/*.def \
$(DIRECTORY)/src/glu/mesa/depend \
$(DIRECTORY)/src/glu/mesa/*.[ch]
GLW_FILES = \
$(DIRECTORY)/src/glw/*.[ch] \
$(DIRECTORY)/src/glw/Makefile* \
$(DIRECTORY)/src/glw/README \
$(DIRECTORY)/src/glw/depend
DEMO_FILES = \
$(DIRECTORY)/progs/beos/*.cpp \
$(DIRECTORY)/progs/beos/Makefile \
$(DIRECTORY)/progs/images/*.rgb \
$(DIRECTORY)/progs/images/*.rgba \
$(DIRECTORY)/progs/demos/Makefile* \
$(DIRECTORY)/progs/demos/descrip.mms \
$(DIRECTORY)/progs/demos/*.[ch] \
$(DIRECTORY)/progs/demos/*.cxx \
$(DIRECTORY)/progs/demos/*.dat \
$(DIRECTORY)/progs/demos/README \
$(DIRECTORY)/progs/osdemos/Makefile \
$(DIRECTORY)/progs/osdemos/*.c \
$(DIRECTORY)/progs/xdemos/Makefile* \
$(DIRECTORY)/progs/xdemos/descrip.mms \
$(DIRECTORY)/progs/xdemos/*.[chf] \
$(DIRECTORY)/progs/redbook/Makefile* \
$(DIRECTORY)/progs/redbook/README \
$(DIRECTORY)/progs/redbook/*.[ch] \
$(DIRECTORY)/progs/samples/Makefile* \
$(DIRECTORY)/progs/samples/README \
$(DIRECTORY)/progs/samples/*.c \
$(DIRECTORY)/progs/windml/Makefile.ugl \
$(DIRECTORY)/progs/windml/*.c \
$(DIRECTORY)/progs/windml/*.bmp \
$(DIRECTORY)/progs/ggi/*.c \
$(DIRECTORY)/windows/VC6/progs/demos/*.dsp \
$(DIRECTORY)/windows/VC6/progs/progs.dsw \
$(DIRECTORY)/windows/VC7/progs/demos/*.vcproj \
$(DIRECTORY)/windows/VC7/progs/progs.sln
GLUT_FILES = \
$(DIRECTORY)/include/GL/glut.h \
@@ -296,97 +358,87 @@ GLUT_FILES = \
$(DIRECTORY)/src/glut/dos/Makefile.DJ \
$(DIRECTORY)/src/glut/dos/PC_HW/*.[chS] \
$(DIRECTORY)/src/glut/ggi/*.[ch] \
$(DIRECTORY)/src/glut/ggi/Makefile
$(DIRECTORY)/src/glut/ggi/Makefile \
$(DIRECTORY)/windows/VC6/progs/glut/glut.dsp \
$(DIRECTORY)/windows/VC7/progs/glut/glut.vcproj
DEPEND_FILES = \
$(TOP)/src/mesa/depend \
$(TOP)/src/glw/depend \
$(TOP)/src/glut/glx/depend \
$(TOP)/src/glu/sgi/depend
DEMO_FILES = \
$(DIRECTORY)/progs/beos/*.cpp \
$(DIRECTORY)/progs/beos/Makefile \
$(DIRECTORY)/progs/images/*.rgb \
$(DIRECTORY)/progs/images/*.rgba \
$(DIRECTORY)/progs/demos/Makefile* \
$(DIRECTORY)/progs/demos/descrip.mms \
$(DIRECTORY)/progs/demos/*.[ch] \
$(DIRECTORY)/progs/demos/*.cxx \
$(DIRECTORY)/progs/demos/*.dat \
$(DIRECTORY)/progs/demos/README \
$(DIRECTORY)/progs/xdemos/Makefile* \
$(DIRECTORY)/progs/xdemos/descrip.mms \
$(DIRECTORY)/progs/xdemos/*.[chf] \
$(DIRECTORY)/progs/redbook/Makefile* \
$(DIRECTORY)/progs/redbook/README \
$(DIRECTORY)/progs/redbook/*.[ch] \
$(DIRECTORY)/progs/samples/Makefile* \
$(DIRECTORY)/progs/samples/README \
$(DIRECTORY)/progs/samples/*.c \
$(DIRECTORY)/progs/windml/Makefile.ugl \
$(DIRECTORY)/progs/windml/*.c \
$(DIRECTORY)/progs/windml/*.bmp \
$(DIRECTORY)/progs/ggi/*.c \
$(DIRECTORY)/windows/VC?/progs/demos/*.dsp \
$(DIRECTORY)/windows/VC?/progs/glut/glut.dsp \
$(DIRECTORY)/windows/VC?/progs/progs.dsw
DRI_FILES = \
$(DIRECTORY)/src/glx/Makefile \
$(DIRECTORY)/src/glx/mini/*.[ch] \
$(DIRECTORY)/src/glx/mini/example.miniglx.conf \
$(DIRECTORY)/src/glx/mini/NOTES \
$(DIRECTORY)/src/mesa/drivers/dri/Makefile \
$(DIRECTORY)/src/mesa/drivers/dri/Makefile.template \
$(DIRECTORY)/src/mesa/drivers/dri/common/*.[ch] \
$(DIRECTORY)/src/mesa/drivers/dri/dri_client/imports/*.h \
$(DIRECTORY)/src/mesa/drivers/dri/*/*.[ch] \
$(DIRECTORY)/src/mesa/drivers/dri/*/depend \
$(DIRECTORY)/src/mesa/drivers/dri/*/Makefile \
$(DIRECTORY)/src/mesa/drivers/dri/*/Doxyfile \
$(DIRECTORY)/src/mesa/drivers/dri/*/server/*.[ch]
LIB_FILES = $(MAIN_FILES) $(DRI_FILES) $(SGI_GLU_FILES) $(GLW_FILES)
# Everything for new a Mesa release:
tarballs: lib_gz demo_gz lib_bz2 demo_bz2 lib_zip demo_zip md5
tarballs: rm_depend lib_gz demo_gz glut_gz lib_bz2 demo_bz2 glut_bz2 lib_zip demo_zip glut_zip md5
rm_depend:
@for dep in $(DEPEND_FILES) ; do \
rm -f $$dep ; \
touch $$dep ; \
done
lib_gz:
rm -f configs/current ; \
cd .. ; \
tar -cvf $(LIB_NAME).tar $(LIB_FILES) ; \
tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \
gzip $(LIB_NAME).tar ; \
mv $(LIB_NAME).tar.gz $(DIRECTORY)
demo_gz:
cd .. ; \
tar -cvf $(DEMO_NAME).tar $(DEMO_FILES) $(GLUT_FILES) ; \
tar -cf $(DEMO_NAME).tar $(DEMO_FILES) ; \
gzip $(DEMO_NAME).tar ; \
mv $(DEMO_NAME).tar.gz $(DIRECTORY)
glut_gz:
cd .. ; \
tar -cf $(GLUT_NAME).tar $(GLUT_FILES) ; \
gzip $(GLUT_NAME).tar ; \
mv $(GLUT_NAME).tar.gz $(DIRECTORY)
lib_bz2:
rm -f configs/current ; \
cd .. ; \
tar -cvf $(LIB_NAME).tar $(LIB_FILES) ; \
tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \
bzip2 $(LIB_NAME).tar ; \
mv $(LIB_NAME).tar.bz2 $(DIRECTORY)
demo_bz2:
cd .. ; \
tar -cvf $(DEMO_NAME).tar $(DEMO_FILES) $(GLUT_FILES) ; \
tar -cf $(DEMO_NAME).tar $(DEMO_FILES) ; \
bzip2 $(DEMO_NAME).tar ; \
mv $(DEMO_NAME).tar.bz2 $(DIRECTORY)
glut_bz2:
cd .. ; \
tar -cf $(GLUT_NAME).tar $(GLUT_FILES) ; \
bzip2 $(GLUT_NAME).tar ; \
mv $(GLUT_NAME).tar.bz2 $(DIRECTORY)
lib_zip:
rm -f configs/current ; \
-rm $(LIB_NAME).zip ; \
rm -f $(LIB_NAME).zip ; \
cd .. ; \
zip -r $(LIB_NAME).zip $(LIB_FILES) ; \
zip -qr $(LIB_NAME).zip $(LIB_FILES) ; \
mv $(LIB_NAME).zip $(DIRECTORY)
demo_zip:
-rm $(DEMO_NAME).zip ; \
rm -f $(DEMO_NAME).zip ; \
cd .. ; \
zip -r $(DEMO_NAME).zip $(DEMO_FILES) $(GLUT_FILES) ; \
zip -qr $(DEMO_NAME).zip $(DEMO_FILES) ; \
mv $(DEMO_NAME).zip $(DIRECTORY)
glut_zip:
rm -f $(GLUT_NAME).zip ; \
cd .. ; \
zip -qr $(GLUT_NAME).zip $(GLUT_FILES) ; \
mv $(GLUT_NAME).zip $(DIRECTORY)
md5:
@-md5sum $(LIB_NAME).tar.gz
@-md5sum $(LIB_NAME).tar.bz2
@@ -394,3 +446,6 @@ md5:
@-md5sum $(DEMO_NAME).tar.gz
@-md5sum $(DEMO_NAME).tar.bz2
@-md5sum $(DEMO_NAME).zip
@-md5sum $(GLUT_NAME).tar.gz
@-md5sum $(GLUT_NAME).tar.bz2
@-md5sum $(GLUT_NAME).zip

View File

@@ -12,7 +12,7 @@ TOP=.
INCLUDE_DIR="/usr/local/include"
LIB_DIR="/usr/local/lib"
if [ x$# == "x0" ] ; then
if [ "x$#" = "x0" ] ; then
echo
echo "***** Mesa installation - You may need root privileges to do this *****"
echo
@@ -20,7 +20,7 @@ echo "Default directory for header files is:" ${INCLUDE_DIR}
echo "Enter new directory or press <Enter> to accept this default."
read INPUT
if [ x${INPUT} != "x" ] ; then
if [ "x${INPUT}" != "x" ] ; then
INCLUDE_DIR=${INPUT}
fi
@@ -29,7 +29,7 @@ echo "Default directory for library files is:" ${LIB_DIR}
echo "Enter new directory or press <Enter> to accept this default."
read INPUT
if [ x${INPUT} != "x" ] ; then
if [ "x${INPUT}" != "x" ] ; then
LIB_DIR=${INPUT}
fi
@@ -47,7 +47,14 @@ fi
# flags:
# -f = force
# -d = preserve symlinks
# -d = preserve symlinks (does not work on BSD)
if [ `uname` = "FreeBSD" ] ; then
CP_FLAGS="-f"
else
CP_FLAGS="-fd"
fi
set -v
@@ -56,7 +63,7 @@ mkdir ${INCLUDE_DIR}/GL
mkdir ${INCLUDE_DIR}/GLES
mkdir ${LIB_DIR}
cp -f ${TOP}/include/GL/*.h ${INCLUDE_DIR}/GL
cp -f ${TOP}/include/GLES/*.h ${INCLUDE_DIR}/GLES
cp -fd ${TOP}/lib*/lib* ${LIB_DIR}
# NOT YET: cp -f ${TOP}/include/GLES/*.h ${INCLUDE_DIR}/GLES
cp ${CP_FLAGS} ${TOP}/lib*/lib* ${LIB_DIR}
echo "Done."

270
bin/mklib
View File

@@ -1,38 +1,28 @@
#!/bin/sh
# Make a shared library.
# Basically do a switch/case depending on the OS and make a shared (or static)
# library conforming to that OS.
# This script should be useful for projects other than Mesa.
# Improvements/fixes are welcome.
# Usage:
# mklib [options] objects ...
# Options:
# -o LIBRARY specifies the name of resulting library
# ("-o GL" for example, might result in "libGL.so" being made)
# -major N specifies major version number (default is 1)
# -minor N specifies minor version number (default is 0)
# -patch N specifies patch version number (default is 0)
# -lLIBRARY specifies a dependency on LIBRARY
# -LDIR search in DIR for library dependencies
# -cplusplus link with C++ runtime
# -static make a static library (default is dynamic/shared)
# -install DIR move resulting library file(s) to DIR
# -arch ARCH override using `uname` to determine architecture
# -archopt OPT specify an extra achitecture-specific option OPT
# -noprefix don't prefix library name with "lib" or any suffix
# -exports FILE only export the symbols listed in FILE
# Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
#
# The library name should just be "GL" or "GLU", etc. The 'lib' prefix
# will be added here if needed, as well as the ".so" or ".a" suffix,
# etc (unless the -noprefix option is used).
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# objects should be: foo.o bar.o etc.o
#
# Environment variables recognized:
# CC C compiler command
# CXX C++ compiler command
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
@@ -43,6 +33,7 @@ MAJOR=1
MINOR=0
PATCH=""
DEPS=""
LINK=""
CPLUSPLUS=0
STATIC=0
INSTALLDIR="."
@@ -58,26 +49,93 @@ EXPORTS=""
while true
do
case $1 in
'-o') shift 1; LIBNAME=$1;;
'-major') shift 1; MAJOR=$1;;
'-minor') shift 1; MINOR=$1;;
'-patch') shift 1; PATCH=$1;;
-l*) DEPS="$DEPS $1";;
-L*) DEPS="$DEPS $1";;
'-cplusplus') CPLUSPLUS=1;;
'-static') STATIC=1;;
'-install') shift 1; INSTALLDIR=$1;;
'-arch') shift 1; ARCH=$1;;
'-archopt') shift 1; ARCHOPT=$1;;
'-noprefix') NOPREFIX=1;;
'-exports') shift 1; EXPORTS=$1;;
-*) echo "mklib: Unknown option: " $1 ; exit 1;;
*) break
'-h' | '--help')
echo 'Usage: mklib [options] objects'
echo 'Create a shared library from object files.'
echo ' -o LIBRARY specifies the name of the resulting library, without'
echo ' the leading "lib" or any suffix.'
echo ' (eg: "-o GL" might result in "libGL.so" being made)'
echo ' -major N specifies major version number (default is 1)'
echo ' -minor N specifies minor version number (default is 0)'
echo ' -patch N specifies patch version number (default is 0)'
echo ' -lLIBRARY specifies a dependency on LIBRARY'
echo ' -LDIR search in DIR for library dependencies'
echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)'
echo ' Not observed on all systems at this time.'
echo ' -cplusplus link with C++ runtime'
echo ' -static make a static library (default is dynamic/shared)'
echo ' -install DIR put resulting library file(s) in DIR'
echo ' -arch ARCH override using `uname` to determine host system'
echo ' -archopt OPT specify an extra achitecture-specific option OPT'
echo " -noprefix don't prefix library name with 'lib' nor add any suffix"
echo ' -exports FILE only export the symbols listed in FILE'
echo ' -h, --help display this information and exit'
exit 1
;;
'-o')
shift 1;
LIBNAME=$1
;;
'-major')
shift 1;
MAJOR=$1
;;
'-minor')
shift 1;
MINOR=$1
;;
'-patch')
shift 1;
PATCH=$1
;;
'-linker')
shift 1;
LINK=$1
;;
-l*)
DEPS="$DEPS $1"
;;
-L*)
DEPS="$DEPS $1"
;;
'-cplusplus')
CPLUSPLUS=1
;;
'-static')
STATIC=1
;;
'-install')
shift 1;
INSTALLDIR=$1
;;
'-arch')
shift 1;
ARCH=$1
;;
'-archopt')
shift 1;
ARCHOPT=$1
;;
'-noprefix')
NOPREFIX=1
;;
'-exports')
shift 1;
EXPORTS=$1
;;
-*)
echo "mklib: Unknown option: " $1 ;
exit 1
;;
*)
# This should be the first object file, stop parsing
break
esac
shift 1
done
OBJECTS=$@
if [ ${ARCH} = "auto" ] ; then
ARCH=`uname`
fi
@@ -120,12 +178,13 @@ case $ARCH in
'Linux' | 'OpenBSD')
# we assume gcc
# Set default compilers if env vars not set
if [ "x$CXX" = "x" ] ; then
CXX=g++
fi
if [ "x$CC" = "x" ] ; then
CC=gcc
if [ "x$LINK" = "x" ] ; then
# -linker was not specified so set default link command now
if [ $CPLUSPLUS = 1 ] ; then
LINK=g++
else
LINK=gcc
fi
fi
if [ $NOPREFIX = 1 ] ; then
@@ -133,13 +192,16 @@ case $ARCH in
echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}
#OPTS="-shared -Wl,-soname,${LIBNAME}" # soname???
OPTS="-shared"
if [ $CPLUSPLUS = 1 ] ; then
LINK=$CXX
else
LINK=$CC
fi
rm -f ${LIBNAME}
# Check if objects are 32-bit and we're running in 64-bit
# environment. If so, pass -m32 flag to linker.
set ${OBJECTS}
ABI32=`file $1 | grep 32-bit`
if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then
OPTS="-m32 ${OPTS}"
fi
rm -f ${LIBNAME}
# make lib
${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
# finish up
@@ -190,12 +252,6 @@ case $ARCH in
echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}.so.${VERSION}
if [ $CPLUSPLUS = 1 ] ; then
LINK=$CXX
else
LINK=$CC
fi
# rm any old libs
rm -f ${LIBNAME}.so.${VERSION}
rm -f ${LIBNAME}.so.${MAJOR}
@@ -224,41 +280,25 @@ case $ARCH in
echo "mklib: Making SunOS shared library: " ${LIBNAME}
# XXX OPTS for gcc should be -shared, but that doesn't work.
# Using -G does work though.
if [ $CPLUSPLUS = 1 ] ; then
# determine linker and options for C++ code
if [ "x${CXX}" = "xg++" ] ; then
# use g++
LINK="g++"
OPTS="-G"
elif [ "x${CXX}" = "xCC" ] ; then
# use Sun CC
LINK="CC"
OPTS="-G"
elif [ "x${CXX}" = "xc++" ] ; then
# use Sun c++
LINK="c++"
OPTS="-G"
elif [ `which c++` ] ; then
# use Sun c++
LINK="c++"
OPTS="-G"
elif [ `type g++` ] ; then
# use g++
LINK="g++"
OPTS="-G"
OPTS="-G"
if [ "x$LINK" = "x" ] ; then
# -linker was not specified, choose default linker now
if [ $CPLUSPLUS = 1 ] ; then
# determine linker and options for C++ code
if [ `which c++` ] ; then
# use Sun c++
LINK="c++"
elif [ `type g++` ] ; then
# use g++
LINK="g++"
else
echo "mklib: warning: can't find C++ comiler, trying CC."
LINK="CC"
fi
else
echo "mklib: warning: can't find C++ comiler, trying CC."
LINK="CC"
OPTS="-G"
# use native Sun linker for C code
LINK="ld"
fi
elif [ "x${CC}" = "xgcc" ] ; then
# use gcc for linking
LINK="gcc"
OPTS="-G"
else
# use native Sun linker
LINK="ld"
OPTS="-G"
fi
echo "mklib: linker is" ${LINK} ${OPTS}
rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
@@ -269,11 +309,23 @@ case $ARCH in
;;
'FreeBSD')
# we assume gcc
if [ "x$LINK" = "x" ] ; then
# -linker was not specified so set default link command now
if [ $CPLUSPLUS = 1 ] ; then
LINK=g++
else
LINK=gcc
fi
fi
if [ $NOPREFIX = 1 ] ; then
# No "lib" or ".so" part
echo "mklib: Making FreeBSD shared library: " ${LIBNAME}
OPTS="-shared"
rm -f ${LIBNAME}
ld -Bshareable -o ${LIBNAME} ${OBJECTS}
${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
FINAL_LIBS=${LIBNAME}
elif [ $STATIC = 1 ] ; then
STLIB="lib${LIBNAME}.a"
@@ -283,12 +335,13 @@ case $ARCH in
ranlib ${STLIB}
FINAL_LIBS=${STLIB}
else
SHLIB="lib${LIBNAME}.so.${MAJOR}.${MINOR}"
SHLIB="lib${LIBNAME}.so.${MAJOR}"
OPTS="-shared -Wl,-soname,${SHLIB}"
echo "mklib: Making FreeBSD shared library: " ${SHLIB}
rm -f ${SHLIB}
ld -Bshareable -o ${SHLIB} ${OBJECTS}
# XXX make lib${LIBNAME}.so.${MAJOR} symlink?
FINAL_LIBS=${SHLIB}
${LINK} ${OPTS} -o ${SHLIB} ${OBJECTS} ${DEPS}
ln -sf ${SHLIB} "lib${LIBNAME}.so"
FINAL_LIBS="${SHLIB} lib${LIBNAME}.so"
fi
;;
@@ -317,6 +370,8 @@ case $ARCH in
FINAL_LIBS=${LIBNAME}
else
LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so"
# XXX we should run 'file' on the first object file to determine
# if it's o32, n32 or 64 format, as we do for Linux above.
if [ $ARCHOPT = "64" ] ; then
# 64-bit ABI
OPTS="-64 -shared -all"
@@ -425,10 +480,12 @@ case $ARCH in
VERSION="${MAJOR}.${MINOR}"
LIBNAME="lib${LIBNAME}.so"
echo "mklib: Making OSF/1 shared library: " ${LIBNAME}
if [ $CPLUSPLUS = 1 ] ; then
LINK=$CXX
else
LINK=$CC
if [ "x$LINK" = "x" ] ; then
if [ $CPLUSPLUS = 1 ] ; then
LINK=cxx
else
LINK=cc
fi
fi
rm -f ${LIBNAME}.${VERSION}
${LINK} -o ${LIBNAME}.${VERSION} -shared -set_version ${VERSION} -soname ${LIBNAME}.${VERSION} -expect_unresolved \* -all ${OBJECTS} ${DEPS}
@@ -446,9 +503,9 @@ case $ARCH in
${LINK} ${OPTS} ${LIBNAME} ${OBJECTS}
FINAL_LIBS=${LIBNAME}
else
LIBNAME="${LIBNAME}.dylib"
LIBNAME="lib${LIBNAME}.dylib"
echo "mklib: Making Darwin shared library: " ${LIBNAME}
FLAGS="-dynamiclib -multiply_defined suppress"
FLAGS="-dynamiclib -multiply_defined suppress -current_version ${MAJOR}.${MINOR}.0 -compatibility_version ${MAJOR}.${MINOR}.0"
if [ $CPLUSPLUS = 1 ] ; then
LINK="g++"
else
@@ -477,6 +534,7 @@ case $ARCH in
echo "mklib: Making BeOS shared library: " ${LIBNAME}
gcc -nostart -Xlinker "-soname=${LIBNAME}" -L/Be/develop/lib/x86 -lbe ${DEPS} ${OBJECTS} -o "${LIBNAME}"
mimeset -f "${LIBNAME}"
# XXX remove the Mesa3D stuff here since mklib isn't mesa-specific.
setversion "${LIBNAME}" -app ${MAJOR} ${MINOR} ${PATCH} -short "Powered by Mesa3D!" -long "Powered by Mesa3D!"
fi
FINAL_LIBS=${LIBNAME}
@@ -498,6 +556,8 @@ case $ARCH in
'icc')
# Intel C compiler
# This should get merged into the Linux code, above, since this isn't
# really a different architecture.
LIBNAME="lib${LIBNAME}" # prefix with "lib"
if [ $STATIC = 1 ] ; then
@@ -615,7 +675,7 @@ case $ARCH in
ar rv ${LIBNAME} ${OBJECTS}
FINAL_LIBS="${LIBNAME}"
else
LIBNAME="lib${LIBNAME}.so" # prefix with "lib"
LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so"
echo "mklib: Making shared library for example arch: " ${LIBNAME}
ld -o ${LIBNAME} ${OBJECTS} ${DEPS}
FINAL_LIBS="${LIBNAME}"

View File

@@ -18,8 +18,12 @@ GLW_LIB_NAME = libGLw.dylib
OSMESA_LIB_NAME = libOSMesa.dylib
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
OSMESA_LIB_DEPS = $(TOP)/lib/GL.dylib
GLU_LIB_DEPS = $(TOP)/lib/GL.dylib
GLUT_LIB_DEPS =
OSMESA_LIB_DEPS = -L$(LIB_DIR) -lGL
GLU_LIB_DEPS = -L$(LIB_DIR) -lGL
GLUT_LIB_DEPS = -L$(LIB_DIR) -lGL -lGLU -L/usr/X11R6/lib -lX11 -lXmu -lXi -lXext
GLW_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXt $(TOP)/lib/GL.dylib
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
# omit glw lib for now:
SRC_DIRS = mesa glu glut/glx

View File

@@ -7,10 +7,10 @@ CONFIG_NAME = default
# Version info
MESA_MAJOR=6
MESA_MINOR=3
MESA_TINY=0
MESA_MINOR=4
MESA_TINY=1
# external projects
# external projects. This should be useless now that we use libdrm.
DRM_SOURCE_PATH=$(TOP)/../drm
# Compiler and flags
@@ -26,6 +26,10 @@ MKDEP = makedepend
MKDEP_OPTIONS = -fdepend
MAKE = make
# Python and flags (generally only needed by the developers)
PYTHON2 = python
PYTHON_FLAGS = -t -O -O
# Library names (base name)
GL_LIB = GL
GLU_LIB = GLU
@@ -61,9 +65,10 @@ PROGRAM_DIRS = demos redbook samples xdemos
# Library/program dependencies
GL_LIB_DEPS = -lX11 -lXext -lm -lpthread
EXTRA_LIB_PATH ?=
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
OSMESA_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB)
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lXt -lX11
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm

View File

@@ -13,5 +13,4 @@ CFLAGS = -O2 -fPIC -pedantic -I/usr/X11R6/include -DUSE_XSHM -DHZ=100
CXXFLAGS = -O2 -fPIC -pedantic
GLUT_CFLAGS = -fexceptions
APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11 -lm
APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lXext -lXmu -lXi -lX11 -lm

View File

@@ -12,8 +12,9 @@ WARN_FLAGS = -Wall
OPT_FLAGS = -O
EXPAT_INCLUDES = -I/usr/local/include
X11_INCLUDES = -I/usr/X11R6/include -I/usr/X11R6/include/X11/extensions
DEFINES = -DDRI_NEW_INTERFACE_ONLY
X11_INCLUDES = -I/usr/X11R6/include
DEFINES = -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
-DGLX_DIRECT_RENDERING -DHAVE_ALIAS
CFLAGS = $(DEFINES) -Wmissing-prototypes -g -std=c99 -Wundef -fPIC \
-ffast-math $(X11_INCLUDES)
CXXFLAGS = $(DEFINES) -Wall -g -ansi -pedantic -fPIC
@@ -21,15 +22,16 @@ CXXFLAGS = $(DEFINES) -Wall -g -ansi -pedantic -fPIC
ASM_SOURCES =
# Library/program dependencies
DRI_LIB_DEPS = -L/usr/local/lib -lm -lpthread -lexpat
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
LIBDRM_LIB = `pkg-config --libs libdrm` -ldrm
DRI_LIB_DEPS = -L/usr/local/lib -lm -lpthread -lexpat $(LIBDRM_LIB)
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread $(LIBDRM_LIB)
GLUT_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -lGL -lXt -lXm -lX11
# Directories
SRC_DIRS = mesa glu glut/glx glw glx/x11
SRC_DIRS = glx/x11 mesa glu glut/glx glw
DRIVER_DIRS = dri
PROGRAM_DIRS =
WINDOW_SYSTEM=dri
@@ -38,6 +40,6 @@ DRM_SOURCE_PATH=$(TOP)/../drm
# ffb and gamma are missing because they have not been converted to use the new
# interface.
DRI_DIRS = dri_client i810 i830 i915 mach64 mga r128 r200 radeon tdfx \
DRI_DIRS = i810 i830 i915 mach64 mga r128 r200 r300 radeon tdfx \
unichrome savage sis

View File

@@ -6,3 +6,4 @@ include $(TOP)/configs/freebsd-dri
CONFIG_NAME = freebsd-dri-x86-64
ASM_FLAGS = -DUSE_X86_64_ASM
ASM_SOURCES = $(X86-64_SOURCES) $(X86-64_API)

View File

@@ -8,13 +8,26 @@ CONFIG_NAME = linux
CC = gcc
CXX = g++
CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include
CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
WARN_FLAGS = -Wall
OPT_FLAGS = -O3 -g
PIC_FLAGS = -fPIC
# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support. Add -m32
# to build properly on 64-bit platforms.
ARCH_FLAGS ?=
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
-D_BSD_SOURCE -DPTHREADS -DUSE_XSHM
X11_INCLUDES = -I/usr/X11R6/include
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
$(ASM_FLAGS) $(X11_INCLUDES) -std=c99 -ffast-math
CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
$(X11_INCLUDES)
GLUT_CFLAGS = -fexceptions
# Library/program dependencies
# Need to have -L/usr/X11R6/lib in these:
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
EXTRA_LIB_PATH = -L/usr/X11R6/lib

View File

@@ -1,20 +1,8 @@
# Configuration for debugging on Linux
include $(TOP)/configs/default
include $(TOP)/configs/linux
CONFIG_NAME = linux-debug
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -g -ansi -pedantic -Wall -Wmissing-prototypes -Wundef -fPIC -ffast-math -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM -DPTHREADS -DDEBUG -DMESA_DEBUG
CXXFLAGS = -g -ansi -pedantic -Wall -Wundef -fPIC -ffast-math -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -DDEBUG -DMESA_DEBUG
GLUT_CFLAGS = -fexceptions
# Need to have -L/usr/X11R6/lib in these:
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lXt -L/usr/X11R6/lib -lX11
OPT_FLAGS = -g
DEFINES += -DDEBUG -DMESA_DEBUG -DRUN_DEBUG_BENCHMARK

View File

@@ -22,9 +22,10 @@ ARCH_FLAGS ?=
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
-D_BSD_SOURCE -D_GNU_SOURCE \
-DDRI_NEW_INTERFACE_ONLY -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
-DGLX_DIRECT_RENDERING -DHAVE_ALIAS
X11_INCLUDES = -I/usr/X11R6/include -I/usr/X11R6/include/X11/extensions
X11_INCLUDES = -I/usr/X11R6/include
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
$(ASM_FLAGS) -std=c99 -ffast-math
@@ -37,19 +38,31 @@ ASM_SOURCES =
# Library/program dependencies
EXTRA_LIB_PATH=-L/usr/X11R6/lib
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl
GLUT_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(LIB_DIR) -l$(GL_LIB) -lXt -lX11
LIBDRM_LIB = `pkg-config --libs libdrm` -ldrm
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl \
$(LIBDRM_LIB)
# This is now 0 by default since it seems to confuse the hell out of people
# and generate a lot of extra noise on bugzilla. If you need to build with
# EGL, do 'make linux-dri USING_EGL=1'
USING_EGL=0
# Directories
ifeq ($(USING_EGL), 1)
SRC_DIRS = egl glx/x11 mesa glu glut/glx glw
PROGRAM_DIRS = egl
else
SRC_DIRS = glx/x11 mesa glu glut/glx glw
PROGRAM_DIRS =
endif
DRIVER_DIRS = dri
PROGRAM_DIRS =
WINDOW_SYSTEM=dri
# ffb and gamma are missing because they have not been converted to use the new
# gamma are missing because they have not been converted to use the new
# interface.
DRI_DIRS = dri_client i810 i830 i915 mach64 mga r128 r200 radeon s3v \
savage sis tdfx trident unichrome
DRI_DIRS = i810 i830 i915 mach64 mga r128 r200 r300 radeon s3v \
savage sis tdfx trident unichrome ffb

View File

@@ -13,5 +13,5 @@ ASM_SOURCES = $(PPC_SOURCES)
# Build only the drivers for cards that exist on PowerPC. At some point MGA
# will be added, but not yet.
DRI_DIRS = dri_client mach64 r128 r200 radeon tdfx
DRI_DIRS = mach64 r128 r200 r300 radeon tdfx

View File

@@ -8,5 +8,9 @@ CONFIG_NAME = linux-dri-x86
# Unnecessary on x86, generally.
PIC_FLAGS =
# Add -m32 to CFLAGS:
ARCH_FLAGS = -m32
ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
ASM_SOURCES = $(X86_SOURCES)

View File

@@ -7,6 +7,9 @@ CONFIG_NAME = linux-dri-x86-64
ARCH_FLAGS = -m64
ASM_FLAGS = -DUSE_X86_64_ASM
ASM_SOURCES = $(X86-64_SOURCES) $(X86-64_API)
LIB_DIR = $(TOP)/lib64
# Library/program dependencies
@@ -16,5 +19,5 @@ EXTRA_LIB_PATH=-L/usr/X11R6/lib64
# the new interface. i810 and i830 are missing because there is no x86-64
# system where they could *ever* be used.
#
DRI_DIRS = dri_client i915 mach64 mga r128 r200 radeon tdfx unichrome savage
DRI_DIRS = i915 mach64 mga r128 r200 radeon tdfx unichrome savage r300

49
configs/linux-indirect Normal file
View File

@@ -0,0 +1,49 @@
# -*-makefile-*-
# Configuration for linux-indirect: Builds a libGL capable of indirect
# rendering, but *NOT* capable of direct rendering.
include $(TOP)/configs/default
CONFIG_NAME = linux-dri
# Compiler and flags
CC = gcc
CXX = g++
MKDEP = /usr/X11R6/bin/makedepend
#MKDEP = gcc -M
#MKDEP_OPTIONS = -MF depend
WARN_FLAGS = -Wall
OPT_FLAGS = -O -g
PIC_FLAGS = -fPIC
# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support.
ARCH_FLAGS ?=
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
-D_BSD_SOURCE -D_GNU_SOURCE \
-DPTHREADS -DHAVE_ALIAS
X11_INCLUDES = -I/usr/X11R6/include
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
$(ASM_FLAGS) -std=c99 -ffast-math
CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
ASM_SOURCES =
# Library/program dependencies
EXTRA_LIB_PATH=-L/usr/X11R6/lib
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl
# Directories
SRC_DIRS = glx/x11 glu glut/glx glw
DRIVER_DIRS =
PROGRAM_DIRS =
WINDOW_SYSTEM=dri

View File

@@ -1,18 +1,9 @@
# Configuration for Linux on PPC
include $(TOP)/configs/default
include $(TOP)/configs/linux
CONFIG_NAME = linux-ppc
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -O3 -mcpu=603 -ansi -pedantic -fPIC -fsigned-char -ffast-math -funroll-loops -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM
CXXFLAGS = -O3 -mcpu=603 -ansi -pedantic -fPIC -fsigned-char -ffast-math -funroll-loops -D_SVID_SOURCE -D_BSD_SOURCE
GLUT_CFLAGS = -fexceptions
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
OPT_FLAGS = -O3 -mcpu=603 -fsigned-char -funroll-loops
# FIXME: Use of PowerPC assembly should be enabled here.

View File

@@ -1,15 +1,9 @@
# Configuration for Linux on PPC, static libs
include $(TOP)/configs/default
include $(TOP)/configs/linux-ppc
CONFIG_NAME = linux-ppc-static
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -O3 -mcpu=603 -ansi -pedantic -fPIC -fsigned-char -ffast-math -funroll-loops -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM
CXXFLAGS = -O3 -mcpu=603 -ansi -pedantic -fPIC -fsigned-char -ffast-math -funroll-loops -D_SVID_SOURCE -D_BSD_SOURCE
GLUT_CFLAGS = -fexceptions
MKLIB_OPTIONS = -static
# Library names (actual file names)
@@ -18,9 +12,3 @@ GLU_LIB_NAME = libGLU.a
GLUT_LIB_NAME = libglut.a
GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lm

View File

@@ -11,32 +11,33 @@ CXX = g++
WARN_FLAGS = -Wall -Wundef
OPT_FLAGS = -O3 -g
PIC_FLAGS = -fPIC
# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support.
ARCH_FLAGS ?=
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
-D_BSD_SOURCE -D_GNU_SOURCE \
-DDRI_NEW_INTERFACE_ONLY -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DDRM_USE_MALLOC
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DDRM_USE_MALLOC -DIN_DRI_DRIVER
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
$(ASM_FLAGS) -std=c99 -ffast-math
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
$(ASM_FLAGS) -std=c99 -ffast-math
CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
ASM_SOURCES =
ASM_SOURCES =
# Library/program dependencies
DRI_LIB_DEPS = -lm -lpthread -lexpat -ldl -L$(LIB_DIR) -lEGL -l$(GL_LIB)
DRI_LIB_DEPS = -lm -lpthread -lexpat -ldl -L$(LIB_DIR)
GL_LIB_DEPS = -lm -lpthread -ldl
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lpthread
# Directories
SRC_DIRS = egl mesa glx/mini glu glut/mini
SRC_DIRS = glx/mini mesa glu glut/mini
DRIVER_DIRS = dri
PROGRAM_DIRS = miniglx egl
PROGRAM_DIRS = miniglx
#DRI_DIRS = ffb gamma sis savage
DRI_DIRS = i810 i830 i915 mach64 mga r128 r200 radeon tdfx unichrome fb

View File

@@ -1,29 +1,7 @@
# Configuration for linux-solo-ia64: Linux DRI hardware drivers for fbdev
include $(TOP)/configs/default
include $(TOP)/configs/linux-solo
CONFIG_NAME = linux-solo-ia64
# Compiler and flags
CC = gcc
CXX = g++
DEFINES = -DDRI_NEW_INTERFACE_ONLY -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=199309L -D_GNU_SOURCE -DDRM_USE_MALLOC
CFLAGS = $(DEFINES) -Wmissing-prototypes -g -std=c99 -Wundef -fPIC -ffast-math
CXXFLAGS = $(DEFINES) -Wall -O3 -ansi -pedantic -fPIC
# Library/program dependencies
DRI_LIB_DEPS = -lm -lpthread -lexpat -ldl
GL_LIB_DEPS = -lm -lpthread -ldl
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lpthread
# Directories
SRC_DIRS = mesa glx/mini glu glut/mini
DRIVER_DIRS = dri
PROGRAM_DIRS = miniglx
DRI_DIRS = fb mach64 mga r128 r200 radeon sis tdfx unichrome

View File

@@ -7,10 +7,24 @@ CONFIG_NAME = linux-sparc
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -O2 -ffast-math -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM
CXXFLAGS = -O2 -ffast-math -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE
WARN_FLAGS = -Wall
OPT_FLAGS = -O2
PIC_FLAGS = -fPIC
DEFINES = -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM
X11_INCLUDES = -I/usr/X11R6/include
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
$(ASM_FLAGS) -std=c99 -ffast-math
CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
GLUT_CFLAGS = -fexceptions
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
EXTRA_LIB_PATH=-L/usr/X11R6/lib
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11

View File

@@ -1,17 +1,9 @@
# Configuration for generic Linux, making static libs
include $(TOP)/configs/default
include $(TOP)/configs/linux
CONFIG_NAME = linux-static
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include
CXXFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
GLUT_CFLAGS = -fexceptions
MKLIB_OPTIONS = -static
# Library names (actual file names)
@@ -27,4 +19,3 @@ OSMESA_LIB_DEPS =
GLU_LIB_DEPS =
GLUT_LIB_DEPS =
GLW_LIB_DEPS =
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm -lstdc++

View File

@@ -1,24 +1,8 @@
# Configuration for Linux with x86 optimizations
include $(TOP)/configs/default
include $(TOP)/configs/linux
CONFIG_NAME = linux-x86
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include
CXXFLAGS = -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
GLUT_CFLAGS = -fexceptions
ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
ASM_SOURCES = $(X86_SOURCES) $(X86_API)
# Library/program dependencies
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm

View File

@@ -4,10 +4,4 @@ include $(TOP)/configs/linux-x86
CONFIG_NAME = linux-x86-32
# Other than -m32, these are the same as in linux-x86, which we included above.
CFLAGS = -m32 -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include
CXXFLAGS = -m32 -Wall -O3 fPIC -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE
ARCH_FLAGS += -m32

View File

@@ -1,28 +1,13 @@
# Configuration for Linux for 64-bit X86 (Opteron)
include $(TOP)/configs/default
include $(TOP)/configs/linux
CONFIG_NAME = linux-x86-64
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -m64 -Wall -O3 -std=c99 -pedantic -fPIC -D_REENTRANT -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DUSE_X86_64_ASM
CXXFLAGS = -m64 -Wall -O3 -fPIC -D_REENTRANT -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE
GLUT_CFLAGS = -fexceptions
ASM_SOURCES = $(X86-64_SOURCES)
ARCH_FLAGS = -m64
ASM_SOURCES = $(X86-64_SOURCES) $(X86-64_API)
ASM_FLAGS = -DUSE_X86_64_ASM
LIB_DIR = $(TOP)/lib64
# Library/program dependencies
GL_LIB_DEPS = -L/usr/X11R6/lib64 -lX11 -lXext -lm -lpthread
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib64 -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib64 -lXt -lX11
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
EXTRA_LIB_PATH = -L/usr/X11R6/lib64

View File

@@ -1,28 +1,7 @@
# Configuration for Linux for 64-bit X86 (Opteron)
include $(TOP)/configs/default
include $(TOP)/configs/linux-x86-64
CONFIG_NAME = linux-x86-64-debug
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -g -m64 -Wall -O3 -std=c99 -pedantic -fPIC -D_REENTRANT -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DUSE_X86_64_ASM -DDEBUG -DMESA_DEBUG -DRUN_DEBUG_BENCHMARK
CXXFLAGS = -g -m64 -Wall -O3 -ansi -pedantic -fPIC -D_REENTRANT -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DDEBUG -DMESA_DEBUG -DRUN_DEBUG_BENCHMARK
GLUT_CFLAGS = -fexceptions
ASM_SOURCES = $(X86-64_SOURCES)
LIB_DIR = $(TOP)/lib64
# Library/program dependencies
GL_LIB_DEPS = -L/usr/X11R6/lib64 -lX11 -lXext -lm -lpthread
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib64 -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib64 -lXt -lX11
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
DEFINES += -DDEBUG -DMESA_DEBUG -DRUN_DEBUG_BENCHMARK

View File

@@ -1,22 +1,11 @@
# Configuration for Linux for 64-bit X86 (Opteron), static libs
include $(TOP)/configs/default
include $(TOP)/configs/linux-x86-64
CONFIG_NAME = linux-x86-64-static
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -m64 -Wall -O3 -ansi -pedantic -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include
CXXFLAGS = -m64 -Wall -O3 -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE
GLUT_CFLAGS = -fexceptions
MKLIB_OPTIONS = -static
# Library names (actual file names)
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
@@ -24,17 +13,9 @@ GLUT_LIB_NAME = libglut.a
GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
#ASM_SOURCES = $(X86_SOURCES)
LIB_DIR = $(TOP)/lib64
# Library/program dependencies (static libs don't have dependencies)
GL_LIB_DEPS =
OSMESA_LIB_DEPS =
GLU_LIB_DEPS =
GLUT_LIB_DEPS =
GLW_LIB_DEPS =
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib64 -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm -lstdc++

View File

@@ -5,6 +5,5 @@ include $(TOP)/configs/linux-x86
CONFIG_NAME = linux-x86-debug
CFLAGS = -Wall -g -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include
CXXFLAGS = -Wall -g -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
OPT_FLAGS = -g
DEFINES += -DDEBUG -DMESA_DEBUG -DRUN_DEBUG_BENCHMARK

View File

@@ -1,22 +1,11 @@
# Configuration for Linux with x86 optimizations, static libs
include $(TOP)/configs/default
include $(TOP)/configs/linux-x86
CONFIG_NAME = linux-x86-static
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -Wall -O3 -ansi -pedantic -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include
CXXFLAGS = -Wall -O3 -ansi -pedantic -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
GLUT_CFLAGS = -fexceptions
MKLIB_OPTIONS = -static
# Library names (actual file names)
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
@@ -24,14 +13,9 @@ GLUT_LIB_NAME = libglut.a
GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
ASM_SOURCES = $(X86_SOURCES) $(X86_API)
# Library/program dependencies (static libs don't have dependencies)
GL_LIB_DEPS =
OSMESA_LIB_DEPS =
GLU_LIB_DEPS =
GLUT_LIB_DEPS =
GLW_LIB_DEPS =
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm -lstdc++

View File

@@ -4,18 +4,32 @@ include $(TOP)/configs/default
CONFIG_NAME = sunos5-gcc
ASM_SOURCES = $(SPARC_SOURCES) $(SPARC_API)
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -O3 -I/usr/openwin/include -fPIC -fomit-frame-pointer -D_REENTRANT -DUSE_XSHM -DUSE_SPARC_ASM
CXXFLAGS = -O3 -I/usr/openwin/include -fPIC -fomit-frame-pointer -D_REENTRANT -DUSE_SPARC_ASM
WARN_FLAGS = -Wall
OPT_FLAGS = -O3 -g -fomit-frame-pointer -pipe
PIC_FLAGS = -fPIC
ARCH_FLAGS ?=
DEFINES = -D_REENTRANT -DUSE_XSHM
ASM_SOURCES = $(SPARC_SOURCES) $(SPARC_API)
ASM_FLAGS = -DUSE_SPARC_ASM
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
$(ASM_FLAGS) -std=c99 -ffast-math -I/usr/openwin/include
CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
-I/usr/openwin/include
GLUT_CFLAGS = -fexceptions -DSOLARIS_2_4_BUG
GL_LIB_DEPS = -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/openwin/lib -lXt -lX11
APP_LIB_DEPS = -L$(LIB_DIR) -lX11 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
# Library/program dependencies
EXTRA_LIB_PATH=-L/usr/openwin/lib
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXmu -lXi -lm
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
APP_LIB_DEPS = -L$(LIB_DIR) -lX11 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm

View File

@@ -26,3 +26,7 @@ On Alpha platforms at default a sharable images for the libraries are created.
To get a static library make it by typing MMS/MACRO=(NOSHARE=1).
On VAX platforms only static libraries can be build.
You may want to compile Mesa to use IEEE floating point arithmetic, instead
of VAX floating point by specifying the /float=IEEE flag to the compiler.
For more information see https://bugs.freedesktop.org/show_bug.cgi?id=4270

View File

@@ -1,6 +1,6 @@
File: docs/README.WIN32
Last updated: Jun 02, 2005 - Karl Schultz - kschultz@users.sourceforge.net
Last updated: Jul 01, 2005 - Karl Schultz - kschultz@users.sourceforge.net
Quick Start
----- -----
@@ -17,7 +17,10 @@ the top-level "windows" directory. For example, Visual Studio 6 files
are in windows/VC6. If a directory does not exist for your version of
Visual Studio, you can try importing the project files from an earlier
version of Visual Studio. At this time, project files exist for
Version 6.
Version 6 and Version 7. The code has been built with a beta version
of Version 8 and it runs on 64-bit Windows. If you want to try this,
start by importing the VC7 files and create the 64-bit targets in the
configuration manager.
The project files to build the core Mesa library, Windows Mesa
drivers, OSMesa, and GLU are in the mesa directory. The project files
@@ -43,8 +46,12 @@ be useful in figuring out any problems, or report them to me.
To build Mesa with the GDI driver, build the mesa, gdi, and glu
projects in the Visual Studio workspace found at
windows/VC?/mesa/mesa.dsw. The osmesa DLL can also be built with the
osmesa project.
windows/VC6/mesa/mesa.dsw
or
windows/VC7/mesa/mesa.sln
The osmesa DLL can also be built with the osmesa project.
The build system creates a lib top-level directory and copies
resulting LIB and DLL files to this lib directory. The files are:
@@ -53,13 +60,19 @@ resulting LIB and DLL files to this lib directory. The files are:
OPENGL32.DLL, GLU32.DLL, OSMESA32.DLL
If the MesaDemos ZIP file was extracted, the DLL files are also copied
to the demos directory.
to the demos directory. This facilitates running the demos as described
below.
GLUT and Demos
---- --- -----
A Visual Studio workspace can be found at windows/VC?/progs/progs.dsw.
A Visual Studio workspace can be found at
windows/VC6/progs/progs.dsw
or
windows/VC7/progs/progs.sln
It can be used to build GLUT and a few demos. The GLUT lib and DLL
are copied to the top-level lib directory, along with the Mesa libs.
@@ -70,6 +83,8 @@ rely on data files found there. Also, the Mesa lib DLL's were copied
there by the Mesa lib build process. Therefore, you should be able to
simply run the demo executables from the demo directory.
If you want to run the demos from the Visual Studio, you may have to
change the startup directory and explicitly state where the executables are.
Build System Notes
@@ -87,19 +102,7 @@ GLU library.
VC7
---
Some users have reported problems building glu with VC7 after
importing and converting the VC6 project files. The problem is caused
by a custom build step that was put in place to work around a problem
with VC6 not recognizing .cc files as C++ source files. It appears
that VC7 can be configured to recognize .cc files as C++ files and so
it compiles these glu files with the default settings, and does not
use settings that are required to compile the files correctly. The
easiest way to solve the problem is to remove the .cc files from the
glu project. This does not delete the files, but removes them from
the project so that VS does not try to compile them at all. This
allows the custom build step to compile the files with the proper
settings. Another approach is to remove the custom build step and fix
the project up to compile the files normally.
The above-mentioned .cc problem does not exist in this version.
General

View File

@@ -1,7 +1,7 @@
Mesa 6.3 release notes
month day, 2004
July 20, 2005
PLEASE READ!!!!
@@ -28,7 +28,8 @@ GL_OES_read_format - allows one to query the fastest glReadPixels format
GL_ARB_pixel_buffer_object - buffer objects for pixel read/write functions.
GL_EXT_framebuffer_object - allows render-to-texture and provides a
window-system indepedent Pbuffer facility
window-system indepedent Pbuffer facility.
The Mesa CVS tree contains a couple tests of this extension.
DirectFB driver, contributed by Claudio Ciccani. See docs/README.directfb
for details.
@@ -63,11 +64,25 @@ contexts so they can't be deleted until they're unbound in _all_ contexts.
GL_EXT_framebuffer_object changes
---------------------------------
Implementing this extension involved changing a lot of code (for the better).
The gl_framebuffer object now a collection of gl_renderbuffer objects.
Renderbuffers may store colors, stencil indices, or depth values. The
gl_framebuffer and gl_renderbuffer types are object-oriented in design.
All the old RGB, color index, stencil and depth-related span functions for
reading/writing pixels from/to buffers has changed. Now, all pixels are
read/written through a set of common renderbuffer functions (methods).
Most device drivers have been updated for these changes, but some haven't.
To Do before release
--------------------
Fix dinoshade bug
To Do (someday) items
---------------------
Switch to freeglut
Increase MAX_DRAWBUFFERS
driver hooks for BeginQuery/EndQuery
@@ -77,7 +92,7 @@ To Do before release
Miscellaneous
-------------
The main/get.c file is now generated with a Python script.
The main/get.c file is now generated with a Python script (get_gen.py).
@@ -97,4 +112,4 @@ D3D needs updating
----------------------------------------------------------------------
$Id: RELNOTES-6.3,v 3.9 2005/05/04 20:11:35 brianp Exp $
$Id: RELNOTES-6.3,v 3.13 2005/07/21 15:57:29 brianp Exp $

49
docs/RELNOTES-6.3.1 Normal file
View File

@@ -0,0 +1,49 @@
Mesa 6.3.1 release notes
July XX, 2005
PLEASE READ!!!!
Introduction
------------
Mesa uses an even/odd version number scheme like the Linux kernel.
Odd numbered versions (such as 6.3) designate new developmental releases.
Even numbered versions (such as 6.2) designate stable releases.
DRI drivers
-----------
This release includes the DRI drivers and GLX code for hardware rendering.
Bug fixes
---------
Bugs fixed in 6.3.1 are listed in the VERSIONS file.
Driver Status
---------------------- ---------------------
XMesa (Xlib) implements OpenGL 1.5
OSMesa (off-screen) implements OpenGL 1.5
Glide (3dfx Voodoo1/2) implements OpenGL 1.3
SVGA implements OpenGL 1.3
Wind River UGL implements OpenGL 1.3
Windows/Win32 implements OpenGL 1.5
DJGPP implements OpenGL 1.5
GGI implements OpenGL 1.3
BeOS implements OpenGL 1.5
Allegro needs updating
D3D needs updating
----------------------------------------------------------------------
$Id: RELNOTES-6.3.1,v 3.1 2005/07/21 18:45:54 brianp Exp $

37
docs/RELNOTES-6.3.2 Normal file
View File

@@ -0,0 +1,37 @@
Mesa 6.3.2 Release Notes
August 19, 2005
Introduction
------------
Mesa uses an even/odd version number scheme like the Linux kernel.
Odd numbered versions (such as 6.3) designate new developmental releases.
Even numbered versions (such as 6.2) designate stable releases.
6.3.2 is primarily a bug-fix release. See the VERSIONS file for details.
Driver Status
---------------------- ----------------------
DRI drivers varies with the driver
XMesa (Xlib) implements OpenGL 1.5
OSMesa (off-screen) implements OpenGL 1.5
Glide (3dfx Voodoo1/2) implements OpenGL 1.3
SVGA implements OpenGL 1.3
Wind River UGL implements OpenGL 1.3
Windows/Win32 implements OpenGL 1.5
DJGPP implements OpenGL 1.5
GGI implements OpenGL 1.3
BeOS implements OpenGL 1.5
Allegro needs updating
D3D needs updating
----------------------------------------------------------------------
$Id: RELNOTES-6.3.2,v 3.2 2005/08/19 16:57:50 brianp Exp $

50
docs/RELNOTES-6.4 Normal file
View File

@@ -0,0 +1,50 @@
Mesa 6.4 Release Notes
October 24, 2005
Introduction
------------
Mesa uses an even/odd version number scheme like the Linux kernel.
Odd numbered versions (such as 6.3) designate new developmental releases.
Even numbered versions (such as 6.4) designate stable releases.
6.4 is a bug-fix release. See the VERSIONS file for details.
GLUT tarball
------------
Starting with 6.4, the GLUT library sources are distributed in a separate
tarball. This was done at the request of Linux distro vendors who prefer
to use freeglut.
Driver Status
---------------------- ----------------------
DRI drivers varies with the driver
XMesa (Xlib) implements OpenGL 1.5
OSMesa (off-screen) implements OpenGL 1.5
Windows/Win32 implements OpenGL 1.5
Glide (3dfx Voodoo1/2) requires updates
SVGA requires updates
DJGPP requires updates
GGI requires updates
BeOS requires updates
Allegro requires updates
D3D requires updates
The drivers which require updates mostly need to be updated to work
with the new gl_renderbuffer / gl_framebuffer infrastructure introduced
in Mesa 6.3.
----------------------------------------------------------------------
$Id: RELNOTES-6.4,v 1.1.2.5 2005/10/24 23:12:29 brianp Exp $

47
docs/RELNOTES-6.4.1 Normal file
View File

@@ -0,0 +1,47 @@
Mesa 6.4.1 Release Notes
Introduction
------------
Mesa uses an even/odd version number scheme like the Linux kernel.
Odd numbered versions (such as 6.3) designate new developmental releases.
Even numbered versions (such as 6.4) designate stable releases.
6.4.1 is a bug-fix release. See the VERSIONS file for details.
GLUT tarball
------------
Starting with 6.4, the GLUT library sources are distributed in a separate
tarball. This was done at the request of Linux distro vendors who prefer
to use freeglut.
Driver Status
---------------------- ----------------------
DRI drivers varies with the driver
XMesa (Xlib) implements OpenGL 1.5
OSMesa (off-screen) implements OpenGL 1.5
Windows/Win32 implements OpenGL 1.5
Glide (3dfx Voodoo1/2) requires updates
SVGA requires updates
DJGPP requires updates
GGI requires updates
BeOS requires updates
Allegro requires updates
D3D requires updates
The drivers which require updates mostly need to be updated to work
with the new gl_renderbuffer / gl_framebuffer infrastructure introduced
in Mesa 6.3.
----------------------------------------------------------------------
$Id: RELNOTES-6.4.1,v 1.1.2.1 2005/11/30 01:15:15 brianp Exp $

View File

@@ -1314,20 +1314,110 @@ Mesa Version History
- bug reports should to go bugzilla.freedesktop.org
6.3 Month day, 2004
6.3 July 20, 2005
New:
- GL_EXT_framebuffer_object extension
- GL_ARB_draw_buffers extension
- GL_ARB_pixel_buffer_object extension
- GL_OES_read_format extension (Ian Romanick)
- DirectFB driver (Claudio Ciccani)
- x86_64 vertex transformation code (Mikko T.)
- Updated GL/glext.h to version 29
Changes:
- added -stereo option for glxgears demo (Jacek Rosik)
- updated the PBuffer demo code in xdemos/ directory
- glDeleteTextures/Programs/Buffers() now makes the object ID
available for immediate re-use
- assorted 64-bit clean-ups fixes (x86_64 and Win64)
- lots of internal changes for GL_EXT_framebuffer_object
Bug fixes:
- some functions didn't support PBO functionality
- glGetTexImage didn't convert color index images to RGBA as required
- fragment program texcoords were sometimes wrong for points and lines
- fixed problem with negative dot product in arbfplight, fplight demos
- fixed bug in perspective correction of antialiased, textured lines
- querying GL_POST_CONVOLUTION_ALPHA_BIAS_EXT returned wrong value
- fixed a couple per-pixel fog bugs (Soju Matsumoto)
- glGetBooleanv(GL_FRAGMENT_PROGRAM_BINDING_NV) was broken
- fixed float parsing bug in ARB frag/vert programs (bug 2520)
- XMesaGetDepthBuffer() returned incorrect value for bytesPerValue
- GL_COLOR_MATERIAL with glColor3 didn't properly set diffuse alpha
- glXChooseFBConfig() crashed if attribList pointer was NULL
- program state.light[n].spot.direction.w was wrong value (bug 3083)
- fragment program fog option required glEnable(GL_FOG) - wrong.
- glColorTable() could produce a Mesa implementation error (bug 3135)
- RasterPos could get corrupted by color index rendering path
- Removed bad XTranslateCoordinates call when rendering to Pixmaps
- glPopAttrib() didn't properly restore GL_TEXTURE_GEN enable state
- fixed a few Darwin compilation problems
6.3.1
This was an intermediate release for X.org which wasn't otherwise released.
6.3.2 August 19, 2005
New:
- The distribution now includes the DRI drivers and GLX code
Changes:
- Made the DRI "new" driver interface standard, remove old code
Bug fixes:
- GL_ARB_vertex/fragment_shader were mistakenly listed in the
extensions string
- negative relative addressing in vertex programs was broken
- update/fix SPARC assembly code for vertex transformation
- fixed memory leak when freeing GLX drawables/renderbuffers
- fixed display list memory leak
- the GL_PIXEL_MAP_I_TO_I table is now floating point, not integer
- wglGetProcAddress() didn't handle wgl-functions
- fixed glxext.h cross-compile issue (Colin Harrison)
- assorted DRI driver fixes
6.4 October 24, 2005
New:
- Added a fast XOR line drawing function in Xlib driver
- Added support for GL_ARB_texture_mirrored_repeat to savage
driver (supported only on Savage4 hardware).
Changes:
- Mesa now packaged in three parts: Library, Demos and GLUT
Bug fixes:
- GLX_X_RENDERABLE token wasn't accepted by glXChooseFBConfig
- Some files were present multiple times in the 6.3.2 tarballs
- r200_vtxtmp_x86.S file was missing from 6.3.2 tarball (bug 4207)
- glxgears_fbconfig demo didn't work (bug 4237)
- fixed bug when bilinear sampling 2d textures with borders
- glXCreatePbuffer() could segfault instead of returning 0 (bug 4235)
- fixed undefined frexp and rand in X.org libGLcore.a (bug 4242)
- fixed a few problems with proxy color tables (bug 4270)
- fixed precision problem in Z clearing (bug 4395)
- glBitmap, glDraw/CopyPixels mistakenly generated selection hits
- fixed potential segfault caused by reading pixels outside
of renderbuffer bounds
- glGetTexLevelParameter didn't accept GL_TEXTURE_DEPTH_SIZE_ARB
- fixed memory corruption bug involving software alpha buffers
- glReadPixels clipped by window bounds was sometimes broken
- glDraw/CopyPixels of stencil data ignored the stencil write mask
- glReadPixels from a texture bound to a framebuffer object didn't work
- glIsRender/FramebufferEXT weren't totally correct
- fixed a number of point size attenuation/fade bugs
- fixed glFogCoord bug 4729
- GLX encoding for transpose matrix functions was broken
- fixed broken fragment program KIL and SWZ instructions
- fragment programs that wrote result.depth.z didn't work
6.4.1 November 30, 2005
Bug fixes:
- redefining a vertex program string didn't take effect in TNL module
- fixed occasional segfault upon vertex/fragment parsing error
- vertex program LIT instruction didn't handle 0^0=1 correctly
- fragment program fog option didn't work with glDrawPixels, glBitmap
- USE_MGL_NAMESPACE didn't work for x86-64
- OSMesa demos were missing from previous release tarballs
- fixed problem with float->ushort conversion in glClear (bug 4992)
- popping of GL_EYE_PLANE texgen state was broken (bug 4996)
- popping of GL_SPOT_DIRECTION light state was broken (bug 5005)
- fixed occasional triangle color interpolation problem on VMS
- work around invalid free() call (bug 5131)
- fixed BSD X server compilation problem by including stdint.h

View File

@@ -4,8 +4,6 @@
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<body bgcolor="#eeeeee">
<!--Override a few values from the style sheet: -->
<style>
<!--
@@ -39,7 +37,6 @@ a:visited {
<b>Download / Install</b>
<ul>
<li><a href="http://www.sourceforge.net/projects/mesa3d" target="_parent">Stable Release (6.2.1)</a>
<li><a href="download.html" target="MainFrame">Downloading/Unpacking</a>
<li><a href="install.html" target="MainFrame">Compilation/Installation</a>
<li><a href="glu.html" target="MainFrame">SGI's GLU</a>
@@ -83,6 +80,7 @@ a:visited {
<ul>
<li><a href="http://www.opengl.org" target="_parent">OpenGL website</a>
<li><a href="http://dri.sourceforge.net" target="_parent">DRI website</a>
<li><a href="http://www.freedesktop.org" target="_parent">freedesktop.org</a>
<li><a href="games.html" target="MainFrame">Games and Entertainment</a>
<li><a href="libraries.html" target="MainFrame">Libraries and Toolkits</a>
<li><a href="modelers.html" target="MainFrame">Modeling and Rendering</a>
@@ -91,9 +89,13 @@ a:visited {
<li><a href="demos.html" target="MainFrame">Demos / other</a>
</ul>
<b>Hosted by:</b>
<br>
<blockquote>
<A HREF="http://sourceforge.net"
target="_parent"><IMG SRC="http://sourceforge.net/sflogo.php?group_id=3&type=1"
WIDTH="88" HEIGHT="31" ALIGN="BOTTOM" ALT="Sourceforge.net" BORDER="0"></A>
</blockquote>
</body>
</html>

View File

@@ -6,101 +6,125 @@
<BODY>
<H1>Downloading / Unpacking</H1>
<H1>Downloading</H1>
<p>
Mesa can be downloaded from the
<a href="http://www.sourceforge.net/projects/mesa3d" target="_parent">
SourceForge download area</A>.
Current stable release: <b>6.4.1</b>
</p>
<p>
Since version 2.3, Mesa is distributed in two pieces: main library code
and demos. If you're upgrading from a previous version of Mesa or you're not
interested in the demos you can just download the core Mesa archive file.
Primary download site:
<a href="http://sourceforge.net/project/showfiles.php?group_id=3"
target="_parent">SourceForge</a>
</p>
<p>
Mesa is distributed in several parts:
</p>
<ul>
<li><b>MesaLib-x.y.z</b> - the main Mesa library source code, drivers
and documentation.
</li>
<li><b>MesaDemos-x.y.z</b> - OpenGL demonstration and test programs.
Most of the programs require GLUT (either the
<a href="http://www.opengl.org/resources/libraries/glut.html"
target="_parent">original GLUT by Mark Kilgard</a> or
<a href="http://freeglut.sourceforge.net" target="_parent">freeglut</a> or
<a href="http://freeglut.sourceforge.net" target="_parent">OpenGLUT</a>).
</li>
<li><b>MesaGLUT-x.y.z</b> - Mark Kilgard's GLUT, easily compiled and used
with Mesa. Plus, other implementation of GLUT for DOS, OS/2, BeOS, etc.
</li>
</ul>
<p>
If you're not interested in running the demos, you'll only need the first
package.
</p>
<p>
Mesa is available in at least three archive formats:
The packages are available in .tar.gz, .tar.bz2 and .zip formats.
Other organizations might offer additional package formats.
</p>
<H1>Unpacking</H1>
<p>
All the packages should be in the same directory prior to unpacking.
</p>
<ul>
<li>To unpack .tar.gz files:
<pre>
1. GNU zip/tar
Download MesaLib-X.Y.tar.gz and optionally MesaDemos-X.Y.tar.gz
Unpack with:
gzcat MesaLib-X.Y.tar.gz | tar xf -
gzcat MesaDemos-X.Y.tar.gz | tar xf -
or
gunzip MesaLib-X.Y.tar.gz ; tar xf MesaLib-X.Y.tar
gunzip MesaDemos-X.Y.tar.gz ; tar xf MesaLib-X.Y.tar
or
tar zxf MesaLib-X.Y.tar.gz
tar zxf MesaDemos-X.Y.tar.gz
If you don't have gzcat try zcat instead.
2. Unix compressed/tar
Download MesaLib-X.Y.tar.Z and optionally MesaDemos-X.Y.tar.Z
Unpack with:
zcat MesaLib-X.Y.tar.Z | tar xf -
zcat MesaDemos-X.Y.tar.Z | tar xf -
3. ZIP format
Download MesaLib-X.Y.zip and optionally MesaDemos-X.Y.zip
Unpack with:
unzip MesaLib-X.Y.zip
unzip MesaDemos-X.Y.zip
tar zxf MesaLib-X.Y.tar.gz
tar zxf MesaDemos-X.Y.tar.gz
tar zxf MesaGLUT-X.Y.tar.gz
</pre>
or
<pre>
gzcat MesaLib-X.Y.tar.gz | tar xf -
gzcat MesaDemos-X.Y.tar.gz | tar xf -
gzcat MesaGLUT-X.Y.tar.gz | tar xf -
</pre>
or
<pre>
gunzip MesaLib-X.Y.tar.gz ; tar xf MesaLib-X.Y.tar
gunzip MesaDemos-X.Y.tar.gz ; tar xf MesaDemos-X.Y.tar
gunzip MesaGLUT-X.Y.tar.gz ; tar xf MesaGLUT-X.Y.tar
</pre>
<li>To unpack .tar.bz2 files:
<pre>
bunzip2 -c MesaLib-X.Y.tar.gz | tar xf -
bunzip2 -c MesaDemos-X.Y.tar.gz | tar xf -
bunzip2 -c MesaGLUT-X.Y.tar.gz | tar xf -
</pre>
<li>To unpack .zip files:
<pre>
unzip MesaLib-X.Y.zip
unzip MesaDemos-X.Y.zip
unzip MesaGLUT-X.Y.zip
</pre>
</ul>
<h1>Contents</h1>
<p>
After unpacking you'll have these directories (and more):
After unpacking you'll have these directories:
</p>
<pre>
Makefile.X11 - top-level Makefile for X11-based systems
Make-config - system configurations used by the Makefile.X11
Makefile - top-level Makefile for most systems
configs/ - makefile parameter files for various systems
include/ - GL header (include) files
bin/ - shell scripts for making shared libraries, etc
lib/ - final client libraries, created during compilation
docs/ - documentation
src/ - source code for libraries
src/mesa - sources for the main Mesa library and device drivers
src/glu - libGLU source code
src/glw - Xt/Motif/OpenGL widget code
</pre>
If you downloaded and unpacked the MesaDemos.X.Y package:
and if you downloaded and unpacked the MesaDemos.X.Y archive:
src/glut - GLUT source code
progs/ - OpenGL programs
<pre>
progs/demos - original Mesa demos
progs/xdemos - GLX OpenGL/Mesa demos
progs/redbook - examples from the OpenGL Programming Guide
progs/samples - examples from SGI
progs/images/ - image files
</pre>
If you downloaded and unpacked the MesaGLUT.X.Y package:
<pre>
src/glut - GLUT library source code
</pre>
<p>
Proceed to <a href="install.html">compilation and installation
Proceed to the <a href="install.html">compilation and installation
instructions</a>.
</p>
<H1>GLUT</H1>
<p>
Mesa 2.5 and later includes Mark Kilgard's GLUT library (GL Utility Toolkit).
GLUT is built automatically on systems which support it.
</p>
<p>
The GLUT tests, demos, examples, etc are not included, just the main library.
To obtain the latest complete release of GLUT please visit the
<a href="http://www.opengl.org/resources/libraries/glut.html"
target ="_parent">GLUT page</a> on www.opengl.org.
</p>
</BODY>
</HTML>

View File

@@ -16,7 +16,9 @@ Mesa supports the following environment variables:
<li>MESA_NO_MMX - if set, disables Intel MMX optimizations
<li>MESA_NO_3DNOW - if set, disables AMD 3DNow! optimizations
<li>MESA_NO_SSE - if set, disables Intel SSE optimizations
<li>MESA_DEBUG - if set, error messages are printed to stderr
<li>MESA_DEBUG - if set, error messages are printed to stderr.
If the value of MESA_DEBUG is "FP" floating point arithmetic errors will
generate exceptions.
<li>MESA_NO_DITHER - if set, disables dithering, overriding glEnable(GL_DITHER)
</ul>

View File

@@ -9,7 +9,7 @@
<center>
<h1>Mesa Frequently Asked Questions</h1>
Last updated: 17 November 2004
Last updated: 21 October 2004
</center>
<br>
@@ -39,14 +39,14 @@ See the </a><a href="http://www.opengl.org/">OpenGL website</a> for more
information.
</p>
<p>
Mesa 5.x supports the OpenGL 1.4 specification.
Mesa 6.x supports the OpenGL 1.5 specification.
</p>
<h2>1.2 Does Mesa support/use graphics hardware?</h2>
<p>
Yes. Specifically, Mesa serves as the OpenGL core for the open-source
XFree86/DRI OpenGL drivers. See the <a href="http://dri.sf.net/">DRI
Yes. Specifically, Mesa serves as the OpenGL core for the open-source DRI
drivers for XFree86/X.org. See the <a href="http://dri.sf.net/">DRI
website</a> for more information.
</p>
<p>
@@ -62,7 +62,8 @@ operating systems today.
Still, Mesa serves at least these purposes:
</p>
<ul>
<li>Mesa is used as the core of the open-source XFree86/DRI hardware drivers.
<li>Mesa is used as the core of the open-source XFree86/X.org DRI
hardware drivers.
</li>
<li>Mesa is quite portable and allows OpenGL to be used on systems
that have no other OpenGL solution.
@@ -86,8 +87,8 @@ Still, Mesa serves at least these purposes:
<h2>1.4 What's the difference between"Stand-Alone" Mesa and the DRI drivers?</h2>
<p>
<em>Stand-alone Mesa</em> is the original incarnation of Mesa.
On systems running the X Window System, it does all its rendering through
the Xlib API.
On systems running the X Window System it does all its rendering through
the Xlib API:
<ul>
<li>The GLX API is supported, but it's really just an emulation of the
real thing.
@@ -116,21 +117,10 @@ within the DRI (Direct Rendering Infrastructure):
<h2>1.5 How do I upgrade my DRI installation to use a new Mesa release?</h2>
<p>
You don't! A copy of the Mesa source code lives inside the XFree86/DRI source
tree and gets compiled into the individual DRI driver modules.
If you try to install Mesa over an XFree86/DRI installation, you'll lose
hardware rendering (because stand-alone Mesa's libGL.so is different than
the XFree86 libGL.so).
</p>
<p>
The DRI developers will incorporate the latest release of Mesa into the
DRI drivers when the time is right.
</p>
<p>
To upgrade, either look for a new release of <a href="http://www.xfree86.org"
target="_parent">XFree86</a> or visit the
<a href="http://dri.sf.net" target="_parent">DRI website</a> to see
if there's newer drivers.
This wasn't easy in the past.
Now, the DRI drivers are included in the Mesa tree and can be compiled
separately from the X server.
Just follow the Mesa <a href="install.html">compilation instructions</a>.
</p>
@@ -201,7 +191,7 @@ Mesa no longer supports GNU autoconf/automake. Why?
</ul>
<p>
Now, Mesa again uses a conventional Makefile system (as it did originally).
Now Mesa again uses a conventional Makefile system (as it did originally).
Basically, each Makefile in the tree includes one of the configuration
files from the config/ directory.
The config files specify all the variables for a variety of popular systems.
@@ -219,9 +209,9 @@ Mesa's not the solution.
<h2><a name="part2">2.4 Where is the GLUT library?</a></h2>
<p>
<a name="part2">GLUT (OpenGL Utility Toolkit) is in the separate MesaDemos-x.y.z.tar.gz file.
If you don't already have GLUT installed, you should grab the MesaDemos
package and unpack it before compiling Mesa.
<a name="part2">GLUT (OpenGL Utility Toolkit) is in the separate MesaGLUT-x.y.z.tar.gz file.
If you don't already have GLUT installed, you should grab the MesaGLUT
package and compile it with the rest of Mesa.
</a></p>
@@ -250,7 +240,7 @@ Mesa version number.
version number.
</li></ul>
<p>
After installing XFree86 and the DRI drivers, some of these files
After installing XFree86/X.org and the DRI drivers, some of these files
may be symlinks into the /usr/X11R6/ tree.
</p>
<p>

View File

@@ -24,7 +24,7 @@ We're no longer developing the original Mesa GLU library.
</p>
<p>
The new SI GLU library code is included in the Mesa package.
The SI GLU library code is included in the Mesa distribution.
You don't have to download it separately.
</p>

View File

@@ -21,53 +21,77 @@
<a name="unix-x11">
<H2>1. Unix/X11 Compilation and Installation</H1>
<p>
Mesa uses a rather conventional Makefile system.
A GNU autoconf/automake system used to be included, but was discarded
in Mesa 5.1 because:
</p>
<ul>
<li>It seldom worked on IRIX, Solaris, AIX, etc.
<li>It was very compilicated
<li>Nobody maintained it
<li>libtool was just too weird
</ul>
<p>
If someone strongly feels that Mesa should have a autoconf/automake
system and wants to contribute one and maintain it, we'll consider
adding it again.
</p>
<p>
In Mesa 6.1 we modified the conventional Makefile system.
Instead of specifying all the various system configurations in the
Make-config file, there's a directory named <code>configs/</code> which
has an individual file for each configuration.
One of the configs gets copied to <code>configs/current</code>, which
is then included by all Makefiles.
</p>
<h3>1.1 Compilation</h3>
<p>
Note: if you've obtained Mesa through CVS, do this first:
Mesa may be compiled in several different ways:
</p>
<pre>
cd Mesa
chmod a+x bin/mklib
</pre>
<ul>
<li><b><em>Stand-alone/Xlib mode</em></b> - Mesa is compiled as
a software renderer using Xlib to do all rendering.
libGL.so is a self-contained rendering library.
<p>
Just type <b>make</b> in the top-level directory.
To compile stand-alone Mesa type <b>make</b> in the top-level directory.
You'll see a list of supported system configurations.
Choose one from the list (such as linux-x86), and type:
</p>
<pre>
make linux-x86
</pre>
<p>This will produce libGL.so and several other libraries</p>
</li>
<li><b><em>DRI/accelerated</em></b> - The DRI hardware drivers (for ATI,
Intel, Matrox, etc) are built.
libGL.so implements the GLX extension and dynamically loads the DRI drivers.
<p>
If you want to rebuild for a different configuration run
To build the DRI drivers you'll first need to have the DRM (Direct
Rendering Manager) kernel drivers and header files.
They're available from the <a href="http://dri.sf.net/" target="_parent">DRI</a> project.
</p>
<p>
You can get them from CVS by doing:
<pre>
cvs -d:pserver:anonymous@pds.freedesktop.org:/cvs/dri login
(hit enter when prompted for a password)
cvs -z3 -d:pserver:anonymous@pdx.freedesktop.org:/cvs/dri co drm
</pre>
<p>
Make note of the directory in which the drm files are placed.
</p>
<p>
See the <a href="http://dri.freedesktop.org/wiki/Building" target="_parent">
DRI Building Instructions</a> for the steps to build the DRM modules.
</p>
<p>
Next, in the <code>Mesa-x.y.z/configs/default</code> file, set the
<code>DRM_SOURCE_PATH</code> variable to indicate where the DRM files
are located.
</p>
<p>
Now build Mesa and the DRI drivers by running
</p>
<pre>
make linux-dri
</pre>
<p>
There are also <code>linux-dri-x86</code>, <code>linux-dri-x86-64</code>,
and <code>linux-ppc</code> configurations, optimized for those architectures.
</p>
<p>
Finally, you'll need a DRI-enabled X server from
<a href="http://freedesktop.org/wiki/Software_2fXserver" target="_parent">
X.org</a> or <a href="http://www.xfree86.org" target="_parent">XFree86</a>.
Visit those projects' home pages for more information.
</p>
</li>
</ul>
<p>
Later, if you want to rebuild for a different configuration run
<code>make realclean</code> before rebuilding.
</p>
@@ -75,7 +99,8 @@ If you want to rebuild for a different configuration run
<h3>1.2 The libraries</h3>
<p>
When compilation has finished, look in the top-level <b>lib/</b> directory.
When compilation has finished, look in the top-level <code>lib/</code>
directory.
You'll see a set of library files similar to this:
</p>
<pre>
@@ -108,6 +133,23 @@ lrwxrwxrwx 1 brian users 23 Mar 26 07:53 libOSMesa.so.6 -> libOSM
<b>libOSMesa</b> is the OSMesa (Off-Screen) interface library.
</p>
<p>
If you built the DRI hardware drivers, you'll also see the DRI drivers:
</p>
<pre>
-rwxr-xr-x 1 brian users 11320803 Jul 21 12:11 mach64_dri.so
-rwxr-xr-x 1 brian users 11418014 Jul 21 12:12 mga_dri.so
-rwxr-xr-x 1 brian users 11064426 Jul 21 12:12 r128_dri.so
-rwxr-xr-x 1 brian users 11849858 Jul 21 12:12 r200_dri.so
-rwxr-xr-x 1 brian users 11757388 Jul 21 12:12 radeon_dri.so
-rwxr-xr-x 1 brian users 11232304 Jul 21 12:13 s3v_dri.so
-rwxr-xr-x 1 brian users 11062970 Jul 21 12:13 savage_dri.so
-rwxr-xr-x 1 brian users 11214212 Jul 21 12:13 sis_dri.so
-rwxr-xr-x 1 brian users 11368736 Jul 21 12:13 tdfx_dri.so
-rwxr-xr-x 1 brian users 10598868 Jul 21 12:13 trident_dri.so
-rwxr-xr-x 1 brian users 10997120 Jul 21 12:13 unichrome_dri.so
</pre>
<h3>1.3 Running the demos</h3>

View File

@@ -82,7 +82,7 @@ my work hours at the Space Science and Engineering Center at the University
of Wisconsin in Madison. My supervisor, Bill Hibbard, lets me do this because
Mesa is now being using for the <a href="http://www.ssec.wisc.edu/%7Ebillh/vis.html" target="_parent">Vis5D</a> project.
</p><p>
October 1996: Mesa 2.0 is released. It implementes the OpenGL 1.1 specification.
October 1996: Mesa 2.0 is released. It implements the OpenGL 1.1 specification.
</p>
<p>
@@ -134,8 +134,8 @@ GL_ARB_fragment_program extensions.
<p>
Ongoing: Mesa is used as the core of many hardware OpenGL drivers for XFree86
within the
Ongoing: Mesa is used as the core of many hardware OpenGL drivers for
the XFree86 X.org X servers within the
<A href="http://dri.sourceforge.net/" target="_parent">DRI project</A>.
I continue to enhance Mesa with new extensions and features.
</p>
@@ -146,7 +146,8 @@ I continue to enhance Mesa with new extensions and features.
<p>
This is a summary of the major versions of Mesa. Note that Mesa's major
version number tracks OpenGL's minor version number.
version number tracks OpenGL's minor version number (+1).
Work is underway to implement the OpenGL 2.0 specification.
</p>
@@ -162,10 +163,11 @@ extensions incorporated as standard features:
</ul>
<p>
Also note that several OpenGL tokens were renamed in OpenGL 1.5
for the sake of consistency. The old names will still be valid.
for the sake of consistency.
The old tokens are still available.
</p>
<pre>
New Name Old Name
New Token Old Token
------------------------------------------------------------
GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE
GL_FOG_COORD GL_FOG_COORDINATE

View File

@@ -13,17 +13,18 @@ The Mesa distribution consists of several components. Different copyrights
and licenses apply to different components. For example, GLUT is copyrighted
by Mark Kilgard, some demo programs are copyrighted by SGI, some of the Mesa
device drivers are copyrighted by their authors. See below for a list of
Mesa's components and the copyright/license for each.
Mesa's main components and the license for each.
</p>
<p>
The core Mesa library is licensed according to the terms of the XFree86
copyright (an MIT-style license). This allows integration with the
XFree86/DRI project. Unless otherwise stated, the Mesa source code and
documentation is licensed as follows:
The core Mesa library is licensed according to the terms of the MIT license.
This allows integration with the XFree86, Xorg and DRI projects.
</p>
<p>
The default Mesa license is as follows:
</p>
<pre>
Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@@ -47,70 +48,38 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
<H1>Attention, Contributors</H1>
<p>
When contributing to the Mesa project you must agree to relinquish your
work to the holder of the copyright for the particular component you're
contributing to. That is, you can't put your own copyright on the code,
unless it's a modular piece that can be omitted from Mesa (like a new
device driver). If for example, you contribute a bug fix to Mesa's
texture mapping code, your code will become a part of the body of work
which is copyrighted by Brian Paul and licensed by the above terms.
When contributing to the Mesa project you must agree to the licensing terms
of the component to which you're contributing.
The following section lists the primary components of the Mesa distribution
and their respective licenses.
</p>
<H1>Mesa Component Licenses</H1>
<pre>
Mesa Component Licenses:
Component Files Primary Author License
Component Location Primary Author License
----------------------------------------------------------------------------
core Mesa code src/*.[ch] Brian Paul Mesa
include/GL/gl.h
Main Mesa code src/mesa/ Brian Paul Mesa (MIT)
GLX driver src/X/* Brian Paul Mesa
include/GL/glx.h
include/GL/xmesa.h
Device drivers src/mesa/drivers/* See drivers See drivers
OS/Mesa driver src/OSmesa/* Brian Paul Mesa
include/GL/osmesa.h
Ext headers include/GL/glext.h SGI SGI Free B
include/GL/glxext.h
3Dfx driver src/FX/* David Bucciarelli Mesa
include/GL/fxmesa.h
GLUT src/glut/ Mark Kilgard Mark's copyright
BeOS R4 driver src/BeOS/* Brian Paul Mesa
Mesa GLU library src/glu/mesa/ Brian Paul GNU-LGPL
MGL driver src/MGL/* SciTech, Inc SciTech copyright
include/GL/mglmesa.h
SGI GLU library src/glu/sgi/ SGI SGI Free B
Windows driver src/Windows/* Li Wei copyright by Li Wei
include/GL/wmesa.h
demo programs progs/demos/ various see source files
SVGA driver src/SVGA/* Brian Paul GNU-LGPL
include/GL/svgamesa.h
X demos progs/xdemos/ Brian Paul see source files
DOS driver src/DOS/* Charlie Wallace GNU-LGPL
include/GL/dosmesa.h
SGI demos progs/samples/ SGI SGI copyright
GGI driver src/GGI/* Uwe Maurer GNU-LGPL
include/GL/ggimesa.h
S3 driver src/S3/* S3, Inc. S3 copyright
GLUT src-glut/* Mark Kilgard Mark's copyright
include/GL/*glut*.h
GLU library src-glu/* Brian Paul GNU-LGPL
SI GLU library si-glu/* SGI SGI Free B
include/GL/glu.h
Ext registry include/GL/glext.h SGI SGI Free B
include/GL/glxext.h
demo programs demos/* various see source files
X demos xdemos/* Brian Paul see source files
SGI demos samples/* SGI SGI copyright
RedBook demos book/* SGI SGI copyright
RedBook demos progs/redbook/ SGI SGI copyright
</pre>
</body>

View File

@@ -30,7 +30,8 @@ SourceForge lists page.</a>
with the mailing lists please contact the SourceForge administrators for help.</p>
<p>Archives of the old Mesa mailing list which was hosted by unicamp.br
are available <a href="http://groups.yahoo.com/group/mesa/messages/">here</a>.</p>
are available <a href="http://groups.yahoo.com/group/mesa/messages/"
target="_parent">here</a>.</p>
<p>
Here are some other OpenGL-related forums you might find useful:
@@ -46,7 +47,8 @@ Usenet newsgroups:
</p>
<p>
<a href="http://www.opengl.org/">OpenGL discussion forums</A> at www.opengl.org
<a href="http://www.opengl.org/" target="_parent">OpenGL discussion forums</A>
at www.opengl.org
</p>
</HTML>

View File

@@ -1,7 +1,6 @@
/* Mesa CSS */
body {
background-color: #ffffff;
/*background-color: #55bbff;*/
font: 14px 'Lucida Grande', Geneva, Arial, Verdana, sans-serif;
color: black;
link: #111188;

View File

@@ -32,7 +32,7 @@
- VRML viewer
</li><li><a href="http://aig.cs.man.ac.uk/systems/Maverik/" target="_parent">Maverik</a>
- VR graphics and interaction system
</li><li><a href="http://www.swissquake.ch/chumb.alum-soft" target="_parent">MD2 Viewer</a>
</li><li><a href="http://www.swissquake.ch/chumbalum-soft/md2v" target="_parent">MD2 Viewer</a>
- View .MD2 files
</li><li><a href="http://www.megacads.dlr.de/" target="_parent">MegaCads</a>
- Multiblock-Elliptic-Grid-Generation-And-CAD-System

View File

@@ -6,9 +6,180 @@
<BODY>
<body bgcolor="#eeeeee">
<H1>News</H1>
<h2>November 29, 2005</h2>
<p>
Mesa 6.4.1 has been released. This is a stable, bug-fix release.
</p>
<pre>
Bug fixes:
- redefining a vertex program string didn't take effect in TNL module
- fixed occasional segfault upon vertex/fragment parsing error
- vertex program LIT instruction didn't handle 0^0=1 correctly
- fragment program fog option didn't work with glDrawPixels, glBitmap
- USE_MGL_NAMESPACE didn't work for x86-64
- OSMesa demos were missing from previous release tarballs
- fixed problem with float->ushort conversion in glClear (bug 4992)
- popping of GL_EYE_PLANE texgen state was broken (bug 4996)
- popping of GL_SPOT_DIRECTION light state was broken (bug 5005)
- fixed occasional triangle color interpolation problem on VMS
- work around invalid free() call (bug 5131)
- fixed BSD X server compilation problem by including stdint.h
</pre>
<p>
The MD5 checksums are:
</p>
<pre>
TBD
</pre>
<h2>October 24, 2005</h2>
<p>
Mesa 6.4 has been released. This is a stable, bug-fix release.
</p>
<pre>
New:
- Added a fast XOR line drawing function in Xlib driver
- Added support for GL_ARB_texture_mirrored_repeat to savage
driver (supported only on Savage4 hardware).
Changes:
- Mesa now packaged in three parts: Library, Demos and GLUT
Bug fixes:
- GLX_X_RENDERABLE token wasn't accepted by glXChooseFBConfig
- Some files were present multiple times in the 6.3.2 tarballs
- r200_vtxtmp_x86.S file was missing from 6.3.2 tarball (bug 4207)
- glxgears_fbconfig demo didn't work (bug 4237)
- fixed bug when bilinear sampling 2d textures with borders
- glXCreatePbuffer() could segfault instead of returning 0 (bug 4235)
- fixed undefined frexp and rand in X.org libGLcore.a (bug 4242)
- fixed a few problems with proxy color tables (bug 4270)
- fixed precision problem in Z clearing (bug 4395)
- glBitmap, glDraw/CopyPixels mistakenly generated selection hits
- fixed potential segfault caused by reading pixels outside
of renderbuffer bounds
- glGetTexLevelParameter didn't accept GL_TEXTURE_DEPTH_SIZE_ARB
- fixed memory corruption bug involving software alpha buffers
- glReadPixels clipped by window bounds was sometimes broken
- glDraw/CopyPixels of stencil data ignored the stencil write mask
- glReadPixels from a texture bound to a framebuffer object didn't work
- glIsRender/FramebufferEXT weren't totally correct
- fixed a number of point size attenuation/fade bugs
- fixed glFogCoord bug 4729
- GLX encoding for transpose matrix functions was broken
- fixed broken fragment program KIL and SWZ instructions
</pre>
<p>
The MD5 checksums are:
</p>
<pre>
1cce0c1eb4fd15e9dfe837a1ce0c9812 MesaLib-6.4.tar.gz
85a84e47a3f718f752f306b9e0954ef6 MesaLib-6.4.tar.bz2
b976fea4f3ee06354c53f91b6e3f2ffc MesaLib-6.4.zip
d8734f2c69bcf7ef9f5ae454a85743ba MesaDemos-6.4.tar.gz
1a8c4d4fc699233f5fdb902b8753099e MesaDemos-6.4.tar.bz2
607ab7c7a7de0cc5febbdde2bfa03098 MesaDemos-6.4.zip
3260156f66174322a092be0767962d34 MesaGLUT-6.4.tar.gz
0465d053f83775f44a12dec4050dfd78 MesaGLUT-6.4.tar.bz2
02abfcdcdf72ba938ae00f6e3b70fbe0 MesaGLUT-6.4.zip
</pre>
<h2>August 19, 2005</h2>
<p>
Mesa 6.3.2 has been released.
Note: there was no public release of version 6.3.1.
</p>
<pre>
New:
- The distribution now includes the DRI drivers and GLX code
Changes:
- Made the DRI "new" driver interface standard, remove old code
Bug fixes:
- GL_ARB_vertex/fragment_shader were mistakenly listed in the
extensions string
- negative relative addressing in vertex programs was broken
- update/fix SPARC assembly code for vertex transformation
- fixed memory leak when freeing GLX drawables/renderbuffers
- fixed display list memory leak
- the GL_PIXEL_MAP_I_TO_I table is now floating point, not integer
- wglGetProcAddress() didn't handle wgl-functions
- fixed glxext.h cross-compile issue (Colin Harrison)
- assorted DRI driver fixes
</pre>
<p>
The MD5 checksums are:
</p>
<pre>
98192e45ed8d69113688f89f90869346 MesaLib-6.3.2.tar.gz
0df27701df0924d17ddf41185efa8ce1 MesaLib-6.3.2.tar.bz2
ccb2423aab77fc7e81ce628734586140 MesaLib-6.3.2.zip
9d0fca0a7d051c34a0b485423fb3e85d MesaDemos-6.3.2.tar.gz
96708868450c188205e42229b5d813c4 MesaDemos-6.3.2.tar.bz2
c5102501e609aa8996d832fafacb8ab9 MesaDemos-6.3.2.zip
</pre>
<h2>July 20, 2005</h2>
<p>
Mesa 6.3 has been released.
This is a development release with new features, changes and bug fixes.
</p>
<pre>
New:
- GL_EXT_framebuffer_object extension
- GL_ARB_draw_buffers extension
- GL_ARB_pixel_buffer_object extension
- GL_OES_read_format extension (Ian Romanick)
- DirectFB driver (Claudio Ciccani)
- x86_64 vertex transformation code (Mikko T.)
Changes:
- added -stereo option for glxgears demo (Jacek Rosik)
- updated the PBuffer demo code in xdemos/ directory
- glDeleteTextures/Programs/Buffers() now makes the object ID
available for immediate re-use
- assorted 64-bit clean-ups fixes (x86_64 and Win64)
- lots of internal changes for GL_EXT_framebuffer_object
Bug fixes:
- some functions didn't support PBO functionality
- glGetTexImage didn't convert color index images to RGBA as required
- fragment program texcoords were sometimes wrong for points and lines
- fixed problem with negative dot product in arbfplight, fplight demos
- fixed bug in perspective correction of antialiased, textured lines
- querying GL_POST_CONVOLUTION_ALPHA_BIAS_EXT returned wrong value
- fixed a couple per-pixel fog bugs (Soju Matsumoto)
- glGetBooleanv(GL_FRAGMENT_PROGRAM_BINDING_NV) was broken
- fixed float parsing bug in ARB frag/vert programs (bug 2520)
- XMesaGetDepthBuffer() returned incorrect value for bytesPerValue
- GL_COLOR_MATERIAL with glColor3 didn't properly set diffuse alpha
- glXChooseFBConfig() crashed if attribList pointer was NULL
- program state.light[n].spot.direction.w was wrong value (bug 3083)
- fragment program fog option required glEnable(GL_FOG) - wrong.
- glColorTable() could produce a Mesa implementation error (bug 3135)
- RasterPos could get corrupted by color index rendering path
- Removed bad XTranslateCoordinates call when rendering to Pixmaps
- glPopAttrib() didn't properly restore GL_TEXTURE_GEN enable state
- fixed a few Darwin compilation problems
</pre>
<p>
The MD5 checksums are:
</p>
<pre>
0236f552d37514776945d5a013e5bb7b MesaLib-6.3.tar.gz
60e1a8f78c4a8c7750a1e95753190986 MesaLib-6.3.tar.bz2
ca7c950fbace68c70caa822322db7223 MesaLib-6.3.zip
25ea801645b376c014051804fe4974b2 MesaDemos-6.3.tar.gz
9248e74872ea88c57ec25c900c295057 MesaDemos-6.3.tar.bz2
8537dfa734ef258dcc7272097558d434 MesaDemos-6.3.zip
</pre>
<h2>December 9, 2004</h2>
<p>
Mesa 6.2.1 has been released.
@@ -960,6 +1131,6 @@ source code</a>.</p>
<hr>
$Id: news.html,v 3.19 2005/05/05 14:18:31 brianp Exp $
$Id: news.html,v 3.24.2.4 2005/11/30 01:15:50 brianp Exp $
</body>
</html>
</html>

View File

@@ -13,6 +13,9 @@ The release notes summarize what's new or changed in each Mesa release.
</p>
<UL>
<LI><A HREF="RELNOTES-6.4.1">RELNOTES-6.4.1</A>
<LI><A HREF="RELNOTES-6.4">RELNOTES-6.4</A>
<LI><A HREF="RELNOTES-6.3.2">RELNOTES-6.3.2</A>
<LI><A HREF="RELNOTES-6.3">RELNOTES-6.3</A>
<LI><A HREF="RELNOTES-6.2.1">RELNOTES-6.2.1</A>
<LI><A HREF="RELNOTES-6.2">RELNOTES-6.2</A>

View File

@@ -14,98 +14,43 @@ supported on those systems. All you need is an ANSI C compiler and the
X development environment to use Mesa.
</p>
<p>Others have contributed drivers
for the Amiga, Apple Macintosh, BeOS, NeXT, OS/2, MS-DOS, VMS, Windows
<p>
The DRI hardware drivers for the X.org server and XFree86 provide
hardware accelerated rendering for chips from ATI, Intel, Matrox, 3dfx
and others on Linux and FreeBSD.
</p>
<p>
Drivers for other assorted platforms include:
the Amiga, Apple Macintosh, BeOS, NeXT, OS/2, MS-DOS, VMS, Windows
9x/NT, and Direct3D.
</p>
<p>
The following files describe the details for various platforms.
Be warned, some of these files (and drivers) may be very out of date.
Details about particular drivers follows.
Be warned that some drivers may be out of date and no longer function.
</p>
<UL>
<LI><A HREF="README.X11">README.X11</A> - X Window System / Unix / Linux
<LI><A HREF="README.WIN32">README.WIN32</A> - Microsoft Windows
<LI><A HREF="README.VMS">README.VMS</A> - DEC VMS
<LI><A HREF="README.GGI">README.GGI</A> - GGI
<LI><A HREF="README.3DFX">README.3DFX</A> - 3Dfx/Glide driver
<LI><A HREF="README.AMIWIN">README.AMIWIN</A> - Amiga Amiwin
<LI><A HREF="README.BEOS">README.BEOS</A> - BeOS
<LI><A HREF="README.D3D">README.D3D</A> - Direct3D driver
<LI><A HREF="README.DJ">README.DJ</A> - DJGPP
<LI><A HREF="README.LYNXOS">README.LYNXOS</A> - LynxOS
<LI><A HREF="README.MINGW32">README.MINGW32</A> - Mingw32
<LI><A HREF="README.NeXT">README.NeXT</A> - NeXT
<LI><A HREF="README.OpenStep">README.OpenStep</A> - OpenStep
<LI><A HREF="README.OS2">README.OS2</A> - OS/2
<LI><A HREF="README.WINDML">README.WINDML</A> - WindML
<LI>Xlib driver for the X Window System <A HREF="README.X11">(README.X11)</A>
<li><a href="http://dri.sourceforge.net/" target="_parent">
DRI hardware drivers</a> for the X window system
<LI>Microsoft Windows <A HREF="README.WIN32">(README.WIN32)</A>
<LI>DEC VMS <A HREF="README.VMS">(README.VMS)</A>
<LI>3dfx/Glide <A HREF="README.3DFX">(README.3DFX)</A>
<LI>GGI <A HREF="README.GGI">(README.GGI)</A>
<LI>Amiga Amiwin <A HREF="README.AMIWIN">(README.AMIWIN)</A>
<LI>BeOS <A HREF="README.BEOS">(README.BEOS)</A>
<LI>Direct3D driver <A HREF="README.D3D">(README.D3D)</A>
<LI>DJGPP <A HREF="README.DJ">(README.DJ)</A>
<LI>LynxOS <A HREF="README.LYNXOS">(README.LYNXOS)</A>
<LI>Mingw32 <A HREF="README.MINGW32">(README.MINGW32)</A>
<LI>NeXT <A HREF="README.NeXT">(README.NeXT)</A>
<LI>OpenStep <A HREF="README.OpenStep">(README.OpenStep)</A>
<LI>OS/2 <A HREF="README.OS2">(README.OS2)</A>
<LI>WindML <A HREF="README.WINDML">(README.WINDML)</A>
<LI><a href="http://utah-glx.sourceforge.net/" target="_parent">Utah GLX drivers</a>
</UL>
<p>
The standard Mesa distribution only supports software-based rendering, with
the exception of the 3Dfx Glide driver.
Information about other hardware support follows.
</p>
<ul>
<li>DRI-based hardware support for 3dfx, Intel, Matrox, ATI with XFree86
<blockquote>
<p>The <a href="http://dri.sourceforge.net/" target="_parent">DRI architecture</a>,
originally developed by Precision Insight, Inc. uses Mesa and
provides hardware acceleration for a number of popular chipsets.<br>
<br>
The DRI is part of XFree86 4.0 and later.
<br><br>
If you download and install XFree86 4.x you do not need to
install Mesa separately. All the important parts of Mesa
will be installed with the rest of XFree86.
</blockquote>
<li>3dfx Voodoo1, Voodoo2, Voodoo Rush, Voodoo Banshee, Voodoo3
<blockquote>
<p>All cards based on these chipsets should work with Linux and
Windows 95 via 3dfx's Glide library.
The Mesa/Glide driver is included with the Mesa distribution.
You'll need to install the Glide header files and runtime library.
</p>
<p>
David Bucciarelli wrote the original 3dfx driver for Mesa.<br>
Daryll Strauss ported Glide to Linux.
</p>
</blockquote>
<li>Matrox G200/G400, nVidia RIVA, ATI Rage Pro, Intel i810 on Linux
<blockquote>
<p>The <a href="http://utah-glx.sourceforge.net/" target="_parent">
Utah GLX project</a>
(no longer active) developed drivers for these chipsets and others.
</blockquote>
<li>Amiga Warp3D
<blockquote>
<p>Amiga systems can support 3D hardware with the Warp3D API.
See <a href="http://www.haage-partner.com/3dworld" target="_parent">here</a>.
</blockquote>
<li>Also see
<blockquote>
<p><a href="http://www.linux3d.org/" target="_parent">www.linux3d.org</a> for
other 3D hardware info for Linux.
</blockquote>
</ul>
<p>
<b><em>Note:</em></b>
If you have NVIDIA hardware in your computer,
you should download and install NVIDIA's OpenGL library. You may
however, want to download Mesa in order to use its GLU and GLUT
libraries, or assorted demo programs.</p>
</body>
</html>

View File

@@ -52,9 +52,9 @@ extern "C" {
/*************************************************************/
/* Header file version number, required by OpenGL ABI for Linux */
/* glext.h last updated 2005/05/31 */
/* glext.h last updated 2005/06/20 */
/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */
#define GL_GLEXT_VERSION 28
#define GL_GLEXT_VERSION 29
#ifndef GL_VERSION_1_2
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
@@ -3023,7 +3023,6 @@ extern "C" {
#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
#define GL_STENCIL_INDEX_EXT 0x8D45
#define GL_STENCIL_INDEX1_EXT 0x8D46
#define GL_STENCIL_INDEX4_EXT 0x8D47
#define GL_STENCIL_INDEX8_EXT 0x8D48

View File

@@ -331,13 +331,24 @@ typedef struct {
} GLXBufferClobberEventSGIX;
#endif
#if defined(__UNIXOS2__) || defined(__SOL64__)
#if defined(__sun__)
#include <inttypes.h>
#if defined(__STDC__)
#if defined(__arch64__)
typedef long int int64_t;
#else
typedef long long int int64_t;
#endif /* __arch64__ */
#endif /* __STDC__ */
#elif defined(__UNIXOS2__) || defined(__SOL64__)
typedef long int int32_t;
typedef long long int int64_t;
#elif defined( __VMS )
#include <inttypes.h>
#elif defined(__SCO__) || defined(__USLC__)
#include <stdint.h>
#elif defined(WIN32) && defined(__GNUC__)
#include <stdint.h>
#endif
#ifndef GLX_VERSION_1_3

View File

@@ -38,14 +38,7 @@
#ifndef DRI_INTERFACE_H
#define DRI_INTERFACE_H
#ifndef DRI_NEW_INTERFACE_ONLY
# include <X11/X.h>
# include <GL/glx.h>
# include "GL/glxint.h"
#endif
#include <GL/internal/glcore.h>
#include <xf86drm.h>
#include <drm.h>
/**
@@ -62,6 +55,7 @@ typedef struct __DRIdrawableRec __DRIdrawable;
typedef struct __DRIdriverRec __DRIdriver;
typedef struct __DRIframebufferRec __DRIframebuffer;
typedef struct __DRIversionRec __DRIversion;
typedef struct __DRIinterfaceMethodsRec __DRIinterfaceMethods;
typedef unsigned long __DRIid;
typedef void __DRInativeDisplay;
/*@}*/
@@ -71,42 +65,6 @@ typedef void __DRInativeDisplay;
* \name Functions provided by the driver loader.
*/
/*@{*/
extern __DRIscreen *__glXFindDRIScreen(__DRInativeDisplay *dpy, int scrn);
/**
* Type of a pointer to \c __glXGetInternalVersion, as returned by
* \c glXGetProcAddress.
*
* \sa __glXGetInternalVersion, glXGetProcAddress
*/
typedef int (* PFNGLXGETINTERNALVERSIONPROC) ( void );
/**
* Type of a pointer to \c __glXWindowExists, as returned by
* \c glXGetProcAddress.
*
* \sa __glXWindowExists, glXGetProcAddress
*/
typedef GLboolean (* PFNGLXWINDOWEXISTSPROC) (__DRInativeDisplay *dpy, __DRIid draw);
/**
* Type of a pointer to \c __glXGetUST, as returned by \c glXGetProcAddress.
*
* \sa __glXGetUST, glXGetProcAddress
*/
typedef int (* PFNGLXGETUSTPROC) ( int64_t * ust );
/**
* Type of pointer to \c __glXCreateContextModes, as returned by
* \c glXGetProcAddress.
*
* \sa _gl_context_modes_create, glXGetProcAddress
*/
typedef __GLcontextModes * (* PFNGLXCREATECONTEXTMODES) ( unsigned count,
size_t minimum_bytes_per_struct );
/**
* Type of a pointer to \c glXGetScreenDriver, as returned by
* \c glXGetProcAddress. This function is used to get the name of the DRI
@@ -127,39 +85,11 @@ typedef const char * (* PFNGLXGETSCREENDRIVERPROC) (__DRInativeDisplay *dpy, int
typedef const char * (* PFNGLXGETDRIVERCONFIGPROC) (const char *driverName);
/**
* Type of a pointer to \c __glXScrEnableExtension, as returned by
* \c glXGetProcAddress. This function is used to enable a GLX extension
* on the specified screen.
*
* \sa __glXScrEnableExtension, glXGetProcAddress
* Type of a pointer to \c glxEnableExtension, as returned by
* \c __DRIinterfaceMethods::getProcAddress. This function is used to enable
* a GLX extension on the specified screen.
*/
typedef void (* PFNGLXSCRENABLEEXTENSIONPROC) ( void *psc, const char * name );
/**
* Type of a pointer to \c __glXGetDrawableInfo, as returned by
* \c glXGetProcAddress. This function is used to get information about the
* position, size, and clip rects of a drawable.
*
* \sa __glXGetDrawableInfo, glXGetProcAddress
*/
typedef GLboolean (* PFNGLXGETDRAWABLEINFOPROC) ( __DRInativeDisplay *dpy, int scrn,
__DRIid draw, unsigned int * index, unsigned int * stamp,
int * x, int * y, int * width, int * height,
int * numClipRects, drm_clip_rect_t ** pClipRects,
int * backX, int * backY,
int * numBackClipRects, drm_clip_rect_t ** pBackClipRects );
/* Test for the xf86dri.h header file */
#ifndef _XF86DRI_H_
extern GLboolean XF86DRIDestroyContext( __DRInativeDisplay *dpy, int screen,
__DRIid context_id );
extern GLboolean XF86DRICreateDrawable( __DRInativeDisplay *dpy, int screen,
__DRIid drawable, drm_drawable_t *hHWDrawable );
extern GLboolean XF86DRIDestroyDrawable( __DRInativeDisplay *dpy, int screen,
__DRIid drawable);
#endif
/*@}*/
@@ -173,16 +103,10 @@ typedef void *(CREATENEWSCREENFUNC)(__DRInativeDisplay *dpy, int scrn,
const __DRIversion * ddx_version, const __DRIversion * dri_version,
const __DRIversion * drm_version, const __DRIframebuffer * frame_buffer,
void * pSAREA, int fd, int internal_api_version,
const __DRIinterfaceMethods * interface,
__GLcontextModes ** driver_modes);
typedef CREATENEWSCREENFUNC* PFNCREATENEWSCREENFUNC;
extern CREATENEWSCREENFUNC __driCreateNewScreen;
#ifndef DRI_NEW_INTERFACE_ONLY
extern void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc,
int numConfigs, __GLXvisualConfig *config);
#endif /* DRI_NEW_INTERFACE_ONLY */
extern CREATENEWSCREENFUNC __driCreateNewScreen_20050727;
/**
@@ -209,6 +133,113 @@ struct __DRIversionRec {
int patch; /**< Patch-level. */
};
typedef void (*__DRIfuncPtr)(void);
struct __DRIinterfaceMethodsRec {
/**
* Get pointer to named function.
*/
__DRIfuncPtr (*getProcAddress)( const char * proc_name );
/**
* Create a list of \c __GLcontextModes structures.
*/
__GLcontextModes * (*createContextModes)(unsigned count,
size_t minimum_bytes_per_struct);
/**
* Destroy a list of \c __GLcontextModes structures.
*
* \todo
* Determine if the drivers actually need to call this.
*/
void (*destroyContextModes)( __GLcontextModes * modes );
/**
* Get the \c __DRIscreen for a given display and screen number.
*/
__DRIscreen *(*getScreen)(__DRInativeDisplay *dpy, int screenNum);
/**
* \name Client/server protocol functions.
*
* These functions implement the DRI client/server protocol for
* context and drawable operations. Platforms that do not implement
* the wire protocol (e.g., EGL) will implement glorified no-op functions.
*/
/*@{*/
/**
* Determine if the specified window ID still exists.
*
* \note
* Implementations may assume that the driver will only pass an ID into
* this function that actually corresponds to a window. On
* implementations where windows can only be destroyed by the DRI driver
* (e.g., EGL), this function is allowed to always return \c GL_TRUE.
*/
GLboolean (*windowExists)(__DRInativeDisplay *dpy, __DRIid draw);
/**
* Create the server-side portion of the GL context.
*/
GLboolean (* createContext)( __DRInativeDisplay *dpy, int screenNum,
int configID, void * contextID, drm_context_t * hw_context );
/**
* Destroy the server-side portion of the GL context.
*/
GLboolean (* destroyContext)( __DRInativeDisplay *dpy, int screenNum,
__DRIid context );
/**
* Create the server-side portion of the drawable.
*/
GLboolean (*createDrawable)( __DRInativeDisplay * ndpy, int screen,
__DRIid drawable, drm_drawable_t * hHWDrawable );
/**
* Destroy the server-side portion of the drawable.
*/
GLboolean (*destroyDrawable)( __DRInativeDisplay * ndpy, int screen,
__DRIid drawable );
/**
* This function is used to get information about the position, size, and
* clip rects of a drawable.
*/
GLboolean (* getDrawableInfo) ( __DRInativeDisplay *dpy, int scrn,
__DRIid draw, unsigned int * index, unsigned int * stamp,
int * x, int * y, int * width, int * height,
int * numClipRects, drm_clip_rect_t ** pClipRects,
int * backX, int * backY,
int * numBackClipRects, drm_clip_rect_t ** pBackClipRects );
/*@}*/
/**
* \name Timing related functions.
*/
/*@{*/
/**
* Get the 64-bit unadjusted system time (UST).
*/
int (*getUST)(int64_t * ust);
/**
* Get the media stream counter (MSC) rate.
*
* Matching the definition in GLX_OML_sync_control, this function returns
* the rate of the "media stream counter". In practical terms, this is
* the frame refresh rate of the display.
*/
GLboolean (*getMSCRate)(__DRInativeDisplay * dpy, __DRIid drawable,
int32_t * numerator, int32_t * denominator);
/*@}*/
};
/**
* Framebuffer information record. Used by libGL to communicate information
* about the framebuffer to the driver's \c __driCreateNewScreen function.
@@ -247,25 +278,6 @@ struct __DRIscreenRec {
*/
void (*destroyScreen)(__DRInativeDisplay *dpy, int scrn, void *screenPrivate);
/**
* Method to create the private DRI context data and initialize the
* context dependent methods.
*
* \sa __DRIscreenRec::createNewContext driCreateContext
* driCreateNewContext
*
* \deprecated
* This function has been replaced by \c __DRIscreenRec::createNewContext.
* New drivers will continue to export this method, but it will eventually
* (in the next XFree86 major relearse) go away.
*/
#ifndef DRI_NEW_INTERFACE_ONLY
void *(*createContext)(Display *dpy, XVisualInfo *vis, void *sharedPrivate,
__DRIcontext *pctx);
#else
void * createContext;
#endif /* DRI_NEW_INTERFACE_ONLY */
/**
* Method to create the private DRI drawable data and initialize the
* drawable dependent methods.
@@ -341,30 +353,6 @@ struct __DRIcontextRec {
*/
void (*destroyContext)(__DRInativeDisplay *dpy, int scrn, void *contextPrivate);
/**
* Method to bind a DRI drawable to a DRI graphics context.
*
* \deprecated Replaced by bindContext3.
*/
#ifndef DRI_NEW_INTERFACE_ONLY
Bool (*bindContext)(Display *dpy, int scrn, GLXDrawable draw,
GLXContext gc);
#else
void *bindContext;
#endif /* DRI_NEW_INTERFACE_ONLY */
/**
* Method to unbind a DRI drawable to a DRI graphics context.
*
* \deprecated Replaced by unbindContext3.
*/
#ifndef DRI_NEW_INTERFACE_ONLY
Bool (*unbindContext)(Display *dpy, int scrn, GLXDrawable draw,
GLXContext gc, int will_rebind);
#else
void *unbindContext;
#endif /* DRI_NEW_INTERFACE_ONLY */
/**
* Opaque pointer to private per context direct rendering data.
* \c NULL if direct rendering is not supported on the display or
@@ -372,32 +360,6 @@ struct __DRIcontextRec {
*/
void *private;
/**
* Method to bind a DRI drawable to a DRI graphics context.
*
* \since Internal API version 20030606.
* \deprecated Replaced by bindContext3.
*/
#ifndef DRI_NEW_INTERFACE_ONLY
Bool (*bindContext2)(Display *dpy, int scrn, GLXDrawable draw,
GLXDrawable read, GLXContext gc);
#else
void *bindContext2;
#endif /* DRI_NEW_INTERFACE_ONLY */
/**
* Method to unbind a DRI drawable from a DRI graphics context.
*
* \since Internal API version 20030606.
* \deprecated Replaced by unbindContext3.
*/
#ifndef DRI_NEW_INTERFACE_ONLY
Bool (*unbindContext2)(Display *dpy, int scrn, GLXDrawable draw,
GLXDrawable read, GLXContext gc);
#else
void *unbindContext2;
#endif /* DRI_NEW_INTERFACE_ONLY */
/**
* Pointer to the mode used to create this context.
*
@@ -408,17 +370,17 @@ struct __DRIcontextRec {
/**
* Method to bind a DRI drawable to a DRI graphics context.
*
* \since Internal API version 20040415.
* \since Internal API version 20050727.
*/
GLboolean (*bindContext3)(__DRInativeDisplay *dpy, int scrn, __DRIid draw,
GLboolean (*bindContext)(__DRInativeDisplay *dpy, int scrn, __DRIid draw,
__DRIid read, __DRIcontext *ctx);
/**
* Method to unbind a DRI drawable from a DRI graphics context.
*
* \since Internal API version 20040415.
* \since Internal API version 20050727.
*/
GLboolean (*unbindContext3)(__DRInativeDisplay *dpy, int scrn, __DRIid draw,
GLboolean (*unbindContext)(__DRInativeDisplay *dpy, int scrn, __DRIid draw,
__DRIid read, __DRIcontext *ctx);
};

View File

@@ -71,7 +71,9 @@ static void Display( void )
glDisable(GL_SCISSOR_TEST);
glDisable(GL_FOG);
if (!DrawFront)
if (DrawFront)
glFinish();
else
glutSwapBuffers();
}

View File

@@ -26,6 +26,7 @@
static GLint T0 = 0;
static GLint Frames = 0;
static GLint autoexit = 0;
static GLint win = 0;
/**
@@ -163,6 +164,15 @@ static GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0;
static GLint gear1, gear2, gear3;
static GLfloat angle = 0.0;
static void
cleanup(void)
{
glDeleteLists(gear1, 1);
glDeleteLists(gear2, 1);
glDeleteLists(gear3, 1);
glutDestroyWindow(win);
}
static void
draw(void)
{
@@ -198,16 +208,18 @@ draw(void)
Frames++;
{
GLint t = glutGet(GLUT_ELAPSED_TIME);
if (t - T0 >= 5000) {
GLfloat seconds = (t - T0) / 1000.0;
GLfloat fps = Frames / seconds;
printf("%d frames in %6.3f seconds = %6.3f FPS\n", Frames, seconds, fps);
T0 = t;
Frames = 0;
if ((t >= 999.0 * autoexit) && (autoexit))
exit(0);
}
GLint t = glutGet(GLUT_ELAPSED_TIME);
if (t - T0 >= 5000) {
GLfloat seconds = (t - T0) / 1000.0;
GLfloat fps = Frames / seconds;
printf("%d frames in %6.3f seconds = %6.3f FPS\n", Frames, seconds, fps);
T0 = t;
Frames = 0;
if ((t >= 999.0 * autoexit) && (autoexit)) {
cleanup();
exit(0);
}
}
}
}
@@ -222,7 +234,9 @@ idle(void)
dt = t - t0;
t0 = t;
angle += 70.0 * dt; /* 90 degrees per second */
angle += 70.0 * dt; /* 70 degrees per second */
angle = fmod(angle, 360.0); /* prevents eventual overflow */
glutPostRedisplay();
}
@@ -239,6 +253,7 @@ key(unsigned char k, int x, int y)
view_rotz -= 5.0;
break;
case 27: /* Escape */
cleanup();
exit(0);
break;
default:
@@ -352,7 +367,7 @@ int main(int argc, char *argv[])
glutInitWindowPosition(0, 0);
glutInitWindowSize(300, 300);
glutCreateWindow("Gears");
win = glutCreateWindow("Gears");
init(argc, argv);
glutDisplayFunc(draw);

View File

@@ -186,11 +186,12 @@ Display( void )
else {
/* clear the temporary image to white (helpful for debugging */
memset(TempImage, 255, ImgWidth * ImgHeight * 4);
#if 0
/* you might use this when debugging */
#if 1
glReadPixels(APosX, APosY, ImgWidth, ImgHeight,
ReadFormat, ReadType, TempImage);
(void) ComplexReadPixels;
#else
/* you might use this when debugging */
ComplexReadPixels(APosX, APosY, ImgWidth, ImgHeight,
ReadFormat, ReadType, TempImage);
#endif

View File

@@ -12,7 +12,8 @@ PROGRAMS = \
demo1 \
demo2 \
demo3 \
eglinfo
eglinfo \
eglgears
.c.o:
@@ -24,33 +25,39 @@ default: $(PROGRAMS)
demo1: demo1.o $(LIB_DIR)/libEGL.so
$(CC) demo1.o -L$(LIB_DIR) -lEGL -o $@
$(CC) $(CFLAGS) demo1.o -L$(LIB_DIR) -lEGL $(LIBDRM_LIB) -o $@
demo1.o: demo1.c $(HEADERS)
$(CC) -c $(CFLAGS) -I$(TOP)/include demo1.c
demo2: demo2.o $(LIB_DIR)/libEGL.so
$(CC) demo2.o -L$(LIB_DIR) -lEGL $(APP_LIB_DEPS) -o $@
$(CC) $(CFLAGS) demo2.o -L$(LIB_DIR) -lEGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
demo2.o: demo2.c $(HEADERS)
$(CC) -c $(CFLAGS) -I$(TOP)/include demo2.c
demo3: demo3.o $(LIB_DIR)/libEGL.so
$(CC) demo3.o -L$(LIB_DIR) -lEGL $(APP_LIB_DEPS) -o $@
$(CC) $(CFLAGS) demo3.o -L$(LIB_DIR) -lEGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
demo3.o: demo3.c $(HEADERS)
$(CC) -c $(CFLAGS) -I$(TOP)/include demo3.c
eglinfo: eglinfo.o $(LIB_DIR)/libEGL.so
$(CC) eglinfo.o -L$(LIB_DIR) -lEGL -o $@
$(CC) $(CFLAGS) eglinfo.o -L$(LIB_DIR) -lEGL $(LIBDRM_LIB) -o $@
eglinfo.o: eglinfo.c $(HEADERS)
$(CC) -c $(CFLAGS) -I$(TOP)/include eglinfo.c
eglgears: eglgears.o $(LIB_DIR)/libEGL.so
$(CC) $(CFLAGS) eglgears.o -L$(LIB_DIR) -lEGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
eglgears.o: eglgears.c $(HEADERS)
$(CC) -c $(CFLAGS) -I$(TOP)/include eglgears.c
clean:
rm -f *.o *~

View File

@@ -92,7 +92,6 @@ main(int argc, char *argv[])
EGLContext ctx;
EGLSurface pbuffer;
EGLConfig configs[10];
EGLint numConfigs, i;
EGLBoolean b;
const EGLint pbufAttribs[] = {
EGL_WIDTH, 500,

View File

@@ -56,6 +56,7 @@ static void Reshape(int width, int height)
windH = (GLint)height;
}
#if 0
static void RotateColorMask(void)
{
static GLint rotation = 0;
@@ -80,6 +81,7 @@ static void RotateColorMask(void)
break;
}
}
#endif
static void Viewport(GLint row, GLint column)
{
@@ -574,7 +576,7 @@ main(int argc, char *argv[])
/*
EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY);
*/
EGLDisplay d = eglGetDisplay("!fb_dri");
EGLDisplay d = eglGetDisplay(":0");
assert(d);
if (!eglInitialize(d, &maj, &min)) {
@@ -600,7 +602,7 @@ main(int argc, char *argv[])
printf("failed to create screen surface\n");
return 0;
}
eglShowSurfaceMESA(d, screen, screen_surf, mode);
b = eglMakeCurrent(d, screen_surf, screen_surf, ctx);
@@ -608,25 +610,24 @@ main(int argc, char *argv[])
printf("make current failed\n");
return 0;
}
glViewport(0, 0, 1024, 768);
Init();
Init();
Reshape(1024, 768);
glDrawBuffer( GL_FRONT );
glClearColor( 0,
1.0,
0,
1);
glDrawBuffer( GL_FRONT );
glClearColor( 0, 1.0, 0, 1);
glClear( GL_COLOR_BUFFER_BIT );
glClear( GL_COLOR_BUFFER_BIT );
doubleBuffer = 1;
glDrawBuffer( GL_BACK );
doubleBuffer = 1;
glDrawBuffer( GL_BACK );
Draw(d, screen_surf);
write_ppm("dump.ppm", ((struct fb_display *)_eglLookupDisplay(d))->pFB, 1024, 768);
eglDestroySurface(d, screen_surf);
eglDestroyContext(d, ctx);
eglTerminate(d);

448
progs/egl/eglgears.c Normal file
View File

@@ -0,0 +1,448 @@
/*
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/*
* This is a port of the infamous "glxgears" demo to straight EGL
* Port by Dane Rushton 10 July 2005
*
* No command line options.
* Program runs for 5 seconds then exits, outputing framerate to console
*/
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <GL/gl.h>
#include <GLES/egl.h>
#include <assert.h>
#define BENCHMARK
#ifdef BENCHMARK
/* XXX this probably isn't very portable */
#include <sys/time.h>
#include <unistd.h>
/* return current time (in seconds) */
static double
current_time(void)
{
struct timeval tv;
#ifdef __VMS
(void) gettimeofday(&tv, NULL );
#else
struct timezone tz;
(void) gettimeofday(&tv, &tz);
#endif
return (double) tv.tv_sec + tv.tv_usec / 1000000.0;
}
#else /*BENCHMARK*/
/* dummy */
static double
current_time(void)
{
/* update this function for other platforms! */
static double t = 0.0;
static int warn = 1;
if (warn) {
fprintf(stderr, "Warning: current_time() not implemented!!\n");
warn = 0;
}
return t += 1.0;
}
#endif /*BENCHMARK*/
#ifndef M_PI
#define M_PI 3.14159265
#endif
static GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0;
static GLint gear1, gear2, gear3;
static GLfloat angle = 0.0;
//static GLfloat eyesep = 5.0; /* Eye separation. */
//static GLfloat fix_point = 40.0; /* Fixation point distance. */
//static GLfloat left, right, asp; /* Stereo frustum params. */
/*
*
* Draw a gear wheel. You'll probably want to call this function when
* building a display list since we do a lot of trig here.
*
* Input: inner_radius - radius of hole at center
* outer_radius - radius at center of teeth
* width - width of gear
* teeth - number of teeth
* tooth_depth - depth of tooth
*/
static void
gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width,
GLint teeth, GLfloat tooth_depth)
{
GLint i;
GLfloat r0, r1, r2;
GLfloat angle, da;
GLfloat u, v, len;
r0 = inner_radius;
r1 = outer_radius - tooth_depth / 2.0;
r2 = outer_radius + tooth_depth / 2.0;
da = 2.0 * M_PI / teeth / 4.0;
glShadeModel(GL_FLAT);
glNormal3f(0.0, 0.0, 1.0);
/* draw front face */
glBegin(GL_QUAD_STRIP);
for (i = 0; i <= teeth; i++) {
angle = i * 2.0 * M_PI / teeth;
glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5);
glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5);
if (i < teeth) {
glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5);
glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da),
width * 0.5);
}
}
glEnd();
/* draw front sides of teeth */
glBegin(GL_QUADS);
da = 2.0 * M_PI / teeth / 4.0;
for (i = 0; i < teeth; i++) {
angle = i * 2.0 * M_PI / teeth;
glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5);
glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5);
glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da),
width * 0.5);
glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da),
width * 0.5);
}
glEnd();
glNormal3f(0.0, 0.0, -1.0);
/* draw back face */
glBegin(GL_QUAD_STRIP);
for (i = 0; i <= teeth; i++) {
angle = i * 2.0 * M_PI / teeth;
glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5);
glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5);
if (i < teeth) {
glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da),
-width * 0.5);
glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5);
}
}
glEnd();
/* draw back sides of teeth */
glBegin(GL_QUADS);
da = 2.0 * M_PI / teeth / 4.0;
for (i = 0; i < teeth; i++) {
angle = i * 2.0 * M_PI / teeth;
glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da),
-width * 0.5);
glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da),
-width * 0.5);
glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5);
glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5);
}
glEnd();
/* draw outward faces of teeth */
glBegin(GL_QUAD_STRIP);
for (i = 0; i < teeth; i++) {
angle = i * 2.0 * M_PI / teeth;
glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5);
glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5);
u = r2 * cos(angle + da) - r1 * cos(angle);
v = r2 * sin(angle + da) - r1 * sin(angle);
len = sqrt(u * u + v * v);
u /= len;
v /= len;
glNormal3f(v, -u, 0.0);
glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5);
glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5);
glNormal3f(cos(angle), sin(angle), 0.0);
glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da),
width * 0.5);
glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da),
-width * 0.5);
u = r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da);
v = r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da);
glNormal3f(v, -u, 0.0);
glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da),
width * 0.5);
glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da),
-width * 0.5);
glNormal3f(cos(angle), sin(angle), 0.0);
}
glVertex3f(r1 * cos(0), r1 * sin(0), width * 0.5);
glVertex3f(r1 * cos(0), r1 * sin(0), -width * 0.5);
glEnd();
glShadeModel(GL_SMOOTH);
/* draw inside radius cylinder */
glBegin(GL_QUAD_STRIP);
for (i = 0; i <= teeth; i++) {
angle = i * 2.0 * M_PI / teeth;
glNormal3f(-cos(angle), -sin(angle), 0.0);
glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5);
glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5);
}
glEnd();
}
static void
draw(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glPushMatrix();
glRotatef(view_rotx, 1.0, 0.0, 0.0);
glRotatef(view_roty, 0.0, 1.0, 0.0);
glRotatef(view_rotz, 0.0, 0.0, 1.0);
glPushMatrix();
glTranslatef(-3.0, -2.0, 0.0);
glRotatef(angle, 0.0, 0.0, 1.0);
glCallList(gear1);
glPopMatrix();
glPushMatrix();
glTranslatef(3.1, -2.0, 0.0);
glRotatef(-2.0 * angle - 9.0, 0.0, 0.0, 1.0);
glCallList(gear2);
glPopMatrix();
glPushMatrix();
glTranslatef(-3.1, 4.2, 0.0);
glRotatef(-2.0 * angle - 25.0, 0.0, 0.0, 1.0);
glCallList(gear3);
glPopMatrix();
glPopMatrix();
}
/* new window size or exposure */
static void
reshape(int width, int height)
{
glViewport(0, 0, (GLint) width, (GLint) height);
GLfloat h = (GLfloat) height / (GLfloat) width;
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(-1.0, 1.0, -h, h, 5.0, 60.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(0.0, 0.0, -40.0);
}
static void
init(void)
{
static GLfloat pos[4] = { 5.0, 5.0, 10.0, 0.0 };
static GLfloat red[4] = { 0.8, 0.1, 0.0, 1.0 };
static GLfloat green[4] = { 0.0, 0.8, 0.2, 1.0 };
static GLfloat blue[4] = { 0.2, 0.2, 1.0, 1.0 };
glLightfv(GL_LIGHT0, GL_POSITION, pos);
glEnable(GL_CULL_FACE);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glEnable(GL_DEPTH_TEST);
/* make the gears */
gear1 = glGenLists(1);
glNewList(gear1, GL_COMPILE);
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red);
gear(1.0, 4.0, 1.0, 20, 0.7);
glEndList();
gear2 = glGenLists(1);
glNewList(gear2, GL_COMPILE);
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green);
gear(0.5, 2.0, 2.0, 10, 0.7);
glEndList();
gear3 = glGenLists(1);
glNewList(gear3, GL_COMPILE);
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue);
gear(1.3, 2.0, 0.5, 10, 0.7);
glEndList();
glEnable(GL_NORMALIZE);
}
static void run_gears(EGLDisplay dpy, EGLSurface surf, int ttr)
{
double st = current_time();
double ct = st;
int frames = 0;
while (ct - st < ttr)
{
double tt = current_time();
double dt = tt - ct;
ct = tt;
/* advance rotation for next frame */
angle += 70.0 * dt; /* 70 degrees per second */
if (angle > 3600.0)
angle -= 3600.0;
draw();
// DBR : Swap the Buffers
eglSwapBuffers(dpy, surf);
frames++;
}
GLfloat seconds = ct - st;
GLfloat fps = frames / seconds;
printf("%d frames in %3.1f seconds = %6.3f FPS\n", frames, seconds, fps);
}
int
main(int argc, char *argv[])
{
int maj, min;
EGLContext ctx;
EGLSurface screen_surf;
EGLConfig configs[10];
EGLint numConfigs, i;
EGLBoolean b;
const EGLint screenAttribs[] = {
EGL_WIDTH, 1024,
EGL_HEIGHT, 768,
EGL_NONE
};
EGLModeMESA mode;
EGLScreenMESA screen;
EGLint count;
GLboolean printInfo = GL_FALSE;
for (i = 1; i < argc; i++)
{
if (strcmp(argv[i], "-info") == 0)
{
printInfo = GL_TRUE;
}
else
printf("Warning: unknown parameter: %s\n", argv[i]);
}
// DBR : Create EGL context/surface etc
EGLDisplay d = eglGetDisplay(":0");
assert(d);
if (!eglInitialize(d, &maj, &min)) {
printf("demo: eglInitialize failed\n");
exit(1);
}
printf("EGL version = %d.%d\n", maj, min);
printf("EGL_VENDOR = %s\n", eglQueryString(d, EGL_VENDOR));
eglGetConfigs(d, configs, 10, &numConfigs);
eglGetScreensMESA(d, &screen, 1, &count);
eglGetModesMESA(d, screen, &mode, 1, &count);
ctx = eglCreateContext(d, configs[0], EGL_NO_CONTEXT, NULL);
if (ctx == EGL_NO_CONTEXT) {
printf("failed to create context\n");
return 0;
}
screen_surf = eglCreateScreenSurfaceMESA(d, configs[0], screenAttribs);
if (screen_surf == EGL_NO_SURFACE) {
printf("failed to create screen surface\n");
return 0;
}
eglShowSurfaceMESA(d, screen, screen_surf, mode);
b = eglMakeCurrent(d, screen_surf, screen_surf, ctx);
if (!b) {
printf("make current failed\n");
return 0;
}
// DBR
if (printInfo)
{
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS));
}
init(); // Initialise the GL visual
reshape(1024,768);
glDrawBuffer( GL_BACK );
// DBR : Run the simulation
run_gears(d, screen_surf, 5.0);
// DBR : Destroy EGL context/surface etc
eglDestroySurface(d, screen_surf);
eglDestroyContext(d, ctx);
eglTerminate(d);
// DBR
return 0;
}

View File

@@ -136,7 +136,7 @@ main(int argc, char *argv[])
{
int maj, min;
/*EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY);*/
EGLDisplay d = eglGetDisplay("!fb_dri");
EGLDisplay d = eglGetDisplay("!r200_dri");
if (!eglInitialize(d, &maj, &min)) {
printf("eglinfo: eglInitialize failed\n");

2
progs/tests/.cvsignore Normal file
View File

@@ -0,0 +1,2 @@
.cvsignore
getproclist.h

View File

@@ -22,6 +22,8 @@ SOURCES = antialias.c \
blendminmax.c \
blendsquare.c \
bufferobj.c \
bug_3101.c \
bug_3195.c \
crossbar.c \
cva.c \
dinoshade.c \
@@ -103,6 +105,12 @@ texrect: texrect.o readtex.o
texrect.o: texrect.c readtex.h
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
bug_3195: bug_3195.o readtex.o
$(CC) $(CFLAGS) bug_3195.o readtex.o $(LIBS) -o $@
bug_3195.o: bug_3195.c readtex.h
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
invert: invert.o readtex.o
$(CC) invert.o readtex.o $(LIBS) -o $@

128
progs/tests/bug_3101.c Normal file
View File

@@ -0,0 +1,128 @@
/*
* (C) Copyright IBM Corporation 2005
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* on the rights to use, copy, modify, merge, publish, distribute, sub
* license, and/or sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* \file bug_3101.c
*
* Simple regression test for bug #3101. Attempt to draw a single square.
* After emiting the first vertex, call \c glEdgeFlag to change the vertex
* format. If the bug still exists, this will cause a segfault.
*
* \author Ian Romanick <idr@us.ibm.com>
*/
#include <stdio.h>
#include <stdlib.h>
#include <GL/glut.h>
static int Width = 400;
static int Height = 200;
static const GLfloat Near = 5.0, Far = 25.0;
static void Display( void )
{
glClearColor(0.2, 0.2, 0.8, 0);
glClear( GL_COLOR_BUFFER_BIT );
glPushMatrix();
/* This is the "reference" square.
*/
glTranslatef(-4.5, 0, 0);
glBlendEquation( GL_FUNC_ADD );
glBlendFunc( GL_ONE, GL_ZERO );
glBegin(GL_QUADS);
glColor3f( 0.5, 0.5, 0.5 );
glVertex2f(-1, -1);
glVertex2f( 1, -1);
glEdgeFlag(GL_TRUE);
glVertex2f( 1, 1);
glVertex2f(-1, 1);
glEnd();
glPopMatrix();
glutSwapBuffers();
}
static void Reshape( int width, int height )
{
GLfloat ar = (float) width / (float) height;
Width = width;
Height = height;
glViewport( 0, 0, width, height );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glFrustum( -ar, ar, -1.0, 1.0, Near, Far );
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
glTranslatef( 0.0, 0.0, -15.0 );
}
static void Key( unsigned char key, int x, int y )
{
(void) x;
(void) y;
switch (key) {
case 27:
exit(0);
break;
}
glutPostRedisplay();
}
static void Init( void )
{
const char * const ver_string = (const char * const)
glGetString( GL_VERSION );
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
printf("GL_VERSION = %s\n", ver_string);
printf("\nThis program should draw a single square, but not crash.\n");
printf("This is a regression test for bug #3101.\n");
printf("https://bugs.freedesktop.org/show_bug.cgi?id=3101\n");
glEnable( GL_BLEND );
}
int main( int argc, char *argv[] )
{
glutInit( &argc, argv );
glutInitWindowPosition( 0, 0 );
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow( "Bug #3101 Test" );
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
Init();
glutMainLoop();
return 0;
}

275
progs/tests/bug_3195.c Normal file
View File

@@ -0,0 +1,275 @@
/*
* Copyright (C) 2000 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* \file bug_3195.c
*
* Simple regression test for bug #3195. A bug in the i180 driver caused
* a segfault (inside the driver) when the LOD bias is adjusted and no texture
* is enabled. This test, which is based on progs/demos/lodbias.c, sets up
* all the texturing, disables all textures, adjusts the LOD bias, then
* re-enables \c GL_TEXTURE_2D.
*
* \author Brian Paul
* \author Ian Romanick <idr@us.ibm.com>
*/
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <GL/glut.h>
#include <GL/glext.h>
#include "readtex.h"
#define TEXTURE_FILE "../images/girl.rgb"
static GLfloat Xrot = 0, Yrot = -30, Zrot = 0;
static GLint Bias = 0, BiasStepSign = +1; /* ints avoid fp precision problem */
static GLint BiasMin = -400, BiasMax = 400;
static void
PrintString(const char *s)
{
while (*s) {
glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s);
s++;
}
}
static void Idle( void )
{
static int lastTime = 0;
int time = glutGet(GLUT_ELAPSED_TIME);
int step;
if (lastTime == 0)
lastTime = time;
else if (time - lastTime < 10)
return;
step = (time - lastTime) / 10 * BiasStepSign;
lastTime = time;
Bias += step;
if (Bias < BiasMin) {
exit(0);
}
else if (Bias > BiasMax) {
Bias = BiasMax;
BiasStepSign = -1;
}
glutPostRedisplay();
}
static void Display( void )
{
char str[100];
glClear( GL_COLOR_BUFFER_BIT );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glOrtho(-1, 1, -1, 1, -1, 1);
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
glDisable(GL_TEXTURE_2D);
glColor3f(1,1,1);
glRasterPos3f(-0.9, -0.9, 0.0);
sprintf(str, "Texture LOD Bias = %4.1f", Bias * 0.01);
PrintString(str);
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 );
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
glTranslatef( 0.0, 0.0, -8.0 );
glPushMatrix();
glRotatef(Xrot, 1, 0, 0);
glRotatef(Yrot, 0, 1, 0);
glRotatef(Zrot, 0, 0, 1);
glTexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT, GL_TEXTURE_LOD_BIAS_EXT, 0.01 * Bias);
glEnable(GL_TEXTURE_2D);
glBegin(GL_POLYGON);
glTexCoord2f(0, 0); glVertex2f(-1, -1);
glTexCoord2f(2, 0); glVertex2f( 1, -1);
glTexCoord2f(2, 2); glVertex2f( 1, 1);
glTexCoord2f(0, 2); glVertex2f(-1, 1);
glEnd();
glPopMatrix();
glutSwapBuffers();
}
static void Reshape( int width, int height )
{
glViewport( 0, 0, width, height );
}
static void Key( unsigned char key, int x, int y )
{
(void) x;
(void) y;
switch (key) {
case 27:
exit(0);
break;
}
glutPostRedisplay();
}
static void SpecialKey( int key, int x, int y )
{
const GLfloat step = 3.0;
(void) x;
(void) y;
switch (key) {
case GLUT_KEY_UP:
Xrot -= step;
break;
case GLUT_KEY_DOWN:
Xrot += step;
break;
case GLUT_KEY_LEFT:
Yrot -= step;
break;
case GLUT_KEY_RIGHT:
Yrot += step;
break;
}
glutPostRedisplay();
}
static void Init( void )
{
GLfloat maxBias;
const char * const ver_string = (const char * const)
glGetString( GL_VERSION );
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
printf("GL_VERSION = %s\n", ver_string);
printf("\nThis program should function nearly identically to Mesa's lodbias demo.\n"
"It should cycle through the complet LOD bias range once and exit. If bug\n"
"#3195 still exists, the demo should crash almost immediatly.\n");
printf("This is a regression test for bug #3101.\n");
printf("https://bugs.freedesktop.org/show_bug.cgi?id=3101\n");
if (!glutExtensionSupported("GL_EXT_texture_lod_bias")) {
printf("Sorry, GL_EXT_texture_lod_bias not supported by this renderer.\n");
exit(1);
}
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
if (glutExtensionSupported("GL_SGIS_generate_mipmap")) {
/* test auto mipmap generation */
GLint width, height, i;
GLenum format;
GLubyte *image = LoadRGBImage(TEXTURE_FILE, &width, &height, &format);
if (!image) {
printf("Error: could not load texture image %s\n", TEXTURE_FILE);
exit(1);
}
/* resize to 256 x 256 */
if (width != 256 || height != 256) {
GLubyte *newImage = malloc(256 * 256 * 4);
gluScaleImage(format, width, height, GL_UNSIGNED_BYTE, image,
256, 256, GL_UNSIGNED_BYTE, newImage);
free(image);
image = newImage;
}
printf("Using GL_SGIS_generate_mipmap\n");
glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, GL_TRUE);
glTexImage2D(GL_TEXTURE_2D, 0, format, 256, 256, 0,
format, GL_UNSIGNED_BYTE, image);
free(image);
/* make sure mipmap was really generated correctly */
width = height = 256;
for (i = 0; i < 9; i++) {
GLint w, h;
glGetTexLevelParameteriv(GL_TEXTURE_2D, i, GL_TEXTURE_WIDTH, &w);
glGetTexLevelParameteriv(GL_TEXTURE_2D, i, GL_TEXTURE_HEIGHT, &h);
printf("Level %d size: %d x %d\n", i, w, h);
assert(w == width);
assert(h == height);
width /= 2;
height /= 2;
}
}
else if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) {
printf("Error: could not load texture image %s\n", TEXTURE_FILE);
exit(1);
}
/* mipmapping required for this extension */
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glGetFloatv(GL_MAX_TEXTURE_LOD_BIAS_EXT, &maxBias);
printf("LOD bias range: [%g, %g]\n", -maxBias, maxBias);
BiasMin = -100 * maxBias;
BiasMax = 100 * maxBias;
/* Since we have (about) 8 mipmap levels, no need to bias beyond
* the range [-1, +8].
*/
if (BiasMin < -100)
BiasMin = -100;
if (BiasMax > 800)
BiasMax = 800;
}
int main( int argc, char *argv[] )
{
glutInit( &argc, argv );
glutInitWindowPosition( 0, 0 );
glutInitWindowSize( 350, 350 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow( "Bug #3195 Test" );
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
glutDisplayFunc( Display );
glutIdleFunc(Idle);
Init();
glutMainLoop();
return 0;
}

View File

@@ -71,7 +71,9 @@ Display( void )
static void
Reshape( int width, int height )
{
#if 0
float ar = (float) width / (float) height;
#endif
glViewport( 0, 0, width, height );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
@@ -117,14 +119,14 @@ Init( void )
glGenFramebuffersEXT(1, &MyFB);
assert(MyFB);
assert(glIsFramebufferEXT(MyFB));
assert(!glIsFramebufferEXT(MyFB));
glDeleteFramebuffersEXT(1, &MyFB);
assert(!glIsFramebufferEXT(MyFB));
/* Note, continue to use MyFB below */
glGenRenderbuffersEXT(1, &rb);
assert(rb);
assert(glIsRenderbufferEXT(rb));
assert(!glIsRenderbufferEXT(rb));
glDeleteRenderbuffersEXT(1, &rb);
assert(!glIsRenderbufferEXT(rb));
rb = 42; /* an arbitrary ID */
@@ -145,6 +147,25 @@ Init( void )
glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, Width, Height);
{
GLint r, g, b, a;
glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,
GL_RENDERBUFFER_RED_SIZE_EXT, &r);
glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,
GL_RENDERBUFFER_GREEN_SIZE_EXT, &g);
glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,
GL_RENDERBUFFER_BLUE_SIZE_EXT, &b);
glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,
GL_RENDERBUFFER_ALPHA_SIZE_EXT, &a);
printf("renderbuffer RGBA sizes = %d %d %d %d\n", r, g, b, a);
glGetIntegerv(GL_RED_BITS, &r);
glGetIntegerv(GL_GREEN_BITS, &g);
glGetIntegerv(GL_BLUE_BITS, &b);
glGetIntegerv(GL_ALPHA_BITS, &a);
printf("Visual RGBA sizes = %d %d %d %d\n", r, g, b, a);
}
CheckError(__LINE__);
/* restore to default */

View File

@@ -56,7 +56,8 @@ RenderTexture(void)
glLoadIdentity();
glTranslatef(0.0, 0.0, -15.0);
/* draw to texture */
/* draw to texture image */
glBindTexture(GL_TEXTURE_2D, 0);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, MyFB);
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
GL_TEXTURE_2D, TexObj, level);
@@ -142,6 +143,7 @@ Display(void)
glPushMatrix();
glRotatef(Rot, 0, 1, 0);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, TexObj);
glBegin(GL_POLYGON);
glColor3f(0.25, 0.25, 0.25);
glTexCoord2f(0, 0);
@@ -203,10 +205,10 @@ Init(void)
}
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
/* make framebuffer */
/* gen framebuffer id, delete it, do some assertions, just for testing */
glGenFramebuffersEXT(1, &MyFB);
assert(MyFB);
assert(glIsFramebufferEXT(MyFB));
assert(!glIsFramebufferEXT(MyFB));
glDeleteFramebuffersEXT(1, &MyFB);
assert(!glIsFramebufferEXT(MyFB));
/* Note, continue to use MyFB below */
@@ -219,18 +221,28 @@ Init(void)
/* make depth renderbuffer */
glGenRenderbuffersEXT(1, &DepthRB);
assert(DepthRB);
assert(glIsRenderbufferEXT(DepthRB));
assert(!glIsRenderbufferEXT(DepthRB));
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, DepthRB);
assert(glIsRenderbufferEXT(DepthRB));
glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT,
TexWidth, TexHeight);
glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,
GL_RENDERBUFFER_DEPTH_SIZE_EXT, &i);
printf("Depth renderbuffer size = %d bits\n", i);
assert(i > 0);
/* make stencil renderbuffer */
glGenRenderbuffersEXT(1, &StencilRB);
assert(StencilRB);
assert(glIsRenderbufferEXT(StencilRB));
assert(!glIsRenderbufferEXT(StencilRB));
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, StencilRB);
assert(glIsRenderbufferEXT(StencilRB));
glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_STENCIL_INDEX,
TexWidth, TexHeight);
glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,
GL_RENDERBUFFER_STENCIL_SIZE_EXT, &i);
printf("Stencil renderbuffer size = %d bits\n", i);
assert(i > 0);
/* attach DepthRB to MyFB */
glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT,

View File

@@ -1,13 +1,9 @@
#!/usr/bin/env python
# $Id: getprocaddress.py,v 1.6 2004/11/27 19:57:46 brianp Exp $
# $Id: getprocaddress.py,v 1.7 2005/06/21 23:42:43 idr Exp $
# Helper for the getprocaddress.c test.
from xml.sax import saxutils
from xml.sax import make_parser
from xml.sax.handler import feature_namespaces
import sys, getopt, re
sys.path.append("../../src/mesa/glapi/" )
import gl_XML
@@ -30,16 +26,19 @@ def FindTestFunctions():
return functions
class PrintExports(gl_XML.FilterGLAPISpecBase):
name = "gl_exports.py (from Mesa)"
class PrintExports(gl_XML.gl_print_base):
def __init__(self):
gl_XML.FilterGLAPISpecBase.__init__(self)
gl_XML.gl_print_base.__init__(self)
self.name = "getprocaddress.py (from Mesa)"
self.license = license.bsd_license_template % ( \
"""Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
(C) Copyright IBM Corporation 2004""", "BRIAN PAUL, IBM")
self.tests = FindTestFunctions()
self.prevCategory = ""
return
def printRealHeader(self):
print """
@@ -50,22 +49,28 @@ struct name_test_pair {
static struct name_test_pair functions[] = {"""
def printRealFooter(self):
print"""
{ NULL, NULL }
};
"""
def printBody(self, api):
prev_category = None
def printFunction(self, f):
if f.category != self.prevCategory:
print ' { "-%s", NULL},' % f.category
self.prevCategory = f.category
for f in api.functionIterateByOffset():
[category, num] = api.get_category_for_name( f.name )
if category != prev_category:
print ' { "-%s", NULL},' % category
prev_category = category
if f.name in self.tests:
test = "test_%s" % f.name
else:
test = "NULL"
print ' { "gl%s", %s },' % (f.name, test)
for name in f.entry_points:
if name in self.tests:
test = "test_%s" % name
break
print ' { "gl%s", %s },' % (f.name, test)
print ''
print ' { NULL, NULL }'
print '};'
print ''
return
@@ -81,15 +86,8 @@ if __name__ == '__main__':
if arg == "-f":
file_name = val
dh = PrintExports()
printer = PrintExports()
parser = make_parser()
parser.setFeature(feature_namespaces, 0)
parser.setContentHandler(dh)
api = gl_XML.parse_GL_API( file_name, gl_XML.gl_item_factory() )
f = open(file_name)
parser.parse(f)
dh.printHeader()
dh.printFunctions()
dh.printFooter()
printer.Print( api )

View File

@@ -10,28 +10,94 @@
#include <math.h>
#include <GL/glut.h>
GLboolean wrapping;
static void RunTest(void)
{
const GLenum prim = GL_QUAD_STRIP;
GLubyte val;
int bits, max, i;
int expected;
GLboolean failed;
glGetIntegerv(GL_STENCIL_BITS, &bits);
max = (1 << bits) - 1;
glClearStencil(0);
glEnable(GL_STENCIL_TEST);
glStencilFunc(GL_ALWAYS, 0, ~0);
/* test GL_KEEP */
glClearStencil(max);
glClear(GL_STENCIL_BUFFER_BIT);
glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
failed = GL_FALSE;
printf("Testing GL_KEEP...\n");
expected = max;
glBegin(prim);
glVertex2f(0, 0);
glVertex2f(10, 0);
glVertex2f(0, 10);
glVertex2f(10, 10);
glEnd();
glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
if (val != expected) {
printf("Failed GL_KEEP test(got %u, expected %u)\n", val, expected);
failed = GL_TRUE;
}
else
printf("OK!\n");
/* test GL_ZERO */
glClearStencil(max);
glClear(GL_STENCIL_BUFFER_BIT);
glStencilOp(GL_KEEP, GL_KEEP, GL_ZERO);
failed = GL_FALSE;
printf("Testing GL_ZERO...\n");
expected = 0;
glBegin(prim);
glVertex2f(0, 0);
glVertex2f(10, 0);
glVertex2f(0, 10);
glVertex2f(10, 10);
glEnd();
glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
if (val != expected) {
printf("Failed GL_ZERO test(got %u, expected %u)\n", val, expected);
failed = GL_TRUE;
}
else
printf("OK!\n");
/* test GL_REPLACE */
glClearStencil(max);
glClear(GL_STENCIL_BUFFER_BIT);
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
failed = GL_FALSE;
printf("Testing GL_REPLACE...\n");
expected = 0;
glBegin(prim);
glVertex2f(0, 0);
glVertex2f(10, 0);
glVertex2f(0, 10);
glVertex2f(10, 10);
glEnd();
glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
if (val != expected) {
printf("Failed GL_REPLACE test(got %u, expected %u)\n", val, expected);
failed = GL_TRUE;
}
else
printf("OK!\n");
/* test GL_INCR (saturation) */
glClearStencil(0);
glClear(GL_STENCIL_BUFFER_BIT);
glStencilOp(GL_KEEP, GL_KEEP, GL_INCR);
failed = GL_FALSE;
printf("Testing GL_INCR...\n");
for (i = 1; i < max+10; i++) {
int expected = (i > max) ? max : i;
expected = (i > max) ? max : i;
glBegin(prim);
glVertex2f(0, 0); glVertex2f(10, 0);
glVertex2f(0, 10); glVertex2f(10, 10);
@@ -44,39 +110,17 @@ static void RunTest(void)
failed = GL_TRUE;
}
}
if ( !failed )
printf("OK!\n");
if ( !failed ) printf("OK!\n");
/* test GL_INCR_WRAP_EXT (wrap around) */
glClear(GL_STENCIL_BUFFER_BIT);
glStencilOp(GL_KEEP, GL_KEEP, GL_INCR_WRAP_EXT);
failed = GL_FALSE;
printf("Testing GL_INCR_WRAP_EXT...\n");
for (i = 1; i < max+10; i++) {
int expected = i % (max + 1);
glBegin(prim);
glVertex2f(0, 0); glVertex2f(10, 0);
glVertex2f(0, 10); glVertex2f(10, 10);
glEnd();
glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
if (val != expected) {
printf( "Failed GL_INCR_WRAP test on iteration #%u "
"(got %u, expected %u)\n", i, val, expected );
failed = GL_TRUE;
}
}
if ( !failed ) printf("OK!\n");
/* test GL_DECR (saturation) */
glClearStencil(max);
/* test GL_INCR (saturation) */
glClear(GL_STENCIL_BUFFER_BIT);
glStencilOp(GL_KEEP, GL_KEEP, GL_DECR);
failed = GL_FALSE;
printf("Testing GL_DECR...\n");
for (i = max-1; i > -10; i--) {
int expected = (i < 0) ? 0 : i;
expected = (i < 0) ? 0 : i;
glBegin(prim);
glVertex2f(0, 0); glVertex2f(10, 0);
glVertex2f(0, 10); glVertex2f(10, 10);
@@ -88,27 +132,76 @@ static void RunTest(void)
failed = GL_TRUE;
}
}
if ( !failed ) printf("OK!\n");
if ( !failed )
printf("OK!\n");
/* test GL_INCR_WRAP_EXT (wrap-around) */
/* test GL_INVERT */
glClearStencil(0);
glClear(GL_STENCIL_BUFFER_BIT);
glStencilOp(GL_KEEP, GL_KEEP, GL_DECR_WRAP_EXT);
glStencilOp(GL_KEEP, GL_KEEP, GL_INVERT);
failed = GL_FALSE;
printf("Testing GL_DECR_WRAP_EXT...\n");
for (i = max-1; i > -10; i--) {
int expected = (i < 0) ? max + i + 1: i;
glBegin(prim);
glVertex2f(0, 0); glVertex2f(10, 0);
glVertex2f(0, 10); glVertex2f(10, 10);
glEnd();
glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
if (val != expected) {
printf( "Failed GL_DECR_WRAP test on iteration #%u "
"(got %u, expected %u)\n", max - i, val, expected );
failed = GL_TRUE;
}
printf("Testing GL_INVERT...\n");
expected = max;
glBegin(prim);
glVertex2f(0, 0);
glVertex2f(10, 0);
glVertex2f(0, 10);
glVertex2f(10, 10);
glEnd();
glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
if (val != expected) {
printf("Failed GL_INVERT test(got %u, expected %u)\n", val, expected);
failed = GL_TRUE;
}
else
printf("OK!\n");
if(wrapping)
{
/* test GL_INCR_WRAP_EXT (wrap around) */
glClearStencil(0);
glClear(GL_STENCIL_BUFFER_BIT);
glStencilOp(GL_KEEP, GL_KEEP, GL_INCR_WRAP_EXT);
failed = GL_FALSE;
printf("Testing GL_INCR_WRAP_EXT...\n");
for (i = 1; i < max+10; i++) {
expected = i % (max + 1);
glBegin(prim);
glVertex2f(0, 0); glVertex2f(10, 0);
glVertex2f(0, 10); glVertex2f(10, 10);
glEnd();
glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
if (val != expected) {
printf( "Failed GL_INCR_WRAP test on iteration #%u "
"(got %u, expected %u)\n", i, val, expected );
failed = GL_TRUE;
}
}
if ( !failed )
printf("OK!\n");
/* test GL_DECR_WRAP_EXT (wrap-around) */
glClearStencil(max);
glClear(GL_STENCIL_BUFFER_BIT);
glStencilOp(GL_KEEP, GL_KEEP, GL_DECR_WRAP_EXT);
failed = GL_FALSE;
printf("Testing GL_DECR_WRAP_EXT...\n");
for (i = max-1; i > -10; i--) {
expected = (i < 0) ? max + i + 1: i;
glBegin(prim);
glVertex2f(0, 0); glVertex2f(10, 0);
glVertex2f(0, 10); glVertex2f(10, 10);
glEnd();
glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
if (val != expected) {
printf( "Failed GL_DECR_WRAP test on iteration #%u "
"(got %u, expected %u)\n", max - i, val, expected );
failed = GL_TRUE;
}
}
if ( !failed )
printf("OK!\n");
}
if ( !failed ) printf("OK!\n");
glDisable(GL_STENCIL_TEST);
}
@@ -158,7 +251,7 @@ static void Init( void )
/* Check for both the extension string and GL version 1.4 on the
* outside chance that some silly vendor exports version 1.4 but doesn't
* outside chance that some vendor exports version 1.4 but doesn't
* export the extension string. The stencil-wrap modes are a required
* part of GL 1.4.
*/
@@ -166,11 +259,9 @@ static void Init( void )
ver_str = glGetString( GL_VERSION );
version = (ver_str == NULL) ? 1.0 : atof( ver_str );
if ( !glutExtensionSupported("GL_EXT_stencil_wrap")
&& (version < 1.4) ) {
printf("Sorry, GL_EXT_stencil_wrap not supported.\n");
exit(1);
}
wrapping = (glutExtensionSupported("GL_EXT_stencil_wrap") || (version >= 1.4));
if (!wrapping)
printf("GL_EXT_stencil_wrap not supported. Only testing the rest.\n");
}

View File

@@ -20,6 +20,7 @@ PROGS = glthreads \
glxswapcontrol \
manywin \
offset \
overlay \
pbinfo \
pbdemo \
wincopy \
@@ -51,10 +52,10 @@ clean:
# special cases
pbinfo: pbinfo.o pbutil.o
$(CC) pbinfo.o pbutil.o $(APP_LIB_DEPS) -o $@
$(CC) $(CFLAGS) pbinfo.o pbutil.o $(APP_LIB_DEPS) -o $@
pbdemo: pbdemo.o pbutil.o
$(CC) pbdemo.o pbutil.o $(APP_LIB_DEPS) -o $@
$(CC) $(CFLAGS) pbdemo.o pbutil.o $(APP_LIB_DEPS) -o $@
pbinfo.o: pbinfo.c pbutil.h
$(CC) -c -I. -I$(INCDIR) $(CFLAGS) pbinfo.c
@@ -66,13 +67,13 @@ pbutil.o: pbutil.c pbutil.h
$(CC) -c -I. -I$(INCDIR) $(CFLAGS) pbutil.c
glxgears_fbconfig: glxgears_fbconfig.o pbutil.o
$(CC) glxgears_fbconfig.o pbutil.o $(APP_LIB_DEPS) -o $@
$(CC) $(CFLAGS) glxgears_fbconfig.o pbutil.o $(APP_LIB_DEPS) -o $@
glxgears_fbconfig.o: glxgears_fbconfig.c pbutil.h
$(CC) -c -I. -I$(INCDIR) $(CFLAGS) glxgears_fbconfig.c
$(CC) $(CFLAGS) -c -I. -I$(INCDIR) $(CFLAGS) glxgears_fbconfig.c
xrotfontdemo: xrotfontdemo.o xuserotfont.o
$(CC) xrotfontdemo.o xuserotfont.o $(APP_LIB_DEPS) -o $@
$(CC) $(CFLAGS) xrotfontdemo.o xuserotfont.o $(APP_LIB_DEPS) -o $@
xuserotfont.o: xuserotfont.c xuserotfont.h
$(CC) -c -I. -I$(INCDIR) $(CFLAGS) xuserotfont.c

View File

@@ -590,6 +590,9 @@ main(int argc, char *argv[])
event_loop(dpy, win);
glDeleteLists(gear1, 1);
glDeleteLists(gear2, 1);
glDeleteLists(gear3, 1);
glXDestroyContext(dpy, ctx);
XDestroyWindow(dpy, win);
XCloseDisplay(dpy);

View File

@@ -467,7 +467,7 @@ make_window( Display *dpy, const char *name,
None, (char **)NULL, 0, &sizehints);
}
ctx = (*create_new_context)(dpy, fbconfig[0], GLX_RGBA_BIT, NULL, GL_TRUE);
ctx = (*create_new_context)(dpy, fbconfig[0], GLX_RGBA_TYPE, NULL, GL_TRUE);
if (!ctx) {
printf("Error: glXCreateNewContext failed\n");
exit(1);

245
progs/xdemos/overlay.c Normal file
View File

@@ -0,0 +1,245 @@
/*
* GLX overlay test/demo.
*
* Brian Paul
* 18 July 2005
*/
#include <GL/gl.h>
#include <GL/glx.h>
#include <X11/keysym.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
static int WinWidth = 300, WinHeight = 300;
static Window NormalWindow = 0;
static Window OverlayWindow = 0;
static GLXContext NormalContext = 0;
static GLXContext OverlayContext = 0;
static GLboolean RGBOverlay = GL_FALSE;
static GLfloat Angle = 0.0;
static void
RedrawNormal(Display *dpy)
{
glXMakeCurrent(dpy, NormalWindow, NormalContext);
glViewport(0, 0, WinWidth, WinHeight);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0);
glMatrixMode(GL_MODELVIEW);
glClearColor(0.5, 0.5, 0.5, 1.0);
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0, 1.0, 0.0);
glPushMatrix();
glRotatef(Angle, 0, 0, 1);
glRectf(-0.8, -0.8, 0.8, 0.8);
glPopMatrix();
glXSwapBuffers(dpy, NormalWindow);
}
static void
RedrawOverlay(Display *dpy)
{
glXMakeCurrent(dpy, OverlayWindow, OverlayContext);
glViewport(0, 0, WinWidth, WinHeight);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0);
glMatrixMode(GL_MODELVIEW);
glClear(GL_COLOR_BUFFER_BIT);
if (RGBOverlay) {
glColor3f(0.0, 1.0, 1.0);
}
else {
glIndexi(2);
}
glBegin(GL_LINES);
glVertex2f(-1, -1);
glVertex2f(1, 1);
glVertex2f(1, -1);
glVertex2f(-1, 1);
glEnd();
glXSwapBuffers(dpy, OverlayWindow);
}
static Window
MakeWindow(Display *dpy, XVisualInfo *visinfo, Window parent,
unsigned int width, unsigned int height)
{
int scrnum;
XSetWindowAttributes attr;
unsigned long mask;
Window root;
Window win;
scrnum = DefaultScreen(dpy);
root = RootWindow(dpy, scrnum);
/* window attributes */
attr.background_pixel = 0;
attr.border_pixel = 0;
attr.colormap = XCreateColormap(dpy, root, visinfo->visual, AllocNone);
attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask;
mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask;
win = XCreateWindow(dpy, parent, 0, 0, width, height,
0, visinfo->depth, InputOutput,
visinfo->visual, mask, &attr);
return win;
}
static void
MakeNormalWindow(Display *dpy)
{
int attrib[] = { GLX_RGBA,
GLX_RED_SIZE, 1,
GLX_GREEN_SIZE, 1,
GLX_BLUE_SIZE, 1,
GLX_DOUBLEBUFFER,
None };
int scrnum;
Window root;
XVisualInfo *visinfo;
scrnum = DefaultScreen(dpy);
root = RootWindow(dpy, scrnum);
visinfo = glXChooseVisual(dpy, scrnum, attrib);
if (!visinfo) {
printf("Error: couldn't get an RGB, Double-buffered visual\n");
exit(1);
}
NormalWindow = MakeWindow(dpy, visinfo, root, WinWidth, WinHeight);
assert(NormalWindow);
NormalContext = glXCreateContext(dpy, visinfo, NULL, True);
assert(NormalContext);
}
static void
MakeOverlayWindow(Display *dpy)
{
int rgbAttribs[] = {
GLX_RGBA,
GLX_RED_SIZE, 1,
GLX_GREEN_SIZE, 1,
GLX_BLUE_SIZE, 1,
GLX_DOUBLEBUFFER,
GLX_LEVEL, 1,
None
};
int indexAttribs[] = {
/*GLX_RGBA, leave this out */
GLX_RED_SIZE, 1,
GLX_GREEN_SIZE, 1,
GLX_BLUE_SIZE, 1,
GLX_DOUBLEBUFFER,
GLX_LEVEL, 1,
None
};
int scrnum;
Window root;
XVisualInfo *visinfo;
scrnum = DefaultScreen(dpy);
root = RootWindow(dpy, scrnum);
visinfo = glXChooseVisual(dpy, scrnum, rgbAttribs);
if (visinfo) {
printf("Found RGB overlay visual 0x%x\n", (int) visinfo->visualid);
RGBOverlay = GL_TRUE;
}
else {
visinfo = glXChooseVisual(dpy, scrnum, indexAttribs);
if (visinfo) {
printf("Found Color Index overlay visual 0x%x\n",
(int) visinfo->visualid);
/* XXX setup the colormap entries! */
}
else {
printf("Error: couldn't get an overlay visual!\n");
exit(1);
}
}
OverlayWindow = MakeWindow(dpy, visinfo, NormalWindow, WinWidth, WinHeight);
assert(OverlayWindow);
OverlayContext = glXCreateContext(dpy, visinfo, NULL, True);
assert(OverlayContext);
}
static void
EventLoop(Display *dpy)
{
XEvent event;
while (1) {
XNextEvent(dpy, &event);
switch (event.type) {
case Expose:
RedrawNormal(dpy);
RedrawOverlay(dpy);
break;
case ConfigureNotify:
WinWidth = event.xconfigure.width;
WinHeight = event.xconfigure.height;
if (event.xconfigure.window == NormalWindow)
XResizeWindow(dpy, OverlayWindow, WinWidth, WinHeight);
break;
case KeyPress:
{
char buffer[10];
int r, code;
code = XLookupKeysym(&event.xkey, 0);
r = XLookupString(&event.xkey, buffer, sizeof(buffer),
NULL, NULL);
if (buffer[0] == 27) {
/* escape */
return;
}
else if (buffer[0] == ' ') {
Angle += 5.0;
RedrawNormal(dpy);
}
}
break;
default:
; /* nothing */
}
}
}
int
main(int argc, char *argv[])
{
Display *dpy = XOpenDisplay(NULL);
assert(dpy);
MakeNormalWindow(dpy);
MakeOverlayWindow(dpy);
XMapWindow(dpy, NormalWindow);
XMapWindow(dpy, OverlayWindow);
EventLoop(dpy);
glXDestroyContext(dpy, OverlayContext);
glXDestroyContext(dpy, NormalContext);
XDestroyWindow(dpy, OverlayWindow);
XDestroyWindow(dpy, NormalWindow);
return 0;
}

View File

@@ -2,7 +2,7 @@
TOP = ../..
SUBDIRS = main drivers/demo
SUBDIRS = main drivers/demo drivers/dri
default: subdirs

View File

@@ -286,19 +286,12 @@ demoMakeCurrent(_EGLDriver *drv, EGLDisplay dpy, EGLSurface draw, EGLSurface rea
}
/*
* Just to silence warning
*/
extern _EGLDriver *
_eglMain(NativeDisplayType dpy);
/**
* The bootstrap function. Return a new DemoDriver object and
* plug in API functions.
*/
_EGLDriver *
_eglMain(NativeDisplayType dpy)
_eglMain(_EGLDisplay *dpy)
{
DemoDriver *demo;

View File

@@ -0,0 +1,64 @@
# src/egl/drivers/dri/Makefile
TOP = ../../../..
include $(TOP)/configs/current
### Include directories
INCLUDE_DIRS = \
-I. \
-I$(DRM_SOURCE_PATH)/shared-core \
-I$(DRM_SOURCE_PATH)/libdrm \
-I$(TOP)/include \
-I$(TOP)/include/GL/internal \
-I$(TOP)/src/mesa \
-I$(TOP)/src/mesa/main \
-I$(TOP)/src/mesa/glapi \
-I$(TOP)/src/mesa/math \
-I$(TOP)/src/mesa/transform \
-I$(TOP)/src/mesa/shader \
-I$(TOP)/src/mesa/swrast \
-I$(TOP)/src/mesa/swrast_setup \
-I$(TOP)/src/egl/main \
-I$(TOP)/src/mesa/drivers/dri/common
HEADERS = egldri.h
SOURCES = egldri.c \
$(DRM_SOURCE_PATH)/libdrm/xf86drm.c \
$(DRM_SOURCE_PATH)/libdrm/xf86drmHash.c \
$(DRM_SOURCE_PATH)/libdrm/xf86drmRandom.c
OBJECTS = $(SOURCES:.c=.o)
.c.o:
$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
default: depend library Makefile
# EGLdri Library
library: $(LIB_DIR)/libEGLdri.so
$(LIB_DIR)/libEGLdri.so: $(OBJECTS)
$(TOP)/bin/mklib -o EGLdri -major 1 -minor 0 \
-install $(LIB_DIR) -ldl $(OBJECTS)
clean:
rm -f *.o
rm -f *.so
depend: $(SOURCES) $(HEADERS)
@ echo "running $(MKDEP)"
@ touch depend
$(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) \
$(SOURCES) $(HEADERS) > /dev/null
include depend
# DO NOT DELETE

1001
src/egl/drivers/dri/egldri.c Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,113 @@
#ifndef EGLDRI_INCLUDED
#define EGLDRI_INCLUDED
#include "egldisplay.h"
#include "eglscreen.h"
#include "eglsurface.h"
#include "eglcontext.h"
#include "mtypes.h"
#include "dri_util.h"
#include "drm_sarea.h"
/**
* dri display-specific driver class derived from _EGLDisplay
*/
typedef struct dri_display
{
_EGLDisplay Base; /* base class/object */
void *pFB;
int drmFD; /**< \brief DRM device file descriptor */
int minor;
unsigned long hFrameBuffer;
int virtualWidth;
int virtualHeight;
int fbSize;
int bpp;
int cpp;
int isPCI;
int SAREASize;
drm_sarea_t *pSAREA;
unsigned int serverContext; /**< \brief DRM context only active on server */
unsigned long FBStart; /**< \brief physical address of the framebuffer */
void *driverClientMsg;
int driverClientMsgSize;
int chipset;
void *driverPrivate;
drm_magic_t magic;
__GLcontextModes *driver_modes;
__DRIscreen driScreen;
} driDisplay;
/**
* dri driver-specific screen class derived from _EGLScreen
*/
typedef struct dri_screen
{
_EGLScreen Base;
char fb[NAME_MAX];
} driScreen;
/**
* dri driver-specific surface class derived from _EGLSurface
*/
typedef struct dri_surface
{
_EGLSurface Base; /* base class/object */
__DRIdrawable drawable;
} driSurface;
/**
* dri driver-specific context class derived from _EGLContext
*/
typedef struct dri_context
{
_EGLContext Base; /* base class/object */
__DRIcontext driContext; /**< \brief context dependent methods */
} driContext;
static inline driDisplay *
Lookup_driDisplay(EGLDisplay dpy)
{
_EGLDisplay *d = _eglLookupDisplay(dpy);
return (driDisplay *) d;
}
static inline driScreen *
Lookup_driScreen(EGLDisplay dpy, EGLScreenMESA screen)
{
_EGLScreen *s = _eglLookupScreen(dpy, screen);
return (driScreen *) s;
}
static inline driContext *
Lookup_driContext(EGLContext ctx)
{
_EGLContext *c = _eglLookupContext(ctx);
return (driContext *) c;
}
static inline driSurface *
Lookup_driSurface(EGLSurface surf)
{
_EGLSurface *s = _eglLookupSurface(surf);
return (driSurface *) s;
}
extern void _eglDRIInitDriverFallbacks(_EGLDriver *drv);
extern EGLBoolean _eglDRIShowSurfaceMESA(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA screen, EGLSurface surface, EGLModeMESA m);
extern EGLBoolean _eglDRIInitialize(_EGLDriver *drv, EGLDisplay dpy, EGLint *major, EGLint *minor);
extern EGLBoolean _eglDRIGetDisplayInfo(driDisplay *dpy);
extern EGLBoolean _eglDRICreateDisplay(driDisplay *dpy, __DRIframebuffer *framebuffer);
extern EGLBoolean _eglDRICreateScreen(driDisplay *dpy);
#endif /* EGLDRI_INCLUDED */

View File

@@ -45,7 +45,7 @@ _eglChooseDriver(EGLDisplay display)
else if (name[0] == ':' && (name[1] >= '0' && name[1] <= '9') && !name[2]) {
printf("EGL: Use driver for screen: %s\n", name);
/* XXX probe hardware here to determine which driver to open */
/* driverName = "something"; */
driverName = "libEGLdri";
}
else if (name[0] == '!') {
/* use specified driver name */
@@ -71,44 +71,40 @@ _eglChooseDriver(EGLDisplay display)
_EGLDriver *
_eglOpenDriver(_EGLDisplay *dpy, const char *driverName)
{
_EGLDriver *drv;
_EGLMain_t mainFunc;
void *lib;
char driverFilename[1000];
/* XXX also prepend a directory path??? */
sprintf(driverFilename, "%s.so", driverName);
#if 1
lib = dlopen(driverFilename, RTLD_NOW);
if (lib) {
_EGLDriver *drv;
_EGLMain_t mainFunc;
mainFunc = (_EGLMain_t) dlsym(lib, "_eglMain");
if (!mainFunc) {
fprintf(stderr, "_eglMain not found in %s", (char *) driverFilename);
dlclose(lib);
return NULL;
}
drv = mainFunc(dpy);
if (!drv) {
dlclose(lib);
return NULL;
}
drv->LibHandle = lib;
drv->Display = dpy;
return drv;
}
else {
fprintf(stderr, "EGLdebug: Error opening %s: %s\n",
driverFilename, dlerror());
if (!lib) {
fprintf(stderr, "EGLdebug: Error opening %s: %s\n", driverFilename, dlerror());
return NULL;
}
#else
/* use built-in driver */
return _eglDefaultMain(d);
#endif
mainFunc = (_EGLMain_t) dlsym(lib, "_eglMain");
if (!mainFunc) {
fprintf(stderr, "_eglMain not found in %s", (char *) driverFilename);
dlclose(lib);
return NULL;
}
drv = mainFunc(dpy);
if (!drv) {
dlclose(lib);
return NULL;
}
/* with a recurvise open you want the inner most handle */
if (!drv->LibHandle)
drv->LibHandle = lib;
else
dlclose(lib);
drv->Display = dpy;
return drv;
}

View File

@@ -125,10 +125,7 @@ struct _egl_driver
};
extern _EGLDriver *
_eglDefaultMain(NativeDisplayType d);
extern _EGLDriver *_eglMain(_EGLDisplay *dpy);
extern _EGLDriver *

View File

@@ -45,8 +45,8 @@ $(LIB_DIR):
# Make the library:
$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS)
@CC="$(CC)" CXX="$(CXX)" $(TOP)/bin/mklib -o $(GLU_LIB) -major $(GLU_MAJOR) \
-minor $(GLU_MINOR) -patch $(GLU_TINY) \
@ $(TOP)/bin/mklib -o $(GLU_LIB) -linker '$(CC)' \
-major $(GLU_MAJOR) -minor $(GLU_MINOR) -patch $(GLU_TINY) \
$(MKLIB_OPTIONS) -install $(LIB_DIR) \
$(GLU_LIB_DEPS) $(OBJECTS)

View File

@@ -136,8 +136,8 @@ $(LIB_DIR):
# Make the library:
$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS)
CC="$(CC)" CXX="$(CXX)" $(TOP)/bin/mklib -o $(GLU_LIB) -major $(GLU_MAJOR) \
-minor $(GLU_MINOR) -patch $(GLU_TINY) \
$(TOP)/bin/mklib -o $(GLU_LIB) -linker '$(CXX)' \
-major $(GLU_MAJOR) -minor $(GLU_MINOR) -patch $(GLU_TINY) \
-cplusplus $(MKLIB_OPTIONS) -install $(LIB_DIR) \
$(GLU_LIB_DEPS) $(OBJECTS)

View File

@@ -57,7 +57,9 @@
static void normalize(float vec[3]);
static void crossProduct(float x[3], float y[3], float ret[3]);
#if 0 // UNUSED
static void bezierCurveEvalfast(float u0, float u1, int order, float *ctlpoints, int stride, int dimension, float u, float retpoint[]);
#endif
static float binomialCoefficients[8][8] = {
{1,0,0,0,0,0,0,0},
@@ -91,7 +93,7 @@ void bezierCurveEval(float u0, float u1, int order, float *ctlpoints, int stride
}
#if 0 // UNUSED
/*order = degree +1 >=1.
*/
void bezierCurveEvalfast(float u0, float u1, int order, float *ctlpoints, int stride, int dimension, float u, float retpoint[])
@@ -115,7 +117,7 @@ void bezierCurveEvalfast(float u0, float u1, int order, float *ctlpoints, int st
for(j=0; j<dimension; j++)
retpoint[j] = buf[order-1][0][j];
}
#endif
/*order = degree +1 >=1.

View File

@@ -31,10 +31,10 @@
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
** $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $
** $Date: 2005/10/28 13:09:08 $ $Revision: 1.1.30.1 $
*/
/*
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/dataTransform.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/dataTransform.cc,v 1.1.30.1 2005/10/28 13:09:08 brianp Exp $
*/
#include <stdlib.h>
@@ -47,6 +47,7 @@
extern directedLine* arcLoopToDLineLoop(Arc_ptr loop);
#if 0 // UNUSED
static directedLine* copy_loop(Arc_ptr loop, Real2* vertArray, int& index, directedLine dline_buf[], sampledLine sline_buf[], int& index_dline)
{
directedLine *ret;
@@ -95,7 +96,9 @@ static directedLine* copy_loop(Arc_ptr loop, Real2* vertArray, int& index, direc
}
return ret;
}
#endif
#if 0 // UNUSED
static int num_edges(Bin& bin)
{
int sum=0;
@@ -103,6 +106,8 @@ static int num_edges(Bin& bin)
sum += jarc->pwlArc->npts-1;
return sum;
}
#endif
/*
directedLine* bin_to_DLineLoops(Bin& bin)
{

View File

@@ -35,8 +35,8 @@
/*
* intersect.c++
*
* $Date: 2004/05/12 15:29:36 $ $Revision: 1.2 $
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/intersect.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $
* $Date: 2005/10/28 13:09:08 $ $Revision: 1.2.8.1 $
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/intersect.cc,v 1.2.8.1 2005/10/28 13:09:08 brianp Exp $
*/
#include "glimports.h"
@@ -53,7 +53,9 @@
enum i_result { INTERSECT_VERTEX, INTERSECT_EDGE };
/* local functions */
#ifndef NDEBUG // for asserts only
static int arc_classify( Arc_ptr, int, REAL );
#endif
static enum i_result pwlarc_intersect( PwlArc *, int, REAL, int, int[3] );
@@ -400,6 +402,7 @@ pwlarc_intersect(
*----------------------------------------------------------------------------
*/
#ifndef NDEBUG // for asserts only
static int
arc_classify( Arc_ptr jarc, int param, REAL value )
{
@@ -438,6 +441,7 @@ arc_classify( Arc_ptr jarc, int param, REAL value )
}
}
}
#endif
void
Subdivider::classify_tailonleft_s( Bin& bin, Bin& in, Bin& out, REAL val )

View File

@@ -35,8 +35,8 @@
/*
* maplist.c++
*
* $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/maplist.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $
* $Date: 2005/10/28 13:09:08 $ $Revision: 1.1.30.1 $
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/maplist.cc,v 1.1.30.1 2005/10/28 13:09:08 brianp Exp $
*/
#include "glimports.h"
@@ -73,8 +73,10 @@ Maplist::add( long type, int israt, int ncoords )
void
Maplist::define( long type, int israt, int ncoords )
{
#ifndef NDEBUG // to avoid warning
Mapdesc *m = locate( type );
assert( m == NULL || ( m->isrational == israt && m->ncoords == ncoords ) );
#endif
add( type, israt, ncoords );
}

View File

@@ -31,10 +31,10 @@
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
** $Date: 2004/05/12 15:29:36 $ $Revision: 1.2 $
** $Date: 2005/10/28 13:09:08 $ $Revision: 1.2.8.1 $
*/
/*
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/monoTriangulationBackend.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/monoTriangulationBackend.cc,v 1.2.8.1 2005/10/28 13:09:08 brianp Exp $
*/
#include "monoTriangulation.h"
@@ -86,7 +86,7 @@ void reflexChain::processNewVertex(Real v[2], Backend* backend)
{
Int i,j,k;
Int isReflex;
TrimVertex trimVert;
/*TrimVertex trimVert;*/
/*if there are at most one vertex in the queue, then simply insert
*/
if(index_queue <=1){

View File

@@ -35,8 +35,8 @@
/*
* slicer.c++
*
* $Date: 2002/11/01 23:35:07 $ $Revision: 1.4 $
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/slicer.cc,v 1.4 2002/11/01 23:35:07 brianp Exp $
* $Date: 2005/10/28 13:09:08 $ $Revision: 1.4.26.1 $
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/slicer.cc,v 1.4.26.1 2005/10/28 13:09:08 brianp Exp $
*/
#include <stdlib.h>
@@ -84,6 +84,7 @@ Int num_quads = 0;
#define ZERO 0.00001 /*determing whether a loop is a rectngle or not*/
#define equalRect(a,b) ((glu_abs(a-b) <= ZERO)? 1:0) //only used in tessellating a rectangle
#if 0 // UNUSED
static Int is_Convex(Arc_ptr loop)
{
if(area(loop->tail(), loop->head(), loop->next->head()) <0 )
@@ -95,9 +96,11 @@ static Int is_Convex(Arc_ptr loop)
}
return 1;
}
#endif
/******triangulate a monotone polygon**************/
#include "monoTriangulation.h"
#if 0 // UNUSED
static int is_U_monotone(Arc_ptr loop)
{
int n_changes=0;
@@ -126,6 +129,7 @@ static int is_U_monotone(Arc_ptr loop)
else
return 0;
}
#endif
inline int compInY(REAL a[2], REAL b[2])
{
@@ -259,6 +263,7 @@ if(loop->next->tail()[1] == loop->next->head()[1])
//a line with the same u for opt
#ifdef USE_OPTTT
static void evalLineNOGE_BU(TrimVertex *verts, int n, Backend& backend)
{
int i;
@@ -266,8 +271,10 @@ static void evalLineNOGE_BU(TrimVertex *verts, int n, Backend& backend)
for(i=0; i<n; i++)
backend.tmeshvertNOGE_BU(&verts[i]);
}
#endif
//a line with the same v for opt
#ifdef USE_OPTTT
static void evalLineNOGE_BV(TrimVertex *verts, int n, Backend& backend)
{
int i;
@@ -276,6 +283,9 @@ static void evalLineNOGE_BV(TrimVertex *verts, int n, Backend& backend)
for(i=0; i<n; i++)
backend.tmeshvertNOGE_BV(&verts[i]);
}
#endif
#ifdef USE_OPTTT
static void evalLineNOGE(TrimVertex *verts, int n, Backend& backend)
{
@@ -290,7 +300,7 @@ static void evalLineNOGE(TrimVertex *verts, int n, Backend& backend)
backend.tmeshvertNOGE(&verts[i]);
}
}
#endif
inline void OPT_OUTVERT(TrimVertex& vv, Backend& backend)
{
@@ -861,6 +871,7 @@ return;
/**********for reading newtess_flag from a file**********/
#ifdef USE_READ_FLAG
static Int read_flag(char* name)
{
Int ret;
@@ -874,7 +885,7 @@ static Int read_flag(char* name)
fclose(fp);
return ret;
}
#endif
/***********nextgen tess****************/
#include "sampleMonoPoly.h"

View File

@@ -35,8 +35,8 @@
/*
* trimline.c++
*
* $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/trimline.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $
* $Date: 2005/10/28 13:09:08 $ $Revision: 1.1.30.1 $
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/trimline.cc,v 1.1.30.1 2005/10/28 13:09:08 brianp Exp $
*/
#include "glimports.h"
@@ -162,10 +162,11 @@ Trimline::getNextPts( Arc_ptr botarc )
{
reset(); swap(); append( tinterp );
#ifndef NDEBUG
PwlArc *lastpwl = botarc->prev->pwlArc;
TrimVertex *lastpt1 = &lastpwl->pts[lastpwl->npts-1];
#endif
TrimVertex *lastpt2 = botarc->pwlArc->pts;
register TrimVertex *p = jarcl.getnextpt();
for( append( p ); p != lastpt2; append( p ) ) {
assert( p != lastpt1 );
@@ -180,7 +181,9 @@ Trimline::getPrevPts( Arc_ptr botarc )
PwlArc *lastpwl = botarc->prev->pwlArc;
TrimVertex *lastpt1 = &lastpwl->pts[lastpwl->npts-1];
#ifndef NDEBUG
TrimVertex *lastpt2 = botarc->pwlArc->pts;
#endif
register TrimVertex *q = jarcl.getprevpt();
for( append( q ); q != lastpt1; append( q ) ) {

View File

@@ -31,10 +31,10 @@
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
** $Date: 2004/05/12 15:29:36 $ $Revision: 1.2 $
** $Date: 2005/10/28 13:09:08 $ $Revision: 1.2.8.1 $
*/
/*
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/monoChain.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/monoChain.cc,v 1.2.8.1 2005/10/28 13:09:08 brianp Exp $
*/
#include "gluos.h"
@@ -61,6 +61,7 @@ extern Int isCusp(directedLine *v);
extern Int deleteRepeatDiagonals(Int num_diagonals, directedLine** diagonal_vertices, directedLine** new_vertices);
//for debug purpose only
#if 0 // UNUSED
static void drawDiagonals(Int num_diagonals, directedLine** diagonal_vertices)
{
Int i;
@@ -72,6 +73,7 @@ static void drawDiagonals(Int num_diagonals, directedLine** diagonal_vertices)
glEnd();
}
}
#endif
/*given (x_1, y_1) and (x_2, y_2), and y
*return x such that (x,y) is on the line

View File

@@ -31,10 +31,10 @@
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
** $Date: 2004/05/12 15:29:36 $ $Revision: 1.3 $
** $Date: 2005/10/28 13:09:09 $ $Revision: 1.3.8.1 $
*/
/*
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc,v 1.3 2004/05/12 15:29:36 brianp Exp $
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc,v 1.3.8.1 2005/10/28 13:09:09 brianp Exp $
*/
#include <stdlib.h>
@@ -1037,8 +1037,8 @@ void monoTriangulationRec(directedLine* inc_chain, Int inc_index,
primStream* pStream)
{
Int i;
directedLine *temp, *oldtemp;
Int tempIndex, oldtempIndex;
directedLine *temp, *oldtemp = NULL;
Int tempIndex, oldtempIndex = 0;
assert(inc_chain != NULL && dec_chain != NULL);

View File

@@ -621,6 +621,7 @@ directedLine* DBG_cutIntersectionPoly(directedLine *polygon, int& cutOccur)
//given a polygon, cut the edges off and finally obtain a
//a polygon without intersections. The cut-off edges are
//dealloated. The new polygon is returned.
#if 0 // UNUSED
static directedLine* DBG_cutIntersectionPoly_notwork(directedLine *polygon)
{
directedLine *crt;//current polygon
@@ -673,6 +674,7 @@ static directedLine* DBG_cutIntersectionPoly_notwork(directedLine *polygon)
find = 0; //go to next loop
}
}
#endif
directedLine* DBG_cutIntersectionAllPoly(directedLine* list)
{

View File

@@ -31,10 +31,10 @@
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $
** $Date: 2005/10/28 13:09:09 $ $Revision: 1.1.30.1 $
*/
/*
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleComp.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleComp.cc,v 1.1.30.1 2005/10/28 13:09:09 brianp Exp $
*/
#include <stdlib.h>
@@ -159,7 +159,7 @@ void sampleCompLeft(Real* topVertex, Real* botVertex,
*/
Int midIndex1;
Int midIndex2;
Int gridMidIndex1, gridMidIndex2;
Int gridMidIndex1 = 0, gridMidIndex2 = 0;
//midIndex1: array[i] <= v, array[i-1] > v
//midIndex2: array[i] >= v, array[i+1] < v
// v(gridMidIndex1) >= v(midindex1) > v(gridMidIndex1+1)

View File

@@ -31,10 +31,10 @@
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
** $Date: 2001/03/22 11:41:40 $ $Revision: 1.2 $
** $Date: 2005/10/28 13:09:09 $ $Revision: 1.2.30.1 $
*/
/*
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.cc,v 1.2 2001/03/22 11:41:40 joukj Exp $
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.cc,v 1.2.30.1 2005/10/28 13:09:09 brianp Exp $
*/
#include <stdlib.h>
@@ -72,7 +72,7 @@ void sampleCompRight(Real* topVertex, Real* botVertex,
*/
Int midIndex1;
Int midIndex2;
Int gridMidIndex1, gridMidIndex2;
Int gridMidIndex1, gridMidIndex2 = 0;
//midIndex1: array[i] <= v, array[i+1] > v
//midIndex2: array[i] >= v, array[i+1] < v
midIndex1 = rightChain->findIndexBelowGen(rightGridChain->get_v_value(gridIndex1),

View File

@@ -31,10 +31,10 @@
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
** $Date: 2004/05/12 15:29:36 $ $Revision: 1.4 $
** $Date: 2005/10/28 13:09:09 $ $Revision: 1.4.8.1 $
*/
/*
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.cc,v 1.4 2004/05/12 15:29:36 brianp Exp $
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.cc,v 1.4.8.1 2005/10/28 13:09:09 brianp Exp $
*/
#include "gluos.h"
@@ -976,7 +976,7 @@ void findNeck(vertexArray *leftChain, Int botLeftIndex,
void findLeftGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGridIndex, gridWrap* grid, Int* ret_indices, Int* ret_innerIndices)
{
Int i,k,isHoriz;
Int i,k,isHoriz = 0;
Int n_ulines = grid->get_n_ulines();
Real uMin = grid->get_u_min();
Real uMax = grid->get_u_max();
@@ -984,7 +984,7 @@ void findLeftGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGrid
Real vMin = grid->get_v_min();
Real vMax = grid->get_v_max();
*/
Real slop, uinterc;
Real slop = 0.0, uinterc;
#ifdef SHORTEN_GRID_LINE
//uintercBuf stores all the interction u value for each grid line
@@ -1102,7 +1102,7 @@ void findRightGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGri
Real vMin = grid->get_v_min();
Real vMax = grid->get_v_max();
*/
Real slop, uinterc;
Real slop = 0.0, uinterc;
#ifdef SHORTEN_GRID_LINE
//uintercBuf stores all the interction u value for each grid line

View File

@@ -31,8 +31,8 @@
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libutil/error.c,v 1.1 2001/03/17 00:25:41 brianp Exp $
** $Date: 2005/10/05 02:08:30 $ $Revision: 1.1.30.1 $
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libutil/error.c,v 1.1.30.1 2005/10/05 02:08:30 brianp Exp $
*/
#include "gluos.h"
@@ -81,6 +81,11 @@ gluErrorString(GLenum errorCode)
if ((errorCode >= GLU_TESS_ERROR1) && (errorCode <= GLU_TESS_ERROR8)) {
return (const unsigned char *) __gluTessErrorString(errorCode - (GLU_TESS_ERROR1 - 1));
}
#ifdef GL_EXT_framebuffer_object
if (errorCode == GL_INVALID_FRAMEBUFFER_OPERATION_EXT) {
return (const unsigned char *) "invalid framebuffer operation";
}
#endif
return 0;
}

View File

@@ -444,7 +444,7 @@ gluPartialDisk(GLUquadric *qobj, GLdouble innerRadius,
GLfloat sintemp, costemp;
GLfloat deltaRadius;
GLfloat radiusLow, radiusHigh;
GLfloat texLow, texHigh;
GLfloat texLow = 0.0, texHigh = 0.0;
GLfloat angleOffset;
GLint slices2;
GLint finish;
@@ -713,8 +713,8 @@ gluSphere(GLUquadric *qobj, GLdouble radius, GLint slices, GLint stacks)
GLfloat cosCache3b[CACHE_SIZE];
GLfloat angle;
GLfloat zLow, zHigh;
GLfloat sintemp1, sintemp2, sintemp3, sintemp4;
GLfloat costemp1, costemp2, costemp3, costemp4;
GLfloat sintemp1, sintemp2, sintemp3 = 0.0, sintemp4 = 0.0;
GLfloat costemp1, costemp2 = 0.0, costemp3 = 0.0, costemp4 = 0.0;
GLboolean needCache2, needCache3;
GLint start, finish;

View File

@@ -53,145 +53,145 @@ glutExtensionSupported(const char *extension)
struct name_address_pair {
const char *name;
const void *address;
const GLUTproc address;
};
static struct name_address_pair glut_functions[] = {
{ "glutInit", (const void *) glutInit },
{ "glutInitDisplayMode", (const void *) glutInitDisplayMode },
{ "glutInitDisplayString", (const void *) glutInitDisplayString },
{ "glutInitWindowPosition", (const void *) glutInitWindowPosition },
{ "glutInitWindowSize", (const void *) glutInitWindowSize },
{ "glutMainLoop", (const void *) glutMainLoop },
{ "glutCreateWindow", (const void *) glutCreateWindow },
{ "glutCreateSubWindow", (const void *) glutCreateSubWindow },
{ "glutDestroyWindow", (const void *) glutDestroyWindow },
{ "glutPostRedisplay", (const void *) glutPostRedisplay },
{ "glutPostWindowRedisplay", (const void *) glutPostWindowRedisplay },
{ "glutSwapBuffers", (const void *) glutSwapBuffers },
{ "glutGetWindow", (const void *) glutGetWindow },
{ "glutSetWindow", (const void *) glutSetWindow },
{ "glutSetWindowTitle", (const void *) glutSetWindowTitle },
{ "glutSetIconTitle", (const void *) glutSetIconTitle },
{ "glutPositionWindow", (const void *) glutPositionWindow },
{ "glutReshapeWindow", (const void *) glutReshapeWindow },
{ "glutPopWindow", (const void *) glutPopWindow },
{ "glutPushWindow", (const void *) glutPushWindow },
{ "glutIconifyWindow", (const void *) glutIconifyWindow },
{ "glutShowWindow", (const void *) glutShowWindow },
{ "glutHideWindow", (const void *) glutHideWindow },
{ "glutFullScreen", (const void *) glutFullScreen },
{ "glutSetCursor", (const void *) glutSetCursor },
{ "glutWarpPointer", (const void *) glutWarpPointer },
{ "glutEstablishOverlay", (const void *) glutEstablishOverlay },
{ "glutRemoveOverlay", (const void *) glutRemoveOverlay },
{ "glutUseLayer", (const void *) glutUseLayer },
{ "glutPostOverlayRedisplay", (const void *) glutPostOverlayRedisplay },
{ "glutPostWindowOverlayRedisplay", (const void *) glutPostWindowOverlayRedisplay },
{ "glutShowOverlay", (const void *) glutShowOverlay },
{ "glutHideOverlay", (const void *) glutHideOverlay },
{ "glutCreateMenu", (const void *) glutCreateMenu },
{ "glutDestroyMenu", (const void *) glutDestroyMenu },
{ "glutGetMenu", (const void *) glutGetMenu },
{ "glutSetMenu", (const void *) glutSetMenu },
{ "glutAddMenuEntry", (const void *) glutAddMenuEntry },
{ "glutAddSubMenu", (const void *) glutAddSubMenu },
{ "glutChangeToMenuEntry", (const void *) glutChangeToMenuEntry },
{ "glutChangeToSubMenu", (const void *) glutChangeToSubMenu },
{ "glutRemoveMenuItem", (const void *) glutRemoveMenuItem },
{ "glutAttachMenu", (const void *) glutAttachMenu },
{ "glutDetachMenu", (const void *) glutDetachMenu },
{ "glutDisplayFunc", (const void *) glutDisplayFunc },
{ "glutReshapeFunc", (const void *) glutReshapeFunc },
{ "glutKeyboardFunc", (const void *) glutKeyboardFunc },
{ "glutMouseFunc", (const void *) glutMouseFunc },
{ "glutMotionFunc", (const void *) glutMotionFunc },
{ "glutPassiveMotionFunc", (const void *) glutPassiveMotionFunc },
{ "glutEntryFunc", (const void *) glutEntryFunc },
{ "glutVisibilityFunc", (const void *) glutVisibilityFunc },
{ "glutIdleFunc", (const void *) glutIdleFunc },
{ "glutTimerFunc", (const void *) glutTimerFunc },
{ "glutMenuStateFunc", (const void *) glutMenuStateFunc },
{ "glutSpecialFunc", (const void *) glutSpecialFunc },
{ "glutSpaceballMotionFunc", (const void *) glutSpaceballMotionFunc },
{ "glutSpaceballRotateFunc", (const void *) glutSpaceballRotateFunc },
{ "glutSpaceballButtonFunc", (const void *) glutSpaceballButtonFunc },
{ "glutButtonBoxFunc", (const void *) glutButtonBoxFunc },
{ "glutDialsFunc", (const void *) glutDialsFunc },
{ "glutTabletMotionFunc", (const void *) glutTabletMotionFunc },
{ "glutTabletButtonFunc", (const void *) glutTabletButtonFunc },
{ "glutMenuStatusFunc", (const void *) glutMenuStatusFunc },
{ "glutOverlayDisplayFunc", (const void *) glutOverlayDisplayFunc },
{ "glutWindowStatusFunc", (const void *) glutWindowStatusFunc },
// { "glutKeyboardUpFunc", (const void *) glutKeyboardUpFunc },
// { "glutSpecialUpFunc", (const void *) glutSpecialUpFunc },
// { "glutJoystickFunc", (const void *) glutJoystickFunc },
{ "glutSetColor", (const void *) glutSetColor },
{ "glutGetColor", (const void *) glutGetColor },
{ "glutCopyColormap", (const void *) glutCopyColormap },
{ "glutGet", (const void *) glutGet },
{ "glutDeviceGet", (const void *) glutDeviceGet },
{ "glutExtensionSupported", (const void *) glutExtensionSupported },
{ "glutGetModifiers", (const void *) glutGetModifiers },
{ "glutLayerGet", (const void *) glutLayerGet },
{ "glutGetProcAddress", (const void *) glutGetProcAddress },
{ "glutBitmapCharacter", (const void *) glutBitmapCharacter },
{ "glutBitmapWidth", (const void *) glutBitmapWidth },
{ "glutStrokeCharacter", (const void *) glutStrokeCharacter },
{ "glutStrokeWidth", (const void *) glutStrokeWidth },
{ "glutBitmapLength", (const void *) glutBitmapLength },
{ "glutStrokeLength", (const void *) glutStrokeLength },
{ "glutWireSphere", (const void *) glutWireSphere },
{ "glutSolidSphere", (const void *) glutSolidSphere },
{ "glutWireCone", (const void *) glutWireCone },
{ "glutSolidCone", (const void *) glutSolidCone },
{ "glutWireCube", (const void *) glutWireCube },
{ "glutSolidCube", (const void *) glutSolidCube },
{ "glutWireTorus", (const void *) glutWireTorus },
{ "glutSolidTorus", (const void *) glutSolidTorus },
{ "glutWireDodecahedron", (const void *) glutWireDodecahedron },
{ "glutSolidDodecahedron", (const void *) glutSolidDodecahedron },
{ "glutWireTeapot", (const void *) glutWireTeapot },
{ "glutSolidTeapot", (const void *) glutSolidTeapot },
{ "glutWireOctahedron", (const void *) glutWireOctahedron },
{ "glutSolidOctahedron", (const void *) glutSolidOctahedron },
{ "glutWireTetrahedron", (const void *) glutWireTetrahedron },
{ "glutSolidTetrahedron", (const void *) glutSolidTetrahedron },
{ "glutWireIcosahedron", (const void *) glutWireIcosahedron },
{ "glutSolidIcosahedron", (const void *) glutSolidIcosahedron },
{ "glutVideoResizeGet", (const void *) glutVideoResizeGet },
{ "glutSetupVideoResizing", (const void *) glutSetupVideoResizing },
{ "glutStopVideoResizing", (const void *) glutStopVideoResizing },
{ "glutVideoResize", (const void *) glutVideoResize },
{ "glutVideoPan", (const void *) glutVideoPan },
{ "glutReportErrors", (const void *) glutReportErrors },
// { "glutIgnoreKeyRepeat", (const void *) glutIgnoreKeyRepeat },
// { "glutSetKeyRepeat", (const void *) glutSetKeyRepeat },
// { "glutForceJoystickFunc", (const void *) glutForceJoystickFunc },
// { "glutGameModeString", (const void *) glutGameModeString },
// { "glutEnterGameMode", (const void *) glutEnterGameMode },
// { "glutLeaveGameMode", (const void *) glutLeaveGameMode },
// { "glutGameModeGet", (const void *) glutGameModeGet },
{ "glutInit", (const GLUTproc) glutInit },
{ "glutInitDisplayMode", (const GLUTproc) glutInitDisplayMode },
{ "glutInitDisplayString", (const GLUTproc) glutInitDisplayString },
{ "glutInitWindowPosition", (const GLUTproc) glutInitWindowPosition },
{ "glutInitWindowSize", (const GLUTproc) glutInitWindowSize },
{ "glutMainLoop", (const GLUTproc) glutMainLoop },
{ "glutCreateWindow", (const GLUTproc) glutCreateWindow },
{ "glutCreateSubWindow", (const GLUTproc) glutCreateSubWindow },
{ "glutDestroyWindow", (const GLUTproc) glutDestroyWindow },
{ "glutPostRedisplay", (const GLUTproc) glutPostRedisplay },
{ "glutPostWindowRedisplay", (const GLUTproc) glutPostWindowRedisplay },
{ "glutSwapBuffers", (const GLUTproc) glutSwapBuffers },
{ "glutGetWindow", (const GLUTproc) glutGetWindow },
{ "glutSetWindow", (const GLUTproc) glutSetWindow },
{ "glutSetWindowTitle", (const GLUTproc) glutSetWindowTitle },
{ "glutSetIconTitle", (const GLUTproc) glutSetIconTitle },
{ "glutPositionWindow", (const GLUTproc) glutPositionWindow },
{ "glutReshapeWindow", (const GLUTproc) glutReshapeWindow },
{ "glutPopWindow", (const GLUTproc) glutPopWindow },
{ "glutPushWindow", (const GLUTproc) glutPushWindow },
{ "glutIconifyWindow", (const GLUTproc) glutIconifyWindow },
{ "glutShowWindow", (const GLUTproc) glutShowWindow },
{ "glutHideWindow", (const GLUTproc) glutHideWindow },
{ "glutFullScreen", (const GLUTproc) glutFullScreen },
{ "glutSetCursor", (const GLUTproc) glutSetCursor },
{ "glutWarpPointer", (const GLUTproc) glutWarpPointer },
{ "glutEstablishOverlay", (const GLUTproc) glutEstablishOverlay },
{ "glutRemoveOverlay", (const GLUTproc) glutRemoveOverlay },
{ "glutUseLayer", (const GLUTproc) glutUseLayer },
{ "glutPostOverlayRedisplay", (const GLUTproc) glutPostOverlayRedisplay },
{ "glutPostWindowOverlayRedisplay", (const GLUTproc) glutPostWindowOverlayRedisplay },
{ "glutShowOverlay", (const GLUTproc) glutShowOverlay },
{ "glutHideOverlay", (const GLUTproc) glutHideOverlay },
{ "glutCreateMenu", (const GLUTproc) glutCreateMenu },
{ "glutDestroyMenu", (const GLUTproc) glutDestroyMenu },
{ "glutGetMenu", (const GLUTproc) glutGetMenu },
{ "glutSetMenu", (const GLUTproc) glutSetMenu },
{ "glutAddMenuEntry", (const GLUTproc) glutAddMenuEntry },
{ "glutAddSubMenu", (const GLUTproc) glutAddSubMenu },
{ "glutChangeToMenuEntry", (const GLUTproc) glutChangeToMenuEntry },
{ "glutChangeToSubMenu", (const GLUTproc) glutChangeToSubMenu },
{ "glutRemoveMenuItem", (const GLUTproc) glutRemoveMenuItem },
{ "glutAttachMenu", (const GLUTproc) glutAttachMenu },
{ "glutDetachMenu", (const GLUTproc) glutDetachMenu },
{ "glutDisplayFunc", (const GLUTproc) glutDisplayFunc },
{ "glutReshapeFunc", (const GLUTproc) glutReshapeFunc },
{ "glutKeyboardFunc", (const GLUTproc) glutKeyboardFunc },
{ "glutMouseFunc", (const GLUTproc) glutMouseFunc },
{ "glutMotionFunc", (const GLUTproc) glutMotionFunc },
{ "glutPassiveMotionFunc", (const GLUTproc) glutPassiveMotionFunc },
{ "glutEntryFunc", (const GLUTproc) glutEntryFunc },
{ "glutVisibilityFunc", (const GLUTproc) glutVisibilityFunc },
{ "glutIdleFunc", (const GLUTproc) glutIdleFunc },
{ "glutTimerFunc", (const GLUTproc) glutTimerFunc },
{ "glutMenuStateFunc", (const GLUTproc) glutMenuStateFunc },
{ "glutSpecialFunc", (const GLUTproc) glutSpecialFunc },
{ "glutSpaceballMotionFunc", (const GLUTproc) glutSpaceballMotionFunc },
{ "glutSpaceballRotateFunc", (const GLUTproc) glutSpaceballRotateFunc },
{ "glutSpaceballButtonFunc", (const GLUTproc) glutSpaceballButtonFunc },
{ "glutButtonBoxFunc", (const GLUTproc) glutButtonBoxFunc },
{ "glutDialsFunc", (const GLUTproc) glutDialsFunc },
{ "glutTabletMotionFunc", (const GLUTproc) glutTabletMotionFunc },
{ "glutTabletButtonFunc", (const GLUTproc) glutTabletButtonFunc },
{ "glutMenuStatusFunc", (const GLUTproc) glutMenuStatusFunc },
{ "glutOverlayDisplayFunc", (const GLUTproc) glutOverlayDisplayFunc },
{ "glutWindowStatusFunc", (const GLUTproc) glutWindowStatusFunc },
// { "glutKeyboardUpFunc", (const GLUTproc) glutKeyboardUpFunc },
// { "glutSpecialUpFunc", (const GLUTproc) glutSpecialUpFunc },
// { "glutJoystickFunc", (const GLUTproc) glutJoystickFunc },
{ "glutSetColor", (const GLUTproc) glutSetColor },
{ "glutGetColor", (const GLUTproc) glutGetColor },
{ "glutCopyColormap", (const GLUTproc) glutCopyColormap },
{ "glutGet", (const GLUTproc) glutGet },
{ "glutDeviceGet", (const GLUTproc) glutDeviceGet },
{ "glutExtensionSupported", (const GLUTproc) glutExtensionSupported },
{ "glutGetModifiers", (const GLUTproc) glutGetModifiers },
{ "glutLayerGet", (const GLUTproc) glutLayerGet },
{ "glutGetProcAddress", (const GLUTproc) glutGetProcAddress },
{ "glutBitmapCharacter", (const GLUTproc) glutBitmapCharacter },
{ "glutBitmapWidth", (const GLUTproc) glutBitmapWidth },
{ "glutStrokeCharacter", (const GLUTproc) glutStrokeCharacter },
{ "glutStrokeWidth", (const GLUTproc) glutStrokeWidth },
{ "glutBitmapLength", (const GLUTproc) glutBitmapLength },
{ "glutStrokeLength", (const GLUTproc) glutStrokeLength },
{ "glutWireSphere", (const GLUTproc) glutWireSphere },
{ "glutSolidSphere", (const GLUTproc) glutSolidSphere },
{ "glutWireCone", (const GLUTproc) glutWireCone },
{ "glutSolidCone", (const GLUTproc) glutSolidCone },
{ "glutWireCube", (const GLUTproc) glutWireCube },
{ "glutSolidCube", (const GLUTproc) glutSolidCube },
{ "glutWireTorus", (const GLUTproc) glutWireTorus },
{ "glutSolidTorus", (const GLUTproc) glutSolidTorus },
{ "glutWireDodecahedron", (const GLUTproc) glutWireDodecahedron },
{ "glutSolidDodecahedron", (const GLUTproc) glutSolidDodecahedron },
{ "glutWireTeapot", (const GLUTproc) glutWireTeapot },
{ "glutSolidTeapot", (const GLUTproc) glutSolidTeapot },
{ "glutWireOctahedron", (const GLUTproc) glutWireOctahedron },
{ "glutSolidOctahedron", (const GLUTproc) glutSolidOctahedron },
{ "glutWireTetrahedron", (const GLUTproc) glutWireTetrahedron },
{ "glutSolidTetrahedron", (const GLUTproc) glutSolidTetrahedron },
{ "glutWireIcosahedron", (const GLUTproc) glutWireIcosahedron },
{ "glutSolidIcosahedron", (const GLUTproc) glutSolidIcosahedron },
{ "glutVideoResizeGet", (const GLUTproc) glutVideoResizeGet },
{ "glutSetupVideoResizing", (const GLUTproc) glutSetupVideoResizing },
{ "glutStopVideoResizing", (const GLUTproc) glutStopVideoResizing },
{ "glutVideoResize", (const GLUTproc) glutVideoResize },
{ "glutVideoPan", (const GLUTproc) glutVideoPan },
{ "glutReportErrors", (const GLUTproc) glutReportErrors },
// { "glutIgnoreKeyRepeat", (const GLUTproc) glutIgnoreKeyRepeat },
// { "glutSetKeyRepeat", (const GLUTproc) glutSetKeyRepeat },
// { "glutForceJoystickFunc", (const GLUTproc) glutForceJoystickFunc },
// { "glutGameModeString", (const GLUTproc) glutGameModeString },
// { "glutEnterGameMode", (const GLUTproc) glutEnterGameMode },
// { "glutLeaveGameMode", (const GLUTproc) glutLeaveGameMode },
// { "glutGameModeGet", (const GLUTproc) glutGameModeGet },
{ NULL, NULL }
};
/* XXX This isn't an official GLUT function, yet */
void * GLUTAPIENTRY
GLUTproc GLUTAPIENTRY
glutGetProcAddress(const char *procName)
{
/* Try GLUT functions first */
int i;
for (i = 0; glut_functions[i].name; i++) {
if (strcmp(glut_functions[i].name, procName) == 0)
return (void *) glut_functions[i].address;
return glut_functions[i].address;
}
/* Try core GL functions */
#if defined(_WIN32)
return (void *) wglGetProcAddress((LPCSTR) procName);
return (GLUTProc) wglGetProcAddress((LPCSTR) procName);
#elif defined(GLX_ARB_get_proc_address)
return (void *) glXGetProcAddressARB((const GLubyte *) procName);
return (GLUTProc) glXGetProcAddressARB((const GLubyte *) procName);
#else
return NULL;
#endif

View File

@@ -32,7 +32,7 @@ default: $(LIB_DIR)/$(GLUT_LIB_NAME)
# Make the library
$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
CC="$(CC)" CXX="$(CXX)" $(TOP)/bin/mklib -o $(GLUT_LIB) \
$(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' \
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) \
-patch $(GLUT_TINY) $(MKLIB_OPTIONS) -install $(LIB_DIR) \
$(GLUT_LIB_DEPS) $(OBJECTS)

Some files were not shown because too many files have changed in this diff Show More