Compare commits

...

619 Commits

Author SHA1 Message Date
Ben Skeggs
8051c95a7e nouveau: match drm version bump 2007-03-26 21:31:43 +10:00
Brian
42aaa548a1 Fix some renderbuffer reference counting issues. Also fixes a mem leak. 2007-03-25 10:39:36 -06:00
Brian
6fda763989 destroy window on exit 2007-03-25 10:25:29 -06:00
Xiang, Haihao
a1ea7812b2 i965: The given urb layout(maximal size of urb entries and the
values for nr of entries) should meet the requirement.
2007-03-25 21:40:58 +08:00
Xiang, Haihao
bb59d81d2d Color3iv: set the alpha value to 1.0 2007-03-25 21:31:36 +08:00
Nicolai Haehnle
8a4546b561 r300: Whitespace cleanup in r300_texmem.c 2007-03-25 14:57:56 +02:00
Nicolai Haehnle
9db583e7e4 r300: Whitespace cleanup in r300_texstate.c 2007-03-25 14:57:49 +02:00
Nicolai Haehnle
7143c61283 r300: Fix regression: unnecessary node indirection
The texture_rectangle fix introduced a bug where every texture instruction
caused a new indirection.
2007-03-25 13:04:03 +02:00
Dave Airlie
74ceaf545f nouveau: implement nv20Clear and nv20Scissor
Still crashes out on scissor regs
2007-03-25 07:09:02 +10:00
Nicolai Haehnle
f27991c916 r300: Fix texture coordinate calculation for rectangle textures
R300 hardware takes texcoords in the range 0..1 even for rectangle
textures. Previously, the necessary texcoord conversion was applied
to the texture coordinate during vertex processing in a render stage.

This is obviously wrong when fragment programs are used, which can
calculate arbitrary coordinates for TEX instructions. Therefore,
we now inject an appropriate MUL instruction before a TEX that
reference a rectangle texture.
2007-03-24 19:09:44 +01:00
Nicolai Haehnle
0c3ae2ea7f r300: No assertion when accessing incomplete texture images.
There used to be an assertion when a fragment program accesses an incomplete
texture image. Work around this assertion.
Note: I am unsure whether this workaround produces the desired result
(0,0,0,1) on all hardware.
2007-03-24 18:11:37 +01:00
Nicolai Haehnle
d4dd5a95a8 r300: Fix: KIL instruction don't require textures
When no textures were enabled, a KIL instruction triggered an assertion
in r300_setup_rs_unit.
2007-03-24 14:43:06 +01:00
Nicolai Haehnle
8f90822b72 swrast: Fix crash when sampling from a non-existing texture object 2007-03-24 14:42:49 +01:00
Ben Skeggs
ea3d11a3d8 nouveau: some swtcl fixes 2007-03-24 22:24:00 +11:00
Brian
8e1c3bd0b4 Implement alpha buffer copy for SwapBuffers().
Nicolai writes:
When the pixmap pixel format has no alpha channel, the x11 driver
(software rendering) adds a wrapped alpha channel on request.

During SwapBuffers, this alpha channel is not copied from back to
front, which means that the front buffer doesn't really contain the
contents that the back buffer previously contained.

A subsequent glReadPixels from the front buffer will return an
incorrect result. The following patch attempts to fix this.
2007-03-23 18:01:31 -06:00
Nicolai Haehnle
654a308439 r300: Whitespace cleanup (remove trailing spaces) 2007-03-23 17:39:28 +01:00
Brian
002762b13a use _mesa_alloc_instructions() 2007-03-22 08:51:34 -06:00
Brian
1240eb2683 use _mesa_copy_instructions() 2007-03-22 08:50:20 -06:00
Alan Hourihane
985a2eff82 Ensure we have a valid ReadBuffer for CopyTexSubImage, and
if not bail accordingly.

Previously we'd only do this test on compressed textures.
2007-03-22 14:28:18 +00:00
Xiang, Haihao
01b7f2ab2e fix for bug#10339
StateFlags has been updated in _mesa_add_state_reference
2007-03-22 11:01:51 +08:00
Brian
88db19a484 document 1D convolution fix 2007-03-21 09:45:58 -06:00
Brian
249b451d20 1D convolution (and post-conv scale/bias) were inadvertantly applied to 2D image transfers. 2007-03-21 09:44:03 -06:00
Roland Scheidegger
c5fe807e42 fix copy and paste bug from last commit in fog generation code for GL_LINEAR fog 2007-03-21 13:19:02 +01:00
Ben Skeggs
4b5d6c0435 nouveau: update for drm interface changes (0.0.5) 2007-03-21 17:54:57 +11:00
Ben Skeggs
6cadebbb67 nouveau: SwapBuffers() needs to perform a glFlush() 2007-03-21 15:07:12 +11:00
Xiang, Haihao
704cd61120 mesa: revert f9f79c8d77
to fix #10232

Table6.1(in gl2.1) has been applied for glGetTexImage
before calling into _mesa_pack_rgba_span_float.
2007-03-21 10:50:19 +08:00
Nicolai Haehnle
4bafc547df r300: Remove the program-global const_sin index
The index is no longer necessary to share constants between multiple
SIN/COS/SCS instructions inside a single fragment program, and storing
a tiny implementation detail like this in the fragment_program structure
itself was just nasty.
2007-03-21 00:58:02 +01:00
Nicolai Haehnle
cbe38dc0ce r300: Whitespace cleanup (remove trailing spaces) 2007-03-20 18:40:09 +01:00
Xiang, Haihao
cf4272d256 fix for bug#10347
not sure which brw surface for DXT3 & DXT5, so restore
the previous choice.(changed in commit
84081774e6)
2007-03-20 22:12:03 +08:00
Alan Hourihane
bec665d5b5 use passed target parameter 2007-03-20 13:15:58 +00:00
Ben Skeggs
ecb1a1c82f nouveau: fix typo 2007-03-20 16:08:14 +11:00
Ben Skeggs
4185037af2 nouveau: fail translate if we use too many params somehow 2007-03-20 16:08:07 +11:00
Ben Skeggs
9622a634f6 nouveau: NVSDBG macro 2007-03-20 16:08:01 +11:00
Nicolai Haehnle
61821a41c0 r300: Cleanup fragment program constant allocation, share constants
The constant/parameter allocation was significantly simplified, removing
one unnecessary copy operation of parameters. The dirty state tracking is
unchanged and far from optimal, since all state is always re-fetched.

Constants and parameters are now emitted only once, which significantly
reduces the resource pressure on larger programs.
2007-03-19 23:59:59 +01:00
Nicolai Haehnle
5a65478783 r300: Fix special case (tmp.x <= 0) in fragment program LIT instruction
Also, fix a typo in a related comment.
2007-03-19 22:29:34 +01:00
Nicolai Haehnle
b3acba87d7 r300: Clear fragment program instruction slots on first use
Make sure that instruction slots are fully initialized with NOPs during
find_and_prepare_slot(). This fixes a bug when a fragment program was
translated more than once (e.g. due to a second call to glProgramStringARB).

This partially fixes glean/fragProg1.
2007-03-19 22:29:21 +01:00
Nicolai Haehnle
826815a5d2 r300: Dump fragment program after translation if RADEON_DEBUG=pixel is set 2007-03-19 20:02:19 +01:00
Nicolai Haehnle
7b992d024b r300: Whitespace cleanup (remove trailing spaces) 2007-03-19 19:49:06 +01:00
Nicolai Haehnle
c4bf863f4c r300: Fix WRITEMASK handling when writing to result.depth
This is a necessary change to emit the right instructions when writing
to result.depth.

However, even with this test, Z-write doesn't work properly, and I don't
fully understand why. In addition to this, we'll at least have to disable
early-Z, but even that doesn't seem to be enough.
2007-03-19 19:48:58 +01:00
Nicolai Haehnle
b645e8c96d r300: Streamlined fragment program LIT implementation
Fix a bug in the LIT implementation (clamp exponent to 128, not 0.5)
and change the implementation around. In theory, the new implementation
needs as little as 5 instruction slots. Unfortunately, the dependency
analysis in find_and_replace_slot is not strong enough to look at
individual components of a register yet.
2007-03-19 19:10:21 +01:00
Nicolai Haehnle
ff6ab9b45b r300: Fix fragment program reordering
Do not move an instruction that writes to a temp forward past an instruction
that reads the same temporary.
2007-03-19 18:38:07 +01:00
Nicolai Haehnle
ec1a77c864 r300: Fragment program dumps format tex instructions 2007-03-19 18:38:07 +01:00
Nicolai Haehnle
a8e65a010c r300: Fix hw fragment program dump
Dumps of fragment programs were incorrect when the program consisted of multiple
nodes.

Also, improved the formatting a bit.
2007-03-19 18:38:07 +01:00
Nicolai Haehnle
7b430acd71 r300: Fix fragment program instruction pairing and register allocation
There were a number of bugs related to the pairing of vector and scalar
operations where swizzles ended up using the wrong source register,
or an instruction was moved forward and ended up overwriting an aliased
register.

The new algorithm for register allocation is quite conservative and may
run out of registers before necessary. On the plus side, It Just Works.

Pairing is done whenever possible, and in more cases than before, so
in practice this change should be a net win.
2007-03-19 18:38:07 +01:00
Michel Dänzer
07db8c9115 i915tex: The intended triple buffering fix.
Making modifications while the editor spawned by git-commit was suspended
didn't have the intended effect.
2007-03-19 18:34:27 +01:00
Michel Dänzer
9b42100c04 i915tex: Fix triple buffering after recent Mesa core changes.
Remove superfluous _mesa_resize_framebuffer call which is now harmful because
it causes the third renderbuffer to have width/height 0, so Mesa refuses to
render to it.

In the long term, it would be nice to remove the hack in
intel_alloc_window_storage in favour of a proper Mesa interface for flipping
between more than two colour buffers.
2007-03-19 17:23:44 +01:00
Keith Whitwell
77544d7b7d fix off-by-one in load_state_immediate 2007-03-18 20:13:45 +00:00
Keith Whitwell
c9e39aeaef fix typo in subrect_disable packet 2007-03-18 20:13:45 +00:00
Keith Whitwell
07265280a9 fix typo in subrect_disable packet 2007-03-18 20:13:45 +00:00
Miguel Marte
c41d6ab6f0 screen offset changes, bug 9965 2007-03-18 11:08:29 -06:00
Nicolai Haehnle
441f038748 fix assertion in read_depth_pixels() 2007-03-18 11:02:35 -06:00
Oliver McFadden
dd868b4100 r300: Removed the deprecated $XFree86$ CVS keywords. 2007-03-18 16:57:45 +00:00
Oliver McFadden
1062106521 r300: Corrected the string for polygon mode; it wasn't updated from unkXXX. 2007-03-18 16:45:32 +00:00
Ben Skeggs
bcf4f4de76 nouveau: avoid using uninitialised TexSrcUnit. 2007-03-19 00:13:41 +11:00
Xiang, Haihao
bb02092d74 mesa: SWAP_BUFF support when calling DrawPixels(DEPTH_COMPONENT)
or TexImage(DEPTH_COMPONENT)
2007-03-18 18:44:51 +08:00
Xiang, Haihao
b6fe1bdd4d mesa: enhance fxt1_quantize_ALPHA1
If possible, let minCol != maxCol
2007-03-18 18:34:21 +08:00
Xiang, Haihao
84081774e6 i965: fix for FXT1 & S3TC texture format
choose the right mesa texformat for FXT1 & S3TC
2007-03-18 18:26:16 +08:00
Oliver McFadden
cfe984dbd0 Use _mesa_copy_instructions rather than memcpy in _mesa_insert_mvp_code. 2007-03-18 07:35:45 +00:00
Haihao Xiang
ee5b7f0574 fix some format conversion bugs in glGetTexImage(), bug 10288 2007-03-17 09:42:36 -06:00
Dave Airlie
6a9b0cd0b4 r300: change vendor string to DRI R300 Project 2007-03-17 16:46:24 +11:00
Brian
e5070bc3ca Assorted fixes for dealing with zero-size frame/renderbuffers.
In xmesa_check_and_update_buffer_size() handle xmctx==NULL correctly: still
call _mesa_resize_framebufer().  If we don't we can wind up in a situation
where the framebuffer size is non-zero but an attached renderbuffer size
is still initialized to zero.  This inconsistancy can later cause problems.
Check for zero-size renderbuffers in update_color_draw_buffers() and
update_color_read_buffer().
See bug 7205.
2007-03-16 11:00:07 -06:00
Brian
7573b58db6 Colortable re-org.
The pixel transfer path has three color table lookups.
Use an array [3] to store that info, rather than separate variables.
2007-03-16 09:36:12 -06:00
Brian
d7049431a0 added a renderbuffer comment 2007-03-16 08:36:22 -06:00
Mathias Hopf
f04979ae48 added null xmctx check to XMesaResizeBuffers(), bug 7205 2007-03-16 08:28:34 -06:00
Oliver McFadden
95764262a7 Fixed a minor typo in the comment near _mesa_copy_instructions. 2007-03-15 21:57:31 +00:00
Oliver McFadden
0c25d9ab19 r300: Added _mesa_copy_instructions. 2007-03-15 20:55:30 +00:00
Oliver McFadden
1195caa274 r300: Renamed r300_vertexprog.c to r300_vertprog.c 2007-03-15 20:39:07 +00:00
Oliver McFadden
0e9ada1087 r300: Use _mesa_alloc_instructions/_mesa_init_instructions instead of malloc.
Note that insert_wpos in r300_vertexprog.c is still a little flaky and could be
improved.
2007-03-15 19:49:10 +00:00
Oliver McFadden
0d6d80ef3d r300: Updated R300 to use the new SWIZZLE macros. 2007-03-15 19:09:10 +00:00
Oliver McFadden
51693b22cd r300: Fixed an unused variable warning and removed some cruft, too. 2007-03-15 18:44:29 +00:00
Oliver McFadden
b3a9a90cdf r300: Fixed a printf conversion warning. 2007-03-15 18:30:33 +00:00
Oliver McFadden
7f08dd3fc6 r300: Fixed "no previous prototype for 'r300RefillCurrentDmaRegion'" warning. 2007-03-15 18:30:33 +00:00
Brian
fc6b8f2d30 added SWIZZLE_XXXX, YYYY, etc. macros 2007-03-15 11:51:54 -06:00
Oliver McFadden
4e4ab2a62b Committed Rune Petersen's fragment.position patch (Bug #10024) plus a few small
corrections.
2007-03-15 17:35:34 +00:00
Brian
4d2eb637a2 no-op clear if buffer width or height is zero (bug 7205) 2007-03-15 11:16:41 -06:00
Brian
038e981cac add some rb->Data null ptr checks (bug 7205) 2007-03-15 11:11:41 -06:00
Brian
90563d39cb Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa 2007-03-15 09:03:03 -06:00
Brian
0cfdf432e4 implement byteswapping for all multi-byte types in _mesa_pack_rgba_span_float(), bug 10298 2007-03-15 09:02:14 -06:00
Keith Whitwell
4a7fe4fcfa Fix off by one error in immediate state packet size. 2007-03-15 10:29:38 +00:00
Brian
32d196820f pixelmap code simplification 2007-03-14 14:56:39 -06:00
Brian
b6adf336f4 Re-org of gl_pixel_attrib struct.
Reorder fields according to the order in which the pixel transfer operations
take place.  Improve comments.
Move the pixel maps out of gl_pixel_attrib since they're not supposed to be
pushed/popped by glPush/PopAttrib.
New gl_pixelmap and gl_pixelmaps structs to contain the pixelmaps.
2007-03-14 14:33:46 -06:00
Brian
3049946fa7 clear the b->frontxrb->drawable field in xmesa_free_buffer(), see bug 7205 2007-03-14 12:52:53 -06:00
Brian
46fe008778 Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa 2007-03-14 12:43:26 -06:00
Brian
47e0b606a8 move CLIENT_ID code in xmesa_delete_framebuffer(), see bug 7205 2007-03-14 12:42:30 -06:00
Roland Scheidegger
a6cc9ab493 sync up t_vp_build.c brw_vs_tnl.c a bit
Bring over the optimizations for fog and normalized spot dir
from t_vp_build.c to brw_vs_tnl.c. Likewise, port a fix for point size
calc from brw_vs_tnl.c to t_vp_build.c (use ABS(eyez) instead of -eyez). Leave
the now differing point size calcs alone though, not sure what's better (it's
basically MOV, ABS, MUL, DP3 vs. ABS, MAD, MAD).
2007-03-13 19:04:28 +01:00
Roland Scheidegger
37e6f760fd enable ARB_vertex_buffer_object for more dri drivers
ARB_vertex_buffer_object looks like a useful extension even for old chips.
The drivers should not need any code to be able to use this extension since
they just use mesa's vbo code anyway.
Newly enabled for i810, mach64, mga, r128, radeon, savage, sis and unichrome.
2007-03-13 17:44:22 +01:00
Oliver McFadden
4c18d9056b r300: Renamed the CACHE_CTLSTAT values to include UNKNOWN in the name; not
enough information is known about them to be sure as to what the values mean.
2007-03-13 14:48:29 +00:00
Roland Scheidegger
14f0b7ea98 use movdqu instead of movdqa for unaligned load avoiding a segfault (bug 10265) 2007-03-13 13:44:23 +01:00
Oliver McFadden
eb4db4c4ec Add defines for the values written to R300_RB3D_ZCACHE_CTLSTAT.
Note that just like the values written to R300_RB3D_DSTCACHE_CTLSTAT these
values are really unknown; ideally more reverse engineering should be done to
determine what these values mean and when they should be set.
2007-03-13 06:24:56 +00:00
Oliver McFadden
19fbe9732c Documented the value written for R300_TX_CNTL cache flush. 2007-03-13 06:10:23 +00:00
Xiang, Haihao
53f83b435c mesa: _mesa_unpack_image
1. take packed pixel data as a component
2. fix for GL_BITMAP when compiling glTexImage, etc into
a display list:  a. flip byte if lsbFirst is true since
DefaultPacking->lsbFirst is false. b. handle SkipPixels
2007-03-13 13:39:34 +08:00
Oliver McFadden
cd66604756 Corrected values written to R300_RB3D_DSTCACHE_CTLSTAT to either
R300_RB3D_DSTCACHE_02 or R300_RB3D_DSTCACHE_0A, rather than hexadecimal values.
2007-03-13 01:31:38 +00:00
Oliver McFadden
0c750ca98d Guess another unknown register used for R300 pacification. 2007-03-13 00:48:17 +00:00
Michel Dänzer
708d836e6b i915tex: Don't crash when intel_fb->color_rb[i] is NULL.
This can be the case on some systems when running glxinfo.
2007-03-12 19:08:28 +01:00
Brian
17fb7821d7 clean-up, simplify _mesa_image_row_stride() 2007-03-12 09:50:27 -06:00
Brian
c1a5447337 take GL_UNPACK_ALIGNMENT into account in _mesa_image_row_stride() for GL_BITMAP type (bug 10261) 2007-03-12 09:50:27 -06:00
Alan Swanson
d0a3400f66 r200: Simplify r200SetCliprects like radeonSetCliprects in radeon and r300. 2007-03-12 10:03:01 +01:00
Alan Swanson
33ea9dccaf r200: Adapt cliprect fixes from r300. 2007-03-12 09:59:45 +01:00
Alan Swanson
88501887e4 radeon: Adapt cliprect fixes from r300. 2007-03-12 09:59:28 +01:00
Xiang, Haihao
61ec23cc63 fix for bug#10196
Compute half if LOCAL_VIEWER is enabled and the light is
a directional source.
2007-03-11 22:41:26 +08:00
Aapo Tahkola
69e57cf6ae Guess another unknown register in R300 command buffer initialization. (Oliver McFadden) 2007-03-11 11:47:03 +02:00
Oliver McFadden
e64166703a Renamed some of the unkXXX variables in the command buffer init
ialization code.

Note that there are still plenty of actual unknown variables left that should
probably be deciphered.

There are a number of things incomplete in the driver; the different polygon
offset modes (line, point, etc), the other texture filter, texture chroma key,
etc. These should probably be fixed in the future, or at least added to the TODO
list.
2007-03-11 12:18:27 +11:00
Brian
7d39c1ae76 Fix TEXREL issues.
Patch submitted by Christoph Brill.
See http://www.gentoo.org/proj/en/hardened/pic-fix-guide.xml
2007-03-10 11:50:50 -07:00
Brian
823c041fde check for EXT_blend_equation_separate for 2.0 2007-03-10 11:48:59 -07:00
Michel Dänzer
38f7f81518 i915tex: Fix build against libdrm git... 2007-03-10 17:12:58 +01:00
Michel Dänzer
beffb4e88c i915tex: Fix intel_wait_flips being declared implicitly. 2007-03-10 16:40:22 +01:00
Michel Dänzer
97775f9904 i915tex: Fix build against released version of libdrm. 2007-03-10 16:08:11 +01:00
Stephane Marchesin
ced8870a6a nouveau: fix nv04 swtcl. 2007-03-10 13:46:26 +01:00
Stephane Marchesin
4f12b37a56 nouveau: fix the nv04 swtcl code. 2007-03-10 01:30:34 +01:00
Stephane Marchesin
581a594033 nouveau: oops don't debug by default. 2007-03-10 01:30:34 +01:00
Stephane Marchesin
df1c3ff3dd nouveau: some fixes to the nv04 state code. 2007-03-10 01:30:33 +01:00
Stephane Marchesin
e61f674844 nouveau: add a fifo size debug check. 2007-03-10 01:30:33 +01:00
Michel Dänzer
30b914e2ca Merge branch 'i915tex-pageflip' 2007-03-10 00:19:17 +01:00
Michel Dänzer
6e0878becf i915tex: Wait for pending scheduled flips before switching vsync pipe.
This avoids hangs when the vblank sequence numbers are not in sync between
pipes, in particular when they run at different refresh rates.
2007-03-09 20:00:13 +01:00
Michel Dänzer
bb0760ca4f i915tex: Set intel_fb->vbl_waited to current instead of what we aimed for. 2007-03-09 19:56:55 +01:00
Michel Dänzer
36b4e25da3 i915tex: Sync pages between pipes immediately again.
This should be safe now that we no longer use the MI_WAIT_FOR_EVENT instruction
incorrectly and should also work correctly with applications that render to the
front buffer.
2007-03-09 17:52:29 +01:00
Michel Dänzer
81536789d2 i915tex: Do not wait for pending flips on both pipes at the same time.
The MI_WAIT_FOR_EVENT instruction does not support waiting for several events
at once, so this should fix the lockups with page flipping when both pipes are
enabled.
2007-03-09 17:42:55 +01:00
Brian
f9f79c8d77 New IMAGE_RED_TO_LUMINANCE flag passed to _mesa_pack_rgba_span_float() to fix glGetTexImage(GL_LUMINANCE) bug #10232. 2007-03-09 09:13:49 -07:00
Michel Dänzer
4d9901a1ca r300: Also update window state when it's already bound but its stamp changed.
And set new cliprects before deriving other state from them. This ensures
cliprects aren't accessed after having been freed.

Thanks to Panagiotis Papadakos for testing various iterations of this.
2007-03-09 09:43:17 +01:00
Xiang, Haihao
d85667950f remove a if-statement
glMaterial changes the current specular exponent or glLight changes
    the intensity distribution of the light, but _mesa_update_state doesn't
    update the corresponding light table. So they must be updated at this time.
2007-03-08 22:54:14 +08:00
J.Jansen
79d59d0173 Updates of the OpenVMS makefiles.
-include missing definitions
	 -add files to compile
	 -remove files from compile list which are removed from the repositry
	 -add support for vbo

	new file:   src/mesa/vbo/descrip.mms
	modified:   src/mesa/descrip.mms
	modified:   src/mesa/drivers/osmesa/descrip.mms
	modified:   src/mesa/drivers/x11/descrip.mms
	modified:   src/mesa/swrast_setup/descrip.mms
	modified:   src/mesa/tnl/descrip.mms
2007-03-08 09:53:28 +01:00
Michel Dänzer
fb3410297b i915tex: Set framebuffer size to match window before calling _mesa_make_current.
Fixes issues with apps that don't call glViewport by default.
2007-03-07 18:01:39 +01:00
Michel Dänzer
9adf6e9d6c i945_miptree_layout: Adapt cubemap fixes from i915_miptree_layout.
Cubemaps aren't working fully correctly yet, but at least they don't seem to
cause crashes anymore.
2007-03-07 17:52:44 +01:00
Brian
2282d81536 destroy window during cleanup 2007-03-06 16:33:00 -07:00
Brian
0af1c6b5d1 Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa 2007-03-06 16:27:23 -07:00
Brian
e69da9d02e explicit calls to _mesa_unreference_framebuffer() not always needed now 2007-03-06 16:26:22 -07:00
Brian
1a6baf092b unreference old framebuffer, if needed, in _mesa_reference_framebuffer() 2007-03-06 16:26:02 -07:00
Brian
955906aa64 fix renderbuffer mem leak 2007-03-06 16:25:07 -07:00
Brian
37fd6be411 formatting fix 2007-03-06 16:24:48 -07:00
Ian Romanick
fa8961069c Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/mesa/mesa 2007-03-06 11:50:33 -08:00
Ian Romanick
091be11190 Fix cut-and-paste error in the name of GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB. 2007-03-06 11:50:21 -08:00
Brian
a510bc3ee1 Fix/improve framebuffer object reference counting.
Use _mesa_reference_framebuffer() and _mesa_unreference_framebuffer() functions
to be sure reference counting is done correctly.  Additional assertions are
done too.  Note _mesa_dereference_framebuffer() renamed to "unreference" as
that's more accurate.
2007-03-06 10:07:59 -07:00
Brian
593802c0b0 Take care of texObj reference in _mesa_free_framebuffer_data() 2007-03-06 09:49:15 -07:00
Brian
330d7e2080 Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa 2007-03-06 09:03:18 -07:00
Michel Dänzer
6f9b1afc86 r300: Call radeonSetCliprects from radeonMakeCurrent.
Based on a patch by Panagiotis Papadakos.

Among other things, this makes sure the framebuffer object associated with the
drawable has the correct size when _mesa_make_current is called, so the default
viewport is set up correctly.

Also update radeon->lastStamp in radeonSetCliprects.
2007-03-06 13:22:35 +01:00
Xiang, Haihao
1c70cde888 fix for bug#10182
call _mesa_dereference_framebuffer instead of _mesa_dereference_framebuffer
in i810, i915, i915tex, i965 drivers.
2007-03-06 15:47:37 +08:00
Xiang, Haihao
a783713432 fix for bug#9971
call swsetup_Wakeup before falling back to software rendering
2007-03-05 22:18:21 +08:00
Keith Whitwell
7ecdfb2f08 Propogate UsesKill information. 2007-03-04 21:50:51 +00:00
Christoph Bill
9557706404 r300: Use register name & add a register about shading. 2007-03-01 21:11:45 +01:00
Christoph Bill
0d2a68fc61 r300: Use reg definition when available & add missing reg definition. 2007-03-01 20:45:04 +01:00
Christoph Bill
ad3f2107ed Add early register descritpion.
This need more work on case where we can disable
or enable early  (stencil, alpha might need it to
be disable).
2007-03-01 20:40:25 +01:00
Rune Petersen
5cb01764f6 Optimize cos&sin instruction a bit more. 2007-03-01 20:36:19 +01:00
Brian
a8ba888a35 move oldFb decl into tighter scopes 2007-03-01 09:40:21 -07:00
Brian
9fbb2e9e76 fix bad n_dot_h normalization code (bug 9977), plus clean-up the code in general 2007-03-01 09:17:01 -07:00
Brian
d592eaeb83 fix clipping, display name, warnings 2007-03-01 07:56:11 -07:00
Brian
887d3c67cb s/unsigned int/size_t/ (bug 10135) 2007-03-01 07:42:42 -07:00
Brian
03b9e16507 include assert.h 2007-03-01 07:39:27 -07:00
Brian
38a88db1fc Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa 2007-02-28 11:58:30 -07:00
Brian
9f37be694e s/ARB/MESA/ in extension check (bug 10126) 2007-02-28 11:58:06 -07:00
Michel Dänzer
0609b6afa8 i915tex: Sync pages differently when crossing pipe borders.
Don't flip (up to twice) immediately but just arrange things such that the
pages will be in sync on both pipes on the next flip.
2007-02-28 17:46:07 +01:00
Michel Dänzer
3c578455e1 i915tex: Check that intel_rb is valid before trying to add it to an fbo. 2007-02-28 17:42:54 +01:00
Michel Dänzer
edf676cc5a i915tex: Also update intel_rb->vbl_pending when scheduled swap is not a flip. 2007-02-28 16:05:49 +01:00
Ben Skeggs
afa780c09d nouveau: drm interface changes 2007-02-28 15:31:28 +11:00
Brian
59e56ee3e5 fix comment 2007-02-27 11:09:48 -07:00
Brian
f30e312763 assert that fb->RefCount==0 in _mesa_free_framebuffer_data() 2007-02-27 11:09:28 -07:00
Brian
e21096b07c fix mem leak 2007-02-26 17:05:52 -07:00
Brian
928a70e435 Rewrite code related to buffer destruction.
Do proper reference counting so that we don't wind up with dangling
references to deleted windows/framebuffers.  Should help with bug 7205.
2007-02-26 11:39:17 -07:00
Brian
f30e8a4bdf if renderbuffer ptr is null, just return 2007-02-26 11:37:52 -07:00
Brian
e6a9381f78 Do proper framebuffer refcounting in _mesa_make_current().
Also, added DeletePending field to gl_framebuffer used when a window has been
deleted, but there still may be rendering contexts attached to the
gl_framebuffer object.
2007-02-26 11:37:37 -07:00
Brian
344c3f7379 updated version with new Khronos license/copyright 2007-02-26 09:19:32 -07:00
Panagiotis Papadakos
1a72c8ed3f s/pdp/prp/ in DoBindContext() 2007-02-26 07:59:14 -07:00
Panagiotis Papadakos
3528d61820 add missing param to _mesa_warning() 2007-02-26 07:57:31 -07:00
Brian
46d4880201 Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa 2007-02-26 07:56:43 -07:00
Aapo Tahkola
c080123998 Fix #10071 - wrong max_index in vbo draw_prims. (Papadakos Panagiotis) 2007-02-26 01:51:39 +02:00
Brian
9d8df47996 Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa 2007-02-24 18:29:57 -07:00
Brian
d9fb113e05 Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa 2007-02-24 18:15:45 -07:00
Brian
53170942e3 Fix broken cubemap mipmap layout (the cubemap.c demo was segfaulting).
In i915_miptree_layout() change the width, height parameters that are passed
to intel_miptree_set_level_info().  As it was, the width, height values were
larger than the source image dimensions and we segfaulted in memcpy() when
copying the original texture data into the texture buffer region.
This fix should probably be checked by someone more familiar with the code (Keith?)
2007-02-24 18:14:53 -07:00
Brian
aeaad937b9 clean-up, comment code 2007-02-24 18:11:09 -07:00
Brian
5cd30a2b20 make src ptr const 2007-02-24 18:10:41 -07:00
Ian Romanick
3f8c5969ff Fix GLAPIENTRYP for OS X.
Fix build problems related to incorrect define of GLAPIENTRYP on OS X.
Reported by bushing on IRC.
2007-02-23 15:15:50 -08:00
Roland Scheidegger
5e66843733 r200 fix broken (by new input handling) fogcoord 2007-02-23 01:45:19 +01:00
Michel Dänzer
641c966e3d i915tex: Schedule flips when possible.
Also move vsync related state from context to window, so it's possible to
schedule several flips ahead of time with triple buffering.
2007-02-22 17:24:09 +01:00
Brian
53bcdedc32 Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa 2007-02-22 08:57:36 -07:00
Dave Airlie
4a1d7d6641 r300: get rid of CB_DPATH legacy 2007-02-22 19:33:50 +11:00
Ian Romanick
a4b344baa2 Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/mesa/mesa 2007-02-20 15:19:23 -08:00
Ian Romanick
f0bcee5db0 Delete two invalid assertions.
These two assertions are invalid for a couple reasons.  Primarily,
when this code is compiled into the X-server, the symbols
"glSecondaryColor3fEXT" and "glPointParameterivNV" do not exist.
2007-02-20 15:18:53 -08:00
Patrice Mandin
440759c2cd nouveau: nv10: grr, ctx->DrawBuffer invalid? 2007-02-20 23:17:09 +01:00
Patrice Mandin
79870d100f nouveau: nv10: also check ctx->DrawBuffer in nv10ViewportScale 2007-02-20 23:13:48 +01:00
Patrice Mandin
102ad2e066 nouveau: nv10: keep 24/8 depth/stencil value, don't check for depth bits 2007-02-20 23:04:21 +01:00
Michel Dänzer
e33a9d6894 i915tex: Triple buffering support, only effective with page flipping so far.
Pending flips are tracked per renderbuffer and the colour renderbuffer
attachments of window framebuffer objects are rotated on flips to avoid
stalling the pipeline for pending flips unnecessarily.
2007-02-20 19:15:44 +01:00
Michel Dänzer
356bf9563e intelWindowMoved: Some debugging output was accidentally left always enabled. 2007-02-20 19:15:44 +01:00
Michel Dänzer
bfbc1de02e intelRotateWindow: Only use back buffer and cliprects in very specific cases. 2007-02-20 19:15:44 +01:00
Michel Dänzer
6f2bf34748 intelCopyBuffer: Remove incorrect intel_fb->pf_current_page tests.
intel_get_rb_region already takes the current page into account.

