Compare commits

...

269 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
291 changed files with 11348 additions and 11983 deletions

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,9 +134,10 @@ ultrix-gcc:
# Rules for making release tarballs
DIRECTORY = Mesa-6.3.1
LIB_NAME = MesaLib-6.3.1
DEMO_NAME = MesaDemos-6.3.1
DIRECTORY = Mesa-6.4.1
LIB_NAME = MesaLib-6.4.1
DEMO_NAME = MesaDemos-6.4.1
GLUT_NAME = MesaGLUT-6.4.1
MAIN_FILES = \
$(DIRECTORY)/Makefile* \
@@ -151,8 +153,9 @@ MAIN_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 \
@@ -211,7 +214,6 @@ MAIN_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/ggi/*.[ch] \
@@ -258,17 +260,16 @@ MAIN_FILES = \
$(DIRECTORY)/windows/VC7/mesa/osmesa/osmesa.vcproj
DRI_FILES = \
$(DIRECTORY)/include/GL/internal/*.h \
$(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/*.[ch] \
$(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.[ch] \
$(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.po \
$(DIRECTORY)/src/mesa/drivers/dri/dri_client/imports/*.h \
$(DIRECTORY)/src/mesa/drivers/dri/*/*.[ch] \
$(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]
@@ -310,7 +311,7 @@ GLW_FILES = \
$(DIRECTORY)/src/glw/README \
$(DIRECTORY)/src/glw/depend
PROG_FILES = \
DEMO_FILES = \
$(DIRECTORY)/progs/beos/*.cpp \
$(DIRECTORY)/progs/beos/Makefile \
$(DIRECTORY)/progs/images/*.rgb \
@@ -321,6 +322,8 @@ PROG_FILES = \
$(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] \
@@ -335,10 +338,8 @@ PROG_FILES = \
$(DIRECTORY)/progs/windml/*.bmp \
$(DIRECTORY)/progs/ggi/*.c \
$(DIRECTORY)/windows/VC6/progs/demos/*.dsp \
$(DIRECTORY)/windows/VC6/progs/glut/glut.dsp \
$(DIRECTORY)/windows/VC6/progs/progs.dsw \
$(DIRECTORY)/windows/VC7/progs/demos/*.vcproj \
$(DIRECTORY)/windows/VC7/progs/glut/glut.vcproj \
$(DIRECTORY)/windows/VC7/progs/progs.sln
GLUT_FILES = \
@@ -357,7 +358,9 @@ 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 \
@@ -368,11 +371,9 @@ DEPEND_FILES = \
LIB_FILES = $(MAIN_FILES) $(DRI_FILES) $(SGI_GLU_FILES) $(GLW_FILES)
DEMO_FILES = $(PROG_FILES) $(GLUT_FILES)
# Everything for new a Mesa release:
tarballs: rm_depend 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:
@@ -394,6 +395,12 @@ demo_gz:
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 .. ; \
@@ -407,6 +414,12 @@ demo_bz2:
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 -f $(LIB_NAME).zip ; \
@@ -420,6 +433,12 @@ demo_zip:
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
@@ -427,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."

View File

@@ -25,31 +25,6 @@
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
function usage()
{
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'
}
#
# Option defaults
#
@@ -75,7 +50,26 @@ while true
do
case $1 in
'-h' | '--help')
usage;
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')
@@ -198,6 +192,15 @@ case $ARCH in
echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}
#OPTS="-shared -Wl,-soname,${LIBNAME}" # soname???
OPTS="-shared"
# 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}
@@ -306,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"
@@ -320,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
;;
@@ -489,7 +505,7 @@ case $ARCH in
else
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

View File

@@ -7,10 +7,10 @@ CONFIG_NAME = default
# Version info
MESA_MAJOR=6
MESA_MINOR=3
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

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 = -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER
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 r300 radeon tdfx \
DRI_DIRS = i810 i830 i915 mach64 mga r128 r200 r300 radeon tdfx \
unichrome savage sis

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 \
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER
-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,17 +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
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
# 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 r300 radeon s3v \
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

@@ -19,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

@@ -28,16 +28,16 @@ CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
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

@@ -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

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

@@ -1352,10 +1352,72 @@ Mesa Version History
- fixed a few Darwin compilation problems
6.3.1 July XX, 2005
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

@@ -37,8 +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="http://www.sourceforge.net/projects/mesa3d" target="_parent">Devel Release (6.3)</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>
@@ -82,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>
@@ -90,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

@@ -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

@@ -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

@@ -11,6 +11,121 @@
<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.
@@ -1016,6 +1131,6 @@ source code</a>.</p>
<hr>
$Id: news.html,v 3.22 2005/07/20 18:20:45 brianp Exp $
$Id: news.html,v 3.24.2.4 2005/11/30 01:15:50 brianp Exp $
</body>
</html>

View File

@@ -13,7 +13,9 @@ The release notes summarize what's new or changed in each Mesa release.
</p>
<UL>
<LI><A HREF="RELNOTES-6.3.1">RELNOTES-6.3.1</A>
<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

@@ -347,6 +347,8 @@ typedef long long int int64_t;
#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
#if 0 /*ndef 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>
/**

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

@@ -25,35 +25,35 @@ 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) eglgears.o -L$(LIB_DIR) -lEGL $(APP_LIB_DEPS) -o $@
$(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

View File

@@ -576,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)) {
@@ -602,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);
@@ -610,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);

View File

@@ -87,9 +87,9 @@ 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. */
//static GLfloat eyesep = 5.0; /* Eye separation. */
//static GLfloat fix_point = 40.0; /* Fixation point distance. */
//static GLfloat left, right, asp; /* Stereo frustum params. */
/*
@@ -385,7 +385,7 @@ main(int argc, char *argv[])
}
// DBR : Create EGL context/surface etc
EGLDisplay d = eglGetDisplay("!fb_dri");
EGLDisplay d = eglGetDisplay(":0");
assert(d);
if (!eglInitialize(d, &maj, &min)) {
@@ -431,7 +431,9 @@ main(int argc, char *argv[])
init(); // Initialise the GL visual
reshape(1024,768);
glDrawBuffer( GL_BACK );
// DBR : Run the simulation
run_gears(d, screen_surf, 5.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");

View File

@@ -23,6 +23,7 @@ SOURCES = antialias.c \
blendsquare.c \
bufferobj.c \
bug_3101.c \
bug_3195.c \
crossbar.c \
cva.c \
dinoshade.c \
@@ -104,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 $@

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 */
@@ -156,6 +158,12 @@ Init( void )
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__);

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,8 +221,9 @@ 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,
@@ -231,8 +234,9 @@ Init(void)
/* 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,

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

@@ -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);

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

@@ -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

@@ -182,9 +182,9 @@ extern void GLwDrawingAreaSwapBuffers(Widget w);
#ifdef __GLX_MOTIF
#ifdef _NO_PROTO
GLAPI extern Widget GLwCreateMDrawingArea();
GLAPI Widget GLwCreateMDrawingArea();
#else
GLAPI extern Widget GLwCreateMDrawingArea(Widget parent,char *name,ArgList arglist,Cardinal argcount);
GLAPI Widget GLwCreateMDrawingArea(Widget parent,char *name,ArgList arglist,Cardinal argcount);
#endif
#endif

View File

@@ -59,7 +59,7 @@ typedef struct _GLwMDrawingAreaClassRec {
} GLwMDrawingAreaClassRec;
GLAPI extern GLwMDrawingAreaClassRec glwMDrawingAreaClassRec;
extern GLwMDrawingAreaClassRec glwMDrawingAreaClassRec;
/* XT */

View File