This would result in broken rendering when multiple 3D windows are visible
and the pages are reversed.
2007-02-20 19:15:44 +01:00
Michel Dänzer
6b99cafd69 i915tex: Support page flipping on both CRTCs independently.
No longer track page flipping state per context but per window, via struct
intel_framebuffer which wraps struct gl_framebuffer for windows.
2007-02-20 19:15:44 +01:00
Michel Dänzer
af64dd2ae0 i915tex: Make page flipping work again. 2007-02-20 19:15:44 +01:00
Adam Jackson
d44027dbbd Fix parallel make in r300 driver. 2007-02-20 12:48:50 -05:00
Brian
18e9ca5fb0 more branch info 2007-02-20 09:24:06 -07:00
Brian
906fd23e1d glxext.h version 18 2007-02-20 08:41:15 -07:00
Brian
45b1f169b4 updated to version 18 2007-02-20 08:40:55 -07:00
Brian
d2ffe4ca07 glext.h version 39 2007-02-20 08:38:46 -07:00
Brian
c226e44437 updated to version 39 2007-02-20 08:38:29 -07:00
Christian Neumair
20e851bb9a set log level w/ env var 2007-02-20 08:11:11 -07:00
Thomas Hellstrom
d2b06403c6 i915tex: Fix performance regression with new vbo code and latest drm.
With current memory preferences, vbos ended up in AGP space
where reading from them got a bit slow.

Make sure buffer objects are initially created in system memory.
2007-02-19 19:57:30 +01:00
Sean D'Epagnier
43c6b2f67f Merge branch 'master' of git+ssh://geckosenator@git.freedesktop.org/git/mesa/mesa 2007-02-16 17:46:11 -07:00
Sean D'Epagnier
7ae8f388cf Commiting a few minor fixes to glut fbdev (segfault on a separate stack)
Updated all drivers that used the old _ac_ functions to use
the new _vbo_  functions. I know this fixed the fbdev driver,
it looks like it might fix some other drivers too.
2007-02-16 17:44:13 -07:00
Jerome Glisse
515f495f4e doxygen: update doxygen project number to 6.5
doxygen number was laggin behind a bit.
2007-02-16 23:22:04 +01:00
Jerome Glisse
c2e0570831 Update doxygen doc to reflet vbo changes.
Update doxygen doc, array_cache no longuer exist,
new shiny vbo modules is there. Tested on unix,
but i think i didn't broke that bat :).
2007-02-16 23:19:05 +01:00
Patrice Mandin
21f2f7f26b nouveau: nv50: update 2007-02-16 22:39:28 +01:00
Patrice Mandin
4cc4a753fa nouveau: nv10,20: wrong viewport clip setup 2007-02-16 22:39:12 +01:00
Patrice Mandin
0fccb646e0 nouveau: nv20: texture matrix 2007-02-16 22:09:42 +01:00
Patrice Mandin
66d8e55184 nouveau: nv20: update 2007-02-16 22:03:31 +01:00
Patrice Mandin
f942dc5522 nouveau: nv10: set clear value for 16 and 24 bits depth 2007-02-16 20:26:57 +01:00
Patrice Mandin
9131536f00 nouveau: nv10: rescale depth near and far 2007-02-16 19:54:55 +01:00
Patrice Mandin
252d1de054 nouveau: nv10: fix viewport scale and origin 2007-02-16 19:46:54 +01:00
Rune Peterson
e4c772bead r300: Fix cos & add scs to fragment program.
So this do :
 - Fixes COS.
 - Does range reductions for SIN & COS.
 - Adds SCS.
 - removes the optimized version of SIN & COS.
 - tweaked weight (should help on precision).
 - fixed a copy paste typo in emit_arith().