@@ -1,451 +0,0 @@
/*
BOILERPLATE
To get started with mixed model programming with Motif and OpenGL, this
boilerplate `application' might help get you started.
This program honors two environment variables:
SETVISUAL <id> Makes the application use the indicated visual,
instead of the one chosen by glxChooseVisual.
SAMEVISUAL Make the application use the same visual for the
GUI as for the 3D GL Widget.
The basic idea is to minimize colormap `flash' on systems with only one
hardware colormap, especially when focus shifts between several
of the application's windows, e.g. the about box.
If you have suggestions for improvements, please mail to:
Jeroen van der Zijp <jvz@cyberia.cfdrc.com>
Feel free to turn this into a useful program!!
*/
/*
This code is hereby placed under GNU GENERAL PUBLIC LICENSE.
Copyright (C) 1996 Jeroen van der Zijp <jvz@cyberia.cfdrc.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* Include the kitchen sink */
#include <stdio.h>
#include <stdlib.h>
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/cursorfont.h>
#include <X11/keysym.h>
#include <Xm/Xm.h>
#include <Xm/MainW.h>
#include <Xm/RowColumn.h>
#include <Xm/PushB.h>
#include <Xm/CascadeB.h>
#include <Xm/BulletinB.h>
#include <Xm/DialogS.h>
#include <Xm/Frame.h>
#include <Xm/MessageB.h>
#include <Xm/Form.h>
#include <Xm/Separator.h>
#include <Xm/MwmUtil.h>
/* Now some good stuff */
#include <GLwMDrawA.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glx.h>
/* Stuff */
Display *display;
Visual *gui_visual;
Colormap gui_colormap;
Colormap gl_colormap;
XVisualInfo *gl_visualinfo;
XtAppContext app_context;
Widget toplevel;
Widget mainwindow;
Widget menubar;
Widget mainform;
Widget mainframe;
Widget glwidget;
Widget button;
Widget separator;
GLXContext glx_context;
#ifndef __cplusplus
#define c_class class
#endif
/* Requested attributes; fix as you see fit */
static int glxConfig[]={
GLX_RGBA,
GLX_DOUBLEBUFFER,
GLX_DEPTH_SIZE, 16,
GLX_RED_SIZE, 1,
GLX_GREEN_SIZE, 1,
GLX_BLUE_SIZE, 1,
None
};
/* Forwards */
static void exposeCB(Widget w,XtPointer client_data,GLwDrawingAreaCallbackStruct *cbs);
static void initCB(Widget w,XtPointer client_data,GLwDrawingAreaCallbackStruct *cbs);
static void resizeCB(Widget w,XtPointer client_data,GLwDrawingAreaCallbackStruct *cbs);
static void inputCB(Widget w,XtPointer client_data,GLwDrawingAreaCallbackStruct *cbs);
static void byeCB(Widget w,XtPointer client_data,XtPointer call_data);
static void aboutCB(Widget w,XtPointer client_data,XtPointer call_data);
static char* showvisualclass(int cls);
/* Sample application */
int main(int argc, char *argv[]){
char *thevisual;
XVisualInfo vi;
int nvisinfos,visid,n;
Arg args[30];
Widget pane,cascade,but;
/*
** Initialize toolkit
** We do *not* use XtAppInitialize as we want to figure visual and
** colormap BEFORE we create the top level shell!!!
*/
XtToolkitInitialize();
/* Make application context */
app_context=XtCreateApplicationContext();
/* Try open display */
display=XtOpenDisplay(app_context,NULL,"boilerPlate","BoilerPlate",NULL,0,&argc,argv);
/* Report failure */
if(!display){
fprintf(stderr,"Unable to open the specified display.\n");
fprintf(stderr,"Set your `DISPLAY' environment variable properly or\n");
fprintf(stderr,"use the `xhost' command to authorize access to the display.\n");
exit(1);
}
/* Check for extension; for Mesa, this is always cool */
if(!glXQueryExtension(display,NULL,NULL)){
fprintf(stderr,"The specified display does not support the OpenGL extension\n");
exit(1);
}
/* Init with default visual and colormap */
gui_visual=DefaultVisual(display,0);
gui_colormap=DefaultColormap(display,0);
gl_colormap=DefaultColormap(display,0);
/* User insists on a specific visual */
if((thevisual=getenv("SETVISUAL"))!=NULL){
if(sscanf(thevisual,"%x",&visid)==1){
vi.visualid=visid;
gl_visualinfo=XGetVisualInfo(display,VisualIDMask,&vi,&nvisinfos);
}
else{
fprintf(stderr,"Please set the `SETVISUAL' variable in hexadecimal\n");
fprintf(stderr,"Use one of the Visual ID's reported by `xdpyinfo'\n");
exit(1);
}
}
/* Find visual the regular way */
else{
gl_visualinfo=glXChooseVisual(display,DefaultScreen(display),glxConfig);
}
/* Make sure we have a visual */
if(!gl_visualinfo){
fprintf(stderr,"Unable to obtain visual for graphics\n");
exit(1);
}
/* Show what visual is being used */
fprintf(stderr,"Using the following visual:\n");
fprintf(stderr," visualid: %lx\n",gl_visualinfo->visualid);
fprintf(stderr," depth: %d\n",gl_visualinfo->depth);
fprintf(stderr," screen: %d\n",gl_visualinfo->screen);
fprintf(stderr," bits/rgb: %d\n",gl_visualinfo->bits_per_rgb);
fprintf(stderr," class: %s\n",showvisualclass(gl_visualinfo->c_class));
/*
** If not using default visual, we need a colormap for this visual.
** Yes, the GL widget can allocate one itself, but we want to make
** sure the GUI and the 3D have the same one (if hardware does not
** allow more than one simultaneously).
** This prevents nasty flashing when the window with the 3D widget
** looses the focus.
*/
if(gl_visualinfo->visual!=DefaultVisual(display,0)){
fprintf(stderr,"Making another colormap\n");
gl_colormap=XCreateColormap(display,
RootWindow(display,0),
gl_visualinfo->visual,
AllocNone);
if(!gl_colormap){
fprintf(stderr,"Unable to create private colormap\n");
exit(1);
}
}
/*
** Use common visual for GUI and GL?
** Maybe you can invoke some hardware interrogation function and
** see if more than one hardware map is supported. For the purpose
** of this demo, we'll use an environment variable instead.
*/
if(getenv("SAMEVISUAL")!=NULL){
gui_visual=gl_visualinfo->visual;
gui_colormap=gl_colormap;
}
fprintf(stderr,"GUI uses visual: %lx\n",XVisualIDFromVisual(gui_visual));
/* Create application shell, finally */
n=0;
XtSetArg(args[n],XmNvisual,gui_visual); n++; /* Plug in that visual */
XtSetArg(args[n],XmNcolormap,gui_colormap); n++; /* And that colormap */
toplevel=XtAppCreateShell("boilerPlate","BoilerPlate",
applicationShellWidgetClass,display,args,n);
/* Main window */
n=0;
mainwindow=XmCreateMainWindow(toplevel,"window",args,n);
XtManageChild(mainwindow);
/* Make a menu */
n=0;
XtSetArg(args[n],XmNmarginWidth,0); n++;
XtSetArg(args[n],XmNmarginHeight,0); n++;
menubar=XmCreateMenuBar(mainwindow,"menubar",args,2);
XtManageChild(menubar);
n=0;
pane=XmCreatePulldownMenu(menubar,"pane",args,n);
n=0;
but=XmCreatePushButton(pane,"Open",args,n);
XtManageChild(but);
but=XmCreatePushButton(pane,"Save",args,n);
XtManageChild(but);
but=XmCreatePushButton(pane,"Save As",args,n);
XtManageChild(but);
but=XmCreatePushButton(pane,"Quit",args,n);
XtAddCallback(but,XmNactivateCallback,byeCB,(XtPointer)NULL);
XtManageChild(but);
XtSetArg(args[0],XmNsubMenuId,pane);
cascade=XmCreateCascadeButton(menubar,"File",args,1);
XtManageChild(cascade);
n=0;
pane=XmCreatePulldownMenu(menubar,"pane",args,n);
n=0;
but=XmCreatePushButton(pane,"About",args,n);
XtAddCallback(but,XmNactivateCallback,aboutCB,(XtPointer)NULL);
XtManageChild(but);
XtSetArg(args[0],XmNsubMenuId,pane);
cascade=XmCreateCascadeButton(menubar,"Help",args,1);
XtManageChild(cascade);
XtVaSetValues(menubar,XmNmenuHelpWidget,cascade,NULL);
/* Main window form */
n=0;
XtSetArg(args[n],XmNmarginWidth,5); n++;
XtSetArg(args[n],XmNmarginHeight,5); n++;
mainform=XmCreateForm(mainwindow,"mainForm",args,n);
XtManageChild(mainform);
/* Some nice button */
n=0;
XtSetArg(args[n],XmNbottomAttachment,XmATTACH_FORM); n++;
XtSetArg(args[n],XmNrightAttachment,XmATTACH_FORM); n++;
button=XmCreatePushButton(mainform,"Bye",args,n);
XtAddCallback(button,XmNactivateCallback,byeCB,(XtPointer)NULL);
XtManageChild(button);
n=0;
XtSetArg(args[n],XmNleftAttachment,XmATTACH_FORM); n++;
XtSetArg(args[n],XmNrightAttachment,XmATTACH_FORM); n++;
XtSetArg(args[n],XmNbottomAttachment,XmATTACH_WIDGET); n++;
XtSetArg(args[n],XmNbottomWidget,button); n++;
XtSetArg(args[n],XmNshadowType,XmSHADOW_ETCHED_IN); n++;
separator=XmCreateSeparator(mainform,"separator",args,n);
XtManageChild(separator);
/* Main window frame */
n = 0;
XtSetArg(args[n],XmNleftAttachment,XmATTACH_FORM); n++;
XtSetArg(args[n],XmNrightAttachment,XmATTACH_FORM); n++;
XtSetArg(args[n],XmNtopAttachment,XmATTACH_FORM); n++;
XtSetArg(args[n],XmNbottomAttachment,XmATTACH_WIDGET); n++;
XtSetArg(args[n],XmNbottomWidget,separator); n++;
XtSetArg(args[n],XmNshadowType,XmSHADOW_IN); n++;
mainframe = XmCreateFrame(mainform,"mainFrame",args,n);
XtManageChild(mainframe);
/* GL drawing area */
n = 0;
XtSetArg(args[n],XmNcolormap,gl_colormap); n++;
XtSetArg(args[n],GLwNvisualInfo,gl_visualinfo); n++;
XtSetArg(args[n],GLwNinstallColormap,True); n++;
XtSetArg(args[n],XmNtraversalOn,True); n++;
XtSetArg(args[n],XmNwidth,400); n++;
XtSetArg(args[n],XmNheight,300); n++;
glwidget = GLwCreateMDrawingArea(mainframe,"glWidget",args,n);
XtAddCallback(glwidget,GLwNexposeCallback,(XtCallbackProc)exposeCB,(XtPointer)NULL);
XtAddCallback(glwidget,GLwNresizeCallback,(XtCallbackProc)resizeCB,(XtPointer)NULL);
XtAddCallback(glwidget,GLwNginitCallback,(XtCallbackProc)initCB,(XtPointer)NULL);
XtAddCallback(glwidget,GLwNinputCallback,(XtCallbackProc)inputCB,(XtPointer)NULL);
XtManageChild(glwidget);
/* Set into main window */
XmMainWindowSetAreas(mainwindow,menubar,NULL,NULL,NULL,mainform);
XtRealizeWidget(toplevel);
/* Loop until were done */
XtAppMainLoop(app_context);
return 0;
}
/* Show visual class */
static char* showvisualclass(int cls){
if(cls==TrueColor) return "TrueColor";
if(cls==DirectColor) return "DirectColor";
if(cls==PseudoColor) return "PseudoColor";
if(cls==StaticColor) return "StaticColor";
if(cls==GrayScale) return "GrayScale";
if(cls==StaticGray) return "StaticGray";
return "Unknown";
}
static void exposeCB(Widget w,XtPointer client_data,GLwDrawingAreaCallbackStruct *cbs){
GLwDrawingAreaMakeCurrent(glwidget,glx_context);
glClear(GL_DEPTH_BUFFER_BIT|GL_COLOR_BUFFER_BIT);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(-1.0,1.0,-1.0,1.0,0.0,1.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glColor3f(1.0,0.0,0.0);
glBegin(GL_LINE_STRIP);
glVertex3f(-1.0,-1.0,0.0);
glVertex3f( 1.0, 1.0,0.0);
glEnd();
glXSwapBuffers(display,XtWindow(glwidget));
}
/* Initialize widget */
static void initCB(Widget w,XtPointer client_data,GLwDrawingAreaCallbackStruct *cbs){
/* First, create context. We prefer direct rendering */
glx_context=glXCreateContext(display,gl_visualinfo,0,TRUE);
if(!glx_context){
fprintf(stderr,"Unable to create gl context\n");
exit(1);
}
/* Make it current */
GLwDrawingAreaMakeCurrent(glwidget,glx_context);
/* Set a viewport */
glViewport(0,0,cbs->width,cbs->height);
/* You might want to do a lot more here ... */
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glClearColor(1.0,1.0,1.0,1.0);
glClearDepth(1.0);
}
/* Widget changed size, so adjust txform */
static void resizeCB(Widget w,XtPointer client_data,GLwDrawingAreaCallbackStruct *cbs){
GLwDrawingAreaMakeCurrent(glwidget,glx_context);
glViewport(0,0,cbs->width,cbs->height);
/* blablabla */
}
/* Boilerplate event handling */
static void inputCB(Widget w,XtPointer client_data,GLwDrawingAreaCallbackStruct *cbs){
switch(cbs->event->type){
case ButtonPress:
switch(cbs->event->xbutton.button){
case Button1: fprintf(stderr,"Pressed 1\n"); break;
case Button2: fprintf(stderr,"Pressed 2\n"); break;
case Button3: fprintf(stderr,"Pressed 3\n"); break;
}
break;
case ButtonRelease:
switch(cbs->event->xbutton.button){
case Button1: fprintf(stderr,"Released 1\n"); break;
case Button2: fprintf(stderr,"Released 2\n"); break;
case Button3: fprintf(stderr,"Released 3\n"); break;
}
break;
case MotionNotify:
fprintf(stderr,"Moved mouse to (%d %d)\n",
cbs->event->xbutton.x,
cbs->event->xbutton.y);
break;
}
}
/* Hasta la vista, baby */
static void byeCB(Widget w,XtPointer client_data,XtPointer call_data){
exit(0);
}
/* Pop informative panel */
static void aboutCB(Widget w,XtPointer client_data,XtPointer call_data){
Arg args[10];
XmString str;
Widget box;
str=XmStringCreateLtoR("Boilerplate Mixed Model Programming Example\n\n (C) 1996 Jeroen van der Zijp \n\n jvz@cyberia.cfdrc.com",XmSTRING_DEFAULT_CHARSET);
XtSetArg(args[0],XmNnoResize,True);
XtSetArg(args[1],XmNautoUnmanage,True);
XtSetArg(args[2],XmNmessageString,str);
XtSetArg(args[3],XmNdefaultPosition,False);
box=XmCreateInformationDialog(toplevel,"About Boilerplate",args,4);
XtManageChild(box);
XtUnmanageChild(XmMessageBoxGetChild(box,XmDIALOG_HELP_BUTTON));
XtUnmanageChild(XmMessageBoxGetChild(box,XmDIALOG_CANCEL_BUTTON));
XmStringFree(str);
}

View File

@@ -5,7 +5,7 @@ TOP = ../../..
include $(TOP)/configs/current
DEFINES += -DGLX_DIRECT_RENDERING
DEFINES += -DGLX_DIRECT_RENDERING -DIN_MINI_GLX -UIN_DRI_DRIVER
C_SOURCES = \
$(TOP)/src/mesa/main/dispatch.c \

View File

@@ -68,6 +68,8 @@ typedef struct DRIDriverContextRec {
int cpp;
int agpmode;
int isPCI;
int colorTiling; /**< \brief color tiling is enabled */
unsigned long FBStart; /**< \brief physical address of the framebuffer */
unsigned long MMIOStart; /**< \brief physical address of the MMIO region */

View File

@@ -30,3 +30,7 @@ agpmode=1
# Rotated monitor? -- NOTE: only works with subsetted radeon driver!
rotateMode=0
# Do we want to use color tiling ?
colorTiling=0

View File

@@ -104,6 +104,7 @@
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/time.h> /* for gettimeofday */
#include <linux/kd.h>
#include <linux/vt.h>
@@ -115,17 +116,35 @@
#include "glapi.h"
extern GLboolean __glXCreateContextWithConfig(__DRInativeDisplay *dpy,
static GLboolean __glXCreateContextWithConfig(__DRInativeDisplay *dpy,
int screen, int fbconfigID, void *contextID,
drm_context_t *hHWContext);
extern GLboolean __glXGetDrawableInfo(__DRInativeDisplay *dpy, int scrn,
static GLboolean __glXGetDrawableInfo(__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);
static __DRIscreen * __glXFindDRIScreen(__DRInativeDisplay *dpy, int scrn);
static GLboolean __glXWindowExists(__DRInativeDisplay *dpy, __DRIid draw);
static int __glXGetUST( int64_t * ust );
static GLboolean __glXGetMscRate(__DRInativeDisplay * dpy, __DRIid drawable,
int32_t * numerator, int32_t * denominator);
static GLboolean xf86DRI_DestroyContext(__DRInativeDisplay *dpy, int screen,
__DRIid context_id );
static GLboolean xf86DRI_CreateDrawable(__DRInativeDisplay *dpy, int screen,
__DRIid drawable, drm_drawable_t *hHWDrawable );
static GLboolean xf86DRI_DestroyDrawable(__DRInativeDisplay *dpy, int screen,
__DRIid drawable);
/** Wrapper around either malloc() */
void *
@@ -418,6 +437,8 @@ SetupFBDev( Display *dpy )
width = dpy->driverContext.shared.virtualWidth;
height = dpy->driverContext.shared.virtualHeight;
if (width==832)
width=800;
/* Bump size up to next supported mode.
*/
if (width <= 720 && height <= 480) {
@@ -440,8 +461,6 @@ SetupFBDev( Display *dpy )
}
dpy->driverContext.shared.virtualHeight = height;
dpy->driverContext.shared.virtualWidth = width;
dpy->driverContext.shared.fbStride = width * (dpy->driverContext.bpp / 8);
/* set the depth, resolution, etc */
@@ -726,7 +745,7 @@ CloseFBDev( Display *dpy )
* \internal
* Returns the MiniGLXDisplayRec::driScreen attribute.
*/
__DRIscreen *
static __DRIscreen *
__glXFindDRIScreen(__DRInativeDisplay *dpy, int scrn)
{
(void) scrn;
@@ -743,11 +762,11 @@ __glXFindDRIScreen(__DRInativeDisplay *dpy, int scrn)
* Since Mini GLX only supports one window, compares the specified drawable with
* the MiniGLXDisplayRec::TheWindow attribute.
*/
Bool
__glXWindowExists(__DRInativeDisplay *dpy, GLXDrawable draw)
static GLboolean
__glXWindowExists(__DRInativeDisplay *dpy, __DRIid draw)
{
Display* display = (Display*)dpy;
if (display->TheWindow == draw)
const Display * const display = (Display*)dpy;
if (display->TheWindow == (Window) draw)
return True;
else
return False;
@@ -859,6 +878,7 @@ static int __read_config_file( Display *dpy )
dpy->rotateMode = 0;
dpy->driverContext.agpmode = 1;
dpy->driverContext.isPCI = 0;
dpy->driverContext.colorTiling = 0;
fname = getenv("MINIGLX_CONF");
if (!fname) fname = "/etc/miniglx.conf";
@@ -931,6 +951,9 @@ static int __read_config_file( Display *dpy )
else if (strcmp(opt, "isPCI") == 0) {
dpy->driverContext.isPCI = atoi(val) ? 1 : 0;
}
else if (strcmp(opt, "colorTiling") == 0) {
dpy->driverContext.colorTiling = atoi(val) ? 1 : 0;
}
}
fclose(file);
@@ -941,6 +964,19 @@ static int __read_config_file( Display *dpy )
return 1;
}
/**
* Versioned name of the expected \c __driCreateNewScreen function.
*
* The version of the last incompatible loader/driver inteface change is
* appended to the name of the \c __driCreateNewScreen function. This
* prevents loaders from trying to load drivers that are too old.
*
* \todo
* Create a macro or something so that this is automatically updated.
*/
static const char createNewScreenName[] = "__driCreateNewScreen_20050727";
static int InitDriver( Display *dpy )
{
/*
@@ -968,9 +1004,9 @@ static int InitDriver( Display *dpy )
/* Pull in standard DRI client-side driver hooks:
*/
dpy->createNewScreen = (PFNCREATENEWSCREENFUNC)
dlsym(dpy->dlHandle, "__driCreateNewScreen");
dlsym(dpy->dlHandle, createNewScreenName);
if (!dpy->createNewScreen) {
fprintf(stderr, "Couldn't find __driCreateScreen in %s\n",
fprintf(stderr, "Couldn't find %s in %s\n", createNewScreenName,
dpy->clientDriverName);
goto failed;
}
@@ -1083,10 +1119,43 @@ __miniglx_StartServer( const char *display_name )
}
/**
* Implement \c __DRIinterfaceMethods::getProcAddress.
*/
static __DRIfuncPtr get_proc_address( const char * proc_name )
{
(void) proc_name;
return NULL;
}
/**
* Table of functions exported by the loader to the driver.
*/
static const __DRIinterfaceMethods interface_methods = {
get_proc_address,
_gl_context_modes_create,
_gl_context_modes_destroy,
__glXFindDRIScreen,
__glXWindowExists,
__glXCreateContextWithConfig,
xf86DRI_DestroyContext,
xf86DRI_CreateDrawable,
xf86DRI_DestroyDrawable,
__glXGetDrawableInfo,
__glXGetUST,
__glXGetMscRate,
};
static void *
CallCreateNewScreen(Display *dpy, int scrn, __DRIscreen *psc)
{
int directCapable;
void *psp = NULL;
drm_handle_t hSAREA;
drmAddress pSAREA;
@@ -1102,11 +1171,8 @@ CallCreateNewScreen(Display *dpy, int scrn, __DRIscreen *psc)
const char * err_extra;
drmVersionPtr version;
drm_handle_t hFB;
int junk;
drm_magic_t magic;
err_msg = "XF86DRIOpenConnection";
err_extra = NULL;
hSAREA = dpy->driverContext.shared.hSAREA;
BusID = dpy->driverContext.pciBusID;
@@ -1149,7 +1215,6 @@ CallCreateNewScreen(Display *dpy, int scrn, __DRIscreen *psc)
* We'll check the version in each DRI driver's "createScreen"
* function.
*/
err_msg = "XF86DRIGetClientDriverName";
ddx_version.major = 4;
ddx_version.minor = 0;
ddx_version.patch = 0;
@@ -1157,7 +1222,6 @@ CallCreateNewScreen(Display *dpy, int scrn, __DRIscreen *psc)
/*
* Get the DRI X extension version.
*/
err_msg = "XF86DRIQueryVersion";
dri_version.major = 4;
dri_version.minor = 0;
dri_version.patch = 0;
@@ -1168,7 +1232,6 @@ CallCreateNewScreen(Display *dpy, int scrn, __DRIscreen *psc)
* that has information about the screen size, depth, pitch,
* ancilliary buffers, DRM mmap handles, etc.
*/
err_msg = "XF86DRIGetDeviceInfo";
hFB = dpy->driverContext.shared.hFrameBuffer;
framebuffer.size = dpy->driverContext.shared.fbSize;
framebuffer.stride = dpy->driverContext.shared.fbStride;
@@ -1198,11 +1261,6 @@ CallCreateNewScreen(Display *dpy, int scrn, __DRIscreen *psc)
err_extra = strerror( -status );
if ( status == 0 ) {
PFNGLXGETINTERNALVERSIONPROC get_ver;
get_ver = (PFNGLXGETINTERNALVERSIONPROC)
glXGetProcAddress( (const GLubyte *) "__glXGetInternalVersion" );
err_msg = "InitDriver";
err_extra = NULL;
psp = dpy->createNewScreen(dpy, scrn, psc, NULL,
@@ -1212,7 +1270,8 @@ CallCreateNewScreen(Display *dpy, int scrn, __DRIscreen *psc)
& framebuffer,
pSAREA,
fd,
(get_ver != NULL) ? (*get_ver)() : 20040602,
20050727,
& interface_methods,
(__GLcontextModes **) &dpy->driver_modes);
/* fill in dummy visual ids */
@@ -2083,7 +2142,7 @@ glXDestroyContext( Display *dpy, GLXContext ctx )
if (ctx) {
if (glxctx == ctx) {
/* destroying current context */
ctx->driContext.bindContext3(dpy, 0, 0, 0, 0);
ctx->driContext.bindContext(dpy, 0, 0, 0, 0);
CurrentContext = 0;
}
ctx->driContext.destroyContext(dpy, 0, ctx->driContext.private);
@@ -2126,20 +2185,20 @@ glXMakeCurrent( Display *dpy, GLXDrawable drawable, GLXContext ctx)
GLXDrawable oldDrawable = glXGetCurrentDrawable();
/* unbind old */
if (oldContext) {
oldContext->driContext.unbindContext3(dpy, 0,
oldContext->driContext.unbindContext(dpy, 0,
(__DRIid) oldDrawable, (__DRIid) oldDrawable,
&oldContext->driContext);
}
/* bind new */
CurrentContext = ctx;
ctx->driContext.bindContext3(dpy, 0, (__DRIid) drawable,
ctx->driContext.bindContext(dpy, 0, (__DRIid) drawable,
(__DRIid) drawable, &ctx->driContext);
ctx->drawBuffer = drawable;
ctx->curBuffer = drawable;
}
else if (ctx && dpy) {
/* unbind */
ctx->driContext.bindContext3(dpy, 0, 0, 0, 0);
ctx->driContext.bindContext(dpy, 0, 0, 0, 0);
}
else if (dpy) {
CurrentContext = 0; /* kw: this seems to be intended??? */
@@ -2210,7 +2269,7 @@ glXGetCurrentDrawable( void )
}
GLboolean
static GLboolean
__glXCreateContextWithConfig(__DRInativeDisplay *dpy, int screen,
int fbconfigID, void *contextID, drm_context_t *hHWContext)
{
@@ -2236,7 +2295,7 @@ __glXCreateContextWithConfig(__DRInativeDisplay *dpy, int screen,
}
GLboolean
static GLboolean
__glXGetDrawableInfo(__DRInativeDisplay *dpy, int scrn,
__DRIid draw, unsigned int * index, unsigned int * stamp,
int * x, int * y, int * width, int * height,
@@ -2278,23 +2337,23 @@ __glXGetDrawableInfo(__DRInativeDisplay *dpy, int scrn,
}
GLboolean
XF86DRIDestroyContext(__DRInativeDisplay *dpy, int screen, __DRIid context_id )
static GLboolean
xf86DRI_DestroyContext(__DRInativeDisplay *dpy, int screen, __DRIid context_id )
{
return GL_TRUE;
}
GLboolean
XF86DRICreateDrawable(__DRInativeDisplay *dpy, int screen, __DRIid drawable,
static GLboolean
xf86DRI_CreateDrawable(__DRInativeDisplay *dpy, int screen, __DRIid drawable,
drm_drawable_t *hHWDrawable )
{
return GL_TRUE;
}
GLboolean
XF86DRIDestroyDrawable(__DRInativeDisplay *dpy, int screen, __DRIid drawable)
static GLboolean
xf86DRI_DestroyDrawable(__DRInativeDisplay *dpy, int screen, __DRIid drawable)
{
return GL_TRUE;
}
@@ -2348,12 +2407,6 @@ void (*glXGetProcAddress(const GLubyte *procname))( void )
{ "glXDestroyPbuffer", (void *) glXDestroyPbuffer },
{ "glXChooseFBConfig", (void *) glXChooseFBConfig },
{ "glXGetVisualFromFBConfig", (void *) glXGetVisualFromFBConfig },
{ "__glXCreateContextWithConfig", (void *) __glXCreateContextWithConfig },
{ "__glXGetDrawableInfo", (void *) __glXGetDrawableInfo },
{ "__glXWindowExists", (void *) __glXWindowExists },
{ "__glXCreateContextModes", (void *) _gl_context_modes_create },
{ "__glXFindDRIScreen", (void *)__glXFindDRIScreen },
{ "__glXScrEnableExtension", (void *)__glXScrEnableExtension },
{ NULL, NULL }
};
const struct name_address *entry;
@@ -2438,32 +2491,73 @@ void *glXAllocateMemoryMESA(Display *dpy, int scrn,
size_t size, float readFreq,
float writeFreq, float priority)
{
if (dpy->driScreen.private && dpy->driScreen.allocateMemory) {
return (*dpy->driScreen.allocateMemory)( dpy, scrn, size,
readFreq, writeFreq,
priority );
}
if (dpy->driScreen.private && dpy->driScreen.allocateMemory) {
return (*dpy->driScreen.allocateMemory)( dpy, scrn, size,
readFreq, writeFreq,
priority );
}
return NULL;
}
void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer){
if (dpy->driScreen.private && dpy->driScreen.freeMemory) {
(*dpy->driScreen.freeMemory)( dpy, scrn, pointer );
}
void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer)
{
if (dpy->driScreen.private && dpy->driScreen.freeMemory) {
(*dpy->driScreen.freeMemory)( dpy, scrn, pointer );
}
}
GLuint glXGetMemoryOffsetMESA( Display *dpy, int scrn,
const void *pointer )
{
if (dpy->driScreen.private && dpy->driScreen.memoryOffset) {
return (*dpy->driScreen.memoryOffset)( dpy, scrn, pointer );
}
if (dpy->driScreen.private && dpy->driScreen.memoryOffset) {
return (*dpy->driScreen.memoryOffset)( dpy, scrn, pointer );
}
return 0;
}
void
__glXScrEnableExtension( void *psc, const char * name )
/**
* Get the unadjusted system time (UST). Currently, the UST is measured in
* microseconds since Epoc. The actual resolution of the UST may vary from
* system to system, and the units may vary from release to release.
* Drivers should not call this function directly. They should instead use
* \c glXGetProcAddress to obtain a pointer to the function.
*
* \param ust Location to store the 64-bit UST
* \returns Zero on success or a negative errno value on failure.
*
* \note
* This function was copied directly from src/glx/x11/glxcmds.c.
*/
static int __glXGetUST( int64_t * ust )
{
struct timeval tv;
if ( ust == NULL ) {
return -EFAULT;
}
if ( gettimeofday( & tv, NULL ) == 0 ) {
ust[0] = (tv.tv_sec * 1000000) + tv.tv_usec;
return 0;
} else {
return -errno;
}
}
/**
*
* \bug
* This needs to be implemented for miniGlx.
*/
static GLboolean __glXGetMscRate(__DRInativeDisplay * dpy, __DRIid drawable,
int32_t * numerator, int32_t * denominator)
{
*numerator = 0;
*denominator = 0;
return False;
}
/*@}*/

View File

@@ -199,9 +199,6 @@ extern int send_char_msg( Display *dpy, int i, char msg );
extern int blocking_read( Display *dpy, int connection, char *msg, size_t msg_size );
extern int handle_fd_events( Display *dpy, int nonblock );
extern Bool __glXWindowExists(__DRInativeDisplay *dpy, GLXDrawable draw);
extern int __miniglx_open_connections( Display *dpy );
extern void __miniglx_close_connections( Display *dpy );

View File

@@ -38,7 +38,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* $Id: miniglx_events.c,v 1.4 2004/07/16 04:27:00 jonsmirl Exp $ */
/* $Id: miniglx_events.c,v 1.4.8.2 2005/08/31 01:25:24 airlied Exp $ */
#include <assert.h>
@@ -258,6 +258,7 @@ static int welcome_message_part( Display *dpy, int i, void **msg, int sz )
if (!*msg) *msg = malloc(sz);
if (!*msg) return False;
if (!blocking_read( dpy, i, *msg, sz )) return False;
return sz;
}
else {
if (!send_msg( dpy, i, &sz, sizeof(sz))) return False;
@@ -283,18 +284,21 @@ static int welcome_message( Display *dpy, int i )
{
void *tmp = &dpy->driverContext.shared;
int *clientid = dpy->IsClient ? &dpy->clientID : &i;
int size;
if (!welcome_message_part( dpy, i, (void **)&clientid, sizeof(*clientid)))
return False;
if (!welcome_message_part( dpy, i, &tmp, sizeof(dpy->driverContext.shared)))
return False;
if (!welcome_message_part( dpy, i,
size=welcome_message_part( dpy, i,
(void **)&dpy->driverContext.driverClientMsg,
dpy->driverContext.driverClientMsgSize ))
dpy->driverContext.driverClientMsgSize );
if (!size)
return False;
if (dpy->IsClient) {
dpy->driverContext.driverClientMsgSize = size;
}
return True;
}

View File

@@ -1,24 +1,15 @@
TOP = ../../..
include $(TOP)/configs/current
# Context creation has evolved over the years, such that this
# code will not build with DNIO defined. When we finally drop old interface
# support in libGL, we need to clean up both glxcmds.c and dri_interface.h.
DEFINES += -DGLX_DIRECT_RENDERING -DGLXEXT -DXF86DRI -DGLX_USE_DLOPEN \
-DGLX_USE_MESA -DXF86VIDMODE -D_REENTRANT -UIN_DRI_DRIVER
DEFINES += -DXF86VIDMODE -D_REENTRANT -UIN_DRI_DRIVER
C_SOURCES = \
$(TOP)/src/mesa/glapi/glapi.c \
$(TOP)/src/mesa/glapi/glthread.c \
$(TOP)/src/mesa/main/dispatch.c \
glcontextmodes.c \
$(DRM_SOURCE_PATH)/libdrm/xf86drm.c \
$(DRM_SOURCE_PATH)/libdrm/xf86drmHash.c \
$(DRM_SOURCE_PATH)/libdrm/xf86drmRandom.c \
$(DRM_SOURCE_PATH)/libdrm/xf86drmSL.c \
clientattrib.c \
compsize.c \
dispatch.c \
eval.c \
glxcmds.c \
glxext.c \
@@ -55,16 +46,10 @@ OBJECTS = $(C_SOURCES:.c=.o) \
INCLUDES = -I. \
-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/swrast \
-I$(TOP)/src/mesa/swrast_setup \
-I$(TOP)/src/mesa/drivers/dri/common \
-I$(DRM_SOURCE_PATH)/libdrm \
-I$(DRM_SOURCE_PATH)/shared-core \
`pkg-config --cflags libdrm` \
$(X11_INCLUDES)
@@ -83,9 +68,6 @@ default: depend $(LIB_DIR)/$(GL_LIB_NAME)
glcontextmodes.c:
ln -s $(TOP)/src/mesa/drivers/dri/common/glcontextmodes.c .
dispatch.c:
ln -s $(TOP)/src/mesa/main/dispatch.c .
# Make libGL
$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
$(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \
@@ -93,10 +75,6 @@ $(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
-install $(LIB_DIR) $(GL_LIB_DEPS) $(OBJECTS)
drmtest: xf86drm.o drmtest.o
rm -f drmtest && $(CC) -o drmtest xf86drm.o drmtest.o
depend: $(C_SOURCES) $(ASM_SOURCES) Makefile
touch depend
$(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(C_SOURCES) $(ASM_SOURCES)

View File

@@ -40,7 +40,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NEED_REPLIES
#include <X11/Xlibint.h>
#include <X11/extensions/Xext.h>
#include "extutil.h"
#include <X11/extensions/extutil.h>
#include "glheader.h"
#include "xf86dristr.h"

View File

@@ -38,7 +38,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <unistd.h>
#include <X11/Xlibint.h>
#include <X11/extensions/Xext.h>
#include "extutil.h"
#include <X11/extensions/extutil.h>
#include "glxclient.h"
#include "xf86dri.h"
#include "sarea.h"

View File

@@ -31,8 +31,8 @@
#include <inttypes.h>
#include "glxclient.h"
#include <extutil.h>
#include <Xext.h>
#include <X11/extensions/extutil.h>
#include <X11/extensions/Xext.h>
#include <assert.h>
#include <string.h>
#include "glapi.h"

View File

@@ -60,8 +60,8 @@
#include "GL/internal/glcore.h"
#include "glapitable.h"
#include "glxextensions.h"
#if defined( XTHREADS )
# include "Xthreads.h"
#if defined( USE_XTHREADS )
# include <X11/Xthreads.h>
#elif defined( PTHREADS )
# include <pthread.h>
#endif
@@ -154,51 +154,6 @@ typedef struct __GLXpixelStoreModeRec {
GLuint alignment;
} __GLXpixelStoreMode;
/* The next 3 structures are deprecated. Client state is no longer tracked
* using them. They only remain to maintain the layout / structure offset of
* __GLXcontextRec. In XFree86 5.0 they will be removed altogether.
*/
typedef struct __GLXvertexArrayPointerStateRecDEPRECATED {
GLboolean enable;
void (*proc)(const void *);
const GLubyte *ptr;
GLsizei skip;
GLint size;
GLenum type;
GLsizei stride;
} __GLXvertexArrayPointerStateDEPRECATED;
typedef struct __GLXvertArrayStateRecDEPRECATED {
__GLXvertexArrayPointerStateDEPRECATED vertex;
__GLXvertexArrayPointerStateDEPRECATED normal;
__GLXvertexArrayPointerStateDEPRECATED color;
__GLXvertexArrayPointerStateDEPRECATED index;
__GLXvertexArrayPointerStateDEPRECATED texCoord[__GLX_MAX_TEXTURE_UNITS];
__GLXvertexArrayPointerStateDEPRECATED edgeFlag;
GLint maxElementsVertices;
GLint maxElementsIndices;
GLint activeTexture;
} __GLXvertArrayStateDEPRECATED;
typedef struct __GLXattributeRecDEPRECATED {
GLuint mask;
/*
** Pixel storage state. Most of the pixel store mode state is kept
** here and used by the client code to manage the packing and
** unpacking of data sent to/received from the server.
*/
__GLXpixelStoreMode storePack, storeUnpack;
/*
** Vertex Array storage state. The vertex array component
** state is stored here and is used to manage the packing of
** DrawArrays data sent to the server.
*/
__GLXvertArrayStateDEPRECATED vertArray;
} __GLXattributeDEPRECATED;
typedef struct __GLXattributeRec {
GLuint mask;
@@ -330,12 +285,9 @@ struct __GLXcontextRec {
GLenum, const GLvoid*, GLubyte*, GLubyte*);
/**
* \name Client side attribs.
* Client side attribs.
*/
/*@{*/
__GLXattributeDEPRECATED stateDEPRECATED;
__GLXattributeMachine attributes;
/*@}*/
/**
* Client side error code. This is set when client side gl API
@@ -595,7 +547,7 @@ extern __GLXdisplayPrivate *__glXInitialize(Display*);
extern int __glXDebug;
/* This is per-thread storage in an MT environment */
#if defined( XTHREADS ) || defined( PTHREADS )
#if defined( USE_XTHREADS ) || defined( PTHREADS )
extern void __glXSetCurrentContext(__GLXcontext *c);
@@ -618,14 +570,14 @@ extern __GLXcontext *__glXcurrentContext;
#define __glXGetCurrentContext() __glXcurrentContext
#define __glXSetCurrentContext(gc) __glXcurrentContext = gc
#endif /* defined( XTHREADS ) || defined( PTHREADS ) */
#endif /* defined( USE_XTHREADS ) || defined( PTHREADS ) */
/*
** Global lock for all threads in this address space using the GLX
** extension
*/
#if defined( XTHREADS )
#if defined( USE_XTHREADS )
extern xmutex_rec __glXmutex;
#define __glXLock() xmutex_lock(&__glXmutex)
#define __glXUnlock() xmutex_unlock(&__glXmutex)

View File

@@ -41,14 +41,14 @@
#include <inttypes.h>
#include "glxclient.h"
#include <extutil.h>
#include <Xext.h>
#include <X11/extensions/extutil.h>
#include <X11/extensions/Xext.h>
#include <assert.h>
#include <string.h>
#include "glapi.h"
#ifdef GLX_DIRECT_RENDERING
#include "indirect_init.h"
#include "xf86vmode.h"
#include <X11/extensions/xf86vmode.h>
#include "xf86dri.h"
#endif
#include "glxextensions.h"
@@ -1269,7 +1269,7 @@ PUBLIC const char *glXQueryExtensionsString( Display *dpy, int screen )
__glXCalculateUsableExtensions(psc,
#ifdef GLX_DIRECT_RENDERING
(priv->driDisplay.private != NULL),
(psc->driScreen.private != NULL),
#else
GL_FALSE,
#endif

View File

@@ -46,16 +46,11 @@
#include "glxclient.h"
#include <stdio.h>
#include <Xext.h>
#include <extutil.h>
#include <X11/extensions/Xext.h>
#include <X11/extensions/extutil.h>
#include <assert.h>
#include "indirect_init.h"
#include "glapi.h"
#ifdef XTHREADS
# include "Xthreads.h"
#elif defined(PTHREADS)
# include <pthread.h>
#endif
#include "glxextensions.h"
#include "glcontextmodes.h"
#include "glheader.h"
@@ -150,7 +145,7 @@ static __GLapi *IndirectAPI = NULL;
* Current context management and locking
*/
#if defined( XTHREADS )
#if defined( USE_XTHREADS )
/* thread safe */
static GLboolean TSDinitialized = GL_FALSE;
@@ -733,7 +728,7 @@ CallCreateNewScreen(Display *dpy, int scrn, __DRIscreen *psc,
__DRIscreenPrivate *psp = NULL;
#ifndef GLX_USE_APPLEGL
drm_handle_t hSAREA;
drmAddress pSAREA;
drmAddress pSAREA = MAP_FAILED;
char *BusID;
__DRIversion ddx_version;
__DRIversion dri_version;
@@ -754,6 +749,7 @@ CallCreateNewScreen(Display *dpy, int scrn, __DRIscreen *psc,
err_msg = "XF86DRIOpenConnection";
err_extra = NULL;
framebuffer.base = MAP_FAILED;
framebuffer.dev_priv = NULL;
if (XF86DRIOpenConnection(dpy, scrn, &hSAREA, &BusID)) {
@@ -1111,7 +1107,7 @@ __GLXdisplayPrivate *__glXInitialize(Display* dpy)
XEDataObject dataObj;
int major, minor;
#if defined(XTHREADS)
#if defined(USE_XTHREADS)
{
static int firstCall = 1;
if (firstCall) {
@@ -1593,7 +1589,9 @@ USED static Bool MakeContextCurrent(Display *dpy, GLXDrawable draw,
oldGC->currentContextTag = 0;
}
_glapi_check_multithread();
#ifdef GLX_DIRECT_RENDERING
/* Unbind the old direct rendering context */
if (oldGC->isDirect) {
@@ -1613,7 +1611,6 @@ USED static Bool MakeContextCurrent(Display *dpy, GLXDrawable draw,
}
} else {
#endif
_glapi_check_multithread();
/* Send a glXMakeCurrent request to bind the new context. */
LockDisplay(dpy);

View File

@@ -29,8 +29,8 @@
*/
#include "glxclient.h"
#include <extutil.h>
#include <Xext.h>
#include <X11/extensions/extutil.h>
#include <X11/extensions/Xext.h>
#include <string.h>
#include "glapi.h"
#include "glxextensions.h"

View File

@@ -39,7 +39,7 @@
#define __GLX_PAD(n) (((n) + 3) & ~3)
# if defined(__i386__) && defined(__GNUC__)
# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
# define FASTCALL __attribute__((fastcall))
# else
# define FASTCALL

View File

@@ -37,12 +37,12 @@
* \author Ian Romanick <idr@us.ibm.com>
*/
# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
# define HIDDEN __attribute__((visibility("hidden")))
# else
# define HIDDEN
# endif
# if defined(__i386__) && defined(__GNUC__)
# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
# define FASTCALL __attribute__((fastcall))
# else
# define FASTCALL

View File

@@ -613,7 +613,7 @@ __GLapi * __glXNewIndirectAPI( void )
glAPI->PointParameterfEXT = __indirect_glPointParameterfEXT;
glAPI->PointParameterfvEXT = __indirect_glPointParameterfvEXT;
/* 145. GL_EXT_secondary_color */
/* 145. GL_EXT_secondary_color */
glAPI->SecondaryColor3usvEXT = __indirect_glSecondaryColor3usvEXT;
glAPI->SecondaryColorPointerEXT = __indirect_glSecondaryColorPointerEXT;
@@ -633,12 +633,12 @@ __GLapi * __glXNewIndirectAPI( void )
glAPI->SecondaryColor3uivEXT = __indirect_glSecondaryColor3uivEXT;
glAPI->SecondaryColor3usEXT = __indirect_glSecondaryColor3usEXT;
/* 148. GL_EXT_multi_draw_arrays */
/* 148. GL_EXT_multi_draw_arrays */
glAPI->MultiDrawArraysEXT = __indirect_glMultiDrawArraysEXT;
glAPI->MultiDrawElementsEXT = __indirect_glMultiDrawElementsEXT;
/* 149. GL_EXT_fog_coord */
/* 149. GL_EXT_fog_coord */
glAPI->FogCoordfEXT = __indirect_glFogCoordfEXT;
glAPI->FogCoordfvEXT = __indirect_glFogCoordfvEXT;
@@ -646,11 +646,11 @@ __GLapi * __glXNewIndirectAPI( void )
glAPI->FogCoorddvEXT = __indirect_glFogCoorddvEXT;
glAPI->FogCoordPointerEXT = __indirect_glFogCoordPointerEXT;
/* 173. GL_EXT_blend_func_separate */
/* 173. GL_EXT_blend_func_separate */
glAPI->BlendFuncSeparateEXT = __indirect_glBlendFuncSeparateEXT;
/* 197. GL_MESA_window_pos */
/* 197. GL_MESA_window_pos */
glAPI->WindowPos2dMESA = __indirect_glWindowPos2dMESA;
glAPI->WindowPos2dvMESA = __indirect_glWindowPos2dvMESA;
@@ -669,7 +669,7 @@ __GLapi * __glXNewIndirectAPI( void )
glAPI->WindowPos3sMESA = __indirect_glWindowPos3sMESA;
glAPI->WindowPos3svMESA = __indirect_glWindowPos3svMESA;
/* 233. GL_NV_vertex_program */
/* 233. GL_NV_vertex_program */
glAPI->VertexAttribs4svNV = __indirect_glVertexAttribs4svNV;
glAPI->VertexAttribs4ubvNV = __indirect_glVertexAttribs4ubvNV;
@@ -736,16 +736,16 @@ __GLapi * __glXNewIndirectAPI( void )
glAPI->VertexAttribs4dvNV = __indirect_glVertexAttribs4dvNV;
glAPI->VertexAttribs4fvNV = __indirect_glVertexAttribs4fvNV;
/* 262. GL_NV_point_sprite */
/* 262. GL_NV_point_sprite */
glAPI->PointParameteriNV = __indirect_glPointParameteriNV;
glAPI->PointParameterivNV = __indirect_glPointParameterivNV;
/* 268. GL_EXT_stencil_two_side */
/* 268. GL_EXT_stencil_two_side */
glAPI->ActiveStencilFaceEXT = __indirect_glActiveStencilFaceEXT;
/* 282. GL_NV_fragment_program */
/* 282. GL_NV_fragment_program */
glAPI->ProgramNamedParameter4fNV = __indirect_glProgramNamedParameter4fNV;
glAPI->ProgramNamedParameter4dNV = __indirect_glProgramNamedParameter4dNV;
@@ -754,7 +754,7 @@ __GLapi * __glXNewIndirectAPI( void )
glAPI->GetProgramNamedParameterfvNV = __indirect_glGetProgramNamedParameterfvNV;
glAPI->GetProgramNamedParameterdvNV = __indirect_glGetProgramNamedParameterdvNV;
/* 310. GL_EXT_framebuffer_object */
/* 310. GL_EXT_framebuffer_object */
glAPI->RenderbufferStorageEXT = __indirect_glRenderbufferStorageEXT;
glAPI->GetRenderbufferParameterivEXT = __indirect_glGetRenderbufferParameterivEXT;

View File

@@ -29,29 +29,28 @@
#include <GL/gl.h>
#include "indirect_size.h"
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
# define HAVE_ALIAS
# endif
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
# define PURE __attribute__((pure))
# else
# define PURE
# endif
# if defined(__i386__) && defined(__GNUC__)
# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
# define FASTCALL __attribute__((fastcall))
# else
# define FASTCALL
# endif
# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
# define INTERNAL __attribute__((visibility("internal")))
# else
# define INTERNAL
# endif
#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__)
# undef HAVE_ALIAS
#endif
#ifdef HAVE_ALIAS
# define ALIAS2(from,to) \
INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \
@@ -365,10 +364,7 @@ ALIAS( Map2f, Map2d )
ALIAS( ColorTableParameteriv, ColorTableParameterfv )
ALIAS( ConvolutionParameteriv, ConvolutionParameterfv )
ALIAS( PointParameterivNV, PointParameterfvEXT )
ALIAS( PointParameterfvARB, PointParameterfvEXT )
ALIAS( PointParameteriv, PointParameterfvEXT )
# undef HAVE_ALIAS
# undef PURE
# undef FASTCALL
# undef INTERNAL

View File

@@ -42,13 +42,13 @@
# define PURE
# endif
# if defined(__i386__) && defined(__GNUC__)
# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
# define FASTCALL __attribute__((fastcall))
# else
# define FASTCALL
# endif
# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
# define INTERNAL __attribute__((visibility("internal")))
# else
# define INTERNAL

View File

@@ -29,7 +29,7 @@ static void TransposeMatrixf(const GLfloat s[16], GLfloat d[16])
{
int i, j;
for (i = 0; i < 4; i++) {
for (j = 0; j < i; j++) {
for (j = 0; j < 4; j++) {
d[i*4+j] = s[j*4+i];
}
}
@@ -39,7 +39,7 @@ static void TransposeMatrixd(const GLdouble s[16], GLdouble d[16])
{
int i, j;
for (i = 0; i < 4; i++) {
for (j = 0; j < i; j++) {
for (j = 0; j < 4; j++) {
d[i*4+j] = s[j*4+i];
}
}

View File

@@ -211,12 +211,14 @@ struct array_state_vector {
* There are some bytes of extra data before \c array_info_cache that is
* used to hold the header for RenderLarge commands. This is
* \b not included in \c array_info_cache_size or
* \c array_info_cache_buffer_size.
* \c array_info_cache_buffer_size. \c array_info_cache_base stores a
* pointer to the true start of the buffer (i.e., what malloc returned).
*/
/*@{*/
size_t array_info_cache_size;
size_t array_info_cache_buffer_size;
void * array_info_cache;
void * array_info_cache_base;
/*@}*/

View File

@@ -382,13 +382,14 @@ allocate_array_info_cache( struct array_state_vector * arrays,
{
#define MAX_HEADER_SIZE 20
if ( arrays->array_info_cache_buffer_size < required_size ) {
GLubyte * temp = realloc( arrays->array_info_cache, required_size
+ MAX_HEADER_SIZE );
GLubyte * temp = realloc( arrays->array_info_cache_base,
required_size + MAX_HEADER_SIZE );
if ( temp == NULL ) {
return GL_FALSE;
}
arrays->array_info_cache_base = temp;
arrays->array_info_cache = temp + MAX_HEADER_SIZE;
arrays->array_info_cache_buffer_size = required_size;
}

View File

@@ -94,154 +94,110 @@ void __indirect_glInterleavedArrays(GLenum format, GLsizei stride, const GLvoid
{
__GLXcontext *gc = __glXGetCurrentContext();
__GLXattribute * state = (__GLXattribute *)(gc->client_state_private);
GLboolean tEnable = GL_FALSE, cEnable = GL_FALSE, nEnable = GL_FALSE;
GLenum tType = GL_FLOAT, nType = GL_FLOAT, vType = GL_FLOAT;
GLenum cType = GL_FALSE;
GLint tSize = 0, cSize = 0, nSize = 3, vSize;
int cOffset = 0, nOffset = 0, vOffset = 0;
GLint trueStride, size;
switch (format) {
case GL_V2F:
vSize = 2;
size = __glXTypeSize(vType) * vSize;
break;
case GL_V3F:
vSize = 3;
size = __glXTypeSize(vType) * vSize;
break;
case GL_C4UB_V2F:
cEnable = GL_TRUE;
cSize = 4;
cType = GL_UNSIGNED_BYTE;
vSize = 2;
vOffset = __glXTypeSize(cType) * cSize;
size = vOffset + __glXTypeSize(vType) * vSize;
break;
case GL_C4UB_V3F:
cEnable = GL_TRUE;
cSize = 4;
cType = GL_UNSIGNED_BYTE;
vSize = 3;
vOffset = __glXTypeSize(vType) * cSize;
size = vOffset + __glXTypeSize(vType) * vSize;
break;
case GL_C3F_V3F:
cEnable = GL_TRUE;
cSize = 3;
cType = GL_FLOAT;
vSize = 3;
vOffset = __glXTypeSize(cType) * cSize;
size = vOffset + __glXTypeSize(vType) * vSize;
break;
case GL_N3F_V3F:
nEnable = GL_TRUE;
vSize = 3;
vOffset = __glXTypeSize(nType) * nSize;
size = vOffset + __glXTypeSize(vType) * vSize;
break;
case GL_C4F_N3F_V3F:
cEnable = GL_TRUE;
cSize = 4;
cType = GL_FLOAT;
nEnable = GL_TRUE;
nOffset = __glXTypeSize(cType) * cSize;
vSize = 3;
vOffset = nOffset + __glXTypeSize(nType) * nSize;
size = vOffset + __glXTypeSize(vType) * vSize;
break;
case GL_T2F_V3F:
tEnable = GL_TRUE;
tSize = 2;
vSize = 3;
vOffset = __glXTypeSize(tType) * tSize;
size = vOffset + __glXTypeSize(vType) * vSize;
break;
case GL_T4F_V4F:
tEnable = GL_TRUE;
tSize = 4;
vSize = 4;
vOffset = __glXTypeSize(tType) * tSize;
size = vOffset + __glXTypeSize(vType) * vSize;
break;
case GL_T2F_C4UB_V3F:
tEnable = GL_TRUE;
tSize = 2;
cEnable = GL_TRUE;
cSize = 4;
cType = GL_UNSIGNED_BYTE;
cOffset = __glXTypeSize(tType) * tSize;
vSize = 3;
vOffset = cOffset + __glXTypeSize(cType) * cSize;
size = vOffset + __glXTypeSize(vType) * vSize;
break;
case GL_T2F_C3F_V3F:
tEnable = GL_TRUE;
tSize = 2;
cEnable = GL_TRUE;
cSize = 3;
cType = GL_FLOAT;
cOffset = __glXTypeSize(tType) * tSize;
vSize = 3;
vOffset = cOffset + __glXTypeSize(cType) * cSize;
size = vOffset + __glXTypeSize(vType) * vSize;
break;
case GL_T2F_N3F_V3F:
tEnable = GL_TRUE;
tSize = 2;
nEnable = GL_TRUE;
nOffset = __glXTypeSize(tType) * tSize;
vSize = 3;
vOffset = nOffset + __glXTypeSize(nType) * nSize;
size = vOffset + __glXTypeSize(vType) * vSize;
break;
case GL_T2F_C4F_N3F_V3F:
tEnable = GL_TRUE;
tSize = 2;
cEnable = GL_TRUE;
cSize = 4;
cType = GL_FLOAT;
cOffset = __glXTypeSize(tType) * tSize;
nEnable = GL_TRUE;
nOffset = cOffset + __glXTypeSize(cType) * cSize;
vSize = 3;
vOffset = nOffset + __glXTypeSize(nType) * nSize;
size = vOffset + __glXTypeSize(vType) * vSize;
break;
case GL_T4F_C4F_N3F_V4F:
tEnable = GL_TRUE;
tSize = 4;
cEnable = GL_TRUE;
cSize = 4;
cType = GL_FLOAT;
cOffset = __glXTypeSize(tType) * tSize;
nEnable = GL_TRUE;
nOffset = cOffset + __glXTypeSize(cType) * cSize;
vSize = 4;
vOffset = nOffset + __glXTypeSize(nType) * nSize;
size = vOffset + __glXTypeSize(vType) * vSize;
break;
default:
#define NONE {0, 0, 0}
#define F(x) {GL_FLOAT, x, x * sizeof(GLfloat)}
#define UB4 {GL_UNSIGNED_BYTE, 4, 4 * sizeof(GLubyte)}
/* Each row in this array describes the elements of a particular
* interleaved array mode. Each column describes, in the order in which
* they appear in the interleaved arrays, one of the four possible types
* of vertex data that can appear in an interleaved array.
*/
struct {
/**
* The enum describing the GL type, as would be passed to the
* appropriate gl*Pointer function.
*/
GLushort type;
/**
* Number of elements in the subarray, as would be passed (as the
* \c size parameter) to the appropriate gl*Pointer function.
*/
GLubyte count;
/**
* True size of a single element in the subarray, as would be passed
* (as the \c stride parameter) to the appropriate gl*Pointer
* function.
*/
GLubyte size;
}
static const modes[14][4] = {
/* texture color normal vertex */
{NONE, NONE, NONE, F(2)}, /* GL_V2F */
{NONE, NONE, NONE, F(3)}, /* GL_V3F */
{NONE, UB4, NONE, F(2)}, /* GL_C4UB_V2F */
{NONE, UB4, NONE, F(3)}, /* GL_C4UB_V3F */
{NONE, F(3), NONE, F(3)}, /* GL_C3F_V3F */
{NONE, NONE, F(3), F(3)}, /* GL_N3F_V3F */
{NONE, F(4), F(3), F(3)}, /* GL_C4F_N3F_V3F */
{F(2), NONE, NONE, F(3)}, /* GL_T2F_V3F */
{F(4), NONE, NONE, F(4)}, /* GL_T4F_V4F */
{F(2), UB4, NONE, F(3)}, /* GL_T2F_C4UB_V3F */
{F(2), F(3), NONE, F(3)}, /* GL_T2F_C3F_V3F */
{F(2), NONE, F(3), F(3)}, /* GL_T2F_N3F_V3F */
{F(2), F(4), F(3), F(3)}, /* GL_T2F_C4F_N3F_V3F */
{F(4), F(4), F(3), F(4)}, /* GL_T4F_C4F_N3F_V4F */
};
#undef NONE
#undef F
#undef UB4
GLint trueStride, size;
int offsets[4];
unsigned i;
const int idx = format - GL_V2F;
/* All valid formats are on the range [GL_V2F, GL_V2F+0x0D]. Since idx
* is just the format biased by -GL_V2F, all valid idx values are on the
* range [0, 0x0D].
*/
if ( (idx < 0) || (idx > 0x0D) ) {
__glXSetError(gc, GL_INVALID_ENUM);
return;
}
if ( stride < 0 ) {
__glXSetError(gc, GL_INVALID_VALUE);
return;
}
/* If the 'count' for a subarray is non-zero, then the offset of its
* first element is at the currently accumulated 'size'.
*/
size = 0;
for ( i = 0 ; i < 4 ; i++ ) {
offsets[i] = (modes[idx][i].count != 0) ? size : -1;
size += modes[idx][i].size;
}
trueStride = (stride == 0) ? size : stride;
__glXArrayDisableAll( state );
if (tEnable) {
if ( offsets[0] >= 0 ) {
__indirect_glEnableClientState(GL_TEXTURE_COORD_ARRAY);
__indirect_glTexCoordPointer(tSize, tType, trueStride, (const char *)pointer);
__indirect_glTexCoordPointer( modes[idx][0].count, GL_FLOAT,
trueStride,
(const char *) pointer );
}
if (cEnable) {
if ( offsets[1] >= 0 ) {
__indirect_glEnableClientState(GL_COLOR_ARRAY);
__indirect_glColorPointer(cSize, cType, trueStride, (const char *)pointer+cOffset);
__indirect_glColorPointer( modes[idx][1].count, modes[idx][1].type,
trueStride,
(const char *) pointer + offsets[1] );
}
if (nEnable) {
if ( offsets[2] >= 0 ) {
__indirect_glEnableClientState(GL_NORMAL_ARRAY);
__indirect_glNormalPointer(nType, trueStride, (const char *)pointer+nOffset);
__indirect_glNormalPointer( GL_FLOAT, trueStride,
(const char *)pointer + offsets[2] );
}
__indirect_glEnableClientState(GL_VERTEX_ARRAY);
__indirect_glVertexPointer(vSize, vType, trueStride, (const char *)pointer+vOffset);
__indirect_glVertexPointer( modes[idx][3].count, GL_FLOAT,
trueStride,
(const char *)pointer + offsets[3] );
}

View File

@@ -57,6 +57,9 @@
.INTERMEDIATE: x86/gen_matypes.exe
.SUFFIXES: .rc .res
# Set this to the prefix of your build tools, i.e. mingw32-
TOOLS_PREFIX = mingw32-
TOP = ../..
GLIDE ?= $(TOP)/glide3
LIBDIR = $(TOP)/lib
@@ -70,7 +73,7 @@ endif
LDLIBS = -lgdi32
CC = mingw32-gcc
CC = $(TOOLS_PREFIX)gcc
CFLAGS += -DBUILD_GL32 -D_OPENGL32_
CFLAGS += $(INCLUDE_DIRS)
CFLAGS += -DUSE_EXTERNAL_DXTN_LIB=1
@@ -91,9 +94,11 @@ endif
AR = ar
ARFLAGS = crus
ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),)
UNLINK = del $(subst /,\,$(1))
else
ifneq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),)
UNLINK = $(RM) $(1)
endif
ifneq ($(wildcard $(addsuffix /rm,$(subst :, ,$(PATH)))),)
UNLINK = $(RM) $(1)
endif
@@ -142,10 +147,15 @@ RESOURCE = $(GL_RES:.rc=.res)
.rc.res:
windres -o $@ -Irc -Ocoff $<
all: $(LIBDIR)/$(GL_DLL) $(LIBDIR)/$(GL_IMP)
all: $(LIBDIR) $(LIBDIR)/$(GL_DLL) $(LIBDIR)/$(GL_IMP)
$(LIBDIR):
mkdir -p $(LIBDIR)
$(LIBDIR)/$(GL_DLL) $(LIBDIR)/$(GL_IMP): $(OBJECTS) $(RESOURCE)
dllwrap -o $(LIBDIR)/$(GL_DLL) --output-lib $(LIBDIR)/$(GL_IMP) --target i386-mingw32 --def $(GL_DEF) $^ $(LDLIBS)
$(TOOLS_PREFIX)dllwrap -o $(LIBDIR)/$(GL_DLL) --output-lib $(LIBDIR)/$(GL_IMP) \
--target i386-mingw32 --def $(GL_DEF) -Wl,-enable-stdcall-fixup \
$^ $(LDLIBS)
$(X86_OBJECTS): x86/matypes.h
@@ -163,7 +173,7 @@ x86/gen_matypes.exe: x86/gen_matypes.c
# with USE_X86_ASM (useful for trace/debug)
ifeq (1,1)
x86/glapi_x86.o: x86/glapi_x86.S
$(CC) -o $@ $(CFLAGS) -U__WIN32__ -DSTDCALL_API -c $<
$(CC) -o $@ $(CFLAGS) -DSTDCALL_API -c $<
else
main/dispatch.o: main/dispatch.c
$(CC) -o $@ $(CFLAGS) -UUSE_X86_ASM -c $<

View File

@@ -45,6 +45,7 @@
#include "driverfuncs.h"
#include "swrast/swrast.h"
#include "tnl/tnl.h"
@@ -222,6 +223,7 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
driver->NotifySaveBegin = NULL;
driver->LightingSpaceChange = NULL;
driver->MakeCurrent = NULL;
driver->ProgramStringNotify = _tnl_program_string;
/* display list */
driver->NewList = NULL;

View File

@@ -4,21 +4,18 @@ MESA_MODULES = $(TOP)/src/mesa/mesa.a
COMMON_SOURCES = \
../../common/driverfuncs.c \
../common/mm.c \
../common/utils.c \
../common/texmem.c \
../common/vblank.c \
../common/dri_util.c \
../common/xmlconfig.c \
../common/drirenderbuffer.c \
../common/glcontextmodes.c
../common/drirenderbuffer.c
ifeq ($(WINDOW_SYSTEM),dri)
WINOBJ=../dri_client/dri.a
WINOBJ=
WINLIB=
INCLUDES = $(SHARED_INCLUDES) $(EXPAT_INCLUDES) \
-I../dri_client \
-I../dri_client/imports
`pkg-config --cflags libdrm`
OBJECTS = $(C_SOURCES:.c=.o) \
$(ASM_SOURCES:.S=.o)
@@ -54,7 +51,8 @@ SHARED_INCLUDES = \
-I$(TOP)/src/mesa/shader \
-I$(TOP)/src/mesa/swrast \
-I$(TOP)/src/mesa/swrast_setup \
-I$(TOP)/src/egl/main
-I$(TOP)/src/egl/main \
-I$(TOP)/src/egl/drivers/dri
##### RULES #####

View File

@@ -31,7 +31,6 @@
#include "dri_util.h"
#include "drm_sarea.h"
#include "glcontextmodes.h"
#ifndef GLX_OML_sync_control
typedef GLboolean ( * PFNGLXGETMSCRATEOMLPROC) (__DRInativeDisplay *dpy, __DRIid drawable, int32_t *numerator, int32_t *denominator);
@@ -41,14 +40,6 @@ typedef GLboolean ( * PFNGLXGETMSCRATEOMLPROC) (__DRInativeDisplay *dpy, __DRIid
*/
const __DRIinterfaceMethods * dri_interface = NULL;
/**
* Weak thread-safety dispatch pointer. Older versions of libGL will not have
* this symbol, so a "weak" version is included here so that the driver will
* dynamically link properly. The value is set to \c NULL. This forces the
* driver to fall back to the old dispatch interface.
*/
struct _glapi_table *_glapi_DispatchTSD __attribute__((weak)) = NULL;
/**
* This is used in a couple of places that call \c driCreateNewDrawable.
*/
@@ -140,9 +131,8 @@ static void __driGarbageCollectDrawables(void *drawHash)
__DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *)pdraw->private;
dpy = pdp->driScreenPriv->display;
if (! (*dri_interface->windowExists)(dpy, draw)) {
/* Destroy the local drawable data in the hash table, if the
drawable no longer exists in the Xserver */
drmHashDelete(drawHash, draw);
/* Destroy the local drawable data, if the drawable no
longer exists in the Xserver */
(*pdraw->destroyDrawable)(dpy, pdraw->private);
_mesa_free(pdraw);
}
@@ -673,6 +663,7 @@ static void driDestroyDrawable(__DRInativeDisplay *dpy, void *drawablePrivate)
(*psp->DriverAPI.DestroyBuffer)(pdp);
if ((*dri_interface->windowExists)(dpy, pdp->draw))
(void)(*dri_interface->destroyDrawable)(dpy, scrn, pdp->draw);
drmHashDelete(psp->drawHash, pdp->draw);
if (pdp->pClipRects) {
_mesa_free(pdp->pClipRects);
pdp->pClipRects = NULL;
@@ -836,7 +827,7 @@ static void driDestroyScreen(__DRInativeDisplay *dpy, int scrn, void *screenPriv
_mesa_free(psp->pDevPriv);
(void)drmClose(psp->fd);
if ( psp->modes != NULL ) {
_gl_context_modes_destroy( psp->modes );
(*dri_interface->destroyContextModes)( psp->modes );
}
_mesa_free(psp);
}

View File

@@ -54,6 +54,7 @@
#include <GL/gl.h>
#include "drm.h"
#include "drm_sarea.h"
#include "xf86drm.h"
#include "GL/internal/glcore.h"
#include "GL/internal/dri_interface.h"

View File

@@ -31,11 +31,11 @@
* \author Ian Romanick <idr@us.ibm.com>
*/
#ifdef IN_DRI_DRIVER
#if defined(IN_MINI_GLX)
# include <stdlib.h>
# include <string.h>
# include <GL/gl.h>
# include "dri_interface.h"
# include "GL/internal/dri_interface.h"
# include "imports.h"
# define __glXMemset memset
#else
@@ -55,11 +55,11 @@ extern void __glXFree( void * ptr );
# define _mesa_malloc(b) Xmalloc(b)
# define _mesa_free(m) Xfree(m)
# endif /* XFree86Server */
#endif /* !defined(IN_DRI_DRIVER) */
#endif /* !defined(IN_MINI_GLX) */
#include "glcontextmodes.h"
#if !defined(IN_DRI_DRIVER)
#if !defined(IN_MINI_GLX)
#define NUM_VISUAL_TYPES 6
/**
@@ -157,8 +157,8 @@ _gl_copy_visual_to_context_mode( __GLcontextModes * mode,
mode->greenMask = config->greenMask;
mode->blueMask = config->blueMask;
mode->alphaMask = config->alphaMask;
mode->rgbBits = config->bufferSize;
mode->indexBits = config->bufferSize;
mode->rgbBits = mode->rgbMode ? config->bufferSize : 0;
mode->indexBits = mode->colorIndexMode ? config->bufferSize : 0;
mode->accumRedBits = config->accumRedSize;
mode->accumGreenBits = config->accumGreenSize;
@@ -320,7 +320,7 @@ _gl_get_context_mode_data(const __GLcontextModes *mode, int attribute,
return GLX_BAD_ATTRIBUTE;
}
}
#endif /* !defined(IN_DRI_DRIVER) */
#endif /* !defined(IN_MINI_GLX) */
/**

View File

@@ -32,14 +32,14 @@
#include "GL/internal/glcore.h"
#if !defined(IN_DRI_DRIVER)
#if !defined(IN_MINI_GLX)
extern GLint _gl_convert_from_x_visual_type( int visualType );
extern GLint _gl_convert_to_x_visual_type( int visualType );
extern void _gl_copy_visual_to_context_mode( __GLcontextModes * mode,
const __GLXvisualConfig * config );
extern int _gl_get_context_mode_data( const __GLcontextModes *mode,
int attribute, int *value_return );
#endif /* !defined(IN_DRI_DRIVER) */
#endif /* !defined(IN_MINI_GLX) */
extern __GLcontextModes * _gl_context_modes_create( unsigned count,
size_t minimum_size );

View File

@@ -36,7 +36,7 @@
#include "utils.h"
#include "dispatch.h"
unsigned driDispatchRemapTable[ driDispatchRemapTable_size ];
int driDispatchRemapTable[ driDispatchRemapTable_size ];
#if defined(USE_X86_ASM)
#include "x86/common_x86_asm.h"
@@ -188,17 +188,26 @@ driGetRendererString( char * buffer, const char * hardware_name,
#define need_GL_EXT_vertex_array
#define need_GL_MESA_window_pos
/* These are needed in *all* drivers because Mesa internally implements
* certain functionality in terms of functions provided by these extensions.
* For example, glBlendFunc is implemented by calling glBlendFuncSeparateEXT.
*/
#define need_GL_EXT_blend_func_separate
#define need_GL_NV_vertex_program
#include "extension_helper.h"
static const struct dri_extension all_mesa_extensions[] = {
{ "GL_ARB_multisample", GL_ARB_multisample_functions },
{ "GL_ARB_transpose_matrix", GL_ARB_transpose_matrix_functions },
{ "GL_ARB_window_pos", GL_ARB_window_pos_functions },
{ "GL_EXT_blend_func_separate", GL_EXT_blend_func_separate_functions },
{ "GL_EXT_compiled_vertex_array", GL_EXT_compiled_vertex_array_functions },
{ "GL_EXT_polygon_offset", GL_EXT_polygon_offset_functions },
{ "GL_EXT_texture_object", GL_EXT_texture_object_functions },
{ "GL_EXT_vertex_array", GL_EXT_vertex_array_functions },
{ "GL_MESA_window_pos", GL_MESA_window_pos_functions },
{ "GL_NV_vertex_program", GL_NV_vertex_program_functions },
{ NULL, NULL }
};
@@ -220,6 +229,10 @@ void driInitExtensions( GLcontext * ctx,
unsigned i;
if ( first_time ) {
for ( i = 0 ; i < driDispatchRemapTable_size ; i++ ) {
driDispatchRemapTable[i] = -1;
}
first_time = 0;
driInitExtensions( ctx, all_mesa_extensions, GL_FALSE );
}

View File

@@ -1,60 +0,0 @@
# src/mesa/drivers/dri/gamma/Makefile
TOP = ../../../../..
include $(TOP)/configs/current
# Get rid of this:
#
DEFINES += -DGLX_DIRECT_RENDERING
C_SOURCES = \
xf86drm.c \
xf86drmHash.c \
xf86drmRandom.c \
xf86drmSL.c \
OBJECTS = $(C_SOURCES:.c=.o)
INCLUDES = \
-I$(TOP)/include \
-I$(DRM_SOURCE_PATH)/shared-core \
-I$(TOP)/include/GL/internal \
-I$(TOP)/src/mesa \
-I$(TOP)/src/mesa/main \
-I$(TOP)/src/mesa/glapi \
-Iimports
##### RULES #####
.c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
##### TARGETS #####
default: depend dri.a
# Run 'make dep' to update the dependencies if you change
# what's included by any source file.
depend: $(C_SOURCES) $(ASM_SOURCES)
touch depend
$(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) \
$(C_SOURCES) $(ASM_SOURCES)
dri.a: $(OBJECTS)
rm -f $@
ar rcv $@ $(OBJECTS)
ranlib $@
# Remove .o and backup files
clean:
-rm -f *.o */*.o *~ *.so *.a depend depend.bak
install:
include depend

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