2007-02-14 23:10:52 +01:00
Etienne Clement
1e2b469635 test for POT before using sample_2d_linear_repeat() 2007-02-14 13:21:12 -07:00
Roland Scheidegger
7d8ed0f5f5 fix typo preventing generic arrays from working with ARB_vp (bug #9952) 2007-02-14 20:36:29 +01:00
Patrice Mandin
83cf4ce6e4 nouveau: nv10: there are 8 clipping regions 2007-02-14 20:28:31 +01:00
Roland Scheidegger
99dfca1e7f fix stupid bug in the optimized per-vertex fog generation code 2007-02-14 16:38:32 +01:00
Thomas Hellstrom
bc82b44db9 i915tex: Take into account various mapping states when dropping the
batch buffer after a resolution / rotation switch.
2007-02-14 11:11:37 +01:00
Xiang, Haihao
1e6688742e I965: fix a failure on waiting irq.
Wait until getting the right fence if drm/i915 resets the
counter.
2007-02-12 16:38:50 +08:00
Zou Nan hai
ebcc9b5d12 fd.o #BZ 9684
gcc may cast an overflowed float value to an negative int value on i386,
  fix it to make sure at least some apps will not crash if it contains wrong normal data.
2007-02-12 12:16:49 +08:00
Rune Peterson
ee5417bca8 r300: Add proper support for sin/cos instruction in fragment program
Getting proper SIN and COS wasn't as easy as it appeared.
I had to make make some changes to the fragment program code.
general FP changes:
- support HHH swizzle for vector instructions.
- don't copy a source to a temp when it is not XYZW swizzled, but
 combine the two and have the swizzle resolve any issues.
 (saves temps/instructions with more elaborate shader code)
- fix overflow in cnstv[].
2007-02-12 00:24:36 +01:00
Rune Peterson
3bacb68c70 ctx->Point._Size fix 2007-02-10 18:19:43 -07:00
Roland Scheidegger
b2d30ca0cb optimize per-pixel fog program
use the same internal state as for vertex fog. From the old implemenentation,
this changes a SUB+MUL into a MAD for linear fog, and saves a MUL for EXP/EXP2,
plus saves a (constant) parameter. While here, fix the broken (forgotten)
swizzling. (untested)
2007-02-09 19:21:29 +01:00
Zou Nan hai
fcccf89432 array overflow fix 2007-02-09 13:28:56 +08:00
Roland Scheidegger
421ce180f5 r200: simplify / unify input map handling for vp and fftnl
Use the same input map handling for fftnl and vertex programs. It doesn't
enable any new functionality (should make it easy to support per-vertex
materials though), but the code is much cleaner.
2007-02-09 00:36:53 +01:00
Roland Scheidegger
54dac2c843 optimize generated vertex programs a bit
Use new internal state to avoid per-vertex normalization of static spot
direction vector. Use internal state for simpler per-vertex fog computations
(MAD instead of SUB/MUL for linear fog, EX2 instead of POW for EXP/EXP2 fog).
Simplify point size calc (2 MADs instead of MOV, MUL, MUL, DP3), and while
there fix it up (RSQ instead of RCP). All untested...
2007-02-09 00:36:40 +01:00
Roland Scheidegger
6cf892eeb6 fix issues in vp when using FRAG_BIT_WPOS in a fragment program (bug #9910)
Redirect all VERT_RESULT_HPOS writes to a temp and use that for fixup.
The viewport transformation still seems to take some shortcuts, and it
still does not seem to work at all...
2007-02-09 00:25:53 +01:00
Ben Skeggs
f46c19d965 nouveau: a couple of NV3x fixes 2007-02-06 14:01:19 +11:00
Jakob Bornecrantz
8518ddda7b Add support for CN700 chipset in miniglx 2007-02-06 10:22:47 +11:00
Roland Scheidegger
17c13b406f fix issues when using mixed-mode pos-invariant vp and ff tnl (bug #9856)
ARB_vp requires vertex transformation to be invariant to fixed function tnl
if the position_invariant option is used. So the same function needs to be
used, otherwise z-fighting artifacts may happen with applications which rely
on the results being really the same due to precision issues when dealing with
floating point values (may not be a problem when using a non-optimizing
compiler strictly following IEEE rules).
2007-02-05 21:29:25 +01:00
Brian
5b8a50572d Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa 2007-02-05 10:29:58 -07:00
Panagiotis Papadakos
d0b5c77c68 fix mem leak 2007-02-05 10:29:10 -07:00
Ben Skeggs
4b3679c6c5 nouveau: OUT_RINGp expects the size in dwords, not bytes.
This fixes the *actual* bug that the previous commit was supposed to fix..
2007-02-06 02:29:20 +11:00
Panagiotis Papadakos
eab92fcdc2 fix mem leaks 2007-02-05 08:17:50 -07:00
Ben Skeggs
47bd759fc9 nouveau: fix a small bug in nv10 swtcl 2007-02-06 01:57:04 +11:00
Ben Skeggs
e7654b22aa nouveau: new bufferobj code.
The old code suffered from a number of issues, the most severe being that
with the Mesa VBO merge even swtcl used the driver's bufferobj interface.
On most VBO types (or non-AGP cards) the buffer ended up in vram, and
killed swtcl performance greatly.  All bufferobj's start in system memory
now, until they get referenced as a "real" VBO.

The other big change is that only potentially "damaged" areas are
uploaded/downloaded to/from the hardware.
2007-02-06 00:39:50 +11:00
Panagiotis Papadakos
3805ccf020 break if we removed driver from Drivers list in driDestroyDisplay
Else we read memory we just released, in for statement.
2007-02-05 10:35:52 +01:00
Patrice Mandin
296eeb882f nouveau: nv10: add init for unknown 0x120 2007-02-04 13:10:23 +01:00
Stephane Marchesin
6356874586 nouveau: fix nv04 and nv10 swtcl, more work on nv04 state. 2007-02-04 03:20:01 +01:00
Patrice Mandin
f8ec7f1398 nouveau: forgot function declaration 2007-02-03 23:46:58 +01:00
Patrice Mandin
be85770f14 nouveau: nv50: use nv50 state 2007-02-03 23:32:12 +01:00
Brian
49a17a45fb Add _NEW_PROGRAM flag to _MESA_NEW_NEED_EYE_COORDS.
This fixes a segfault in the texgen code that can occur after we've
disabled a vertex program.
2007-02-03 10:30:50 -07:00
Michel Dänzer
5aa997dafb Merge branch 'origin' 2007-02-03 17:37:01 +01:00
Michel Dänzer
cf4ccd5020 Fall back to software rasterization if r300_translate_fragment_shader() fails.
Aborting immediately is a bad idea with AIGLX.
2007-02-03 17:32:02 +01:00
Michel Dänzer
beffa17bb9 Remove unused r200 files from r300 driver directory. 2007-02-03 17:24:22 +01:00
Michel Dänzer
0afc2d37c3 r300CreateContext: Really initialize r300->initialMaxAnisotropy. 2007-02-03 17:23:19 +01:00
Patrice Mandin
de24b01b05 nouveau: fix viewport clipping initialization 2007-02-03 13:22:42 +01:00
Patrice Mandin
1c25561e30 nouveau: use color pitch as depth pitch if depth disabled 2007-02-03 13:20:16 +01:00
Roland Scheidegger
2a441c488f disable r200 materials-between-begin-end check if vertex progs are enabled 2007-02-03 03:31:31 +01:00
Roland Scheidegger
f697308ae5 remove now unused vtxfmt stuff from radeon/r200 header files 2007-02-03 03:15:45 +01:00
Roland Scheidegger
09e4df2c65 fix errorneously adding fog state params to all vertex programs... 2007-02-03 03:15:14 +01:00
Keith Whitwell
b59657ad96 Merge branch 'vbo-0.2'
Conflicts:

	src/mesa/main/texcompress_s3tc.c
	src/mesa/tnl/t_array_api.c
2007-02-02 12:26:10 +00:00
Keith Whitwell
2ddc8799a8 Merge branch 'vbo-0.2-origin' into vbo-0.2 2007-02-02 11:06:37 +00:00
Keith Whitwell
47d463e954 Modify assert to reflect rebase criteria 2007-02-02 10:59:58 +00:00
Zou Nan hai
325196f548 push commit 2dfb3a217f to i915tex 2007-02-02 14:37:24 +08:00
Zou Nan hai
2dfb3a217f Fix fd.o #9686, when fall into vertex fog,
fog factors are precomputed in t_vb_fog.c compute_fog_blend_factors,
  which is incompatible with appended fragment fog code.
  That will make GoogleEarth display abnormally.
  always use pixel fog.
2007-02-02 09:35:17 +08:00
Roland Scheidegger
8ebda479d9 fix missing ADD_POINTERS, fixes crashes if the index elements are in a vbo. 2007-02-01 20:59:45 +01:00
Brian
af1d1e08e4 Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa 2007-02-01 07:22:50 -07:00
Brian
0930248bb1 fix mem leak in __glXReportDamage (Panagiotis Papadakos) 2007-02-01 07:22:25 -07:00
Keith Whitwell
5368ae5ec3 Correct usage/meaning of max_index parameter. 2007-02-01 14:21:14 +00:00
Keith Whitwell
605d428d20 Cope with internally-generated null inputs. 2007-02-01 14:20:31 +00:00
Michel Dänzer
8628b382e4 driDestroyDisplay: Fix comment, it is called now. 2007-02-01 10:45:51 +01:00
Michel Dänzer
bed026e7dd driDestroyDisplay: Remove Drivers list entry when dlclosing its handle.
This fixes a regression from commit f81b1dbe37:
Since then, driDestroyDisplay gets called from __glXFreeDisplayPrivate. It
dlcloses the handles associated with the display but fails to remove their
references from the Drivers list, so subsequent calls to OpenDriver return a
stale handle and an invalid createNewScreenFunc pointer. The attempt to call
the latter results in a segfault when running amoeba, e.g.
2007-02-01 10:43:10 +01:00
Roland Scheidegger
a2104dc6e1 fix unitialized values in radeonClear 2007-02-01 01:09:26 +01:00
Xiang, Haihao
5893474c74 _mesa_pack_rgba_span_float: fix for packing data into group 2007-01-31 09:47:02 +08:00
Keith Whitwell
893526b8a8 Use new rebase helper. Remove other rebase code. 2007-01-30 20:22:55 +00:00
Keith Whitwell
240641de0c Helper for rebasing draw requests where min_index != 0. 2007-01-30 19:27:53 +00:00
Keith Whitwell
48c638b671 New tests for the array functions which also provoke rebasing. 2007-01-30 19:19:51 +00:00
Brian
876e372567 regenerated 2007-01-30 08:13:49 -07:00
Brian
d2c62e6065 s/params/pointer/ for glGetVertexAttribPointer 2007-01-30 08:13:02 -07:00
Brian
8811a9e38a bump version to 6.5.3 2007-01-30 08:11:50 -07:00
Brian
fea6a8e1f1 s/params/pointer/ for glGetVertexAttribPointer 2007-01-30 08:10:03 -07:00
Brian
8be177a694 s/params/pointer/ for glGetVertexAttribPointer 2007-01-30 08:09:25 -07:00
Brian
832417f31e s/params/pointer/ for glGetVertexAttribPointer 2007-01-30 08:02:20 -07:00
Ben Skeggs
a4ddd64f36 nouveau: argh 2007-01-30 16:51:50 +11:00
Ben Skeggs
f9345c7c4e nouveau: misc NV40 fixes 2007-01-30 16:49:27 +11:00
Ben Skeggs
d2c4d9ff9b nouveau: NV40 glClipPlane support. 2007-01-30 16:41:55 +11:00
Ben Skeggs
ede8017d2c nouveau: rework shader param handling
Conflicts:

	src/mesa/drivers/dri/nouveau/nouveau_shader_0.c
2007-01-30 16:41:20 +11:00
Ben Skeggs
de0cf18b09 nouveau: oops, build attrib map after we know how the final shader will look.. 2007-01-30 16:39:31 +11:00
Ben Skeggs
2d8b316109 nouveau: remove an unused table 2007-01-30 16:39:05 +11:00
Ben Skeggs
7fbf8d3324 nouveau: oops 2007-01-30 16:38:46 +11:00
Ben Skeggs
cafbc459f5 nouveau: maintain a map of which vtxprog input corresponds to which array 2007-01-30 16:38:30 +11:00
Ben Skeggs
0c5b42a991 nouveau: unhardcode some more NV30TCL_FP_CONTROL values 2007-01-30 16:03:13 +11:00
Matthieu Castet
aa397fe472 nouveau : NOUVEAU_RING_TRACE
allow to print what we are really sending to the fifo.
2007-01-29 23:26:35 +01:00
Matthieu Castet
c97540065c nouveau : nv10 comment icomplete command 2007-01-29 23:19:12 +01:00
Matthieu Castet
c7c0a6ddcd nouveau : nv10 mixing cached stuff with not cached stuff is bad. 2007-01-28 23:26:21 +01:00
Ben Skeggs
b0e86b2dbd nouveau: fix nv30 line width 2007-01-28 22:55:35 +11:00
Ben Skeggs
aacea52181 nouveau: initial GL_ARB_occlusion_query support
Only enabled on NV40, NV20/NV30 code is untested.. However, NV30
should be identical to NV40.
2007-01-28 17:02:40 +11:00
Ben Skeggs
1879069eab nouveau: extend notifier interface to allow multiple notifiers in a memory block. 2007-01-28 16:35:32 +11:00
Claudio Ciccani
ea55de3d65 Updated copyright header.
Switched to LGPL (GPL header was a cut-&-paste mistake).
2007-01-27 19:32:05 +01:00
Brian
04d60ea54c note that non-member posts are auto-rejected 2007-01-27 06:25:31 -07:00
George Sapountzis
c00169fd25 Bug 9628: no entry for GetVertexAttribPointerv
This is because (in glX_API.xml) GetVertexAttribPointerv is aliased to
GetVertexAttribPointervARB which is then aliased to GetVertexAttribPointervNV.

Make GetVertexAttribPointerv alias GetVertexAttribPointervNV directly. Patch
by Ian Romanick <idr@us.ibm.com> and regenerate.
2007-01-27 09:12:57 +02:00
Brian
d8df84aae1 Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa 2007-01-26 19:08:58 -07:00
Brian
1b62353dd8 fix typo 2007-01-26 19:08:34 -07:00
Stephane Marchesin
0931e21eb6 nouveau: more work on nv04, this time buffer format/pitches/... 2007-01-27 03:08:01 +01:00
Brian
99c9bc386f document, re-indent _mesa_ffsll() 2007-01-26 19:01:55 -07:00
Brian
1d74e565db Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa 2007-01-26 18:55:12 -07:00
Eric Anholt
5a3d985395 Bug #9604: Fix a static buffer allocation failure.
The pool that the static buffer got allocated from was sized by pitch * height,
but the buffer generated from it had its size aligned to a tile boundary, so
allocation failed if pitch * height wasn't aligned.  However, the 2d driver
ensures that the size ends at a tile boundary, so just pass the 2d driver's
buffer size rather than calculating it.
2007-01-26 14:23:29 -08:00
Eric Anholt
869b8ad499 Add _mesa_ffsll() for compatibility on OSes without ffsll(), and use it. 2007-01-26 14:18:24 -08:00
Eric Anholt
dbb54b234c Remove dead code causing a warning. 2007-01-26 14:18:24 -08:00
George Sapountzis
507167d7e2 Override Const.CheckArrayBounds for Xserver in XMesaCreateContext().
This leaves one last XFree86Server ifdef in Mesa core.

---

Bug 9285: misc glcore, xmesa cleanups

ACKed by Ian Romanick.
2007-01-26 18:31:44 +02:00
George Sapountzis
c9b33ecd7c Drop old (pre-AIGLX) GLcore interface.
The old GLcore interface was replaced in Xorg 7.1 with the addition of AIGLX,
it is only used by DDX's which are known not to work with the new DIX glx code.

---

Bug 9285: misc glcore, xmesa cleanups

ACKed by Ian Romanick.
2007-01-26 18:31:00 +02:00
Zou Nan hai
c6c65e7b22 Merge branch 'master' of git+ssh://znh@git.freedesktop.org/git/mesa/mesa 2007-01-26 07:05:02 +08:00
Zou Nan hai
6aa62ba43f ARB_Occlusion_query should support multiple query at same time 2007-01-26 07:04:15 +08:00
Roland Scheidegger
38e9f8b6f2 do not rebase index buffers as it does not work currently (tested with r200 and sw mesa) 2007-01-25 18:52:40 +01:00
Roland Scheidegger
78b64d911b allocate larger minimum dstelt buffer
increase the minimum dstelt buffer size to avoid triggering an assertion later
because the split is triggered before the buffer is full. This fixes cases
where the vbo_split_copy path is hit because of maximum index limit, where the
dstelt buffer size needed could be very small (doom3 hit that assertion with a
vertex count of just 3)
2007-01-25 16:39:02 +01:00
Roland Scheidegger
db79d7dea0 fix dstelt memory allocation to avoid hash corruption 2007-01-25 14:32:06 +01:00
Roland Scheidegger
327462d901 remove tnl/t_vtx_x86_gcc.S file from sources as it no longer exists 2007-01-25 12:12:54 +01:00
Roland Scheidegger
5970400476 re-fix bug 9062 in vbo code 2007-01-25 12:11:03 +01:00
Ben Skeggs
d5db167c2c nouveau: unbreak NOUVEAU_RING_DEBUG 2007-01-25 15:12:49 +11:00
Ben Skeggs
86996dfe32 nouveau: add result scaling to shader backend, use it in RSQ emul for NV40. 2007-01-25 13:40:51 +11:00
Ben Skeggs
2d7687865e nouveau: and here's the "oops, I suck" commit :) 2007-01-25 12:08:49 +11:00
Ben Skeggs
42bd32dad7 nouveau: some extra debug output 2007-01-25 11:56:45 +11:00
Zou Nan hai
844e5610de 965 glxswapcontrol fix 2007-01-24 16:07:43 +08:00
Zou Nan hai
bdc5394d22 965 ARB_Occlusion_query fix 2007-01-24 15:47:15 +08:00
Brian
7e85b0a025 silence C++ warnings 2007-01-23 12:50:08 -07:00
Brian
18d1fdebeb fixes for C++ warnings/errors 2007-01-23 11:46:02 -07:00
Thomas Hellstrom
d46093b8d5 i915tex: Relocation fixes:
Increase the number of allowed relocations per batchbuffer.
Fix an assert to avoid an array index overflow.
(Reported by Steve Wilkins)
2007-01-23 09:06:21 +01:00
Thomas Hellstrom
fe9fef2cec i915tex: Fix randr resizing. Rotation still broken. 2007-01-23 09:06:21 +01:00
Ben Skeggs
60c28739aa nouveau: DPH and CMP for NV40 which doesn't do it natively. 2007-01-23 16:25:25 +11:00
Ben Skeggs
cf33bcf0b2 nouveau: allow for card-specific shader infos to be kept
NV30/40 fragprog: build FP_CONTROL per-shader, still some hardcoded bits for
                  this reg.. It looks like it has to do with the number of
		  temps used, but needs more looking at.
NV40 vtxprog    : build VP_IN_REG/VP_OUT_REG during shader compile
2007-01-23 16:07:12 +11:00
Ben Skeggs
a8b9d13f74 nouveau: fill in condition info for instructions 2007-01-23 13:36:45 +11:00
Ben Skeggs
ed69205684 nouveau: unbreak nv40 2007-01-23 11:06:16 +11:00
Ben Skeggs
50227f6fd2 nouveau: reindent shader pass0/pass2
if this gets rejected by the commit list, just ignore it..
nothing interesting to see here :)
2007-01-23 10:54:54 +11:00
Ben Skeggs
c3ac270996 nouveau: start converting shaders into a tree format again..
No branching stuff implemented yet.  Works enough for gears, probably
other stuff broken.
2007-01-23 10:54:54 +11:00
Jeremy Kolb
95fc270b06 Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/mesa 2007-01-21 20:47:10 -05:00
Jeremy Kolb
ea441355d3 nouveau: Fixes for nv30. 2007-01-21 20:30:31 -05:00
Stephane Marchesin
d1f0a55af4 nouveau: fix some bugs in the nv10 swtcl. 2007-01-22 00:12:05 +01:00
Stephane Marchesin
3c0961d299 nouveau: add nv04 state support, and small nv04 fixes. 2007-01-21 04:06:57 +01:00
Ben Skeggs
4f800c5bac nouveau: rename pass0_arb to pass0.
I was expecting to have 2 frontends for the shader code (asm, glsl).
With Brian's work on GLSL this is unnecessary :)
2007-01-21 09:48:33 +11:00
Ben Skeggs
029b81742a nouveau: kill off shader pass1.
It sucks, and we have someone who can do a much better job than I can starting
work on it soon.  alloc_temp/free_temp is left in pass2 to workaround fragprog
temps/outputs overlapping, but this all belongs in the optimiser.
2007-01-21 09:31:00 +11:00
Ben Skeggs
ee3d0617f9 nouveau: shader backend branching support for all cards that support it. 2007-01-21 09:13:27 +11:00
Ben Skeggs
669fefd3da nouveau: bump drm patchlevel 2007-01-19 15:39:36 +11:00
Patrice Mandin
3c59483ed7 nouveau: preliminary nv50 state 2007-01-18 22:07:17 +01:00
Aapo Tahkola
62efc4ba3e support as much of GL_EXT_stencil_two_side as we can. untested. 2007-01-18 05:56:13 +02:00
Aapo Tahkola
feeed10dfd typo fix. this case still fails. 2007-01-18 05:30:20 +02:00
Aapo Tahkola
a3b4b11739 Fix invalid enums passed to MapBuffer 2007-01-18 04:46:04 +02:00
Aapo Tahkola
2cb3594af9 Fix invalid enums passed to MapBuffer 2007-01-18 04:17:56 +02:00
Keith Whitwell
3bfbe63806 New debug config for linux-dri 2007-01-17 08:44:13 +00:00
Xiang, Haihao
747c9129c0 I965: fix bug#9625-get the correct PV for quardstrip
The order of vertices in payload for quardstrip is (0, 1, 3, 2),
so the PV for quardstrip is c->reg.vertex[2].
2007-01-17 10:39:50 +08:00
Xiang, Haihao
afba8f0d30 Fix bug#9673
Cast from pointer to unsinged long and cast to pointer from
 unsinged long
2007-01-17 10:17:10 +08:00
Stephane Marchesin
7c8f311e40 nouveau: Use the most recent card list. 2007-01-16 21:43:54 +01:00
Keith Whitwell
fea6e5a695 Don't special-case index, edgeflag.
Remove display list opcodes for INDEX and EDGEFLAG, handle them
through the regular ATTRIB mechanism now that Mesa understands them
to just be regular attribs.
2007-01-16 13:30:04 +00:00
Keith Whitwell
c53df49b8b Additional display list tests 2007-01-16 13:29:01 +00:00
Keith Whitwell
3ad12fab45 Merge vbo_0_1_branch
Hopefully leaving behind the cruft generated by the CVS import.
2007-01-16 11:24:08 +00:00
Keith Whitwell
6a3fdc3a1e Merge branch 'master' of git+ssh://keithw@git.freedesktop.org/git/mesa/mesa into vbo-0.2
Conflicts:

	src/mesa/array_cache/sources
	src/mesa/drivers/dri/i965/brw_context.c
	src/mesa/drivers/dri/i965/brw_draw.c
	src/mesa/drivers/dri/i965/brw_fallback.c
	src/mesa/drivers/dri/i965/brw_vs_emit.c
	src/mesa/drivers/dri/i965/brw_vs_tnl.c
	src/mesa/drivers/dri/mach64/mach64_context.c
	src/mesa/main/extensions.c
	src/mesa/main/getstring.c
	src/mesa/tnl/sources
	src/mesa/tnl/t_save_api.c
	src/mesa/tnl/t_save_playback.c
	src/mesa/tnl/t_vtx_api.c
	src/mesa/tnl/t_vtx_exec.c
	src/mesa/vbo/vbo_attrib.h
	src/mesa/vbo/vbo_exec_api.c
	src/mesa/vbo/vbo_save_api.c
	src/mesa/vbo/vbo_save_draw.c
2007-01-16 11:22:57 +00:00
Keith Whitwell
0b412f8f15 Merge branch 'vbo_0_1_branch' into vbo-0.2 2007-01-16 09:47:35 +00:00
Keith Whitwell
5363e3331b Merge branch 'master-merge' into vbo-0.2 2007-01-16 09:47:26 +00:00
Jerome Glisse
a03fc82771 mesa: Update _Current along Current on fragment program bound.
Same as a previously committed patch for vertex program, we
update fragment program ptr _Current along the Current one
so that _Current can't end up pointing to a no more valid
program.
2007-01-15 21:21:10 +01:00
Patrice Mandin
7520478eb0 nouveau:nv10: fix setting clip region 2007-01-15 18:58:24 +01:00
Keith Whitwell
584def75ad Remove unused index buffer. 2007-01-15 16:57:01 +00:00
Keith Whitwell
6ff9b48fe2 Don't special-case FOG attribute initialization.
Initial fog value was being set to {0,0,0,0}.  This results in vector
size 4, but isn't necessary.  The regular {0,0,0,1} works fine.
2007-01-15 14:30:16 +00:00
Keith Whitwell
50f76b9d9b Correctly initialize current attribute sizes.
Some legacy attributes (eg color) have an initial value other than {0,0,0,1}
which means that their initial size != 1 either.
2007-01-15 14:20:21 +00:00
keithw
82152a2a8e Remove debug, reenable inplace splitting. 2007-01-15 14:10:42 +00:00
Keith Whitwell
5464cd0a60 Split too-large draw commands.
Use the vbo_split_ functionality to split incoming drawing command
to fit within the fixed-size buffers used by software t&l module.
2007-01-15 13:54:08 +00:00
Keith Whitwell
2421b25dd7 Remove special-case handling for index and edgeflag
This isn't required with the changes to core mesa and the new
attribute layout.
2007-01-15 13:40:38 +00:00
keithw
1b7c24c33c Hook in split functionality 2007-01-15 11:58:06 +00:00
keithw
4557dfe132 Add vbo_split files 2007-01-15 11:54:40 +00:00
keithw
a38cb37913 New files to manage splitting drawing commands 2007-01-15 11:52:58 +00:00
Stephane Marchesin
4c7d36b688 nouveau: Fix a bug in the nv04 swtcl. 2007-01-15 12:38:24 +01:00
Ben Skeggs
16f35a3a22 nouveau: Add 0x0244 pciid manually for now..
pciids.sf.net is slow to add it so our generator picks it up,
and it's *really* annoying me :)
2007-01-15 17:28:56 +11:00
Ben Skeggs
634b4b3487 nouveau: fail CreateScreen on unknown cards instead of guessing. 2007-01-15 17:23:04 +11:00
Carlos Martín Nieto
89f91d1804 nouveau: Implement much of the fog handling. 2007-01-15 00:00:30 +01:00
Stephane Marchesin
e2295511f5 nouveau: Update nouveau_reg.h from renouveau to the latest version. 2007-01-14 22:39:37 +01:00
Stephane Marchesin
65e3d5e45e nouveau: Make the state cache hierarchical. 2007-01-14 21:17:08 +01:00
Stephane Marchesin
8d7e5651fb nouveau: add the nv04 swtcl module (it's untested for now). 2007-01-14 20:39:00 +01:00
Stephane Marchesin
d57ce408b3 nouveau: Cleanup the nv10 swtcl module. 2007-01-14 20:39:00 +01:00
Patrice Mandin
81bd826de8 nouveau: nv10: 16 bits color buffer format 2007-01-14 20:14:58 +01:00
Patrice Mandin
eae7acac16 Merge branch 'master' of git+ssh://pmandin@git.freedesktop.org/git/mesa/mesa 2007-01-14 19:56:30 +01:00
Patrice Mandin
8aabd636f5 nouveau: nv10: added missing functions 2007-01-14 19:55:45 +01:00
Jerome Glisse
9a4e49aef2 r300: Fix vertex program position invariant bug, force position reading.
When we have a position invariant program we need to force routing the
position otherwise you may handle transform quite random data which might
be funny but unlikely what you want :).
2007-01-14 19:32:22 +01:00
Jerome Glisse
6dd967e74f mesa: Update _Current ptr along Current when a new vertex program is bind.
On new vertex program bind only the Current ptr where updated to
point to the new program; this could lead to _Current pointing to
and out of date or even a no more existing program which in turn
could lead to a segfault in some driver. To avoid this _Current
ptr is updated along Current if _Current where previously pointing
to the same program.
2007-01-14 14:49:36 +01:00
Patrice Mandin
e7112be732 nouveau: remove already defined NV15_TCL and NV17_TCL 2007-01-14 14:11:10 +01:00
Patrice Mandin
86f10c7144 nouveau: import color material r,g,b,a 2007-01-14 14:09:04 +01:00
Patrice Mandin
faada2485a nouveau: nv10: stencil functions 2007-01-14 14:03:42 +01:00
Patrice Mandin
29484f24fb nouveau: nv10: currently fails initcard and bindbuffers, till done 2007-01-14 12:51:30 +01:00
Patrice Mandin
f1ad10b338 nouveau: nv10 blending done, remove nv10Viewport 2007-01-14 12:45:15 +01:00
Patrice Mandin
fb5f359b93 nouveau: update nv10 state 2007-01-13 14:14:19 +01:00
Patrice Mandin
308ef2dc32 nouveau: Add clear color for nv10 2007-01-13 13:56:18 +01:00
Patrice Mandin
ca75853f9d nv10 has alpha color mask 2007-01-13 13:22:03 +01:00
Jerome Glisse
b55f1ec9af Fix typo from commit 1d312ae013 . 2007-01-11 12:54:42 +01:00
Eric Anholt
3dd243c59e Track rename of DamagePost -> DamageAdd. 2007-01-09 16:39:10 -08:00
Roland Scheidegger
96c5db5f7a put back missing Driver.PolygonMode call (bug 9578) 2007-01-09 14:42:22 +01:00
Michel Dänzer
dfabf96607 i915tex: Remove unused tex_program field. 2007-01-09 12:46:50 +01:00
Michel Dänzer
92fb742065 intel_finalize_mipmap_tree: Only flush batchbuffer when necessary. 2007-01-09 12:46:50 +01:00
Keith Packard
d9dd9013a8 Merge branch 'origin' 2007-01-07 23:00:48 -08:00
Ben Skeggs
026939b008 nouveau: allow the use of multiple subchannels/objects by default. 2007-01-08 11:54:39 +11:00
Keith Packard
62db3cc349 Various warning fixes for i965 driver.
vertex/fragment programs provided as const.
bmSetFenceLock should return bmSetFence value.
2007-01-06 17:13:45 -08:00
Keith Packard
9311c29558 Initialize GL_ARB_occlusion_query only if DRM support is present.
DRM versions before 1.8 do not include the necessary ioctls to support
GL_ARB_occlusion_query, don't enable it on these versions.
2007-01-06 17:13:29 -08:00
Haihao Xiang
8c1cc5fd80 i965: Support linear format in i965.
Signed-off-by: Keith Packard <keithp@neko.keithp.com>
2007-01-06 15:44:57 -08:00
Zou Nan hai
ef02f8be10 i965: xdemos/glxthreads get: Assertion `block->fenced' failed (9201)
Signed-off-by: Keith Packard <keithp@neko.keithp.com>
2007-01-06 15:18:23 -08:00
Zou Nan hai
652ae2c376 i965: Take clip rects into account when computing max prim
Signed-off-by: Keith Packard <keithp@neko.keithp.com>
2007-01-06 15:18:23 -08:00
Wang Zhenyu
4068e2d1b7 i965: ARB_occlusion_query support
Signed-off-by: Keith Packard <keithp@neko.keithp.com>
2007-01-06 15:18:23 -08:00
Eric Anholt
1b9f78195f i965: Avoid branch instructions while in single program flow mode.
There is an errata for Broadwater that threads don't have the instruction/loop
mask stacks initialized on thread spawn.  In single program flow mode, those
stacks are not writable, so we can't initialize them.  However, they do get
read during ELSE and ENDIF instructions.  So, instead, replace branch
instructions in single program flow mode with predicated jumps (ADD to the ip
register), avoiding use of the more complicated branch instructions that may
fail.  This is also a minor optimization as no ENDIF equivalent is necessary.

Signed-off-by: Keith Packard <keithp@neko.keithp.com>
2007-01-06 15:18:23 -08:00
Eric Anholt
e54ec49155 i965: Connect INTEL_DEBUG=sync up to cmd/batch ioctls.
Signed-off-by: Keith Packard <keithp@neko.keithp.com>
2007-01-06 15:18:22 -08:00
Brian
f1fbaf39ff Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa 2007-01-06 14:55:07 -07:00
Brian
ade39f53f6 document 32-bit Z line/point fix 2007-01-06 12:58:28 -07:00
Brian
113b0a7f2e Use GLuint instead of GLint to store intermediate Z values. Fixes problems when using 32-bit Z buffer. 2007-01-06 12:55:17 -07:00
Eric Anholt
c2b185cff8 Add reporting of damage by DRI drivers when the extension support is available.
With this, tools like ximagesrc in gstreamer correctly see updates from GL
rendering.  Support requires that the Xdamage library be current (but will be
disabled if not present) plus a new X Server with support for the new
XDamagePost request.  libGL now has a new interface version, and also links
against libXdamage and libXfixes to support it, but backwards compatibility
is retained.

Currently, all drivers report damage at SwapBuffers time through common code --
front buffer rendering doesn't result in damage being reported.  Also, the
damage is against the root window, as our drivers don't yet render to backing
store when they should (composited environments).
2007-01-05 18:23:57 -08:00
Brian
b530d96216 Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa 2007-01-05 08:42:45 -07:00
Brian
24cf67fc73 document VBO bug fix 9445 2007-01-05 08:41:16 -07:00
Brian
7da7404fdf Fix glPush/PopClientAttrib() for VBO state (bug 9445). 2007-01-05 08:40:06 -07:00
Ian Romanick
16f0efca60 Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/mesa/mesa 2007-01-04 18:37:10 -08:00
Ian Romanick
5ca107a4f2 Use glxbyteorder.h in server-side source files. 2007-01-04 14:53:48 -08:00
Ian Romanick
6d29e1de73 Hack indent flags for indirect_reqsize.h to eliminate extra diffs. 2007-01-04 14:52:53 -08:00
Ian Romanick
92be800146 Add missing files to server generation list.
The files indirect_reqsize.c and indirect_reqsize.h were missing from
the list of files to be generated for the server.  Add them back to
the list.  Also, update the INDENT_FLAGS to prevent conversion of
'GLbyte *pc' to 'GLbyte * pc' in function prototypes.
2007-01-04 14:47:41 -08:00
Jerome Glisse
1d312ae013 r300: Correct bug introduced by fragprog rework.
Thx for Tilman who spoted the bugs.
2007-01-04 20:31:35 +01:00
Brian
8d287d0f5e s/unsigned/size_t/ (Matthias Hopf) 2007-01-04 07:53:32 -07:00
Patrice Mandin
bbfd963f49 Update spot light params 2007-01-02 14:31:16 +01:00
Ben Skeggs
254ce75ac3 nouveau: bump drm patchlevel. 2007-01-02 15:59:05 +11:00
Dave Airlie
b6becfae10 fix issue with i915tex advertising visuals it can't support
This may not be the proper way to fix this but it does work easily.
2006-12-31 10:01:17 +11:00
Haihao Xiang
3943d7f8b1 Use the tiled flag in the sarea to determine region tiling.
This fixes mis-rendering if back/depth fail to get set up as tiled.  While it
probably won't ever be the case now that the pitch limits are loosened, this is
still the right thing to do.
2006-12-30 10:30:42 -08:00
Ben Skeggs
8c180c72d5 nouveau: Use bufferobj interface for fragment program uploads 2006-12-27 23:53:26 +11:00
Ben Skeggs
9a20ae70ec nouveau: Initial buffer object support 2006-12-27 23:53:25 +11:00
Ben Skeggs
1780fd4eee nouveau: We'll need syncNotifier for NV_MEMORY_TO_MEMORY_FORMAT too. 2006-12-27 23:53:25 +11:00
Ben Skeggs
885a7cc38d nouveau: add nouveau_mem_alloc/free debugging 2006-12-27 23:53:25 +11:00
Ben Skeggs
2dd3753450 nouveau: record *actual* type of memory that was alloc'd, not the requested types. 2006-12-27 23:53:25 +11:00
Ben Skeggs
7b59a424b5 nouveau: Typo 2006-12-27 23:53:25 +11:00
Ben Skeggs
297a35eb69 nouveau: Add simple wrapper for NV_MEMORY_TO_MEMORY_FORMAT. 2006-12-27 23:53:25 +11:00
Jerome Glisse
2dccca57e4 Deleted unused file which likely have be reintroduced during git move.
This file was deleted longtime ago, guess that git migration
created it again.
2006-12-26 18:42:17 +01:00
Ben Skeggs
257e3d1d59 nouveau: Make use of NOUVEAU_DEBUG for shader disasm 2006-12-26 22:03:12 +11:00
Ben Skeggs
3fcb7d388d nouveau: Make the notifier stuff actually work.. 2006-12-26 21:36:15 +11:00
Ben Skeggs
0b2b2de6cf nouveau: Wait on notifier to check for completion of previous commands.
We can't wait on NV_PGRAPH_STATUS.  We don't have the regs mapped, and there's
no guarantee that we'll catch PGRAPH idle when multiple channels are active.
2006-12-26 21:36:15 +11:00
Ben Skeggs
c0a63d8e5e nouveau: Add notifier support functions 2006-12-26 21:36:15 +11:00
Jerome Glisse
b8769f318f Rework r300 fragprog avoid using bitfield structure.
It seems that bitfield structure lead to some strange
problem on 64bits arch, don't want to waste time debugging
strange things like that so converted pfs_reg_t structure
to a GLuint and use good old masking and shifting spell.
(cherry picked from 2a7de9d095d8e60da12b11aaa1efe664b87b11d3 commit)
2006-12-25 23:40:20 +01:00
Ben Skeggs
d79323bd42 nouveau: Kill some compile warnings. 2006-12-24 00:50:13 +11:00
Ben Skeggs
f54c725497 nouveau: Modify span routines to use nouveau_renderbuffer instead of driRenderbuffer 2006-12-24 00:13:34 +11:00
Ben Skeggs
cb6a400dcd nouveau: maintain numClipRects/pClipRects in context. 2006-12-23 23:51:24 +11:00
Ben Skeggs
ae8d8d1326 nouveau: Don't fill nrb->dPriv for private buffers 2006-12-23 23:03:55 +11:00
Ben Skeggs
1dd6759c05 nouveau: get 16bpp working 2006-12-23 10:56:19 +11:00
George Sapountzis
b766643e5c Drop mesa wrappers for XFree86. 2006-12-21 19:41:08 +02:00
Sean D'Epagnier
af0190bc6e Updated keyboard input so that glut programs can read from stdin without
problems if tty input is used.  Also corrected a few stdin keycodes.
2006-12-21 01:50:33 -07:00
Dave Airlie
e3358dea66 Merge branch 'nouveau-import' 2006-12-20 09:30:32 +11:00
Ben Skeggs
53d40646bd Don't build passthrough shader on <NV40 2006-12-17 03:38:21 +00:00
Brian
b497a0cb7c Don't update span->array->z[] values from SLANG_FRAGMENT_FIXED_FRAGDEPTH.
This restores the behaviour of Mesa 6.5.1, fixing a regression in 6.5.2.
See bug 9345.  Revisit someday...
2006-12-16 11:17:41 -07:00
Brian
6ec4a03b9f initial release notes for 6.5.3 2006-12-16 11:09:14 -07:00
Brian
6d982e53ee don't allow fog when using a fragment shader (bug 9346) 2006-12-16 11:07:00 -07:00
Ben Skeggs
de947e8a5b Get nv10_swtcl.c working enough for glxgears on NV40. 2006-12-16 12:32:11 +00:00
Gary Wong
24a495fd77 Fix copy-and-paste mistake in comment ("scaling" should read "translation").
Before _mesa_Translatef().
2006-12-15 17:18:36 -05:00
Ben Skeggs
c340dd7d84 NV1x/2x hw_func stubs. 2006-12-15 21:02:23 +00:00
Brian
0ae7404835 Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa 2006-12-14 15:20:15 -07:00
Brian
5cc1292508 Replace __extension__ with LONGSTRING. 2006-12-14 14:27:05 -07:00
Brian
b56a5261fe Check in a long-misplaced spec update. 2006-12-14 09:38:06 -07:00
Michel Dänzer
fde908444a Fix copy-and-paste-o of my e-mail address. 2006-12-14 12:57:59 +01:00
Michel Dänzer
e0c9361a7c Avoid failing assertion in intel_miptree_set_image_offset() with cube maps.
Cube maps still aren't working quite correctly though.
2006-12-14 12:47:44 +01:00
Michel Dänzer
81855f22cd Fix some corner cases in i945_miptree_layout_2d().
Based on a patch from Keith Whitwell, with some further fixes.
2006-12-14 12:42:51 +01:00
Michel Dänzer
3416ef303a Share code to lay out >= 945 style 2D mipmaps between i915tex and i965 drivers.
Use the i965 version as it has some fixes over the i915tex version.
2006-12-14 12:39:38 +01:00
Michel Dänzer
cc1afed671 intel_finalize_mipmap_tree: Add more conditions for rebuilding mipmap trees.
These are taken from the i965 driver and fix corruption of some mipmap levels
under some circumsances with 945 chipsets at least.

Also flush the batchbuffer after copying data between trees, or some apps fail
an assertion elsewhere.
2006-12-14 11:04:10 +01:00
Michel Dänzer
5f8a3e586f intel_batchbuffer_flush: Don't assert cliprects when lock is not held.
This is a legitimate situation when copying texture data between mipmap trees.
2006-12-14 11:01:39 +01:00
Michel Dänzer
4cb09df015 intelTexSubimage: Fix last parameter for intel_miptree_image_map(). 2006-12-14 11:01:38 +01:00
Michel Dänzer
9c09259b8b _mesa_swizzle_ubyte_image: Only use single swizzle_copy call when strides match.
This fixes texture data corruption with glTexSubimage (and probably glTexImage
under some circumstances) with the texstore swizzle path.
2006-12-14 11:01:38 +01:00
Michel Dänzer
78a6e05439 mipmap_limits: Fix display of current texture filtering mode. 2006-12-14 11:01:38 +01:00
Ben Skeggs
99878298da Improve SwapBuffers a bit. 2006-12-14 04:34:38 +00:00
Ben Skeggs
c95557f48b 0x4497 doesn't have NV30_TCL_PRIMITIVE_3D_NORMALIZE_ENABLE 2006-12-14 04:12:05 +00:00
Ben Skeggs
15c7e8896b Some more voodoo to get 3D going with a minimal initial context. 2006-12-14 03:24:57 +00:00
Roland Scheidegger
2956a0c8a8 submit vertex weights to make World of Warcraft maybe happy (bug 8250)
submit the vertex weights to hw, which will enable broken vertex programs
errorneously using them to work. Note however that this will only work
if glWeight is used, there is no code in mesa at all to deal with weight
vertex array (glWeightPointerARB).
2006-12-14 00:34:44 +01:00
Brian
8dcfcad7a2 Move all the code for computing ctx->_TriangleCaps into state.c.
ctx->_TriangleCaps should probably go away altogether someday...
2006-12-13 15:31:14 -07:00
Brian
6c305c0831 Remove the xdemo.c program from PROGS since it doesn't work with GLX/DRI. 2006-12-13 08:57:06 -07:00
Brian
73eee2402e Use XDisplayName() when reporting errors (bug 8079). 2006-12-13 08:30:26 -07:00
George Sapountzis
5b35132b41 Bug 7260: mach64 texture memory mng cleanup
mach64 uses its own set of texture memory management routines which are buggy,
running a second DRI client kills the first one. This patch ports mach64 code
to the stock dri texture managment code.
2006-12-12 12:51:37 +02:00
George Sapountzis
c180678d92 Bug 7861: mach64 with render acceleration should restore texture state
RENDER acceleration uses texturing, thus when RENDER acceleration is enabled,
the mach64 DRI driver should restore texture state when acquiring the DRI lock.
2006-12-12 12:51:33 +02:00
George Sapountzis
eed1a6de4b Bug 7790: Polygons incorrectly clipped by mach64 driver
un-break strict-aliasing rules
2006-12-12 12:51:27 +02:00
Michel Dänzer
26626c0052 minstall: Pass correct destination file path to $RM regardless of source path. 2006-12-11 17:45:06 +01:00
Michel Dänzer
d71a5647a3 minstall: Always remove destination file before (re-)creating it.
This avoids issues with overwriting files that are being used.
2006-12-11 17:36:35 +01:00
Eric Anholt
d7b24fec24 i965: Fix a crash with wine by not allocating >1MB on the stack. 2006-12-09 22:35:07 -08:00
Patrice Mandin
aadcf1a9ff Update spot light params also for nv20 and nv30 2006-12-08 18:56:51 +00:00
Patrice Mandin
5c80270b91 grr, always check twice before commit 2006-12-08 16:40:34 +00:00
Patrice Mandin
65c54a685a Resend spot light parameters when part of it changes 2006-12-08 16:39:12 +00:00
Ben Skeggs
c04c74bc5d Skeletal extension handling across chipsets. 2006-12-08 14:12:47 +00:00
Ben Skeggs
fe91d00e33 NV_44 uses nv30InitStateFuncs too 2006-12-08 12:36:26 +00:00
Ben Skeggs
046ece3a2d state cache is automagically flushed on a normal BEGIN_RING_SIZE 2006-12-08 11:51:50 +00:00
Ben Skeggs
e62b2f9c2e Implement a simple nv30Clear, and make sure we get a nouveau_renderbuffer
for the depth buffer and not a Mesa renderbuffer adaptor
2006-12-08 11:45:39 +00:00
Xiang, Haihao
f79360858d fix bug#9237 2006-12-08 17:05:14 +08:00
Xiang, Haihao
5449f5a975 fix bug#9045 2006-12-08 17:00:59 +08:00
Ben Skeggs
bda66ac426 oops, typo 2006-12-08 07:27:39 +00:00
Ben Skeggs
011377622f Create visuals for modes the ddx provides 2006-12-08 07:15:43 +00:00
Ben Skeggs
1d6f13986c oops, we don't want this by default just yet... 2006-12-08 03:04:10 +00:00
Ben Skeggs
4cfb762c3e Some work on buffer handling, most likely not entirely correct and
incomplete. But, it works well enough that windows can be
    moved/resized.
2006-12-08 03:01:33 +00:00
Michel Dänzer
7a10d66590 i915tex: Recalculate viewport related hardware state in intelWindowMoved().
This fixes vertically displaced rendering with some apps like Google Earth.

Simplify other parts of the function somewhat.
2006-12-07 11:03:48 +01:00
Michel Dänzer
94136651c3 Make git ignore Emacs backup files. 2006-12-06 18:39:05 +01:00
Brian
fcc54b5d34 Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa 2006-12-06 08:20:57 -07:00
Brian
7f82674a7e Updated with new mesa-commit list. 2006-12-06 08:20:03 -07:00
Michel Dänzer
75e4cfd997 Make git ignore some more generated files. 2006-12-06 15:14:43 +01:00
Michel Dänzer
b46e359f58 glxinfo: When direct rendering is not enabled, print some hints.
If indirect rendering is forced, say how. Otherwise, suggest setting
LIBGL_DEBUG=verbose.

Inspired by http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=379323 .
2006-12-06 14:54:43 +01:00
Michel Dänzer
14f92636b0 Make git ignore files only generated at build time. 2006-12-06 14:17:56 +01:00
Michel Dänzer
7daf301046 Re-generate options.h with Swedish translations. 2006-12-06 14:06:52 +01:00
Daniel Nylander
e8c5e0f0b4 Swedish translation of driconf options. 2006-12-06 13:21:02 +01:00
Brian
eb9033c723 Replaced by .html file. 2006-12-05 16:36:35 -07:00
Brian
4a1976b224 Replaced by .html files. 2006-12-05 16:36:12 -07:00
Brian
492e406fec Removed/obsolete. 2006-12-05 16:27:31 -07:00
Brian
d43ccf61c2 New git repository info, links. 2006-12-05 16:14:39 -07:00
Brian
464e36391f New info about Mesa's git repository. 2006-12-05 16:14:14 -07:00
Stephane Marchesin
3867bc9780 Fix the swtcl module. 2006-12-03 11:46:18 +00:00
Patrice Mandin
f95fe81fff Remove duplicate nv10 tcl defines 2006-12-03 10:08:04 +00:00
Stephane Marchesin
d88d895e5a Merge the pciid work. Use lock step versioning with the drm. 2006-12-03 09:08:26 +00:00
Ben Skeggs
b4dcb99cbc Fix a copy+paste'o that caused some *very* strange bugs.. 2006-12-03 02:01:49 +00:00
Brian Paul
45b211f9d4 version bump 2006-12-02 19:26:01 +00:00
Brian Paul
4f3ff14a06 md5 sums 2006-12-02 19:22:16 +00:00
Ben Skeggs
98818f159b - Add InitInstruction to hw shader backend, and remove SetUnusedSource.
- NV30FP/NV40VP: Clear any fields before we OR new values into them
- NV40VP: It seems that it might be possible to write a result reg at the
    same time a temp is written. In InitInstruction, initialise OUT_DEST to
    OUT_DEST_TEMP so result regs don't get clobbered by default.
2006-11-27 01:57:37 +00:00
Ben Skeggs
2f411b0a8b Fix RSQ emulation 2006-11-26 13:18:41 +00:00
Ben Skeggs
6ff3d2577e Fix progs/fp/tri-xpd
Fragprog consts are inlined, so make sure we update *all* occurances of a
    param :)
2006-11-26 10:19:44 +00:00
Ben Skeggs
9c9e6abbf8 Incomplete shader stuff, should mostly work for NV40. Other cards, not so
much..
2006-11-25 09:58:35 +00:00
Ben Skeggs
902b26a0d6 fix scissor 2006-11-25 06:02:10 +00:00
Patrice Mandin
2911551727 nv10,nv20,nv30: send correct values for spot light direction X,Y,Z and
cutoff parameter C
2006-11-24 23:34:03 +00:00
Patrice Mandin
78e5f414cb nv10: rename spot light coefs like nv20,nv30 2006-11-24 23:23:18 +00:00
Stephane Marchesin
0faf23c26a That was really stupid. 2006-11-23 09:21:44 +00:00
Ben Skeggs
7398748add Some missing state init 2006-11-22 20:15:56 +00:00
Patrice Mandin
3e4a5c0642 Enable nv10 tcl state 2006-11-21 21:44:16 +00:00
Patrice Mandin
ac09b567a8 nv10,nv20: nvX0ShadeModel static function 2006-11-21 21:15:49 +00:00
Patrice Mandin
677666eb70 nv10,nv20,nv30: color light components renamed from a,b,c to r,g,b 2006-11-21 21:11:58 +00:00
Patrice Mandin
81ae0bd249 ah, correct revision now 2006-11-21 20:38:14 +00:00
Patrice Mandin
4ed78e20a4 update from renouveau 2006-11-21 20:29:09 +00:00
Patrice Mandin
b5e800068b nv10: update state 2006-11-21 19:56:15 +00:00
Ben Skeggs
a75440bcf0 nouveauCreateDmaObject 2006-11-21 14:03:06 +00:00
Stephane Marchesin
fb65450704 Remaining state cache changes 2006-11-21 13:07:48 +00:00
Stephane Marchesin
0ea45b1ad8 Add the state caching mechanism. It seems to work, from what I can see. 2006-11-21 12:43:16 +00:00
Jeremy Kolb
a20cf73053 More state. 2006-11-21 02:47:13 +00:00
Jeremy Kolb
afb49fef90 Add state initialization to context creation. 2006-11-20 17:25:54 +00:00
Keith Whitwell
dd60eaa6d9 Don't perform dangling attribute check on POS attribute. It can't by
definition dangle (every vertex has a position).  However
save->currentsz isn't properly maintained for this attribute, as there
is no current position value to track.  Based on patch from Haihao Xiang.
2006-11-20 11:49:58 +00:00
Stephane Marchesin
50c85daf02 Cleanup the swtcl code. 2006-11-19 23:47:24 +00:00
Stephane Marchesin
ac208c95cd Use NONINC_METHOD for vertex data. 2006-11-19 23:39:16 +00:00
Stephane Marchesin
4165a10972 More work on the swtcl 2006-11-19 23:16:29 +00:00
Stephane Marchesin
fe2e6100ec More fifo debug fixes 2006-11-19 22:16:54 +00:00
Stephane Marchesin
a8d34992ea Oops. 2006-11-19 21:51:28 +00:00
Stephane Marchesin
3613eba085 Fix the fifo debugging feature. 2006-11-19 21:29:41 +00:00
Stephane Marchesin
327e2c9220 New swtcl implementation. It's simpler than the previous one (doesn't use
templates) and it is probably faster as well
2006-11-19 20:18:45 +00:00
Ben Skeggs
a7139168d2 Don't bother touching lighting stuff if shaders are in use 2006-11-19 16:05:59 +00:00
Ben Skeggs
80a0ce37df Fix nv30LineWidth, hw expects a ubyte. 2006-11-19 15:52:18 +00:00
Ben Skeggs
a2a747704d Avoid sharing subchannels with the ddx until context switching is done
properly..
2006-11-19 15:46:31 +00:00
Ben Skeggs
b3fd1556f9 More FIFO fixes. 2006-11-19 15:45:36 +00:00
Ben Skeggs
08a0946fcc Stupid bug.. 2006-11-19 14:10:54 +00:00
Ben Skeggs
82d0fd26d4 poke the correct FIFO regs 2006-11-19 12:00:59 +00:00
Stephane Marchesin
ae9c633a21 More state functions 2006-11-18 00:36:22 +00:00
Stephane Marchesin
e722e3480f Add nv20_state.c ; hook nv10_state.c into the build ; do the renaming
required by the renouveau changes.
2006-11-18 00:19:22 +00:00
Stephane Marchesin
8532b6e0a5 Small unneeded nv03 fix 2006-11-17 22:11:13 +00:00
Ben Skeggs
08020927e8 Use RENDERINPUTS macros to access render_inputs_bitset 2006-11-17 21:58:02 +00:00
Ben Skeggs
10172f7485 Adapt FIFO code to deal with cases where the base GET/PUT value isn't 0. 2006-11-17 04:50:37 +00:00
Ben Skeggs
9daf0812a1 jkolb pointed out that face can also be FRONT_AND_BACK. Added stencil funcs 2006-11-16 23:43:39 +00:00
Ben Skeggs
0da68e2e6e Add nv30InitStateFuncs 2006-11-16 23:24:20 +00:00
Patrice Mandin
9021df2d2a nv10 state copy/pasted from nv30 state 2006-11-16 19:50:56 +00:00
Ben Skeggs
47695f0689 Fix segfault in nouveauCalcViewport 2006-11-13 16:01:03 +00:00
Jeremy Kolb
d5d00cf8c9 Add include guard. 2006-11-12 18:18:02 +00:00
Ben Skeggs
2af374716f Some more nouveau_screen.c setup, not sure how correct it is yet though.. 2006-11-12 08:38:44 +00:00
Ben Skeggs
b8e05366e1 We need nmesa->driFd and friends setup before we call nouveauFifoInit 2006-11-12 02:06:30 +00:00
Ben Skeggs
6464787bfd Dont call exit() from the DRI driver, with AIGLX this is particularly nasty 2006-11-12 02:05:40 +00:00
Ben Skeggs
d037c84c33 fix typo 2006-11-11 20:00:29 +00:00
Stephane Marchesin
f65a4b8a8d Some nouveau_screen work for darktama 2006-11-11 18:25:00 +00:00
Jeremy Kolb
4f61fd18b2 Fill in nv30PointSize and nv30Viewport. 2006-11-11 16:48:14 +00:00
Stephane Marchesin
994ea9556f Fix the texture init function name 2006-11-11 12:01:48 +00:00
Stephane Marchesin
0850289d8c Add the GL_LIGHING enable 2006-11-11 11:25:08 +00:00
Stephane Marchesin
f82bc9110b Some work on nv30 state, heavily based on jkolb's work 2006-11-11 00:00:45 +00:00
Stephane Marchesin
20802a7b69 Commit a small nitpick 2006-11-07 17:37:22 +00:00
Stephane Marchesin
e2b4d9b317 Architect the DRI :
- make use of the autogenerated nouveau_reg.h file
- add object creation to the DRI
- some work on screen and context creation
2006-11-05 13:46:48 +00:00
Keith Whitwell
188a4db49c Fix compiler warnings.
Add missing code for translating non-GLuint elements.
2006-11-03 13:04:08 +00:00
Roland Scheidegger
c3da1501b8 need to call bind_arrays() in vbo_exec_DrawRangeElements. 2006-11-03 12:33:29 +00:00
Roland Scheidegger
25b2e50229 remove remaining traces of r200FlushVertices... 2006-11-03 12:30:55 +00:00
Jerome Glisse
a93f4a7310 Move r300 to new fbo interface based on Keith Whithwell.
Tested with progs/redbook/varray.
2006-11-02 20:44:03 +00:00
Keith Whitwell
7e9c3684ef Fix type-conversion of incoming vertices.
Fix mis-application of increment to pointer variable.
2006-11-02 19:11:16 +00:00
Keith Whitwell
01e238e5d5 Fix typo in last commit 2006-11-02 19:02:04 +00:00
Keith Whitwell
301acdf34a Similarly, fill in missing input slots in the vertex-array +
NV_vertex_program path.
2006-11-02 18:02:17 +00:00
Keith Whitwell
5a652f5957 Fill in missing input slots in the vertex-array + no-vertex-program
path.
2006-11-02 18:00:43 +00:00
Alan Hourihane
6d104cb932 merge current trunk into vbo branch 2006-11-02 12:02:13 +00:00
Keith Whitwell
18d52f96bb Fix typo in display list attrib binding. 2006-11-02 11:40:56 +00:00
Keith Whitwell
9827dc8bea Respect array->Normalized flag.
Import edgeflag attribute to array of GLbooleans as expected by
downstream code.
2006-11-02 09:48:30 +00:00
Keith Whitwell
c22f8a7787 missing file 2006-11-02 08:37:17 +00:00
Jeremy Kolb
1ebe921228 Added OUT_RING* debugging macros. Compile with NOUVEAU_RING_DEBUG to use. 2006-11-01 02:48:34 +00:00
Jeremy Kolb
2d2d617dbc Oops. Forgot to check in the context change. 2006-11-01 02:45:12 +00:00
Jeremy Kolb
2581ba7f1e Fix compile errors. Add vblank_seq to nouveau_context. 2006-11-01 02:44:27 +00:00
Keith Whitwell
35ee4affc5 switch remaining drivers over to vbo 2006-10-31 12:12:15 +00:00
Keith Whitwell
851d15ef3a disable vtxfmt_a code, switch over to vbo 2006-10-31 12:11:56 +00:00
Keith Whitwell
80c88304fc remove vtxfmt code, switch over to vbo 2006-10-31 12:11:10 +00:00
Keith Whitwell
70dd0126bd pickup structs from vbo.h 2006-10-31 11:40:31 +00:00
Keith Whitwell
1f07439fe8 move public structure definitions to vbo.h 2006-10-31 11:39:57 +00:00
Keith Whitwell
f2eb6434ab cleanup code, compiles with vbo changes 2006-10-31 11:28:45 +00:00
Keith Whitwell
a1a8a2c024 oops, get.c is autogenerated 2006-10-30 20:29:13 +00:00
Keith Whitwell
fd2756006a Move edgeflag into the VERT_ATTRIB_SEVEN slot. This means that our
NV_vertex_program implementation has slightly incorrect aliasing
behaviour.  I think this is reasonable given the simplification and
the fact that the mainstream ARB_vp continues to have the correct
behaviour.
2006-10-30 20:16:35 +00:00
Keith Whitwell
e8abd098b3 Remove wakeup functions. This code is intended to be active all the
time.
2006-10-30 17:12:05 +00:00
Keith Whitwell
48f5deab94 switch several dri drivers over 2006-10-30 16:56:56 +00:00
Keith Whitwell
99efde461d better handling of current attributes. Trivial dlist and varray tests work 2006-10-30 16:44:13 +00:00
Keith Whitwell
efef291dc7 checkpoint - remove dead files, otherwise untested 2006-10-30 16:43:39 +00:00
Keith Whitwell
a3c86828ed Fix compiler warning 2006-10-29 09:54:17 +00:00
Keith Whitwell
0a0fb5e0b3 switch over to vbo module 2006-10-29 09:52:36 +00:00
Keith Whitwell
72b68455eb remove this module 2006-10-29 09:48:36 +00:00
Keith Whitwell
b1f176039a Changes for new vbo-building module.
- Removed all the old immediate, array and display list code.
	- Remove references to the old array_cache module.
	- Added a _tnl_draw_prims() entrypoint.
	- Added a simplified data import facility for converting
non-floating point data as required.

Checkpoint commit - trivial/tri works.
2006-10-29 09:48:15 +00:00
Keith Whitwell
fd12b37dba Checkpoint of new vbo-building code. Currently builds regular arrays
rather than VBO's - VBOs are easy but need to look closer at the
driver interface.  The trivial/tri demo works.
2006-10-29 09:46:11 +00:00
Ben Skeggs
a05db7f505 Kill all the current shader code. 2006-09-24 13:16:23 +00:00
Stephane Marchesin
7d907ef69c Some small changes 2006-09-17 17:46:36 +00:00
Stephane Marchesin
473a38622e Rename nouveau_tris.* to nouveau_swtcl.* 2006-09-17 15:30:40 +00:00
Stephane Marchesin
c67f545520 Small changes 2006-09-17 14:36:07 +00:00
Stephane Marchesin
e324c52237 Make nouveau actually compile 2006-09-17 12:09:11 +00:00
Stephane Marchesin
908388b118 Some work towards making the nv10 swtcl compile 2006-09-17 11:58:52 +00:00
Patrice Mandin
ae481e1560 oops, time to go to bed 2006-09-08 23:19:45 +00:00
Patrice Mandin
ddaf3060fa nv10: vertex attribute output format 2006-09-08 23:18:27 +00:00
Patrice Mandin
cdd433b29b more macros, still missing the alloc_verts one 2006-09-08 21:52:25 +00:00
Patrice Mandin
1961611247 reimport sw stuff 2006-09-08 21:41:58 +00:00
Patrice Mandin
7a968481a0 render_primitive macro 2006-09-08 21:34:47 +00:00
Patrice Mandin
07d4c63ddc vert_copy_spec macro 2006-09-08 21:30:32 +00:00
Patrice Mandin
ad0f655376 vert_copy_rgba macro 2006-09-08 21:27:17 +00:00
Patrice Mandin
6f0388ec71 basic primitives 2006-09-08 21:23:04 +00:00
Patrice Mandin
179c1013d2 Remove useless reference to fifo_num field 2006-09-08 20:17:59 +00:00
Ben Skeggs
6d1f98da2b A couple of quick fixes, the original had some half-finished
modifications..
2006-06-03 17:15:50 +00:00
Ben Skeggs
ac9d1ecec2 Another TODO, so I don't forget.. 2006-06-03 16:37:46 +00:00
Ben Skeggs
5411b96c5f Add start of vertex shader backend, will most likely not work correctly yet 2006-06-03 16:36:23 +00:00
Jeremy Kolb
13a2d6698f More context. 2006-04-17 15:20:29 +00:00
Jeremy Kolb
ddf936193a Changed invalid context fields to valid ones. 2006-04-17 00:08:03 +00:00
Jeremy Kolb
a7d8885768 State changes. 2006-04-15 00:21:44 +00:00
Stephane Marchesin
b0c4cfed60 More work on the tcl code... still have to make my mind on a number of
things
2006-04-14 23:47:45 +00:00
Jeremy Kolb
97d11ecd6c Add more feilds to context. 2006-04-14 23:02:39 +00:00
Stephane Marchesin
911ec211a5 ooops 2006-04-14 22:59:33 +00:00
Stephane Marchesin
4c850f346b Added render index field to the context 2006-04-14 22:58:30 +00:00
Jeremy Kolb
576b3433da Cleaning 2006-04-14 22:50:14 +00:00
Stephane Marchesin
4b2d8b46c8 Silence the lock warning 2006-04-14 22:48:03 +00:00
Stephane Marchesin
b7d4314fe1 Added vertex attributes to the context 2006-04-14 22:43:44 +00:00
Stephane Marchesin
199512968b Cleaned stuff in the tcl code 2006-04-14 22:41:16 +00:00
Jeremy Kolb
5fd11335f6 Added the beginnings of state (not much there yet). Fixed some includes. 2006-04-14 17:39:43 +00:00
Jeremy Kolb
f799745f50 Some compile fixes. 2006-04-13 17:03:51 +00:00
Stephane Marchesin
1c0230b396 Cleaned up some code, made more files compile. Renamed nv20_swtcl.* to
nv10_swtcl.*, hopefully this is the last rename (this should be, as
    NV05 really behaves differently).
2006-03-13 11:30:41 +00:00
Stephane Marchesin
9ebde216cc A little work here and there 2006-03-10 01:43:39 +00:00
Stephane Marchesin
2560e65a9a Added a missing field 2006-03-07 00:56:30 +00:00
Stephane Marchesin
5569c2dfae Cleaned up the software TCL code a bit. Renamed nv30_tris.[c,h] to
nv20_swtcl.[c,h].
2006-03-06 15:32:31 +00:00
Stephane Marchesin
98e1b13802 Added some NV20 support - nv_30_tris.c should probably be renamed again. 2006-03-06 12:23:24 +00:00
Stephane Marchesin
b9c4b7fc89 More work on the nv30 software tcl code 2006-03-06 01:46:24 +00:00
Stephane Marchesin
4af665a843 Rename nouveau_3d_reg.h to nouveau_reg.h 2006-03-03 16:10:28 +00:00
Stephane Marchesin
84a20832f1 rename nv40_tris to nv30_tris. 2006-03-03 16:08:59 +00:00
Stephane Marchesin
0e7e80ae10 Some small improvements. 2006-03-02 00:42:37 +00:00
Stephane Marchesin
bb390133b5 Import 2006-02-23 12:55:56 +00:00
Stephane Marchesin
0abf3937ce Initial revision 2006-02-23 12:55:56 +00:00
521 changed files with 30929 additions and 30562 deletions

8
.gitignore vendored Normal file
View File

@@ -0,0 +1,8 @@
*~
*.a
*.o
*.so
depend
depend.bak
lib
lib64

View File

@@ -65,6 +65,7 @@ if [ $# -ge 2 ] ; then
elif [ -f "$FILE" ] ; then
#echo "$FILE" is a regular file
$RM "$DEST/`basename $FILE`"
cp "$FILE" "$DEST"
if [ $MODE ] ; then
FILE=`basename "$FILE"`

1
configs/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
current

View File

@@ -28,7 +28,8 @@ ASM_SOURCES =
LIBDRM_CFLAGS = `pkg-config --cflags libdrm`
LIBDRM_LIB = `pkg-config --libs libdrm`
DRI_LIB_DEPS = -L/usr/local/lib -lm -lpthread -lexpat $(LIBDRM_LIB)
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lm -lpthread $(LIBDRM_LIB)
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
-lm -lpthread $(LIBDRM_LIB)
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/X11R6/lib -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/X11R6/lib -lGL -lXt -lX11

View File

@@ -41,7 +41,8 @@ EXTRA_LIB_PATH=-L/usr/X11R6/lib
LIBDRM_CFLAGS = `pkg-config --cflags libdrm`
LIBDRM_LIB = `pkg-config --libs libdrm`
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl \
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
-lm -lpthread -ldl \
$(LIBDRM_LIB)

16
configs/linux-dri-debug Normal file
View File

@@ -0,0 +1,16 @@
# -*-makefile-*-
# Configuration for linux-dri-debug: Linux DRI hardware drivers for XFree86 & others
include $(TOP)/configs/linux-dri
CONFIG_NAME = linux-dri-debug
OPT_FLAGS = -O0 -g
ARCH_FLAGS = -DDEBUG
# Helpful to reduce the amount of stuff that gets built sometimes:
#DRI_DIRS = i915tex i915
#DRI_DIRS = i965
#DRI_DIRS = radeon r200 r300
#DRI_DIRS = unichrome sis trident
#DRI_DIRS = i810 mga r128 tdfx

View File

@@ -1,47 +0,0 @@
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 3.1 2006/02/03 17:21:54 brianp Exp $

View File

@@ -1,47 +0,0 @@
Mesa 6.4.2 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.2 is a minor 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.2,v 3.1 2006/02/03 17:21:54 brianp Exp $

View File

@@ -1,97 +0,0 @@
Mesa 6.5 Release Notes
Introduction
------------
Mesa uses an even/odd version number scheme like the Linux kernel.
Odd numbered versions (such as 6.5) designate new developmental releases.
Even numbered versions (such as 6.4) designate stable releases.
New Features
------------
OpenGL Shading language support
This includes the GL_ARB_shader_objects, GL_ARB_shading_language_100,
GL_ARB_vertex_shader and GL_ARB_fragment_shader extensions. Most of
the work was done by Michal Krol.
There's probably a fair number of bugs since this is a pretty large,
complicated body of code.
The OpenGL 2.0 interface to these features will be implemented in a
future version of Mesa,
GL_EXT_timer_query
Used to measure the time of OpenGL operations at high precision.
Only supported in the software/Xlib driver at this time.
GL_EXT_packed_depth_stencil
Defines a new GL_DEPTH_STENCIL_EXT pixel format.
GL_EXT_framebuffer_blit
A simplified glCopyPixels-like feature for copying pixel rectangles.
GL_ARB_half_float_pixel
Adds a new half-precision floating point format for image transfers,
such as for glDrawPixels, glReadPixels, glTexImage, etc.
Removed Extensions
------------------
The following extensions have been removed:
GL_HP_occlusion_test - this is superceded by GL_ARB_occlusion_query.
Known Issues
------------
Rendering to depth textures will not work. Rendering to GL_DEPTH_STENCIL
textures should work.
Driver Interface Changes
------------------------
Stencil: The Driver.StencilOp/Func/Mask() functions have been replaced by
the two-sided versions: Driver.Stencil*Separate().
Render-to-texture: The functions for rendering to textures have changed.
To Do (someday) items
---------------------
Switch to freeglut
Increase MAX_DRAWBUFFERS
Fix linux-glide target/driver.
Fix lambda calculation for frag progs.
Driver Status
---------------------- ----------------------
DRI drivers varies with the driver
XMesa/GLX (on 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.5,v 3.4 2006/03/29 04:53:02 brianp Exp $

View File

@@ -1,60 +0,0 @@
Mesa 6.5.1 Release Notes
Introduction
------------
Mesa uses an even/odd version number scheme like the Linux kernel.
Odd numbered versions (such as 6.5) designate new developmental releases.
Even numbered versions (such as 6.4) designate stable releases.
Mesa 6.5.1 is a 6.5 follow-on development release mostly consisting of
bug fixes (see the VERSIONS file).
New Features
------------
Intel i965 "broadwater" DRI driver
GL_APPLE_vertex_array_object - allows encapsulation of a set of vertex
arrays in an object.
GL_EXT_texture_sRGB - non-linearly mapped texture formats
GL_EXT_gpu_program_parameters - addes a few new functions for setting
multiple vertex/fragment program parameters with one call.
To Do (someday) items
---------------------
Switch to freeglut
Increase MAX_DRAWBUFFERS
Fix linux-glide target/driver.
Fix lambda calculation for frag progs.
Driver Status
---------------------- ----------------------
DRI drivers varies with the driver
XMesa/GLX (on 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.5.1,v 1.2 2006/08/18 20:24:54 brianp Exp $

View File

@@ -63,8 +63,7 @@ a:visited {
<b>Developer Topics</b>
<ul>
<li><a href="http://sourceforge.net/projects/mesa3d" target="_parent">SourceForge homepage</a>
<li><a href="cvs_access.html" target="MainFrame">CVS Access</a>
<li><a href="cvs_branches.html" target="MainFrame">CVS Branch Info</a>
<li><a href="repository.html" target="MainFrame">Source Code Repository</a>
<li><a href="utilities.html" target="MainFrame">Utilities</a>
<li><a href="helpwanted.html" target="MainFrame">Help Wanted</a>
<li><a href="devinfo.html" target="MainFrame">Development Notes</a>

View File

@@ -1,106 +0,0 @@
<HTML>
<TITLE>CVS Access</TITLE>
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<h1>CVS Access</h1>
<p>
Mesa's CVS repository (code management system) is hosted on
<a href="http://www.freedesktop.org" target="_parent">freedesktop.org</a>.
</p>
<p>
You may access the repository either as an
<a href="#anonymous">anonymous user</a> (read-only) or as a
<a href="#developer">developer</a>
(read/write).
</p>
<p>
You may also
<a href="http://freedesktop.org/cgi-bin/viewcvs.cgi/mesa/Mesa/"
target="_parent">browse the CVS repository</a>.
</p>
<a name="anonymous">
<H2>Anonymous CVS Access</H2>
<p>
Anonymous, public, read-only access to the CVS repository is available.
Here are the basic instructions for Unix systems:
</p>
<ol>
<li>Install CVS client software on your computer if needed.
Version 1.9.28 is known to work.
<li>Login as an anonymous user:
<pre>
cvs -d:pserver:anonymous@anoncvs.freedesktop.org:/cvs/mesa login
</pre>
Just press Enter/Return when prompted for a password.
<br>
<br>
<li>Check out the code:
<pre>
cvs -d:pserver:anonymous@anoncvs.freedesktop.org:/cvs/mesa co Mesa
</pre>
</ol>
<p>To update your Mesa CVS source to the latest CVS source:</p>
<ol>
<li><code>cd Mesa</code>
<li><code>cvs -z3 -d:pserver:anonymous@anoncvs.freedesktop.org:/cvs/mesa update</code>
</ol>
<a name="developer">
<H2>Developer CVS Access</H2>
<p>
Mesa developers working with the Mesa CVS repository need to first
have an account on <a href="http://www.freedesktop.org" target="_parent">
freedesktop.org</a>.
To get an account, please ask Brian or the other Mesa developers for
permission.
Then, if there are no objections, follow this
<a href="http://www.freedesktop.org/wiki/AccountRequests" target="_parent">
procedure</a>.
</p>
<p>
Once your account is established, you can check out the Mesa CVS tree
with:
<pre>
setenv CVS_RSH ssh (if using a csh-like shell)
</pre>
<em>OR</em>
<pre>
export CVS_RSH=rsh (if using a bash-like shell)
</pre>
followed by:
<pre>
cvs -d:ext:yourusername@cvs.freedesktop.org:/cvs/mesa co Mesa
</pre>
<p>
Of course, replace <em>yourusername</em> with your actual login name.
</p>
<p>
Subsequent updates should only require:
</p>
<pre>
cvs update
</pre>
</body>
</html>

View File

@@ -1,80 +0,0 @@
<HTML>
<TITLE>CVS Branches</TITLE>
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>CVS Branch Information</H1>
<p>
At any given time, there may be several active branches in Mesa's
CVS repository.
Generally, the CVS trunk contains the latest development (unstable)
code while a CVS branch has the latest stable code.
</p>
<p>
Currently (Oct 2004), the trunk is the Mesa 6.3 development code
while the mesa_6_2_branch branch has the stable Mesa 6.2.x code.
</p>
<p>
Mesa releases use an even/odd numbering scheme to represent stable/development
releases.
For example, Mesa 6.2 (0 is considered even) is a stable release while
Mesa 6.3 is a development release.
</p>
<p>
To checkout a specific CVS branch pass <code>-r</code> and
the branch tag after your CVS command.
For example <code>cvs checkout -r mesa_6_2_branch Mesa</code> will
checkout the 6.2 branch and <code>cvs update -r
mesa_6_2_branch</code> will convert your current CVS tree to the 6.2
branch.
Consult <a href="http://www.durak.org/cvswebsites/doc/cvs_5.php3#SEC54"
target="_parent">http://www.durak.org/cvswebsites/doc/cvs_5.php3#SEC54</a>
for more on branching in CVS.
</p>
<p>
To see a list of all the CVS branches run <code>cvs log README</code> (or any
other file) and look for the section labeled <code>symbolic names</code>.
You'll see something like this:
</p>
<pre> symbolic names:
mesa_4_0: 1.3
mesa_4_0_branch: 1.3.0.6
mesa_3_5: 1.3
mesa_3_4_2: 1.3
mesa_3_4_1: 1.3
mesa_3_4: 1.3
mesa_3_4_branch: 1.3.0.4
mesa_3_3: 1.3
mesa_3_2_1: 1.1.1.1
mesa_3_3_texture_env_combine2: 1.3.0.2
mesa_3_2: 1.1.1.1
mesa_3_2_beta_1: 1.1.1.1
mesa_3_1: 1.1.1.1
mesa_3_2_dev: 1.1.1.1.0.2
mesa_3_1_beta_3: 1.1.1.1
start: 1.1.1.1
mesa: 1.1.1
</pre>
<p>
Most will be obsolete branches. Generally, the newer branches are at
the top. Ask on the mesa3d-dev mailing list to learn which branches
are active.
</p>
</body>
</html>

View File

@@ -9,7 +9,7 @@
<H1>Downloading</H1>
<p>
Last development release: <b>6.5.1</b>
Last development release: <b>6.5.2</b>
</p>
<p>

View File

@@ -9,47 +9,58 @@
<H1>Mailing Lists</H1>
<p>There are four Mesa mailing lists:</p>
<ul>
<li><b>mesa3d-users</b> - intended for users of the Mesa library.
Newbie questions are appropriate, but please try reading the Mesa documentation first.
</li><li><b>mesa3d-dev</b> - intended for developers of the Mesa library.
This is not for beginners.
</li><li><b>mesa3d-cvs</b> - CVS check-in messages are sent to this list.
This is useful for tracking ongoing development changes.
</li><li><b>mesa3d-announce</b> - announcements of new Mesa versions are sent to this list.
</li></ul>
<p>
To subscribe or unsubscribe, go to the
<a href="http://www.sourceforge.net/mail/?group_id=3" target="_parent">
SourceForge lists page.</a>
<p>There are four Mesa mailing lists:
</p>
<p>The mailing lists are managed by SourceForge. If you're having trouble
with the mailing lists please contact the SourceForge administrators for help.</p>
<ul>
<li><a href="https://lists.sourceforge.net/lists/listinfo/mesa3d-announce"
target="_parent">mesa3d-announce</a> - announcements of new Mesa
versions are sent to this list.
</li>
<br>
<li><a href="https://lists.sourceforge.net/lists/listinfo/mesa3d-users"
target="_parent">mesa3d-users</a> - intended for users of the Mesa library.
Newbie questions are appropriate, but please try the general OpenGL
resources and Mesa documentation first.
</li>
<br>
<li><a href="https://lists.sourceforge.net/lists/listinfo/mesa3d-dev"
target="_parent">mesa3d-dev</a> - for discussion of Mesa development.
Not for beginners.
</li>
<br>
<li><a href="http://lists.freedesktop.org/mailman/listinfo/mesa-commit"
target="_parent">mesa-commit</a> - relays git check-in messages
(for developers).
<br>
Note: the old mesa3d-cvs list is no longer in use.
</li>
</ul>
<p>Archives of the old Mesa mailing list which was hosted by unicamp.br
are available <a href="http://groups.yahoo.com/group/mesa/messages/"
target="_parent">here</a>.</p>
<p>
<b>Notice</b>: non-member posts to any of these lists will be automatically
rejected.
</p>
<br>
<H1>OpenGL Forums</H1>
<p>
Here are some other OpenGL-related forums you might find useful:
</p>
<p>
Usenet newsgroups:
<ul>
<li>comp.graphics.algorithms
<li>comp.graphics.api.opengl
<li>comp.os.linux.x
<li><a href="http://www.opengl.org/cgi-bin/ubb/ultimatebb.cgi"
target="_parent">OpenGL discussion forums</A> at www.opengl.org</li>
<li>Usenet newsgroups:
<ul>
<li>comp.graphics.algorithms</li>
<li>comp.graphics.api.opengl</li>
<li>comp.os.linux.x</li>
</ul>
</ul>
</p>
<p>
<a href="http://www.opengl.org/" target="_parent">OpenGL discussion forums</A>
at www.opengl.org
</p>
</HTML>
</BODY>

View File

@@ -11,6 +11,13 @@
<H1>News</H1>
<h2>December 5, 2006</h2>
<p>
Mesa is now using git as its source code management system.
The previous CVS repository should no longer be used.
See the <a href="repository.html">repository page</a> for more information.
</p>
<h2>December 2, 2006</h2>
<p>
<a href="relnotes-6.5.2.html">Mesa 6.5.2</a> has been released.

View File

@@ -18,7 +18,15 @@ but mostly consisting of bug fixes.
<h2>MD5 checksums</h2>
<pre>
TBD
11a033b078e090b3caaeb467234fe299 MesaLib-6.5.2.tar.gz
e4d894181f1859651658b3704633e10d MesaLib-6.5.2.tar.bz2
63bf1d444fa738cca52ce1043e284021 MesaLib-6.5.2.zip
2b8f1375d16bda5f5a2304174cd5bcf7 MesaDemos-6.5.2.tar.gz
e870efe98d3a50be01ab211b9b2e25d9 MesaDemos-6.5.2.tar.bz2
d92cc6f5fee5ca75af0be04f9f4908f0 MesaDemos-6.5.2.zip
8d4d77e3a7132f4217bbc7c1ab157030 MesaGLUT-6.5.2.tar.gz
e84edbb11c69c8e408dfadd2ed08e95b MesaGLUT-6.5.2.tar.bz2
c6d7134843ed5faf11f6686ecb5d2a2e MesaGLUT-6.5.2.zip
</pre>

82
docs/relnotes-6.5.3.html Normal file
View File

@@ -0,0 +1,82 @@
<HTML>
<TITLE>Mesa Release Notes</TITLE>
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<body bgcolor="#eeeeee">
<H1>Mesa 6.5.3 Release Notes / (in progress)</H1>
<p>
Mesa 6.5.3 is a 6.5 follow-on development release mostly consisting of
bug fixes</a>.
</p>
<h2>MD5 checksums</h2>
<pre>
TBD
</pre>
<h2>New features</h2>
<ul>
<li>Updated glext.h file (version 39)
<li>Updated glxext.h file (version 18)
</ul>
<h2>Bug fixes</h2>
<ul>
<li>Fog was errantly applied when a fragment shader was enabled (bug 9346)
<li>glPush/PopClientAttrib didn't handle VBO bindings correctly (bug 9445)
<li>With 32-bit Z buffer, the fragment Z of lines and points was sometimes wrong.
<li>1D convolution state could effect 2D image transfers
</ul>
<h2>Internal code changes</h2>
<ul>
<li>The _MaintainTnlProgram, _MaintainTexEnvProgram, _TexEnvProgram and
_TnlProgram fields have been moved.
<li>The ctx->FragmentProgram._Active field has been removed.
<li>The ctx->Vertex/FragmentProgram._Current fields point to the program
in effect, whether it comes from a shader, user-program or generated
fixed-function program.
<li>The _UseTexEnvProgram field has been removed.
</ul>
<h2>To Do (someday) items</h2>
<ul>
<li>Switch to freeglut
<li>Increase MAX_DRAWBUFFERS
<li>Fix linux-glide target/driver.
<li>Improved lambda and derivative calculation for frag progs.
</ul>
<h2>Driver Status</h2>
<pre>
Driver Status
---------------------- ----------------------
DRI drivers varies with the driver
XMesa/GLX (on 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
</pre>
</body>
</html>

View File

@@ -20,6 +20,7 @@ The release notes summarize what's new or changed in each Mesa release.
</p>
<UL>
<LI><A HREF="relnotes-6.5.3.html">6.5.3 release notes</A>
<LI><A HREF="relnotes-6.5.2.html">6.5.2 release notes</A>
<LI><A HREF="relnotes-6.5.1.html">6.5.1 release notes</A>
<LI><A HREF="relnotes-6.5.html">6.5 release notes</A>

111
docs/repository.html Normal file
View File

@@ -0,0 +1,111 @@
<HTML>
<TITLE>Cocd Repository</TITLE>
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<h1>Code Repository</h1>
<p>
As of December 5, 2006, Mesa is using
<a href="http://git.or.cz/"target="_parent">git</a>
as its source code management system.
CVS was used previously.
The old CVS repository should no longer be used.
</p>
The master git repository is hosted on
<a href="http://www.freedesktop.org" target="_parent">freedesktop.org</a>.
</p>
<p>
You may access the repository either as an
<a href="#anonymous">anonymous user</a> (read-only) or as a
<a href="#developer">developer</a>
(read/write).
</p>
<p>
You may also
<a href="http://gitweb.freedesktop.org/?p=mesa/mesa.git"
target="_parent">browse the git repository</a>.
</p>
<a name="anonymous">
<H2>Anonymous git Access</H2>
<p>
To get the Mesa sources anonymously (read-only):
</p>
<ol>
<li>Install the git software on your computer if needed.<br><br>
<li>Get an initial, local copy of the repository with:
<pre>
git clone git://anongit.freedesktop.org/git/mesa/mesa
</pre>
<li>Later, you can update your tree from the master repository with:
<pre>
git pull origin
</pre>
</ol>
<a name="developer">
<H2>Developer git Access</H2>
<p>
Mesa developers need to first have an account on
<a href="http://www.freedesktop.org" target="_parent">freedesktop.org</a>.
To get an account, please ask Brian or the other Mesa developers for
permission.
Then, if there are no objections, follow this
<a href="http://www.freedesktop.org/wiki/AccountRequests" target="_parent">
procedure</a>.
</p>
<p>
Once your account is established:
</p>
<ol>
<li>Install the git software on your computer if needed.<br><br>
<li>Get an initial, local copy of the repository with:
<pre>
git clone git+ssh://username@git.freedesktop.org/git/mesa/mesa
</pre>
Replace <em>username</em> with your actual login name.<br><br>
<li>Later, you can update your tree from the master repository with:
<pre>
git pull origin
</pre>
</ol>
<a name="developer">
<H2>Development Branches</H2>
<p>
At any given time, there may be several active branches in Mesa's
repository.
Generally, the trunk contains the latest development (unstable)
code while a branch has the latest stable code.
</p>
<p>
The command <code>git-branch</code> will list all available branches.
</p>
<p>
Questions about branch status/activity should be posted to the
mesa3d-dev mailing list.
</p>
</body>
</html>

View File

@@ -9,7 +9,7 @@ all: full subset
FULL = \
main.doxy \
math.doxy \
array_cache.doxy \
vbo.doxy \
glapi.doxy \
shader.doxy \
swrast.doxy \

View File

@@ -23,7 +23,7 @@ PROJECT_NAME = Mesa
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 6.2
PROJECT_NUMBER = 6.5
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.

View File

@@ -1,5 +1,5 @@
doxygen tnl_dd.doxy
doxygen array_cache.doxy
doxygen vbo.doxy
doxygen math.doxy
doxygen swrast.doxy
doxygen swrast_setup.doxy
@@ -10,7 +10,7 @@ doxygen shader.doxy
echo Building again, to resolve tags
doxygen tnl_dd.doxy
doxygen array_cache.doxy
doxygen vbo.doxy
doxygen math.doxy
doxygen swrast.doxy
doxygen swrast_setup.doxy

View File

@@ -45,5 +45,5 @@ TAGFILES = main.tag=../core \
swrast.tag=../swrast \
swrast_setup.tag=../swrast_setup \
tnl.tag=../tnl \
array_cache.tag=array_cache
vbo.tag=vbo
GENERATE_TAGFILE = swrast.tag

View File

@@ -7,7 +7,7 @@
<div class="qindex">
<a class="qindex" href="../main/index.html">core</a> |
<a class="qindex" href="../glapi/index.html">glapi</a> |
<a class="qindex" href="../array_cache/index.html">array_cache</a> |
<a class="qindex" href="../vbo/index.html">vbo</a> |
<a class="qindex" href="../math/index.html">math</a> |
<a class="qindex" href="../shader/index.html">shader</a> |
<a class="qindex" href="../swrast/index.html">swrast</a> |

View File

@@ -40,7 +40,7 @@ SKIP_FUNCTION_MACROS = YES
# Configuration::addtions related to external references
#---------------------------------------------------------------------------
TAGFILES = tnl_dd.tag=../tnl_dd \
array_cache.tag=../array_cache \
vbo.tag=../vbo \
glapi.tag=../glapi \
math.tag=../math \
shader.tag=../shader \

View File

@@ -45,5 +45,5 @@ TAGFILES = tnl_dd.tag=../tnl_dd \
swrast.tag=../swrast \
swrast_setup.tag=../swrast_setup \
tnl.tag=../tnl \
array_cache.tag=../array_cache
vbo.tag=../vbo
GENERATE_TAGFILE = math.tag

View File

@@ -45,5 +45,5 @@ TAGFILES = main.tag=../core \
swrast.tag=../swrast \
swrast_setup.tag=../swrast_setup \
tnl.tag=../tnl \
array_cache.tag=array_cache
vbo.tag=vbo
GENERATE_TAGFILE = swrast.tag

View File

@@ -44,5 +44,5 @@ TAGFILES = main.tag=../core \
tnl_dd.tag=../tnl_dd \
swrast_setup.tag=../swrast_setup \
tnl.tag=../tnl \
array_cache.tag=array_cache
vbo.tag=vbo
GENERATE_TAGFILE = swrast.tag

View File

@@ -45,5 +45,5 @@ TAGFILES = tnl_dd.tag=../tnl_dd \
math.tag=../math \
swrast.tag=../swrast \
tnl.tag=../tnl \
array_cache.tag=../array_cache
vbo.tag=../vbo
GENERATE_TAGFILE = swrast_setup.tag

View File

@@ -46,5 +46,5 @@ TAGFILES = tnl_dd.tag=../tnl \
shader.tag=../shader \
swrast.tag=../swrast \
swrast_setup.tag=swrast_setup \
array_cache.tag=array_cache
vbo.tag=vbo
GENERATE_TAGFILE = tnl.tag

View File

@@ -45,5 +45,5 @@ TAGFILES = main.tag=../core \
swrast.tag=../swrast \
swrast_setup.tag=../swrast_setup \
tnl.tag=../tnl \
array_cache.tag=array_cache
vbo.tag=vbo
GENERATE_TAGFILE = tnl_dd.tag

View File

@@ -5,11 +5,11 @@
#---------------------------------------------------------------------------
# General configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = "Mesa array_cache"
PROJECT_NAME = "Mesa vbo"
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = ../src/mesa/array_cache/
INPUT = ../src/mesa/vbo/
FILE_PATTERNS = *.c \
*.h
RECURSIVE = NO
@@ -24,7 +24,7 @@ FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
HTML_OUTPUT = array_cache
HTML_OUTPUT = vbo
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
@@ -47,4 +47,4 @@ TAGFILES = main.tag=../core \
swrast_setup.tag=../swrast_setup \
tnl.tag=../tnl \
tnl_dd.tag=../tnl_dd
GENERATE_TAGFILE = array_cache.tag
GENERATE_TAGFILE = vbo.tag

View File

@@ -6,32 +6,26 @@ extern "C" {
#endif
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
** Software License B, Version 1.1 (the "License"), the contents of this
** file are subject only to the provisions of the License. You may not use
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
** Copyright (c) 2007 The Khronos Group Inc.
**
** http://oss.sgi.com/projects/FreeB
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
** "Materials"), to deal in the Materials without restriction, including
** without limitation the rights to use, copy, modify, merge, publish,
** distribute, sublicense, and/or sell copies of the Materials, and to
** permit persons to whom the Materials are furnished to do so, subject to
** the following conditions:
**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Materials.
**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2004 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
**
** Additional Notice Provisions: This software was created using the
** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
** not been independently verified as being compliant with the OpenGL(R)
** version 1.2.1 Specification.
** THE MATERIALS ARE 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 THE AUTHORS OR COPYRIGHT HOLDERS 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
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
*/
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
@@ -52,9 +46,9 @@ extern "C" {
/*************************************************************/
/* Header file version number, required by OpenGL ABI for Linux */
/* glext.h last updated 2006/08/30 */
/* glext.h last updated 2007/02/12 */
/* Current version at http://www.opengl.org/registry/ */
#define GL_GLEXT_VERSION 34
#define GL_GLEXT_VERSION 39
#ifndef GL_VERSION_1_2
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
@@ -3019,7 +3013,6 @@ extern "C" {
#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
#define GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT 0x8CD8
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
@@ -3104,6 +3097,8 @@ extern "C" {
#ifndef GL_EXT_framebuffer_multisample
#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
#define GL_MAX_SAMPLES_EXT 0x8D57
#endif
#ifndef GL_MESAX_texture_stack
@@ -3122,6 +3117,268 @@ extern "C" {
#ifndef GL_EXT_gpu_program_parameters
#endif
#ifndef GL_APPLE_flush_buffer_range
#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12
#define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13
#endif
#ifndef GL_NV_gpu_program4
#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904
#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905
#define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906
#define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907
#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908
#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909
#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5
#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6
#endif
#ifndef GL_NV_geometry_program4
#define GL_LINES_ADJACENCY_EXT 0x000A
#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B
#define GL_TRIANGLES_ADJACENCY_EXT 0x000C
#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D
#define GL_GEOMETRY_PROGRAM_NV 0x8C26
#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27
#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28
#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA
#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB
#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC
#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
#define GL_PROGRAM_POINT_SIZE_EXT 0x8642
#endif
#ifndef GL_EXT_geometry_shader4
#define GL_GEOMETRY_SHADER_EXT 0x8DD9
/* reuse GL_GEOMETRY_VERTICES_OUT_EXT */
/* reuse GL_GEOMETRY_INPUT_TYPE_EXT */
/* reuse GL_GEOMETRY_OUTPUT_TYPE_EXT */
/* reuse GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT */
#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD
#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE
#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B
#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
/* reuse GL_LINES_ADJACENCY_EXT */
/* reuse GL_LINE_STRIP_ADJACENCY_EXT */
/* reuse GL_TRIANGLES_ADJACENCY_EXT */
/* reuse GL_TRIANGLE_STRIP_ADJACENCY_EXT */
/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT */
/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT */
/* reuse GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT */
/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
/* reuse GL_PROGRAM_POINT_SIZE_EXT */
#endif
#ifndef GL_NV_vertex_program4
#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD
#endif
#ifndef GL_EXT_gpu_shader4
#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0
#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1
#define GL_SAMPLER_BUFFER_EXT 0x8DC2
#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3
#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4
#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5
#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6
#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7
#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8
#define GL_INT_SAMPLER_1D_EXT 0x8DC9
#define GL_INT_SAMPLER_2D_EXT 0x8DCA
#define GL_INT_SAMPLER_3D_EXT 0x8DCB
#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC
#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD
#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE
#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF
#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0
#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1
#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2
#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3
#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4
#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5
#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6
#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7
#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8
#endif
#ifndef GL_EXT_draw_instanced
#endif
#ifndef GL_EXT_packed_float
#define GL_R11F_G11F_B10F_EXT 0x8C3A
#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B
#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C
#endif
#ifndef GL_EXT_texture_array
#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18
#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19
#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A
#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B
#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C
#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D
#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF
#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E
/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
#endif
#ifndef GL_EXT_texture_buffer_object
#define GL_TEXTURE_BUFFER_EXT 0x8C2A
#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B
#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C
#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D
#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E
#endif
#ifndef GL_EXT_texture_compression_latc
#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70
#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71
#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72
#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73
#endif
#ifndef GL_EXT_texture_compression_rgtc
#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB
#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC
#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD
#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE
#endif
#ifndef GL_EXT_texture_shared_exponent
#define GL_RGB9_E5_EXT 0x8C3D
#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E
#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F
#endif
#ifndef GL_NV_depth_buffer_float
#define GL_DEPTH_COMPONENT32F_NV 0x8DAB
#define GL_DEPTH32F_STENCIL8_NV 0x8DAC
#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD
#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF
#endif
#ifndef GL_NV_fragment_program4
#endif
#ifndef GL_NV_framebuffer_multisample_coverage
#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB
#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10
#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11
#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12
#endif
#ifndef GL_EXT_framebuffer_sRGB
#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9
#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA
#endif
#ifndef GL_NV_geometry_shader4
#endif
#ifndef GL_NV_parameter_buffer_object
#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0
#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1
#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2
#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3
#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4
#endif
#ifndef GL_EXT_draw_buffers2
#endif
#ifndef GL_NV_transform_feedback
#define GL_BACK_PRIMARY_COLOR_NV 0x8C77
#define GL_BACK_SECONDARY_COLOR_NV 0x8C78
#define GL_TEXTURE_COORD_NV 0x8C79
#define GL_CLIP_DISTANCE_NV 0x8C7A
#define GL_VERTEX_ID_NV 0x8C7B
#define GL_PRIMITIVE_ID_NV 0x8C7C
#define GL_GENERIC_ATTRIB_NV 0x8C7D
#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E
#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F
#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80
#define GL_ACTIVE_VARYINGS_NV 0x8C81
#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82
#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83
#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84
#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85
#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86
#define GL_PRIMITIVES_GENERATED_NV 0x8C87
#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88
#define GL_RASTERIZER_DISCARD_NV 0x8C89
#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_ATTRIBS_NV 0x8C8A
#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B
#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C
#define GL_SEPARATE_ATTRIBS_NV 0x8C8D
#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E
#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F
#endif
#ifndef GL_EXT_bindable_uniform
#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2
#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3
#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4
#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED
#define GL_UNIFORM_BUFFER_EXT 0x8DEE
#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF
#endif
#ifndef GL_EXT_texture_integer
#define GL_RGBA32UI_EXT 0x8D70
#define GL_RGB32UI_EXT 0x8D71
#define GL_ALPHA32UI_EXT 0x8D72
#define GL_INTENSITY32UI_EXT 0x8D73
#define GL_LUMINANCE32UI_EXT 0x8D74
#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75
#define GL_RGBA16UI_EXT 0x8D76
#define GL_RGB16UI_EXT 0x8D77
#define GL_ALPHA16UI_EXT 0x8D78
#define GL_INTENSITY16UI_EXT 0x8D79
#define GL_LUMINANCE16UI_EXT 0x8D7A
#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B
#define GL_RGBA8UI_EXT 0x8D7C
#define GL_RGB8UI_EXT 0x8D7D
#define GL_ALPHA8UI_EXT 0x8D7E
#define GL_INTENSITY8UI_EXT 0x8D7F
#define GL_LUMINANCE8UI_EXT 0x8D80
#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81
#define GL_RGBA32I_EXT 0x8D82
#define GL_RGB32I_EXT 0x8D83
#define GL_ALPHA32I_EXT 0x8D84
#define GL_INTENSITY32I_EXT 0x8D85
#define GL_LUMINANCE32I_EXT 0x8D86
#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87
#define GL_RGBA16I_EXT 0x8D88
#define GL_RGB16I_EXT 0x8D89
#define GL_ALPHA16I_EXT 0x8D8A
#define GL_INTENSITY16I_EXT 0x8D8B
#define GL_LUMINANCE16I_EXT 0x8D8C
#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D
#define GL_RGBA8I_EXT 0x8D8E
#define GL_RGB8I_EXT 0x8D8F
#define GL_ALPHA8I_EXT 0x8D90
#define GL_INTENSITY8I_EXT 0x8D91
#define GL_LUMINANCE8I_EXT 0x8D92
#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93
#define GL_RED_INTEGER_EXT 0x8D94
#define GL_GREEN_INTEGER_EXT 0x8D95
#define GL_BLUE_INTEGER_EXT 0x8D96
#define GL_ALPHA_INTEGER_EXT 0x8D97
#define GL_RGB_INTEGER_EXT 0x8D98
#define GL_RGBA_INTEGER_EXT 0x8D99
#define GL_BGR_INTEGER_EXT 0x8D9A
#define GL_BGRA_INTEGER_EXT 0x8D9B
#define GL_LUMINANCE_INTEGER_EXT 0x8D9C
#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D
#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E
#endif
/*************************************************************/
@@ -3162,7 +3419,7 @@ typedef unsigned short GLhalfNV;
/* This code block is duplicated in glext.h, so must be protected */
#define GLEXT_64_TYPES_DEFINED
/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
/* (as used in the GLX_OML_sync_control extension). */
/* (as used in the GL_EXT_timer_query extension). */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#include <inttypes.h>
#elif defined(__sun__)
@@ -3184,12 +3441,12 @@ typedef unsigned long long int uint64_t;
typedef long int int32_t;
typedef long long int int64_t;
typedef unsigned long long int uint64_t;
#elif defined(WIN32) && defined(_MSC_VER)
typedef long int int32_t;
#elif defined(_WIN32) && defined(__GNUC__)
#include <stdint.h>
#elif defined(_WIN32)
typedef __int32 int32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
#elif defined(WIN32) && defined(__GNUC__)
#include <stdint.h>
#else
#include <inttypes.h> /* Fallback option */
#endif
@@ -6687,6 +6944,314 @@ typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLu
typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
#endif
#ifndef GL_APPLE_flush_buffer_range
#define GL_APPLE_flush_buffer_range 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum, GLenum, GLint);
GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum, GLintptr, GLsizeiptr);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param);
typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size);
#endif
#ifndef GL_NV_gpu_program4
#define GL_NV_gpu_program4 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint);
GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum, GLuint, const GLint *);
GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *);
GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum, GLuint, const GLuint *);
GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *);
GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint);
GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum, GLuint, const GLint *);
GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *);
GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum, GLuint, const GLuint *);
GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *);
GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum, GLuint, GLint *);
GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum, GLuint, GLuint *);
GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum, GLuint, GLint *);
GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum, GLuint, GLuint *);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
#endif
#ifndef GL_NV_geometry_program4
#define GL_NV_geometry_program4 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glProgramVertexLimitNV (GLenum, GLint);
GLAPI void APIENTRY glFramebufferTextureEXT (GLenum, GLenum, GLuint, GLint);
GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum, GLenum, GLuint, GLint, GLint);
GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum, GLenum, GLuint, GLint, GLenum);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit);
typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
#endif
#ifndef GL_EXT_geometry_shader4
#define GL_EXT_geometry_shader4 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glProgramParameteriEXT (GLuint, GLenum, GLint);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
#endif
#ifndef GL_NV_vertex_program4
#define GL_NV_vertex_program4 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint, GLint);
GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint, GLint, GLint);
GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint, GLint, GLint, GLint);
GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint, GLint, GLint, GLint, GLint);
GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint, GLuint);
GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint, GLuint, GLuint);
GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint, GLuint, GLuint, GLuint);
GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint, GLuint, GLuint, GLuint, GLuint);
GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint, const GLint *);
GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint, const GLint *);
GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint, const GLint *);
GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint, const GLint *);
GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint, const GLuint *);
GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint, const GLuint *);
GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint, const GLuint *);
GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint, const GLuint *);
GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint, const GLbyte *);
GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint, const GLshort *);
GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint, const GLubyte *);
GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint, const GLushort *);
GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint, GLenum, GLint *);
GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint, GLenum, GLuint *);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x);
typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y);
typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z);
typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x);
typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y);
typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params);
typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params);
#endif
#ifndef GL_EXT_gpu_shader4
#define GL_EXT_gpu_shader4 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glGetUniformuivEXT (GLuint, GLint, GLuint *);
GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint, GLuint, const GLchar *);
GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint, const GLchar *);
GLAPI void APIENTRY glUniform1uiEXT (GLint, GLuint);
GLAPI void APIENTRY glUniform2uiEXT (GLint, GLuint, GLuint);
GLAPI void APIENTRY glUniform3uiEXT (GLint, GLuint, GLuint, GLuint);
GLAPI void APIENTRY glUniform4uiEXT (GLint, GLuint, GLuint, GLuint, GLuint);
GLAPI void APIENTRY glUniform1uivEXT (GLint, GLsizei, const GLuint *);
GLAPI void APIENTRY glUniform2uivEXT (GLint, GLsizei, const GLuint *);
GLAPI void APIENTRY glUniform3uivEXT (GLint, GLsizei, const GLuint *);
GLAPI void APIENTRY glUniform4uivEXT (GLint, GLsizei, const GLuint *);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params);
typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);
typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name);
typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0);
typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1);
typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
#endif
#ifndef GL_EXT_draw_instanced
#define GL_EXT_draw_instanced 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum, GLint, GLsizei, GLsizei);
GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum, GLsizei, GLenum, const GLvoid *, GLsizei);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
#endif
#ifndef GL_EXT_packed_float
#define GL_EXT_packed_float 1
#endif
#ifndef GL_EXT_texture_array
#define GL_EXT_texture_array 1
#endif
#ifndef GL_EXT_texture_buffer_object
#define GL_EXT_texture_buffer_object 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glTexBufferEXT (GLenum, GLenum, GLuint);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
#endif
#ifndef GL_EXT_texture_compression_latc
#define GL_EXT_texture_compression_latc 1
#endif
#ifndef GL_EXT_texture_compression_rgtc
#define GL_EXT_texture_compression_rgtc 1
#endif
#ifndef GL_EXT_texture_shared_exponent
#define GL_EXT_texture_shared_exponent 1
#endif
#ifndef GL_NV_depth_buffer_float
#define GL_NV_depth_buffer_float 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glDepthRangedNV (GLdouble, GLdouble);
GLAPI void APIENTRY glClearDepthdNV (GLdouble);
GLAPI void APIENTRY glDepthBoundsdNV (GLdouble, GLdouble);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar);
typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth);
typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax);
#endif
#ifndef GL_NV_fragment_program4
#define GL_NV_fragment_program4 1
#endif
#ifndef GL_NV_framebuffer_multisample_coverage
#define GL_NV_framebuffer_multisample_coverage 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum, GLsizei, GLsizei, GLenum, GLsizei, GLsizei);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
#endif
#ifndef GL_EXT_framebuffer_sRGB
#define GL_EXT_framebuffer_sRGB 1
#endif
#ifndef GL_NV_geometry_shader4
#define GL_NV_geometry_shader4 1
#endif
#ifndef GL_NV_parameter_buffer_object
#define GL_NV_parameter_buffer_object 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum, GLuint, GLuint, GLsizei, const GLfloat *);
GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum, GLuint, GLuint, GLsizei, const GLint *);
GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum, GLuint, GLuint, GLsizei, const GLuint *);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params);
typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params);
typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params);
#endif
#ifndef GL_EXT_draw_buffers2
#define GL_EXT_draw_buffers2 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint, GLboolean, GLboolean, GLboolean, GLboolean);
GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum, GLuint, GLboolean *);
GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum, GLuint, GLint *);
GLAPI void APIENTRY glEnableIndexedEXT (GLenum, GLuint);
GLAPI void APIENTRY glDisableIndexedEXT (GLenum, GLuint);
GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum, GLuint);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data);
typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data);
typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index);
#endif
#ifndef GL_NV_transform_feedback
#define GL_NV_transform_feedback 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum);
GLAPI void APIENTRY glEndTransformFeedbackNV (void);
GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint, const GLint *, GLenum);
GLAPI void APIENTRY glBindBufferRangeNV (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr);
GLAPI void APIENTRY glBindBufferOffsetNV (GLenum, GLuint, GLuint, GLintptr);
GLAPI void APIENTRY glBindBufferBaseNV (GLenum, GLuint, GLuint);
GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint, GLsizei, const GLint *, GLenum);
GLAPI void APIENTRY glActiveVaryingNV (GLuint, const GLchar *);
GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint, const GLchar *);
GLAPI void APIENTRY glGetActiveVaryingNV (GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *);
GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint, GLuint, GLint *);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode);
typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void);
typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode);
typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer);
typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name);
typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name);
typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location);
#endif
#ifndef GL_EXT_bindable_uniform
#define GL_EXT_bindable_uniform 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glUniformBufferEXT (GLuint, GLint, GLuint);
GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint, GLint);
GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint, GLint);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer);
typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location);
typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location);
#endif
#ifndef GL_EXT_texture_integer
#define GL_EXT_texture_integer 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glTexParameterIivEXT (GLenum, GLenum, const GLint *);
GLAPI void APIENTRY glTexParameterIuivEXT (GLenum, GLenum, const GLuint *);
GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum, GLenum, GLint *);
GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum, GLenum, GLuint *);
GLAPI void APIENTRY glClearColorIiEXT (GLint, GLint, GLint, GLint);
GLAPI void APIENTRY glClearColorIuiEXT (GLuint, GLuint, GLuint, GLuint);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha);
typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);
#endif
#ifdef __cplusplus
}

View File

@@ -6,32 +6,26 @@ extern "C" {
#endif
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
** Software License B, Version 1.1 (the "License"), the contents of this
** file are subject only to the provisions of the License. You may not use
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
** Copyright (c) 2007 The Khronos Group Inc.
**
** http://oss.sgi.com/projects/FreeB
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
** "Materials"), to deal in the Materials without restriction, including
** without limitation the rights to use, copy, modify, merge, publish,
** distribute, sublicense, and/or sell copies of the Materials, and to
** permit persons to whom the Materials are furnished to do so, subject to
** the following conditions:
**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Materials.
**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2004 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
**
** Additional Notice Provisions: This software was created using the
** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
** not been independently verified as being compliant with the OpenGL(R)
** version 1.2.1 Specification.
** THE MATERIALS ARE 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 THE AUTHORS OR COPYRIGHT HOLDERS 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
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
*/
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
@@ -52,9 +46,9 @@ extern "C" {
/*************************************************************/
/* Header file version number, required by OpenGL ABI for Linux */
/* glxext.h last updated 2006/08/30 */
/* glxext.h last updated 2007/02/13 */
/* Current version at http://www.opengl.org/registry/ */
#define GLX_GLXEXT_VERSION 14
#define GLX_GLXEXT_VERSION 18
#ifndef GLX_VERSION_1_3
#define GLX_WINDOW_BIT 0x00000001
@@ -307,6 +301,51 @@ extern "C" {
#ifndef GLX_MESA_agp_offset
#endif
#ifndef GLX_EXT_fbconfig_packed_float
#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
#endif
#ifndef GLX_EXT_framebuffer_sRGB
#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
#endif
#ifndef GLX_EXT_texture_from_pixmap
#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
#define GLX_Y_INVERTED_EXT 0x20D4
#define GLX_TEXTURE_FORMAT_EXT 0x20D5
#define GLX_TEXTURE_TARGET_EXT 0x20D6
#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
#define GLX_TEXTURE_1D_EXT 0x20DB
#define GLX_TEXTURE_2D_EXT 0x20DC
#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
#define GLX_FRONT_LEFT_EXT 0x20DE
#define GLX_FRONT_RIGHT_EXT 0x20DF
#define GLX_BACK_LEFT_EXT 0x20E0
#define GLX_BACK_RIGHT_EXT 0x20E1
#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
#define GLX_BACK_EXT GLX_BACK_LEFT_EXT
#define GLX_AUX0_EXT 0x20E2
#define GLX_AUX1_EXT 0x20E3
#define GLX_AUX2_EXT 0x20E4
#define GLX_AUX3_EXT 0x20E5
#define GLX_AUX4_EXT 0x20E6
#define GLX_AUX5_EXT 0x20E7
#define GLX_AUX6_EXT 0x20E8
#define GLX_AUX7_EXT 0x20E9
#define GLX_AUX8_EXT 0x20EA
#define GLX_AUX9_EXT 0x20EB
#endif
/*************************************************************/
@@ -366,8 +405,12 @@ typedef unsigned long long int uint64_t;
typedef long int int32_t;
typedef long long int int64_t;
typedef unsigned long long int uint64_t;
#elif defined(WIN32) && defined(__GNUC__)
#elif defined(_WIN32) && defined(__GNUC__)
#include <stdint.h>
#elif defined(_WIN32)
typedef __int32 int32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
#else
#include <inttypes.h> /* Fallback option */
#endif
@@ -716,6 +759,24 @@ extern unsigned int glXGetAGPOffsetMESA (const void *);
typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
#endif
#ifndef GLX_EXT_fbconfig_packed_float
#define GLX_EXT_fbconfig_packed_float 1
#endif
#ifndef GLX_EXT_framebuffer_sRGB
#define GLX_EXT_framebuffer_sRGB 1
#endif
#ifndef GLX_EXT_texture_from_pixmap
#define GLX_EXT_texture_from_pixmap 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern void glXBindTexImageEXT (Display *, GLXDrawable, int, const int *);
extern void glXReleaseTexImageEXT (Display *, GLXDrawable, int);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer);
#endif
#ifdef __cplusplus
}

View File

@@ -237,6 +237,26 @@ struct __DRIinterfaceMethodsRec {
GLboolean (*getMSCRate)(__DRInativeDisplay * dpy, __DRIid drawable,
int32_t * numerator, int32_t * denominator);
/*@}*/
/**
* Reports areas of the given drawable which have been modified by the
* driver.
*
* \param drawable which the drawing was done to.
* \param rects rectangles affected, with the drawable origin as the
* origin.
* \param x X offset of the drawable within the screen (used in the
* front_buffer case)
* \param y Y offset of the drawable within the screen.
* \param front_buffer boolean flag for whether the drawing to the
* drawable was actually done directly to the front buffer (instead
* of backing storage, for example)
*/
void (*reportDamage)(__DRInativeDisplay * dpy, int screen,
__DRIid drawable,
int x, int y,
drm_clip_rect_t *rects, int num_rects,
int front_buffer);
};

View File

@@ -189,259 +189,6 @@ typedef struct __GLcontextModesRec {
/************************************************************************/
/*
** Structure used for allocating and freeing drawable private memory.
** (like software buffers, for example).
**
** The memory allocation routines are provided by the surrounding
** "operating system" code, and they are to be used for allocating
** software buffers and things which are associated with the drawable,
** and used by any context which draws to that drawable. There are
** separate memory allocation functions for drawables and contexts
** since drawables and contexts can be created and destroyed independently
** of one another, and the "operating system" may want to use separate
** allocation arenas for each.
**
** The freePrivate function is filled in by the core routines when they
** allocates software buffers, and stick them in "private". The freePrivate
** function will destroy anything allocated to this drawable (to be called
** when the drawable is destroyed).
*/
typedef struct __GLdrawableRegionRec __GLdrawableRegion;
typedef struct __GLdrawableBufferRec __GLdrawableBuffer;
typedef struct __GLdrawablePrivateRec __GLdrawablePrivate;
typedef struct __GLregionRectRec {
/* lower left (inside the rectangle) */
GLint x0, y0;
/* upper right (outside the rectangle) */
GLint x1, y1;
} __GLregionRect;
struct __GLdrawableRegionRec {
GLint numRects;
__GLregionRect *rects;
__GLregionRect boundingRect;
};
/************************************************************************/
/* masks for the buffers */
#define __GL_FRONT_BUFFER_MASK 0x00000001
#define __GL_FRONT_LEFT_BUFFER_MASK 0x00000001
#define __GL_FRONT_RIGHT_BUFFER_MASK 0x00000002
#define __GL_BACK_BUFFER_MASK 0x00000004
#define __GL_BACK_LEFT_BUFFER_MASK 0x00000004
#define __GL_BACK_RIGHT_BUFFER_MASK 0x00000008
#define __GL_ACCUM_BUFFER_MASK 0x00000010
#define __GL_DEPTH_BUFFER_MASK 0x00000020
#define __GL_STENCIL_BUFFER_MASK 0x00000040
#define __GL_AUX_BUFFER_MASK(i) (0x0000080 << (i))
#define __GL_ALL_BUFFER_MASK 0xffffffff
/* what Resize routines return if resize resorted to fallback case */
#define __GL_BUFFER_FALLBACK 0x10
typedef void (*__GLbufFallbackInitFn)(__GLdrawableBuffer *buf,
__GLdrawablePrivate *glPriv, GLint bits);
typedef void (*__GLbufMainInitFn)(__GLdrawableBuffer *buf,
__GLdrawablePrivate *glPriv, GLint bits,
__GLbufFallbackInitFn back);
/*
** A drawable buffer
**
** This data structure describes the context side of a drawable.
**
** According to the spec there could be multiple contexts bound to the same
** drawable at the same time (from different threads). In order to avoid
** multiple-access conflicts, locks are used to serialize access. When a
** thread needs to access (read or write) a member of the drawable, it takes
** a lock first. Some of the entries in the drawable are treated "mostly
** constant", so we take the freedom of allowing access to them without
** taking a lock (for optimization reasons).
**
** For more details regarding locking, see buffers.h in the GL core
*/
struct __GLdrawableBufferRec {
/*
** Buffer dimensions
*/
GLint width, height, depth;
/*
** Framebuffer base address
*/
void *base;
/*
** Framebuffer size (in bytes)
*/
GLuint size;
/*
** Size (in bytes) of each element in the framebuffer
*/
GLuint elementSize;
GLuint elementSizeLog2;
/*
** Element skip from one scanline to the next.
** If the buffer is part of another buffer (for example, fullscreen
** front buffer), outerWidth is the width of that buffer.
*/
GLint outerWidth;
/*
** outerWidth * elementSize
*/
GLint byteWidth;
/*
** Allocation/deallocation is done based on this handle. A handle
** is conceptually different from the framebuffer 'base'.
*/
void *handle;
/* imported */
GLboolean (*resize)(__GLdrawableBuffer *buf,
GLint x, GLint y, GLuint width, GLuint height,
__GLdrawablePrivate *glPriv, GLuint bufferMask);
void (*lock)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
void (*unlock)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
void (*fill)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv,
GLuint val, GLint x, GLint y, GLint w, GLint h);
void (*free)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
/* exported */
void (*freePrivate)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
#ifdef __cplusplus
void *privatePtr;
#else
void *private;
#endif
/* private */
void *other; /* implementation private data */
__GLbufMainInitFn mainInit;
__GLbufFallbackInitFn fallbackInit;
};
/*
** The context side of the drawable private
*/
struct __GLdrawablePrivateRec {
/*
** Drawable Modes
*/
__GLcontextModes *modes;
/*
** Drawable size
*/
GLuint width, height;
/*
** Origin in screen coordinates of the drawable
*/
GLint xOrigin, yOrigin;
#ifdef __GL_ALIGNED_BUFFERS
/*
** Drawable offset from screen origin
*/
GLint xOffset, yOffset;
/*
** Alignment restriction
*/
GLint xAlignment, yAlignment;
#endif
/*
** Should we invert the y axis?
*/
GLint yInverted;
/*
** Mask specifying which buffers are renderable by the hw
*/
GLuint accelBufferMask;
/*
** the buffers themselves
*/
__GLdrawableBuffer frontBuffer;
__GLdrawableBuffer backBuffer;
__GLdrawableBuffer accumBuffer;
__GLdrawableBuffer depthBuffer;
__GLdrawableBuffer stencilBuffer;
#if defined(__GL_NUMBER_OF_AUX_BUFFERS) && (__GL_NUMBER_OF_AUX_BUFFERS > 0)
__GLdrawableBuffer *auxBuffer;
#endif
__GLdrawableRegion ownershipRegion;
/*
** Lock for the drawable private structure
*/
void *lock;
#ifdef DEBUG
/* lock debugging info */
int lockRefCount;
int lockLine[10];
char *lockFile[10];
#endif
/* imported */
void *(*malloc)(size_t size);
void *(*calloc)(size_t numElem, size_t elemSize);
void *(*realloc)(void *oldAddr, size_t newSize);
void (*free)(void *addr);
GLboolean (*addSwapRect)(__GLdrawablePrivate *glPriv,
GLint x, GLint y, GLsizei width, GLsizei height);
void (*setClipRect)(__GLdrawablePrivate *glPriv,
GLint x, GLint y, GLsizei width, GLsizei height);
void (*updateClipRegion)(__GLdrawablePrivate *glPriv);
GLboolean (*resize)(__GLdrawablePrivate *glPriv);
void (*getDrawableSize)(__GLdrawablePrivate *glPriv,
GLint *x, GLint *y, GLuint *width, GLuint *height);
void (*lockDP)(__GLdrawablePrivate *glPriv, __GLcontext *gc);
void (*unlockDP)(__GLdrawablePrivate *glPriv);
/* exported */
#ifdef __cplusplus
void *privatePtr;
#else
void *private;
#endif
void (*freePrivate)(__GLdrawablePrivate *);
/* client data */
void *other;
};
/*
** Macros to lock/unlock the drawable private
*/
#if defined(DEBUG)
#define __GL_LOCK_DP(glPriv,gc) \
(*(glPriv)->lockDP)(glPriv,gc); \
(glPriv)->lockLine[(glPriv)->lockRefCount] = __LINE__; \
(glPriv)->lockFile[(glPriv)->lockRefCount] = __FILE__; \
(glPriv)->lockRefCount++
#define __GL_UNLOCK_DP(glPriv) \
(glPriv)->lockRefCount--; \
(glPriv)->lockLine[(glPriv)->lockRefCount] = 0; \
(glPriv)->lockFile[(glPriv)->lockRefCount] = NULL; \
(*(glPriv)->unlockDP)(glPriv)
#else /* DEBUG */
#define __GL_LOCK_DP(glPriv,gc) (*(glPriv)->lockDP)(glPriv,gc)
#define __GL_UNLOCK_DP(glPriv) (*(glPriv)->unlockDP)(glPriv)
#endif /* DEBUG */
/*
** Procedures which are imported by the GL from the surrounding
** "operating system". Math functions are not considered part of the
@@ -467,8 +214,8 @@ typedef struct __GLimportsRec {
int (CAPI *fprintf)(__GLcontext *gc, void *stream, const char *fmt, ...);
/* Drawing surface management */
__GLdrawablePrivate *(*getDrawablePrivate)(__GLcontext *gc);
__GLdrawablePrivate *(*getReadablePrivate)(__GLcontext *gc);
void *(*getDrawablePrivate)(__GLcontext *gc);
void *(*getReadablePrivate)(__GLcontext *gc);
/* Operating system dependent data goes here */
void *other;

View File

@@ -149,7 +149,7 @@ TypeStr(GLenum type)
*/
#define ALIGN (1<<12)
static unsigned align(unsigned value, unsigned a)
static unsigned long align(unsigned long value, unsigned long a)
{
return (value + a - 1) & ~(a-1);
}
@@ -186,10 +186,10 @@ MeasureDownloadRate(void)
printf("alloc %p %p\n", orig_texImage, orig_getImage);
texImage = (GLubyte *)align((unsigned)orig_texImage, ALIGN);
getImage = (GLubyte *)align((unsigned)orig_getImage, ALIGN);
texImage = (GLubyte *)align((unsigned long)orig_texImage, ALIGN);
getImage = (GLubyte *)align((unsigned long)orig_getImage, ALIGN);
for (i = 1; !(((unsigned)texImage) & i); i<<=1)
for (i = 1; !(((unsigned long)texImage) & i); i<<=1)
;
printf("texture image alignment: %d bytes (%p)\n", i, texImage);

View File

@@ -77,7 +77,7 @@ static void init( void )
WindowPosFunc = &glWindowPos2fARB;
}
else
#elif defined(GL_ARB_window_pos)
#elif defined(GL_MESA_window_pos)
if (glutExtensionSupported("GL_MESA_window_pos")) {
printf("Using GL_MESA_window_pos\n");
WindowPosFunc = &glWindowPos2fMESA;

View File

@@ -13,6 +13,7 @@
#include <math.h>
#include <GL/glut.h>
static int Win;
static int Width = 400, Height = 400;
static GLuint MyFB, MyRB;
@@ -99,6 +100,7 @@ CleanUp(void)
glDeleteRenderbuffersEXT(1, &MyRB);
assert(!glIsFramebufferEXT(MyFB));
assert(!glIsRenderbufferEXT(MyRB));
glutDestroyWindow(Win);
exit(0);
}
@@ -194,7 +196,7 @@ main( int argc, char *argv[] )
glutInitWindowPosition( 0, 0 );
glutInitWindowSize(Width, Height);
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow(argv[0]);
Win = glutCreateWindow(argv[0]);
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );

View File

@@ -13,6 +13,7 @@
#include <math.h>
#include <GL/glut.h>
static int Win = 0;
static int Width = 400, Height = 400;
static GLuint MyFB, ColorRb, DepthRb;
static GLboolean Animate = GL_TRUE;
@@ -110,6 +111,7 @@ CleanUp(void)
assert(!glIsFramebufferEXT(MyFB));
assert(!glIsRenderbufferEXT(ColorRb));
assert(!glIsRenderbufferEXT(DepthRb));
glutDestroyWindow(Win);
exit(0);
}
@@ -187,7 +189,7 @@ main( int argc, char *argv[] )
glutInitWindowPosition( 0, 0 );
glutInitWindowSize(Width, Height);
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow(argv[0]);
Win = glutCreateWindow(argv[0]);
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );

View File

@@ -23,6 +23,7 @@
#define DRAW 1
static int Win = 0;
static int Width = 400, Height = 400;
static GLenum TexTarget = GL_TEXTURE_2D; /*GL_TEXTURE_RECTANGLE_ARB;*/
@@ -232,6 +233,8 @@ CleanUp(void)
glDeleteTextures(1, &TexObj);
glutDestroyWindow(Win);
exit(0);
}
@@ -392,7 +395,7 @@ main(int argc, char *argv[])
glutInitWindowPosition(0, 0);
glutInitWindowSize(Width, Height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
glutCreateWindow(argv[0]);
Win = glutCreateWindow(argv[0]);
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Display);

View File

@@ -127,7 +127,7 @@ static void display(void)
GLfloat tcm = 4.0;
printf("BASE_LEVEL = %d MAX_LEVEL = %d MIN_LOD = %f MAX_LOD = %f Bias = %.2g filter = %s\n",
BaseLevel, MaxLevel, MinLod, MaxLod, LodBias,
NearestFilter ? "LINEAR" : "NEAREST");
NearestFilter ? "NEAREST" : "LINEAR");
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, BaseLevel);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, MaxLevel);

View File

@@ -368,7 +368,7 @@ Resize(const struct window *h, unsigned int width, unsigned int height)
glFrustum(-1, 1, -1, 1, 2, 10);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(0, 0, -3.5);
glTranslatef(0, 0, -4.5);
}
@@ -408,28 +408,30 @@ EventLoop(void)
}
#if 0
static void
PrintInfo(const struct window *h)
{
printf("Name: %s\n", h->DisplayName);
printf(" Display: 0x%x\n", h->Dpy);
printf(" Window: 0x%x\n", h->Win);
printf(" Context: 0x%x\n", h->Context);
printf(" Display: %p\n", (void *) h->Dpy);
printf(" Window: 0x%x\n", (int) h->Win);
printf(" Context: 0x%x\n", (int) h->Context);
}
#endif
int
main(int argc, char *argv[])
{
int i;
const char *dpyName = XDisplayName(NULL);
struct window *h0, *h1, *h2, *h3;
/* four windows and contexts sharing display lists and texture objects */
h0 = AddWindow(":0", 10, 10, NULL);
h1 = AddWindow(":0", 330, 10, h0);
h2 = AddWindow(":0", 10, 350, h0);
h3 = AddWindow(":0", 330, 350, h0);
h0 = AddWindow(dpyName, 10, 10, NULL);
h1 = AddWindow(dpyName, 330, 10, h0);
h2 = AddWindow(dpyName, 10, 350, h0);
h3 = AddWindow(dpyName, 330, 350, h0);
InitGLstuff(h0);

View File

@@ -20,6 +20,7 @@
*/
#include "gltrace_support.h"
#include <assert.h>
#include <sstream>
#include <fstream>
#include <iomanip>
@@ -34,7 +35,7 @@ namespace {
{
static char buf[4096];
int status;
unsigned int length = sizeof(buf)-1;
size_t length = sizeof(buf)-1;
memset (buf, 0, sizeof(buf));

View File

@@ -40,11 +40,16 @@ SOURCES = \
quad-tex-2d.c \
quad-tex-pbo.c \
quad-tex-3d.c \
quad-tex-dep.c \
quad.c \
quads.c \
quadstrip.c \
quadstrip-flat.c \
dlist-edgeflag.c \
dlist-dangling.c \
dlist-edgeflag-dangling.c \
drawrange.c \
drawelements.c \
drawarrays.c \
tri-blend.c \
tri-tex-3d.c \
tri-clip.c \
@@ -61,6 +66,9 @@ SOURCES = \
tri.c \
tristrip-clip.c \
tristrip.c \
vbo-drawrange.c \
vbo-drawelements.c \
vbo-drawarrays.c \
vp-clip.c \
vp-tri.c \
vp-line-clip.c \

View File

@@ -0,0 +1,149 @@
/*
* Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
* that (i) the above copyright notices and this permission notice appear in
* all copies of the software and related documentation, and (ii) the name of
* Silicon Graphics may not be used in any advertising or
* publicity relating to the software without the specific, prior written
* permission of Silicon Graphics.
*
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
* ANY KIND,
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
*
* IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE.
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <GL/glut.h>
#define CI_OFFSET_1 16
#define CI_OFFSET_2 32
GLenum doubleBuffer;
GLint list;
static void Init(void)
{
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
glClearColor(0.0, 0.0, 1.0, 0.0);
list = glGenLists(1);
glNewList(list, GL_COMPILE);
glBegin(GL_TRIANGLES);
glVertex3f( 0.9, -0.9, -30.0);
glVertex3f( 0.9, 0.9, -30.0);
glColor3f(.8,0,0);
glVertex3f(-0.9, 0.0, -30.0);
glEnd();
glEndList();
}
static void Reshape(int width, int height)
{
glViewport(0, 0, (GLint)width, (GLint)height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
glMatrixMode(GL_MODELVIEW);
}
static void Key(unsigned char key, int x, int y)
{
switch (key) {
case 27:
exit(1);
default:
return;
}
glutPostRedisplay();
}
static void Draw(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(0,.9,0);
glCallList(list);
glRotatef(45,0,0,1);
glColor3f(1,0,1);
glCallList(list);
glFlush();
if (doubleBuffer) {
glutSwapBuffers();
}
}
static GLenum Args(int argc, char **argv)
{
GLint i;
doubleBuffer = GL_FALSE;
for (i = 1; i < argc; i++) {
if (strcmp(argv[i], "-sb") == 0) {
doubleBuffer = GL_FALSE;
} else if (strcmp(argv[i], "-db") == 0) {
doubleBuffer = GL_TRUE;
} else {
fprintf(stderr, "%s (Bad option).\n", argv[i]);
return GL_FALSE;
}
}
return GL_TRUE;
}
int main(int argc, char **argv)
{
GLenum type;
glutInit(&argc, argv);
if (Args(argc, argv) == GL_FALSE) {
exit(1);
}
glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
type = GLUT_RGB;
type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
glutInitDisplayMode(type);
if (glutCreateWindow("First Tri") == GL_FALSE) {
exit(1);
}
Init();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Draw);
glutMainLoop();
return 0;
}

View File

@@ -0,0 +1,152 @@
/*
* Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
* that (i) the above copyright notices and this permission notice appear in
* all copies of the software and related documentation, and (ii) the name of
* Silicon Graphics may not be used in any advertising or
* publicity relating to the software without the specific, prior written
* permission of Silicon Graphics.
*
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
* ANY KIND,
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
*
* IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE.
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <GL/glut.h>
#define CI_OFFSET_1 16
#define CI_OFFSET_2 32
GLenum doubleBuffer;
GLint list;
static void Init(void)
{
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
glClearColor(0.0, 0.0, 1.0, 0.0);
glPolygonMode(GL_FRONT, GL_LINE);
glPolygonMode(GL_BACK, GL_POINT);
list = glGenLists(1);
glNewList(list, GL_COMPILE);
glBegin(GL_TRIANGLES);
glVertex3f( 0.9, -0.9, -30.0);
glEdgeFlag(1);
glVertex3f( 0.9, 0.9, -30.0);
glVertex3f(-0.9, 0.0, -30.0);
glEnd();
glEndList();
}
static void Reshape(int width, int height)
{
glViewport(0, 0, (GLint)width, (GLint)height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
glMatrixMode(GL_MODELVIEW);
}
static void Key(unsigned char key, int x, int y)
{
switch (key) {
case 27:
exit(1);
default:
return;
}
glutPostRedisplay();
}
static void Draw(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(0,.9,0);
glEdgeFlag(0);
glCallList(list);
glRotatef(45,0,0,1);
glColor3f(1,0,1);
glCallList(list);
glFlush();
if (doubleBuffer) {
glutSwapBuffers();
}
}
static GLenum Args(int argc, char **argv)
{
GLint i;
doubleBuffer = GL_FALSE;
for (i = 1; i < argc; i++) {
if (strcmp(argv[i], "-sb") == 0) {
doubleBuffer = GL_FALSE;
} else if (strcmp(argv[i], "-db") == 0) {
doubleBuffer = GL_TRUE;
} else {
fprintf(stderr, "%s (Bad option).\n", argv[i]);
return GL_FALSE;
}
}
return GL_TRUE;
}
int main(int argc, char **argv)
{
GLenum type;
glutInit(&argc, argv);
if (Args(argc, argv) == GL_FALSE) {
exit(1);
}
glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
type = GLUT_RGB;
type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
glutInitDisplayMode(type);
if (glutCreateWindow("First Tri") == GL_FALSE) {
exit(1);
}
Init();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Draw);
glutMainLoop();
return 0;
}

View File

@@ -0,0 +1,156 @@
/*
* Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
* that (i) the above copyright notices and this permission notice appear in
* all copies of the software and related documentation, and (ii) the name of
* Silicon Graphics may not be used in any advertising or
* publicity relating to the software without the specific, prior written
* permission of Silicon Graphics.
*
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
* ANY KIND,
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
*
* IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE.
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <GL/glut.h>
#define CI_OFFSET_1 16
#define CI_OFFSET_2 32
GLenum doubleBuffer;
GLint list;
static void Init(void)
{
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
glClearColor(0.0, 0.0, 1.0, 0.0);
glPolygonMode(GL_FRONT, GL_LINE);
glPolygonMode(GL_BACK, GL_POINT);
list = glGenLists(1);
glNewList(list, GL_COMPILE);
glBegin(GL_TRIANGLES);
glEdgeFlag(1);
/* glColor3f(0,0,.7); */
glVertex3f( 0.9, -0.9, -30.0);
glEdgeFlag(0);
/* glColor3f(.8,0,0); */
glVertex3f( 0.9, 0.9, -30.0);
glEdgeFlag(1);
/* glColor3f(0,.9,0); */
glVertex3f(-0.9, 0.0, -30.0);
glEnd();
glEndList();
}
static void Reshape(int width, int height)
{
glViewport(0, 0, (GLint)width, (GLint)height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
glMatrixMode(GL_MODELVIEW);
}
static void Key(unsigned char key, int x, int y)
{
switch (key) {
case 27:
exit(1);
default:
return;
}
glutPostRedisplay();
}
static void Draw(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(0,.9,0);
glCallList(list);
glRotatef(45,0,0,1);
glColor3f(1,0,1);
glCallList(list);
glFlush();
if (doubleBuffer) {
glutSwapBuffers();
}
}
static GLenum Args(int argc, char **argv)
{
GLint i;
doubleBuffer = GL_FALSE;
for (i = 1; i < argc; i++) {
if (strcmp(argv[i], "-sb") == 0) {
doubleBuffer = GL_FALSE;
} else if (strcmp(argv[i], "-db") == 0) {
doubleBuffer = GL_TRUE;
} else {
fprintf(stderr, "%s (Bad option).\n", argv[i]);
return GL_FALSE;
}
}
return GL_TRUE;
}
int main(int argc, char **argv)
{
GLenum type;
glutInit(&argc, argv);
if (Args(argc, argv) == GL_FALSE) {
exit(1);
}
glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
type = GLUT_RGB;
type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
glutInitDisplayMode(type);
if (glutCreateWindow("First Tri") == GL_FALSE) {
exit(1);
}
Init();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Draw);
glutMainLoop();
return 0;
}

127
progs/trivial/drawarrays.c Normal file
View File

@@ -0,0 +1,127 @@
/* Basic VBO */
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define GL_GLEXT_PROTOTYPES
#include <GL/glut.h>
struct {
GLfloat pos[3];
GLubyte color[4];
} verts[] =
{
{ { 0.9, -0.9, 0.0 },
{ 0x00, 0x00, 0xff, 0x00 }
},
{ { 0.9, 0.9, 0.0 },
{ 0x00, 0xff, 0x00, 0x00 }
},
{ { -0.9, 0.9, 0.0 },
{ 0xff, 0x00, 0x00, 0x00 }
},
{ { -0.9, -0.9, 0.0 },
{ 0xff, 0xff, 0xff, 0x00 }
},
};
static void Init( void )
{
GLint errno;
GLuint prognum;
static const char *prog1 =
"!!ARBvp1.0\n"
"MOV result.color, vertex.color;\n"
"MOV result.position, vertex.position;\n"
"END\n";
glGenProgramsARB(1, &prognum);
glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
strlen(prog1), (const GLubyte *) prog1);
assert(glIsProgramARB(prognum));
errno = glGetError();
printf("glGetError = %d\n", errno);
if (errno != GL_NO_ERROR)
{
GLint errorpos;
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
printf("errorpos: %d\n", errorpos);
printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB));
}
glEnableClientState( GL_VERTEX_ARRAY );
glEnableClientState( GL_COLOR_ARRAY );
glVertexPointer( 3, GL_FLOAT, sizeof(verts[0]), verts[0].pos );
glColorPointer( 4, GL_UNSIGNED_BYTE, sizeof(verts[0]), verts[0].color );
}
static void Display( void )
{
glClearColor(0.3, 0.3, 0.3, 1);
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
glEnable(GL_VERTEX_PROGRAM_ARB);
// glDrawArrays( GL_TRIANGLES, 0, 3 );
glDrawArrays( GL_TRIANGLES, 1, 3 );
glFlush();
}
static void Reshape( int width, int height )
{
glViewport( 0, 0, width, height );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
/*glTranslatef( 0.0, 0.0, -15.0 );*/
}
static void Key( unsigned char key, int x, int y )
{
(void) x;
(void) y;
switch (key) {
case 27:
exit(0);
break;
}
glutPostRedisplay();
}
int main( int argc, char *argv[] )
{
glutInit( &argc, argv );
glutInitWindowPosition( 0, 0 );
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
Init();
glutMainLoop();
return 0;
}

View File

@@ -0,0 +1,120 @@
/* Test rebasing */
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define GL_GLEXT_PROTOTYPES
#include <GL/glut.h>
GLfloat verts[][4] = {
{ 0.9, -0.9, 0.0, 1.0 },
{ 0.9, 0.9, 0.0, 1.0 },
{ -0.9, 0.9, 0.0, 1.0 },
{ -0.9, -0.9, 0.0, 1.0 },
};
GLubyte color[][4] = {
{ 0x00, 0x00, 0xff, 0x00 },
{ 0x00, 0xff, 0x00, 0x00 },
{ 0xff, 0x00, 0x00, 0x00 },
{ 0xff, 0xff, 0xff, 0x00 },
};
GLuint indices[] = { 1, 2, 3 };
static void Init( void )
{
GLint errno;
GLuint prognum;
static const char *prog1 =
"!!ARBvp1.0\n"
"MOV result.color, vertex.color;\n"
"MOV result.position, vertex.position;\n"
"END\n";
glGenProgramsARB(1, &prognum);
glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
strlen(prog1), (const GLubyte *) prog1);
assert(glIsProgramARB(prognum));
errno = glGetError();
printf("glGetError = %d\n", errno);
if (errno != GL_NO_ERROR)
{
GLint errorpos;
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
printf("errorpos: %d\n", errorpos);
printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB));
}
glEnableClientState( GL_VERTEX_ARRAY );
glEnableClientState( GL_COLOR_ARRAY );
glVertexPointer( 3, GL_FLOAT, sizeof(verts[0]), verts );
glColorPointer( 4, GL_UNSIGNED_BYTE, 0, color );
}
static void Display( void )
{
glClearColor(0.3, 0.3, 0.3, 1);
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
glEnable(GL_VERTEX_PROGRAM_NV);
/* Should have min_index == 1, maybe force a rebase:
*/
glDrawElements( GL_TRIANGLES, 3, GL_UNSIGNED_INT, indices );
glFlush();
}
static void Reshape( int width, int height )
{
glViewport( 0, 0, width, height );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
/*glTranslatef( 0.0, 0.0, -15.0 );*/
}
static void Key( unsigned char key, int x, int y )
{
(void) x;
(void) y;
switch (key) {
case 27:
exit(0);
break;
}
glutPostRedisplay();
}
int main( int argc, char *argv[] )
{
glutInit( &argc, argv );
glutInitWindowPosition( 0, 0 );
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
Init();
glutMainLoop();
return 0;
}

118
progs/trivial/drawrange.c Normal file
View File

@@ -0,0 +1,118 @@
/* Test rebasing */
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define GL_GLEXT_PROTOTYPES
#include <GL/glut.h>
GLfloat verts[][4] = {
{ 0.9, -0.9, 0.0, 1.0 },
{ 0.9, 0.9, 0.0, 1.0 },
{ -0.9, 0.9, 0.0, 1.0 },
{ -0.9, -0.9, 0.0, 1.0 },
};
GLubyte color[][4] = {
{ 0x00, 0x00, 0xff, 0x00 },
{ 0x00, 0xff, 0x00, 0x00 },
{ 0xff, 0x00, 0x00, 0x00 },
{ 0xff, 0xff, 0xff, 0x00 },
};
GLuint indices[] = { 1, 2, 3 };
static void Init( void )
{
GLint errno;
GLuint prognum;
static const char *prog1 =
"!!ARBvp1.0\n"
"MOV result.color, vertex.color;\n"
"MOV result.position, vertex.position;\n"
"END\n";
glGenProgramsARB(1, &prognum);
glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
strlen(prog1), (const GLubyte *) prog1);
assert(glIsProgramARB(prognum));
errno = glGetError();
printf("glGetError = %d\n", errno);
if (errno != GL_NO_ERROR)
{
GLint errorpos;
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
printf("errorpos: %d\n", errorpos);
printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB));
}
glEnableClientState( GL_VERTEX_ARRAY );
glEnableClientState( GL_COLOR_ARRAY );
glVertexPointer( 3, GL_FLOAT, sizeof(verts[0]), verts );
glColorPointer( 4, GL_UNSIGNED_BYTE, 0, color );
}
static void Display( void )
{
glClearColor(0.3, 0.3, 0.3, 1);
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
glEnable(GL_VERTEX_PROGRAM_NV);
glDrawRangeElements( GL_TRIANGLES, 1, 3, 3, GL_UNSIGNED_INT, indices );
glFlush();
}
static void Reshape( int width, int height )
{
glViewport( 0, 0, width, height );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
/*glTranslatef( 0.0, 0.0, -15.0 );*/
}
static void Key( unsigned char key, int x, int y )
{
(void) x;
(void) y;
switch (key) {
case 27:
exit(0);
break;
}
glutPostRedisplay();
}
int main( int argc, char *argv[] )
{
glutInit( &argc, argv );
glutInitWindowPosition( 0, 0 );
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
Init();
glutMainLoop();
return 0;
}

View File

@@ -0,0 +1,133 @@
/* Basic VBO */
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define GL_GLEXT_PROTOTYPES
#include <GL/glut.h>
struct {
GLfloat pos[3];
GLubyte color[4];
} verts[] =
{
{ { 0.9, -0.9, 0.0 },
{ 0x00, 0x00, 0xff, 0x00 }
},
{ { 0.9, 0.9, 0.0 },
{ 0x00, 0xff, 0x00, 0x00 }
},
{ { -0.9, 0.9, 0.0 },
{ 0xff, 0x00, 0x00, 0x00 }
},
{ { -0.9, -0.9, 0.0 },
{ 0xff, 0xff, 0xff, 0x00 }
},
};
GLuint arrayObj, elementObj;
static void Init( void )
{
GLint errno;
GLuint prognum;
static const char *prog1 =
"!!ARBvp1.0\n"
"MOV result.color, vertex.color;\n"
"MOV result.position, vertex.position;\n"
"END\n";
glGenProgramsARB(1, &prognum);
glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
strlen(prog1), (const GLubyte *) prog1);
assert(glIsProgramARB(prognum));
errno = glGetError();
printf("glGetError = %d\n", errno);
if (errno != GL_NO_ERROR)
{
GLint errorpos;
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
printf("errorpos: %d\n", errorpos);
printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB));
}
glEnableClientState( GL_VERTEX_ARRAY );
glEnableClientState( GL_COLOR_ARRAY );
glGenBuffersARB(1, &arrayObj);
glBindBufferARB(GL_ARRAY_BUFFER_ARB, arrayObj);
glBufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(verts), verts, GL_STATIC_DRAW_ARB);
glVertexPointer( 3, GL_FLOAT, sizeof(verts[0]), 0 );
glColorPointer( 4, GL_UNSIGNED_BYTE, sizeof(verts[0]), (void *)(3*sizeof(float)) );
}
static void Display( void )
{
glClearColor(0.3, 0.3, 0.3, 1);
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
glEnable(GL_VERTEX_PROGRAM_ARB);
// glDrawArrays( GL_TRIANGLES, 0, 3 );
glDrawArrays( GL_TRIANGLES, 1, 3 );
glFlush();
}
static void Reshape( int width, int height )
{
glViewport( 0, 0, width, height );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
/*glTranslatef( 0.0, 0.0, -15.0 );*/
}
static void Key( unsigned char key, int x, int y )
{
(void) x;
(void) y;
switch (key) {
case 27:
exit(0);
break;
}
glutPostRedisplay();
}
int main( int argc, char *argv[] )
{
glutInit( &argc, argv );
glutInitWindowPosition( 0, 0 );
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
Init();
glutMainLoop();
return 0;
}

View File

@@ -0,0 +1,137 @@
/* Basic VBO */
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define GL_GLEXT_PROTOTYPES
#include <GL/glut.h>
struct {
GLfloat pos[3];
GLubyte color[4];
} verts[] =
{
{ { 0.9, -0.9, 0.0 },
{ 0x00, 0x00, 0xff, 0x00 }
},
{ { 0.9, 0.9, 0.0 },
{ 0x00, 0xff, 0x00, 0x00 }
},
{ { -0.9, 0.9, 0.0 },
{ 0xff, 0x00, 0x00, 0x00 }
},
{ { -0.9, -0.9, 0.0 },
{ 0xff, 0xff, 0xff, 0x00 }
},
};
GLuint indices[] = { 0, 1, 2, 3 };
GLuint arrayObj, elementObj;
static void Init( void )
{
GLint errno;
GLuint prognum;
static const char *prog1 =
"!!ARBvp1.0\n"
"MOV result.color, vertex.color;\n"
"MOV result.position, vertex.position;\n"
"END\n";
glGenProgramsARB(1, &prognum);
glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
strlen(prog1), (const GLubyte *) prog1);
assert(glIsProgramARB(prognum));
errno = glGetError();
printf("glGetError = %d\n", errno);
if (errno != GL_NO_ERROR)
{
GLint errorpos;
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
printf("errorpos: %d\n", errorpos);
printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB));
}
glEnableClientState( GL_VERTEX_ARRAY );
glEnableClientState( GL_COLOR_ARRAY );
glGenBuffersARB(1, &arrayObj);
glGenBuffersARB(1, &elementObj);
glBindBufferARB(GL_ARRAY_BUFFER_ARB, arrayObj);
glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, elementObj);
glBufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(verts), verts, GL_STATIC_DRAW_ARB);
glBufferDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB, sizeof(indices), indices, GL_STATIC_DRAW_ARB);
glVertexPointer( 3, GL_FLOAT, sizeof(verts[0]), 0 );
glColorPointer( 4, GL_UNSIGNED_BYTE, sizeof(verts[0]), (void *)(3*sizeof(float)) );
}
static void Display( void )
{
glClearColor(0.3, 0.3, 0.3, 1);
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
glEnable(GL_VERTEX_PROGRAM_ARB);
glDrawElements( GL_TRIANGLES, 3, GL_UNSIGNED_INT, NULL );
glFlush();
}
static void Reshape( int width, int height )
{
glViewport( 0, 0, width, height );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
/*glTranslatef( 0.0, 0.0, -15.0 );*/
}
static void Key( unsigned char key, int x, int y )
{
(void) x;
(void) y;
switch (key) {
case 27:
exit(0);
break;
}
glutPostRedisplay();
}
int main( int argc, char *argv[] )
{
glutInit( &argc, argv );
glutInitWindowPosition( 0, 0 );
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
Init();
glutMainLoop();
return 0;
}

View File

@@ -0,0 +1,145 @@
/* Basic VBO */
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define GL_GLEXT_PROTOTYPES
#include <GL/glut.h>
#define ELTOBJ 0
struct {
GLfloat pos[3];
GLubyte color[4];
} verts[] =
{
{ { 0.9, -0.9, 0.0 },
{ 0x00, 0x00, 0xff, 0x00 }
},
{ { 0.9, 0.9, 0.0 },
{ 0x00, 0xff, 0x00, 0x00 }
},
{ { -0.9, 0.9, 0.0 },
{ 0xff, 0x00, 0x00, 0x00 }
},
{ { -0.9, -0.9, 0.0 },
{ 0xff, 0xff, 0xff, 0x00 }
},
};
GLuint indices[] = { 1, 2, 3 };
GLuint arrayObj, elementObj;
static void Init( void )
{
GLint errno;
GLuint prognum;
static const char *prog1 =
"!!ARBvp1.0\n"
"MOV result.color, vertex.color;\n"
"MOV result.position, vertex.position;\n"
"END\n";
glGenProgramsARB(1, &prognum);
glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
strlen(prog1), (const GLubyte *) prog1);
assert(glIsProgramARB(prognum));
errno = glGetError();
printf("glGetError = %d\n", errno);
if (errno != GL_NO_ERROR)
{
GLint errorpos;
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
printf("errorpos: %d\n", errorpos);
printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB));
}
glEnableClientState( GL_VERTEX_ARRAY );
glEnableClientState( GL_COLOR_ARRAY );
glGenBuffersARB(1, &arrayObj);
glBindBufferARB(GL_ARRAY_BUFFER_ARB, arrayObj);
glBufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(verts), verts, GL_STATIC_DRAW_ARB);
#if ELTOBJ
glGenBuffersARB(1, &elementObj);
glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, elementObj);
glBufferDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB, sizeof(indices), indices, GL_STATIC_DRAW_ARB);
#endif
glVertexPointer( 3, GL_FLOAT, sizeof(verts[0]), 0 );
glColorPointer( 4, GL_UNSIGNED_BYTE, sizeof(verts[0]), (void *)(3*sizeof(float)) );
}
static void Display( void )
{
glClearColor(0.3, 0.3, 0.3, 1);
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
glEnable(GL_VERTEX_PROGRAM_ARB);
#if ELTOBJ
glDrawRangeElements( GL_TRIANGLES, 1, 3, 3, GL_UNSIGNED_INT, NULL );
#else
glDrawRangeElements( GL_TRIANGLES, 1, 3, 3, GL_UNSIGNED_INT, indices );
#endif
glFlush();
}
static void Reshape( int width, int height )
{
glViewport( 0, 0, width, height );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
/*glTranslatef( 0.0, 0.0, -15.0 );*/
}
static void Key( unsigned char key, int x, int y )
{
(void) x;
(void) y;
switch (key) {
case 27:
exit(0);
break;
}
glutPostRedisplay();
}
int main( int argc, char *argv[] )
{
glutInit( &argc, argv );
glutInitWindowPosition( 0, 0 );
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
Init();
glutMainLoop();
return 0;
}

View File

@@ -24,11 +24,11 @@ PROGS = glthreads \
pbinfo \
pbdemo \
wincopy \
xdemo \
xfont \
xrotfontdemo \
yuvrect_client
# omit this XMesa API demo: xdemo
##### RULES #####

View File

@@ -473,7 +473,7 @@ main(int argc, char *argv[])
dpy = XOpenDisplay(displayName);
if (!dpy) {
fprintf(stderr, "Unable to open display %s\n", displayName);
fprintf(stderr, "Unable to open display %s\n", XDisplayName(displayName));
return -1;
}
}

View File

@@ -587,8 +587,8 @@ main(int argc, char *argv[])
dpy = XOpenDisplay(dpyName);
if (!dpy) {
printf("Error: couldn't open display %s\n",
dpyName ? dpyName : getenv("DISPLAY"));
fprintf(stderr, "Error: couldn't open display %s\n",
XDisplayName(dpyName));
return -1;
}

View File

@@ -575,7 +575,7 @@ main(int argc, char *argv[])
dpy = XOpenDisplay(dpyName);
if (!dpy) {
printf("Error: couldn't open display %s\n", dpyName);
printf("Error: couldn't open display %s\n", XDisplayName(dpyName));
return -1;
}

View File

@@ -57,7 +57,7 @@ static int NumHeads = 0;
static void
Error(const char *display, const char *msg)
{
fprintf(stderr, "Error on display %s - %s\n", display, msg);
fprintf(stderr, "Error on display %s - %s\n", XDisplayName(display), msg);
exit(1);
}

View File

@@ -456,7 +456,19 @@ print_screen_info(Display *dpy, int scrnum, Bool allowDirect, GLboolean limits)
}
printf("display: %s screen: %d\n", displayName, scrnum);
free(displayName);
printf("direct rendering: %s\n", glXIsDirect(dpy, ctx) ? "Yes" : "No");
printf("direct rendering: ");
if (glXIsDirect(dpy, ctx)) {
printf("Yes\n");
} else {
if (!allowDirect) {
printf("No (-i specified)\n");
} else if (getenv("LIBGL_ALWAYS_INDIRECT")) {
printf("No (LIBGL_ALWAYS_INDIRECT set)\n");
} else {
printf("No (If you want to find out why, try setting "
"LIBGL_DEBUG=verbose)\n");
}
}
printf("server glx vendor string: %s\n", serverVendor);
printf("server glx version string: %s\n", serverVersion);
printf("server glx extensions:\n");
@@ -927,7 +939,7 @@ main(int argc, char *argv[])
dpy = XOpenDisplay(displayName);
if (!dpy) {
fprintf(stderr, "Error: unable to open display %s\n", displayName);
fprintf(stderr, "Error: unable to open display %s\n", XDisplayName(displayName));
return -1;
}

View File

@@ -749,7 +749,7 @@ main(int argc, char *argv[])
dpy = XOpenDisplay(dpyName);
if (!dpy) {
printf("Error: couldn't open display %s\n", dpyName);
printf("Error: couldn't open display %s\n", XDisplayName(dpyName));
return -1;
}

View File

@@ -59,7 +59,7 @@ static GLuint TexObj = 0;
static void
Error(const char *display, const char *msg)
{
fprintf(stderr, "Error on display %s - %s\n", display, msg);
fprintf(stderr, "Error on display %s - %s\n", XDisplayName(display), msg);
exit(1);
}

View File

@@ -91,7 +91,7 @@ make_window( const char * dpyName, const char *name,
dpy = XOpenDisplay(dpyName);
if (!dpy) {
printf("Error: couldn't open display %s\n", dpyName);
printf("Error: couldn't open display %s\n", XDisplayName(dpyName));
exit(1);
}

View File

@@ -95,7 +95,7 @@ main(int argc, char *argv[])
dpy = XOpenDisplay(dpyName);
if (!dpy) {
printf("Error: couldn't open display %s\n", dpyName ? dpyName : ":0");
printf("Error: couldn't open display %s\n", XDisplayName(dpyName));
return 1;
}

View File

@@ -296,7 +296,7 @@ main(int argc, char *argv[])
dpy = XOpenDisplay(dpyName);
if (!dpy) {
printf("Error: couldn't open display %s\n",
dpyName ? dpyName : getenv("DISPLAY"));
XDisplayName(dpyName));
return -1;
}

View File

@@ -18,7 +18,7 @@ Status
Version
10 (10 August 2005)
11 (27 January 2006)
Number
@@ -127,22 +127,8 @@ Issues
isn't always reliable (consider video projectors) but can still be
used to determine the pixel aspect ratio.
Arguments for:
X supports a similar query with DisplayWidthMM(), DisplayHeightMM().
If this information can be easily queried with EDID, why not
make it available to the user?
Arguments against:
Historically, these values aren't always accurate. Also, they're
not always applicable to the display device.
Other options:
Perhaps just a pixel aspect ratio should be supported. [M. Danzer]
Postpone for a future extension, if needed. [A. Jackson]
Resolution: Omit. The EGL 1.2 specification includes queries for
the display resolution and pixel aspect ratio.
6. Should detailed mode timing information be exposed by this API?
@@ -222,7 +208,7 @@ Issues
14. What if the physical screen size can't be determined? Should
a query of EGL_PHYSICAL_SIZE_MESA return [0,0]?
TBD.
Obsolete: EGL_PHYSICAL_SIZE_MESA not used.
15. Suppose the device's number of RAMDACs is different from the
@@ -317,7 +303,6 @@ New Tokens
EGL_SCREEN_COUNT_MESA
EGL_SCREEN_POSITION_MESA
EGL_PHYSICAL_SIZE_MESA
EGL_SCREEN_BIT_MESA
EGL_SCREEN_POSITION_GRANULARITY_MESA
@@ -488,8 +473,6 @@ Additions to Chapter X of the EGL 1.1 Specification
EGL_SCREEN_POSITION_GRANULARITY_MESA
Returns the granularity, in pixels, for
which the screen position is constrained.
EGL_PHYSICAL_SIZE_MESA Physical width and height of the screen
in millimeters
Any other token will generate the error EGL_BAD_ATTRIBUTE.
@@ -576,3 +559,6 @@ Version History
10. 10 August 2005 - BrianP
Added EGL_SCREEN_POSITION_GRANULARITY_MESA.
11. 27 January 2006 - BrianP
EGL_PHYSICAL_SIZE_MESA removed since EGL 1.2 has a similar feature.

View File

@@ -6,13 +6,44 @@
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "egllog.h"
#define MAXSTRING 1000
#define FALLBACK_LOG_LEVEL _EGL_DEBUG
#define FALLBACK_LOG_LEVEL_STR "debug"
static EGLint ReportingLevel = -1;
/* XXX init this with an env var or something */
static EGLint ReportingLevel = _EGL_DEBUG;
static void
log_level_initialize (void)
{
char *log_env = getenv ("EGL_LOG_LEVEL");
if (log_env == NULL) {
ReportingLevel = FALLBACK_LOG_LEVEL;
}
else if (strcasecmp (log_env, "fatal") == 0) {
ReportingLevel = _EGL_FATAL;
}
else if (strcasecmp (log_env, "warning") == 0) {
ReportingLevel = _EGL_WARNING;
}
else if (strcasecmp (log_env, "info") == 0) {
ReportingLevel = _EGL_INFO;
}
else if (strcasecmp (log_env, "debug") == 0) {
ReportingLevel = _EGL_DEBUG;
}
else {
fprintf (stderr, "Unrecognized EGL_LOG_LEVEL environment variable value. "
"Expected one of \"fatal\", \"warning\", \"info\", \"debug\". "
"Got \"%s\". Falling back to \"%s\".\n",
log_env, FALLBACK_LOG_LEVEL_STR);
ReportingLevel = FALLBACK_LOG_LEVEL;
}
}
/**
@@ -25,6 +56,12 @@ _eglLog(EGLint level, const char *fmtStr, ...)
va_list args;
char msg[MAXSTRING];
const char *levelStr;
static int log_level_initialized = 0;
if (!log_level_initialized) {
log_level_initialize ();
log_level_initialized = 1;
}
if (level <= ReportingLevel) {
switch (level) {

View File

@@ -173,6 +173,9 @@ void glutInit (int *argcp, char **argv)
int RequiredWidth = 0, RequiredHeight;
char *fbdev;
stack_t stack;
struct sigaction sa;
/* parse out args */
for (i = 1; i < *argcp;) {
if (!strcmp(argv[i], "-geometry")) {
@@ -239,7 +242,19 @@ void glutInit (int *argcp, char **argv)
gettimeofday(&StartTime, 0);
atexit(Cleanup);
signal(SIGSEGV, CrashHandler);
/* set up SIGSEGV to use alternate stack */
stack.ss_flags = 0;
stack.ss_size = SIGSTKSZ;
if(!(stack.ss_sp = malloc(SIGSTKSZ)))
sprintf(exiterror, "Failed to allocate alternate stack for SIGSEGV!\n");
sigaltstack(&stack, NULL);
sa.sa_handler = CrashHandler;
sa.sa_flags = SA_ONSTACK;
sigemptyset(&sa.sa_mask);
sigaction(SIGSEGV, &sa, NULL);
signal(SIGINT, CrashHandler);
signal(SIGTERM, CrashHandler);
signal(SIGABRT, CrashHandler);

File diff suppressed because it is too large Load Diff

View File

@@ -177,10 +177,9 @@ static void HandleKeyPress(unsigned char key, int up)
} else
if(KeyboardFunc)
KeyboardFunc(key, MouseX, MouseY);
/* there was no keyboard handler to provide a way to exit the program */
if(key == 27)
exit(0);
else
if(key == 27)
exit(0); /* no handler, to provide a way to exit */
}
static void HandleSpecialPress(int key, int up)
@@ -410,14 +409,17 @@ static int ReadKey(void)
labelval = '\b';
break;
case K_ENTER:
case K_ENTER - 1: /* keypad enter */
labelval = '\r'; break;
}
/* likely a keypad input, but depends on keyboard mapping, ignore */
if(labelval == 512)
return 1;
/* dispatch callback */
if(specialkey) {
if(specialkey)
HandleSpecialPress(specialkey, release);
} else {
else {
char c = labelval;
if(KeyboardLedState & LED_CAP) {
@@ -607,38 +609,11 @@ void InitializeVT(int usestdin)
signal(SIGIO, SIG_IGN);
/* save old terminos settings */
if (tcgetattr(0, &OldTermios) < 0) {
sprintf(exiterror, "tcgetattr failed\n");
exit(0);
}
tio = OldTermios;
/* terminos settings for straight-through mode */
tio.c_lflag &= ~(ICANON | ECHO | ISIG);
tio.c_iflag &= ~(ISTRIP | IGNCR | ICRNL | INLCR | IXOFF | IXON);
tio.c_iflag |= IGNBRK;
tio.c_cc[VMIN] = 0;
tio.c_cc[VTIME] = 0;
if (tcsetattr(0, TCSANOW, &tio) < 0) {
sprintf(exiterror, "tcsetattr failed\n");
exit(0);
}
Active = 1;
if(usestdin) {
ConsoleFD = 0;
return;
}
/* enable sigio for input */
if(fcntl(0, F_SETFL, O_ASYNC) < 0) {
sprintf(exiterror, "Failed to set O_ASYNC mode on fd 0\n");
exit(0);
goto setattribs;
}
/* detect the current vt if it was not specified */
@@ -655,7 +630,7 @@ void InitializeVT(int usestdin)
fprintf(stderr, "Defaulting to stdin input\n");
ConsoleFD = 0;
close(fd);
return;
goto setattribs;
}
CurrentVT = st.v_active;
@@ -673,7 +648,7 @@ void InitializeVT(int usestdin)
sprintf(exiterror, "error couldn't open %s,"
" defaulting to stdin \n", console);
ConsoleFD = 0;
return;
goto setattribs;
}
signal(SIGUSR1, VTSwitchHandler);
@@ -683,7 +658,7 @@ void InitializeVT(int usestdin)
sprintf(exiterror,"Failed to grab %s, defaulting to stdin\n", console);
close(ConsoleFD);
ConsoleFD = 0;
return;
goto setattribs;
}
vt = OldVTMode;
@@ -715,7 +690,7 @@ void InitializeVT(int usestdin)
exit(0);
}
fcntl(0, F_SETOWN, getpid());
fcntl(ConsoleFD, F_SETOWN, getpid());
if(ioctl(ConsoleFD, KDGETMODE, &OldMode) < 0)
sprintf(exiterror, "Warning: Failed to get terminal mode\n");
@@ -728,7 +703,6 @@ void InitializeVT(int usestdin)
if(ioctl(ConsoleFD, KDSKBMODE, K_MEDIUMRAW) < 0) {
sprintf(exiterror, "ioctl KDSKBMODE failed!\n");
tcsetattr(0, TCSANOW, &OldTermios);
exit(0);
}
@@ -736,6 +710,34 @@ void InitializeVT(int usestdin)
sprintf(exiterror, "ioctl KDGKBLED failed!\n");
exit(0);
}
setattribs:
/* enable async input input */
if(fcntl(ConsoleFD, F_SETFL, O_ASYNC) < 0) {
sprintf(exiterror, "Failed to set O_ASYNC mode on fd %d\n", ConsoleFD);
exit(0);
}
/* save old terminos settings */
if (tcgetattr(ConsoleFD, &OldTermios) < 0) {
sprintf(exiterror, "tcgetattr failed\n");
exit(0);
}
tio = OldTermios;
/* terminos settings for straight-through mode */
tio.c_lflag &= ~(ICANON | ECHO | ISIG);
tio.c_iflag &= ~(ISTRIP | IGNCR | ICRNL | INLCR | IXOFF | IXON);
tio.c_iflag |= IGNBRK;
tio.c_cc[VMIN] = 0;
tio.c_cc[VTIME] = 0;
if (tcsetattr(ConsoleFD, TCSANOW, &tio) < 0) {
sprintf(exiterror, "tcsetattr failed\n");
exit(0);
}
}
void RestoreVT(void)
@@ -743,8 +745,8 @@ void RestoreVT(void)
if(ConsoleFD < 0)
return;
if (tcsetattr(0, TCSANOW, &OldTermios) < 0)
fprintf(stderr, "tcsetattr failed\n");
if (tcsetattr(ConsoleFD, TCSANOW, &OldTermios) < 0)
sprintf(exiterror, "tcsetattr failed\n");
/* setting the mode to text from graphics restores the colormap */
if(

1
src/glx/x11/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
glcontextmodes.c

View File

@@ -376,7 +376,7 @@ const char *glXGetDriverConfig (const char *driverName) {
}
/* This function isn't currently used.
/* Called from __glXFreeDisplayPrivate.
*/
static void driDestroyDisplay(Display *dpy, void *private)
{
@@ -386,8 +386,26 @@ static void driDestroyDisplay(Display *dpy, void *private)
const int numScreens = ScreenCount(dpy);
int i;
for (i = 0; i < numScreens; i++) {
if (pdpyp->libraryHandles[i])
dlclose(pdpyp->libraryHandles[i]);
if (pdpyp->libraryHandles[i]) {
__DRIdriver *driver, *prev;
/* Remove driver from Drivers list */
for (prev = NULL, driver = Drivers; driver;
prev = driver, driver = driver->next) {
if (driver->handle == pdpyp->libraryHandles[i]) {
if (prev)
prev->next = driver->next;
else
Drivers = driver->next;
Xfree(driver->name);
Xfree(driver);
break;
}
}
dlclose(pdpyp->libraryHandles[i]);
}
}
Xfree(pdpyp->libraryHandles);
Xfree(pdpyp);

View File

@@ -2883,8 +2883,9 @@ int __glXGetInternalVersion(void)
* 20050727 - Gut all the old interfaces. This breaks compatability with
* any DRI driver built to any previous version.
* 20060314 - Added support for GLX_MESA_copy_sub_buffer.
* 20070105 - Added support for damage reporting.
*/
return 20060314;
return 20070105;
}

View File

@@ -48,6 +48,8 @@
#include <stdio.h>
#include <X11/extensions/Xext.h>
#include <X11/extensions/extutil.h>
#include <X11/extensions/Xfixes.h>
#include <X11/extensions/Xdamage.h>
#include <assert.h>
#include "indirect_init.h"
#include "glapi.h"
@@ -394,6 +396,10 @@ static int __glXFreeDisplayPrivate(XExtData *extension)
(*priv->driDisplay.destroyDisplay)(priv->dpy,
priv->driDisplay.private);
priv->driDisplay.private = NULL;
if (priv->driDisplay.createNewScreen) {
Xfree(priv->driDisplay.createNewScreen); /* free array of ptrs */
priv->driDisplay.createNewScreen = NULL;
}
#endif
Xfree((char*) priv);
@@ -698,6 +704,69 @@ static __DRIfuncPtr get_proc_address( const char * proc_name )
return NULL;
}
#ifdef XDAMAGE_1_1_INTERFACE
static GLboolean has_damage_post(__DRInativeDisplay *dpy)
{
static GLboolean inited = GL_FALSE;
static GLboolean has_damage;
if (!inited) {
int major, minor;
if (XDamageQueryVersion(dpy, &major, &minor) &&
major == 1 && minor >= 1)
{
has_damage = GL_TRUE;
} else {
has_damage = GL_FALSE;
}
inited = GL_TRUE;
}
return has_damage;
}
#endif /* XDAMAGE_1_1_INTERFACE */
static void __glXReportDamage(__DRInativeDisplay *dpy, int screen,
__DRIid drawable,
int x, int y,
drm_clip_rect_t *rects, int num_rects,
GLboolean front_buffer)
{
#ifdef XDAMAGE_1_1_INTERFACE
XRectangle *xrects;
XserverRegion region;
int i;
int x_off, y_off;
if (!has_damage_post(dpy))
return;
if (front_buffer) {
x_off = x;
y_off = y;
drawable = RootWindow(dpy, screen);
} else{
x_off = 0;
y_off = 0;
}
xrects = malloc(sizeof(XRectangle) * num_rects);
if (xrects == NULL)
return;
for (i = 0; i < num_rects; i++) {
xrects[i].x = rects[i].x1 + x_off;
xrects[i].y = rects[i].y1 + y_off;
xrects[i].width = rects[i].x2 - rects[i].x1;
xrects[i].height = rects[i].y2 - rects[i].y1;
}
region = XFixesCreateRegion(dpy, xrects, num_rects);
free(xrects);
XDamageAdd(dpy, drawable, region);
XFixesDestroyRegion(dpy, region);
#endif
}
/**
* Table of functions exported by the loader to the driver.
@@ -720,6 +789,8 @@ static const __DRIinterfaceMethods interface_methods = {
__glXGetUST,
__glXGetMscRateOML,
__glXReportDamage,
};

View File

@@ -474,7 +474,7 @@ __indirect_glBegin(GLenum mode)
void
__indirect_glBitmap(GLsizei width, GLsizei height, GLfloat xorig,
GLfloat yorig, GLfloat xmove, GLfloat ymove,
const GLubyte * bitmap)
const GLubyte *bitmap)
{
__GLXcontext *const gc = __glXGetCurrentContext();
const GLuint compsize =
@@ -541,7 +541,7 @@ __indirect_glColor3b(GLbyte red, GLbyte green, GLbyte blue)
#define X_GLrop_Color3bv 6
void
__indirect_glColor3bv(const GLbyte * v)
__indirect_glColor3bv(const GLbyte *v)
{
generic_3_byte(X_GLrop_Color3bv, v);
}
@@ -656,7 +656,7 @@ __indirect_glColor3ub(GLubyte red, GLubyte green, GLubyte blue)
#define X_GLrop_Color3ubv 11
void
__indirect_glColor3ubv(const GLubyte * v)
__indirect_glColor3ubv(const GLubyte *v)
{
generic_3_byte(X_GLrop_Color3ubv, v);
}
@@ -726,7 +726,7 @@ __indirect_glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
#define X_GLrop_Color4bv 14
void
__indirect_glColor4bv(const GLbyte * v)
__indirect_glColor4bv(const GLbyte *v)
{
generic_4_byte(X_GLrop_Color4bv, v);
}
@@ -847,7 +847,7 @@ __indirect_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
#define X_GLrop_Color4ubv 19
void
__indirect_glColor4ubv(const GLubyte * v)
__indirect_glColor4ubv(const GLubyte *v)
{
generic_4_byte(X_GLrop_Color4ubv, v);
}
@@ -1051,7 +1051,7 @@ __indirect_glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz)
#define X_GLrop_Normal3bv 28
void
__indirect_glNormal3bv(const GLbyte * v)
__indirect_glNormal3bv(const GLbyte *v)
{
generic_3_byte(X_GLrop_Normal3bv, v);
}
@@ -2584,7 +2584,7 @@ __indirect_glPolygonMode(GLenum face, GLenum mode)
#define X_GLrop_PolygonStipple 102
void
__indirect_glPolygonStipple(const GLubyte * mask)
__indirect_glPolygonStipple(const GLubyte *mask)
{
__GLXcontext *const gc = __glXGetCurrentContext();
const GLuint compsize =
@@ -4207,7 +4207,7 @@ __indirect_glGetPixelMapusv(GLenum map, GLushort * values)
#define X_GLsop_GetPolygonStipple 128
void
__indirect_glGetPolygonStipple(GLubyte * mask)
__indirect_glGetPolygonStipple(GLubyte *mask)
{
__GLXcontext *const gc = __glXGetCurrentContext();
const __GLXattribute *const state = gc->client_state_private;
@@ -4977,7 +4977,7 @@ __indirect_glIndexub(GLubyte c)
#define X_GLrop_Indexubv 194
void
__indirect_glIndexubv(const GLubyte * c)
__indirect_glIndexubv(const GLubyte *c)
{
__GLXcontext *const gc = __glXGetCurrentContext();
const GLuint cmdlen = 8;
@@ -7935,7 +7935,7 @@ __indirect_glVertexAttrib3svARB(GLuint index, const GLshort * v)
#define X_GLrop_VertexAttrib4NbvARB 4235
void
__indirect_glVertexAttrib4NbvARB(GLuint index, const GLbyte * v)
__indirect_glVertexAttrib4NbvARB(GLuint index, const GLbyte *v)
{
__GLXcontext *const gc = __glXGetCurrentContext();
const GLuint cmdlen = 12;
@@ -7999,7 +7999,7 @@ __indirect_glVertexAttrib4NubARB(GLuint index, GLubyte x, GLubyte y,
#define X_GLrop_VertexAttrib4NubvARB 4201
void
__indirect_glVertexAttrib4NubvARB(GLuint index, const GLubyte * v)
__indirect_glVertexAttrib4NubvARB(GLuint index, const GLubyte *v)
{
__GLXcontext *const gc = __glXGetCurrentContext();
const GLuint cmdlen = 12;
@@ -8044,7 +8044,7 @@ __indirect_glVertexAttrib4NusvARB(GLuint index, const GLushort * v)
#define X_GLrop_VertexAttrib4bvARB 4230
void
__indirect_glVertexAttrib4bvARB(GLuint index, const GLbyte * v)
__indirect_glVertexAttrib4bvARB(GLuint index, const GLbyte *v)
{
__GLXcontext *const gc = __glXGetCurrentContext();
const GLuint cmdlen = 12;
@@ -8176,7 +8176,7 @@ __indirect_glVertexAttrib4svARB(GLuint index, const GLshort * v)
#define X_GLrop_VertexAttrib4ubvARB 4232
void
__indirect_glVertexAttrib4ubvARB(GLuint index, const GLubyte * v)
__indirect_glVertexAttrib4ubvARB(GLuint index, const GLubyte *v)
{
__GLXcontext *const gc = __glXGetCurrentContext();
const GLuint cmdlen = 12;
@@ -8556,7 +8556,7 @@ __indirect_glSecondaryColor3bEXT(GLbyte red, GLbyte green, GLbyte blue)
#define X_GLrop_SecondaryColor3bvEXT 4126
void
__indirect_glSecondaryColor3bvEXT(const GLbyte * v)
__indirect_glSecondaryColor3bvEXT(const GLbyte *v)
{
generic_3_byte(X_GLrop_SecondaryColor3bvEXT, v);
}
@@ -8671,7 +8671,7 @@ __indirect_glSecondaryColor3ubEXT(GLubyte red, GLubyte green, GLubyte blue)
#define X_GLrop_SecondaryColor3ubvEXT 4131
void
__indirect_glSecondaryColor3ubvEXT(const GLubyte * v)
__indirect_glSecondaryColor3ubvEXT(const GLubyte *v)
{
generic_3_byte(X_GLrop_SecondaryColor3ubvEXT, v);
}
@@ -8943,7 +8943,7 @@ __indirect_glGetProgramParameterfvNV(GLenum target, GLuint index,
#define X_GLvop_GetProgramStringNV 1299
void
__indirect_glGetProgramStringNV(GLuint id, GLenum pname, GLubyte * program)
__indirect_glGetProgramStringNV(GLuint id, GLenum pname, GLubyte *program)
{
__GLXcontext *const gc = __glXGetCurrentContext();
Display *const dpy = gc->currentDpy;
@@ -9087,7 +9087,7 @@ __indirect_glIsProgramNV(GLuint program)
#define X_GLrop_LoadProgramNV 4183
void
__indirect_glLoadProgramNV(GLenum target, GLuint id, GLsizei len,
const GLubyte * program)
const GLubyte *program)
{
__GLXcontext *const gc = __glXGetCurrentContext();
const GLuint cmdlen = 16 + __GLX_PAD(len);
@@ -9656,7 +9656,7 @@ __indirect_glVertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z,
#define X_GLrop_VertexAttrib4ubvNV 4277
void
__indirect_glVertexAttrib4ubvNV(GLuint index, const GLubyte * v)
__indirect_glVertexAttrib4ubvNV(GLuint index, const GLubyte *v)
{
__GLXcontext *const gc = __glXGetCurrentContext();
const GLuint cmdlen = 12;
@@ -9887,7 +9887,7 @@ __indirect_glVertexAttribs4svNV(GLuint index, GLsizei n, const GLshort * v)
#define X_GLrop_VertexAttribs4ubvNV 4214
void
__indirect_glVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte * v)
__indirect_glVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte *v)
{
__GLXcontext *const gc = __glXGetCurrentContext();
const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
@@ -9951,7 +9951,7 @@ __indirect_glActiveStencilFaceEXT(GLenum face)
#define X_GLvop_GetProgramNamedParameterdvNV 1311
void
__indirect_glGetProgramNamedParameterdvNV(GLuint id, GLsizei len,
const GLubyte * name,
const GLubyte *name,
GLdouble * params)
{
__GLXcontext *const gc = __glXGetCurrentContext();
@@ -9975,7 +9975,7 @@ __indirect_glGetProgramNamedParameterdvNV(GLuint id, GLsizei len,
#define X_GLvop_GetProgramNamedParameterfvNV 1310
void
__indirect_glGetProgramNamedParameterfvNV(GLuint id, GLsizei len,
const GLubyte * name,
const GLubyte *name,
GLfloat * params)
{
__GLXcontext *const gc = __glXGetCurrentContext();
@@ -9999,7 +9999,7 @@ __indirect_glGetProgramNamedParameterfvNV(GLuint id, GLsizei len,
#define X_GLrop_ProgramNamedParameter4dvNV 4219
void
__indirect_glProgramNamedParameter4dNV(GLuint id, GLsizei len,
const GLubyte * name, GLdouble x,
const GLubyte *name, GLdouble x,
GLdouble y, GLdouble z, GLdouble w)
{
__GLXcontext *const gc = __glXGetCurrentContext();
@@ -10023,7 +10023,7 @@ __indirect_glProgramNamedParameter4dNV(GLuint id, GLsizei len,
#define X_GLrop_ProgramNamedParameter4dvNV 4219
void
__indirect_glProgramNamedParameter4dvNV(GLuint id, GLsizei len,
const GLubyte * name,
const GLubyte *name,
const GLdouble * v)
{
__GLXcontext *const gc = __glXGetCurrentContext();
@@ -10044,7 +10044,7 @@ __indirect_glProgramNamedParameter4dvNV(GLuint id, GLsizei len,
#define X_GLrop_ProgramNamedParameter4fvNV 4218
void
__indirect_glProgramNamedParameter4fNV(GLuint id, GLsizei len,
const GLubyte * name, GLfloat x,
const GLubyte *name, GLfloat x,
GLfloat y, GLfloat z, GLfloat w)
{
__GLXcontext *const gc = __glXGetCurrentContext();
@@ -10068,7 +10068,7 @@ __indirect_glProgramNamedParameter4fNV(GLuint id, GLsizei len,
#define X_GLrop_ProgramNamedParameter4fvNV 4218
void
__indirect_glProgramNamedParameter4fvNV(GLuint id, GLsizei len,
const GLubyte * name,
const GLubyte *name,
const GLfloat * v)
{
__GLXcontext *const gc = __glXGetCurrentContext();

View File

@@ -633,7 +633,7 @@ extern HIDDEN void __indirect_glGetProgramParameterfvNV(GLenum target, GLuint in
extern HIDDEN void __indirect_glGetProgramStringNV(GLuint id, GLenum pname, GLubyte * program);
extern HIDDEN void __indirect_glGetProgramivNV(GLuint id, GLenum pname, GLint * params);
extern HIDDEN void __indirect_glGetTrackMatrixivNV(GLenum target, GLuint address, GLenum pname, GLint * params);
extern HIDDEN void __indirect_glGetVertexAttribPointervNV(GLuint index, GLenum pname, GLvoid ** params);
extern HIDDEN void __indirect_glGetVertexAttribPointervNV(GLuint index, GLenum pname, GLvoid ** pointer);
extern HIDDEN void __indirect_glGetVertexAttribdvNV(GLuint index, GLenum pname, GLdouble * params);
extern HIDDEN void __indirect_glGetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat * params);
extern HIDDEN void __indirect_glGetVertexAttribivNV(GLuint index, GLenum pname, GLint * params);

View File

@@ -527,7 +527,7 @@ static GLubyte *
emit_DrawArrays_header_old( __GLXcontext * gc,
struct array_state_vector * arrays,
size_t * elements_per_request,
unsigned int * total_requests,
size_t * total_requests,
GLenum mode, GLsizei count )
{
size_t command_size;
@@ -640,7 +640,7 @@ emit_DrawArrays_old( GLenum mode, GLint first, GLsizei count )
GLubyte * pc;
size_t elements_per_request;
unsigned total_requests = 0;
size_t total_requests = 0;
unsigned i;
size_t total_sent = 0;
@@ -770,7 +770,7 @@ emit_DrawElements_old( GLenum mode, GLsizei count, GLenum type,
GLubyte * pc;
size_t elements_per_request;
unsigned total_requests = 0;
size_t total_requests = 0;
unsigned i;
unsigned req;

2
src/mesa/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
*/gen_matypes
*/matypes.h

View File

@@ -142,7 +142,7 @@ depend: $(ALL_SOURCES)
@ echo "running $(MKDEP)"
@ touch depend
@$(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(ALL_SOURCES) \
> /dev/null
> /dev/null 2>/dev/null
subdirs:

View File

@@ -1,375 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 5.1
*
* Copyright (C) 1999-2002 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.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
*/
#include "glheader.h"
#include "macros.h"
#include "imports.h"
#include "mtypes.h"
#include "array_cache/ac_context.h"
/*
* Initialize the array fallbacks. That is, by default the fallback arrays
* point into the current vertex attribute values in ctx->Current.Attrib[]
*/
static void _ac_fallbacks_init( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
struct gl_client_array *cl;
GLuint i;
cl = &ac->Fallback.Normal;
cl->Size = 3;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 0;
cl->Ptr = (GLubyte *) ctx->Current.Attrib[VERT_ATTRIB_NORMAL];
cl->Enabled = 1;
cl->Flags = CA_CLIENT_DATA; /* hack */
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
cl = &ac->Fallback.Color;
cl->Size = 4;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 0;
cl->Ptr = (GLubyte *) ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
cl->Enabled = 1;
cl->Flags = CA_CLIENT_DATA; /* hack */
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
cl = &ac->Fallback.SecondaryColor;
cl->Size = 3;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 0;
cl->Ptr = (GLubyte *) ctx->Current.Attrib[VERT_ATTRIB_COLOR1];
cl->Enabled = 1;
cl->Flags = CA_CLIENT_DATA; /* hack */
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
cl = &ac->Fallback.FogCoord;
cl->Size = 1;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 0;
cl->Ptr = (GLubyte *) &ctx->Current.Attrib[VERT_ATTRIB_FOG];
cl->Enabled = 1;
cl->Flags = CA_CLIENT_DATA; /* hack */
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
cl = &ac->Fallback.Index;
cl->Size = 1;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 0;
cl->Ptr = (GLubyte *) &ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX];
cl->Enabled = 1;
cl->Flags = CA_CLIENT_DATA; /* hack */
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
for (i = 0 ; i < MAX_TEXTURE_COORD_UNITS ; i++) {
cl = &ac->Fallback.TexCoord[i];
cl->Size = 4;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 0;
cl->Ptr = (GLubyte *) ctx->Current.Attrib[VERT_ATTRIB_TEX0 + i];
cl->Enabled = 1;
cl->Flags = CA_CLIENT_DATA; /* hack */
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
}
cl = &ac->Fallback.EdgeFlag;
cl->Size = 1;
cl->Type = GL_UNSIGNED_BYTE;
cl->Stride = 0;
cl->StrideB = 0;
cl->Ptr = (GLubyte *) &ctx->Current.EdgeFlag;
cl->Enabled = 1;
cl->Flags = CA_CLIENT_DATA; /* hack */
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
for (i = 0; i < VERT_ATTRIB_MAX; i++) {
cl = &ac->Fallback.Attrib[i];
cl->Size = 4;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 0;
cl->Ptr = (GLubyte *) ctx->Current.Attrib[i];
cl->Enabled = 1;
cl->Flags = CA_CLIENT_DATA; /* hack */
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
}
}
/*
* Initialize the array cache pointers, types, strides, etc.
*/
static void _ac_cache_init( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
struct gl_client_array *cl;
GLuint size = ctx->Const.MaxArrayLockSize + MAX_CLIPPED_VERTICES;
GLuint i;
cl = &ac->Cache.Vertex;
cl->Size = 4;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 4 * sizeof(GLfloat);
cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
cl->Enabled = 1;
cl->Flags = 0;
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
cl = &ac->Cache.Normal;
cl->Size = 3;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 3 * sizeof(GLfloat);
cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
cl->Enabled = 1;
cl->Flags = 0;
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
cl = &ac->Cache.Color;
cl->Size = 4;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 4 * sizeof(GLfloat);
cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
cl->Enabled = 1;
cl->Flags = 0;
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
cl = &ac->Cache.SecondaryColor;
cl->Size = 3;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 4 * sizeof(GLfloat);
cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
cl->Enabled = 1;
cl->Flags = 0;
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
cl = &ac->Cache.FogCoord;
cl->Size = 1;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = sizeof(GLfloat);
cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
cl->Enabled = 1;
cl->Flags = 0;
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
cl = &ac->Cache.Index;
cl->Size = 1;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = sizeof(GLfloat);
cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
cl->Enabled = 1;
cl->Flags = 0;
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) {
cl = &ac->Cache.TexCoord[i];
cl->Size = 4;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 4 * sizeof(GLfloat);
cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
cl->Enabled = 1;
cl->Flags = 0;
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
}
cl = &ac->Cache.EdgeFlag;
cl->Size = 1;
cl->Type = GL_UNSIGNED_BYTE;
cl->Stride = 0;
cl->StrideB = sizeof(GLubyte);
cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
cl->Enabled = 1;
cl->Flags = 0;
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
for (i = 0 ; i < VERT_ATTRIB_MAX; i++) {
cl = &ac->Cache.Attrib[i];
cl->Size = 4;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 4 * sizeof(GLfloat);
cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
cl->Enabled = 1;
cl->Flags = 0;
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
}
}
/* This storage used to hold translated client data if type or stride
* need to be fixed.
*/
static void _ac_elts_init( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
GLuint size = 1000;
ac->Elts = (GLuint *)MALLOC( sizeof(GLuint) * size );
ac->elt_size = size;
}
static void _ac_raw_init( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
GLuint i;
ac->Raw.Color = ac->Fallback.Color;
ac->Raw.EdgeFlag = ac->Fallback.EdgeFlag;
ac->Raw.FogCoord = ac->Fallback.FogCoord;
ac->Raw.Index = ac->Fallback.Index;
ac->Raw.Normal = ac->Fallback.Normal;
ac->Raw.SecondaryColor = ac->Fallback.SecondaryColor;
ac->Raw.Vertex = ctx->Array.ArrayObj->Vertex;
ac->IsCached.Color = GL_FALSE;
ac->IsCached.EdgeFlag = GL_FALSE;
ac->IsCached.FogCoord = GL_FALSE;
ac->IsCached.Index = GL_FALSE;
ac->IsCached.Normal = GL_FALSE;
ac->IsCached.SecondaryColor = GL_FALSE;
ac->IsCached.Vertex = GL_FALSE;
for (i = 0 ; i < MAX_TEXTURE_COORD_UNITS ; i++) {
ac->Raw.TexCoord[i] = ac->Fallback.TexCoord[i];
ac->IsCached.TexCoord[i] = GL_FALSE;
}
for (i = 0 ; i < VERT_ATTRIB_MAX ; i++) {
ac->Raw.Attrib[i] = ac->Fallback.Attrib[i];
ac->IsCached.Attrib[i] = GL_FALSE;
}
}
GLboolean _ac_CreateContext( GLcontext *ctx )
{
ctx->acache_context = CALLOC(sizeof(ACcontext));
if (ctx->acache_context) {
_ac_cache_init( ctx );
_ac_fallbacks_init( ctx );
_ac_raw_init( ctx );
_ac_elts_init( ctx );
return GL_TRUE;
}
return GL_FALSE;
}
void _ac_DestroyContext( GLcontext *ctx )
{
struct gl_buffer_object *nullObj = ctx->Array.NullBufferObj;
ACcontext *ac = AC_CONTEXT(ctx);
GLint i;
/* only free vertex data if it's really a pointer to vertex data and
* not an offset into a buffer object.
*/
if (ac->Cache.Vertex.Ptr && ac->Cache.Vertex.BufferObj == nullObj)
FREE( (void *) ac->Cache.Vertex.Ptr );
if (ac->Cache.Normal.Ptr && ac->Cache.Normal.BufferObj == nullObj)
FREE( (void *) ac->Cache.Normal.Ptr );
if (ac->Cache.Color.Ptr && ac->Cache.Color.BufferObj == nullObj)
FREE( (void *) ac->Cache.Color.Ptr );
if (ac->Cache.SecondaryColor.Ptr && ac->Cache.SecondaryColor.BufferObj == nullObj)
FREE( (void *) ac->Cache.SecondaryColor.Ptr );
if (ac->Cache.EdgeFlag.Ptr && ac->Cache.EdgeFlag.BufferObj == nullObj)
FREE( (void *) ac->Cache.EdgeFlag.Ptr );
if (ac->Cache.Index.Ptr && ac->Cache.Index.BufferObj == nullObj)
FREE( (void *) ac->Cache.Index.Ptr );
if (ac->Cache.FogCoord.Ptr && ac->Cache.FogCoord.BufferObj == nullObj)
FREE( (void *) ac->Cache.FogCoord.Ptr );
for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) {
if (ac->Cache.TexCoord[i].Ptr && ac->Cache.TexCoord[i].BufferObj == nullObj)
FREE( (void *) ac->Cache.TexCoord[i].Ptr );
}
for (i = 0; i < VERT_ATTRIB_MAX; i++) {
if (ac->Cache.Attrib[i].Ptr && ac->Cache.Attrib[i].BufferObj == nullObj)
FREE( (void *) ac->Cache.Attrib[i].Ptr );
}
if (ac->Elts)
FREE( ac->Elts );
/* Free the context structure itself */
FREE(ac);
ctx->acache_context = NULL;
}
void _ac_InvalidateState( GLcontext *ctx, GLuint new_state )
{
AC_CONTEXT(ctx)->NewState |= new_state;
AC_CONTEXT(ctx)->NewArrayState |= ctx->Array.NewState;
}

View File

@@ -1,99 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 5.1
*
* Copyright (C) 1999-2002 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.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
*/
#ifndef _AC_CONTEXT_H
#define _AC_CONTEXT_H
#include "glheader.h"
#include "mtypes.h"
#include "array_cache/acache.h"
/* These are used to make the ctx->Current values look like
* arrays (with zero StrideB).
*/
struct ac_arrays {
struct gl_client_array Vertex;
struct gl_client_array Normal;
struct gl_client_array Color;
struct gl_client_array SecondaryColor;
struct gl_client_array FogCoord;
struct gl_client_array Index;
struct gl_client_array TexCoord[MAX_TEXTURE_COORD_UNITS];
struct gl_client_array EdgeFlag;
struct gl_client_array Attrib[VERT_ATTRIB_MAX]; /* GL_NV_vertex_program */
};
struct ac_array_pointers {
struct gl_client_array *Vertex;
struct gl_client_array *Normal;
struct gl_client_array *Color;
struct gl_client_array *SecondaryColor;
struct gl_client_array *FogCoord;
struct gl_client_array *Index;
struct gl_client_array *TexCoord[MAX_TEXTURE_COORD_UNITS];
struct gl_client_array *EdgeFlag;
struct gl_client_array *Attrib[VERT_ATTRIB_MAX]; /* GL_NV_vertex_program */
};
struct ac_array_flags {
GLboolean Vertex;
GLboolean Normal;
GLboolean Color;
GLboolean SecondaryColor;
GLboolean FogCoord;
GLboolean Index;
GLboolean TexCoord[MAX_TEXTURE_COORD_UNITS];
GLboolean EdgeFlag;
GLboolean Attrib[VERT_ATTRIB_MAX]; /* GL_NV_vertex_program */
};
typedef struct {
GLuint NewState; /* not needed? */
GLuint NewArrayState;
/* Facility for importing and caching array data:
*/
struct ac_arrays Fallback;
struct ac_arrays Cache;
struct ac_arrays Raw;
struct ac_array_flags IsCached;
GLuint start;
GLuint count;
/* Facility for importing element lists:
*/
GLuint *Elts;
GLuint elt_size;
} ACcontext;
#define AC_CONTEXT(ctx) ((ACcontext *)ctx->acache_context)
#endif

View File

@@ -1,922 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 6.5
*
* Copyright (C) 1999-2006 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.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
*/
#include "glheader.h"
#include "macros.h"
#include "imports.h"
#include "mtypes.h"
#include "math/m_translate.h"
#include "array_cache/ac_context.h"
#include "math/m_translate.h"
#define STRIDE_ARRAY( array, offset ) \
do { \
GLubyte *tmp = ADD_POINTERS( (array).BufferObj->Data, (array).Ptr ) \
+ (offset) * (array).StrideB; \
(array).Ptr = tmp; \
} while (0)
/* Set the array pointer back to its source when the cached data is
* invalidated:
*/
static void
reset_texcoord( GLcontext *ctx, GLuint unit )
{
ACcontext *ac = AC_CONTEXT(ctx);
if (ctx->Array.ArrayObj->TexCoord[unit].Enabled) {
ac->Raw.TexCoord[unit] = ctx->Array.ArrayObj->TexCoord[unit];
STRIDE_ARRAY(ac->Raw.TexCoord[unit], ac->start);
}
else {
ac->Raw.TexCoord[unit] = ac->Fallback.TexCoord[unit];
if (ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][3] != 1.0)
ac->Raw.TexCoord[unit].Size = 4;
else if (ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][2] != 0.0)
ac->Raw.TexCoord[unit].Size = 3;
else
ac->Raw.TexCoord[unit].Size = 2;
}
ac->IsCached.TexCoord[unit] = GL_FALSE;
ac->NewArrayState &= ~_NEW_ARRAY_TEXCOORD(unit);
}
static void
reset_vertex( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
ASSERT(ctx->Array.ArrayObj->Vertex.Enabled
|| (ctx->VertexProgram._Enabled && ctx->Array.ArrayObj->VertexAttrib[0].Enabled));
ac->Raw.Vertex = ctx->Array.ArrayObj->Vertex;
STRIDE_ARRAY(ac->Raw.Vertex, ac->start);
ac->IsCached.Vertex = GL_FALSE;
ac->NewArrayState &= ~_NEW_ARRAY_VERTEX;
}
static void
reset_normal( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
if (ctx->Array.ArrayObj->Normal.Enabled) {
ac->Raw.Normal = ctx->Array.ArrayObj->Normal;
STRIDE_ARRAY(ac->Raw.Normal, ac->start);
}
else {
ac->Raw.Normal = ac->Fallback.Normal;
}
ac->IsCached.Normal = GL_FALSE;
ac->NewArrayState &= ~_NEW_ARRAY_NORMAL;
}
static void
reset_color( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
if (ctx->Array.ArrayObj->Color.Enabled) {
ac->Raw.Color = ctx->Array.ArrayObj->Color;
STRIDE_ARRAY(ac->Raw.Color, ac->start);
}
else
ac->Raw.Color = ac->Fallback.Color;
ac->IsCached.Color = GL_FALSE;
ac->NewArrayState &= ~_NEW_ARRAY_COLOR0;
}
static void
reset_secondarycolor( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
if (ctx->Array.ArrayObj->SecondaryColor.Enabled) {
ac->Raw.SecondaryColor = ctx->Array.ArrayObj->SecondaryColor;
STRIDE_ARRAY(ac->Raw.SecondaryColor, ac->start);
}
else
ac->Raw.SecondaryColor = ac->Fallback.SecondaryColor;
ac->IsCached.SecondaryColor = GL_FALSE;
ac->NewArrayState &= ~_NEW_ARRAY_COLOR1;
}
static void
reset_index( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
if (ctx->Array.ArrayObj->Index.Enabled) {
ac->Raw.Index = ctx->Array.ArrayObj->Index;
STRIDE_ARRAY(ac->Raw.Index, ac->start);
}
else
ac->Raw.Index = ac->Fallback.Index;
ac->IsCached.Index = GL_FALSE;
ac->NewArrayState &= ~_NEW_ARRAY_INDEX;
}
static void
reset_fogcoord( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
if (ctx->Array.ArrayObj->FogCoord.Enabled) {
ac->Raw.FogCoord = ctx->Array.ArrayObj->FogCoord;
STRIDE_ARRAY(ac->Raw.FogCoord, ac->start);
}
else
ac->Raw.FogCoord = ac->Fallback.FogCoord;
ac->IsCached.FogCoord = GL_FALSE;
ac->NewArrayState &= ~_NEW_ARRAY_FOGCOORD;
}
static void
reset_edgeflag( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
if (ctx->Array.ArrayObj->EdgeFlag.Enabled) {
ac->Raw.EdgeFlag = ctx->Array.ArrayObj->EdgeFlag;
STRIDE_ARRAY(ac->Raw.EdgeFlag, ac->start);
}
else
ac->Raw.EdgeFlag = ac->Fallback.EdgeFlag;
ac->IsCached.EdgeFlag = GL_FALSE;
ac->NewArrayState &= ~_NEW_ARRAY_EDGEFLAG;
}
/**
* \param index the generic vertex array number.
*/
static void
reset_attrib( GLcontext *ctx, GLuint index )
{
ACcontext *ac = AC_CONTEXT(ctx);
if (ctx->Array.ArrayObj->VertexAttrib[index].Enabled) {
ac->Raw.Attrib[index] = ctx->Array.ArrayObj->VertexAttrib[index];
STRIDE_ARRAY(ac->Raw.Attrib[index], ac->start);
}
else
ac->Raw.Attrib[index] = ac->Fallback.Attrib[index];
ac->IsCached.Attrib[index] = GL_FALSE;
ac->NewArrayState &= ~_NEW_ARRAY_ATTRIB(index);
}
/**
* Generic import function for color data
*/
static void
import( const GLcontext *ctx,
GLenum destType,
struct gl_client_array *to,
const struct gl_client_array *from )
{
const ACcontext *ac = AC_CONTEXT(ctx);
if (destType == 0)
destType = from->Type;
switch (destType) {
case GL_FLOAT:
_math_trans_4fn( (GLfloat (*)[4]) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
from->Size,
0,
ac->count - ac->start);
to->StrideB = 4 * sizeof(GLfloat);
to->Type = GL_FLOAT;
break;
case GL_UNSIGNED_BYTE:
_math_trans_4ub( (GLubyte (*)[4]) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
from->Size,
0,
ac->count - ac->start);
to->StrideB = 4 * sizeof(GLubyte);
to->Type = GL_UNSIGNED_BYTE;
break;
case GL_UNSIGNED_SHORT:
_math_trans_4us( (GLushort (*)[4]) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
from->Size,
0,
ac->count - ac->start);
to->StrideB = 4 * sizeof(GLushort);
to->Type = GL_UNSIGNED_SHORT;
break;
default:
_mesa_problem(ctx, "Unexpected dest format in import()");
break;
}
}
/*
* Functions to import array ranges with specified types and strides.
* For example, if the vertex data is GLshort[2] and we want GLfloat[3]
* we'll use an import function to do the data conversion.
*/
static void
import_texcoord( GLcontext *ctx, GLuint unit, GLenum type, GLuint stride )
{
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.TexCoord[unit];
struct gl_client_array *to = &ac->Cache.TexCoord[unit];
(void) type; (void) stride;
ASSERT(unit < ctx->Const.MaxTextureCoordUnits);
/* Limited choices at this stage:
*/
ASSERT(type == GL_FLOAT);
ASSERT(stride == 4*sizeof(GLfloat) || stride == 0);
ASSERT(ac->count - ac->start < ctx->Const.MaxArrayLockSize);
_math_trans_4f( (GLfloat (*)[4]) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
from->Size,
0,
ac->count - ac->start);
to->Size = from->Size;
to->StrideB = 4 * sizeof(GLfloat);
to->Type = GL_FLOAT;
ac->IsCached.TexCoord[unit] = GL_TRUE;
}
static void
import_vertex( GLcontext *ctx, GLenum type, GLuint stride )
{
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.Vertex;
struct gl_client_array *to = &ac->Cache.Vertex;
(void) type; (void) stride;
/* Limited choices at this stage:
*/
ASSERT(type == GL_FLOAT);
ASSERT(stride == 4*sizeof(GLfloat) || stride == 0);
_math_trans_4f( (GLfloat (*)[4]) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
from->Size,
0,
ac->count - ac->start);
to->Size = from->Size;
to->StrideB = 4 * sizeof(GLfloat);
to->Type = GL_FLOAT;
ac->IsCached.Vertex = GL_TRUE;
}
static void
import_normal( GLcontext *ctx, GLenum type, GLuint stride )
{
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.Normal;
struct gl_client_array *to = &ac->Cache.Normal;
(void) type; (void) stride;
/* Limited choices at this stage:
*/
ASSERT(type == GL_FLOAT);
ASSERT(stride == 3*sizeof(GLfloat) || stride == 0);
_math_trans_3fn((GLfloat (*)[3]) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
0,
ac->count - ac->start);
to->StrideB = 3 * sizeof(GLfloat);
to->Type = GL_FLOAT;
ac->IsCached.Normal = GL_TRUE;
}
static void
import_color( GLcontext *ctx, GLenum type, GLuint stride )
{
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.Color;
struct gl_client_array *to = &ac->Cache.Color;
(void) stride;
import( ctx, type, to, from );
ac->IsCached.Color = GL_TRUE;
}
static void
import_index( GLcontext *ctx, GLenum type, GLuint stride )
{
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.Index;
struct gl_client_array *to = &ac->Cache.Index;
(void) type; (void) stride;
/* Limited choices at this stage:
*/
ASSERT(type == GL_UNSIGNED_INT);
ASSERT(stride == sizeof(GLuint) || stride == 0);
_math_trans_1ui( (GLuint *) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
0,
ac->count - ac->start);
to->StrideB = sizeof(GLuint);
to->Type = GL_UNSIGNED_INT;
ac->IsCached.Index = GL_TRUE;
}
static void
import_secondarycolor( GLcontext *ctx, GLenum type, GLuint stride )
{
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.SecondaryColor;
struct gl_client_array *to = &ac->Cache.SecondaryColor;
(void) stride;
import( ctx, type, to, from );
ac->IsCached.SecondaryColor = GL_TRUE;
}
static void
import_fogcoord( GLcontext *ctx, GLenum type, GLuint stride )
{
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.FogCoord;
struct gl_client_array *to = &ac->Cache.FogCoord;
(void) type; (void) stride;
/* Limited choices at this stage:
*/
ASSERT(type == GL_FLOAT);
ASSERT(stride == sizeof(GLfloat) || stride == 0);
_math_trans_1f( (GLfloat *) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
0,
ac->count - ac->start);
to->StrideB = sizeof(GLfloat);
to->Type = GL_FLOAT;
ac->IsCached.FogCoord = GL_TRUE;
}
static void
import_edgeflag( GLcontext *ctx, GLenum type, GLuint stride )
{
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.EdgeFlag;
struct gl_client_array *to = &ac->Cache.EdgeFlag;
(void) type; (void) stride;
/* Limited choices at this stage:
*/
ASSERT(type == GL_UNSIGNED_BYTE);
ASSERT(stride == sizeof(GLubyte) || stride == 0);
_math_trans_1ub( (GLubyte *) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
0,
ac->count - ac->start);
to->StrideB = sizeof(GLubyte);
to->Type = GL_UNSIGNED_BYTE;
ac->IsCached.EdgeFlag = GL_TRUE;
}
/**
* \param index the generic vertex array number
*/
static void
import_attrib( GLcontext *ctx, GLuint index, GLenum type, GLuint stride )
{
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.Attrib[index];
struct gl_client_array *to = &ac->Cache.Attrib[index];
(void) type; (void) stride;
ASSERT(index < MAX_VERTEX_PROGRAM_ATTRIBS);
/* Limited choices at this stage:
*/
ASSERT(type == GL_FLOAT);
ASSERT(stride == 4*sizeof(GLfloat) || stride == 0);
ASSERT(ac->count - ac->start < ctx->Const.MaxArrayLockSize);
if (from->Normalized) {
_math_trans_4fn( (GLfloat (*)[4]) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
from->Size,
0,
ac->count - ac->start);
}
else {
_math_trans_4f( (GLfloat (*)[4]) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
from->Size,
0,
ac->count - ac->start);
}
to->Size = from->Size;
to->StrideB = 4 * sizeof(GLfloat);
to->Type = GL_FLOAT;
ac->IsCached.Attrib[index] = GL_TRUE;
}
/*
* Externals to request arrays with specific properties:
*/
struct gl_client_array *
_ac_import_texcoord( GLcontext *ctx,
GLuint unit,
GLenum type,
GLuint reqstride,
GLuint reqsize,
GLboolean reqwriteable,
GLboolean *writeable )
{
ACcontext *ac = AC_CONTEXT(ctx);
ASSERT(unit < MAX_TEXTURE_COORD_UNITS);
/* Can we keep the existing version?
*/
if (ac->NewArrayState & _NEW_ARRAY_TEXCOORD(unit))
reset_texcoord( ctx, unit );
/* Is the request impossible?
*/
if (reqsize != 0 && ac->Raw.TexCoord[unit].Size > (GLint) reqsize)
return NULL;
/* Do we need to pull in a copy of the client data:
*/
if (ac->Raw.TexCoord[unit].Type != type ||
(reqstride != 0 && ac->Raw.TexCoord[unit].StrideB != (GLint)reqstride) ||
reqwriteable)
{
if (!ac->IsCached.TexCoord[unit])
import_texcoord(ctx, unit, type, reqstride );
*writeable = GL_TRUE;
return &ac->Cache.TexCoord[unit];
}
else {
*writeable = GL_FALSE;
return &ac->Raw.TexCoord[unit];
}
}
struct gl_client_array *
_ac_import_vertex( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLuint reqsize,
GLboolean reqwriteable,
GLboolean *writeable )
{
ACcontext *ac = AC_CONTEXT(ctx);
/* Can we keep the existing version?
*/
if (ac->NewArrayState & _NEW_ARRAY_VERTEX)
reset_vertex( ctx );
/* Is the request impossible?
*/
if (reqsize != 0 && ac->Raw.Vertex.Size > (GLint) reqsize)
return NULL;
/* Do we need to pull in a copy of the client data:
*/
if (ac->Raw.Vertex.Type != type ||
(reqstride != 0 && ac->Raw.Vertex.StrideB != (GLint) reqstride) ||
reqwriteable)
{
if (!ac->IsCached.Vertex)
import_vertex(ctx, type, reqstride );
*writeable = GL_TRUE;
return &ac->Cache.Vertex;
}
else {
*writeable = GL_FALSE;
return &ac->Raw.Vertex;
}
}
struct gl_client_array *
_ac_import_normal( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLboolean reqwriteable,
GLboolean *writeable )
{
ACcontext *ac = AC_CONTEXT(ctx);
/* Can we keep the existing version?
*/
if (ac->NewArrayState & _NEW_ARRAY_NORMAL)
reset_normal( ctx );
/* Do we need to pull in a copy of the client data:
*/
if (ac->Raw.Normal.Type != type ||
(reqstride != 0 && ac->Raw.Normal.StrideB != (GLint) reqstride) ||
reqwriteable)
{
if (!ac->IsCached.Normal)
import_normal(ctx, type, reqstride );
*writeable = GL_TRUE;
return &ac->Cache.Normal;
}
else {
*writeable = GL_FALSE;
return &ac->Raw.Normal;
}
}
struct gl_client_array *
_ac_import_color( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLuint reqsize,
GLboolean reqwriteable,
GLboolean *writeable )
{
ACcontext *ac = AC_CONTEXT(ctx);
/* Can we keep the existing version?
*/
if (ac->NewArrayState & _NEW_ARRAY_COLOR0)
reset_color( ctx );
/* Is the request impossible?
*/
if (reqsize != 0 && ac->Raw.Color.Size > (GLint) reqsize) {
return NULL;
}
/* Do we need to pull in a copy of the client data:
*/
if ((type != 0 && ac->Raw.Color.Type != type) ||
(reqstride != 0 && ac->Raw.Color.StrideB != (GLint) reqstride) ||
reqwriteable)
{
if (!ac->IsCached.Color) {
import_color(ctx, type, reqstride );
}
*writeable = GL_TRUE;
return &ac->Cache.Color;
}
else {
*writeable = GL_FALSE;
return &ac->Raw.Color;
}
}
struct gl_client_array *
_ac_import_index( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLboolean reqwriteable,
GLboolean *writeable )
{
ACcontext *ac = AC_CONTEXT(ctx);
/* Can we keep the existing version?
*/
if (ac->NewArrayState & _NEW_ARRAY_INDEX)
reset_index( ctx );
/* Do we need to pull in a copy of the client data:
*/
if (ac->Raw.Index.Type != type ||
(reqstride != 0 && ac->Raw.Index.StrideB != (GLint) reqstride) ||
reqwriteable)
{
if (!ac->IsCached.Index)
import_index(ctx, type, reqstride );
*writeable = GL_TRUE;
return &ac->Cache.Index;
}
else {
*writeable = GL_FALSE;
return &ac->Raw.Index;
}
}
struct gl_client_array *
_ac_import_secondarycolor( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLuint reqsize,
GLboolean reqwriteable,
GLboolean *writeable )
{
ACcontext *ac = AC_CONTEXT(ctx);
/* Can we keep the existing version?
*/
if (ac->NewArrayState & _NEW_ARRAY_COLOR1)
reset_secondarycolor( ctx );
/* Is the request impossible?
*/
if (reqsize != 0 && ac->Raw.SecondaryColor.Size > (GLint) reqsize)
return NULL;
/* Do we need to pull in a copy of the client data:
*/
if ((type != 0 && ac->Raw.SecondaryColor.Type != type) ||
(reqstride != 0 && ac->Raw.SecondaryColor.StrideB != (GLint)reqstride) ||
reqwriteable)
{
if (!ac->IsCached.SecondaryColor)
import_secondarycolor(ctx, type, reqstride );
*writeable = GL_TRUE;
return &ac->Cache.SecondaryColor;
}
else {
*writeable = GL_FALSE;
return &ac->Raw.SecondaryColor;
}
}
struct gl_client_array *
_ac_import_fogcoord( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLboolean reqwriteable,
GLboolean *writeable )
{
ACcontext *ac = AC_CONTEXT(ctx);
/* Can we keep the existing version?
*/
if (ac->NewArrayState & _NEW_ARRAY_FOGCOORD)
reset_fogcoord( ctx );
/* Do we need to pull in a copy of the client data:
*/
if (ac->Raw.FogCoord.Type != type ||
(reqstride != 0 && ac->Raw.FogCoord.StrideB != (GLint) reqstride) ||
reqwriteable)
{
if (!ac->IsCached.FogCoord)
import_fogcoord(ctx, type, reqstride );
*writeable = GL_TRUE;
return &ac->Cache.FogCoord;
}
else {
*writeable = GL_FALSE;
return &ac->Raw.FogCoord;
}
}
struct gl_client_array *
_ac_import_edgeflag( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLboolean reqwriteable,
GLboolean *writeable )
{
ACcontext *ac = AC_CONTEXT(ctx);
/* Can we keep the existing version?
*/
if (ac->NewArrayState & _NEW_ARRAY_EDGEFLAG)
reset_edgeflag( ctx );
/* Do we need to pull in a copy of the client data:
*/
if (ac->Raw.EdgeFlag.Type != type ||
(reqstride != 0 && ac->Raw.EdgeFlag.StrideB != (GLint) reqstride) ||
reqwriteable)
{
if (!ac->IsCached.EdgeFlag)
import_edgeflag(ctx, type, reqstride );
*writeable = GL_TRUE;
return &ac->Cache.EdgeFlag;
}
else {
*writeable = GL_FALSE;
return &ac->Raw.EdgeFlag;
}
}
/**
* For GL_ARB/NV_vertex_program
* \param index index of the vertex array, starting at zero.
*/
struct gl_client_array *
_ac_import_attrib( GLcontext *ctx,
GLuint index,
GLenum type,
GLuint reqstride,
GLuint reqsize,
GLboolean reqwriteable,
GLboolean *writeable )
{
ACcontext *ac = AC_CONTEXT(ctx);
ASSERT(index < VERT_ATTRIB_MAX);
/* Can we keep the existing version?
*/
if (ac->NewArrayState & _NEW_ARRAY_ATTRIB(index))
reset_attrib( ctx, index );
/* Is the request impossible?
*/
if (reqsize != 0 && ac->Raw.Attrib[index].Size > (GLint) reqsize)
return NULL;
/* Do we need to pull in a copy of the client data:
*/
if (ac->Raw.Attrib[index].Type != type ||
(reqstride != 0 && ac->Raw.Attrib[index].StrideB != (GLint)reqstride) ||
reqwriteable)
{
if (!ac->IsCached.Attrib[index])
import_attrib(ctx, index, type, reqstride );
*writeable = GL_TRUE;
return &ac->Cache.Attrib[index];
}
else {
*writeable = GL_FALSE;
return &ac->Raw.Attrib[index];
}
}
/* Clients must call this function to validate state and set bounds
* before importing any data:
*/
void
_ac_import_range( GLcontext *ctx, GLuint start, GLuint count )
{
ACcontext *ac = AC_CONTEXT(ctx);
if (!ctx->Array.LockCount) {
/* Not locked, discard cached data. Changes to lock
* status are caught via. _ac_invalidate_state().
*/
ac->NewArrayState = _NEW_ARRAY_ALL;
ac->start = start;
ac->count = count;
}
else {
/* Locked, discard data for any disabled arrays. Require that
* the whole locked range always be dealt with, otherwise hard to
* maintain cached data in the face of clipping.
*/
ac->NewArrayState |= ~ctx->Array.ArrayObj->_Enabled;
ac->start = ctx->Array.LockFirst;
ac->count = ctx->Array.LockCount;
ASSERT(ac->start == start); /* hmm? */
ASSERT(ac->count == count);
}
}
/* Additional convienence function for importing the element list
* for glDrawElements() and glDrawRangeElements().
*/
CONST void *
_ac_import_elements( GLcontext *ctx,
GLenum new_type,
GLuint count,
GLenum old_type,
CONST void *indices )
{
ACcontext *ac = AC_CONTEXT(ctx);
if (old_type == new_type)
return indices;
if (ac->elt_size < count * sizeof(GLuint)) {
if (ac->Elts) FREE(ac->Elts);
while (ac->elt_size < count * sizeof(GLuint))
ac->elt_size *= 2;
ac->Elts = (GLuint *) MALLOC(ac->elt_size);
}
switch (new_type) {
case GL_UNSIGNED_BYTE:
ASSERT(0);
return NULL;
case GL_UNSIGNED_SHORT:
ASSERT(0);
return NULL;
case GL_UNSIGNED_INT: {
GLuint *out = (GLuint *)ac->Elts;
GLuint i;
switch (old_type) {
case GL_UNSIGNED_BYTE: {
CONST GLubyte *in = (CONST GLubyte *)indices;
for (i = 0 ; i < count ; i++)
out[i] = in[i];
break;
}
case GL_UNSIGNED_SHORT: {
CONST GLushort *in = (CONST GLushort *)indices;
for (i = 0 ; i < count ; i++)
out[i] = in[i];
break;
}
default:
ASSERT(0);
}
return (CONST void *)out;
}
default:
ASSERT(0);
break;
}
return NULL;
}

View File

@@ -1,132 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 4.1
*
* Copyright (C) 1999-2002 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.
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
*/
#ifndef _ARRAYCACHE_H
#define _ARRAYCACHE_H
#include "mtypes.h"
extern GLboolean
_ac_CreateContext( GLcontext *ctx );
extern void
_ac_DestroyContext( GLcontext *ctx );
extern void
_ac_InvalidateState( GLcontext *ctx, GLuint new_state );
extern struct gl_client_array *
_ac_import_vertex( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLuint reqsize,
GLboolean reqwritable,
GLboolean *writable );
extern struct gl_client_array *
_ac_import_normal( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLboolean reqwritable,
GLboolean *writable );
extern struct gl_client_array *
_ac_import_color( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLuint reqsize,
GLboolean reqwritable,
GLboolean *writable );
extern struct gl_client_array *
_ac_import_index( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLboolean reqwritable,
GLboolean *writable );
extern struct gl_client_array *
_ac_import_secondarycolor( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLuint reqsize,
GLboolean reqwritable,
GLboolean *writable );
extern struct gl_client_array *
_ac_import_fogcoord( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLboolean reqwritable,
GLboolean *writable );
extern struct gl_client_array *
_ac_import_edgeflag( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLboolean reqwritable,
GLboolean *writable );
extern struct gl_client_array *
_ac_import_texcoord( GLcontext *ctx,
GLuint unit,
GLenum type,
GLuint reqstride,
GLuint reqsize,
GLboolean reqwritable,
GLboolean *writable );
extern struct gl_client_array *
_ac_import_attrib( GLcontext *ctx,
GLuint index,
GLenum type,
GLuint reqstride,
GLuint reqsize,
GLboolean reqwritable,
GLboolean *writable );
/* Clients must call this function to validate state and set bounds
* before importing any data:
*/
extern void
_ac_import_range( GLcontext *ctx, GLuint start, GLuint count );
/* Additional convenience function:
*/
extern CONST void *
_ac_import_elements( GLcontext *ctx,
GLenum new_type,
GLuint count,
GLenum old_type,
CONST void *indices );
#endif

View File

@@ -1,37 +0,0 @@
# Makefile for core library for VMS
# contributed by Jouk Jansen joukj@hrem.stm.tudelft.nl
# Last revision : 16 June 2003
.first
define gl [---.include.gl]
define math [-.math]
define array_cache [-.array_cache]
.include [---]mms-config.
##### MACROS #####
VPATH = RCS
INCDIR = [---.include],[-.main],[-.glapi]
LIBDIR = [---.lib]
CFLAGS = /include=($(INCDIR),[])/define=(PTHREADS=1)/name=(as_is,short)/float=ieee/ieee=denorm
SOURCES = ac_context.c ac_import.c
OBJECTS = ac_context.obj,ac_import.obj
##### RULES #####
VERSION=Mesa V3.4
##### TARGETS #####
# Make the library
$(LIBDIR)$(GL_LIB) : $(OBJECTS)
@ library $(LIBDIR)$(GL_LIB) $(OBJECTS)
clean :
purge
delete *.obj;*
ac_context.obj : ac_context.c
ac_import.obj : ac_import.c

View File

@@ -1,7 +0,0 @@
MESA_ARRAY_CACHE_SOURCES = \
ac_context.c \
ac_import.c
MESA_ARRAY_CACHE_HEADERS = \
ac_context.h \
acache.h

View File

@@ -338,7 +338,7 @@ void AMesaDestroyBuffer(AMesaBuffer buffer)
{
if (buffer->Screen) destroy_bitmap(buffer->Screen);
if (buffer->Background) destroy_bitmap(buffer->Background);
_mesa_destroy_framebuffer(buffer->GLBuffer);
_mesa_unreference_framebuffer(&buffer->GLBuffer);
free(buffer);
}

View File

@@ -43,7 +43,7 @@ extern "C" {
#include "texobj.h"
#include "teximage.h"
#include "texstore.h"
#include "array_cache/acache.h"
#include "vbo/vbo.h"
#include "swrast/swrast.h"
#include "swrast_setup/swrast_setup.h"
#include "swrast/s_context.h"
@@ -344,7 +344,7 @@ BGLView::BGLView(BRect rect, char *name,
/* Initialize the software rasterizer and helper modules.
*/
_swrast_CreateContext(ctx);
_ac_CreateContext(ctx);
_vbo_CreateContext(ctx);
_tnl_CreateContext(ctx);
_swsetup_CreateContext(ctx);
_swsetup_Wakeup(ctx);
@@ -830,7 +830,7 @@ void MesaDriver::UpdateState( GLcontext *ctx, GLuint new_state )
_swrast_InvalidateState( ctx, new_state );
_swsetup_InvalidateState( ctx, new_state );
_ac_InvalidateState( ctx, new_state );
_vbo_InvalidateState( ctx, new_state );
_tnl_InvalidateState( ctx, new_state );
if (ctx->Color.DrawBuffer[0] == GL_FRONT) {

View File

@@ -1,18 +1,19 @@
/*
* Copyright (C) 2004-2006 Claudio Ciccani <klan@users.sf.net>
* Copyright (C) 2004-2007 Claudio Ciccani <klan@directfb.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*
* Based on glfbdev.c, written by Brian Paul.
@@ -45,7 +46,7 @@
#include "texformat.h"
#include "teximage.h"
#include "texstore.h"
#include "array_cache/acache.h"
#include "vbo/vbo.h"
#include "swrast/swrast.h"
#include "swrast_setup/swrast_setup.h"
#include "tnl/tnl.h"
@@ -373,7 +374,7 @@ dfbUpdateState( GLcontext *ctx, GLuint new_state )
{
_swrast_InvalidateState( ctx, new_state );
_swsetup_InvalidateState( ctx, new_state );
_ac_InvalidateState( ctx, new_state );
_vbo_InvalidateState( ctx, new_state );
_tnl_InvalidateState( ctx, new_state );
}
@@ -786,7 +787,7 @@ directfbgl_create_context( GLcontext *context,
}
_swrast_CreateContext( context );
_ac_CreateContext( context );
_vbo_CreateContext( context );
_tnl_CreateContext( context );
_swsetup_CreateContext( context );
_swsetup_Wakeup( context );

View File

@@ -431,7 +431,7 @@ void
driBOCreateList(int target, drmBOList * list)
{
_glthread_LOCK_MUTEX(bmMutex);
BM_CKFATAL(drmBOCreateList(20, list));
BM_CKFATAL(drmBOCreateList(target, list));
_glthread_UNLOCK_MUTEX(bmMutex);
}

View File

@@ -340,7 +340,7 @@ static GLboolean DoBindContext(__DRInativeDisplay *dpy,
DRM_SPINUNLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID);
}
if ((pdp != prp) && (!pdp->pStamp || *pdp->pStamp != pdp->lastStamp)) {
if ((pdp != prp) && (!prp->pStamp || *prp->pStamp != prp->lastStamp)) {
DRM_SPINLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID);
__driUtilUpdateDrawableInfo(prp);
DRM_SPINUNLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID);
@@ -420,7 +420,7 @@ __driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp)
psp = pdp->driScreenPriv;
if (!psp) {
/* ERROR!!! */
_mesa_problem("Warning! Possible infinite loop due to bug "
_mesa_problem(NULL, "Warning! Possible infinite loop due to bug "
"in file %s, line %d\n",
__FILE__, __LINE__);
return;
@@ -482,8 +482,27 @@ __driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp)
static void driSwapBuffers( __DRInativeDisplay *dpy, void *drawablePrivate )
{
__DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePrivate;
drm_clip_rect_t rect;
dPriv->swapBuffers(dPriv);
(void) dpy;
/* Check that we actually have the new damage report method */
if (api_ver < 20070105 || dri_interface->reportDamage == NULL)
return;
/* Assume it's affecting the whole drawable for now */
rect.x1 = 0;
rect.y1 = 0;
rect.x2 = rect.x1 + dPriv->w;
rect.y2 = rect.y1 + dPriv->h;
/* Report the damage. Currently, all our drivers draw directly to the
* front buffer, so we report the damage there rather than to the backing
* store (if any).
*/
(*dri_interface->reportDamage)(dpy, dPriv->screen, dPriv->draw,
dPriv->x, dPriv->y,
&rect, 1, GL_TRUE);
}
/**

View File

@@ -2466,10 +2466,10 @@ static const char MultiTexCoord4ivARB_names[] =
"";
#endif
#if defined(need_GL_VERSION_2_0)
static const char GetVertexAttribPointervARB_names[] =
"iip\0" /* Parameter signature */
"glGetVertexAttribPointerv\0"
#if defined(need_GL_EXT_gpu_program_parameters)
static const char ProgramLocalParameters4fvEXT_names[] =
"iiip\0" /* Parameter signature */
"glProgramLocalParameters4fvEXT\0"
"";
#endif
@@ -3152,13 +3152,6 @@ static const char VertexAttribPointerNV_names[] =
"";
#endif
#if defined(need_GL_EXT_gpu_program_parameters)
static const char ProgramLocalParameters4fvEXT_names[] =
"iiip\0" /* Parameter signature */
"glProgramLocalParameters4fvEXT\0"
"";
#endif
#if defined(need_GL_EXT_framebuffer_object)
static const char GetFramebufferAttachmentParameterivEXT_names[] =
"iiip\0" /* Parameter signature */
@@ -3781,9 +3774,10 @@ static const char ReplacementCodeuiColor3fVertex3fSUN_names[] =
"";
#endif
#if defined(need_GL_ARB_vertex_program) || defined(need_GL_NV_vertex_program)
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program) || defined(need_GL_NV_vertex_program)
static const char GetVertexAttribPointervNV_names[] =
"iip\0" /* Parameter signature */
"glGetVertexAttribPointerv\0"
"glGetVertexAttribPointervARB\0"
"glGetVertexAttribPointervNV\0"
"";
@@ -5343,8 +5337,8 @@ static const struct dri_extension_function GL_EXT_framebuffer_object_functions[]
#if defined(need_GL_EXT_gpu_program_parameters)
static const struct dri_extension_function GL_EXT_gpu_program_parameters_functions[] = {
{ ProgramEnvParameters4fvEXT_names, ProgramEnvParameters4fvEXT_remap_index, -1 },
{ ProgramLocalParameters4fvEXT_names, ProgramLocalParameters4fvEXT_remap_index, -1 },
{ ProgramEnvParameters4fvEXT_names, ProgramEnvParameters4fvEXT_remap_index, -1 },
{ NULL, 0, 0 }
};
#endif
@@ -6263,7 +6257,6 @@ static const struct dri_extension_function GL_VERSION_2_0_functions[] = {
{ GetVertexAttribfvARB_names, GetVertexAttribfvARB_remap_index, -1 },
{ GetAttribLocationARB_names, GetAttribLocationARB_remap_index, -1 },
{ Uniform3ivARB_names, Uniform3ivARB_remap_index, -1 },
{ GetVertexAttribPointervARB_names, GetVertexAttribPointervARB_remap_index, -1 },
{ VertexAttrib4sARB_names, VertexAttrib4sARB_remap_index, -1 },
{ VertexAttrib2dvARB_names, VertexAttrib2dvARB_remap_index, -1 },
{ VertexAttrib2fvARB_names, VertexAttrib2fvARB_remap_index, -1 },
@@ -6295,6 +6288,7 @@ static const struct dri_extension_function GL_VERSION_2_0_functions[] = {
{ Uniform4iARB_names, Uniform4iARB_remap_index, -1 },
{ UseProgramObjectARB_names, UseProgramObjectARB_remap_index, -1 },
{ DeleteProgram_names, DeleteProgram_remap_index, -1 },
{ GetVertexAttribPointervNV_names, GetVertexAttribPointervNV_remap_index, -1 },
{ Uniform2iARB_names, Uniform2iARB_remap_index, -1 },
{ VertexAttrib4dARB_names, VertexAttrib4dARB_remap_index, -1 },
{ GetUniformLocationARB_names, GetUniformLocationARB_remap_index, -1 },

View File

@@ -0,0 +1,5 @@
de
es
fr
nl
sv

View File

@@ -41,7 +41,7 @@
# - info gettext
# The set of supported languages. Add languages as needed.
POS=de.po es.po nl.po fr.po
POS=de.po es.po nl.po fr.po sv.po
#
# Don't change anything below, unless you know what you're doing.

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