Compare commits

..

1894 Commits

Author SHA1 Message Date
Brian
22d9132081 disable printing shader program debug info 2007-03-26 10:15:02 -06:00
Brian
d619cceea4 merge of glsl-compiler-1 branch 2007-03-26 10:13:02 -06:00
Michel Dänzer
76f3b66e04 i915tex: Make sure renderbuffers don't get deleted when flipping them.
Since the recent renderbuffer refcounting fixes it's no longer sufficient to
just remove the old renderbuffer from the framebuffer and then add the new one
because the former may decrease the reference count to 0 and delete the old
renderbuffer.
2007-03-26 17:38:58 +02:00
Brian
e71c34aaa1 disable free() until other issues can be fixed... 2007-03-26 09:24:30 -06:00
Brian
b9fbedd601 fix mem leak, add comments 2007-03-26 09:23:44 -06:00
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
Brian
bb0393a0cd fix mem leak 2007-03-24 16:44:20 -06:00
Brian
9fe342d1e6 disable free(var->aux) -- can lead to segfault 2007-03-24 16:43:44 -06:00
Brian
cfdd07d7d3 fix mem leak 2007-03-24 16:26:51 -06:00
Brian
1968444bed fix some mem leaks 2007-03-24 16:22:35 -06:00
Brian
935f93f966 Free shader-related context state: _mesa_free_shader_state() 2007-03-24 16:20:02 -06:00
Brian
3493e867e9 free prog->Attributes in _mesa_delete_program() 2007-03-24 16:18:13 -06:00
Brian
49134e8e53 fix mistake in _slang_free_ir() 2007-03-24 15:29:10 -06: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
Brian
0e71d08e8d Properly free the slang_ir_node->Store data (use ref counting). 2007-03-24 10:18:14 -06:00
Brian
b50b036ffb When computing render_inputs_bitset, omit primary color if we have a fragment program and it doesn't need FRAG_ATTRIB_COL0. Silences valgrind warnings. 2007-03-24 10:16:49 -06:00
Brian
dc3015f157 move some code into new slang_ir.c file 2007-03-24 09:40:20 -06:00
Brian
b2bc563142 IR utility functions 2007-03-24 09:39:24 -06: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
Brian
8f9db0f81c document internal compiler options 2007-03-23 17:49:19 -06:00
Brian
d1934c2065 Fix issues related to the 'continue' statement.
IR_LOOP now has two children: the body code, and the tail code.
Tail code is the "i++" part of a for-loop, or the expression at the end
of a "do {} while(expr);" loop.
"continue" translates into: "execute tail code; CONT;"
Also, the test for infinite do/while loops was incorrect.
2007-03-23 17:48:42 -06:00
Brian
81767eead9 consolidate some code 2007-03-23 17:45:53 -06:00
Brian
63556fa994 Add the ability to generate programs that doesn't use condition codes.
ctx->Shader.EmitCondCodes determines if we use condition codes.
If not, IF statement uses first operand's X component as the condition.
Added OPCODE_BRK0, OPCODE_BRK1, OPCODE_CONT0, OPCODE_CONT1 to handle
the common cases of conditional break/continue.
2007-03-23 14:47:46 -06:00
Brian
bf020d8d7f minor tweaks 2007-03-23 14:44:34 -06:00
Brian
2bdac09d16 updated comment 2007-03-23 10:46:08 -06:00
Nicolai Haehnle
654a308439 r300: Whitespace cleanup (remove trailing spaces) 2007-03-23 17:39:28 +01:00
Brian
fe20a619cf updated comment 2007-03-22 16:07:43 -06:00
Brian
e6aeb24b23 Overhaul emit_compare() function.
Previously, comparing vec2, vec3, vec4 was broken.
Added IR_EQUAL, IR_NOTEQUAL nodes/operators to compute boolean
equality/inequality vs. IR_SEQUAL/IR_SNEQUAL which work component-wise.
Use IR_EQUAL/IR_NOTEQUAL for the == and != operators.
To compute vec4 equality, use SNE, DP4, SEQ instruction sequence.
2007-03-22 16:07:14 -06:00
Brian
0aad9e2627 First pass at implementing structure compares.
Need to improve this.  There may be holes in a structure so we can't
just blindly compare the full 4-float registers.
2007-03-22 09:15:39 -06:00
Brian
12229f119d use _mesa_copy_instructions() 2007-03-22 09:11:26 -06:00
Brian
1bf81e3c5d In _mesa_add_unnamed_constant() and _mesa_lookup_parameter_constant() allow swizzleOut==NULL.
There are times when we don't want to allow swizzling when searching for or
adding vector constants.  Passing NULL for swizzleOut disables swizzling.
This fixes a constant/swizzle bug in link_uniform_vars().
2007-03-22 09:07:27 -06:00
Brian
1936b25ebd print conditional writemask, if enabled 2007-03-22 09:04:18 -06: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
629ec2b06b added SWIZZLE_XYZW 2007-03-21 15:40:54 -06:00
Brian
2500d82d0d Support for user-defined structures.
struct == and != operators not finished yet.  Struct assignment works though.
2007-03-21 15:40:39 -06:00
Brian
97c9b3ecc6 disable apparently unused code 2007-03-21 15:38:46 -06:00
Brian
e02b989ff9 indent 2007-03-21 14:45:34 -06:00
Brian
23d31efc16 merge from master 2007-03-21 11:57:30 -06:00
Brian
180cc2f845 disable assertion 2007-03-21 11:41:41 -06: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
Brian
fdcbbeb55e Properly compute render_inputs_bitset when using a vertex program/shader.
This fixes a performance regression introduced early in glsl-compiler-1 work.
2007-03-19 14:44:15 -06: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
Brian
e348016253 silently ignore DeleteProgram/Shader(id=0) 2007-03-15 16:07:39 -06:00
Brian
7ed292a4e9 in _mesa_GetColorTable, return silently if table size is 0 2007-03-15 16:06:58 -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
62b4601e53 s/Tranpose/Transpose/ 2007-03-14 13:34:30 -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
Brian
565d097d8f continue prev check-in: save ptr to slang_function for SLANG_OPER_CALL 2007-03-14 11:07:32 -06:00
Brian
2dc3e94470 After we've found the slang_function ptr for a SLANG_OPER_CALL node, save the ptr in the node for reuse.
This can save a tremendous amount of time when resolving types in complex
expressions.  One particular shader was taking several minutes to compile
but now compiles almost instantaneoulsy.
2007-03-14 10:49:35 -06:00
Brian
b1a955b518 make _slang_typeof_function() static 2007-03-14 10:16:18 -06:00
Brian
b01f146fd0 remove old assertion 2007-03-14 08:56:01 -06:00
Brian
52363954bf more bug fixing, error checking 2007-03-13 16:50:24 -06:00
Brian
98650bdf89 fix a number of issues in _mesa_uniform() 2007-03-13 16:32:48 -06:00
Brian
5186529e57 remove bogus assertion 2007-03-13 16:31:30 -06:00
Brian
fdf513e07a document some bug fixes, lots of new features 2007-03-13 16:12:23 -06:00
Brian
8d9db3dd03 fix ctx->Pixel.PostConvolutionScale/Bias subscript bugs 2007-03-13 16:07:04 -06:00
Brian
fd08463dea Check for, simplify vec2/3/4(x). Only do call adapting for constructors. 2007-03-13 15:58:40 -06:00
Brian
c7b2cce418 improve literal printing 2007-03-13 15:57:09 -06:00
Brian
000b2899b9 disable some debug output 2007-03-13 15:55:54 -06:00
Brian
a49a865cf5 better error msg for undefined function, disable some debug output 2007-03-13 15:55:41 -06:00
Brian
948c60badc get rid of float_multiply, float_add, float_divide 2007-03-13 15:00:14 -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
Brian
d8070889d7 alloc an extra byte in _mesa_ShaderSourceARB() to silence a valgrind warning 2007-03-13 11:00:21 -06:00
Brian
c000843a14 be smarter about which fragment attribs are interpolated before running frag progs 2007-03-13 10:58:48 -06:00
Brian
da55430952 comment about SPAN_* vs FRAG_BIT_* values 2007-03-13 10:58:23 -06:00
Brian
17ad1d12eb Check if FRAG_RESULT_COLR is written and update span->interpMask, arrayMask.
Also, fix an assertion.
2007-03-13 10:53:16 -06:00
Brian
8b9842a256 Shuffle some code around in the emit_tex() and emit_move() instructions.
Note that the inst ptr returned by new_instruction() may become invalid
after calling emit_() since the emit functions may allocate new instructions
which is done vial realloc().
Also, add some new assertions to try to catch this kind of bug.
2007-03-13 10:49:08 -06: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
Brian
7265e6928e properly compute ctx->Texture._EnabledCoordUnits 2007-03-13 10:28:26 -06: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
Brian
b3a22d0ed6 Implement GL_ARB_texture_rectangle support
This includes the sampler2DRect and sampler2DRectShadow types and
the texture2DRect(), texture2DRectProj(), etc. built-in functions.
2007-03-12 17:29:50 -06: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
8946d7f029 Add array bounds checking, fix memleaks, add null ptr checks. 2007-03-12 10:52:52 -06:00
Brian
d2a6f43eaf extra stuff for drawbuffers test 2007-03-12 10:30:36 -06: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
Brian
3f7ef618b6 added drawbuffers.c 2007-03-11 17:30:13 -06:00
Brian
15aa7aaa93 add NULL ptr check 2007-03-11 17:29:54 -06:00
Brian
ccb80d7ec4 Test the GL_ARB_draw_buffers extension.
Also requires GL_EXT_framebuffer_object and OpenGL 2.0 (for GLSL).
2007-03-11 17:03:29 -06:00
Brian
1c09bcfdda Implement support for GL_ARB_draw_buffers with GL_MAX_DRAW_BUFFERS > 1.
GL_MAX_DRAW_BUFFERS is currently 4.
Added gl_FragData[] output for fragment programs.
In _swrast_write_rgba_span() loop over the color outputs/renderbuffers.
2007-03-11 17:00:39 -06: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
d23dd812ad Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa into glsl-compiler-1 2007-03-10 14:07:28 -07: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
Brian
10b5895597 Implement gl_FrontFacing for fragment shaders.
For the time being, we put the gl_FrontFacing value in the FOGC.Y input
register.  Combining FOGC and FrontFacing in one register is a bit of a
hack and may need to be changed someday.
2007-03-10 11:30:19 -07:00
Brian
1fcb4ecc07 clean-up formatting 2007-03-10 10:56:06 -07:00
Brian
c9872b80c8 add NULL ptr check in emit_cond() 2007-03-10 10:37:18 -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
Brian
46bd63819e use gl_ModelViewProjectionMatrixTranspose in ftransform() 2007-03-09 17:02:12 -07:00
Brian
ff95925e70 add NULL ptr check 2007-03-09 16:53:44 -07:00
Michel Dänzer
30b914e2ca Merge branch 'i915tex-pageflip' 2007-03-10 00:19:17 +01:00
Brian
b9ea936150 added GL_CURRENT_PROGRAM 2007-03-09 15:41:25 -07: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
Brian
2cf5fd48d1 Merge branch 'origin' into glsl-compiler-1
Conflicts:

	src/mesa/main/context.c
2007-03-09 11:43:53 -07:00
Brian
9f44247acf fix _mesa_uniform_matrix() transpose bug 2007-03-09 11:34:18 -07: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
Brian
b03e1712b2 gl_ClipVertex not supported yet 2007-03-09 09:51:55 -07: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
Brian
a706b0b8bd added missing bvec2/3/4 constructors 2007-03-08 16:08:55 -07:00
Brian
05b74e4ae4 fix broken vec4_seq, vec4_sne instructions 2007-03-08 15:59:20 -07:00
Brian
2f35a17f38 Update lessThan(), lessThanEqual() functions, improve some matrix constructors. 2007-03-08 15:53:05 -07:00
Brian
5761a93bba Added IR_SLE and IR_SLT for <= and < operations.
Using IR_SGE and IR_SGT with transposed args doesn't work since the __asm
calls don't do argument matching by name, but by position.
This fixes the broken lessThan() and lessThanEqual() functions.
2007-03-08 15:52:22 -07:00
Brian
3e0fbc7efc fix tmp storage problem for IR_I_TO_F 2007-03-08 15:45:25 -07:00
Brian
19a9050548 fix assertion 2007-03-08 15:19:34 -07:00
Brian
ee931f8d4d ; and {} statements were broken 2007-03-08 14:48:34 -07:00
Brian
ec89aba7c6 remove unused new_cjump() 2007-03-08 11:29:22 -07:00
Brian
cce4e50569 IR_CJUMP0/1 no longer used/needed 2007-03-08 11:16:13 -07:00
Brian
63772e2a2c rewrite _slang_gen_select() to use IF node 2007-03-08 11:07:52 -07:00
Brian
b3dd49429b s/_slang_gen_hl_if/_slang_gen_if/ 2007-03-08 10:53:50 -07:00
Brian
609306de17 s/_slang_gen_hl_if/_slang_gen_if/ 2007-03-08 10:43:57 -07:00
Brian
c9f486c38f remove old assertion 2007-03-08 10:40:37 -07:00
Brian
bf86ddaa20 check for attempted writes to read-only vars 2007-03-08 10:40:25 -07:00
Brian
de8172673e Rework matrix-related code.
GLSL matrices are stored in column-major order while GL_ARB_vertex/fragment_program
use row-major.  So, need to use STATE_MATRIX_TRANSPOSE for built-in matrices.
Unfortunately, this means that the expression M * V isn't very efficient since we
need to extract the rows out of M.  And that's the typical expression for vertex
transformation:  gl_ModelViewProjectionMatrix * gl_Position.
Solve this inefficiency by looking for M*V expressions and replacing them
with V*Transpose(M).
Also, add support for GLSL 1.20's MatrixTranspose, Inverse and InverseTranspose
matrices.
2007-03-08 09:38:35 -07: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
Brian
6ff0a04f7c fix ProjectionMatrix typo 2007-03-08 07:53:30 -07:00
Brian
7e66cad998 fix gl_TextureMatrix indexing 2007-03-08 07:51:39 -07: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
Brian
9637c963f5 more DEBUG_PROG 2007-03-07 17:40:57 -07:00
Brian
fb3f0beb42 update comments 2007-03-07 17:37:24 -07:00
Brian
0aec2bb8f2 remove unneeded return stmt 2007-03-07 16:13:33 -07:00
Brian
da899d190e add missing gl_Point state, fix IR storage bug 2007-03-07 16:13:22 -07:00
Brian
29bc4b8974 s/diffuset/diffuse/ 2007-03-07 13:35:49 -07:00
Brian
c3412e9a08 regenerated 2007-03-07 13:07:40 -07:00
Brian
842c782cee use 2.0, 2.1 version strings 2007-03-07 13:07:07 -07:00
Brian
faeea574af remove end_label field 2007-03-07 13:00:06 -07:00
Brian
35d25c0ce4 Fix problem with nested function calls such as y = f(f(x))
Replace CurFunction with curFuncEndLabel.
2007-03-07 12:59:01 -07:00
Brian
5b5a80d011 s/equal/EQUAL/, fix bugs in logical or/and code. 2007-03-07 11:26:47 -07:00
Brian
ab673c8527 fix broken __postDecr() 2007-03-07 11:25:37 -07:00
Brian
1dca089149 fix deferredTexture bug 2007-03-07 10:42:44 -07: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
Brian
3efd0c7b8d fix swizzled writemask bug 2007-03-07 09:59:26 -07:00
Brian
f3da222839 remove bogus assertion 2007-03-07 09:58:45 -07: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
d25046b648 fix incorrect HPOS write test 2007-03-07 08:56:09 -07:00
Brian
e61ec95deb additional error detection 2007-03-07 08:55:42 -07:00
Brian
cec81eef31 check for null program ptrs in _mesa_uniform() 2007-03-07 08:04:06 -07:00
Brian
55821d021d Generate an error if the vertex shader does not write to gl_Position. 2007-03-07 07:52:24 -07:00
Brian
2282d81536 destroy window during cleanup 2007-03-06 16:33:00 -07:00
Brian
6cb0aa12b8 more integer arithmetic updates 2007-03-06 16:32:03 -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
Brian
e10a1457e8 fix some int arithmetic problems 2007-03-06 14:07: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
28ab1125c2 more DEBUG_PROG code 2007-03-06 12:15:30 -07:00
Brian
c6d930a114 fix vert/frag typo 2007-03-06 11:53:27 -07: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
07e62084bb info about how the compiler works 2007-02-27 16:45:40 -07: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
0e1bd23025 s/matrix_stack/gl_matrix_stack/ and s/mesa_list_state/gl_dlist_state/ 2007-02-27 09:54:50 -07:00
Brian
2cf8d24131 remove unused DriverMgrCtx 2007-02-26 18:35:34 -07:00
Brian
fa4d036424 Add EmitHighLevelInstructions, EmitComments booleans to gl_shader_state.
These control code generation options.  May be overridden by drivers, debuggers, etc.
2007-02-26 18:33:50 -07:00
Brian
4f26a52908 re-enable var scope destruct in slang_operation_destruct() 2007-02-26 18:08:09 -07:00
Brian
553fe132d4 Fix a few bugs in slang_operation variable scoping. Seems to fix a double-free. 2007-02-26 18:07:26 -07:00
Brian
aa6f4241f8 formatting fixes 2007-02-26 17:32:45 -07:00
Brian
e21096b07c fix mem leak 2007-02-26 17:05:52 -07:00
Brian
b58ea057fe fix mem leak in _mesa_ShaderSourceARB() 2007-02-26 17:00:06 -07:00
Brian
4b8d75e2e6 fix logic for reporting errors 2007-02-26 16:32:00 -07:00
Brian
f446e58e45 disable execute bit 2007-02-26 15:13:34 -07:00
Brian
6817407d49 fix error flagging 2007-02-26 15:06:56 -07:00
Brian
365f8fb0dd re-enable some code 2007-02-26 15:02:36 -07:00
Brian
ed0ae62ad7 Merge branch 'glsl-compiler-1' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa into glsl-compiler-1 2007-02-26 14:34:57 -07:00
Brian
ca279b80e6 Remove old error logging code. New slang_log.[ch] files. 2007-02-26 14:33:52 -07:00
Brian
c4ac5ac9d7 Overhaul of error handling. 2007-02-26 14:32:53 -07:00
Brian
7f01ef171f Overhaul of error logging. 2007-02-26 14:32:29 -07:00
Brian
e63c7e0893 Use new slang_emit_info struct for passing context info around. 2007-02-26 14:22:05 -07:00
Brian
25ea5ea27e Merge branch 'glsl-compiler-1' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa into glsl-compiler-1 2007-02-26 13:11:20 -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
Brian
4e53ce81cf remove unneeded includes 2007-02-25 20:05:22 -07:00
Brian
3c1c999226 update comments 2007-02-25 19:11:44 -07:00
Brian
313d50e903 fix bounds checking in get_register_pointer() 2007-02-25 19:01:16 -07:00
Brian
b85d4d61a7 define and use MAX_PROGRAM_ADDRESS_REGS 2007-02-25 18:56:57 -07:00
Brian
33eac56e4a Add EnvParams field to gl_program_machine, avoid passing ctx to a bunch of functions. 2007-02-25 18:52:41 -07:00
Brian
6774f32adb simplify _mesa_get_program_register() 2007-02-25 18:39:46 -07:00
Brian
21bcb2e1f6 s/GetFragmentProgramRegister/GetProgramRegister/ 2007-02-25 18:35:47 -07:00
Brian
cfd0011f2f minor clean-ups in _mesa_execute_program() 2007-02-25 18:30:45 -07:00
Brian
8b34b7da41 remove 'maxInst' parameter from _mesa_execute_program() 2007-02-25 18:26:50 -07:00
Brian
085d7d59f0 remove unused 'element' parameter from _mesa_execute_program() 2007-02-25 18:23:37 -07:00
Brian
12fd8faa5d s/attribs/results/ 2007-02-25 18:08:16 -07:00
Brian
29796b62bd remove unused VaryingPtr 2007-02-25 17:33:46 -07:00
Brian
e71a33bbf8 Optimize the loop for copying output results. 2007-02-25 17:29:00 -07:00
Brian
f68067e101 add texture rotation 2007-02-25 17:24:40 -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
9854a17f29 only copy used outputs 2007-02-25 12:47:25 -07:00
Brian
21625d729c output texcoord in vertex program 2007-02-25 12:46:56 -07: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
32fbbf38b4 Revert "option to test mipmapping"
This reverts commit a127537efb.
Meant to do this on the trunk.
2007-02-24 18:27:46 -07:00
Brian
a127537efb option to test mipmapping 2007-02-24 18:20:35 -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
Brian
fbc4929185 add missing code for newer STATE_INTERNAL items 2007-02-24 17:00:50 -07:00
Brian
efcfdbd4d1 Undo some changes to _mesa_UpdateTexEnvProgram(). Fixes broken i915 texturing. 2007-02-24 15:51:41 -07:00
Brian
292a80466d Outputs[] array wasn't large enough, define MAX_PROGRAM_OUTPUTS, new assertions. 2007-02-24 15:49:54 -07:00
Brian
5e80c62f31 Remove unneeded _Fragment/VertexShaderPresent fields, update comments. 2007-02-24 15:39:37 -07:00
Brian
197af3dc32 Use prog_execute.c to run vertex programs until t_vb_arbprogram.c is updated to
handle branch instructions, etc.
2007-02-24 11:16:58 -07:00
Brian
824dcd4399 remove comment 2007-02-24 11:15:27 -07:00
Brian
761728afe8 Fix assertion in get_register_pointer(), fix EXP case.
Note that GL_ARB_v_p and GL_NV_v_p define the z component of the EXP instruction
differently.  We follow the ARB extension.
2007-02-24 11:14:57 -07:00
Brian
f183a2d7ea added ARL, EXP, LOG, relative indexing 2007-02-23 17:14:30 -07:00
Brian
a2786a97d7 add some missing cases in _mesa_program_state_string() 2007-02-23 17:13:30 -07:00
Brian
f1390a3424 fix fog breakage 2007-02-23 17:11:01 -07:00
Brian
e80d901d98 reindent 2007-02-23 16:53:24 -07:00
Brian
6df328e84d don't pass program ptr to fetch_vector[14]() 2007-02-23 16:48:07 -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
Brian
064ae479a7 Update DRI drivers for new glsl compiler.
Mostly:
- update #includes
- update STATE_* token code
2007-02-23 13:40:13 -07:00
Brian
36a0ee199d expose _mesa_load_tracked_matrices() 2007-02-23 13:38:37 -07:00
Brian
15b3bd1689 added linux-dri-debug 2007-02-23 11:58:46 -07:00
Brian
cc6a08b2a0 SWvertex no longer has texcoord field, use attrib field instead 2007-02-23 11:45:15 -07:00
Brian
fce8409cbb s/GLint/gl_state_index/, length is now 5 not 6 2007-02-23 11:44:44 -07:00
Brian
9fe3e2efc3 s/GLint/gl_state_index/, length is now 5 not 6 2007-02-23 11:44:14 -07:00
Brian
0020d1022f re-expose _mesa_print_alu_instruction() 2007-02-23 11:43:44 -07:00
Brian
ef0cc9db54 remove dead code 2007-02-23 11:43:14 -07:00
Brian
aa9d22a1c0 replace GLint with gl_state_index 2007-02-23 11:21:03 -07:00
Brian
99902198de comments, clean-up 2007-02-23 10:19:55 -07:00
Brian
5186ae9bbe remove unused slang_atom_pool_gen() 2007-02-23 10:12:38 -07:00
Brian
308be21c2f added slang_label.c 2007-02-23 10:04:18 -07:00
Brian
c2a261f493 comments, clean-up 2007-02-23 09:55:21 -07:00
Brian
75d4ed968d Replace slang_ir_node::Target w/ Field. Remove Comment field. Clean-up. 2007-02-23 09:42:11 -07:00
Brian
c18c75b0b7 remove old _slang_gen_if() 2007-02-23 09:38:46 -07:00
Brian
afbf7c7e6b Re-implement branching with slang_labels.
This eliminates the NOP instructions that had been used as placeholders for
branch targets.
Also, fix "return" statement bug.
2007-02-23 09:38:17 -07:00
Brian
d8d07b2a8a label routines for implementing branches, jumps 2007-02-23 09:36:29 -07:00
Brian
0cc9419631 debug code for emitting variable allocation comments 2007-02-22 17:46:20 -07:00
Brian
059376c855 expose _mesa_swizzle_string() 2007-02-22 17:45:32 -07:00
Roland Scheidegger
5e66843733 r200 fix broken (by new input handling) fogcoord 2007-02-23 01:45:19 +01:00
Brian
ff0cc92757 glslcompiler build instructions 2007-02-22 16:29:48 -07:00
Brian
bc18ac45a3 updated for vbo 2007-02-22 16:29:25 -07:00
Brian
da46353056 Remove obsolete files. 2007-02-22 16:14:02 -07:00
Brian
13e3b21b16 New, unified interpretor/executor for vertex and fragment programs.
This replaces the code formerly in nvvertexec.c and s_fragprog.c.
Currently, DDX, DDY don't work.
2007-02-22 16:09:40 -07:00
Brian
7aaefcbe48 use _mesa_get_program_register() 2007-02-22 16:08:30 -07:00
Brian
f6803de739 Use the new unified vertex/fragment program interpreter from prog_execute.c.
Currently, DDX, DDY don't work.
2007-02-22 16:08:01 -07:00
Brian
e382efc85d use new _mesa_execute_program() function 2007-02-22 16:07:17 -07:00
Brian
6cfe2114f1 FORCE_PROG_EXECUTE_C cpp flag, misc changes 2007-02-22 16:06:54 -07:00
Brian
fd89396012 fix assertion 2007-02-22 16:02:18 -07:00
Brian
7c86e10193 emit high-level IF/ELSE/ENDIF for vertex progs now 2007-02-22 16:02:08 -07:00
Brian
740a8b0b66 _mesa_ExecuteProgramNV is now a no-op 2007-02-22 16:00:54 -07:00
Brian
ef64cda978 remove nvvertexec.c, add prog_execute.c 2007-02-22 16:00:31 -07:00
Brian
3ed1acd13c use MAX_PROGRAM_ENV_PARAMS 2007-02-22 14:57:40 -07:00
Brian
b7aeac0de1 added MAX_PROGRAM_ENV_PARAMS 2007-02-22 14:57:19 -07:00
Brian
79fb4527ca added CallStack, StackDepth 2007-02-22 14:56:43 -07:00
Brian
29925c6dcd remove unneeded #includes, misc clean-up 2007-02-22 14:56:22 -07:00
Brian
e47c60443f reorg/clean-up/indent 2007-02-22 14:55:35 -07:00
Brian
11b9ef9454 start implementing conditions, branching 2007-02-22 14:43:41 -07:00
Brian
2eeaae6cbc get rid of some unused slang_variable fields 2007-02-22 11:00:10 -07:00
Brian
50040573d7 Replace slang_allocate_storage() with simpler _slang_attach_storage() 2007-02-22 10:56:41 -07:00
Brian
b618ac8c0b updated debug code 2007-02-22 09:39:25 -07:00
Brian
776bc9cf55 Undo some STATE_POINT/FOG changes. Max length of state token array is now 5. 2007-02-22 09:29:46 -07: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
3f4826a358 XXX comments about shaders 2007-02-22 09:10:38 -07:00
Brian
6ec7484ae8 use ctx->VertexProgram._Current instead of ctx->VertexProgram._Enabled 2007-02-22 09:10:24 -07:00
Brian
96abc6bf72 merge fix: add STATE_FOG_PARAMS_OPTIMIZED, STATE_SPOT_DIR_NORMALIZED 2007-02-22 09:08:53 -07:00
Brian
7b30053b26 fix negative indentation problem 2007-02-22 09:08:36 -07:00
Brian
53bcdedc32 Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa 2007-02-22 08:57:36 -07:00
Brian
29c471aafc Merge branch 'origin' into glsl-compiler-1
Conflicts:

	src/mesa/main/state.c
	src/mesa/shader/program.c
	src/mesa/shader/program.h
	src/mesa/shader/programopt.c
	src/mesa/shader/slang/slang_execute.c
	src/mesa/sources
	src/mesa/swrast/s_arbshader.c
	src/mesa/swrast/s_context.c
	src/mesa/swrast/s_span.c
	src/mesa/swrast/s_zoom.c
	src/mesa/tnl/t_context.c
	src/mesa/tnl/t_save_api.c
	src/mesa/tnl/t_vb_arbprogram.c
	src/mesa/tnl/t_vp_build.c
	src/mesa/tnl/t_vtx_eval.c
2007-02-22 08:53:33 -07:00
Dave Airlie
4a1d7d6641 r300: get rid of CB_DPATH legacy 2007-02-22 19:33:50 +11:00
Brian
6d4cf6be4e updated info about arrays, predefined uniforms 2007-02-21 16:07:03 -07:00
Brian
5a2c1ad625 disable debug 2007-02-21 16:05:56 -07:00
Brian
917a5086b3 Use gl_LightSource[0].position intead of a light position uniform. 2007-02-21 15:57:55 -07:00
Brian
5d89b027ee remove unneeded #includes 2007-02-21 15:42:50 -07:00
Brian
502c132738 fix copy&paste errors 2007-02-21 15:42:10 -07:00
Brian
f958aabdf3 more minor changes to STATE_ indexing 2007-02-21 15:23:11 -07:00
Brian
78399d23dc remove dead code 2007-02-21 15:22:17 -07:00
Brian
f941892829 Reimplement the _slang_alloc_statevar() function.
After several tries at making a table-based system for examining pre-defined
uniforms to find statevar indexes, give up and do it the simple way (lots of
strcmp() calls).  Not terribly elegant, but perfectly functional.
2007-02-21 15:21:58 -07:00
Brian
6531952b3c adjustments to STATE_ token layout/format so token[1] is always the array index 2007-02-21 11:08:21 -07:00
Brian
c3301d038d checkpoint overhaul of pre-defined uniform code 2007-02-21 09:15:39 -07:00
Brian
aa7ddbd0ff clean-up, move IR_ELEMENT code 2007-02-20 17:00:16 -07:00
Brian
760c114b24 alloc IR_FIELD's Storage in codegen, like IR_ELEMENT 2007-02-20 16:56:49 -07: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
Brian
10f42ddb9e work on struct/array handling 2007-02-20 15:22:38 -07:00
Brian
361b60678e forgot to return length in parse_array_len() 2007-02-20 15:20:46 -07: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
Brian
243c2dd746 implement support for pre-defined uniform structs (state vars) 2007-02-20 14:03:43 -07:00
Brian
48d65aabbc added slang_builtin.c 2007-02-20 14:03:10 -07: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
bd894c4705 added SWIZZLE_XXXX, SWIZZLE_YYYY, etc 2007-02-20 10:40:08 -07: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
Brian
174c555414 remove accidental check-in 2007-02-20 08:05:29 -07:00
Brian
3d001b81c2 Merge branch 'glsl-compiler-1' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa into glsl-compiler-1 2007-02-20 08:04:40 -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
Brian
9449a4d894 s/PROG_PRINT_ARB/PROG_PRINT_DEBUG/ 2007-02-17 09:41:59 -07:00
Brian
61d31ae10d info about stand-alone compiler 2007-02-17 09:41:19 -07:00
Brian
cc153541a2 stand-alone GLSL compiler 2007-02-17 09:15:39 -07:00
Brian
501ee87180 Lots of changes to prog_print.c code.
Mainly, allow printing programs in either ARB, NV or "debug" formats.
2007-02-17 09:15:00 -07: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
Brian
00647c39de remove dead code 2007-02-16 09:59:27 -07:00
Brian
c177191804 s/_slang_link2/_slang_link/ 2007-02-16 09:56:19 -07:00
Brian
1c1a0a23d3 change all enum tokens to uppercase 2007-02-16 09:31:35 -07:00
Brian
d15059b128 abort upon errors (temporary) 2007-02-16 09:06:09 -07:00
Brian
d30806b0c5 added a comment 2007-02-16 09:05:11 -07:00
Brian
9ea2315d2d Allow int->float argument conversion in _slang_locate_function(). 2007-02-16 09:04:53 -07:00
Brian
d003877c66 implement IR_I_TO_F 2007-02-16 08:58:42 -07: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
Brian
ed490e4643 remove dead code 2007-02-13 09:23:00 -07: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
Brian
5620392d67 add prog_debug.c 2007-02-09 15:40:15 -07:00
Brian
942ee02590 move GL_MESA_program_debug funcs to prog_debug.c 2007-02-09 15:40:00 -07:00
Brian
383ecc0374 Move experimental GL_MESA_program_debug functions into new file. 2007-02-09 15:39:32 -07:00
Brian
b3893baf80 comments, etc 2007-02-09 14:19:12 -07:00
Brian
3d479b9638 re-enable free'ing of IR trees 2007-02-09 14:18:41 -07:00
Brian
cf490a7f81 always init param vars to silence valgrind warnings 2007-02-09 12:04:52 -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
Brian
5e6908944b do full swizzled matching in _mesa_lookup_parameter_constant() 2007-02-08 20:39:42 -07:00
Brian
bd9615bbc5 Check for constant-valued while/do loop conditions.
Allows us to:
1. avoid generating constant-valued BRK test for while(1)..
2. discard entire loop for while(0).
3. detection infinite loops at compile-time.
2007-02-08 17:40:29 -07:00
Brian
c0a9f554be optimize conditional breaks/continues 2007-02-08 17:11:18 -07: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
Brian
6230ae7faf cont at top of loop, little clean-ups 2007-02-08 15:09:47 -07:00
Brian
a1c2e87c4b remove some cruft 2007-02-08 15:08:16 -07:00
Brian
fbf0f400b7 fix broken BRA for return stmts 2007-02-08 14:10:54 -07:00
Brian
34af2b7194 consolidate BRA with BRK, CONT 2007-02-08 14:10:19 -07:00
Brian
c81aedeaec change BranchTarget to GLint 2007-02-08 14:09:34 -07:00
Brian
b768c48547 Use conditional break in for/do/while loops. 2007-02-08 13:23:17 -07:00
Brian
97125fb370 Simplify code with eval_condition(). Implement conditional BRK. 2007-02-08 13:22:31 -07:00
Brian
2c75ef62ea remove old loop break/cont stuff 2007-02-07 16:19:19 -07:00
Brian
b35b4566c2 high vs. low level if/then/else code emit 2007-02-07 16:11:00 -07:00
Brian
c5e6bf63e6 s/%f/%g/ 2007-02-07 16:09:13 -07:00
Brian
a7c2c7d6b2 Remove old functions for generating BRA-based looping. 2007-02-07 15:14:20 -07:00
Brian
4aa487e796 Use IR_LOOP to represent do-while and for-loops.
Also, start moving high vs. low-level instruction selection into slang_emit.c
2007-02-07 15:12:13 -07:00
Brian
1f99a7514e BRK and CONT work the same 2007-02-06 22:34:09 -07:00
Brian
f22ed0986a Implement CONT, improve BRK.
IR_LOOP's BranchNode ptr is the head of a linked list of CONT and BRK nodes.
After emitting loop, walk over the linked list, filling in the CONT/BRK
instruction's BranchTarget field (location of the ENDLOOP instruction, or
one past).
2007-02-06 22:31:19 -07:00
Brian
5f7d4668c4 replace IR_BEGIN_LOOP/IR_END_LOOP with IR_LOOP 2007-02-06 21:33:29 -07:00
Brian
7e73bc32f5 new_node[0123]() functions 2007-02-06 20:53:09 -07:00
Brian
2043364516 redo IR_IF node, removing IR_ELSE, IR_ENDIF 2007-02-06 20:45:43 -07:00
Ben Skeggs
f46c19d965 nouveau: a couple of NV3x fixes 2007-02-06 14:01:19 +11:00
Brian
d434019633 additional comments for BranchTarget 2007-02-05 18:04:35 -07:00
Brian
2755c798f3 BRK instruction's BranchTarget field now used for efficiently breaking out of loops.
BRK's BranchTarget field actually points to the top of the loop, not the
bottom, since we don't know the later's location yet.  In the interpreter,
basically do an indirect jump to update the PC.
2007-02-05 18:01:02 -07:00
Brian
8608079647 Use IR node's BranchNode field for IF/ELSE/ENDIF instructions.
This allows us to back-patch the IF/ELSE instruction's BranchTarget field
to point to the location of the ELSE/ENDIF instructions.  No longer have to
search for ELSE/ENDIF in the interpreter.  Also makes it trivial to translate
IF/ELSE instructions into conditional/unconditional BRA instructions.
2007-02-05 17:18:10 -07:00
Jakob Bornecrantz
8518ddda7b Add support for CN700 chipset in miniglx 2007-02-06 10:22:47 +11:00
Brian
d9731b26e7 minor formatting changes 2007-02-05 15:17:06 -07:00
Brian
5e73284cee set UseHighLevelInstructions = false for now 2007-02-05 15:00:48 -07:00
Brian
cf92c72797 Initial implementation of high-level flow-control instructions.
IF/ELSE/ENDIF and BEGIN_LOOP/END_LOOP/BREAK instructions seem to work.
Disabled by default though until better tested.
Implemented IR_NOT, but needs optimization.
2007-02-05 15:00:07 -07:00
Brian
5db088d70f indentation for program instructions (if/else, loops) 2007-02-05 14:58:15 -07: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
01001d80e2 Initial support of loop and subroutine instructions.
New high-level flow-control instructions, both at IR level and GPU instructions
for looping and subroutines.
2007-02-05 11:28:15 -07: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
Brian
dd34fe8679 Merge SWvertex texcoord and varying fields into attrib[] array field.
Fragment texcoords and varying code is now unified in the point/line/triangle
rasterization code.  In the future, merge color, fog, etc. attribs.
2007-02-05 10:10:01 -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
Brian
93b975a1d9 Add literal_size field to slang_operation.
Used to track the number of components in a float/int/bool literal.
Helps with some typechecking things.
Fixes problems with calls such as "distance(v2, vec2(1.0, 2.0))"
2007-02-03 17:24:24 -07:00
Brian
5ee684cba9 minor tweaks to distance() funcs 2007-02-03 17:21:33 -07:00
Brian
82f53f45d9 remove unused slang_operation fields 2007-02-03 16:25:44 -07: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
edf24e699e shading language texture demo/test 2007-02-03 11:36:16 -07:00
Brian
00d63aafc6 added FLUSH_VERTICES() in _mesa_use_program() 2007-02-03 11:35:02 -07:00
Brian
8e0c6fc0be added texdemo1 2007-02-03 11:33:13 -07:00
Brian
68fc4ff1d7 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:31:16 -07: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
Brian
fee9bbe475 Only glUniform1i() can be used to set sampler uniforms. Generate error otherwise. 2007-02-02 18:05:43 -07:00
Brian
a90e4c3ddf add vec4_texcube to AsmInfo[] 2007-02-02 18:00:26 -07:00
Brian
1b3092e4bb add _slang_multiply_swizzles() 2007-02-02 18:00:03 -07:00
Brian
bf823b6b77 clean-ups 2007-02-02 16:46:50 -07:00
Brian
670e900719 clean-ups 2007-02-02 16:45:07 -07:00
Brian
31d2a00192 clean-ups 2007-02-02 16:41:52 -07:00
Brian
b4f38a4d60 remove slang_builtin_vec4.gc 2007-02-02 16:38:04 -07:00
Brian
4bbef7a644 remove slang_builtin_vec4.gc 2007-02-02 16:38:00 -07:00
Brian
d9dbb3e154 remove slang_export.[ch] 2007-02-02 16:14:55 -07:00
Brian
e1b47b68ec reformat, clean-up comments 2007-02-02 16:12:20 -07:00
Brian
1f9def3163 move _slang_locate_function() 2007-02-02 16:10:02 -07:00
Brian
9cfee527f6 remove multibyte chars 2007-02-02 16:08:45 -07:00
Brian
3f71282850 remove unused field 2007-02-02 15:33:16 -07:00
Brian
72c3672857 remove slang_asm_string() 2007-02-02 15:32:32 -07:00
Brian
0d1cd6d41c s/SLANG_ASSEMBLE_TYPEINFO_H/SLANG_TYPEINFO_H/ 2007-02-02 15:31:21 -07:00
Brian
1bc71e32ea s/slang_assembly_typeinfo/slang_typeinfo/ 2007-02-02 15:30:50 -07:00
Brian
fe45343df9 s/slang_assembly_name_space/slang_name_space/ 2007-02-02 15:29:48 -07:00
Brian
884fdfeb22 remove slang_library_texsample.[ch] 2007-02-02 15:23:38 -07:00
Brian
4a2ef4fd88 remove slang_library_texsample.[ch] 2007-02-02 15:23:33 -07:00
Brian
6c52dd3852 rename slang_link2.c slang_link.c 2007-02-02 15:22:05 -07:00
Brian
5c1763e7b5 rename slang_link2.c slang_link.c 2007-02-02 15:22:02 -07:00
Brian
f65091c947 rename slang_assemble_typeinfo.[ch] to slang_typeinfo.[ch] 2007-02-02 15:19:58 -07:00
Brian
7ace638da2 rename slang_assemble_typeinfo.[ch] to slang_typeinfo.[ch] 2007-02-02 15:19:48 -07:00
Brian
4f22bdf3e5 remove more slang assembly-related code 2007-02-02 15:17:46 -07:00
Brian
640afdf4f2 remove more slang assembly-related files, codee 2007-02-02 15:16:51 -07:00
Brian
452217e29a removed obsolete shader assembly files 2007-02-02 15:10:34 -07:00
Brian
11e92390f6 remove more assembly-related code 2007-02-02 15:05:46 -07:00
Brian
b94c14114f remove slang_assemble*.c files 2007-02-02 14:51:34 -07:00
Brian
8d39610037 move some functions, disable some code in preparation for removing assembly code 2007-02-02 14:51:09 -07:00
Brian
fa1fe5f6f3 fix emit_tex() breakage 2007-02-02 14:47:03 -07:00
Brian
1b24e2d5a7 remove slang_export.c and related code 2007-02-02 14:24:24 -07:00
Brian
5072fd3a64 Remove old slang linker code. 2007-02-02 14:05:55 -07:00
Brian
8b60787e85 remove slang_link.c and slang_analyse.c 2007-02-02 14:05:25 -07:00
Brian
d79fd74871 remove old linker stuff 2007-02-02 14:04:58 -07:00
Brian
a4f4ca7767 added newline at end 2007-02-02 13:54:24 -07:00
Brian
ccd3e7dcef Remove obsolete files. 2007-02-02 13:53:28 -07:00
Brian
650d46a107 remove slang_execute.c, slang_execute_x86.c 2007-02-02 13:49:39 -07:00
Brian
d265bdf81a Remove all dependencies on the old slang interpreter/executor. 2007-02-02 13:49:07 -07:00
Brian
aa6866d63c reindent 2007-02-02 12:08:26 -07:00
Brian
b12b13f832 _slang_evaluate_int() no longer used 2007-02-02 12:07:57 -07:00
Brian
06daf74a71 use _slang_simplify() to evaluate array sizes 2007-02-02 12:02:53 -07:00
Brian
70570d4199 Move guts of slang_lookup_constant() into a new function in slang_simplify.c 2007-02-02 12:01:29 -07:00
Brian
5c21747783 replace abort() with _mesa_problem() 2007-02-02 11:42:04 -07:00
Brian
2f5b3c9607 fix maxInst argument 2007-02-02 11:37:58 -07:00
Brian
e53ec3a862 try to simplify variable initializers 2007-02-02 11:32:59 -07:00
Brian
6147ccba63 unroll inner loop of interpolate_varying() 2007-02-02 11:23:16 -07:00
Brian
531348e814 simplify derivative-related code 2007-02-02 11:20:08 -07:00
Brian
e4f976b8b9 simplify interpolate_texcoords() 2007-02-02 11:19:43 -07:00
Brian
9ab512ad8c Replace color, z, w, texture interpolants with new generic attrib interpolants. 2007-02-02 11:01:01 -07:00
Brian
462d8f5faf New span attrStart/attrStepX/attrStepY fields to replace fog, specular, etc. fields. More to come. 2007-02-02 09:46:43 -07:00
Brian
4e7fd7ad96 get rid of unused span->start field 2007-02-02 09:09:13 -07: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
Brian
9742547245 Fix logic in _slang_simplify(): vec2() constructor case wasn't getting used. 2007-02-01 18:11:19 -07: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
abeca8d17d comments 2007-02-01 10:08:07 -07:00
Brian
496aa47042 remove slang_label.c until it's ready 2007-02-01 09:52:26 -07:00
Brian
f3e507ef9f New SWspanarrays attribs[] array.
Replace texcoord[], varying[], etc. arrays with single attribs[] array, indexed
by FRAG_ATTRIB_* values.
Eliminates need to copy data into fragment program machine input registers.
Will lead to future clean-ups.
2007-02-01 09:51:48 -07:00
Brian
81ef03be65 silence uninitialized var warning 2007-02-01 09:25:55 -07:00
Brian
8fa6f7363e silence uninitialized var warning 2007-02-01 09:24:41 -07:00
Brian
3866558c98 move span-related types/tokens into s_span.h 2007-02-01 08:24:02 -07:00
Brian
f673b24017 additional assertions, bump up MAX_EXEC 2007-02-01 08:18:03 -07: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
Brian
d9d33b6fc8 disable all x86 code, broken and will eventually be removed 2007-01-31 17:01:52 -07:00
Brian
b63c100677 Overhaul handling of writemasks/swizzling. This fixes two problem cases:
vec2 v;  v.x = v.y = 1.0;  // chained assignment
vec4 v;  v.zx = vec2(a,b);  // swizzled writemask
2007-01-31 16:34:54 -07:00
Brian
309d5b6650 New asm instruction and IR_CLAMP node type to allow clamping to [0,1] with instruction saturate-write option. Not finished yet. 2007-01-31 08:55:10 -07:00
Brian
9d5853813f allow fragment-only and vertex-only programs 2007-01-31 08:47:12 -07:00
Xiang, Haihao
5893474c74 _mesa_pack_rgba_span_float: fix for packing data into group 2007-01-31 09:47:02 +08:00
Brian
7162398778 fix _mesa_get_uniform_location() so it uses the given program handle 2007-01-30 16:55:03 -07: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
Brian
fc5a7ea5de noise() works now 2007-01-28 19:02:03 -07:00
Brian
7aece10039 noise functions 2007-01-28 19:01:35 -07:00
Brian
f94e4f216f simple noise test 2007-01-28 19:01:04 -07:00
Brian
a06f929362 combine emit_unop(), emit_binop(), emit_triop() into emit_arith() 2007-01-28 16:26:09 -07:00
Brian
62e7c033c0 implement mix() with LRP instruction 2007-01-28 16:11:11 -07:00
Matthieu Castet
c7c0a6ddcd nouveau : nv10 mixing cached stuff with not cached stuff is bad. 2007-01-28 23:26:21 +01:00
Brian
4de6fac4da Lots of vartable clean-ups, fixes. Report an error message when we run out
of registers, rather than crash.
2007-01-28 12:49:47 -07:00
Brian
602dc1a638 minor clean-ups 2007-01-28 12:13:27 -07:00
Brian
bbec2fdb3a minor updates 2007-01-28 12:11:10 -07: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
Brian
513325fa32 Clean-up of var/temp allocation function parameters. 2007-01-27 20:29:33 -07:00
Brian
d6772f157a Improved register allocation: allow four 'float' vars or temporaries to share a single register. Clean-up needed. 2007-01-27 20:06:41 -07: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
Brian
ea8b68e0f7 asst fixes, tranpose span->varying array indexes 2007-01-25 10:54:52 -07:00
Brian
ff13f0ea4d fixes, clean-ups, transpose span->varying array indexing 2007-01-25 10:52:48 -07: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
Brian
5ef553da9a new comments, ideas 2007-01-25 10:51:53 -07: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
Brian
e713c21bd0 remove some parenthesis 2007-01-24 14:15:01 -07:00
Brian
ff917003f6 use FRAG_BIT_TEX() 2007-01-24 14:14:14 -07:00
Brian
ccea3ff8a9 fix varying interpolation 2007-01-24 14:13:36 -07:00
Brian
0552abce0e only setup varying vars that will be used 2007-01-24 14:13:02 -07:00
Brian
07373512c7 added FRAG_BIT_TEX() and FRAG_BIT_VAR() macros 2007-01-24 14:12:08 -07: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
c920d201c2 updated comment 2007-01-23 17:41:25 -07:00
Brian
6d4e561e39 indicate which opcodes are used by Mesa GLSL, updated comments 2007-01-23 17:39:25 -07:00
Brian
223d7cb3c7 fix g++ warnings/errors 2007-01-23 16:37:51 -07: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
Brian
bc5d480e2c added shading.html link 2007-01-21 10:37:25 -07: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
Brian
9595d1935c Added a page with shading language status, tips, etc. 2007-01-20 13:40:57 -07:00
Brian
059e901446 Add a simple mechanism for annotating instructions for easier debugging. 2007-01-20 10:47:10 -07:00
Brian
f116fcc328 optimization: emit MAD instructions when possible 2007-01-20 09:46:02 -07:00
Brian
1f208c3546 remove unused swizzle parameter to -storage_to_src_reg() 2007-01-20 09:29:04 -07:00
Brian
5ae49cf3ed Initial implementation of OPCODE_IF/ELSE/ENDIF instructions. 2007-01-20 09:27:40 -07:00
Brian
a3e938b8da Reimplement && and || to do short-circuit evaluation.
Improved shader error handling.
2007-01-20 09:22:13 -07:00
Brian
9f07ed00e4 rewrite more __postIncr functions 2007-01-20 07:56:00 -07:00
Brian
3cec66512d Implement do/while loops. Replace IR_CJUMP with IR_CJUMP0 and IR_CJUMP1 so
we can either jump on zero, or non-zero predicate.
2007-01-19 13:13:15 -07:00
Brian
eff9690351 Rewrite normalize(vec3/vec4) to use one less register. 2007-01-19 12:19:38 -07:00
Brian
dceae2829e report error message when something fails 2007-01-19 12:02:31 -07:00
Brian
203946e1f9 print error msg when there's a problem 2007-01-19 12:02:06 -07:00
Brian
74b27674a8 remove stray tab 2007-01-19 10:31:52 -07:00
Brian
a0092c51b1 Implement fragment discard/kill. 2007-01-19 10:15:34 -07:00
Brian
8374ccb66f change while-loop to create new scope for loop body, per spec 2007-01-19 10:02:58 -07:00
Ben Skeggs
669fefd3da nouveau: bump drm patchlevel 2007-01-19 15:39:36 +11:00
Brian
16183e6430 Implement constant sharing so that 4 float constants can share a single
float[4] register slot.
2007-01-18 17:29:23 -07:00
Brian
ce6640001d _mesa_add_unnamed_constant() now tries to re-use constants already in
the parameter list.
2007-01-18 17:23:48 -07:00
Brian
d70771752f Reimplement code for swizzling so that expressions like (p+q).x for vectors p and q works correctly. 2007-01-18 15:35:44 -07:00
Brian
d885ff470a rewrite a bunch of assignment operators (like +=) 2007-01-18 15:33:13 -07:00
Brian
e4e66476a9 remove debug code 2007-01-18 15:23:45 -07:00
Patrice Mandin
3c59483ed7 nouveau: preliminary nv50 state 2007-01-18 22:07:17 +01:00
Brian
f43eac3ed8 remove swizzle param from new_var() 2007-01-18 09:22:44 -07: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
Brian
8a2368edce rewrite additional matrix-related functions to reduce register needs 2007-01-17 18:37:20 -07:00
Brian
89a3bafe04 rewrite mat4 * mat4 operator to use fewer temps 2007-01-17 18:30:53 -07:00
Brian
272622a2e0 do bounds check in _slang_push_var_table(), added comment 2007-01-17 18:21:00 -07:00
Brian
2585b74e19 rewrite matrix constructors 2007-01-17 18:06:40 -07:00
Brian
4864aaeb02 handle var size > 4 in _slang_pop_var_table() 2007-01-17 18:02:44 -07:00
Brian
f4e345c1a8 minor fprintf() change 2007-01-17 16:30:11 -07:00
Brian
eb0c478b17 Rewrite a bunch of constructors. It's now important that the first
constructor for any given type be the one that takes the most parameters
as this is the constructor that'll be used when there's no perfect match
to the caller's arguments.
See the _slang_adapt_call() function for details.
2007-01-17 16:29:51 -07:00
Brian
3a3bb953b6 _slang_gen_function_call_name() now tries to adapt function calls (expand
vectors, insert casts) when a perfect match isn't found.
2007-01-17 16:14:03 -07:00
Brian
eabb7e66bd New _slang_adapt_call() function.
This is used to modify function calls (when possible) to make the arguments
map to the function parameters.  This includes "unrolling" vector types
and doing casts.

Example:
   vec2 v2 = vec2(1.2, 3.4)
   ivec3 iv = ivec3(false, v2);
Is converted into:
   ivec3 iv = ivec3(int(false), int(v2[0]), int(v2[1]))
2007-01-17 16:11:50 -07:00
Brian
397b807ad5 code clean-up, re-org. Added IR_F_TO_I support. 2007-01-17 16:05:03 -07:00
Brian
bb53124fca added IR_F_TO_I, update comments 2007-01-17 15:58:24 -07:00
Brian
0bad236cfb Added OPCODE_INT to convert 4 floats to 4 ints. 2007-01-17 15:54:14 -07:00
Brian
46a9241248 add texturing, other options 2007-01-17 10:25:44 -07:00
Brian
811f54fa75 Fix/clean-up a number of things related to variable/temporary allocation. 2007-01-17 09:54:31 -07: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
Brian
552a65e454 Implement codegen for the selection operator ( b ? x : y ) 2007-01-16 17:38:39 -07:00
Brian
3596903068 fix typo 2007-01-16 16:53:41 -07:00
Brian
271d504ed7 draw a box, press 'a' to animate 2007-01-16 15:27:11 -07:00
Brian
9d0ae967d4 added some VerteAttrib funcs 2007-01-16 14:57:12 -07:00
Brian
f44ba11815 Added toyball and bumpmap tests using shaders from the OpenGL Shading Language (orange) book. 2007-01-16 14:55:43 -07:00
Brian
9b5dc1358a when automatically binding vertex attributes, start with attrib 1, not 0 2007-01-16 14:52:22 -07:00
Brian
4f027a33b9 remove dead code 2007-01-16 14:19:37 -07:00
Brian
0f91310bf3 comments 2007-01-16 14:17:57 -07:00
Brian
d90c655b05 implement logical or, xor, not 2007-01-16 14:15:05 -07:00
Brian
99e788fe56 some additional vector constructors 2007-01-16 14:10:30 -07:00
Stephane Marchesin
7c8f311e40 nouveau: Use the most recent card list. 2007-01-16 21:43:54 +01:00
Brian
156e583a35 fix _slang_gen_subscript() for the case when a simple vector is accessed as an array: convert index to a swizzle/writemask 2007-01-16 10:45:34 -07: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
Brian
0d55346156 Use arrow keys to pan and z/Z to zoom in/out to explore the fractal. 2007-01-15 17:48:19 -07:00
Brian
2ccd264695 Added new directory of GL shading language demos: glsl 2007-01-15 17:27:24 -07:00
Brian
f6507157e2 Reimplement the post-increment/decrement functions.
Instead of defining functions with an extra dummy parameter to distinguish
from the pre-incr/decr functions, just use new function names: __postIncr
and __postDecr.
2007-01-15 16:54:38 -07:00
Brian
c410994653 Implement the ++var and --var operators, improve some constructors. 2007-01-15 16:38:12 -07:00
Brian
0a097675f1 added vec3 constructor code 2007-01-15 16:34:33 -07:00
Brian
82258b7af3 added IR_ELEMENT 2007-01-15 16:33:54 -07:00
Brian
04ac15fd80 checkpoint: ++, -- and && operators 2007-01-15 15:51:49 -07:00
Brian
83d3ff590d Redo the way array indexes are handled. Resolve storage location at code emit time, not codegen time. 2007-01-15 13:58:45 -07: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
Brian
c807169888 remove old globals 2007-01-15 11:10:11 -07:00
Brian
a5bbe206a8 comments 2007-01-15 11:08:10 -07:00
Brian
8de3dc1701 Move some global vars into slang_assemble_ctx. 2007-01-15 11:07:46 -07:00
Patrice Mandin
7520478eb0 nouveau:nv10: fix setting clip region 2007-01-15 18:58:24 +01:00
Brian
4f5901b265 fix the subassig, mulassign and divassign cases 2007-01-15 10:35:59 -07:00
Brian
629fd78f79 clean-up slang_allocate_storage() 2007-01-15 10:35:03 -07: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
Brian
64414ea0e9 added glUniform1fv_func, glUniform2fv_func 2007-01-13 14:51:02 -07:00
Brian
691ed5e54b Rework code related to temp register allocation, both for user variables
and expression temporarires.  Much better register utilization now.
Lots of other fixes.
The OpenGL GLSL "orange book" brick shader demo works now.
2007-01-13 14:49:52 -07:00
Brian
5daa99d2a4 slang_variable_scope now stores array of pointers to slang_variables. 2007-01-13 14:47:48 -07:00
Brian
97c7937c65 added another vec4 constructor, updated += operator 2007-01-13 14:46:12 -07: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
Brian
95a441112e Fix a problem with inlined "return" statements. Make some attempt to free temporaries. 2007-01-11 11:22:26 -07:00
Brian
063f3f7fc4 disable some code that'll eventually go away 2007-01-11 11:21:38 -07:00
Brian
749ed66549 new vec3 constructor, replace float_add w/ vec4_add 2007-01-11 11:20:23 -07:00
Brian
c8e148e38c tweak output 2007-01-11 11:19:11 -07:00
Jerome Glisse
b55f1ec9af Fix typo from commit 1d312ae013 . 2007-01-11 12:54:42 +01:00
Brian
c0c31024a3 checkpoint: codegen for global vars/constants now working 2007-01-10 13:51:48 -07:00
Brian
88e2dbfd10 checkpoint: codegen for global vars w/ initializers 2007-01-10 13:33:38 -07:00
Brian
8a48f35574 assorted code clean-ups 2007-01-10 12:18:50 -07:00
Brian
ee11842bfc fix size bug in _mesa_add_attribute() 2007-01-10 12:18:33 -07:00
Brian
29bff4e12d simplify _mesa_add_state_reference() 2007-01-10 08:37:59 -07:00
Brian
88f7212312 Update _save_VertexAttrib() functions for non-aliasing behaviour. 2007-01-10 08:15:35 -07:00
Brian
01a91eb657 get rid of STATE_USER_ATTRIB/STATE_AUTO_ATTRIB 2007-01-09 19:26:22 -07:00
Brian
b7978af693 clean up a bunch of program parameter stuff 2007-01-09 19:17:17 -07:00
Brian
cc858bfa84 added a few more 2.0 functions 2007-01-09 17:49:53 -07:00
Brian
3209c3ed0d Implement vertex attribute binding.
Users can set explicit binding with glBindAttribLocation(), otherwise the
linker will allocate generic attribute slots.
2007-01-09 17:49:24 -07:00
Brian
5e75db12d7 more debug code (disabled) 2007-01-09 17:47:13 -07:00
Brian
e8673143ea add code for generic attributes 16..31 2007-01-09 17:46:45 -07:00
Eric Anholt
3dd243c59e Track rename of DamagePost -> DamageAdd. 2007-01-09 16:39:10 -08:00
Brian
048412473b added _mesa_count_texture_indirections(), _mesa_count_texture_instructions() 2007-01-09 11:00:47 -07:00
Brian
21f99792a9 Moved NumTexInstructions, NumTexIndirections, etc. into gl_program since
they can now apply to vertex programs.
2007-01-09 11:00:21 -07:00
Brian
ae80d13f6d remove old comment 2007-01-09 10:10:59 -07:00
Brian
829da4c345 Vertex program texture samplers done, but untested (need to add TEX/TXB to
the T&L vertex program interpreter).
2007-01-09 09:31:30 -07:00
Brian
855ebb26d1 Implement shadow samplers and dFdx(), dFdy() code generation. 2007-01-09 09:14:32 -07: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
Brian
20aec24ac7 implement biased texture functions 2007-01-08 16:56:52 -07:00
Brian
41a4e828d9 check if _Current == NULL for TXB 2007-01-08 16:49:43 -07:00
Brian
8cad795a80 added 1D texture functions 2007-01-08 16:10:55 -07:00
Brian
9a78ef980d Remove if (tObj) conditional so that texture units without a texture image
return black (0,0,0,1) when sampled.
2007-01-08 16:10:34 -07:00
Brian
85e0634b54 update texture1D functions 2007-01-08 16:02:40 -07:00
Brian
42153d7858 Implement projective texture sampling, 3D textures. Disable some debug output. 2007-01-08 15:58:14 -07:00
Brian
483ca39bca Move some code around, add some comments. 2007-01-08 14:11:54 -07:00
Brian
d3fe7398e3 Move storage allocation functions from slang_emit.c to slang_codegen.c 2007-01-08 14:06:00 -07:00
Brian
27cc9068ce checkpoint: more work on variable/storage allocation 2007-01-08 13:36:53 -07:00
Brian
cf4d4342c9 Checkpoint: re-org of (global) variable allocation code. More to come... 2007-01-08 13:09:47 -07: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
5cf7326132 Checkpoint glsl compiler work: sampler uniforms now implemented, linked properly. 2007-01-05 16:02:45 -07:00
Brian
b2ab693d68 added PROGRAM_SAMPLER 2007-01-05 16:01:43 -07:00
Brian
eef70ff79a added Sampler field to prog_instruction struct 2007-01-05 16:01:26 -07:00
Brian
288c5396e6 added PROGRAM_SAMPLER 2007-01-05 16:01:11 -07:00
Brian
9805e76744 added _mesa_add_sampler() 2007-01-05 16:00:57 -07: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
Brian
4cc90ee0b0 update TexturesUsed[] in slang_update_inputs_outputs() 2007-01-04 17:44:04 -07:00
Brian
4428e8f20f update TexturesUsed[] in slang_update_inputs_outputs() 2007-01-04 17:43:53 -07:00
Brian
64f78dd6a8 compute InputsRead/OutputsWritten with slang_update_inputs_outputs() 2007-01-04 17:30:30 -07:00
Brian
c9db223f90 move TexturesUsed[] into gl_program since vertex programs/shaders can use textures nowadays 2007-01-04 17:22:19 -07:00
Brian
7edd2ecb55 simplify update_texture_state() a bit, compute _EnabledCoordUnits for shaders 2007-01-04 16:19:54 -07: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
Brian
ff81f074fb minor formatting fix 2007-01-04 15:25:29 -07:00
Brian
de03fe4a3f added texture attribs in slang_find_input() 2007-01-04 15:06:50 -07:00
Brian
7b4d10b4a3 added glUniform1i_func 2007-01-04 14:40:56 -07:00
Brian
e640300602 initial code to get texture sampling limping along 2007-01-04 14:40:02 -07:00
Brian
6a92d98d1a temporary disable some memory deallocations to work around a memory corruption bug 2007-01-04 14:38:45 -07:00
Brian
89dc48569a finish some loose ends in _mesa_uniform() 2007-01-04 14:35:44 -07:00
Brian
602045fd7b update_texture_state() updated for new shaders 2007-01-04 14:33:42 -07: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
439758353a Fix some incorrect GL error values. Reorganize _mesa_compile_shader() code. 2007-01-04 08:21:09 -07: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
Brian
d8babcfc57 fix typos 2006-12-22 10:26:22 -07:00
Brian
aa710c3e6b implement unary +, - 2006-12-22 10:18:50 -07:00
Brian
9b694589e9 chmod a-x 2006-12-21 18:12:03 -07:00
Brian
01f2e7f62f checkpoint: pre/post incr/decr operators 2006-12-21 18:05:06 -07:00
Brian
392d9701e3 added INTERP_VARYING code 2006-12-21 17:50:22 -07:00
Brian
eb2a6d62f9 s/attribute/varying/ 2006-12-21 17:50:07 -07:00
Brian
2905385744 comment about uniforms 2006-12-21 11:21:26 -07:00
Brian
58af54c767 checkpoint: rewrite vec/mat products 2006-12-21 10:56:09 -07:00
Brian
c155ae1dfe fix typos 2006-12-21 10:49:27 -07:00
Brian
a0d6b506cd added IR_NEG for negation 2006-12-21 10:47:28 -07:00
Brian
356f8ea213 checkpoint: matrix/float, unary negation rewrite 2006-12-21 10:45:49 -07:00
George Sapountzis
b766643e5c Drop mesa wrappers for XFree86. 2006-12-21 19:41:08 +02:00
Brian
c73e07405c checkpoint: ivec/int and mat/mat operations 2006-12-21 10:03:15 -07:00
Brian
bb1bf8b3aa checkpoint: more basic math rewritting 2006-12-21 09:40:08 -07: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
Brian
a33532f5f4 checkpoint: re-org assignment operator functions 2006-12-20 18:04:59 -07:00
Brian
1ff1e89ff4 added glUniformMatrix2/3fv_func 2006-12-20 17:56:29 -07:00
Brian
cec316c9eb checkpoint: more basic math operator re-org 2006-12-20 17:55:42 -07:00
Brian
8d239a6880 Checkpoing: re-organization of basic arithmetic functions. 2006-12-20 17:43:56 -07:00
Brian
2a62cbd24b handle PROGRAM_UNIFORM, fix a _mesa_problem() call 2006-12-20 17:19:45 -07:00
Brian
3a8e2776a6 Uniform matrix support.
Implement _mesa_uniform_matrix()
Support for program parameters/uniforms with more than 4 elements.
Store 4x4 matrices in column-major order in registers.
Update mat mul built-in functions accordingly.
2006-12-20 17:19:16 -07:00
Brian
83ca3ff384 added _mesa_print_parameter_list() 2006-12-20 17:17:38 -07:00
Brian
2cc7dba718 New IR_COND node for evaluating conditional expressions (for if/while/for). 2006-12-20 12:41:59 -07:00
Brian
79a340bc15 use cast wrappers for sanity checking 2006-12-20 09:57:56 -07:00
Brian
f2923613a4 code re-org 2006-12-20 09:56:44 -07:00
Brian
d881a9c136 Minor clean-ups, reformatting, comment changes. 2006-12-20 09:31:07 -07:00
Brian
9e4bae9cca Fix shader object reference counting and hash table deallocation. 2006-12-20 09:27:42 -07:00
Brian
65a18442e5 Clean-up and re-org of the main GLSL object types.
Use the gl_shader struct as it should be.
Renamed gl_linked_program to gl_shader_program.
Store both shaders and programs in the same hash table and use the Type field
to distinguish them.
2006-12-19 18:46:56 -07:00
Brian
0bf5dbe002 Overhaul of GLSL API functions, dispatching, etc. 2006-12-19 18:02:41 -07:00
Brian
5b01c5e9d2 Overhaul of GLSL API functions, dispatching, etc. 2006-12-19 18:02:03 -07:00
Brian
46b06bdb26 Massive re-org of GLSL-related API functions.
Added new GLSL functions to struct dd_function_table.
main/shaders.c calls GLSL functions through the dd_function_table.
shader/shader_api.c implements the API functions.
Other assorted changes, fixes everywhere else.
2006-12-19 17:59:32 -07:00
Dave Airlie
e3358dea66 Merge branch 'nouveau-import' 2006-12-20 09:30:32 +11:00
Brian
2e76f0a846 check for null Parameters ptr in _mesa_clone_program() 2006-12-19 09:52:07 -07:00
Brian
af1d46b68a lots of clean-up and re-org 2006-12-19 08:59:51 -07:00
Brian
bb8f7627f7 additional error checking 2006-12-19 08:59:36 -07:00
Brian
8473ae475f new error msg 2006-12-19 08:59:19 -07:00
Brian
194bc5afbd rewrite +=, -= etc for floats 2006-12-19 08:58:56 -07:00
Brian
8e20c417d4 Implement array indexing of simple vec2/3/4 types. A bit of a hack for now... 2006-12-18 17:54:58 -07:00
Brian
d22079217c Added instruction counter to catch infinite loops (temporary). 2006-12-18 16:22:27 -07:00
Brian
b50280e95f Check for inst->CondUpdate, print .C suffix. 2006-12-18 16:21:58 -07:00
Brian
fbb71da2b9 Generate IR code for for/while loops, break and continue statements. 2006-12-18 14:45:26 -07:00
Brian
1aee657b0f Implement if-conditionals and while loops, added temporary resolve-branches function in linker. 2006-12-18 10:05:24 -07:00
Brian
34ae99d604 GLSL API functions. 2006-12-18 08:28:54 -07:00
Brian
ad2519ac6b Use _mesa_free_linked_program_data() 2006-12-18 08:28:06 -07:00
Brian
962a9f2f9d comments 2006-12-18 08:25:23 -07:00
Ben Skeggs
53d40646bd Don't build passthrough shader on <NV40 2006-12-17 03:38:21 +00:00
Brian
0031ea7d85 fix comment, handle NOP 2006-12-16 12:52:55 -07:00
Brian
f7159552ae Initial code for conditional constructs. 2006-12-16 12:52:19 -07:00
Brian
3a2815370d print BRA instructions 2006-12-16 12:51:34 -07:00
Brian
3e1f4bc15b added cases for BRA, NOP 2006-12-16 12:51:12 -07:00
Brian
b456413d76 cases for NOP, BRA 2006-12-16 12:50:51 -07: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
Brian
a4be104887 start implementing relational operators 2006-12-15 17:05:53 -07:00
Brian
cb7ccc4b14 start rewriting the matrix/vector functions 2006-12-15 16:47:42 -07:00
Brian
f167d0e7d5 added assertion to catch use of too many temporaries 2006-12-15 15:37:32 -07:00
Brian
fa8059a89c fix double-printing of comment info 2006-12-15 15:36:29 -07:00
Brian
9b00fa9ac2 code movement 2006-12-15 15:36:09 -07:00
Brian
bfc02dd30f Lots of assorted changes.
Implement assignment/move for types larger than 4 floats.
Fix codegen bug for "return expr" in inlined functions.
More clean-up of storage allocation code (slang_resolve_storage).
2006-12-15 15:35:57 -07:00
Brian
6579245800 redo mat4 addition, mat4 constructor from vec4s 2006-12-15 15:32:11 -07: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
4b4632f94c vertex/fragment program field changes 2006-12-15 10:10:23 -07:00
Brian
d6aff512fe varying var changes 2006-12-15 10:10:01 -07:00
Brian
464b9f4f6c varying var changes 2006-12-15 10:09:49 -07:00
Brian
9abf73b8cc varying changes 2006-12-15 10:09:33 -07:00
Brian
a7e252026d updated includes 2006-12-15 10:09:12 -07:00
Brian
60a7200c0d updated includes 2006-12-15 10:08:59 -07:00
Brian
89f88058b9 use MAX_VARYING 2006-12-15 10:08:24 -07:00
Brian
e3b2668865 use MAX_VARYING 2006-12-15 10:08:15 -07:00
Brian
a7a582296b more debug output 2006-12-15 10:08:02 -07:00
Brian
a90046f109 Lots of assorted changes for new GLSL compiler backend.
New datatypes, constants, variables.
2006-12-15 10:07:26 -07:00
Brian
becb393d42 Use extfuncs.h helper. Added command line options for loading
vertex/fragment shaders from files.
2006-12-15 09:31:14 -07:00
Brian
e55b771a1e simple extension function wrangler 2006-12-15 09:30:31 -07:00
Brian
39adc30250 change/add/rm several filenames 2006-12-15 08:55:49 -07:00
Brian
c968d3d410 Renamed s_nvfragprog.[ch] to s_fragprog.[ch] 2006-12-15 08:50:02 -07:00
Brian
b78fb7abaf Renamed s_nvfragprog.[ch] to s_fragprog.[ch], program_instruction.h to prog_instruction.h 2006-12-15 08:49:27 -07:00
Brian
6232438acb remove unneeded includes 2006-12-14 15:54:01 -07:00
Brian
885afd59ec remove unneeded includes 2006-12-14 15:53:49 -07:00
Brian
2c1f975852 remove unneded includes 2006-12-14 15:50:34 -07:00
Brian
901c1bb402 remove some unneeded includes 2006-12-14 15:49:09 -07:00
Brian
0831ef5038 include prog_print.h 2006-12-14 15:47:54 -07:00
Brian
cc6a141dc1 Remove some moved extern decls. 2006-12-14 15:47:34 -07:00
Brian
464b82b1e6 Move some code from prog_print.c to prog_instruction.c 2006-12-14 15:47:08 -07: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
865f88afc0 Renamed from s_nvfragprog.[ch] 2006-12-14 15:14:14 -07:00
Brian
49f82803cc Updated includes. 2006-12-14 15:13:06 -07:00
Brian
60417b646d chmod a-x 2006-12-14 15:03:33 -07:00
Brian
57d9531cd6 Updated includes. 2006-12-14 15:03:04 -07:00
Brian
c0551f0a46 Updated includes. 2006-12-14 15:02:37 -07:00
Brian
a7a89e362b Updated #includes after splitting program.h 2006-12-14 15:02:19 -07:00
Brian
0560d81ce9 Move many functions into new files. 2006-12-14 15:01:28 -07:00
Brian
00cdc0a472 Split the program.[ch] files into several new files. 2006-12-14 15:01:06 -07:00
Brian
5cc1292508 Replace __extension__ with LONGSTRING. 2006-12-14 14:27:05 -07:00
Brian
200736ebd8 Modify _mesa_strdup() so it handles NULL correctly. 2006-12-14 13:59:53 -07:00
Brian
cc0c8b2248 Updates for new linker (merged varying/uniform vars). 2006-12-14 13:59:25 -07:00
Brian
ef264c2971 Assorted fix-ups for the new linker.
Disable some of the excessive debug output.
2006-12-14 13:58:57 -07:00
Brian
d4f7e4cc01 The new linker actually does a few things right now:
The varying vars used by the vertex and fragment shader are merged so they
agree.
Similarly, uniforms are merged (along with constants, etc).
The vertex/fragment program instructions are then cloned and rewritten
with the newly resolved uniform/varying locations.
2006-12-14 13:58:32 -07:00
Brian
b2a3a8554a New functions for cloning programs and parameter lists. 2006-12-14 13:56:58 -07:00
Brian
e7e4181361 Remove include of s_arbshader.h 2006-12-14 09:51:54 -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
Brian
2a9950dcb3 Remove unneeded -I directories (3Dlabs headers). 2006-12-13 19:20:45 -07: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
2cbfbcd972 Obsolete. 2006-12-13 15:38:07 -07:00
Brian
33ae886bbd Remove unused 3Dlabs code. 2006-12-13 15:36:26 -07:00
Brian
aed4f2cc2c Remove unused 3Dlabs code. 2006-12-13 15:36:00 -07:00
Brian
05dab5eaa2 Checkpoint GLSL compiler work. Add new sources, remove obsolete. 2006-12-13 15:34:10 -07:00
Brian
1fbb1c8d78 Obsolete. 2006-12-13 15:33:41 -07:00
Brian
a5011d9753 Not needed. 2006-12-13 15:33:09 -07: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
cefc983bec Retire old GLSL shader code. 2006-12-13 15:06:28 -07:00
Brian
12ef1fbefc Checkpoint for GLSL compiler changes.
In brief:
Check for enabled fragment program by looking at ctx->FragmentProgram._Current.
New code for varying variables.
2006-12-13 15:05:23 -07:00
Brian
a328e469d3 Checkpoint work for new GLSL compiler back-end.
Among changes:
Remove ctx->FragmentProgram._Active
Remove _UseTexEnvProgram
Move _MaintainTnlProgram, _MaintainTexEnvProgram, _TexEnvProgram and
_TnlProgram fields.
Remove/disable old GLSL interpreter code.
2006-12-13 14:58:13 -07:00
Brian
fe1d01cb39 Checkpoint of work for new GLSL compiler back-end. Lots of assorted changes. 2006-12-13 14:54:47 -07:00
Brian
8627bf1452 Rewrite/simplify most built-in functions to use updated set of __asm instructions. 2006-12-13 14:49:41 -07:00
Brian
aff8e204d2 Checkpoint new GLSL compiler back-end to produce fp/vp-style assembly instructions. 2006-12-13 14:48:36 -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
Brian Paul
eb667b979b remove directfbgl.h file 2006-12-02 18:20:53 +00:00
Brian Paul
b98c1e4a4b remove bogus link 2006-12-02 18:18:55 +00:00
Brian Paul
f10acf8b78 6.5.2 release updates 2006-12-02 18:18:41 +00:00
Gary Wong
50a81669ba Add i915tex and i965. 2006-12-02 02:20:05 +00:00
Gary Wong
7a43a6b4ff Structure CopyPixels similarly to i915 do_texture_copypixels, to ease future unification. 2006-12-02 01:13:06 +00:00
Claudio Ciccani
e99d6746ed Be aware that the surface storage can change between locks. 2006-12-01 20:58:26 +00:00
Claudio Ciccani
73fdecca9f Remove DirectFBGL header from Mesa bacause since 1.0.0 DirectFB installs its own header.
Updated to the current DirectFBGL interface (i.e. added GetProcAddress()).
2006-12-01 14:12:05 +00:00
Thomas Hellström
682393944c Fix an infinite loop error that may occur when many contexts are bound
to the same drawable in a multithreading environment. This one slipped out
of the texman merge.
2006-12-01 12:41:43 +00:00
Claudio Ciccani
40dc5902d3 Fixed compilation errors/warnings.
Duplicate destination surface to avoid saving/restoring the rendering state during each Clear.
2006-12-01 11:42:58 +00:00
Sean D'Epagnier
10cbd089ae the following improvements to linux-fbdev:
1. updated makefiles to build libOSMesa as well as libGL

these are improvements to fbdev-glut
1. mouse cursor will timeout and be invisible if not being used
2. do not restore colormaps to truecolor targets, this causes problems at
   exit on my g450
3. fixed a crash when cleaning up from failure by munmaping what had not
   yet been mmaped
4. Resize event handling is improved, the resize function is not invoked
   from a signal handler now.
5. The main loop can detect if it is running very fast (greater than 2khz)
6. keyboard up and special up events are generated from stdin input mode
   and if it is also not redrawing, it sleeps
7. corrections in escape sequences for function keys for stdin input
2006-11-30 03:25:28 +00:00
Roland Scheidegger
21cf414489 fix mixed conventional / generic vertex arrays which caused a wrong array order leading to very bogus rendering (for instance WoW intro screen mentioned in #8250). 2006-11-30 00:52:54 +00:00
Roland Scheidegger
e731d8aafa check for target instead of program->Target in _tnl_program_string, avoids segfault if program is NULL 2006-11-29 22:16:16 +00:00
Roland Scheidegger
ac8620f375 fix a bug in the sanity code when outputting vertex progs 2006-11-29 19:18:50 +00:00
Roland Scheidegger
5785e328e0 call Driver.ProgramStringNotify if a ati_fragment_shader changes and pick up the change in the r200 driver accordingly. 2006-11-29 16:41:28 +00:00
Eric Anholt
3cd06cf8c5 Add accelerated CopyPixels for non-overlapping, 1:1 blits.
Submitted by Gary Wong <gtw@gnu.org>
2006-11-29 01:16:12 +00:00
Brian Paul
716091a6a0 indent, comments, etc 2006-11-28 15:46:50 +00:00
Dave Airlie
c058f69daa add support to miniglx for updating drawables ..
requires hacks to DRM to remove MASTER from UPDATE_DRAW and ADD_DRAW
2006-11-28 04:50:54 +00:00
Dave Airlie
4a6f47c23b Update miniglx support for new memory manager 2006-11-28 04:50:07 +00:00
Brian Paul
d9a8cc430d comments 2006-11-27 17:48:59 +00:00
Brian Paul
c0815bc01f remove assertions to match i915tex code (bug 8726) 2006-11-27 17:40:07 +00:00
Brian Paul
744c3a367b get rid of meaningless XFree86LOADER test (bug 9144) 2006-11-27 16:50:10 +00:00
Brian Paul
3e6ef125f0 replace check for XFree86LOADER and IN_MODULE with XFree86Server (bug 9144) 2006-11-27 16:33:43 +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
Tilman Sauerbeck
85365e6aa4 Bug #6044: actually delete the texture object in mgaDeleteTexture 2006-11-26 09:39:21 +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
Brian Paul
16e7ca9d72 call slang_variable_construct() inside slang_variable_scope_grow() 2006-11-24 19:21:42 +00:00
Brian Paul
e49d06e619 new slang_variable_scope_grow() function 2006-11-24 19:01:14 +00:00
Brian Paul
d4c4bdfa1e const correctness, clean-ups 2006-11-23 16:56:55 +00:00
Brian Paul
f6ed86a1a5 indent 2006-11-23 16:52:18 +00:00
Brian Paul
308b85f29f fix several program-related bugs (bug 9136) 2006-11-23 15:58:30 +00:00
Keith Whitwell
897b9c5cb2 Haihao Xiang's edgeflag patch. 2006-11-23 10:13:22 +00:00
Keith Whitwell
c4649208f0 Haihao Xiang's pointsize initialization patch. 2006-11-23 10:12:05 +00:00
Stephane Marchesin
0faf23c26a That was really stupid. 2006-11-23 09:21:44 +00:00
Dave Airlie
50b3f5654e realign some of the i830 code from the i915 2006-11-23 01:12:41 +00:00
Brian Paul
17e97ea869 fix typo 2006-11-23 00:44:14 +00:00
Brian Paul
ba02b07c75 fix indirect glMap* bugs 2006-11-23 00:43:23 +00:00
Brian Paul
14c427573e s/ource/source/ 2006-11-23 00:42:25 +00:00
Brian Paul
d426c13e46 move comments 2006-11-23 00:41:44 +00:00
Brian Paul
dfc98c0bec indent 2006-11-23 00:38:50 +00:00
Dave Airlie
d98e1f3761 fixup draw/depth region handling in i830 along lines of i915 2006-11-23 00:09:16 +00:00
Brian Paul
6ab6518735 clean-up, comments 2006-11-23 00:09:00 +00:00
Brian Paul
0cb0a04eca indent 2006-11-22 23:58:47 +00:00
Roland Scheidegger
46e454863e decrease the current vertex count by 1 if an uneven number of vertices is copied by _tnl_copy_vertices. Otherwise, since in this case it will copy an extra vertex to avoid problems with vertex order in the new buffer, one triangle will be drawn twice. This fixes bug #9062. 2006-11-22 22:07:35 +00:00
Brian Paul
40c7cb7e17 const correctness 2006-11-22 21:59:28 +00:00
Brian Paul
98ea0a3f1f new comments 2006-11-22 21:49:14 +00:00
Brian Paul
f9f4625367 clean-up, comments 2006-11-22 21:34:47 +00:00
Brian Paul
958a8af3b0 reindent 2006-11-22 21:34:30 +00:00
Brian Paul
982ceb6773 fix comments 2006-11-22 21:33:44 +00:00
Ben Skeggs
7398748add Some missing state init 2006-11-22 20:15:56 +00:00
Roland Scheidegger
22b74ff2b7 fix the gl version test 2006-11-22 19:37:21 +00:00
Ian Romanick
b0d8b13777 Add tdfx updates to release notes. 2006-11-22 19:05:20 +00:00
Roland Scheidegger
7f9afedeb5 remove unneded call to _tnl_invalidate_state() in _tnl_need_projected_coords(). Connected to bug #9103, though that bug got fixed without this change too. 2006-11-22 17:54:31 +00:00
Brian Paul
9540c9c04f GLX protocol fixes for glMap* functions (bug 8899) 2006-11-22 16:01:48 +00:00
Keith Whitwell
96c0a6de25 Prune incoming state to the atoms of interest. Hopefully this will
prevent driver-initiated statechanges in the middle of
DrawElements/DrawArrays from disturbing this code.
2006-11-22 15:27:58 +00:00
Keith Whitwell
b72fbcbe63 Another fix 2006-11-22 13:53:21 +00:00
Keith Whitwell
96228d952d Set _NEW_LIGHT when materials are present in display lists also. 2006-11-22 09:35:19 +00:00
Keith Whitwell
c8238aa0ff Move setting of _NEW_LIGHT to only occur when materials are present. 2006-11-22 09:34:55 +00:00
Roland Scheidegger
49a3ea8110 fix segfault with ATI_fs when trying to use a not enabled texture unit (bug #9110). 2006-11-21 23:37:21 +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
Brian Paul
8f008056b2 list header files in sources files (Dan Nicholson) 2006-11-21 16:04:22 +00:00
Keith Whitwell
f332da515c blend, logicop changes for intelEmitCopyBlit backported to i915 2006-11-21 14:43:30 +00:00
Ben Skeggs
a75440bcf0 nouveauCreateDmaObject 2006-11-21 14:03:06 +00:00
Keith Whitwell
b1c102d37b More fixes, glean seems to run now. 2006-11-21 13:22:34 +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
Alan Hourihane
33d2835182 Don't define as const's to avoid compiler optimization & warning. 2006-11-21 10:59:31 +00:00
Keith Whitwell
64920ed10a Fix more typos. 2006-11-21 10:50:01 +00:00
Keith Whitwell
46c04525d2 Gary Wong's patches for CopyPixels Logiop (enable) and Blend
(disallow).  Slightly cleaned to disallow on all blend states for code
consiseness and turn a table lookup into a function to match other
code in the driver.
2006-11-21 10:43:16 +00:00
Keith Whitwell
f58ec215c5 Gary Wong's fix for 64 bit cleanness of vertex program inputs bitmask. 2006-11-21 10:16:37 +00:00
Keith Whitwell
d6f89107ba Commit Gary Wong & Keith Packard's changes for bug 8867 -- adjust code
after repositioning of INDEX value in BRW_ATTRIB enum.
2006-11-21 10:11:02 +00:00
Sean D'Epagnier
0570fcfd93 Added correct include files to files,
No longer modify cmap if the device is truecolor (messes up dual monitors
	with vt switching)
2006-11-21 09:35:49 +00:00
Sean D'Epagnier
0337e5635f glTexCoord3dv was not using third coordinate 2006-11-21 08:48:44 +00:00
Jeremy Kolb
a20cf73053 More state. 2006-11-21 02:47:13 +00:00
Rune Petersen
25e495d605 Disable fragment program debug messages. 2006-11-20 19:57:10 +00:00
Jeremy Kolb
afb49fef90 Add state initialization to context creation. 2006-11-20 17:25:54 +00:00
Brian Paul
b24320bb30 added new 'sources' file to tarball (might not get used though) 2006-11-20 17:09:04 +00:00
Keith Whitwell
479aca6bf1 Fix typos that meant vbos were never unmapped 2006-11-20 15:15:24 +00:00
Brian Paul
7cc5522f86 fix glPopAttrib/color material bug #9091 2006-11-20 15:14:35 +00:00
Jouk Jansen
d2fc1c8384 Committing in .
Solve small definition problem for OpenVMS

 Modified Files:
 	Mesa/src/mesa/shader/descrip.mms
2006-11-20 14:04:04 +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
Keith Whitwell
87f602dd82 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.  Reported by Haihao Xiang.
2006-11-20 11:45:34 +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
Brian Paul
2164cf7730 move fix-up code into new slang_fixup_save() function 2006-11-18 17:45:01 +00:00
Brian Paul
4d4373bb0f delete shader objects when destroying shared context state 2006-11-18 17:44:28 +00:00
Brian Paul
a89e063149 comments 2006-11-18 17:23:30 +00:00
Brian Paul
61068ba46b reindent 2006-11-18 17:22:44 +00:00
Brian Paul
63c119f771 additional fixes for mipmap building (Greg McGarragh) 2006-11-18 16:58:14 +00:00
Brian Paul
c478f0d25b name mangling update/fix 2006-11-18 16:44:30 +00:00
Brian Paul
bdb1c3882f need to specify Xlibs with APP_LIB_DEPS 2006-11-18 16:43:13 +00:00
Brian Paul
1e04ff1741 fix mgl name mangling problem 2006-11-18 16:40:09 +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
Rune Petersen
6c9cc81601 fragment.position support
World position is calculated in the vertex shader and passed to the
fragment shader via an unused texcoord.
2006-11-17 19:12:42 +00:00
Rune Petersen
0f614df797 r300_select_vertex_shader4:
Makes the vertex program output from the fragment input.
It makes the driver capable of catching output-input mismatches safely. Primarily
based on some of Aapo Tahkola's code.
2006-11-17 19:08:05 +00:00
Brian Paul
08d64dfbf6 reindent, doxygen-style comments 2006-11-17 19:06:32 +00:00
Michal Krol
83f52ffc52 Comment and indent the atom functions. 2006-11-17 18:55:34 +00:00
Brian Paul
c15f6a991d gluBuild2DMipmaps() fixes 2006-11-17 15:59:19 +00:00
Brian Paul
8f28453987 fix some gluBuild2DMipmap bugs (Greg McGarragh) 2006-11-17 15:57:31 +00:00
Brian Paul
a4806c994e add STATE_INTERNAL_DRIVER, etc (Rune Petersen) 2006-11-17 15:23:32 +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
Brian Paul
7984c70070 revert prev check-in 2006-11-16 23:34:02 +00:00
Ben Skeggs
0da68e2e6e Add nv30InitStateFuncs 2006-11-16 23:24:20 +00:00
Brian Paul
523f5cfeb5 Add a lot of const qualifiers for const-correctness.
New comments, misc clean-ups.
2006-11-16 22:31:34 +00:00
Brian Paul
1f0c86ee35 reindent 2006-11-16 21:58:35 +00:00
Brian Paul
01a5a9afd8 remove unused imesa local var to silence warnings 2006-11-16 21:40:54 +00:00
Brian Paul
3dedeaa055 Initial implementation work for CAL, RET, and BRA instructions for fragment
programs.
2006-11-16 21:28:35 +00:00
Brian Paul
fa941e4267 disable yesterday's _mesa_add_named_constant() change for now 2006-11-16 20:59:11 +00:00
Brian Paul
cba90c17ad fix bug 9046 2006-11-16 20:58:26 +00:00
Patrice Mandin
9021df2d2a nv10 state copy/pasted from nv30 state 2006-11-16 19:50:56 +00:00
Brian Paul
f7436f4c8a regenerate from gl.h 2006-11-16 16:13:55 +00:00
Brian Paul
bb69d3af36 remove obsolete GL_MESA_trace stuff 2006-11-16 16:13:43 +00:00
Brian Paul
7438a78cf4 use LONGSTRING to silence warning 2006-11-16 16:12:10 +00:00
Brian Paul
ebe4c893f8 fix glDrawPixels(GL_COLOR_INDEX, GL_BITMAP) bug 9044 2006-11-16 14:44:23 +00:00
Keith Whitwell
b979479721 Make sure vbo's are mapped before accessing their contents in
api_arrayelt.c.  Reported by Haihao Xiang.
2006-11-16 02:33:38 +00:00
Brian Paul
82eeb62a31 reindent, clean-up 2006-11-16 00:58:44 +00:00
Brian Paul
0c6723aee5 Add a size parameter to _mesa_add_unnamed_constant() and
_mesa_add_named_constant() to indicate vector size (1, 2, 3 or 4).
Always 4 for now...
2006-11-15 23:38:02 +00:00
Brian Paul
699a33ea77 Add new _mesa_lookup_parameter_constant() to search for a GLfloat4 constant
in a parameter list.
Use it in _mesa_add_named_constant() and _mesa_add_unnamed_constant() to
avoid duplication of identical constants.
2006-11-15 23:19:52 +00:00
Brian Paul
408e01b939 reindent, add some comments 2006-11-15 21:52:20 +00:00
Brian Paul
4a12160e8f reindent 2006-11-15 21:41:24 +00:00
Brian Paul
adbbf94fa4 indent, comments 2006-11-15 21:39:57 +00:00
Brian Paul
2d376a61f0 s/int/GLboolean/ 2006-11-15 21:39:32 +00:00
Brian Paul
82a9ba92b4 improved error mesages 2006-11-15 21:38:26 +00:00
Brian Paul
7c279f4dd7 fix casts to silence warnings 2006-11-15 21:35:06 +00:00
Brian Paul
11a54c38f7 #define LONGSTRING __extension__ in imports.h and use it to silence gcc
warnings about long string literals.
2006-11-15 19:54:25 +00:00
Brian Paul
12e710c850 Comments for operations. 2006-11-15 18:56:48 +00:00
Jerome Glisse
8f6a50a49c Remove use of GetBufferSize (depreciated). 2006-11-15 17:45:05 +00:00
Brian Paul
222930461f more bug fixes 2006-11-15 14:59:05 +00:00
Keith Whitwell
6cc5a82206 Make sure RENDER_FINISH is called on the zero pixel case. Reported by
Haihao Xiang.
2006-11-14 14:22:43 +00:00
Ian Romanick
efa91b9a8f Enable GLX_SGI_make_current_read for tdfx.
Implement GLX_SGI_make_current_read for tdfx.  Remove annoying debug
printf in tdfxSwapBuffers.  Updated a comment in drirenderbuffer.h to
note that the tdfx driver uses a flag that was previously only used by
s3v.

This code was tested with glxgears, wincopy, and manywin.
2006-11-14 00:10:34 +00:00
Ian Romanick
0b69e4837e Clean-up compiler warnings. 2006-11-13 23:34:35 +00:00
Ian Romanick
37ce9b30e9 Implement GL_ARB_occlusion_query.
Based on the old code that implemented GL_HP_occlusion_test, implement
GL_ARB_occlusion_query.  This code passes progs/demo/arbocclude.
2006-11-13 22:54:43 +00:00
Ian Romanick
ce526de6ff tdfxDDWriteDepthPixels can be called with mask == NULL.
Via depth_test_pixels (swrast/s_depth.c), tdfxDDWriteDepthPixels can
be called with mask == NULL.  Test for this condition in the places
where mask might be dereference.  This matches the behavior of several
other functions in this file with a 'const GLubyte mask[]' parameter.
2006-11-13 22:51:11 +00:00
Ian Romanick
038bd400e2 Major clean-up of tdfxDDGetString. 2006-11-13 21:53:04 +00:00
Ian Romanick
7fbe6a5c51 Eliminate use of deprecated GetBufferSize interface. 2006-11-13 21:21:40 +00:00
Ian Romanick
e7ad10587a Fix "3D driver claims to not support visual ..." warnings.
In 16-bit color modes the 3D driver was erroneously creating fbconfigs
with 16-bits of accumulation alpha.  Since the 2D driver always
generates modes with zero bits of alpha, the lists of fbconfigs did
not match and warnings were generated by libGL.
2006-11-13 20:54:51 +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
Ian Romanick
466d4a1dd0 Added information about added GLX_SGI_make_current_read support 2006-11-10 21:11:39 +00:00
Ian Romanick
ded5517bd5 Bump driver date. 2006-11-10 21:06:23 +00:00
Ian Romanick
5c38472152 Refactor savageXMesaSet{Back,Front}ClipRects.
Refactor savageXMesaSetBackClipRects and savageXMesaSetFrontClipRects
into a single new routine called savageXMesaSetClipRects.  This allows
a few cleanups in the code.
2006-11-10 18:57:30 +00:00
Ian Romanick
6e2c952537 Enable GLX_SGI_make_current_read.
Eliminate use of deprecated GetBufferSize interface.  Keep framebuffer
state associated with the read-drawable and the draw-drawable up to
date.

Tested with progs/demos/wincopy.
2006-11-10 18:47:22 +00:00
Brian Paul
0a3a1c6ae9 fix -noprefix option for Solaris (bug 7722) 2006-11-10 12:47:56 +00:00
Dave Airlie
2862316309 Fix up texture compression at least Get and TexImage, not too sure about
how to fix SubTexImage with compressed textures
2006-11-10 00:32:35 +00:00
Ian Romanick
d7815f5913 Implement GLX_SGI_make_current_read
Discontinue use of the old GetBuffeSize interface.  Track both the
current read-drawable and the current draw-drawable.  After moving
some context state to via_rednerbuffer, GLX_SGI_make_current_read can
be enabled.

The extension works, but the wincopy test prodcues a black window for
the destination window.  After messing around with the window and
looking at the code, I believe the problem is in the handling of
buffer swap requests on a drawable that isn't the current draw-drawable.
2006-11-10 00:14:30 +00:00
Ian Romanick
3ce4adaa8f Remove unnecessary setting of GetBufferSize to NULL. 2006-11-09 22:28:09 +00:00
Adam Jackson
c6f1d4c3a0 Fix some && (logical) that should clearly have been & (bitwise). 2006-11-09 20:47:22 +00:00
Dave Airlie
4bb39f5899 remove drm stuff from libGL, this is now in libdrm 2.3.0 2006-11-08 22:25:52 +00:00
Stephane Marchesin
20802a7b69 Commit a small nitpick 2006-11-07 17:37:22 +00:00
Roland Scheidegger
0ddd50c8ae fix vp lockups due to incorrectly set up / emitted attrib inputs. 2006-11-05 23:13:19 +00:00
Roland Scheidegger
aee30f3f9d fix using VERT_ATTRIB_WEIGHT instead of VERT_BIT_WEIGHT when assigning vp inputs. 2006-11-05 22:21:11 +00:00
Brian Paul
831d13bc42 reindent 2006-11-05 15:30:41 +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
Jerome Glisse
e330a69ee5 Add sin instruction to fragment program.
There is a bug somewhere in fragment program.
tri-cos and tri-sin show the bug. Also we
should not emit multiple time the same constant.
for sin,cos,lit have to fix that.
2006-11-05 00:47:27 +00:00
Jerome Glisse
0056ea5417 Add cos instruction and remove left over debug. 2006-11-04 23:50:27 +00:00
Brian Paul
120584a1e6 Fix for glGetVertexAttribfvNV, bug 8883 2006-11-04 17:31:45 +00:00
Brian Paul
adf3a64b03 fix error msg 2006-11-04 17:31:21 +00:00
Brian Paul
590b557b10 fix for glGetVertexAttribfvARB, bug 8883 2006-11-04 17:28:38 +00:00
Brian Paul
64d952c92c #define _glapi_Dispatch _mglapi_Dispatch when USE_MGL_NAMESPACE is set. 2006-11-03 23:43:14 +00:00
Brian Paul
c9365b7ca4 Fix _mesa_IsProgram() and _mesa_IsShader() 2006-11-03 23:32:30 +00:00
Brian Paul
2fbaddfa69 check for USE_MGL_NAMESPACE 2006-11-03 23:28:36 +00:00
Brian Paul
d2f80777e8 implement _mesa_GetShaderiv() 2006-11-03 22:23:47 +00:00
Brian Paul
3bef600024 implement _mesa_GetProgramiv() 2006-11-03 22:15:43 +00:00
Brian Paul
7e6701cef1 Simplify GET_CURRENT_LINKED_PROGRAM() macro and calling code. 2006-11-03 21:51:58 +00:00
Brian Paul
2659ee9dfb Use inlined uniform() helper function in all the glUniform*() function to
reduce duplicated code.
Finish up _program_ReadUniform() for non-float types.
Implement _mesa_GetUniformivARB().
Simplify the _program_WriteUniform() function a bit.
2006-11-03 21:30:16 +00:00
Brian Paul
c64a062918 plug in 2.0, 2.1 functions 2006-11-03 20:25:44 +00:00
Brian Paul
39cc8e8a06 Added OpenGL 2.1 entrypoints. 2006-11-03 20:20:28 +00:00
Brian Paul
33748aaad8 Set DO_DEBUG=0 2006-11-03 19:55:01 +00:00
Brian Paul
3c1ce571ed only enabled memcpy timing if DO_DEBUG=1 2006-11-03 19:54:40 +00:00
Brian Paul
d00ef005fe replace CONFIG_H with MESA_CONFIG_H_INCLUDED 2006-11-03 18:35:52 +00:00
Brian Paul
9e4a06a482 added 1.3/1.4 function mangling 2006-11-03 18:29:39 +00:00
Brian Paul
07bec141ac assorted updates for 6.5.2 2006-11-03 17:43:20 +00:00
Brian Paul
bdb251bcbf Added OpenGL 2.1 glUniformMatrix* functions.
Refactor the _mesa_UniformMatrix() functions to use a helper function.
Implement GetUniformfv function (might need more work someday).
2006-11-03 17:29:31 +00:00
Brian Paul
e90e827824 reformat comments in Doxygen style 2006-11-03 17:18:05 +00:00
Brian Paul
4d5744e66d reindent 2006-11-03 16:50:22 +00:00
Brian Paul
61fd687c74 Minor changes to get ready for OpenGL 2.1. 2006-11-03 15:18:17 +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
029d18cd3d enable generic arrays for r200 hw vertex programs by assigning unused color and texture inputs to them. Not widely tested yet. This should eliminate all fallbacks due to vertex programs, except writes to back facing colors, or when exceeding a hw limit (12 temps, 12 attribs etc.). 2006-11-03 12:48:18 +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
Roland Scheidegger
e7b71f6919 remove setting some driver funcs explicitly to NULL, as they are no longer set up later. Thix fixes a segfault in _mesa_Bitmap(). 2006-11-03 02:07:34 +00:00
Brian Paul
4b43054c4b added fsligght 2006-11-03 00:16:12 +00:00
Brian Paul
24ea2c2cef yet another deriviative of the fplight.c demo for OpenGL 2.0 shading language 2006-11-03 00:04:06 +00:00
Brian Paul
83a5c2bf63 Update gl_API.xml with OpenGL 2.0 functions, regenerate derived files. 2006-11-02 23:58:27 +00:00
Brian Paul
7a28779b2e minor change in _mesa_ResizeBuffersMESA() 2006-11-02 23:56:08 +00:00
Brian Paul
fc69beecb6 include utils.h to silence warning 2006-11-02 23:43:22 +00:00
Brian Paul
ce55bbe9ef s/GLuint/int/ to silence warnings 2006-11-02 23:41:37 +00:00
Brian Paul
7941474a21 casting, type changes to silence warnings 2006-11-02 23:40:24 +00:00
Brian Paul
15193e78c9 s/GLint/GLuint/ to fix sign warnings 2006-11-02 23:34:02 +00:00
Brian Paul
071db86299 fix typo, silence warnings 2006-11-02 23:29:03 +00:00
Brian Paul
dd0830228b Fix GL_EXT_packed_depth_stencil crash, but shadowtex still broken 2006-11-02 23:16:18 +00:00
Brian Paul
05267501af comment about a valgrind error 2006-11-02 22:56:27 +00:00
Brian Paul
71f71c2c8a s/GLchan/GLubyte/ in debug code 2006-11-02 22:55:59 +00:00
Brian Paul
959571f835 init SecondaryRasterColor 2006-11-02 22:54:18 +00:00
Brian Paul
e441427f40 Added GL_STENCIL_BACK_WRITEMASK 2006-11-02 22:53:32 +00:00
Brian Paul
af864bb0da check for shader extensions for OpenGL 2.0 2006-11-02 22:40:43 +00:00
Brian Paul
e812081253 Undo some of yesterday's ATI_separate_stencil changes. The ATI extension
doesn't exactly match OpenGL 2.0.
2006-11-02 22:39:29 +00:00
Brian Paul
d78f65cd6c Fix fragment program fog problems found with Glean.
1. add PROGRAM_CONSTANT to switch() in src_vector().
2. use _mesa_append_fog_code() to handle fog options in i915ProgramStringNotify().
3. Re-enable some vertex attribute emit code that was previously disabled in i915ValidateFragmentProgram().
2006-11-02 21:43:06 +00:00
Brian Paul
67a101759e Call _mesa_problem() from i915_program_error() so we get a nice error message. 2006-11-02 21:39:20 +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
Jerome Glisse
b6c2a6a0f2 Add requested size to r300RefillCurrentDmaRegion.
This way we no longuer have the fixed RADEON_BUFFER_SIZE.
Anyway function calling AllocDmaRegion should check if this
succeed and fail gracefuly if not (see bug 8348).
2006-11-02 20:02:26 +00:00
Brian Paul
94249ca333 remove GetBufferSize = NULL; assignment 2006-11-02 19:23:41 +00:00
Brian Paul
df5edb21f8 Fixes Glean vertex/fragment test failures. Those tests never called
glViewport so the viewport was 0 by 0 pixels.
2006-11-02 19:18:09 +00:00
Brian Paul
c97bc619d6 remove GetBufferSize code 2006-11-02 19:16:08 +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
Brian Paul
6f676f4871 always load frag prog state params for now (see comments) 2006-11-02 18:35:19 +00:00
Brian Paul
51b115d5ae remove unneeded extern declaration of lockMutex 2006-11-02 18:15:26 +00:00
Brian Paul
29ed894633 bump driver date 2006-11-02 18:13:40 +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
Brian Paul
7a9c7c1133 Use RGBA_LOGICOP_ENABLED() instead of ctx->Color._LogicOpEnabled since we often
need to check for this condition before the later field has been computed.
Fixes logicop bug #8860.
2006-11-02 17:51:04 +00:00
Brian Paul
abc73d9cba new RGBA_LOGICOP_ENABLED() macro 2006-11-02 17:49:47 +00:00
Brian Paul
12fe1b3a58 s/_mesa_IsProgram2/_mesa_IsProgram/ 2006-11-02 16:21:04 +00:00
Brian Paul
f49c0d0dfb Rename _mesa_IsProgram() to _mesa_IsProgramARB() to avoid collision with the
OpenGL 2.0 function of the same name.
2006-11-02 16:20:29 +00:00
Brian Paul
f961d394e3 OpenGL 2.0 entrypoints 2006-11-02 16:11:31 +00:00
Brian Paul
e71e4c9e47 run indent on the code 2006-11-02 16:09:10 +00:00
Brian Paul
036173e0d8 test OpenGL 2.0 stencil funcs 2006-11-02 15:47:30 +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
Brian Paul
467c773f79 Add ATI_separate_stencil and use it in preference to EXT_stencil_two_side
since the former is what's used for OpenGL 2.0.
2006-11-02 00:41:40 +00:00
Brian Paul
faba58c447 update _mesa_select_tex_image() and _mesa_get_tex_image() 2006-11-01 22:28:54 +00:00
Brian Paul
92c99bc51b update comments 2006-11-01 20:48:00 +00:00
Brian Paul
a5676795cf Remove x/y/width/height parameters from Clear functions. 2006-11-01 19:35:22 +00:00
Brian Paul
533e5a73ee comment-out unused var 2006-11-01 19:26:18 +00:00
Brian Paul
6a92324cf0 remove unused vars 2006-11-01 19:25:43 +00:00
Brian Paul
d972c86876 fix _mesa_select_tex_image() calls 2006-11-01 19:25:19 +00:00
Michal Krol
7d08e3a117 Write back gl_FragDepth to span->array->z. 2006-11-01 19:02:27 +00:00
Brian Paul
9669804fe4 Don't use the x/y/width/height params passed to Clear(). Get them
after locking.  Next: remove the params altogether.
2006-11-01 18:51:43 +00:00
Brian Paul
26b5904d70 disable debug printf 2006-11-01 18:49:41 +00:00
Brian Paul
4db0c89d25 disable debug printfs 2006-11-01 18:48:28 +00:00
Jerome Glisse
361d137587 Correct a little bug, radeon->glCtx is a pointer. 2006-11-01 16:21:14 +00:00
Jerome Glisse
8d87196c12 Remove deprecated GetBufferSize interface. 2006-11-01 16:18:08 +00:00
Brian Paul
351feae130 recent updates/fixes 2006-11-01 15:24:47 +00:00
Keith Whitwell
57f09b6e5e fix compiler warnings 2006-11-01 15:23:50 +00:00
Keith Whitwell
8665b828fe Patch from <haihao.xiang@intel.com> -- pass program string
notification callback through to tnl/ module, fixes glean crash.
2006-11-01 15:20:23 +00:00
Keith Whitwell
48e6fff3a9 merge the (rest of) texmem branch 2006-11-01 14:26:10 +00:00
Keith Whitwell
5ac93f8621 Merge texmem-0-3-branch. 2006-11-01 14:21:57 +00:00
Jerome Glisse
232a489b41 Add LIT instruction to fragment program. 2006-11-01 12:03:36 +00:00
Keith Whitwell
6b9e31f3eb Import texmem i915 driver to its new location as i915tex. 2006-11-01 12:03:11 +00:00
Jerome Glisse
3c6e99ce95 Add CMPH instruction to fragprog
CMPH a0, a1, a2 -> if a2 > 0.5 return a1 else return a0
Guessed by examinating LIT instruction handling of FGLRX.
2006-11-01 11:58:16 +00:00
Keith Whitwell
fd60b2d536 Patch from <haihao.xiang@intel.com> -- pass program string
notification callback through to tnl/ module, fixes glean crash.
2006-11-01 09:35:26 +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
Brian Paul
d106195ad2 change DEBUG_FRAG conditions 2006-11-01 00:14:04 +00:00
Brian Paul
e6f47d1855 fix some bugs in interpolate_specular() 2006-11-01 00:13:16 +00:00
Brian Paul
90fcf6ccc3 Added a few new ctx->Const. fields for shader-related limits. 2006-11-01 00:12:41 +00:00
Brian Paul
5050b565de make use of Parameters->StateFlags in _swrast_update_fragment_program() 2006-10-31 19:53:38 +00:00
Brian Paul
ef987aa1d7 minor clean-ups, simplifications and new comments 2006-10-31 19:53:03 +00:00
Brian Paul
7e75f51b27 fix MINGW32 problems 2006-10-31 19:14:27 +00:00
Brian Paul
4e9e0aff79 We need to call _mesa_load_state_parameters() whenever a fragment program
is enabled and we've changed any GL state that might be referenced by a
fragment program (such as state.fog.params).  Do this during swrast
validation, not in _swrast_exec_fragment_program().
2006-10-31 16:02:56 +00:00
Brian Paul
72f49657e8 signal _NEW_LIGHT in _tnl_copy_to_current() 2006-10-31 16:01:11 +00:00
Brian Paul
ecd1743a0c In TEX instructions, use precomputed lambda only if using fragment.texcoord[k]
to sample texture[k].  Use zero otherwise.  Not foolproof, but a good
compromise.
2006-10-31 14:29:01 +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
Brian Paul
256c96136c For TEX instructions use lambda=0. When sampling from texture unit K we
were using the partial derivatives of texcoord[K] but the coordinate used
for texture sampling may be something totally different (and texcoord[K]
might not be a real texture coord at all).  Net result was a bogus LOD is
sometimes used, often resulting in using the smallest mipmap level (a
constant color).
Just use zero for now (undef LAMBDA_ZERO to override).
Plus, some additional debug code.
2006-10-31 01:22:38 +00:00
Ian Romanick
b14bae8466 Fix bug #8799.
Properly resize bith the drawable and the readable in mgaUpdateRects.
Eliminate the use of the deprecated GetBufferSize interface.  Bump
driver date.
2006-10-30 23:44:54 +00:00
Ian Romanick
86a465412d Refactor mgaXMesaSetFrontClipRects and mgaXMesaSetBackClipRects.
Combine mgaXMesaSetFrontClipRects and mgaXMesaSetBackClipRects into a
single new function called mga_set_cliprects.  This enables a small
refactor in mgaDDDrawBuffer.
2006-10-30 22:17:39 +00:00
Ian Romanick
5af5260f3c Get DRI drawable from framebuffer object.
In the software rasterization fallbacks, get the __DRIdrawablePrivate
pointer from the driRenderbuffer that is passed in.  This eliminates
the need for the mesa_drawable pointer in MGA context structure.

This partially fixes bug #8799.  wincopy no longer produces a black
window for the destination window, but it does produce incorrect
results if the destination window is resized.
2006-10-30 22:07:00 +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
Brian Paul
075fae5200 code tweaks, remove old comments 2006-10-30 00:22:28 +00:00
Brian Paul
0f8405365f fix _mesa_problem() text 2006-10-30 00:13:31 +00:00
Brian Paul
a23e668d40 Move gl_vertex_program_machine struct out of mtypes.h and put into nvvertexec.h.
Massage nvvertexec.c code to work more like s_nvfragprog.c - another step
toward unifying vertex/fragment program execution.
2006-10-30 00:12:05 +00:00
Brian Paul
0781339b39 remove debug code 2006-10-30 00:07:22 +00:00
Brian Paul
e998c34647 Rather than always allocating 100 instructions, put instructions into a
temporary buffer, then copy into a malloc'd array of the correct size.
According to Glean texCombine, we never need more than 21 instructions.
2006-10-29 21:17:18 +00:00
Brian Paul
ebcedd2d89 New _mesa_exec_vertex_state_program() function. Start of some re-org. 2006-10-29 18:33:14 +00:00
Brian Paul
abb1430c79 fix wrong inequality 2006-10-29 18:14:00 +00:00
Brian Paul
d6272e0617 Change _mesa_init_instruction() to initialize an array of instructions. 2006-10-29 18:03:16 +00:00
Brian Paul
efd95c1084 Program instructions are initialized before parsing so no need to set
Abs, NegateAbs, CondMask and CondSwizzle fields to defaults here.
CondMask was getting mis-set.  Removing the incorrect assignment improves
fragment program speed by 15%.
2006-10-29 17:55:16 +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
Brian Paul
a90ab5290c Added PROGRAM_CONSTANT to get_register_pointer().
More DEBUG_FRAG code.
2006-10-28 23:10:17 +00:00
Brian Paul
8ed319796f special case END in _mesa_print_instruction() 2006-10-28 23:08:07 +00:00
Brian Paul
f5eea0cc7a Implement _mesa_append_fog_code() for fragment program fog options. 2006-10-28 17:14:47 +00:00
Brian Paul
db5529573f If DEBUG, check that all array indices really do fall in [start,end] in
the DrawRangeElements() call.  Warn the user if that's not true.
2006-10-26 20:54:28 +00:00
Roland Scheidegger
b55a0ab7ab remove code for inserting mvp transform into position-invariant vertex progs and instead use _mesa_insert_mvp_code(). 2006-10-26 12:09:07 +00:00
Brian Paul
fe457474d4 Previously, if a fragment program referenced fragment.fogcoord but the
program didn't use the ARB_fog_linear option, the fragment program's
fragment.fogcoord register wasn't loaded properly.
2006-10-25 23:10:14 +00:00
Roland Scheidegger
e9b923182e change some bogus comments regarding the base e exponential function used for fog in vertex programs. 2006-10-25 12:14:26 +00:00
Roland Scheidegger
fc606f7db9 fix (per-vertex) fog when using ARB_vp by incorporating fog factor computation into the vertex program (not yet fixed for swtnl). Simplify (and correct) the VTX_TCL_OUTPUT_VTXFMT handling when using vertex programs, turns out it's solely driven by the needs of the past-vertex stage of the pipeline, this should fix lockups with ill-specified applications using vertex programs (for instance applications enabling fog but not writing to fog coord output will now get (conformant) undefined results instead of lockups). 2006-10-24 22:37:51 +00:00
Ian Romanick
e4298b9492 Add missing call to glutInit. 2006-10-24 20:50:08 +00:00
Brian Paul
6340d6bf22 s/GLchan/GLubyte/ 2006-10-24 13:46:39 +00:00
Brian Paul
59e1f3ddd8 whitespace clean-up 2006-10-24 13:45:08 +00:00
Keith Whitwell
759facb4d8 Emit cliprects in the userspace driver as required, rather than
passing them to the kernel.  This works because all drawing commands
in the 965 driver are emitted with the lock held and the batchbuffer
is always flushed prior to releasing the lock.  This allows multiple
cliprects to be dealt with, without replaying entire batchbuffers and
redundantly re-emitting state.
2006-10-23 08:43:26 +00:00
Brian Paul
b9786cfaae assorted clean-ups 2006-10-22 23:21:45 +00:00
Brian Paul
49a5a09ada don't save color/z if fragment is killed 2006-10-22 22:58:42 +00:00
Brian Paul
73dd09fdd3 add minstall script to MAIN_FILES (bug 8720) 2006-10-22 22:37:30 +00:00
Brian Paul
a632128ffa minor tweaks good for about 12% faster execution 2006-10-22 22:36:24 +00:00
Brian Paul
ec9bbac7c7 silence used var warnings 2006-10-22 22:25:46 +00:00
Brian Paul
0b26e826bd Color clamping fixes. 2006-10-22 17:18:50 +00:00
Brian Paul
919cd2c3ba move/improve comments, clean up code in a few places 2006-10-21 23:21:35 +00:00
Brian Paul
ed324db249 fix another logic error in computing deferredTexture 2006-10-21 22:56:21 +00:00
Brian Paul
bb19e64d12 For deferredTexture, need to check if the fragment program/shader writes
the fragment Z.
2006-10-21 22:43:15 +00:00
Brian Paul
828d15a6e0 move interpolate_varying() call 2006-10-21 21:14:20 +00:00
Brian Paul
4676b6260f don't use params passed to Clear() 2006-10-21 21:13:40 +00:00
Brian Paul
f614a61905 Move interpolate_texcoords() and interpolate_varying() calls into shade_texture_span().
Added some INLINE hints.
2006-10-21 00:20:16 +00:00
Brian Paul
61c89be313 Consolidate some code into shade_texture_span().
Clean up logic for deferred texturing/shading.
2006-10-19 22:27:44 +00:00
Brian Paul
cd5a623386 fixed Fixed/Int bug 2006-10-19 22:26:29 +00:00
Brian Paul
7c76028937 remove temp code 2006-10-19 22:13:31 +00:00
Brian Paul
79b5d3e539 remove some debug/test changes 2006-10-19 20:11:15 +00:00
Brian Paul
464fcd0dd8 New bin/minstall script - a minimal replacement for 'install'.
Correctly handles symlinks so we can get rid of the COPY_LIBS stuff.
2006-10-19 20:09:05 +00:00
Brian Paul
c351858de8 fix problem when CHAN_BITS == 32 (bug 8704), remove unneeded assertion 2006-10-19 14:02:42 +00:00
Michal Krol
a79d4e75c3 Fix nonportable pointer+unsigned arithmetic. Use pointer+int. 2006-10-19 08:07:00 +00:00
Brian Paul
31293910b4 added clamp_colors(), updated assertions 2006-10-18 23:14:02 +00:00
Brian Paul
ff07d6de4c minor re-org, doxygen comments 2006-10-18 22:38:13 +00:00
Brian Paul
fee08575cd Changed install filenames to libGL* and libOSMesa* so things work on Darwin
where GL_LIB_NAME = libGL.dylib but the other library name is libGL.1.dylib
Unlike other platforms, the version number is in the middle of the name,
not at the end.
See bug 8671
2006-10-18 22:05:13 +00:00
Ian Romanick
3beaff1e3c Enable GLX_SGI_make_current_read for radeon.
Added code to track the drawable bound to the context for reading.  In
addition, when a drawable is initially bound (for reading or drawing)
or when the size of the drawable changes, update the size of the
framebuffer object that back the drawable (for software fallbacks).

Deprecate the old GetBufferSize interface.

Bump the driver date.

These changes were tested with wincopy on both direct rendering and
accelerated indirect rendering (AIGLX).
2006-10-18 20:27:11 +00:00
Brian Paul
ec99e716a2 Don't use x/y/w/h params given to Clear(). 2006-10-18 20:03:20 +00:00
Brian Paul
446972bc27 Want to stop passing x/y/width/height to Clear() function.
The coordinates need to be computed after we've got the hw lock.
Code updated to:
1. Ignore all/x/y/width/height/ params passed to Clear func.
2. Pass 0,0,0,0,0 to _swrast_Clear() until they're totally removed.
2006-10-18 20:02:42 +00:00
Brian Paul
ccb64bbb2a Don't pass x/y/width/height to ctx->Driver.Accum().
Compute the region after we've locked (and possibly updated the buffer's size).
Same thing is needed for ctx->Driver.Clear().
2006-10-18 18:35:09 +00:00
Brian Paul
4e4c0bbef7 glDrawPixels, line clipping bug fixes 2006-10-18 18:03:54 +00:00
Brian Paul
a1a0a29a5a Fix broken line clipping.
When both ends of the line were clipped, we were using the new v0 instead
of the original v0 when computing the location of the second vertex. Thus,
the second vertex's position was incorrect.
Thanks to Heath Feather for finding a test case.
2006-10-18 18:02:05 +00:00
Brian Paul
ff893a83f1 Fix a dangerous use of ASSERT in an else-clause not enclosed in braces.
We've been lucky if this hasn't been causing line rendering bugs.
2006-10-18 17:36:57 +00:00
Brian Paul
c3caaa3dd4 Always convert colors to float before running a fragment shader/program. 2006-10-17 22:23:32 +00:00
Brian Paul
32c3243e4d fix fog color bug 2006-10-17 22:22:42 +00:00
Brian Paul
c2074645cd Move struct atifs_machine into s_atifragshader.c
Add support for runtime colorbuffer types.
2006-10-17 21:12:32 +00:00
Brian Paul
e9d7190bb2 Seperate interpolate_colors() and interpolate_specular().
Fix bugs in apply_aa_coverage().
2006-10-17 20:40:22 +00:00
Brian Paul
b88af5b468 apply_aa_coverage() for ubyte/ushort/float 2006-10-17 20:22:53 +00:00
Brian Paul
0c6c8d5f1c new assertions - one of which is currently failing with arbfslight.c 2006-10-17 19:57:25 +00:00
Brian Paul
1c1c7fb361 remove obsolete intelBufferSize(), bump driver date 2006-10-17 18:54:19 +00:00
Brian Paul
42b26f688d Remove get_buffer_size()
Always check window size in XMesaMakeCurrent() in case glViewport is not
called.
2006-10-17 17:51:39 +00:00
Brian Paul
544b94e156 Lots of fixes/changes to select color depth at runtime. 2006-10-17 17:44:43 +00:00
Brian Paul
55e42e5b72 check if ctx->Driver.GetBufferSize==NULL and no-op 2006-10-17 17:43:47 +00:00
Brian Paul
af52ff0c99 include x86-64.h to silence warning 2006-10-17 17:03:21 +00:00
Brian Paul
1e3223c02a Fix CHAN_BITS=32 issues.
Save/restore array->ChanType in case colors are converted.
2006-10-17 17:03:00 +00:00
Brian Paul
8dff54e71d Added -clip option to test glCopyPixels beyond window bounds.
Clear dest window to black before copying.
Use glWindowPos2iARB().
2006-10-16 23:22:44 +00:00
Brian Paul
d40f20aebc Init _UseTexEnvProgram to fix failed assertion in i915_render_start() - this may be temporary 2006-10-16 22:02:33 +00:00
Brian Paul
16345022de Updates to intelWindowMoved():
Only need to call _mesa_resize_framebuffer() when we've detected a window
size change.
Set the drawFb->Initalized flag to GL_TRUE to avoid obsolete
Driver.GetBufferSize/ResizeBuffer calls in the Mesa code.
2006-10-16 21:39:34 +00:00
Ian Romanick
7b1ff32607 Track the currently bound read drawable and make sure its info is up
to date.
2006-10-16 20:59:53 +00:00
Ian Romanick
8c5ae80916 Fix build when DEBUG is defined but DEBUG_MATH is not.
A couple places attempted to call _math_test_all_*_functions when
DEBUG was defined.  These routines only exist when DEBUG_MATH is
defined.
2006-10-16 20:57:09 +00:00
Brian Paul
28081ae6c0 s/X86_SOURCES/ASM_SOURCES/ in ALL_SOURCES to try to fix make depend warnings (bug 8669) 2006-10-16 20:51:50 +00:00
Ian Romanick
6ae157f9e7 Fix bug #8563.
Fixes a GLX protocol problem when binding an indirect rendering context
after a direct rendering context.  In this case, the oldContetTag sent to
the server should be None, but the currectContextTag stored in the direct
rendering context (i.e., -1) was sent instead.
2006-10-16 17:50:19 +00:00
Brian Paul
041d64812e Set _NEW_BUFFERS in _mesa_resize_framebuffer(). This makes sure the swrast
module updates its state (CLIP_BIT) upon resizes.  The driver could do this
instead, but doing it here is safer.
2006-10-16 17:26:30 +00:00
Brian Paul
dc8a0d1936 remove some old code that could cause infinite recursion 2006-10-16 16:39:54 +00:00
Brian Paul
80fcbca7df allow >10 mipmap levels (patch by Benno Schulenberg) (bug 3130) 2006-10-15 22:30:35 +00:00
Brian Paul
cca1a27f77 regenerated to get DRI_CONF_EXCESS_MIPMAP() 2006-10-15 22:29:16 +00:00
Roland Scheidegger
97f47f771a fix handling of textures with a base internal format that does not have all four rgba values set for radeon and r200 (discovered with a modified glean pixelFormats test, noone ever noticed in over 2 years). For radeon, use hw format I8 as previously, and change tex env to make the correct default values appear for both GL_ALPHA and GL_LUMINANCE textures. For r200, which supports GL_LUMINANCE just fine, use the AL88 hw format for GL_ALPHA textures, since it seems like it's probably not worth the effort to fix up the texture environment (certainly complicated in case of ATI_fragment_shader programs). 2006-10-15 21:47:56 +00:00
Brian Paul
4d4add0972 Added #if / #else / #endif around code related to framebuffer initialization
to describe what should be changed in the drivers.
2006-10-15 19:26:43 +00:00
Brian Paul
606108ee4e updated comments, mark GetBufferSize() and ResizeBuffers() as obsolete 2006-10-15 19:20:29 +00:00
Brian Paul
694a5b81a7 minor clean-up: s/intel->driDrawable/dPriv/ 2006-10-15 19:08:11 +00:00
Brian Paul
a7a26503b6 Remove calls to _mesa_ResizeBuffersMESA() - generally replace with code to
check the current window size, then call _mesa_resize_framebuffer().
2006-10-15 18:51:22 +00:00
Brian Paul
a391384bad Remove a bunch of "ctx->Driver.function = _swrast_Function" lines since
default/fallback functions are already plugged in by the call to
_mesa_init_driver_functions().
2006-10-15 18:31:29 +00:00
Jerome Glisse
f0775c7fcc Use endianness test function provided by mesa.
Use the _mesa_little_endian helper function insted
of the MESA_BIG_ENDIAN flag. There is still place
using this flag but we need to find how to submit
16bits elements on big endian computer.
2006-10-15 18:22:28 +00:00
Brian Paul
2b6d2e4dcb Remove Driver.ResizeBuffers = _mesa_resize_framebuffer lines.
This is already done by the preceeding call to _mesa_init_driver_functions()
which plugs in default functions like that.
2006-10-15 18:18:39 +00:00
Brian Paul
b947377add increate MaxTextureLevels to 11 (bug 3130) 2006-10-15 17:57:53 +00:00
Brian Paul
a20c0f293e check if files exist before installing (Thierry Reding) 2006-10-15 16:38:09 +00:00
Brian Paul
07fd19f572 allow specifying image size on cmd line 2006-10-14 23:24:45 +00:00
Brian Paul
9cbe0e24ac Some code movement so that the gl_framebuffer is fully initialized before
calling _mesa_make_current() to avoid hitting the initialize_framebuffer_size()
stuff in context.c
2006-10-14 23:02:26 +00:00
Brian Paul
d21fa9cd79 Big re-org of buffer size management.
All buffer resizes now handled by xmesa_check_and_update_buffer_size() which
uses the _mesa_resize_framebuffer() function.
Moved all low-level XImage/Pixmap resizing into xm_buffers.c file.
Also, update lots of comments for Doxygen.
2006-10-14 22:52:17 +00:00
Brian Paul
2b46f4b853 cut and paste error: s/Width/Height/ 2006-10-14 21:33:06 +00:00
Brian Paul
2458aba0e9 build fix: s/Table/TableUB/ 2006-10-14 20:28:36 +00:00
Brian Paul
63f6802077 assorted clean-ups 2006-10-14 15:22:18 +00:00
Roland Scheidegger
cb977ae5f4 implement ARB_point_parameters and ARB_point_sprite on r200. The code is nearly the same as outlined in bug #4707, except it disables perspective correction for point sprites to make them actually work. And, separate the state atom into two as the tcl parameters would overwrite vertex program parameters when active. Also implement the GL_VERTEX_PROGRAM_POINT_SIZE_ARB option to make vertex programs outputting a point size work correctly (untested). Smooth points will still always be size 1. While here, enable gouraud shading for fog when using fog coord. 2006-10-13 22:10:05 +00:00
Brian Paul
40b88fd1f3 remove needless condition 2006-10-13 17:45:08 +00:00
Brian Paul
5b0edff412 Consolidate, move, fix code related to color index and stencil image transfer
operations (shift, offset, table lookup, etc).
2006-10-13 17:41:23 +00:00
Ian Romanick
4616513577 Fix dumb build errors.
I always build with -DGLX_USE_TLS, so I never hit these paths.  glapi.h is
required in some places because _glapi_Dispatch is declared there, but
_glapi_tls_Dispatch is declared in glthread.h.
2006-10-13 17:34:01 +00:00
Brian Paul
176501dfff In _mesa_pack_rgba_span_float() we don't need to make a temporary copy of
incoming colors when applying pixel transfer ops.  In all cases, the
caller either indicates there's no pixel transfer ops, or the incoming
colors are coming from temporary storage already and can be safely
modified.
2006-10-13 16:34:25 +00:00
Brian Paul
8a9b5518fb s/GLuint/GLbitfield/ 2006-10-13 15:11:47 +00:00
Brian Paul
bf8647a58b s/GL_FALSE/0x0/ 2006-10-13 15:10:55 +00:00
Brian Paul
6b998c5584 removed obsolete _mesa_pack_rgba_span_chan() 2006-10-13 15:00:35 +00:00
Brian Paul
c28d0f779a include glapi.h to fix broken build 2006-10-13 13:28:48 +00:00
Keith Whitwell
a2c50b0f4a Upload of interleaved arrays currently assumes that position is the
first element in the interleaved group.  Add a test to catch cases
where this isn't true and use per-array uploads instead.  Fixes compiz
glitches on x64.
2006-10-13 11:21:55 +00:00
Keith Whitwell
fd6341e574 Make sure instructions are zero'd out before use. 2006-10-13 11:20:25 +00:00
Keith Whitwell
e595ce79d6 Use unsigned long batchbuffer offset, fixes x64 warnings. 2006-10-13 11:19:38 +00:00
Keith Whitwell
b236715769 Fix printf warning. 2006-10-13 11:17:37 +00:00
Keith Whitwell
0dceffce33 Use unsigned long cast for checking pointer alignment, fixes x64 warnings. 2006-10-13 11:16:45 +00:00
Keith Whitwell
f06b9e4a8d Use mesa function to get opcode name rather than an internal table. 2006-10-13 11:14:43 +00:00
Michal Krol
201e6b9b75 Indent and cosmetic changes. 2006-10-13 08:44:32 +00:00
Brian Paul
e5a6fcc345 Revamp color table code.
Always store all color tables as both float and ubyte.
2006-10-13 00:44:31 +00:00
Brian Paul
e392c92250 adjust_colors() function replaces old _mesa_chan_to_float_span() function. 2006-10-12 23:48:57 +00:00
Brian Paul
0bfc56d7d3 use _mesa_map_ci8_to_rgba8() instead of _mesa_map_ci8_to_rgba() 2006-10-12 23:47:51 +00:00
Brian Paul
5bc33fe6f1 remove _mesa_chan_to_float_span(), rename _mesa_map_ci8_to_rgba() 2006-10-12 23:47:19 +00:00
Brian Paul
556c2fa3a3 _mesa_map_ci_to_rgba_chan() no longer used 2006-10-12 23:18:05 +00:00
Brian Paul
76e778dce5 Lots of changes to support runtime renderbuffer depths.
_swrast_read_rgba_span() now takes a datatype parameter.
New optimization for glReadPixels(format=GL_RGB).
New glCopyPixels optimization for the simple, common cases.
2006-10-12 23:17:02 +00:00
Brian Paul
4bb9f4115c don't use temp storage in _mesa_convert_colors() when possible 2006-10-12 23:14:19 +00:00
Brian Paul
57d719afb1 remove some debug code invalidated by prev check-in 2006-10-12 15:55:04 +00:00
Ian Romanick
f3f51bc844 Fix bug #4681.
glDeleteTextures and glDeleteTexturesEXT were erroneously listed as
aliases of each other.  For anything /except/ GLX protocol they are
aliases.  This set of changes allows functions that are functionally
identical but have different GLX protocol to be listed as aliases.

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

For a deeper explanation of what is changed, please see:
http://dri.freedesktop.org/wiki/PartiallyAliasedFunctions
2006-10-11 22:37:14 +00:00
Brian Paul
8a5871a98c use GLvoid * for _swrast_write_zoomed_rgb/rgba_span() functions 2006-10-11 22:21:55 +00:00
Brian Paul
55fa6a2fdb rewrite/simplify the fast_draw_pixels() function 2006-10-11 22:07:01 +00:00
Brian Paul
f971e24cf0 use _mesa_convert_colors(), update some assertions 2006-10-11 22:03:34 +00:00
Brian Paul
32a966dad9 Added _mesa_convert_colors().
_mesa_clip_drawpixels() now handles Pixel.ZoomY==-1.
2006-10-11 22:02:36 +00:00
Brian Paul
86f0e0b9cc support for runtime renderbuffer depths 2006-10-11 20:14:08 +00:00
Brian Paul
9440868270 In xmesa_DrawPixels_8R8G8B() check if drawing into a window system buffer,
not a user-created FBO.
2006-10-11 17:45:06 +00:00
Brian Paul
c364c57a1c added shaderobjects_3dlabs.c 2006-10-11 16:34:23 +00:00
Brian Paul
bb252d696f remove 3dlabs.c 2006-10-11 16:26:09 +00:00
Brian Paul
ed52be8c3f sources for X.org xserver build 2006-10-11 16:05:59 +00:00
Brian Paul
d3112d36d7 List of source (.c) files in each directory.
To be included by X.org Makefile.am files so that lists of files don't need
to be hardcoded and frequently updated there.
2006-10-11 15:52:00 +00:00
Brian Paul
81968ec49d a step toward moving run-time vertex program state out of GLcontext 2006-10-10 22:45:50 +00:00
Brian Paul
c61ecf373e fixed NV_position_invariant 2006-10-10 21:44:55 +00:00
Brian Paul
39c4daa6bc Move the fp_machine struct into s_nvfragmprog.c since (except for program
debug) it's only used there.
2006-10-10 21:43:31 +00:00
Brian Paul
97a659337e s/GLuint/GLbitfield/ 2006-10-10 21:25:27 +00:00
Brian Paul
fe6947002f If program is position invariant, set VERT_BIT_POS in InputsRead field.
Fixes broken "OPTION NV_position_invariant".
2006-10-10 21:23:23 +00:00
Keith Whitwell
d886423b3c Use the mesa-provided texenv program rather than rolling our own.
Turn on texture crossbar support.
2006-10-10 08:58:43 +00:00
Ian Romanick
fcd758868b Added dispatch.html.
This new file documents Mesa's implementation of GL function dispatch.  It's
not quite complete, but I think there's enough there to make it useful.
2006-10-09 18:26:03 +00:00
Brian Paul
5ab9dcd761 return void instead of GLvoid for glClearDebugLogMESA(), glGetDebugLogMESA() 2006-10-09 16:09:30 +00:00
Ian Romanick
b8f26126e2 Updates for XCB. Bug 8560. 2006-10-09 15:25:03 +00:00
Brian Paul
d3b257374e added a SyncHandle() call, remove UnlockDisplay() call. (bug 8521) 2006-10-09 14:57:50 +00:00
Brian Paul
0a0cd3a8ae Updates for XCB. Bug 8560. 2006-10-09 14:55:46 +00:00
Ian Romanick
dba173077e Major clean up of MakeContextCurrent
Rearrange most of the internals of MakeContextCurrent.	Put all of the code to
bind the new context up front.	If that is successful, unbind the old context.
This saves a lot of code and removes some locking crazyiness.

This patch has been tested for indirect rendering with glxinfo, glxgears,
manywin, and wincopy.
2006-10-07 02:52:18 +00:00
Roland Scheidegger
fa65447d8c do not import arrays for generic arb attribs if the array is not enabled (same as for generic attribs for nv vp is already done). Since the requested stride is 16, otherwise the code would end up doing lots of unnecessary import work (in doom3, trans_4_GLfloat_4f_raw caused by that was by far the single most time-consuming function in the r200 driver, not importing the disabled arrays caused the cpu time spent in the driver to drop from 45% to 30%, though real-world gain was pretty minimal as it's not really cpu bound here in the first place). 2006-10-07 01:04:49 +00:00
Brian Paul
524bf7bbcf rewrite clear_rgba_buffer_with_masking() 2006-10-06 03:52:01 +00:00
Brian Paul
e18d0f82b6 deal with union/aliasing in convert_color_type() 2006-10-06 03:49:46 +00:00
Brian Paul
6e138dfa36 rewrite of read_fast_rgba_pixels() 2006-10-06 03:48:42 +00:00
Keith Whitwell
fcb48e3422 missing file 2006-10-05 19:16:46 +00:00
Keith Whitwell
68da677ae2 Accelerate glBitmap with a color expand blit. Nice speedup for demos
like 'fire' that display a help message or fps number this way.
2006-10-05 11:35:57 +00:00
Keith Whitwell
1eca12a7d9 Quieten debug message. 2006-10-05 11:34:01 +00:00
Keith Whitwell
496f9ddf35 eliminate rhw divide under some circumstances 2006-10-05 11:28:45 +00:00
Keith Whitwell
e7b0ec9ae7 Quieten debug message. 2006-10-05 11:27:13 +00:00
Ian Romanick
6921063520 Changes to generated code caused by the previous commits. 2006-10-04 22:33:54 +00:00
Ian Romanick
491a16fb0f Fix the ordering of extensions. 2006-10-04 21:59:51 +00:00
Ian Romanick
990c8a9df9 Keep indentation consistent with indent.
Remove code in the Python scripts that keeps the indentation of the
generated code consistent for all cases.  Instead, pass the generated code
through the indent command.  Unix tools for the win!
2006-10-04 21:55:55 +00:00
Ian Romanick
eaeaaf6205 Divide categories into four groups as they are processed from the XML. Add
an iterator to iterate over the categories in order, starting with "core"
versions, then ARB extensions, then numbered non-ARB extensions, and finally
unnumbered extensions.

Use the new iterator in a couple places to ensure that output that is
grouped by catgory is generated in a consistent order.

More changes to the scripts are coming.  The generated files will be
committed one time after all the changes are in.  Too bad we're not using
GIT, or this would be easy. :(
2006-10-04 20:45:59 +00:00
Ian Romanick
553b8334bb Add utility method client_supported_for_indirect.
The new method client_supported_for_indirect is used to determine whether or
not the client-side library supports the function for indirect rendering.
The may or may not have associated protocol that needs to be generated
(e.g., glVertexPointer does not, but glVertex3fv does).
2006-10-04 18:58:10 +00:00
Brian Paul
25e441e8e9 in MakeContextCurrent() use old display pointer for __glXSetupForCommand(), bug 8443 2006-10-04 16:22:24 +00:00
Brian Paul
5ed4e35ba5 use _swrast_span_default_color() in the disabled code too 2006-10-04 15:22:11 +00:00
Brian Paul
9b507639ab call _swrast_span_default_color() to simplify _swrast_Bitmap(), improved comments 2006-10-04 15:21:23 +00:00
Brian Paul
da62bcecfb minor formatting fix 2006-10-04 15:06:27 +00:00
Felix Kuehling
3fd5aa88ea Bugzilla 6242: [mach64] Use private DMA buffers (only)
https://bugs.freedesktop.org/show_bug.cgi?id=6242
Patch by George Sapountzis: https://bugs.freedesktop.org/attachment.cgi?id=6271

Update to new mach64 DRM 2.0.0 with private DMA buffers.
Handle EAGAIN in mach64FireBlitLocked: call drmCommandWrite up to
MACH64_TIMEOUT times when EAGAIN is returned.
Also handle EAGAIN in mach64FlushVerticesLocked.
2006-10-02 20:34:06 +00:00
Brian Paul
346a239f01 return null if no context 2006-10-02 15:20:23 +00:00
Brian Paul
cdb27e8242 New SWspan and SWspanarrays typedefs. 2006-10-01 16:03:05 +00:00
Michel Dänzer
46929c93d8 i915: Fix wait for scheduled swap on secondary display. 2006-09-29 10:22:54 +00:00
Brian Paul
7fa99ed3d8 updated protos for blend funcs 2006-09-29 02:15:23 +00:00
Brian Paul
d92da49bae more changes for runtime renderbuffer depths 2006-09-29 02:12:07 +00:00
Brian Paul
0ce6a2935c include mipmap.h 2006-09-29 01:26:55 +00:00
Brian Paul
24edd90159 Move mipmap generation functions, texture scaling functions into new
mipmap.c file.
2006-09-29 01:24:26 +00:00
Brian Paul
bb4b378c60 updated info about name mangling 2006-09-29 01:22:53 +00:00
Michel Dänzer
af866291da Synchronize drawable to the pipe where the bigger part can be visible.
This requires the DDX driver to set the corresponding fields in the SAREA,
so check its minor version.
2006-09-28 14:10:47 +00:00
Michel Dänzer
4abf2706e9 Add new I830 SAREA fields. 2006-09-28 14:10:07 +00:00
Michel Dänzer
ebc879014c Add helper function that returns the current vblank sequence of a drawable. 2006-09-28 14:09:20 +00:00
Michel Dänzer
638ece315f Add helper function to calculate the area of the intersection of two rectangles. 2006-09-28 14:08:38 +00:00
Michel Dänzer
941c866739 i915: Handle DRM_VBLANK_SECONDARY when scheduling buffer swaps. 2006-09-28 14:07:56 +00:00
Michel Dänzer
c2f1a1857e i915: Attempt to schedule buffer swap on target vertical blank when possible.
This has some advantages over the traditional way of first waiting for the
target vertical blank and then emitting the buffer swap, e.g.

* glXSwapBuffers returns immediately, only the next time the driver needs the
  hardware lock will it block until the target vertical blank. This should
  allow applications that don't intermix rendering and other processing to
  start processing for the next frame right away.
* It's less likely to produce tearing.
2006-09-28 14:07:12 +00:00
Michel Dänzer
7585fc989d Add driGetVBlankInterval() helper function.
This can be used by drivers to determine the current swap interval of a
drawable.
2006-09-28 14:04:19 +00:00
Michel Dänzer
7539fde334 driWaitForVBlank: Add support for secondary vertical blank. 2006-09-28 14:03:41 +00:00
Michel Dänzer
6a2f5c6752 Some restructuring of the driWaitForVBlank() code.
Also some minor fixes for detecting when the deadline is met or missed, in
particular wrt wraparounds of the sequence number.
2006-09-28 14:03:02 +00:00
Michel Dänzer
24bb3b3998 Make driDrawableInitVBlank() initialize the sequence number.
This prevents the first wait for vertical blank from timing out when the X
server has been running for a long time.
2006-09-28 14:02:05 +00:00
Brian Paul
1d914fe465 remove obsolete comment 2006-09-27 14:00:37 +00:00
Jeremy Kolb
07bacc2263 Update to use the new XCB naming convention. 2006-09-26 23:56:20 +00:00
Jeremy Kolb
3d7ee324ad Added function convertStringForXCB. Deals with the recent XCB naming convention switch.
Updated the generated code to use the new XCB naming scheme.
2006-09-26 23:47:04 +00:00
Jeremy Kolb
b68788a1ca Update linux-dr-xcb config file to use LIBDRM_CFLAGS 2006-09-26 23:45:28 +00:00
Jerome Glisse
9e82552c30 Remove r200 dependency
Remove r200 dependency from the code as r200 merged
driver never worked (right ?) and we want to clean
the code.
2006-09-26 17:35:41 +00:00
Jerome Glisse
c67d8678dd Remove r200 dependency.
Remove r200*.h files dependency.
2006-09-26 17:28:40 +00:00
Michal Krol
ea87987dda Prepend #extension 'MESA_shader_debug: require' to each shader. 2006-09-26 16:06:35 +00:00
Michal Krol
27f660c164 Add GLSL preprocessor. 2006-09-26 16:01:11 +00:00
Michal Krol
4303d22739 Fix Windows newlines. 2006-09-26 12:10:33 +00:00
Michal Krol
16647b739b Add syntax files for expression and directive preprocessor.
Fix syntax errors in builtin library 1.2 sources.
All derivative files (*_gc.h and *_syn.h) are generated by Makefile.
2006-09-26 11:43:30 +00:00
Brian Paul
a50b7dbc3b Initial work for supporting different renderbuffer color depths at runtime. 2006-09-25 23:57:39 +00:00
Michel Dänzer
df8632ebd8 Fix and re-enable swizzling paths for big endian platforms. 2006-09-25 16:34:40 +00:00
Keith Whitwell
cbdd7e1094 bring in active_sz mechanism from i965 driver. Fixes bug 8410 2006-09-25 09:14:26 +00:00
Keith Whitwell
f1945796ed Fixup one place where attrsz was being used instead of active_sz 2006-09-25 09:12:25 +00:00
Brian Paul
f515c78a23 Change logicop, blend, masking functions to use the colors/indexes in the
sw_span object, rather than an explicit parameter.
2006-09-24 19:59:30 +00:00
Brian Paul
ba001224a1 Roll the multi_write_rgba_span() code into _swrast_write_rgba_span(). 2006-09-24 19:46:42 +00:00
Brian Paul
0785b6052a use span.array->rgba instead of local var in accum_return() 2006-09-24 16:34:56 +00:00
Brian Paul
f11508c29f use span.arrays for color/indexes instead of a local var when doing masked clears 2006-09-24 16:31:23 +00:00
Ben Skeggs
a05db7f505 Kill all the current shader code. 2006-09-24 13:16:23 +00:00
Sean D'Epagnier
e184bd861c corrected cursor drawing
added handling of SIGWINCH
fixed input of recieving SIGIO while handling SIGIO
corrected input code for return
uncommented normal calculation to models
2006-09-24 10:57:26 +00:00
Brian Paul
1ad12874b3 allocate larger TempImage, use COMBO var to choose test format/type 2006-09-23 16:09:26 +00:00
Brian Paul
7b803d649a fix the broken fallback string/debug stuff 2006-09-22 19:28:36 +00:00
Brian Paul
5174e7c181 remove extra indentation 2006-09-22 19:09:50 +00:00
Brian Paul
43715c711d Get rid of _swrast_mask_rgba_array() and _swrast_mask_index_array(). 2006-09-22 17:44:39 +00:00
Roland Scheidegger
9f819dc014 fix up access to vertex attrib components which don't really exist but are defined to some default value by the spec (fogcoord yzw, normal w, secondary color w), by replacing those components with zero/one respectively using swizzling. 2006-09-22 15:48:50 +00:00
Keith Whitwell
9c5d75e592 Explicit test for +ve pitches in intelEmitCopyBlit() 2006-09-22 14:43:09 +00:00
Roland Scheidegger
8a0fb128c3 don't skip user clip plane clipping when the current vertex program is position invariant. 2006-09-22 13:34:24 +00:00
Keith Whitwell
7e9799ac3d Use _Enabled rather than _Active when checking for fragment shaders 2006-09-22 11:45:21 +00:00
Keith Whitwell
df058298e1 Flush driver, not just tnl module. 2006-09-22 11:40:35 +00:00
Keith Whitwell
f9bfdb1ce4 resize buffers in MakeCurrent 2006-09-22 11:36:30 +00:00
Keith Whitwell
f118b9b40d Remove unused variable. 2006-09-22 11:33:46 +00:00
Jouk Jansen
424749c3d5 Correcting directory name in OpenVMS-Makefile 2006-09-22 11:09:07 +00:00
Brian Paul
57d705d5a9 remove rgb[] array from span_arrays_struct - was only used in a few places 2006-09-21 23:19:40 +00:00
Brian Paul
c7d0fe1c4b new comments, indentation fixes 2006-09-21 23:04:29 +00:00
Brian Paul
4af404038c bump version to 6.5.2 2006-09-21 23:02:21 +00:00
Brian Paul
76785cb70a move a conditional into an assertion 2006-09-21 22:59:50 +00:00
Brian Paul
87c5ec817c updated doxygen info 2006-09-21 22:54:53 +00:00
Brian Paul
bb0862968e updated extension info 2006-09-21 22:53:15 +00:00
Brian Paul
60955d7f96 Re-org of per-release info.
From now on, put all release-specific info into the release-X.Y.Z.html file
rather than scattered between a relnotes file, versions.html and news.html.
2006-09-21 22:51:16 +00:00
Brian Paul
2482007373 replace assert(0) with error report, improved comments, etc 2006-09-21 22:43:51 +00:00
Keith Whitwell
bad5cf056a Fix incorrect byteswap_mapping(). Disable swizzle path on bigEndian
until someone can figure out whats wrong there.
2006-09-21 18:31:36 +00:00
Brian Paul
184b5d8938 use new _mesa_little_endian() function 2006-09-21 15:51:55 +00:00
Brian Paul
32e0efbdbe added _mesa_little_endian() 2006-09-21 15:51:06 +00:00
Brian Paul
81e0d73780 GLUT_FORCE_VISUAL env var to force glut to use a particular visual (debug only) 2006-09-21 15:16:36 +00:00
Brian Paul
b7d9b1e724 new code to init DirectColor colormaps 2006-09-21 15:14:30 +00:00
Keith Whitwell
167ca59fe8 Fix the dstMap for rgb888 and bgr888 texture formats, which are the
opposite to what you'd naively expect.
2006-09-21 12:43:05 +00:00
Keith Whitwell
cac5974bf9 Do a better job of choosing texture formats to avoid image conversions. 2006-09-21 10:20:15 +00:00
Keith Whitwell
afd244d4e8 use the requested internal texture format where possible 2006-09-21 10:07:04 +00:00
Keith Whitwell
76dd385fed Catch a couple of cases where we would have to delete and recreate the
miptree object.
2006-09-21 10:06:18 +00:00
Keith Whitwell
3974cc8c09 Deal with the overloading of _mesa_texstore_rgba, which is actually
used to store all sorts of formats.

Software mesa fails the glean pixelFormats test, but it appears to be
failing even with the swizzle code disabled??
2006-09-20 22:40:34 +00:00
Keith Whitwell
3aea82b396 Extend swizzle support to all remaining source formats and texture
destination formats.
2006-09-20 22:02:48 +00:00
Roland Scheidegger
62d4dfbfe3 try to use a 8888 texture format which will result in only a memcopy in mesa's texstore functions whenever possible for r200 and r300. r200 can use hw formats argb8888, rgba8888 and abgr8888 (or the opposite on big endian), r300 can use argb8888, bgra8888, rgba8888 and abgr8888 regardless of endian, as it supports free component swizzling. 2006-09-20 19:11:56 +00:00
Keith Whitwell
46c3bd29be Support both big and little endian, more source types and more
destination formats through the swizzle path.  It would be great to
see this tested on eg, PPC machines...
2006-09-20 18:56:19 +00:00
Roland Scheidegger
528de982f8 reenable code in _mesa_texstore_rgba8888 to avoid the generic copy path if only swizzling is required as it works just fine (tested with glean pixelFormats test and a hacked up r200 driver which always uses that format). 2006-09-20 18:22:19 +00:00
Keith Whitwell
2e5c686c2b Fix various typos to pass glean pixelFormats test. 2006-09-20 17:41:18 +00:00
Keith Whitwell
fce0d13b4f Enhance compute_component_mapping() to convert to and from any of the
color base formats.
2006-09-20 17:07:13 +00:00
Keith Whitwell
4f17378ec3 Add a comment about the interactions of negative pitches, overlapping
blits and the different ways of specifying a blit on this hardware.
2006-09-20 15:04:05 +00:00
Keith Whitwell
f1d6ad6fe2 remove some dead code 2006-09-20 15:00:24 +00:00
Keith Whitwell
b5d0f6c17f Fix some warnings 2006-09-20 14:58:55 +00:00
Roland Scheidegger
85b6d0c4df fix mixed texgen/non-texgen with texgen modes requiring plane parameters (GL_OBJECT_LINEAR, GL_EYE_LINEAR). This is a chip limitation, try to hack it up regardless or use a tcl fallback in some cases. Might still produce wrong results if fixed up, but so far this corrects celestia ring shadows (in multitexture mode), doom3 (arb renderer), quake4 (arb renderer and some less visible bugs in r200 renderer), and even the remaining texgenmix broken case (this is pure luck though, it is easy to construct artifical cases where it will break). 2006-09-20 14:56:21 +00:00
Keith Whitwell
e38114a5e4 Support ARB_texture_rectangle. 2006-09-20 14:54:49 +00:00
Keith Whitwell
b35121d54d 1) Add a new flag in the sarea (coopting the unused texAge value) to
identify context switches between members of a share group -
ie. multiple contexts in a single application, possibly on different
threads.  In this case the contexts share a bufmgr instance and there
is no need to evict textures - so don't.

2) Use a new flag 'need_flush' to ensure hardware rendering is flushed
prior to starting a software fallback.
2006-09-20 14:44:40 +00:00
Keith Whitwell
3a5319293c Broadwater seems to prefer this style of blitting. 2006-09-20 14:39:53 +00:00
Brian Paul
d41d29b8bd make current GLX context per-thread 2006-09-20 14:39:47 +00:00
Brian Paul
0c54e47c0e fix a memleak in DestroyContext() 2006-09-20 14:39:24 +00:00
Keith Whitwell
83c3f9658d add accelerated glCopyPixels path 2006-09-20 14:36:49 +00:00
Keith Whitwell
187f2cfb4a Add a new internal program parameter value STATE_TEXRECT_SCALE which
provides 1/width and 1/height of the active texture, useful for
implementing ARB_texture_rectangle support on hardware which only
supports ARB_npot-style texturing.
2006-09-20 14:30:22 +00:00
Keith Whitwell
0c9259f3b9 Fix _mesa_swizzle_ubyte_image() to deal with RGBA->RGB->RGBA
conversions, ensuring that the final A value is 0xff in those cases
where we use a RGBA hardware texture format to store RGB textures.
Fix a couple of cases where hardwired texture conversions were
ignoring this restriction.
2006-09-20 14:28:42 +00:00
Keith Whitwell
5658810660 Export _mesa_print_alu_instruction() to allow drivers to roll their
own debug code for programs with driver-private opcodes.

Remove redundant loop in _mesa_num_inst_src_regs().
2006-09-20 12:57:54 +00:00
Keith Whitwell
cb54c056a6 restore debug output after brw_wm_fp compilation stage 2006-09-20 12:53:35 +00:00
Keith Whitwell
285801a9ed Use DEBUG_SYNC to switch between per-primitive and per-frame aubfile dumps. 2006-09-20 12:49:52 +00:00
Brian Paul
408ce7e861 added LIBDRM_CFLAGS (Javier Villavicencio) 2006-09-19 22:43:41 +00:00
Brian Paul
dc4bf43898 fix CFLAGS (bug 8344) 2006-09-19 16:31:37 +00:00
Brian Paul
c42afefda1 change make depend output redirection to 2>&1 (bug 8344) 2006-09-18 22:55:13 +00:00
Brian Paul
876b41bc03 check for n <= 1 in compute_min_mag_ranges(), bug 8320 2006-09-18 15:03:04 +00:00
Brian Paul
f7da4e687c set lambda to zero for textured points (bug 8320) 2006-09-18 15:02:26 +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
Brian Paul
3d70f9ff82 6.5.1 md5 sums 2006-09-16 04:23:16 +00:00
Brian Paul
0321dac2cd update 6.5.1 release date 2006-09-16 04:13:20 +00:00
Brian Paul
a3a640171f added #ifdef tests for Windows for int64_t, uint64_t 2006-09-16 04:10:56 +00:00
Brian Paul
8636981646 replace GLAPI w/ static and init var to 0 (Michel Donais) 2006-09-15 19:00:37 +00:00
Keith Whitwell
54d3ab4878 npot version of redbook/mipmap.c 2006-09-15 10:41:54 +00:00
Ian Romanick
a3b99fcb56 Use correct opcodes for GLX_EXT_texture_from_pixmap.
Set the correct opcodes for GLX_EXT_texture_from_pixmap functions.  Changes
to the glproto package and the core X server are also required.
2006-09-14 21:07:17 +00:00
Brian Paul
eee85373c7 set 6.5.1 release date 2006-09-14 20:31:13 +00:00
Jerome Glisse
3dcf23171d Fallback if ColorLogicOp is enabled. Cleanup a bit the fallback
function.
2006-09-14 17:44:58 +00:00
Michel Dänzer
8c9366a807 Remove MESA_LITTLE_ENDIAN guard for code that seems to work fine on big endian. 2006-09-14 16:17:06 +00:00
Keith Whitwell
657f738ea2 VS nr of urb entries is constrained to be one of a fixed set of values,
specifically {8,16,32}.
2006-09-14 10:37:09 +00:00
Roland Scheidegger
6babf624b7 always use argb8888 instead of rgba8888, this is far more likely to hit a faster memcopy path in mesa (at least on little endian systems, possibly on big endian too) 2006-09-13 23:56:09 +00:00
Roland Scheidegger
2e2a981335 detect some more cases which can use straight memcpy for _mesa_texstore_rgba8888 2006-09-13 23:51:39 +00:00
Roland Scheidegger
99e0236046 Always mark tex state atom as dirty when the texture image is dirty, this ensures texture cache gets flushed in case the new texture has the same offset as the old one (fixes glean pixelFormat test at least on r200). 2006-09-13 23:20:10 +00:00
Brian Paul
43aa034084 updated comment 2006-09-13 22:49:48 +00:00
Roland Scheidegger
888b1a9166 don't use derived value _ColorLogicOpEnabled as it's not current by the time we call the blend/logic op functions. Fixes glean logicOp test on r200. 2006-09-13 22:41:46 +00:00
Brian Paul
fd2e402359 added GL_CURRENT_RASTER_SECONDARY_COLOR query (OpenGL 2.1) 2006-09-13 21:02:32 +00:00
Brian Paul
bd5331f9e8 just comments and const qualifiers 2006-09-13 20:26:43 +00:00
Brian Paul
ac1d7370a7 fix broken do_EXP() 2006-09-13 20:14:24 +00:00
Roland Scheidegger
cb08dcbbf2 fix GL_REFLECTION_MAP texgen by not using tex matrix negation when lighting is not enabled (?). This fixes demos/cubemap as well as glean texCube test. 2006-09-13 17:35:44 +00:00
Roland Scheidegger
87d6028f28 make sure we upload the new vertex program if the program string changes. 2006-09-13 17:30:11 +00:00
Brian Paul
25d59d2962 make triangle smoothing a sw fallback (Martign van Oosterhout) 2006-09-13 16:41:25 +00:00
Jerome Glisse
323414940f Fix compilation warning. 2006-09-12 18:52:13 +00:00
Jerome Glisse
6a65e6db3d Removing some of r200 dependency, cleaning up code a bit,
and fixing a couple of warning. More cleanup and shuffle
to come. I have tested this change they might broke things
especialy with r300_texstate.c change (format_x doesn't
seems to be use at all by r300).
2006-09-12 18:34:43 +00:00
Keith Whitwell
b1cb39d8bd quieten debug 2006-09-12 14:27:57 +00:00
Keith Whitwell
16a22a5f4a Potential fix for doom3 lockups. Seems that there is a conflict
between the vertex cache, the vertex shader and the clipping stages,
all of which are competitors for URB entries assigned to the VS unit.
This change reduces the maximum number of clip and VS threads by
enough to ensure that they cannot consume all the available URB
entries, and then reduces the number somewhat more up to an arbitary
amount I discovered by trial and error.  Unfortunately trial and error
solutions don't inspire total confidence...
2006-09-12 13:54:31 +00:00
Keith Whitwell
72e810db9d Disassemble active program when DEBUG_VS is set. 2006-09-12 13:51:09 +00:00
Keith Whitwell
7b8c73460f Add code to tweak aubfile state and primitives on replay. 2006-09-12 13:50:22 +00:00
Keith Whitwell
e1ae10db2c Encode a unique id in the aub header date fields. 2006-09-12 13:43:10 +00:00
Brian Paul
bd38df11f4 Win32 fixes (SF bug 1554931) 2006-09-11 16:39:04 +00:00
Brian Paul
31a66ada72 undo some accidental changes in _mesa_is_legal_format_and_type() 2006-09-11 15:25:49 +00:00
Brian Paul
02aa5fba03 init accum buffer fields in _mesa_update_framebuffer_visual() 2006-09-11 15:04:23 +00:00
Roland Scheidegger
25847f2b5b remove code to deal with non-normalized texture coordinates for tex rect targets (swtcl tex coord translation stage, tcl tex matrix adaption) and use the chip's native handling of such coords instead (!!!). Seems noone noticed those bits in the se_coord_fmt reg, even though it works fairly similar to r200 (except it's set per-unit and always active, so only enable it for texture rectangles). 2006-09-10 19:19:13 +00:00
Brian Paul
cb53555058 Redefine the BYTE_TO_FLOAT() and SHORT_TO_FLOAT() macros to avoid problems
converting 0 to exactly 0.0
This goes against the OpenGL spec (see table 2.6) but solves problems
when doing byte -> float -> ubyte conversion for particular texture formats.
2006-09-10 17:42:57 +00:00
Brian Paul
ef8244df1a don't use xmesa_DrawPixels_8R8G8B() if there's a software alpha channel 2006-09-10 17:10:36 +00:00
Roland Scheidegger
7998962444 cause a raster fallback if a yuv texture is used on texture unit > 0 as yuv conversion appears only to work on first unit. 2006-09-10 13:48:51 +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
Keith Whitwell
02df36f394 Basic facility for playing back captured aubfiles. Requires a small
hack to the drm to disable command verification on the cmd_buffer
ioctl.  Doesn't exactly replay as commands are normally delivered as
batchbuffers but are captured and replayed as commands on the ring.
2006-09-08 10:36:32 +00:00
Roland Scheidegger
a5e73e6887 cause a vtxfmt fallback directly when hitting NewList for radeon and r200 drivers, otherwise we'll mix up tcl and vtxfmt path for some reason. This fixes a warzone2100 asssertion failure. 2006-09-08 00:54:55 +00:00
Keith Whitwell
3e05902d30 Consistent return values from the bm* functions.
Get aubfile generation working again.
2006-09-07 19:58:16 +00:00
Keith Whitwell
493b2ddecb Cope with memory pool fragmentation by allowing a second attempt at
rendering operations to take place after evicting all resident
buffers.

Cope better with memory allocation failures throughout the driver and
improve tracking of failures.
2006-09-07 19:05:40 +00:00
Keith Whitwell
c26f36c830 Add some asserts, fix some not-quite-bugs. 2006-09-07 18:28:35 +00:00
Keith Whitwell
e48db4430f Fix glitch with pool alignments. 2006-09-07 16:29:37 +00:00
Keith Whitwell
1456a0fff6 Use lower alignments where possible. Also pad out allocated blocks to
a multiple of alignment to avoid accumulating unusable free blocks.
2006-09-07 16:23:22 +00:00
Keith Whitwell
133f141680 Make sure bmBufferOffset is called for all active buffers every time
we render.  Currenly requires that some state be re-examined after
every LOCK_HARDWARE().
2006-09-07 16:09:50 +00:00
Roland Scheidegger
c5cb8e2c6f make really sure R200_VAP_PROG_VTX_SHADER_ENABLE is never set when we're already in a tcl fallback, otherwise the chip will instantly lock up when vertex progs are enabled the next time not in a tcl fallback (fixes for instance guaranteed lockup running any program which uses vertex progs with tcl_mode=0 and then later with tcl_mode=1). 2006-09-07 13:34:29 +00:00
Roland Scheidegger
28e7219b96 only allow VERT_ATTRIB_MAX instead of _TNL_ATTRIB_MAX for inputs of vertex programs (fixes a segfault since the result of the shift is undefined otherwise, and it may happen that _TNL_ATTRIB_POINTSIZE will be tried to read, unlike all other attribs this however may be unitialized (might be a bug in itself)). 2006-09-07 13:26:44 +00:00
Eric Anholt
d016d4e70f Fix a leak of the screen's option cache on cleanup (copied from radeon). 2006-09-07 06:02:00 +00:00
Keith Whitwell
14ec34d647 Simplify the immediate and displaylist code. Treat VertexAttrib*ARB
as non-aliasing and cope with the >32 attributes that result, taking
materials into account.
2006-09-06 18:30:00 +00:00
Brian Paul
2216aac8ea comment out EXTRA_LIB_PATH, ?= causes problems on HP-UX 2006-09-06 13:56:26 +00:00
Brian Paul
bb2180dca3 Fixes from Christopher Bell:
Use -O instead of +O3 or +O2.
Remove +Oaggressive.
Replace -Aa with -Ae.
2006-09-06 13:49:17 +00:00
Brian Paul
7d767604c7 remove stray tab 2006-09-06 13:44:57 +00:00
Brian Paul
d9aebd8498 for VERTEX_ATTRIB_WEIGHT, use break, not return 2006-09-06 05:03:47 +00:00
Brian Paul
4a901667e5 document vertex.weight hack 2006-09-05 23:20:58 +00:00
Brian Paul
3a55750d48 Hack for Warcraft (bug 8060): allow 'vertex.weight' to be referenced in
vertex program, even though it's not really supported.  Results will be
undefined, but Warcraft doesn't actually use the attribute.
2006-09-05 23:15:29 +00:00
Brian Paul
43cc1dc18f fix typo in enable_parser_extensions(): s/point_parameters/vertex_blend/ 2006-09-05 23:11:09 +00:00
Brian Paul
a088f160b3 Consolidate common case of _mesa_set_program_error() followed by _mesa_error()
in new program_error() function.
Add const qualifiers in many places.
Reorder some debug code to prevent referencing free'd memory.
2006-09-05 23:08:51 +00:00
Brian Paul
1f03339f1c updated info about glxproto.h 2006-09-05 18:23:21 +00:00
Keith Whitwell
d5cbb49c22 Dynamically allocate instruction store for tnl programs according to
requirements.
2006-09-05 10:01:24 +00:00
Keith Whitwell
74b2166ff8 Fixes for calculating point attenuation 2006-09-04 23:34:36 +00:00
Keith Whitwell
f65ad97469 Don't export NV_vertex_program as it's not supported, it confuses
glean, and we no longer need to export it to keep Mesa happy as we did
at one time.
2006-09-04 18:27:40 +00:00
Rune Petersen
ac7ea94030 Managed to make a commit that can't build... Sorry again... 2006-09-04 16:20:16 +00:00
Brian Paul
c78e895f09 get rid of GL_BOOLEAN definition (bug 8113) 2006-09-04 14:07:04 +00:00
Jouk Jansen
e08557ad8a OpenVMS compile support update
(previous commit did send the wrong file to the CVS)

 Modified Files:
 	Mesa/include/GL/vms_x_fix.h
2006-09-04 06:26:08 +00:00
Jouk Jansen
8cf3c85fd7 OpenVMS compile support update
Modified Files:
 	Mesa/include/GL/vms_x_fix.h
2006-09-04 06:22:39 +00:00
Roland Scheidegger
014bfda235 fog state atom contains (only) fog params necessary for tcl. Must not be emitted if vertex progs are enabled as it overlaps vertex param #94. 2006-09-04 00:57:39 +00:00
Rune Petersen
5300e8242f add missing change to skip low impact RAST fallback...
Sorry.
2006-09-03 20:31:52 +00:00
Roland Scheidegger
5b4e7cdca4 fix the presumably broken check for the allow_large_textures and vblank_mode options (same as bug 8042). 2006-09-01 23:36:30 +00:00
Roland Scheidegger
91650469ae make sure vertex programs are only enabled on the hw when they are really enabled, not just when a program enables vertex progs (could still be not enabled due to some error). Otherwise the hw potentially would try to execute a not valid (not set up at all) vertex program, likely leading to lockups. Hopefully fixes #8060. 2006-09-01 20:21:12 +00:00
Keith Whitwell
6ec2d37ae8 Catch a few more cases of using a message reg as an instruction source
arg.
2006-09-01 14:57:19 +00:00
Keith Whitwell
db0e53af74 fix a couple of cases where a message reg is used as an instruction source. 2006-09-01 14:18:06 +00:00
Ian Romanick
75faa1e19a Add API description for GLX_SGI_swap_control. 2006-08-31 20:50:43 +00:00
Ian Romanick
d6c675f497 Fix problems with vertex program protocol
There were two sets of bugs in the vertex program (ARB and NV)
protocol.  First, several of the ARB functions were missing the
'doubles_in_order="true"' annotation.  Second, after the ARB decided
that glVertexAttrib*ARB functions must not alias fixed-function state
for GLSL, Nvidia re-assigned GLX protocol opcodes for
glVertexAttrib*NV (circa Septeber 2004).  For some reason gl_API.xml
was never updated to reflect this, and the updated version of the
GL_NV_vertex_program spec never made into the registry.
2006-08-31 20:41:16 +00:00
Rune Petersen
934a2dcf0f re-apply shader fix.
appears to have been reverted by mistake.
2006-08-31 18:19:50 +00:00
Brian Paul
d9cb0fc44d version bump 2006-08-31 17:54:31 +00:00
Keith Whitwell
b237d7fa14 When using the old technique to set up the front buffer mapping, there
is no need to add front.offset to sPriv->pFB, it seems.  Fixes several
glean issues and frontbuffer rendering generally.
2006-08-31 17:24:55 +00:00
Brian Paul
6c44c53e06 update link 2006-08-31 15:19:44 +00:00
Brian Paul
c09458c133 remove VERSIONS from tarballs 2006-08-31 15:18:04 +00:00
Brian Paul
761d87485e updated 6.5.1 relnotes link 2006-08-31 15:17:43 +00:00
Brian Paul
e2859ea6ef Convert VERSIONS and RELNOTES-6.5.1 to html, update links to them. 2006-08-31 15:16:10 +00:00
Rune Petersen
3cbfef3917 Give the user posibility to choose speed over correctness.
It does 2 things:
1) Allows you to disable S3TC, wine-games sometimes need S3TC enabled.
2) Disable fallbacks that usually have low impact.
2006-08-31 15:15:29 +00:00
Brian Paul
52e36cd8d9 check if ext->name is null before strcmp() 2006-08-31 13:58:08 +00:00
Roland Scheidegger
901f83f14e do not abort with not supported vertex prog output configuration, fallback instead 2006-08-31 01:10:07 +00:00
Brian Paul
7986cfbee0 remove extension defines/protos that are now in glext.h 2006-08-30 23:50:31 +00:00
Brian Paul
3cd07d2c39 latest version from OpenGL ARB 2006-08-30 23:46:41 +00:00
Karl Schultz
cdb12bd0ae Handle API and dispatch table changes that removed a bunch of extension entry points. 2006-08-30 23:45:32 +00:00
Brian Paul
c6f8176b3f make prog2 a legal program (texture reference fix) 2006-08-30 23:40:53 +00:00
Brian Paul
b7fc1c32f8 Check that we don't try to reference more than one target of a texture unit.
For example, referencing both "texture[0], 2D" and "texture[0], CUBE" in one
program is an error.
2006-08-30 23:38:03 +00:00
Brian Paul
f6de865e56 s/0/VERT_RESULT_HPOS/ 2006-08-30 23:36:52 +00:00
Ian Romanick
a70d56485a Add missing parenthesis so that glXSwapIntervalSGI protocol is
correctly generated.
2006-08-30 23:15:02 +00:00
Michal Krol
c7f571eb7e Add missing vec4 instructions to the interpreter.
Other cosmetic changes.
2006-08-30 22:36:29 +00:00
Brian Paul
8a4366717a fix Xlib driver mem leaks 2006-08-30 22:04:09 +00:00
Brian Paul
6c06ce281a Use XAddExtension() to register an XCloseDisplay() callback function.
When the callback is called, free all Mesa's private visual and buffer
data structures which are tied to the display.
Fixes problems reported by Kitware.
2006-08-30 21:17:51 +00:00
Brian Paul
12a5f812fc init a local var to silence warning 2006-08-30 19:02:45 +00:00
Roland Scheidegger
a974aaaa3e Minor r200 vertex program cleanups. Remove disabled leftovers from r300 vertex program code. Fix authors. Correct slightly wrong check to determine if ran out of temps. Simplify check to determine if ran out of max instructions. Correctly report used native temps. Always kick off program translation when ProgramStringNotify is called (otherwise the reported native resources used queried might be wrong). 2006-08-30 13:44:31 +00:00
Roland Scheidegger
e6de1edaf0 fix initialization of native resource usage of vertex/fragment programs 2006-08-30 11:55:18 +00:00
Roland Scheidegger
ef3f00f67e fix typo causing a segfault when a vertex program uses more than 96 parameters 2006-08-30 10:26:31 +00:00
Brian Paul
8334c8a216 Move call to _swrast_update_rasterflags() since it depends on the
results of _swrast_update_fog_state().
Fixes bug where first frame of progs/samples/fog.c does not show fog.
2006-08-29 22:32:31 +00:00
Brian Paul
f7c4dc007f _mesa_debug() should be a no-op when not compiled with DEBUG defined. 2006-08-29 22:30:58 +00:00
Brian Paul
398471429b set 6.5.1 release to Aug 31 2006-08-29 21:56:59 +00:00
Brian Paul
70c2d51230 remove assertion that referenced &glSetFenceNV for debug test 2006-08-29 21:54:01 +00:00
Brian Paul
0aab798a18 replace abort with _mesa_problem() 2006-08-29 19:09:57 +00:00
Ian Romanick
8d675aa637 Deprecate GL_EXT_vertex_weighting.
Nvidia no longer supports this extension, and they no longer export its
entry points from their libGL.  There's no reason for us to keep dragging it
around either.
2006-08-29 17:44:45 +00:00
Ian Romanick
dfdd0b4f30 More static dispatch function removal.
Make functions for the following extensions available only via
glXGetProcAddress.  In cases where there are other aliases to the same
functions (e.g., between GL_EXT_histogram and GL_ARB_imaging), the alias
functions may still be statically exported.

    - GL_ATI_blend_equation_separate
    - GL_EXT_blend_equation_separate
    - GL_EXT_convolution
    - GL_EXT_color_sub_table
    - GL_EXT_cull_vertex
    - GL_EXT_depth_bounds_test
    - GL_EXT_framebuffer_blit
    - GL_EXT_histogram
    - GL_EXT_multisample
    - GL_EXT_stencil_two_side
    - GL_EXT_timer_query
    - GL_IBM_multimode_draw_arrays
    - GL_INGR_blend_func_separate
    - GL_NV_fence
    - GL_SGI_color_table
    - GL_SGIS_multisample
    - GL_SGIS_pixel_texture
    - GL_SGIS_point_parameters
    - GL_SGIX_pixel_texture
2006-08-29 16:43:44 +00:00
Ian Romanick
fc5b57b713 Clean up GLX function exports.
Make functions for the following extensions only accessable via
glXGetProcAddress:

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

Removed all remnants of the following extensions:

    - GLX_MESA_set_3dfx_mode
    - GLX_SGI_cushion
    - GLX_SGIX_dmbuffer
    - GLX_SGIX_video_resize
    - GLX_SGIX_video_source
    - GLX_SUN_get_transparent_index
    -
2006-08-29 15:38:19 +00:00
Roland Scheidegger
af1dc7e487 move initialization code aroudn so glPointParameter isn't called before checking the extension is present 2006-08-28 21:19:34 +00:00
Brian Paul
b5a2fc1255 Check mesa_vp->Base.NumInstructions == 0 instead of mesa_vp->Base.String to
determine if we actually have a program.  See "[r300] TCL fallback with Quake3".
2006-08-28 19:42:41 +00:00
Ian Romanick
258751f4a0 Add two new gl_function methods. dispatch_name returns the name of
the true static dispatch name (either the glFooBar name or the
gl_dispatch_stub_XXX name).  static_name returns the name of the
static function for a specific alias of a GL function.

Adding (and using) these two functions corrects some problems in the
generated code related to functions with multiple aliases where some
of the aliases have true static dispatch functions and some don't.  I
have verified that everything under progs, except xdemos/xdemo,
correctly link.  I did this by doing 'make linux-dri-x86-64
PROGRAM_DIRS="demos redbook samples xdemos tests"'.
2006-08-28 17:40:45 +00:00
Ian Romanick
0bb27c084d Add dependencies for all API XML files. 2006-08-28 17:35:54 +00:00
Brian Paul
e5bc35dd97 remove unused var 2006-08-28 15:16:49 +00:00
Brian Paul
e365b82be1 fix the check for force_s3tc_enable (bug 8042) 2006-08-28 15:16:36 +00:00
Brian Paul
b9ac4afff7 omit installmesa script from tarballs 2006-08-28 15:12:07 +00:00
Brian Paul
a394f546a4 check for GL_ARB_point_parameters 2006-08-28 14:20:19 +00:00
Aapo Tahkola
9cb82f7917 close #6318 2006-08-27 13:24:36 +00:00
Sean D'Epagnier
a38aef93ab The colormap code is now simpler, 15bpp works where it did not before.
The input is fixed so that delete reports '\b' and backspace 127

The vt switching works both right and left.
2006-08-27 01:16:09 +00:00
Ian Romanick
7e9737b370 Explicitly store the names for each function that should have a static
entry point generated.  This allows us to do things like generate a
static entry point for glPointParameterfvARB but not for
glPointParameterfvSGIS.
2006-08-26 21:26:55 +00:00
Alan Hourihane
092d14be92 Fix bug 8010 - locking issues. 2006-08-26 21:21:34 +00:00
Aapo Tahkola
2fd72a7844 fix #8008 2006-08-26 16:24:04 +00:00
Brian Paul
0c46a12365 delete buffers, destroy window upon exit 2006-08-25 22:13:08 +00:00
Brian Paul
6827cf4d9a include texobj.h to silence warning 2006-08-25 22:08:43 +00:00
Brian Paul
96ee800cd4 6.5.1 bug fixes 2006-08-25 22:07:40 +00:00
Brian Paul
4277ea4c0b Error detection/reporting was broken in several places. 2006-08-25 22:06:02 +00:00
Ian Romanick
3fea5910b9 Add a couple of the missing GL 2.0 functions. Enable GLX protocol for
glBlendEquationSeparateEXT.  Add missing enum "get" information for
GL_EXT_texture_filter_anisotropic.
2006-08-25 19:57:37 +00:00
Brian Paul
58d080b025 Free vertex program TnlData, if any. Fixes a mem leak. 2006-08-25 19:46:31 +00:00
Brian Paul
473f1aca7f clamp result.depth to [0,1] if written to 2006-08-25 19:45:31 +00:00
Brian Paul
439d59926a Remove XFree86 CVS keyword. 2006-08-25 18:07:49 +00:00
Brian Paul
a360bc31da Rearrange glBindProgram() code to do all error checking before changing
the binding.  Prevent a potential dangling pointer error.  SF Bug 1544507.
2006-08-25 17:18:56 +00:00
Brian Paul
4bae9a48ec In _save_End(), set CurrentExecPrimitive = PRIM_OUTSIDE_BEGIN_END if
we're in GL_COMPILE_AND_EXECUTE mode.
This fixes bug 7984.
2006-08-25 15:44:09 +00:00
Brian Paul
f38ac5fbac improved comments 2006-08-25 15:42:37 +00:00
Brian Paul
3c54e8376d Rename _mesa_append_modelview_code() to _mesa_insert_mvp_code().
The four DP4 instructions are now inserted at the top of the program
instead of appended to tail.
2006-08-25 15:15:24 +00:00
Brian Paul
383c39e58e use _mesa_alloc_instructions() 2006-08-25 15:14:25 +00:00
Brian Paul
9983a27cbe added _mesa_alloc_instructions() utility function 2006-08-25 15:13:25 +00:00
Ian Romanick
a574c804a0 Add missing enums for GL_SGI_color_table. 2006-08-25 00:56:34 +00:00
Brian Paul
e53e0f47d0 recent bug fixes 2006-08-24 23:37:36 +00:00
Brian Paul
6211a14137 update MAX_INSTRUCTIONS limit 2006-08-24 23:37:13 +00:00
Brian Paul
ebf58ea3a3 According to GL_NV_fragment_program, max frag prog length is 1024 instructions.
Updated MAX_NV_FRAGMENT_PROGRAM_INSTRUCTIONS to 1024.
2006-08-24 23:28:01 +00:00
Brian Paul
77427a1e52 Cg tries to bind NV fragment programs to the GL_FRAGMENT_PROGRAM_ARB target
with glBindProgramARB().  I guess the GL_ARB_fragment_program specification
allows that, but Mesa didn't.
Relaxed the check with a new predicate function: compatible_program_targets().
2006-08-24 23:11:39 +00:00
Brian Paul
e6940f0a33 scalar sources such as 'time.x' weren't accepted by parser 2006-08-24 23:08:01 +00:00
Brian Paul
c6511ab950 Functions for vertex/fragment program transformations, optimizations, etc. 2006-08-24 22:11:40 +00:00
Brian Paul
beb32c4a59 fix bad casts, carry over r200 fix to check for null program string in r300_translate_vertex_shader() 2006-08-24 22:05:35 +00:00
Brian Paul
94ff996cae Check for NULL program string in r200_translate_vertex_program().
Fixes bug reported by Chris Rankin.
Added some new comments.
2006-08-24 22:03:38 +00:00
Brian Paul
a75439093c use _mesa_realloc_instructions() 2006-08-24 21:58:32 +00:00
Brian Paul
3b9b8de9b0 Added _mesa_realloc_instructions() utility function.
Fixed/updated comments for parameter list functions.
2006-08-24 21:57:36 +00:00
Ian Romanick
a5f2206077 GL_EXT_paletted_texture functions should alias GL_SGI_color_table functions.
The functions for GL_EXT_paletted_texture that do not share GLX
protocol with GL_ARB_imaging are supposed to alias the similar
functions from GL_SGI_color_table.  They didn't.  This patch corrects
this problem and enables GLX protocol for both extensions.

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

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

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

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

This removes 50 functions from the dispatch table.
2006-08-24 20:14:45 +00:00
Brian Paul
5947f8fd63 fix fragment.position initialization bug 2006-08-24 19:06:02 +00:00
Ian Romanick
ce9767f863 Make sure that _GNU_SOURCE is enabled in the linux configs that set
HAVE_POSIX_MEMALIGN.  This eliminates a compiler warning.  Also,
clean up some crufty linux-sparc* configs.
2006-08-24 18:06:37 +00:00
Keith Whitwell
39f222a421 add point-position.c 2006-08-24 17:49:37 +00:00
Keith Whitwell
28536e6c4f Test for fragment.position in points primitives. Currently renders
incorrectly on software mesa.
2006-08-24 17:48:53 +00:00
Brian Paul
83304326c8 added glut/mini/ sources to glut tarball 2006-08-24 17:01:35 +00:00
Brian Paul
116411d5f0 Check if mesa_vp->Base.Parameters is null before dereferencing (bug report
from Chris Rankin).
Also, fix some bad casts.
2006-08-24 15:57:12 +00:00
Ian Romanick
4169c220bd Fix some problems with the generation of the size tables. Enable
generation of protocol tables for Render.
2006-08-24 00:26:47 +00:00
Brian Paul
a95d5f0f58 silence warning 2006-08-23 23:18:39 +00:00
Brian Paul
4d12a05e6c Added _mesa_lookup_program() and _mesa_lookup_bufferobj() functions to avoid
a lot of casting elsewhere.
Use _mesa_lookup_texture() in tdfx driver, use _mesa_lookup_bufferobj() in r300
driver.
2006-08-23 23:10:14 +00:00
Ian Romanick
261a806f9e New script and API description file to enable generate of GLX protocol
decode tables in the server.
2006-08-23 20:32:48 +00:00
Brian Paul
d21ccb49c0 update glut fbdev sources list 2006-08-23 19:46:17 +00:00
Sean D'Epagnier
bd3e6ec066 VT switching now uses correct keys.
exiting when virtual screen size is larger than regular size doesn't corrupt screen.
colormap is reset when using stdin input on exit.
return is not reported as ctrl-m but '\r' as it should be
backspace keycode was incorrect and not working, fixed
2006-08-23 07:55:48 +00:00
Aapo Tahkola
43c9587ed4 remove duplicate pieces of code. 2006-08-22 22:27:32 +00:00
Aapo Tahkola
cafb0617ea extend some DrawRangeElements cases to support rendering more than 65535 verts in one blast. ut2k4 cases in other words ... 2006-08-22 21:54:50 +00:00
Aapo Tahkola
50eae3af7a fix broken write-only depth setting. use early z where possible. 2006-08-22 21:05:37 +00:00
Ian Romanick
723db7212c Correct the name of the GL_NV_texture_expand_normal extension. 2006-08-22 18:44:58 +00:00
Ian Romanick
d319edff1e The TLS dispatch functions for x86-64 are fixed-size, just like on
x86.  This means that the position of each dispatch function can be
calculated as (dispatch_offset * size_of_function) + glNewList.  This
allows us to not store the function pointers in glprocs_table_t.

This same optimization has been done for quite some time on x86.  We
could probably also do this for some cases of the SPARC dispatch as
well.
2006-08-22 18:22:20 +00:00
Ian Romanick
4e4b5f4008 Add new attribute called static_dispatch to the <function> element. This
boolean attribute, which defaults to true, determines whether or not a
static dispatch function is available in libGL for applications to link
against.

Ideally, any new functions that are not part of the ABI should not have
directly accessable dispatch functions.  This forces applications to use
glXGetProcAddress to access these functions.  By doing this we can
gracefully remove functions from libGL without breaking the linkage of
applications.

Note that the static dispatch functions are still generated.  However, they
are given names like gl_dispatch_stub_820 and are marked with the "hidden"
linker attribute.

All extension functions added since the previous Mesa release (6.5) have
been marked as 'static_dispatch="false"'.
2006-08-22 16:34:38 +00:00
Brian Paul
6423ec9145 move ALL_SOURCES to sources file 2006-08-21 16:05:30 +00:00
Brian Paul
b20814fd7d remove FBDEV_DRIVER_OBJECTS assignment (in sources file) 2006-08-21 15:50:41 +00:00
Brian Paul
d5299bf9a1 various updates 2006-08-21 14:26:06 +00:00
Michal Krol
1d67cad9af More GLSL preprocessor code:
Rename slang_version.syn to slang_pp_version.syn.
The #version directive understands version 120.
Cosmetic changes in version preprocessor.
Checks if requested version is supported by the compiler.
2006-08-21 09:25:11 +00:00
Michal Krol
798ef5ce33 GLSL 1.20 constructors and operators. 2006-08-21 08:47:28 +00:00
Roland Scheidegger
bd4c8ec0ec remove the now confusing option to manually enable software ARB_vp if drm is not new enough on r200 2006-08-19 08:54:03 +00:00
Sean D'Epagnier
c6fc823987 Removed ifeq from makefile, and corrected fbdev driver so it compiles 2006-08-19 00:28:36 +00:00
Brian Paul
cf4d2f7109 updates for 6.5.1 2006-08-18 20:24:54 +00:00
Brian Paul
92c43b110c Fix-ups for linux-fbdev config. No longer build Xlib driver sources. 2006-08-18 20:20:28 +00:00
Sean D'Epagnier
7e4152f0ed The driver now compiles correctly without any x headers or libraries installed
The bitmap and stroke code can't be shared with glx anymore because of this.

The model for the mini teapot is restored and I have tested it to work with
linux-fbdev and linux-solo

The driver recognizes 32bpp where there is no alpha (my radeon 7500)  It also
sets the correct number of cmap entrees (instead of 256 which can be an error)
2006-08-18 10:38:15 +00:00
Alan Hourihane
bd87c303e9 Fix writemasks on texture arb fp instructions.
Cleanup invarient state emission.
2006-08-18 09:04:48 +00:00
Brian Paul
c1c282f36a sort the FEATURE_ defines 2006-08-17 14:27:10 +00:00
Brian Paul
9dc90cd5f3 added FEATURE_EXT_timer_query and tests 2006-08-17 14:25:04 +00:00
Brian Paul
5928718475 change #ifdef to #if 2006-08-17 14:16:03 +00:00
Brian Paul
6206aec90a change tex memory allocation calls (debian bug 383209) 2006-08-16 20:53:39 +00:00
Ian Romanick
a7d0256745 When available, which is most of the time, use posix_memalign to implement
_mesa_align_malloc and friends.
2006-08-16 17:06:08 +00:00
Ian Romanick
ab6cf9dd62 Enable support for GL_EXT_gpu_program_parameters for R300. 2006-08-15 16:48:06 +00:00
Ian Romanick
8c41c757fe Add support for GL_EXT_gpu_program_parameters. Any driver that enables
either GL_ARB_vertex_program or GL_ARB_fragment_program should enable this
extension as well.
2006-08-15 16:47:34 +00:00
Ian Romanick
5208d93a41 Add test for GL_EXT_gpu_program_parameters. 2006-08-15 16:44:32 +00:00
Ian Romanick
daea717634 Remove extraneous trailing semicolon. 2006-08-15 16:26:34 +00:00
Brian Paul
37b5b01217 s/GLvoid/void/ to fix gcc 4.2 issue (bug 7875) 2006-08-15 14:28:03 +00:00
Michel Dänzer
061a3fe340 Bug #7169: Attempt to make libGL symbols visible to drivers.
Some applications end up dlopening libGL without RTLD_GLOBAL, so the libGL
symbols referenced by the driver can't be unresolved when libGL dlopens it.
This attempts to make the libGL symbols visible to the driver by dlopening
libGL (again) with RTLD_GLOBAL before dlopening the driver and dlclosing
the obtained handle afterwards.
2006-08-14 15:53:37 +00:00
Aapo Tahkola
24cd8e22f5 gcc-4.1.1 compile fix 2006-08-12 13:31:15 +00:00
Ian Romanick
357addfc45 Add comments explaining a couple "mystery" bits. 2006-08-12 00:11:05 +00:00
Ian Romanick
32a9e9be0c Fix white-space problem in the prototype for glBlitFramebufferEXT that
prevented gl_mangle.h from picking it up.
2006-08-12 00:05:54 +00:00
Ian Romanick
8fbe16d4dd Fix long standing bug that prevented newer drivers from working with
older libGL.  The data in extension_helper.h erroneous instructed
drivers to expect all functions with establised offsets, even those
not in the ABI, to have a specific offset allocated.  This is just
wrong.  A function is either in the ABI and has a set offset or a
function is not in the ABI and has a re-map offset.
2006-08-11 23:56:37 +00:00
Ian Romanick
56f349515c Convert comment header for __GLcontextModesRec to Doxygen style. 2006-08-11 22:26:49 +00:00
Aapo Tahkola
8ff5e37f58 support shorts as vertex data 2006-08-11 13:59:37 +00:00
Eric Anholt
2332812644 Add padding to match the current xf86-video-intel DDX->DRI interface. 2006-08-10 21:26:50 +00:00
Adam Jackson
3775b566fa mkdir -> mkdir -p, since /usr/include might not exist in the installroot yet 2006-08-10 20:24:50 +00:00
Adam Jackson
be85fde82b linux-indirect target fixes. 2006-08-10 20:19:57 +00:00
Brian Paul
b7a661cf8c 6.5.1 relnotes 2006-08-10 14:57:24 +00:00
Brian Paul
795e83f809 latest updates for 6.5.1 2006-08-10 14:54:19 +00:00
Alan Hourihane
a89b099c74 Fixup more PROGRAM_UNDEFINED problems. 2006-08-10 13:14:24 +00:00
Alan Hourihane
8d97265711 Fix some breakage after the PROGRAM_UNDEFINED change 2006-08-10 13:12:00 +00:00
Sean D'Epagnier
7196cddb3a Added initial multisampling support to glfbdev driver.
Fully implemented glutGameMode, and added vidresize stubs to make
Added support for glutReshapeDisplay to change video mode but not lose
current mesa context.
implementation glut 5 complient.
Fixed many minor bugs
Updated docs
2006-08-10 10:21:17 +00:00
Brian Paul
54e15d6585 finish up texstore for SL8 texture format 2006-08-10 04:14:05 +00:00
Michal Krol
7ba08ac45a GLSL 1.20 built-in library. 2006-08-09 21:22:59 +00:00
Michal Krol
edefc658e4 More GLSL code - more support for vec4 operations on x86 back-end. 2006-08-09 20:05:26 +00:00
Eric Anholt
9f344b3e7d Add Intel i965G/Q DRI driver.
This driver comes from Tungsten Graphics, with a few further modifications by
Intel.
2006-08-09 19:14:05 +00:00
Eric Anholt
7b52bed987 Add PROGRAM_FILE_MAX for i965 driver.
While here, make PROGRAM_UNDEFINED just the next value in the enum.
2006-08-09 19:10:23 +00:00
Brian Paul
46f20579a2 implement some of the sRGB texstore functions 2006-08-09 02:42:25 +00:00
Brian Paul
4b1e6a4b58 remove stray text from previous check-in 2006-08-07 14:09:13 +00:00
Sean D'Epagnier
6545ebbd8d Modified config to use glut/fbdev, added demo and sample directories. 2006-08-05 08:55:10 +00:00
Sean D'Epagnier
288d4b6ebe Modularized code into multiple files.
Added gamemode stubs, iconify support, joystick stubs.

Fixed color index mode, added 8 bit alpha blending, enabled cmaps even
with 15, 16, 24, and 32 depths as some fbdev drivers need this.

Fixed compiling with -ansi

Using SIGIO for keyboard input, so that vt switching is enabled even
if the program is locked.

Fixed numerous small bugs.
2006-08-05 08:24:29 +00:00
Brian Paul
0606ad45f6 fix typo, indentation 2006-08-04 22:09:43 +00:00
Karl Schultz
4818b0bea1 export new _mesa_* functions 2006-08-04 19:45:29 +00:00
Brian Paul
5c488dcab2 fix bug when pushing ReadBuffer state for GL_PIXEL_MODE_BIT 2006-08-04 13:41:25 +00:00
Claudio Ciccani
21dc092324 Handle GLUT_DEVICE_KEY_REPEAT,GLUT_OWN_JOYSTICK,GLUT_JOYSTICK_POLL_RATE in glutDeviceGet(). 2006-08-04 12:43:33 +00:00
Claudio Ciccani
3ab2dd9f91 Moved glutDeviceGet() to events.c.
Implemented glutIgnoreKeyRepeat() and glutSetKeyRepeat().
2006-08-04 10:49:43 +00:00
Brian Paul
0a4be70368 more work for GL_EXT_texture_sRGB. 2006-08-04 03:44:53 +00:00
Brian Paul
2eb00b4388 use WRITE_MASK_* instead of 0x1, 0x2, etc 2006-08-03 17:10:45 +00:00
Brian Paul
3163542841 Added a check to prevent rebuilding Mesa with a different configuration
without first doing 'make realclean'.
2006-08-03 16:58:06 +00:00
Brian Paul
9c3876d7d8 New wrapper functions: _mesa_dlopen(), _mesa_dlsym(), _mesa_dlclose().
Eventually move them into imports.c
2006-08-03 03:59:20 +00:00
Brian Paul
6c071592ab added GL_EXT_texture_sRGB 2006-08-03 03:23:05 +00:00
Brian Paul
8d214bc804 Initial work for GL_EXT_texture_sRGB. 2006-08-03 03:20:52 +00:00
Brian Paul
35fe7cfae4 fix link for Aqsis 2006-08-02 21:26:15 +00:00
Michal Krol
b60a3da43f Enable vec4 extension for x86 back-end. 2006-08-02 14:51:24 +00:00
Michal Krol
1616f5b621 Change fragment shader to utilize faster vec4 operations. 2006-08-02 14:46:50 +00:00
Michal Krol
7a70391575 Add test for vec4 extension. 2006-08-02 14:45:24 +00:00
Michal Krol
3b5e02cc7c Add vec4 extension. 2006-08-02 14:44:46 +00:00
Michal Krol
60ba2d88b3 Fix mmFindBlock function. 2006-08-02 14:22:06 +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
1158 changed files with 194336 additions and 130291 deletions

8
.gitignore vendored Normal file
View File

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

View File

@@ -92,6 +92,7 @@ linux-alpha-static \
linux-debug \
linux-directfb \
linux-dri \
linux-dri-debug \
linux-dri-x86 \
linux-dri-x86-64 \
linux-dri-ppc \
@@ -144,34 +145,36 @@ sunos5-v8-static \
sunos5-v9 \
sunos5-v9-static \
ultrix-gcc:
@ if [ -e configs/current ] ; then \
echo "Please run 'make realclean' before changing configs" ; \
exit 1 ; \
fi
(cd configs && rm -f current && ln -s $@ current)
$(MAKE) default
# Rules for making release tarballs
DIRECTORY = Mesa-6.5.1
LIB_NAME = MesaLib-6.5.1
DEMO_NAME = MesaDemos-6.5.1
GLUT_NAME = MesaGLUT-6.5.1
DIRECTORY = Mesa-6.5.2
LIB_NAME = MesaLib-6.5.2
DEMO_NAME = MesaDemos-6.5.2
GLUT_NAME = MesaGLUT-6.5.2
MAIN_FILES = \
$(DIRECTORY)/Makefile* \
$(DIRECTORY)/descrip.mms \
$(DIRECTORY)/mms-config. \
$(DIRECTORY)/bin/mklib \
$(DIRECTORY)/bin/installmesa \
$(DIRECTORY)/bin/minstall \
$(DIRECTORY)/configs/[a-z]* \
$(DIRECTORY)/docs/*.html \
$(DIRECTORY)/docs/COPYING \
$(DIRECTORY)/docs/README.* \
$(DIRECTORY)/docs/RELNOTES* \
$(DIRECTORY)/docs/VERSIONS \
$(DIRECTORY)/docs/*.spec \
$(DIRECTORY)/include/GL/internal/glcore.h \
$(DIRECTORY)/include/GL/amesa.h \
$(DIRECTORY)/include/GL/dmesa.h \
$(DIRECTORY)/include/GL/directfbgl.h \
$(DIRECTORY)/include/GL/fxmesa.h \
$(DIRECTORY)/include/GL/ggimesa.h \
$(DIRECTORY)/include/GL/gl.h \
@@ -202,25 +205,35 @@ MAIN_FILES = \
$(DIRECTORY)/src/mesa/depend \
$(DIRECTORY)/src/mesa/main/*.[chS] \
$(DIRECTORY)/src/mesa/main/descrip.mms \
$(DIRECTORY)/src/mesa/main/sources \
$(DIRECTORY)/src/mesa/glapi/*.[chS] \
$(DIRECTORY)/src/mesa/glapi/descrip.mms \
$(DIRECTORY)/src/mesa/glapi/sources \
$(DIRECTORY)/src/mesa/array_cache/*.[ch] \
$(DIRECTORY)/src/mesa/array_cache/descrip.mms \
$(DIRECTORY)/src/mesa/array_cache/sources \
$(DIRECTORY)/src/mesa/math/*.[ch] \
$(DIRECTORY)/src/mesa/math/descrip.mms \
$(DIRECTORY)/src/mesa/math/sources \
$(DIRECTORY)/src/mesa/shader/*.[ch] \
$(DIRECTORY)/src/mesa/shader/descrip.mms \
$(DIRECTORY)/src/mesa/shader/sources \
$(DIRECTORY)/src/mesa/shader/grammar/*.[ch] \
$(DIRECTORY)/src/mesa/shader/grammar/descrip.mms \
$(DIRECTORY)/src/mesa/shader/grammar/sources \
$(DIRECTORY)/src/mesa/shader/slang/*.[ch] \
$(DIRECTORY)/src/mesa/shader/slang/descrip.mms \
$(DIRECTORY)/src/mesa/shader/slang/sources \
$(DIRECTORY)/src/mesa/shader/slang/library/*.[ch] \
$(DIRECTORY)/src/mesa/swrast/*.[ch] \
$(DIRECTORY)/src/mesa/swrast/descrip.mms \
$(DIRECTORY)/src/mesa/swrast/sources \
$(DIRECTORY)/src/mesa/swrast_setup/*.[ch] \
$(DIRECTORY)/src/mesa/swrast_setup/descrip.mms \
$(DIRECTORY)/src/mesa/swrast_setup/sources \
$(DIRECTORY)/src/mesa/tnl/*.[chS] \
$(DIRECTORY)/src/mesa/tnl/descrip.mms \
$(DIRECTORY)/src/mesa/tnl/sources \
$(DIRECTORY)/src/mesa/tnl_dd/*.[ch] \
$(DIRECTORY)/src/mesa/tnl_dd/imm/*.[ch] \
$(DIRECTORY)/src/mesa/tnl_dd/imm/NOTES.imm \
@@ -228,6 +241,7 @@ MAIN_FILES = \
$(DIRECTORY)/src/mesa/drivers/beos/Makefile \
$(DIRECTORY)/src/mesa/drivers/common/*.[ch] \
$(DIRECTORY)/src/mesa/drivers/common/descrip.mms \
$(DIRECTORY)/src/mesa/drivers/common/sources \
$(DIRECTORY)/src/mesa/drivers/directfb/*.[ch] \
$(DIRECTORY)/src/mesa/drivers/directfb/Makefile \
$(DIRECTORY)/src/mesa/drivers/dos/*.[chS] \
@@ -248,6 +262,7 @@ MAIN_FILES = \
$(DIRECTORY)/src/mesa/drivers/windows/*/*.[ch] \
$(DIRECTORY)/src/mesa/drivers/windows/*/*.def \
$(DIRECTORY)/src/mesa/drivers/x11/descrip.mms \
$(DIRECTORY)/src/mesa/drivers/x11/sources \
$(DIRECTORY)/src/mesa/drivers/x11/*.[ch] \
$(DIRECTORY)/src/mesa/ppc/*.[ch] \
$(DIRECTORY)/src/mesa/sparc/*.[chS] \
@@ -377,8 +392,8 @@ GLUT_FILES = \
$(DIRECTORY)/src/glut/ggi/*.[ch] \
$(DIRECTORY)/src/glut/ggi/Makefile \
$(DIRECTORY)/src/glut/fbdev/Makefile \
$(DIRECTORY)/src/glut/fbdev/cursors.h \
$(DIRECTORY)/src/glut/fbdev/glut_fbdev.c \
$(DIRECTORY)/src/glut/fbdev/*[ch] \
$(DIRECTORY)/src/glut/mini/*[ch] \
$(DIRECTORY)/windows/VC6/progs/glut/glut.dsp \
$(DIRECTORY)/windows/VC7/progs/glut/glut.vcproj

View File

@@ -62,10 +62,10 @@ fi
set -v
mkdir ${INCLUDE_DIR}
mkdir ${INCLUDE_DIR}/GL
# NOT YET: mkdir ${INCLUDE_DIR}/GLES
mkdir ${LIB_DIR}
mkdir -p ${INCLUDE_DIR}
mkdir -p ${INCLUDE_DIR}/GL
# NOT YET: mkdir -p ${INCLUDE_DIR}/GLES
mkdir -p ${LIB_DIR}
cp -f ${TOP}/include/GL/*.h ${INCLUDE_DIR}/GL
cp -f ${TOP}/src/glw/*.h ${INCLUDE_DIR}/GL
# NOT YET: cp -f ${TOP}/include/GLES/*.h ${INCLUDE_DIR}/GLES

89
bin/minstall Executable file
View File

@@ -0,0 +1,89 @@
#!/bin/sh
# A minimal replacement for 'install' that supports installing symbolic links.
# Only a limited number of options are supported:
# -d dir Create a directory
# -m mode Sets a file's mode when installing
# If these commands aren't portable, we'll need some "if (arch)" type stuff
SYMLINK="ln -s"
MKDIR="mkdir -p"
RM="rm -f"
MODE=""
if [ "$1" = "-d" ] ; then
# make a directory path
$MKDIR "$2"
exit 0
fi
if [ "$1" = "-m" ] ; then
# set file mode
MODE=$2
shift 2
fi
# install file(s) into destination
if [ $# -ge 2 ] ; then
# Last cmd line arg is the dest dir
for FILE in $@ ; do
DEST="$FILE"
done
# Loop over args, moving them to DEST directory
I=1
for FILE in $@ ; do
if [ $I = $# ] ; then
# stop, don't want to install $DEST into $DEST
exit 0
fi
# determine file's type
if [ -h "$FILE" ] ; then
#echo $FILE is a symlink
# Unfortunately, cp -d isn't universal so we have to
# use a work-around.
# Use ls -l to find the target that the link points to
LL=`ls -l "$FILE"`
for L in $LL ; do
TARGET=$L
done
#echo $FILE is a symlink pointing to $TARGET
FILE=`basename "$FILE"`
# Go to $DEST and make the link
PWDSAVE="$PWD"
cd "$DEST" # pushd
$RM "$FILE"
$SYMLINK "$TARGET" "$FILE"
cd "$PWDSAVE" # popd
elif [ -f "$FILE" ] ; then
#echo "$FILE" is a regular file
$RM "$DEST/`basename $FILE`"
cp "$FILE" "$DEST"
if [ $MODE ] ; then
FILE=`basename "$FILE"`
chmod $MODE "$DEST/$FILE"
fi
else
echo "Unknown type of argument: " "$FILE"
exit 1
fi
I=`expr $I + 1`
done
exit 0
fi
# If we get here, we didn't find anything to do
echo "Usage:"
echo " install -d dir Create named directory"
echo " install [-m mode] file [...] dest Install files in destination"

View File

@@ -283,7 +283,9 @@ case $ARCH in
ar -ruv ${LIBNAME} ${OBJECTS}
FINAL_LIBS=${LIBNAME}
else
LIBNAME="lib${LIBNAME}.so"
if [ $NOPREFIX = 0 ] ; then
LIBNAME="lib${LIBNAME}.so"
fi
echo "mklib: Making SunOS shared library: " ${LIBNAME}
if [ "x$LINK" = "x" ] ; then
@@ -333,9 +335,14 @@ case $ARCH in
# for debug:
#echo "mklib: linker is" ${LINK} ${OPTS}
rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
${LINK} ${OPTS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
ln -s ${LIBNAME}.${MAJOR} ${LIBNAME}
if [ $NOPREFIX = 1 ] ; then
rm -f ${LIBNAME}
${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
else
rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
${LINK} ${OPTS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
ln -s ${LIBNAME}.${MAJOR} ${LIBNAME}
fi
FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}"
fi
;;

1
configs/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
current

View File

@@ -13,7 +13,6 @@ CXXFLAGS = -O -DAIXV3 -DPTHREADS
# Misc tools and flags
MKLIB_OPTIONS =
COPY_LIBS = cp -f -h
# Library names (actual file names)
GL_LIB_NAME = libGL.a

View File

@@ -10,7 +10,7 @@ CONFIG_NAME = default
# Version info
MESA_MAJOR=6
MESA_MINOR=5
MESA_TINY=1
MESA_TINY=2
# external projects. This should be useless now that we use libdrm.
DRM_SOURCE_PATH=$(TOP)/../drm
@@ -27,8 +27,7 @@ MKLIB_OPTIONS =
MKDEP = makedepend
MKDEP_OPTIONS = -fdepend
MAKE = make
INSTALL = install
COPY_LIBS = cp -f -d
INSTALL = $(TOP)/bin/minstall
# Python and flags (generally only needed by the developers)
PYTHON2 = python
@@ -68,7 +67,7 @@ PROGRAM_DIRS = demos redbook samples xdemos
# Library/program dependencies
EXTRA_LIB_PATH ?=
#EXTRA_LIB_PATH ?=
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm

View File

@@ -9,13 +9,11 @@ CC = cc
CXX = c++
MAKE = gmake
# cp -d not supported on FreeBSD (see bug 4435)
COPY_LIBS = cp -f
OPT_FLAGS = -O2
PIC_FLAGS = -fPIC
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -DUSE_XSHM -DHZ=100
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -DUSE_XSHM \
-DHZ=100 -DHAVE_POSIX_MEMALIGN
X11_INCLUDES = -I/usr/X11R6/include

View File

@@ -14,22 +14,25 @@ OPT_FLAGS = -O
EXPAT_INCLUDES = -I/usr/local/include
X11_INCLUDES = -I/usr/X11R6/include
DEFINES = -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
-DGLX_DIRECT_RENDERING -DHAVE_ALIAS
-DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \
-DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN
CFLAGS = -Wmissing-prototypes -g -std=c99 -Wundef -fPIC -ffast-math \
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) -Wmissing-prototypes -std=c99 -Wundef -ffast-math \
$(ASM_FLAGS) $(X11_INCLUDES) $(DEFINES)
CXXFLAGS = $(DEFINES) -Wall -g -ansi -pedantic -fPIC
CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES) -Wall -ansi -pedantic $(ASM_FLAGS) $(X11_INCLUDES)
ASM_SOURCES =
# Library/program dependencies
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 -lXm -lX11
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/X11R6/lib -lGL -lXt -lX11
# Directories
@@ -42,6 +45,6 @@ DRM_SOURCE_PATH=$(TOP)/../drm
# ffb and gamma are missing because they have not been converted to use the new
# interface.
DRI_DIRS = i810 i915 mach64 mga r128 r200 r300 radeon tdfx \
DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon tdfx \
unichrome savage sis

View File

@@ -8,7 +8,7 @@ CONFIG_NAME = hpux10
CC = cc
CXX = aCC
CFLAGS = +O3 +DAportable +z -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
CXXFLAGS = +O3 +DAportable +Z -Aa -D_HPUX_SOURCE
CFLAGS = -O +DAportable +z -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
CXXFLAGS = -O +DAportable +Z -Ae -D_HPUX_SOURCE
APP_LIB_DEPS = -$(TOP)/$(LIB_DIR) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm

View File

@@ -8,8 +8,8 @@ CONFIG_NAME = hpux10-static
CC = cc
CXX = aCC
CFLAGS = +O3 +DAportable +z -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
CXXFLAGS = +O3 +DAportable +Z -Aa -D_HPUX_SOURCE
CFLAGS = -O +DAportable +z -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
CXXFLAGS = -O +DAportable +Z -Ae -D_HPUX_SOURCE
MKLIB_OPTIONS = -static

View File

@@ -8,9 +8,9 @@ CONFIG_NAME = hpux11-32
CC = cc
CXX = aCC
CFLAGS = +z -Ae +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CFLAGS = +z -Ae -O +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CXXFLAGS = +z -Aa +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
CXXFLAGS = +z -Ae -O +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
MKLIB_OPTIONS =

View File

@@ -8,9 +8,9 @@ CONFIG_NAME = hpux11-32-static
CC = cc
CXX = aCC
CFLAGS = +O3 +DA2.0 -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CFLAGS = -O +DA2.0 -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CXXFLAGS = +O3 +DA2.0 -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
CXXFLAGS = -O +DA2.0 -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
MKLIB_OPTIONS = -static

View File

@@ -8,9 +8,9 @@ CONFIG_NAME = hpux11-32-static
CC = cc
CXX = aCC
CFLAGS = +O3 +DA2.0 -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
CFLAGS = -O +DA2.0 -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
CXXFLAGS = +O3 +DA2.0 -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include
CXXFLAGS = -O +DA2.0 -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include
MKLIB_OPTIONS = -static

View File

@@ -8,9 +8,9 @@ CONFIG_NAME = hpux11-64
CC = cc
CXX = aCC
CFLAGS = +z -Ae +DD64 +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CFLAGS = +z -Ae +DD64 -O +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CXXFLAGS = +z -Aa +DD64 +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
CXXFLAGS = +z -Ae +DD64 -O +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
MKLIB_OPTIONS =

View File

@@ -8,9 +8,9 @@ CONFIG_NAME = hpux11-64-static
CC = cc
CXX = aCC
CFLAGS = +O3 +DA2.0W -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CFLAGS = -O +DA2.0W -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CXXFLAGS = +O3 +DA2.0W -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
CXXFLAGS = -O +DA2.0W -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
MKLIB_OPTIONS = -static

View File

@@ -8,9 +8,9 @@ CONFIG_NAME = hpux11-ia64
CC = cc
CXX = aCC
CFLAGS = +z -Ae +DD64 +O3 +DSmckinley -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CFLAGS = +z -Ae +DD64 -O +DSmckinley -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CXXFLAGS = +z -Aa +DD64 +O3 +DSmckinley -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
CXXFLAGS = +z -Ae +DD64 -O +DSmckinley -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
MKLIB_OPTIONS =

View File

@@ -8,9 +8,9 @@ CONFIG_NAME = hpux11-ia64-static
CC = cc
CXX = aCC
CFLAGS = +O3 +DD64 -Aa -D_HPUX_SOURCE +DSmckinley -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CFLAGS = -O +DD64 -Ae -D_HPUX_SOURCE +DSmckinley -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CXXFLAGS = +O3 +DD64 -Aa -D_HPUX_SOURCE +DSmckinley -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
CXXFLAGS = -O +DD64 -Ae -D_HPUX_SOURCE +DSmckinley -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
MKLIB_OPTIONS = -static

View File

@@ -9,8 +9,8 @@ CC = cc
# XXX fix this
CXX = c++
CFLAGS = +z +O3 +Olibcalls +ESlit -Aa +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R5 -DUSE_XSHM
CXXFLAGS = +z +O3 +Olibcalls +ESlit -Aa +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R5
CFLAGS = +z -O +Olibcalls +ESlit -Ae +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R5 -DUSE_XSHM
CXXFLAGS = +z -O +Olibcalls +ESlit -Ae +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R5
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/lib/X11R5 -s -Wl,+s,-B,nonfatal,-B,immediate -lXext -lXmu -lXi -lX11 -lm

View File

@@ -8,7 +8,7 @@ CONFIG_NAME = hpux9-gcc
CC = cc
CXX = aCC
CFLAGS = +O3 +DAportable +z -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
CXXFLAGS = +O3 +DAportable +Z -Aa -D_HPUX_SOURCE
CFLAGS = -O +DAportable +z -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
CXXFLAGS = -O +DAportable +Z -Ae -D_HPUX_SOURCE
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm

View File

@@ -17,7 +17,8 @@ PIC_FLAGS = -fPIC
ARCH_FLAGS ?=
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
-D_BSD_SOURCE -DPTHREADS -DUSE_XSHM
-D_BSD_SOURCE -D_GNU_SOURCE \
-DPTHREADS -DUSE_XSHM -DHAVE_POSIX_MEMALIGN
X11_INCLUDES = -I/usr/X11R6/include

View File

@@ -22,7 +22,8 @@ ARCH_FLAGS ?=
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
-D_BSD_SOURCE -D_GNU_SOURCE \
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
-DGLX_DIRECT_RENDERING -DHAVE_ALIAS
-DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \
-DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN
X11_INCLUDES = -I/usr/X11R6/include
@@ -37,9 +38,11 @@ ASM_SOURCES =
# Library/program dependencies
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)
@@ -63,5 +66,5 @@ WINDOW_SYSTEM=dri
# gamma are missing because they have not been converted to use the new
# interface.
DRI_DIRS = i810 i915 mach64 mga r128 r200 r300 radeon s3v \
savage sis tdfx trident unichrome ffb
DRI_DIRS = i810 i915tex i915 i965 mach64 mga r128 r200 r300 radeon s3v \
savage sis tdfx trident unichrome ffb nouveau

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

@@ -20,5 +20,5 @@ EXTRA_LIB_PATH=-L/usr/X11R6/lib64
# the new interface. i810 are missing because there is no x86-64
# system where they could *ever* be used.
#
DRI_DIRS = i915 mach64 mga r128 r200 radeon tdfx unichrome savage r300
DRI_DIRS = i915tex i915 i965 mach64 mga r128 r200 radeon tdfx unichrome savage r300

View File

@@ -22,9 +22,9 @@ ARCH_FLAGS ?=
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
-D_BSD_SOURCE -D_GNU_SOURCE \
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
-DGLX_DIRECT_RENDERING -DHAVE_ALIAS -DUSE_XCB
-DGLX_DIRECT_RENDERING -DHAVE_ALIAS -DUSE_XCB -DHAVE_POSIX_MEMALIGN
X11_INCLUDES = `pkg-config --cflags-only-I x11` `pkg-config --cflags-only-I xcb` `pkg-config --cflags-only-I xcb-glx`
X11_INCLUDES = `pkg-config --cflags-only-I x11` `pkg-config --cflags-only-I xcb` `pkg-config --cflags-only-I x11-xcb` `pkg-config --cflags-only-I xcb-glx`
CFLAGS = -Wall -Wmissing-prototypes $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \
$(DEFINES) $(ASM_FLAGS) -std=c99 -ffast-math
@@ -37,10 +37,11 @@ ASM_SOURCES =
# Library/program dependencies
EXTRA_LIB_PATH=`pkg-config --libs-only-L x11`
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 \
$(LIBDRM_LIB) `pkg-config --libs xcb` `pkg-config --libs xcb-glx`
$(LIBDRM_LIB) `pkg-config --libs xcb` `pkg-config --libs x11-xcb` `pkg-config --libs xcb-glx`
# This is now 0 by default since it seems to confuse the hell out of people

View File

@@ -3,8 +3,14 @@
include $(TOP)/configs/linux
CONFIG_NAME = linux-fbdev
DRIVER_DIRS = fbdev
CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -DUSE_GLFBDEV_DRIVER
CFLAGS = -O3 -ffast-math -ansi -pedantic -fPIC -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS -DUSE_GLFBDEV_DRIVER
SRC_DIRS = mesa glu glut/fbdev
DRIVER_DIRS = fbdev osmesa
PROGRAM_DIRS = fbdev demos redbook samples
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread
OSMESA_LIB_DEPS = -lm -lpthread
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lgpm -lm
PROGRAM_DIRS = fbdev

View File

@@ -23,7 +23,8 @@ ARCH_FLAGS ?=
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
-D_BSD_SOURCE -D_GNU_SOURCE \
-DPTHREADS -DHAVE_ALIAS
-DGLX_INDIRECT_RENDERING \
-DPTHREADS -DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN
X11_INCLUDES = -I/usr/X11R6/include

View File

@@ -16,7 +16,7 @@ PIC_FLAGS = -fPIC
ARCH_FLAGS ?=
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
-D_BSD_SOURCE -D_GNU_SOURCE \
-D_BSD_SOURCE -D_GNU_SOURCE -DHAVE_POSIX_MEMALIGN \
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DDRM_USE_MALLOC -DIN_DRI_DRIVER
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \

View File

@@ -1,30 +1,9 @@
# Configuration for Linux on Sparc
include $(TOP)/configs/default
include $(TOP)/configs/linux
CONFIG_NAME = linux-sparc
# Compiler and flags
CC = gcc
CXX = g++
WARN_FLAGS = -Wall
OPT_FLAGS = -O2
PIC_FLAGS = -fPIC
DEFINES = -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM
X11_INCLUDES = -I/usr/X11R6/include
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
$(ASM_FLAGS) -std=c99 -ffast-math
CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
GLUT_CFLAGS = -fexceptions
EXTRA_LIB_PATH=-L/usr/X11R6/lib
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11
#ASM_FLAGS = -DUSE_SPARC_ASM
#ASM_SOURCES = $(SPARC_SOURCES)
#ASM_API = $(SPARC_API)

View File

@@ -1,17 +1,7 @@
# Configuration for Linux on Sparc5
include $(TOP)/configs/default
include $(TOP)/configs/linux-sparc
CONFIG_NAME = linux-sparc5
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -mcpu=ultrasparc -O2 -ffast-math -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM
CXXFLAGS = -mcpu=ultrasparc -O2 -ffast-math -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE
GLUT_CFLAGS = -fexceptions
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
ARCH_FLAGS += -mcpu=ultrasparc

View File

@@ -19,3 +19,8 @@ OSMESA_LIB_DEPS =
GLU_LIB_DEPS =
GLUT_LIB_DEPS =
GLW_LIB_DEPS =
# Need to specify all libraries we may need
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm \
-L/usr/X11R6/lib/ -lX11 -lXmu -lXi -lpthread

View File

@@ -1,17 +1,7 @@
# Configuration for Linux on UltraSparc
include $(TOP)/configs/default
include $(TOP)/configs/linux-sparc
CONFIG_NAME = linux-ultrasparc
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -mv8 -O2 -mtune=ultrasparc -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM
CXXFLAGS = -mv8 -O2 -mtune=ultrasparc -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE
GLUT_CFLAGS = -fexceptions
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR)-l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
ARCH_FLAGS += -mv8 -mtune=ultrasparc

View File

@@ -19,4 +19,4 @@ all :
$(MMS)$(MMSQUALIFIERS)
set default [-.xdemos]
$(MMS)$(MMSQUALIFIERS)
if f$search("[-]test.DIR") .nes. "" then pipe set default [-.test] ; $(MMS)$(MMSQUALIFIERS)
if f$search("[-]tests.DIR") .nes. "" then pipe set default [-.tests] ; $(MMS)$(MMSQUALIFIERS)

View File

@@ -6,7 +6,7 @@ Requirements
============
To build Mesa with DirectFB (DirectFBGL) support you need:
- DirectFB at least 0.9.21 (http://directfb.org)
- DirectFB at least 1.0.0 (http://directfb.org)
- pkg-config at least 0.9 (http://pkgconfig.sf.net)

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

@@ -1471,14 +1471,21 @@ Mesa Version History
- paletted texturing was broken w/ floating point palettes (K. Schultz)
- lots of assorted framebuffer object bug fixes
6.5.1 month, day, 2006
6.5.1 August 31, 2006
New:
- Intel i965 DRI driver
- GL_APPLE_vertex_array_object extension (Ian Romanick)
- GL_EXT_texture_sRGB extension
- GL_EXT_gpu_program_parameters (Ian Romanick)
- "engine" demo
- updated fbdev driver and GLUT for fbdev (Sean D'Epagnier)
- many updates to the DRI drivers
Changes:
- The glVertexAttribARB functions no longer alias the conventional
vertex attributes.
- glxinfo program prints more info with -l option
- GL_FRAGMENT_PROGRAM_NV and GL_FRAGMENT_PROGRAM_ARB are now
compatible, in terms of glBindProgramARB()
Bug fixes:
- fixed broken texture border handling for depth textures (bug 6498)
- removed the test for duplicated framebuffer attachments, per
@@ -1498,3 +1505,10 @@ Mesa Version History
- 'normalized' parameter to glVertexAttribPointerARB didn't work
- disable bogus GLX_SGI_video_sync extension in xlib driver
- fixed R128 driver locking bug (Martijn van Oosterhout)
- using evaluators with vertex programs caused crashes (bug 7564)
- fragment.position wasn't set correctly for point/line primitives
- fixed parser bug for scalar sources for GL_NV_fragment_program
- max fragment program length was incorrectly 128, now 1024
- writes to result.depth in fragment programs weren't clamped to [0,1]
- fixed potential dangling pointer bug in glBindProgram()
- fixed some memory leaks (and potential crashes) in Xlib driver

View File

@@ -28,7 +28,6 @@ a:visited {
<li><a href="systems.html" target="MainFrame">Platforms and Drivers</a>
<li><a href="license.html" target="MainFrame">License & Copyright</a>
<li><a href="faq.html" target="MainFrame">FAQ</a>
<li><a href="VERSIONS" target="MainFrame">Version History</a>
<li><a href="relnotes.html" target="MainFrame">Release Notes</a>
<li><a href="thanks.html" target="MainFrame">Acknowledgements</a>
<li><a href="conform.html" target="MainFrame">Conformance Testing</a>
@@ -64,8 +63,8 @@ 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="shading.html" target="MainFrame">Shading Language</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>
@@ -74,6 +73,7 @@ a:visited {
<li><a href="fbdev-dri.html" target="MainFrame">fbdev/DRI Environment</a>
<li><a href="glfbdev-driver.html" target="MainFrame">glFBDev Driver</a>
<LI><A HREF="custom.html" target="MainFrame">Custom Development</A>
<LI><A HREF="dispatch.html" target="MainFrame">GL Dispatch</A>
</ul>
<b>Links</b>

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

@@ -34,11 +34,15 @@ To add a new GL extension to Mesa you have to do at least the following.
corresponding Python scripts.
</li>
<li>
Find an existing extension that's similar to the new one and search
the sources for code related to that extension.
Implement new code as needed.
In general, new state variables will be added to mtypes.h. If the
extension is rather large, try to implement it in a new source file.
Add a new entry to the <code>gl_extensions</code> struct in mtypes.h
</li>
<li>
Update the <code>extensions.c</code> file.
</li>
<li>
From this point, the best way to proceed is to find another extension,
similar to the new one, that's already implemented in Mesa and use it
as an example.
</li>
<li>
If the new extension adds new GL state, the functions in get.c, enable.c

274
docs/dispatch.html Normal file
View File

@@ -0,0 +1,274 @@
<HTML>
<HEAD>
<TITLE>GL Dispatch in Mesa</TITLE>
<LINK REL="stylesheet" TYPE="text/css" HREF="mesa.css">
</HEAD>
<BODY>
<H1>GL Dispatch in Mesa</H1>
<p>Several factors combine to make efficient dispatch of OpenGL functions
fairly complicated. This document attempts to explain some of the issues
and introduce the reader to Mesa's implementation. Readers already familiar
with the issues around GL dispatch can safely skip ahead to the <A
HREF="#overview">overview of Mesa's implementation</A>.</p>
<H2>1. Complexity of GL Dispatch</H2>
<p>Every GL application has at least one object called a GL <em>context</em>.
This object, which is an implicit parameter to ever GL function, stores all
of the GL related state for the application. Every texture, every buffer
object, every enable, and much, much more is stored in the context. Since
an application can have more than one context, the context to be used is
selected by a window-system dependent function such as
<tt>glXMakeContextCurrent</tt>.</p>
<p>In environments that implement OpenGL with X-Windows using GLX, every GL
function, including the pointers returned by <tt>glXGetProcAddress</tt>, are
<em>context independent</em>. This means that no matter what context is
currently active, the same <tt>glVertex3fv</tt> function is used.</p>
<p>This creates the first bit of dispatch complexity. An application can
have two GL contexts. One context is a direct rendering context where
function calls are routed directly to a driver loaded within the
application's address space. The other context is an indirect rendering
context where function calls are converted to GLX protocol and sent to a
server. The same <tt>glVertex3fv</tt> has to do the right thing depending
on which context is current.</p>
<p>Highly optimized drivers or GLX protocol implementations may want to
change the behavior of GL functions depending on current state. For
example, <tt>glFogCoordf</tt> may operate differently depending on whether
or not fog is enabled.</p>
<p>In multi-threaded environments, it is possible for each thread to have a
differnt GL context current. This means that poor old <tt>glVertex3fv</tt>
has to know which GL context is current in the thread where it is being
called.</p>
<A NAME="overview"/>
<H2>2. Overview of Mesa's Implementation</H2>
<p>Mesa uses two per-thread pointers. The first pointer stores the address
of the context current in the thread, and the second pointer stores the
address of the <em>dispatch table</em> associated with that context. The
dispatch table stores pointers to functions that actually implement
specific GL functions. Each time a new context is made current in a thread,
these pointers a updated.</p>
<p>The implementation of functions such as <tt>glVertex3fv</tt> becomes
conceptually simple:</p>
<ul>
<li>Fetch the current dispatch table pointer.</li>
<li>Fetch the pointer to the real <tt>glVertex3fv</tt> function from the
table.</li>
<li>Call the real function.</li>
</ul>
<p>This can be implemented in just a few lines of C code. The file
<tt>src/mesa/glapi/glapitemp.h</tt> contains code very similar to this.</p>
<blockquote>
<table border="1">
<tr><td><pre>
void glVertex3f(GLfloat x, GLfloat y, GLfloat z)
{
const struct _glapi_table * const dispatch = GET_DISPATCH();
(*dispatch-&gt;Vertex3f)(x, y, z);
}</pre></td></tr>
<tr><td>Sample dispatch function</td></tr></table>
</blockquote>
<p>The problem with this simple implementation is the large amount of
overhead that it adds to every GL function call.</p>
<p>In a multithreaded environment, a niave implementation of
<tt>GET_DISPATCH</tt> involves a call to <tt>pthread_getspecific</tt> or a
similar function. Mesa provides a wrapper function called
<tt>_glapi_get_dispatch</tt> that is used by default.</p>
<H2>3. Optimizations</H2>
<p>A number of optimizations have been made over the years to diminish the
performance hit imposed by GL dispatch. This section describes these
optimizations. The benefits of each optimization and the situations where
each can or cannot be used are listed.</p>
<H3>3.1. Dual dispatch table pointers</H3>
<p>The vast majority of OpenGL applications use the API in a single threaded
manner. That is, the application has only one thread that makes calls into
the GL. In these cases, not only do the calls to
<tt>pthread_getspecific</tt> hurt performance, but they are completely
unnecessary! It is possible to detect this common case and avoid these
calls.</p>
<p>Each time a new dispatch table is set, Mesa examines and records the ID
of the executing thread. If the same thread ID is always seen, Mesa knows
that the application is, from OpenGL's point of view, single threaded.</p>
<p>As long as an application is single threaded, Mesa stores a pointer to
the dispatch table in a global variable called <tt>_glapi_Dispatch</tt>.
The pointer is also stored in a per-thread location via
<tt>pthread_setspecific</tt>. When Mesa detects that an application has
become multithreaded, <tt>NULL</tt> is stored in <tt>_glapi_Dispatch</tt>.</p>
<p>Using this simple mechanism the dispatch functions can detect the
multithreaded case by comparing <tt>_glapi_Dispatch</tt> to <tt>NULL</tt>.
The resulting implementation of <tt>GET_DISPATCH</tt> is slightly more
complex, but it avoids the expensive <tt>pthread_getspecific</tt> call in
the common case.</p>
<blockquote>
<table border="1">
<tr><td><pre>
#define GET_DISPATCH() \
(_glapi_Dispatch != NULL) \
? _glapi_Dispatch : pthread_getspecific(&_glapi_Dispatch_key)
</pre></td></tr>
<tr><td>Improved <tt>GET_DISPATCH</tt> Implementation</td></tr></table>
</blockquote>
<H3>3.2. ELF TLS</H3>
<p>Starting with the 2.4.20 Linux kernel, each thread is allocated an area
of per-thread, global storage. Variables can be put in this area using some
extensions to GCC. By storing the dispatch table pointer in this area, the
expensive call to <tt>pthread_getspecific</tt> and the test of
<tt>_glapi_Dispatch</tt> can be avoided.</p>
<p>The dispatch table pointer is stored in a new variable called
<tt>_glapi_tls_Dispatch</tt>. A new variable name is used so that a single
libGL can implement both interfaces. This allows the libGL to operate with
direct rendering drivers that use either interface. Once the pointer is
properly declared, <tt>GET_DISPACH</tt> becomes a simple variable
reference.</p>
<blockquote>
<table border="1">
<tr><td><pre>
extern __thread struct _glapi_table *_glapi_tls_Dispatch
__attribute__((tls_model("initial-exec")));
#define GET_DISPATCH() _glapi_tls_Dispatch
</pre></td></tr>
<tr><td>TLS <tt>GET_DISPATCH</tt> Implementation</td></tr></table>
</blockquote>
<p>Use of this path is controlled by the preprocessor define
<tt>GLX_USE_TLS</tt>. Any platform capable of using TLS should use this as
the default dispatch method.</p>
<H3>3.3. Assembly Language Dispatch Stubs</H3>
<p>Many platforms has difficulty properly optimizing the tail-call in the
dispatch stubs. Platforms like x86 that pass parameters on the stack seem
to have even more difficulty optimizing these routines. All of the dispatch
routines are very short, and it is trivial to create optimal assembly
language versions. The amount of optimization provided by using assembly
stubs varies from platform to platform and application to application.
However, by using the assembly stubs, many platforms can use an additional
space optimization (see <A HREF="#fixedsize">below</A>).</p>
<p>The biggest hurdle to creating assembly stubs is handling the various
ways that the dispatch table pointer can be accessed. There are four
different methods that can be used:</p>
<ol>
<li>Using <tt>_glapi_Dispatch</tt> directly in builds for non-multithreaded
environments.</li>
<li>Using <tt>_glapi_Dispatch</tt> and <tt>_glapi_get_dispatch</tt> in
multithreaded environments.</li>
<li>Using <tt>_glapi_Dispatch</tt> and <tt>pthread_getspecific</tt> in
multithreaded environments.</li>
<li>Using <tt>_glapi_tls_Dispatch</tt> directly in TLS enabled
multithreaded environments.</li>
</ol>
<p>People wishing to implement assembly stubs for new platforms should focus
on #4 if the new platform supports TLS. Otherwise, implement #2 followed by
#3. Environments that do not support multithreading are uncommon and not
terribly relevant.</p>
<p>Selection of the dispatch table pointer access method is controlled by a
few preprocessor defines.</p>
<ul>
<li>If <tt>GLX_USE_TLS</tt> is defined, method #4 is used.</li>
<li>If <tt>PTHREADS</tt> is defined, method #3 is used.</li>
<li>If any of <tt>PTHREADS</tt>, <tt>USE_XTHREADS</tt>,
<tt>SOLARIS_THREADS</tt>, <tt>WIN32_THREADS</tt>, or <tt>BEOS_THREADS</tt>
is defined, method #2 is used.</li>
<li>If none of the preceeding are defined, method #1 is used.</li>
</ul>
<p>Two different techniques are used to handle the various different cases.
On x86 and SPARC, a macro called <tt>GL_STUB</tt> is used. In the preamble
of the assembly source file different implementations of the macro are
selected based on the defined preprocessor variables. The assmebly code
then consists of a series of invocations of the macros such as:
<blockquote>
<table border="1">
<tr><td><pre>
GL_STUB(Color3fv, _gloffset_Color3fv)
</pre></td></tr>
<tr><td>SPARC Assembly Implementation of <tt>glColor3fv</tt></td></tr></table>
</blockquote>
<p>The benefit of this technique is that changes to the calling pattern
(i.e., addition of a new dispatch table pointer access method) require fewer
changed lines in the assembly code.</p>
<p>However, this technique can only be used on platforms where the function
implementation does not change based on the parameters passed to the
function. For example, since x86 passes all parameters on the stack, no
additional code is needed to save and restore function parameters around a
call to <tt>pthread_getspecific</tt>. Since x86-64 passes parameters in
registers, varying amounts of code needs to be inserted around the call to
<tt>pthread_getspecific</tt> to save and restore the GL function's
parameters.</p>
<p>The other technique, used by platforms like x86-64 that cannot use the
first technique, is to insert <tt>#ifdef</tt> within the assembly
implementation of each function. This makes the assembly file considerably
larger (e.g., 29,332 lines for <tt>glapi_x86-64.S</tt> versus 1,155 lines for
<tt>glapi_x86.S</tt>) and causes simple changes to the function
implementation to generate many lines of diffs. Since the assmebly files
are typically generated by scripts (see <A HREF="#autogen">below</A>), this
isn't a significant problem.</p>
<p>Once a new assembly file is created, it must be inserted in the build
system. There are two steps to this. The file must first be added to
<tt>src/mesa/sources</tt>. That gets the file built and linked. The second
step is to add the correct <tt>#ifdef</tt> magic to
<tt>src/mesa/main/dispatch.c</tt> to prevent the C version of the dispatch
functions from being built.</p>
<A NAME="fixedsize"/>
<H3>3.4. Fixed-Length Dispatch Stubs</H3>
<p>To implement <tt>glXGetProcAddress</tt>, Mesa stores a table that
associates function names with pointers to those functions. This table is
stored in <tt>src/mesa/glapi/glprocs.h</tt>. For different reasons on
different platforms, storing all of those pointers is inefficient. On most
platforms, including all known platforms that support TLS, we can avoid this
added overhead.</p>
<p>If the assembly stubs are all the same size, the pointer need not be
stored for every function. The location of the function can instead be
calculated by multiplying the size of the dispatch stub by the offset of the
function in the table. This value is then added to the address of the first
dispatch stub.</p>
<p>This path is activated by adding the correct <tt>#ifdef</tt> magic to
<tt>src/mesa/glapi/glapi.c</tt> just before <tt>glprocs.h</tt> is
included.</p>
<A NAME="autogen"/>
<H2>4. Automatic Generation of Dispatch Stubs</H2>
</BODY>
</HTML>

View File

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

View File

@@ -9,7 +9,7 @@
<center>
<h1>Mesa Frequently Asked Questions</h1>
Last updated: 8 June 2006
Last updated: 21 August 2006
</center>
<br>
@@ -46,7 +46,7 @@ Mesa 6.x supports the OpenGL 1.5 specification.
<h2>1.2 Does Mesa support/use graphics hardware?</h2>
<p>
Yes. Specifically, Mesa serves as the OpenGL core for the open-source DRI
drivers for XFree86/X.org. See the <a href="http://dri.sf.net/">DRI
drivers for XFree86/X.org. See the <a href="http://dri.freedesktop.org/">DRI
website</a> for more information.
</p>
<p>
@@ -290,9 +290,8 @@ hardware it has detected.
<p>
Make sure the ratio of the far to near clipping planes isn't too great.
Look
<a href="http://www.sgi.com/software/opengl/advanced97/notes/node18.html"
target="_parent">
here</a> for details.
<a href="http://www.opengl.org/resources/faq/technical/depthbuffer.htm#0040"
target="_parent"> here</a> for details.
</p>
<p>
Mesa uses a 16-bit depth buffer by default which is smaller and faster
@@ -341,13 +340,14 @@ will fix the problem.
<a name="part4">
</a><h1><a name="part4">4. Developer Questions</a></h1>
<h2><a name="part4">4.1 How can I contribute?</a></h2>
<h2>4.1 How can I contribute?</a></h2>
<p>
<a name="part4">First, join the Mesa3d-dev mailing list. That's where Mesa development
is discussed.
First, join the <a href="http://www.mesa3d.org/lists.html>Mesa3d-dev
mailing list</a>.
That's where Mesa development is discussed.
</a></p>
<p>
<a name="part4">The </a><a href="http://www.opengl.org/developers/documentation/specs.html" target="_parent">
The </a><a href="http://www.opengl.org/documentation" target="_parent">
OpenGL Specification</a> is the bible for OpenGL implemention work.
You should read it.
</p>

View File

@@ -70,7 +70,7 @@ tty group as well
<h1>4. Using fbdevglut</h1>
Almost all of the programs in the progs directory use glut, and they compile with fbdevglut.
Currently glBlendFunc is not working with glFBDev.
<p>
To compile the redbook sample programs:
<pre>

View File

@@ -83,9 +83,14 @@ Recent /usr/include/GL/glxproto.h file.
<p>You'll need this if you get any errors about _GLXvop_BindTexImageEXT
being undefined.
</p>
<p>The latest version can be
obtained from <A href="http://webcvs.freedesktop.org/*checkout*/xorg/proto/GL/glxproto.h?rev=1.9&content-type=text%2Fplain">freedesktop.org CVS</a>
<p>
Download/install the
<a href="http://gitweb.freedesktop.org/?p=xorg/proto/glproto.git">glproto</a>
module from X.org git, or grab the
<A href="http://webcvs.freedesktop.org/*checkout*/xorg/proto/GL/glxproto.h?rev=1.9&content-type=text%2Fplain">glxproto.h file</a> and put it in the
Mesa/include/GL/ directory.
</p>
</li>
<li>DRI-enabled X server.

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

@@ -9,8 +9,8 @@
<H1>Function Name Mangling</H1>
<p>
If you want to use Mesa and native OpenGL in the same application at
the same time you may find it useful to compile Mesa with
If you want to use both Mesa and another OpenGL library in the same
application at the same time you may find it useful to compile Mesa with
<i>name mangling</i>.
This results in all the Mesa functions being prefixed with
<b>mgl</b> instead of <b>gl</b>.
@@ -18,9 +18,11 @@ This results in all the Mesa functions being prefixed with
<p>
To do this, recompile Mesa with the compiler flag -DUSE_MGL_NAMESPACE.
Add the flag to the other compiler flags in Make-config (if using the
old-style build system) or in src/Makefile if using GNU autoconf/
automake to build Mesa.
Add the flag to CFLAGS in the configuration file which you want to use.
For example:
<pre>
CFLAGS += -DUSE_MGL_NAMESPACE
</pre>
</p>

View File

@@ -9,7 +9,7 @@
<H1>Modelers, Renderers and Viewers</H1>
<ul>
<li><a href="http://www.aqsis.com/" target="_parent">Aqsis</a> - a RenderMan compatible renderer</li>
<li><a href="http://www.aqsis.org/" target="_parent">Aqsis</a> - a RenderMan compatible renderer</li>
<li><a href="http://www.ac3d.org/" target="_parent">AC3D</a> - 3-D modeler
</li><li><a href="http://mesa3d.sourceforge.net/notfound.html">ARCAD</a> - CAD program
</li><li><a href="http://www.mediascape.com/" target="_parent">Artstream</a> - provides

View File

@@ -11,179 +11,52 @@
<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.
This is a new development release.
</p>
<h2>September 15, 2006</h2>
<p>
<a href="relnotes-6.5.1.html">Mesa 6.5.1</a> has been released.
This is a new development release.
</p>
<h2>March 31, 2006</h2>
<p>
Mesa 6.5 has been released. This is a new development release.
<a href="relnotes-6.5.html">Mesa 6.5</a> has been released.
This is a new development release.
</p>
<pre>
New:
- OpenGL Shading Language support through GL_ARB_shader_objects,
GL_ARB_shading_language_100, GL_ARB_vertex_shader and
GL_ARB_fragment_shader (done by Michal Krol)
- GL_EXT_packed_depth_stencil extension
- GL_EXT_timer_query extension
- GL_EXT_framebuffer_blit extension
- GL_ARB_half_float_pixel
- GLX_MESA_copy_sub_buffer for DRI drivers (Dave Reveman)
- reflect demo improved to support multiple windows
- singlebuffer demo (shows no/little-flicker single-buffered rendering)
- r200: enable GL_ARB_texture_env_crossbar, separate the texture
sampling unit bits from the texture env combine enable bits
- r200: add support for GL_ATI_fragment_shader
- added fast XOR-mode line drawing optimization
- radeon: add support for all 3 tmus, GL_ARB_texture_cube_map
and GL_EXT_fog_coord
- MESA_GLX_ALPHA_BITS env var for xlib driver
- many DRI driver updates (including screen rotation support
for the Intel DRI driver)
Changes:
- removed GL_HP_occlusion_test (use GL_ARB_occlusion_query instead)
- removed GL_SGIX/SGIS_pixel_texture extensions
Bug fixes:
- fixed glxcontextmodes.c datatype problem (bug 5835)
- fixed aix-gcc build/install bugs (bug 5874)
- fixed some bugs in texture env program generation
- glXCopyContext() didn't handle texture object bindings properly
- glXCopyContext() didn't copy all lighting state
- fixed FreeBSD config (Pedro Giffuni)
- fixed some minor framebuffer object bugs
- replaced dprintf() with _glu_printf() in GLU (bug 6244)
- fixed a number of thread safety bugs/regressions
- fixed a number of GLU tesselator bugs (John Shell, bug 6339)
- paletted texturing was broken w/ floating point palettes (K. Schultz)
- lots of assorted framebuffer object bug fixes
</pre>
<p>
The MD5 checksums are:
</p>
<pre>
657be3b92f6dabc78a67ed9cb8d67813 MesaLib-6.5.tar.gz
61beda590bfc5b4a12e979d5f2d70d7a MesaLib-6.5.tar.bz2
19d48b872d579d4f91466060804a59ac MesaLib-6.5.zip
694ad3a7007010c7418a9c72d1cba5b7 MesaDemos-6.5.tar.gz
ab95b590dcd640726a2d89e62068c66e MesaDemos-6.5.tar.bz2
b792c303fefd87294488e2b7eab976e5 MesaDemos-6.5.zip
ac1d585483617db0c91e5c15cb5ec3a3 MesaGLUT-6.5.tar.gz
59f0bf2b2ffb67fe23ee479f9b044f31 MesaGLUT-6.5.tar.bz2
005decb2136718e22222ac1c4805cd15 MesaGLUT-6.5.zip
</pre>
<h2>February 2, 2006</h2>
<p>
Mesa 6.4.2 has been released. This is primarily a bug-fix release.
<a href="relnotes-6.4.2.html">Mesa 6.4.2</a> has been released.
This is stable, bug-fix release.
</p>
<pre>
New items:
- added OSMesaColorClamp() function/feature
- added wglGetExtensionStringARB() function
Bug fixes:
- fixed some problems when building on Windows
- GLw header files weren't installed by installmesa script (bug 5396)
- GL/glfbdev.h file was missing from tarballs
</pre>
<p>
The MD5 checksums are:
</p>
<pre>
cb0d745d520fa7c2bb9178058b763544 MesaLib-6.4.2.tar.gz
7674d2c603b5834259e4e5a820cefd5b MesaLib-6.4.2.tar.bz2
d224e1325b33ff71a0f3893fc6b4d594 MesaLib-6.4.2.zip
d4b345d4588fc750cd3d34f3ac26673e MesaDemos-6.4.2.tar.gz
9cae1ab874af533ce356bd7dfe2e0bb0 MesaDemos-6.4.2.tar.bz2
2da6e1d1245e441d27813595c6ba50de MesaDemos-6.4.2.zip
84427d18c3453f0ea52388eeba7169b5 MesaGLUT-6.4.2.tar.gz
b157ba8ad1ea63260cf5339132e7aac6 MesaGLUT-6.4.2.tar.bz2
fe1523744fc05edc3811dfc6a1bf4181 MesaGLUT-6.4.2.zip
</pre>
<h2>November 29, 2005</h2>
<p>
Mesa 6.4.1 has been released. This is a stable, bug-fix release.
<a href="relnotes-6.4.1.html">Mesa 6.4.1</a> has been released.
This is stable, bug-fix release.
</p>
<pre>
Bug fixes:
- redefining a vertex program string didn't take effect in TNL module
- fixed occasional segfault upon vertex/fragment parsing error
- vertex program LIT instruction didn't handle 0^0=1 correctly
- fragment program fog option didn't work with glDrawPixels, glBitmap
- USE_MGL_NAMESPACE didn't work for x86-64
- OSMesa demos were missing from previous release tarballs
- fixed problem with float->ushort conversion in glClear (bug 4992)
- popping of GL_EYE_PLANE texgen state was broken (bug 4996)
- popping of GL_SPOT_DIRECTION light state was broken (bug 5005)
- fixed occasional triangle color interpolation problem on VMS
- work around invalid free() call (bug 5131)
- fixed BSD X server compilation problem by including stdint.h
</pre>
<p>
The MD5 checksums are:
</p>
<pre>
698ceb574cf882b0226761f5913c0da9 MesaLib-6.4.1.tar.gz
ea148c828ec6f645526451db1b8556f1 MesaLib-6.4.1.tar.bz2
42e93279468975ed2bf3111b8721e5d9 MesaLib-6.4.1.zip
e3b0d50807fd2bdcd1a95aaddd786f13 MesaDemos-6.4.1.tar.gz
99df1fdcb98d391666b476ca6f1dda8a MesaDemos-6.4.1.tar.bz2
b999d2c6d92fb4b7740a3dbd889348e3 MesaDemos-6.4.1.zip
eadfe01fe5ddfb1eb8227dd567b31635 MesaGLUT-6.4.1.tar.gz
bd003bb4f981a4f91dee4c38644d4f3f MesaGLUT-6.4.1.tar.bz2
71c401c037088bf688a88afdaeb3420f MesaGLUT-6.4.1.zip
</pre>
<h2>October 24, 2005</h2>
<p>
Mesa 6.4 has been released. This is a stable, bug-fix release.
<a href="relnotes-6.4.html">Mesa 6.4</a> has been released.
This is stable, bug-fix release.
</p>
<pre>
New:
- Added a fast XOR line drawing function in Xlib driver
- Added support for GL_ARB_texture_mirrored_repeat to savage
driver (supported only on Savage4 hardware).
Changes:
- Mesa now packaged in three parts: Library, Demos and GLUT
Bug fixes:
- GLX_X_RENDERABLE token wasn't accepted by glXChooseFBConfig
- Some files were present multiple times in the 6.3.2 tarballs
- r200_vtxtmp_x86.S file was missing from 6.3.2 tarball (bug 4207)
- glxgears_fbconfig demo didn't work (bug 4237)
- fixed bug when bilinear sampling 2d textures with borders
- glXCreatePbuffer() could segfault instead of returning 0 (bug 4235)
- fixed undefined frexp and rand in X.org libGLcore.a (bug 4242)
- fixed a few problems with proxy color tables (bug 4270)
- fixed precision problem in Z clearing (bug 4395)
- glBitmap, glDraw/CopyPixels mistakenly generated selection hits
- fixed potential segfault caused by reading pixels outside
of renderbuffer bounds
- glGetTexLevelParameter didn't accept GL_TEXTURE_DEPTH_SIZE_ARB
- fixed memory corruption bug involving software alpha buffers
- glReadPixels clipped by window bounds was sometimes broken
- glDraw/CopyPixels of stencil data ignored the stencil write mask
- glReadPixels from a texture bound to a framebuffer object didn't work
- glIsRender/FramebufferEXT weren't totally correct
- fixed a number of point size attenuation/fade bugs
- fixed glFogCoord bug 4729
- GLX encoding for transpose matrix functions was broken
- fixed broken fragment program KIL and SWZ instructions
</pre>
<p>
The MD5 checksums are:
</p>
<pre>
1cce0c1eb4fd15e9dfe837a1ce0c9812 MesaLib-6.4.tar.gz
85a84e47a3f718f752f306b9e0954ef6 MesaLib-6.4.tar.bz2
b976fea4f3ee06354c53f91b6e3f2ffc MesaLib-6.4.zip
d8734f2c69bcf7ef9f5ae454a85743ba MesaDemos-6.4.tar.gz
1a8c4d4fc699233f5fdb902b8753099e MesaDemos-6.4.tar.bz2
607ab7c7a7de0cc5febbdde2bfa03098 MesaDemos-6.4.zip
3260156f66174322a092be0767962d34 MesaGLUT-6.4.tar.gz
0465d053f83775f44a12dec4050dfd78 MesaGLUT-6.4.tar.bz2
02abfcdcdf72ba938ae00f6e3b70fbe0 MesaGLUT-6.4.zip
</pre>
<h2>August 19, 2005</h2>
@@ -191,23 +64,7 @@ d8734f2c69bcf7ef9f5ae454a85743ba MesaDemos-6.4.tar.gz
Mesa 6.3.2 has been released.
Note: there was no public release of version 6.3.1.
</p>
<pre>
New:
- The distribution now includes the DRI drivers and GLX code
Changes:
- Made the DRI "new" driver interface standard, remove old code
Bug fixes:
- GL_ARB_vertex/fragment_shader were mistakenly listed in the
extensions string
- negative relative addressing in vertex programs was broken
- update/fix SPARC assembly code for vertex transformation
- fixed memory leak when freeing GLX drawables/renderbuffers
- fixed display list memory leak
- the GL_PIXEL_MAP_I_TO_I table is now floating point, not integer
- wglGetProcAddress() didn't handle wgl-functions
- fixed glxext.h cross-compile issue (Colin Harrison)
- assorted DRI driver fixes
</pre>
<a href="versions.html#6.3.2">Changes in version 6.3.1</a>
<p>
The MD5 checksums are:
</p>
@@ -1226,6 +1083,6 @@ source code</a>.</p>
<hr>
$Id: news.html,v 3.28 2006/04/01 02:29:40 brianp Exp $
$Id: news.html,v 3.33 2006/12/02 18:18:41 brianp Exp $
</body>
</html>

68
docs/relnotes-6.4.1.html Normal file
View File

@@ -0,0 +1,68 @@
<HTML>
<TITLE>Mesa Release Notes</TITLE>
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<body bgcolor="#eeeeee">
<H1>Mesa 6.4.1 / November 29, 2006</H1>
<p>
Mesa 6.4.1 is a stable, bug-fix release.
</p>
<h2>MD5 checksums</h2>
<pre>
698ceb574cf882b0226761f5913c0da9 MesaLib-6.4.1.tar.gz
ea148c828ec6f645526451db1b8556f1 MesaLib-6.4.1.tar.bz2
42e93279468975ed2bf3111b8721e5d9 MesaLib-6.4.1.zip
e3b0d50807fd2bdcd1a95aaddd786f13 MesaDemos-6.4.1.tar.gz
99df1fdcb98d391666b476ca6f1dda8a MesaDemos-6.4.1.tar.bz2
b999d2c6d92fb4b7740a3dbd889348e3 MesaDemos-6.4.1.zip
eadfe01fe5ddfb1eb8227dd567b31635 MesaGLUT-6.4.1.tar.gz
bd003bb4f981a4f91dee4c38644d4f3f MesaGLUT-6.4.1.tar.bz2
71c401c037088bf688a88afdaeb3420f MesaGLUT-6.4.1.zip
</pre>
<h2>Bug fixes</h2>
<ul>
<li>redefining a vertex program string didn't take effect in TNL module
<li>fixed occasional segfault upon vertex/fragment parsing error
<li>vertex program LIT instruction didn't handle 0^0=1 correctly
<li>fragment program fog option didn't work with glDrawPixels, glBitmap
<li>USE_MGL_NAMESPACE didn't work for x86-64
<li>OSMesa demos were missing from previous release tarballs
<li>fixed problem with float->ushort conversion in glClear (bug 4992)
<li>popping of GL_EYE_PLANE texgen state was broken (bug 4996)
<li>popping of GL_SPOT_DIRECTION light state was broken (bug 5005)
<li>fixed occasional triangle color interpolation problem on VMS
<li>work around invalid free() call (bug 5131)
<li>fixed BSD X server compilation problem by including stdint.h
</ul>
<h2>Driver Status</h2>
<pre>
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
</pre>
</body>
</html>

75
docs/relnotes-6.4.2.html Normal file
View File

@@ -0,0 +1,75 @@
<HTML>
<TITLE>Mesa Release Notes</TITLE>
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<body bgcolor="#eeeeee">
<H1>Mesa 6.4.2 / February 2, 2006</H1>
<p>
Mesa 6.4.2 is a stable, bug-fix release.
</p>
<h2>MD5 checksums</h2>
<pre>
cb0d745d520fa7c2bb9178058b763544 MesaLib-6.4.2.tar.gz
7674d2c603b5834259e4e5a820cefd5b MesaLib-6.4.2.tar.bz2
d224e1325b33ff71a0f3893fc6b4d594 MesaLib-6.4.2.zip
d4b345d4588fc750cd3d34f3ac26673e MesaDemos-6.4.2.tar.gz
9cae1ab874af533ce356bd7dfe2e0bb0 MesaDemos-6.4.2.tar.bz2
2da6e1d1245e441d27813595c6ba50de MesaDemos-6.4.2.zip
84427d18c3453f0ea52388eeba7169b5 MesaGLUT-6.4.2.tar.gz
b157ba8ad1ea63260cf5339132e7aac6 MesaGLUT-6.4.2.tar.bz2
fe1523744fc05edc3811dfc6a1bf4181 MesaGLUT-6.4.2.zip
</pre>
<h2>New features</h2>
<ul>
<li>added OSMesaColorClamp() function/feature
<li>added wglGetExtensionStringARB() function
</ul>
<h2>Changes</h2>
<ul>
<li>GLUT tarball
<br>
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.
</ul>
<h2>Bug fixes</h2>
<ul>
<li>fixed some problems when building on Windows
<li>GLw header files weren't installed by installmesa script (bug 5396)
<li>GL/glfbdev.h file was missing from tarballs
<li>fixed TNL initialization bug which could lead to crash (bug 5791)
</ul>
<h2>Driver Status</h2>
<pre>
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
</pre>
</body>
</html>

90
docs/relnotes-6.4.html Normal file
View File

@@ -0,0 +1,90 @@
<HTML>
<TITLE>Mesa Release Notes</TITLE>
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<body bgcolor="#eeeeee">
<H1>Mesa 6.4 / October 24, 2005</H1>
<p>
Mesa 6.4 is a stable, bug-fix release.
</p>
<h2>MD5 checksums</h2>
<pre>
1cce0c1eb4fd15e9dfe837a1ce0c9812 MesaLib-6.4.tar.gz
85a84e47a3f718f752f306b9e0954ef6 MesaLib-6.4.tar.bz2
b976fea4f3ee06354c53f91b6e3f2ffc MesaLib-6.4.zip
d8734f2c69bcf7ef9f5ae454a85743ba MesaDemos-6.4.tar.gz
1a8c4d4fc699233f5fdb902b8753099e MesaDemos-6.4.tar.bz2
607ab7c7a7de0cc5febbdde2bfa03098 MesaDemos-6.4.zip
3260156f66174322a092be0767962d34 MesaGLUT-6.4.tar.gz
0465d053f83775f44a12dec4050dfd78 MesaGLUT-6.4.tar.bz2
02abfcdcdf72ba938ae00f6e3b70fbe0 MesaGLUT-6.4.zip
</pre>
<h2>New</h2>
<ul>
<li>Added a fast XOR line drawing function in Xlib driver
<li>Added support for GL_ARB_texture_mirrored_repeat to savage driver (supported only on Savage4 hardware).
</ul>
<h2>Changes</h2>
<ul>
<li>Mesa now packaged in three parts: Library, Demos and GLUT
</ul>
<h2>Bug fixes</h2>
<ul>
<li>GLX_X_RENDERABLE token wasn't accepted by glXChooseFBConfig
<li>Some files were present multiple times in the 6.3.2 tarballs
<li>r200_vtxtmp_x86.S file was missing from 6.3.2 tarball (bug 4207)
<li>glxgears_fbconfig demo didn't work (bug 4237)
<li>fixed bug when bilinear sampling 2d textures with borders
<li>glXCreatePbuffer() could segfault instead of returning 0 (bug 4235)
<li>fixed undefined frexp and rand in X.org libGLcore.a (bug 4242)
<li>fixed a few problems with proxy color tables (bug 4270)
<li>fixed precision problem in Z clearing (bug 4395)
<li>glBitmap, glDraw/CopyPixels mistakenly generated selection hits
<li>fixed potential segfault caused by reading pixels outside
of renderbuffer bounds
<li>glGetTexLevelParameter didn't accept GL_TEXTURE_DEPTH_SIZE_ARB
<li>fixed memory corruption bug involving software alpha buffers
<li>glReadPixels clipped by window bounds was sometimes broken
<li>glDraw/CopyPixels of stencil data ignored the stencil write mask
<li>glReadPixels from a texture bound to a framebuffer object didn't work
<li>glIsRender/FramebufferEXT weren't totally correct
<li>fixed a number of point size attenuation/fade bugs
<li>fixed glFogCoord bug 4729
<li>GLX encoding for transpose matrix functions was broken
<li>fixed broken fragment program KIL and SWZ instructions
<li>fragment programs that wrote result.depth.z didn't work
</ul>
<h2>Driver Status</h2>
<pre>
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
</pre>
</body>
</html>

139
docs/relnotes-6.5.1.html Normal file
View File

@@ -0,0 +1,139 @@
<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.1 Release Notes / September 15, 2006</H1>
<p>
Mesa 6.5.1 is a 6.5 follow-on development release mostly consisting of
bug fixes.
</p>
<h2>MD5 checksums</h2>
<pre>
d9a555297319bb932a3192952d53d073 MesaLib-6.5.1.tar.gz
c46f2c6646a270911b791dd8e1c2d977 MesaLib-6.5.1.tar.bz2
939eaaff33322bfeafac784402b45f4f MesaLib-6.5.1.zip
9e4bbe83c007bfbaa67449a81cc3d36a MesaDemos-6.5.1.tar.gz
0f2794baf7a9d98b22caea9f78c6942d MesaDemos-6.5.1.tar.bz2
14c77eab9cc7a265c331abf239927c1c MesaDemos-6.5.1.zip
c5f87c23aaf4eaf1bda0d007ea98366c MesaGLUT-6.5.1.tar.gz
2525642fe7f454e3e1a1aad01359b406 MesaGLUT-6.5.1.tar.bz2
e33b165c22551e23b58ede8767378543 MesaGLUT-6.5.1.zip
</pre>
<h2>New Features</h2>
<ul>
<li>Intel i965 "broadwater" DRI driver
<li>GL_APPLE_vertex_array_object - allows encapsulation of a set of vertex
arrays in an object.
<li>GL_EXT_texture_sRGB - non-linearly mapped texture formats
<li>GL_EXT_gpu_program_parameters - addes a few new functions for setting
multiple vertex/fragment program parameters with one call.
<li>"engine" demo
<li>updated fbdev driver and GLUT for fbdev (Sean D'Epagnier)
<li>many updates to the DRI drivers
</ul>
<h2>Changes</h2>
<ul>
<li>The glVertexAttribARB functions no longer alias the conventional
vertex attributes.
<li>glxinfo program prints more info with -l option
<li>GL_FRAGMENT_PROGRAM_NV and GL_FRAGMENT_PROGRAM_ARB are now
compatible, in terms of glBindProgramARB()
<li>The GL_ARB_vertex_program attribute <code>vertex.weight</code> is now
accepted by the parser, even though the GL_ARB_vertex_blend and
GL_EXT_vertex_weighting extensions aren't supported.
Allows Warcraft to run.
</ul>
<h2>Bug fixes</h2>
<ul>
<li>fixed broken texture border handling for depth textures (bug 6498)
<li>removed the test for duplicated framebuffer attachments, per
version 117 of the GL_EXT_framebuffer_object specification
<li>fixed a few render-to-texture bugs, including render to depth texture
<li>clipping of lines against user-defined clip planes was broken (6512)
<li>assembly language dispatch for SPARC was broken (bug 6484)
<li>assorted compilation fixes on various Unix platforms (Dan Schikore)
<li>glPopAttrib could restore an invalid value for GL_DRAW_BUFFER
<li>assorted minor fixes for 16 and 32 bit/channel modes
<li>fixed assorted bugs in texture compression paths
<li>fixed indirect rendering vertex array crashes (bug 6863)
<li>glDrawPixels GL_INDEX_OFFSET didn't always work
<li>fixed convolution memory leak (bug 7077)
<li>rectangular depth textures didn't work
<li>invalid mode to glBegin didn't generate an error (bug 7142)
<li>'normalized' parameter to glVertexAttribPointerARB didn't work
<li>disable bogus GLX_SGI_video_sync extension in xlib driver
<li>fixed R128 driver locking bug (Martijn van Oosterhout)
<li>using evaluators with vertex programs caused crashes (bug 7564)
<li>fragment.position wasn't set correctly for point/line primitives
<li>fixed parser bug for scalar sources for GL_NV_fragment_program
<li>max fragment program length was incorrectly 128, now 1024
<li>writes to result.depth in fragment programs weren't clamped to [0,1]
<li>fixed potential dangling pointer bug in glBindProgram()
<li>fixed some memory leaks (and potential crashes) in Xlib driver
<li>fixed a number of build issues on HP-UX (Christopher Bell)
<li>accum buffer didn't work with OSMesa interface
</ul>
<h2>Internal code changes</h2>
<p>
A number of Mesa program-related structs were renamed.
For example <i>struct vertex_program</i> is now <i>struct gl_vertex_program</i>.
All the effected drivers have been updated.
</p>
<p>Ian Romanick updated the GL API dispatch code in a number of ways.
First, many old/unused extensions were removed.
Second, the static entrypoints for some extensions were removed.
This means GL function pointers will have to be used more often
(e.g. use glXGetProcAddressARB()).
</p>
<h2>To Do (someday) items</h2>
<ul>
<li>Switch to freeglut
<li>Increase MAX_DRAWBUFFERS
<li>Fix linux-glide target/driver.
<li>Fix lambda 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>

126
docs/relnotes-6.5.2.html Normal file
View File

@@ -0,0 +1,126 @@
<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.2 Release Notes / December 2, 2006</H1>
<p>
Mesa 6.5.2 is a 6.5 follow-on development release with a few new features
but mostly consisting of bug fixes.
</p>
<h2>MD5 checksums</h2>
<pre>
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>
<h2>New features</h2>
<ul>
<li>New DRI memory manager system. Currently used by the i915tex driver.
Other DRI drivers will be updated to use the new memory manager in coming
months.
<br>
To use the new driver you'll need the most recent DRM library and drivers
(version 2.2 or later) and a recent xf86-video-intel driver module from X.org.
<br>
New features resulting from this work include:
<ul>
<li>EXT_framebuffer_objects, render to texture
<li>ARB_pixel_buffer_objects
<li>Accelerated CopyTexSubimage, DrawPixels, ReadPixels, CopyPixels
<li>Accelerated texture uploads from pixel buffer objects
<li>Potentially texturing directly from the pixel buffer object (zero
copy texturing).
</ul>
<li>New Intel i965 DRI driver
<li>New <code>minstall</code> script to replace normal install program
<li>Faster fragment program execution in software
<li>Added (or fixed) support for <a href="http://www.opengl.org/registry/specs/SGI/make_current_read.txt">
GLX_SGI_make_current_read</a> to the following drivers:</li>
<ul>
<li>radeon</li>
<li>savage</li>
<li>mga</li>
<li>tdfx</li>
</ul>
<li>Added support for ARB_occlusion_query to the tdfx driver (Ian
Romanick).</li>
</ul>
<h2>Bug fixes</h2>
<ul>
<li>fixed invalid memory read while rendering textured points (bug 8320)
<li>fixed problems with freebsd-dri configuration (bug 8344)
<li>Mesa's fake glxGetCurrentContext() wasn't thread-aware
<li>OPTION NV_position_invariant didn't work in NV vertex programs
<li>glDrawPixels into a user-created framebuffer object could crash Xlib driver
<li>Line clipping was broken in some circumstances
<li>fragment.fogcoord register didn't always contain the correct value
<li>RGBA logicops didn't work reliably in some DRI drivers
<li>Fixed broken RGBA LogicOps in Intel DRI drivers
<li>Fixed some fragment program bugs in Intel i915 DRI driver
<li>Fixed glGetVertexAttribfvARB bug 8883
<li>Implemented glGetUniform[fi]vARB() functions
<li>Fixed glDrawPixels(GL_COLOR_INDEX, GL_BITMAP) segfault (bug 9044)
<li>Fixed some gluBuild2DMipmaps() bugs (Greg McGarragh)
<li>Fixed broken "mgl" name mangling
<li>Indirect rending was broken for glMap* functions (bug 8899)
</ul>
<h2>Internal code changes</h2>
<ul>
<li>The device driver functions ResizeBuffers and GetBufferSize have been
decprecated.
<li>OpenGL 2.0 and 2.1 support is nearly done. We need to do quite a bit
more testing of the shading language functions.
</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>

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

@@ -0,0 +1,88 @@
<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 with many internal changes.
</p>
<h2>MD5 checksums</h2>
<pre>
TBD
</pre>
<h2>New features</h2>
<ul>
<li>OpenGL 2.0 support.
<li>Entirely new Shading Language code generator.
<li>Much faster software execution of vertex, fragment shaders.
<li>New vertex buffer object infrastructure (replaces old array_cache code).
<li>Updated glext.h file (version 39)
<li>Updated glxext.h file (version 18)
<li>GL_MAX_DRAWBUFFERS is now 4 (software rendering) so
"multiple render targets" are really supported.
</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>GL_POST_CONVOLUTION_ALPHA_BIAS/SCALE was broken.
<li>1D convolution state could effect 2D image transfers
</ul>
<h2>Internal code changes</h2>
<ul>
<li>Massive changes to the Shading Language compiler.
<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>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 2.0
OSMesa (off-screen) implements OpenGL 2.0
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>

131
docs/relnotes-6.5.html Normal file
View File

@@ -0,0 +1,131 @@
<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 Release Notes / March 31, 2006</H1>
<p>
Mesa 6.5 is a new development release.
</p>
<h2>MD5 checksums</h2>
<pre>
657be3b92f6dabc78a67ed9cb8d67813 MesaLib-6.5.tar.gz
61beda590bfc5b4a12e979d5f2d70d7a MesaLib-6.5.tar.bz2
19d48b872d579d4f91466060804a59ac MesaLib-6.5.zip
694ad3a7007010c7418a9c72d1cba5b7 MesaDemos-6.5.tar.gz
ab95b590dcd640726a2d89e62068c66e MesaDemos-6.5.tar.bz2
b792c303fefd87294488e2b7eab976e5 MesaDemos-6.5.zip
ac1d585483617db0c91e5c15cb5ec3a3 MesaGLUT-6.5.tar.gz
59f0bf2b2ffb67fe23ee479f9b044f31 MesaGLUT-6.5.tar.bz2
005decb2136718e22222ac1c4805cd15 MesaGLUT-6.5.zip
</pre>
<h2>New Features</h2>
<ul>
<li>OpenGL Shading language support
<br>
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.
<br>
The OpenGL 2.0 interface to these features will be implemented in a
future version of Mesa,
<li>GL_EXT_timer_query
<br>
Used to measure the time of OpenGL operations at high precision.
Only supported in the software/Xlib driver at this time.
<li>GL_EXT_packed_depth_stencil
<br>
Defines a new GL_DEPTH_STENCIL_EXT pixel format.
<li>GL_EXT_framebuffer_blit
<br>
A simplified glCopyPixels-like feature for copying pixel rectangles.
<li>GL_ARB_half_float_pixel
<br>
Adds a new half-precision floating point format for image transfers,
such as for glDrawPixels, glReadPixels, glTexImage, etc.
</ul>
<h2>Changes</h2>
<ul>
<li>removed GL_HP_occlusion_test (use GL_ARB_occlusion_query instead)
<li>removed GL_SGIX/SGIS_pixel_texture extensions
</ul>
<h2>Bug fixes</h2>
<ul>
<li>fixed glxcontextmodes.c datatype problem (bug 5835)
<li>fixed aix-gcc build/install bugs (bug 5874)
<li>fixed some bugs in texture env program generation
<li>glXCopyContext() didn't handle texture object bindings properly
<li>glXCopyContext() didn't copy all lighting state
<li>fixed FreeBSD config (Pedro Giffuni)
<li>fixed some minor framebuffer object bugs
<li>replaced dprintf() with _glu_printf() in GLU (bug 6244)
<li>fixed a number of thread safety bugs/regressions
<li>fixed a number of GLU tesselator bugs (John Shell, bug 6339)
<li>paletted texturing was broken w/ floating point palettes (K. Schultz)
<li>lots of assorted framebuffer object bug fixes
</ul>
<h2>Known Issues</h2>
<ul>
<li>Rendering to depth textures will not work. Rendering to GL_DEPTH_STENCIL
textures should work.
</ul>
<h2>Driver Interface Changes</h2>
<ul>
<li>Stencil: The Driver.StencilOp/Func/Mask() functions have been replaced by
the two-sided versions: Driver.Stencil*Separate().
<li>Render-to-texture: The functions for rendering to textures have changed.
</ul>
<h2>To Do (someday) items</h2>
<ul>
<li>Switch to freeglut
<li>Increase MAX_DRAWBUFFERS
<li>Fix linux-glide target/driver.
<li>Fix lambda 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

@@ -8,15 +8,33 @@
<H1>Release Notes</H1>
<p>
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.
</p>
<p>
The release notes summarize what's new or changed in each Mesa release.
</p>
<UL>
<LI><A HREF="RELNOTES-6.5">RELNOTES-6.5</A>
<LI><A HREF="RELNOTES-6.4.2">RELNOTES-6.4.2</A>
<LI><A HREF="RELNOTES-6.4.1">RELNOTES-6.4.1</A>
<LI><A HREF="RELNOTES-6.4">RELNOTES-6.4</A>
<LI><A HREF="relnotes-6.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>
<LI><A HREF="relnotes-6.4.2.html">6.4.2 release notes</A>
<LI><A HREF="relnotes-6.4.1.html">6.4.1 release notes</A>
<LI><A HREF="relnotes-6.4.html">6.4 release notes</A>
</UL
<p>
Versions of Mesa prior to 6.4 are summarized in the
<a href="versions.html">versions file</a> and the following release notes.
</p>
<UL>
<LI><A HREF="RELNOTES-6.3.2">RELNOTES-6.3.2</A>
<LI><A HREF="RELNOTES-6.3">RELNOTES-6.3</A>
<LI><A HREF="RELNOTES-6.2.1">RELNOTES-6.2.1</A>

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>

286
docs/shading.html Normal file
View File

@@ -0,0 +1,286 @@
<HTML>
<TITLE>Shading Language Support</TITLE>
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Shading Language Support</H1>
<p>
This page describes the features and status of Mesa's support for the
<a href="http://opengl.org/documentation/glsl/" target="_parent">
OpenGL Shading Language</a>.
</p>
<p>
Last updated on 17 Feb 2007.
</p>
<p>
Contents
</p>
<ul>
<li><a href="#unsup">Unsupported Features</a>
<li><a href="#notes">Implementation Notes</a>
<li><a href="#hints">Programming Hints</a>
<li><a href="#standalone">Stand-alone Compiler</a>
<li><a href="#implementation">Compiler Implementation</a>
</ul>
<a name="unsup">
<h2>Unsupported Features</h2>
<p>
The following features of the shading language are not yet supported
in Mesa:
</p>
<ul>
<li>Dereferencing arrays with non-constant indexes
<li>User-defined structs
<li>Linking of multiple shaders is not supported
<li>Integer operations are not fully implemented (most are implemented
as floating point).
<li>gl_ClipVertex
</ul>
<p>
All other major features of the shading language should function.
</p>
<a name="notes">
<h2>Implementation Notes</h2>
<ul>
<li>Shading language programs are compiled into low-level programs
very similar to those of GL_ARB_vertex/fragment_program.
<li>All vector types (vec2, vec3, vec4, bvec2, etc) currently occupy full
float[4] registers.
<li>Float constants and variables are packed so that up to four floats
can occupy one program parameter/register.
<li>All function calls are inlined.
<li>Shaders which use too many registers will not compile.
<li>The quality of generated code is pretty good, register usage is fair.
<li>Shader error detection and reporting of errors (InfoLog) is not
very good yet.
<li>There are known memory leaks in the compiler.
</ul>
<p>
These issues will be addressed/resolved in the future.
</p>
<a name="hints">
<h2>Programming Hints</h2>
<ul>
<li>Declare <em>in</em> function parameters as <em>const</em> whenever possible.
This improves the efficiency of function inlining.
</li>
<br>
<li>To reduce register usage, declare variables within smaller scopes.
For example, the following code:
<pre>
void main()
{
vec4 a1, a2, b1, b2;
gl_Position = expression using a1, a2.
gl_Color = expression using b1, b2;
}
</pre>
Can be rewritten as follows to use half as many registers:
<pre>
void main()
{
{
vec4 a1, a2;
gl_Position = expression using a1, a2.
}
{
vec4 b1, b2;
gl_Color = expression using b1, b2;
}
}
</pre>
Alternately, rather than using several float variables, use
a vec4 instead. Use swizzling and writemasks to access the
components of the vec4 as floats.
</li>
<br>
<li>Use the built-in library functions whenever possible.
For example, instead of writing this:
<pre>
float x = 1.0 / sqrt(y);
</pre>
Write this:
<pre>
float x = inversesqrt(y);
</pre>
</ul>
<a name="standalone">
<h2>Stand-alone Compiler</h2>
<p>
A unique stand-alone GLSL compiler driver has been added to Mesa.
<p>
<p>
The stand-alone compiler (like a conventional command-line compiler)
is a tool that accepts Shading Language programs and emits low-level
GPU programs.
</p>
<p>
This tool is useful for:
<p>
<ul>
<li>Inspecting GPU code to gain insight into compilation
<li>Generating initial GPU code for subsequent hand-tuning
<li>Debugging the GLSL compiler itself
</ul>
<p>
To build the glslcompiler program (this will be improved someday):
</p>
<pre>
cd src/mesa
make libmesa.a
cd drivers/glslcompiler
make
</pre>
<p>
Here's an example of using the compiler to compile a vertex shader and
emit GL_ARB_vertex_program-style instructions:
</p>
<pre>
glslcompiler --arb --linenumbers --vs vertshader.txt
</pre>
<p>
The output may look similar to this:
</p>
<pre>
!!ARBvp1.0
0: MOV result.texcoord[0], vertex.texcoord[0];
1: DP4 temp0.x, state.matrix.mvp.row[0], vertex.position;
2: DP4 temp0.y, state.matrix.mvp.row[1], vertex.position;
3: DP4 temp0.z, state.matrix.mvp.row[2], vertex.position;
4: DP4 temp0.w, state.matrix.mvp.row[3], vertex.position;
5: MOV result.position, temp0;
6: END
</pre>
<p>
Note that some shading language constructs (such as uniform and varying
variables) aren't expressible in ARB or NV-style programs.
Therefore, the resulting output is not always legal by definition of
those program languages.
</p>
<p>
Also note that this compiler driver is still under development.
Over time, the correctness of the GPU programs, with respect to the ARB
and NV languagues, should improve.
</p>
<a name="implementation">
<h2>Compiler Implementation</h2>
<p>
The source code for Mesa's shading language compiler is in the
<code>src/mesa/shader/slang/</code> directory.
</p>
<p>
The compiler follows a fairly standard design and basically works as follows:
</p>
<ul>
<li>The input string is tokenized (see grammar.c) and parsed
(see slang_compiler_*.c) to produce an Abstract Syntax Tree (AST).
The nodes in this tree are slang_operation structures
(see slang_compile_operation.h).
The nodes are decorated with symbol table, scoping and datatype information.
<li>The AST is converted into an Intermediate representation (IR) tree
(see the slang_codegen.c file).
The IR nodes represent basic GPU instructions, like add, dot product,
move, etc.
The IR tree is mostly a binary tree, but a few nodes have three or four
children.
In principle, the IR tree could be executed by doing an in-order traversal.
<li>The IR tree is traversed in-order to emit code (see slang_emit.c).
This is also when registers are allocated to store variables and temps.
<li>In the future, a pattern-matching code generator-generator may be
used for code generation.
Programs such as L-BURG (Bottom-Up Rewrite Generator) and Twig look for
patterns in IR trees, compute weights for subtrees and use the weights
to select the best instructions to represent the sub-tree.
<li>The emitted GPU instructions (see prog_instruction.h) are stored in a
gl_program object (see mtypes.h).
<li>When a fragment shader and vertex shader are linked (see slang_link.c)
the varying vars are matched up, uniforms are merged, and vertex
attributes are resolved (rewriting instructions as needed).
</ul>
<p>
The final vertex and fragment programs may be interpreted in software
(see prog_execute.c) or translated into a specific hardware architecture
(see drivers/dri/i915/i915_fragprog.c for example).
</p>
<h3>Code Generation Options</h3>
<p>
Internally, there are several options that control the compiler's code
generation and instruction selection.
These options are seen in the gl_shader_state struct and may be set
by the device driver to indicate its preferences:
<pre>
struct gl_shader_state
{
...
/** Driver-selectable options: */
GLboolean EmitHighLevelInstructions;
GLboolean EmitCondCodes;
GLboolean EmitComments;
};
</pre>
<ul>
<li>EmitHighLevelInstructions
<br>
This option controls instruction selection for loops and conditionals.
If the option is set high-level IF/ELSE/ENDIF, LOOP/ENDLOOP, CONT/BRK
instructions will be emitted.
Otherwise, those constructs will be implemented with BRA instructions.
</li>
<li>EmitCondCodes
<br>
If set, condition codes (ala GL_NV_fragment_program) will be used for
branching and looping.
Otherwise, ordinary registers will be used (the IF instruction will
examine the first operand's X component and do the if-part if non-zero).
This option is only relevant if EmitHighLevelInstructions is set.
</li>
<li>EmitComments
<br>
If set, instructions will be annoted with comments to help with debugging.
Extra NOP instructions will also be inserted.
</br>
</ul>
</BODY>
</HTML>

View File

@@ -11,11 +11,22 @@
<p>
<A HREF="http://www.doxygen.org" target="_parent">Doxygen</A>
is used to automatically
produce cross-referenced documentation from the Mesa sources.
This is not included in the normal Mesa distribution.
Download Mesa from CVS if interested.
produce cross-referenced documentation from the Mesa source code.
</p>
<p>
The Doxygen configuration files and generated files are not included
in the normal Mesa distribution (they're very large).
To generate Doxygen documentation, download Mesa from CVS, change to
the <code>doxygen</code> directory and run <code>make</code>.
</P>
<p>
For an example of Doxygen usage in Mesa, see a recent source file
such as <a href="http://webcvs.freedesktop.org/mesa/Mesa/src/mesa/main/bufferobj.c?view=markup" target="_parent">bufferobj.c</a>.
</p>
<P>
If you're reading this page from your local copy of Mesa, and have
run the doxygen scripts, you can read the documentation

1656
docs/versions.html Normal file

File diff suppressed because it is too large Load Diff

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

@@ -2152,35 +2152,24 @@ typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLsh
/*
* ???. GL_MESA_trace
* XXX obsolete
*/
#ifndef GL_MESA_trace
#define GL_MESA_trace 1
#if GL_ARB_shader_objects
#define GL_TRACE_ALL_BITS_MESA 0xFFFF
#define GL_TRACE_OPERATIONS_BIT_MESA 0x0001
#define GL_TRACE_PRIMITIVES_BIT_MESA 0x0002
#define GL_TRACE_ARRAYS_BIT_MESA 0x0004
#define GL_TRACE_TEXTURES_BIT_MESA 0x0008
#define GL_TRACE_PIXELS_BIT_MESA 0x0010
#define GL_TRACE_ERRORS_BIT_MESA 0x0020
#define GL_TRACE_MASK_MESA 0x8755
#define GL_TRACE_NAME_MESA 0x8756
#ifndef GL_MESA_shader_debug
#define GL_MESA_shader_debug 1
GLAPI void GLAPIENTRY glEnableTraceMESA( GLbitfield mask );
GLAPI void GLAPIENTRY glDisableTraceMESA( GLbitfield mask );
GLAPI void GLAPIENTRY glNewTraceMESA( GLbitfield mask, const GLubyte * traceName );
GLAPI void GLAPIENTRY glEndTraceMESA( void );
GLAPI void GLAPIENTRY glTraceAssertAttribMESA( GLbitfield attribMask );
GLAPI void GLAPIENTRY glTraceCommentMESA( const GLubyte * comment );
GLAPI void GLAPIENTRY glTraceTextureMESA( GLuint name, const GLubyte* comment );
GLAPI void GLAPIENTRY glTraceListMESA( GLuint name, const GLubyte* comment );
GLAPI void GLAPIENTRY glTracePointerMESA( GLvoid* pointer, const GLubyte* comment );
GLAPI void GLAPIENTRY glTracePointerRangeMESA( const GLvoid* first, const GLvoid* last, const GLubyte* comment );
#define GL_DEBUG_OBJECT_MESA 0x8759
#define GL_DEBUG_PRINT_MESA 0x875A
#define GL_DEBUG_ASSERT_MESA 0x875B
#endif /* GL_MESA_trace */
GLAPI GLhandleARB APIENTRY glCreateDebugObjectMESA (void);
GLAPI void APIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
GLAPI void APIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength,
GLsizei *length, GLcharARB *debugLog);
GLAPI GLsizei APIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
#endif /* GL_MESA_shader_debug */
#endif /* GL_ARB_shader_objects */
/*
@@ -2232,67 +2221,6 @@ typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLen
#ifndef GL_EXT_timer_query
#define GL_EXT_timer_query 1
/* Define 64-bit types */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
typedef long long int GLint64EXT;
typedef unsigned long long int GLuint64EXT;
#elif defined(_WIN32)
typedef __int64 GLint64EXT;
typedef unsigned __int64 GLuint64EXT;
#else
/* this might actually be a 32-bit type */
typedef long int GLint64EXT;
typedef unsigned long int GLuint64EXT;
#endif
#define GL_TIME_ELAPSED_EXT 0x88BF
GLAPI void GLAPIENTRY glGetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64EXT *params);
GLAPI void GLAPIENTRY glGetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64EXT *params);
typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params);
typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params);
#endif /* GL_EXT_timer_query */
#ifndef GL_EXT_framebuffer_blit
#define GL_EXT_framebuffer_blit 1
#define GL_READ_FRAMEBUFFER_EXT 0x8CA8
#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CA6
#define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA
GLAPI void GLAPIENTRY
glBlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
GLbitfield mask, GLenum filter);
typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC)
(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
GLbitfield mask, GLenum filter);
#endif /* GL_EXT_framebuffer_blit */
#ifndef GL_EXT_packed_depth_stencil
#define GL_EXT_packed_depth_stencil 1
#define GL_DEPTH_STENCIL_EXT 0x84F9
#define GL_UNSIGNED_INT_24_8_EXT 0x84FA
#define GL_DEPTH24_STENCIL8_EXT 0x88F0
#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1
#endif /* GL_EXT_packed_depth_stencil */
/**
** NOTE!!!!! If you add new functions to this file, or update
** glext.h be sure to regenerate the gl_mangle.h file. See comments

View File

@@ -98,6 +98,7 @@
#define glBlendFuncSeparateEXT MANGLE(BlendFuncSeparateEXT)
#define glBlendFuncSeparateINGR MANGLE(BlendFuncSeparateINGR)
#define glBlendFuncSeparate MANGLE(BlendFuncSeparate)
#define glBlitFramebufferEXT MANGLE(BlitFramebufferEXT)
#define glBufferDataARB MANGLE(BufferDataARB)
#define glBufferData MANGLE(BufferData)
#define glBufferSubDataARB MANGLE(BufferSubDataARB)
@@ -273,7 +274,6 @@
#define glDetailTexFuncSGIS MANGLE(DetailTexFuncSGIS)
#define glDisableClientState MANGLE(DisableClientState)
#define glDisable MANGLE(Disable)
#define glDisableTraceMESA MANGLE(DisableTraceMESA)
#define glDisableVariantClientStateEXT MANGLE(DisableVariantClientStateEXT)
#define glDisableVertexAttribArrayARB MANGLE(DisableVertexAttribArrayARB)
#define glDisableVertexAttribArray MANGLE(DisableVertexAttribArray)
@@ -301,7 +301,6 @@
#define glElementPointerATI MANGLE(ElementPointerATI)
#define glEnableClientState MANGLE(EnableClientState)
#define glEnable MANGLE(Enable)
#define glEnableTraceMESA MANGLE(EnableTraceMESA)
#define glEnableVariantClientStateEXT MANGLE(EnableVariantClientStateEXT)
#define glEnableVertexAttribArrayARB MANGLE(EnableVertexAttribArrayARB)
#define glEnableVertexAttribArray MANGLE(EnableVertexAttribArray)
@@ -311,7 +310,6 @@
#define glEndOcclusionQueryNV MANGLE(EndOcclusionQueryNV)
#define glEndQueryARB MANGLE(EndQueryARB)
#define glEndQuery MANGLE(EndQuery)
#define glEndTraceMESA MANGLE(EndTraceMESA)
#define glEndVertexShaderEXT MANGLE(EndVertexShaderEXT)
#define glEvalCoord1d MANGLE(EvalCoord1d)
#define glEvalCoord1dv MANGLE(EvalCoord1dv)
@@ -780,7 +778,6 @@
#define glMultTransposeMatrixf MANGLE(MultTransposeMatrixf)
#define glNewList MANGLE(NewList)
#define glNewObjectBufferATI MANGLE(NewObjectBufferATI)
#define glNewTraceMESA MANGLE(NewTraceMESA)
#define glNormal3b MANGLE(Normal3b)
#define glNormal3bv MANGLE(Normal3bv)
#define glNormal3d MANGLE(Normal3d)
@@ -864,10 +861,12 @@
#define glProgramEnvParameter4dvARB MANGLE(ProgramEnvParameter4dvARB)
#define glProgramEnvParameter4fARB MANGLE(ProgramEnvParameter4fARB)
#define glProgramEnvParameter4fvARB MANGLE(ProgramEnvParameter4fvARB)
#define glProgramEnvParameters4fvEXT MANGLE(ProgramEnvParameters4fvEXT)
#define glProgramLocalParameter4dARB MANGLE(ProgramLocalParameter4dARB)
#define glProgramLocalParameter4dvARB MANGLE(ProgramLocalParameter4dvARB)
#define glProgramLocalParameter4fARB MANGLE(ProgramLocalParameter4fARB)
#define glProgramLocalParameter4fvARB MANGLE(ProgramLocalParameter4fvARB)
#define glProgramLocalParameters4fvEXT MANGLE(ProgramLocalParameters4fvEXT)
#define glProgramNamedParameter4dNV MANGLE(ProgramNamedParameter4dNV)
#define glProgramNamedParameter4dvNV MANGLE(ProgramNamedParameter4dvNV)
#define glProgramNamedParameter4fNV MANGLE(ProgramNamedParameter4fNV)
@@ -920,6 +919,7 @@
#define glRectsv MANGLE(Rectsv)
#define glReferencePlaneSGIX MANGLE(ReferencePlaneSGIX)
#define glRenderbufferStorageEXT MANGLE(RenderbufferStorageEXT)
#define glRenderbufferStorageMultisampleEXT MANGLE(RenderbufferStorageMultisampleEXT)
#define glRenderMode MANGLE(RenderMode)
#define glReplacementCodePointerSUN MANGLE(ReplacementCodePointerSUN)
#define glReplacementCodeubSUN MANGLE(ReplacementCodeubSUN)
@@ -1019,6 +1019,7 @@
#define glSpriteParameteriSGIX MANGLE(SpriteParameteriSGIX)
#define glSpriteParameterivSGIX MANGLE(SpriteParameterivSGIX)
#define glStartInstrumentsSGIX MANGLE(StartInstrumentsSGIX)
#define glStencilClearTagEXT MANGLE(StencilClearTagEXT)
#define glStencilFunc MANGLE(StencilFunc)
#define glStencilFuncSeparateATI MANGLE(StencilFuncSeparateATI)
#define glStencilFuncSeparate MANGLE(StencilFuncSeparate)
@@ -1137,12 +1138,6 @@
#define glTextureLightEXT MANGLE(TextureLightEXT)
#define glTextureMaterialEXT MANGLE(TextureMaterialEXT)
#define glTextureNormalEXT MANGLE(TextureNormalEXT)
#define glTraceAssertAttribMESA MANGLE(TraceAssertAttribMESA)
#define glTraceCommentMESA MANGLE(TraceCommentMESA)
#define glTraceListMESA MANGLE(TraceListMESA)
#define glTracePointerMESA MANGLE(TracePointerMESA)
#define glTracePointerRangeMESA MANGLE(TracePointerRangeMESA)
#define glTraceTextureMESA MANGLE(TraceTextureMESA)
#define glTrackMatrixNV MANGLE(TrackMatrixNV)
#define glTranslated MANGLE(Translated)
#define glTranslatef MANGLE(Translatef)
@@ -1180,10 +1175,16 @@
#define glUniform4iv MANGLE(Uniform4iv)
#define glUniformMatrix2fvARB MANGLE(UniformMatrix2fvARB)
#define glUniformMatrix2fv MANGLE(UniformMatrix2fv)
#define glUniformMatrix2x3fv MANGLE(UniformMatrix2x3fv)
#define glUniformMatrix2x4fv MANGLE(UniformMatrix2x4fv)
#define glUniformMatrix3fvARB MANGLE(UniformMatrix3fvARB)
#define glUniformMatrix3fv MANGLE(UniformMatrix3fv)
#define glUniformMatrix3x2fv MANGLE(UniformMatrix3x2fv)
#define glUniformMatrix3x4fv MANGLE(UniformMatrix3x4fv)
#define glUniformMatrix4fvARB MANGLE(UniformMatrix4fvARB)
#define glUniformMatrix4fv MANGLE(UniformMatrix4fv)
#define glUniformMatrix4x2fv MANGLE(UniformMatrix4x2fv)
#define glUniformMatrix4x3fv MANGLE(UniformMatrix4x3fv)
#define glUnlockArraysEXT MANGLE(UnlockArraysEXT)
#define glUnmapBufferARB MANGLE(UnmapBufferARB)
#define glUnmapBuffer MANGLE(UnmapBuffer)
@@ -1474,6 +1475,5 @@
#define glWindowPos4sMESA MANGLE(WindowPos4sMESA)
#define glWindowPos4svMESA MANGLE(WindowPos4svMESA)
#define glWriteMaskEXT MANGLE(WriteMaskEXT)
gl.h:GLAPI void GLAPIENTRY
#endif /* GL_MANGLE_H */

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 2005/06/20 */
/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */
#define GL_GLEXT_VERSION 29
/* glext.h last updated 2007/02/12 */
/* Current version at http://www.opengl.org/registry/ */
#define GL_GLEXT_VERSION 39
#ifndef GL_VERSION_1_2
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
@@ -459,6 +453,32 @@ extern "C" {
#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
#endif
#ifndef GL_VERSION_2_1
#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F
#define GL_PIXEL_PACK_BUFFER 0x88EB
#define GL_PIXEL_UNPACK_BUFFER 0x88EC
#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
#define GL_FLOAT_MAT2x3 0x8B65
#define GL_FLOAT_MAT2x4 0x8B66
#define GL_FLOAT_MAT3x2 0x8B67
#define GL_FLOAT_MAT3x4 0x8B68
#define GL_FLOAT_MAT4x2 0x8B69
#define GL_FLOAT_MAT4x3 0x8B6A
#define GL_SRGB 0x8C40
#define GL_SRGB8 0x8C41
#define GL_SRGB_ALPHA 0x8C42
#define GL_SRGB8_ALPHA8 0x8C43
#define GL_SLUMINANCE_ALPHA 0x8C44
#define GL_SLUMINANCE8_ALPHA8 0x8C45
#define GL_SLUMINANCE 0x8C46
#define GL_SLUMINANCE8 0x8C47
#define GL_COMPRESSED_SRGB 0x8C48
#define GL_COMPRESSED_SRGB_ALPHA 0x8C49
#define GL_COMPRESSED_SLUMINANCE 0x8C4A
#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B
#endif
#ifndef GL_ARB_multitexture
#define GL_TEXTURE0_ARB 0x84C0
#define GL_TEXTURE1_ARB 0x84C1
@@ -2993,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
@@ -3038,6 +3057,328 @@ extern "C" {
#ifndef GL_GREMEDY_string_marker
#endif
#ifndef GL_EXT_packed_depth_stencil
#define GL_DEPTH_STENCIL_EXT 0x84F9
#define GL_UNSIGNED_INT_24_8_EXT 0x84FA
#define GL_DEPTH24_STENCIL8_EXT 0x88F0
#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1
#endif
#ifndef GL_EXT_stencil_clear_tag
#define GL_STENCIL_TAG_BITS_EXT 0x88F2
#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3
#endif
#ifndef GL_EXT_texture_sRGB
#define GL_SRGB_EXT 0x8C40
#define GL_SRGB8_EXT 0x8C41
#define GL_SRGB_ALPHA_EXT 0x8C42
#define GL_SRGB8_ALPHA8_EXT 0x8C43
#define GL_SLUMINANCE_ALPHA_EXT 0x8C44
#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45
#define GL_SLUMINANCE_EXT 0x8C46
#define GL_SLUMINANCE8_EXT 0x8C47
#define GL_COMPRESSED_SRGB_EXT 0x8C48
#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49
#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A
#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B
#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
#endif
#ifndef GL_EXT_framebuffer_blit
#define GL_READ_FRAMEBUFFER_EXT 0x8CA8
#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
#define GL_READ_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT
#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CAA
#endif
#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
#define GL_TEXTURE_1D_STACK_MESAX 0x8759
#define GL_TEXTURE_2D_STACK_MESAX 0x875A
#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B
#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C
#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D
#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E
#endif
#ifndef GL_EXT_timer_query
#define GL_TIME_ELAPSED_EXT 0x88BF
#endif
#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
/*************************************************************/
@@ -3074,6 +3415,48 @@ typedef unsigned short GLhalfARB;
typedef unsigned short GLhalfNV;
#endif
#ifndef GLEXT_64_TYPES_DEFINED
/* 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 GL_EXT_timer_query extension). */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#include <inttypes.h>
#elif defined(__sun__)
#include <inttypes.h>
#if defined(__STDC__)
#if defined(__arch64__)
typedef long int int64_t;
typedef unsigned long int uint64_t;
#else
typedef long long int int64_t;
typedef unsigned long long int uint64_t;
#endif /* __arch64__ */
#endif /* __STDC__ */
#elif defined( __VMS )
#include <inttypes.h>
#elif defined(__SCO__) || defined(__USLC__)
#include <stdint.h>
#elif defined(__UNIXOS2__) || defined(__SOL64__)
typedef long int int32_t;
typedef long long int int64_t;
typedef unsigned long long int uint64_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;
#else
#include <inttypes.h> /* Fallback option */
#endif
#endif
#ifndef GL_EXT_timer_query
typedef int64_t GLint64EXT;
typedef uint64_t GLuint64EXT;
#endif
#ifndef GL_VERSION_1_2
#define GL_VERSION_1_2 1
#ifdef GL_GLEXT_PROTOTYPES
@@ -3586,6 +3969,24 @@ typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort
typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
#endif
#ifndef GL_VERSION_2_1
#define GL_VERSION_2_1 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glUniformMatrix2x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
GLAPI void APIENTRY glUniformMatrix3x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
GLAPI void APIENTRY glUniformMatrix2x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
GLAPI void APIENTRY glUniformMatrix4x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
GLAPI void APIENTRY glUniformMatrix3x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
GLAPI void APIENTRY glUniformMatrix4x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
#endif
#ifndef GL_ARB_multitexture
#define GL_ARB_multitexture 1
#ifdef GL_GLEXT_PROTOTYPES
@@ -4293,8 +4694,8 @@ typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum f
typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
#endif
#ifndef GL_EXT_color_matrix
#define GL_EXT_color_matrix 1
#ifndef GL_SGI_color_matrix
#define GL_SGI_color_matrix 1
#endif
#ifndef GL_SGI_color_table
@@ -6487,6 +6888,370 @@ GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei, const GLvoid *);
typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string);
#endif
#ifndef GL_EXT_packed_depth_stencil
#define GL_EXT_packed_depth_stencil 1
#endif
#ifndef GL_EXT_stencil_clear_tag
#define GL_EXT_stencil_clear_tag 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glStencilClearTagEXT (GLsizei, GLuint);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag);
#endif
#ifndef GL_EXT_texture_sRGB
#define GL_EXT_texture_sRGB 1
#endif
#ifndef GL_EXT_framebuffer_blit
#define GL_EXT_framebuffer_blit 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glBlitFramebufferEXT (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
#endif
#ifndef GL_EXT_framebuffer_multisample
#define GL_EXT_framebuffer_multisample 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
#endif
#ifndef GL_MESAX_texture_stack
#define GL_MESAX_texture_stack 1
#endif
#ifndef GL_EXT_timer_query
#define GL_EXT_timer_query 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint, GLenum, GLint64EXT *);
GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint, GLenum, GLuint64EXT *);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params);
typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params);
#endif
#ifndef GL_EXT_gpu_program_parameters
#define GL_EXT_gpu_program_parameters 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
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

@@ -49,6 +49,7 @@ typedef struct GLFBDevContextRec *GLFBDevContextPtr;
#define GLFBDEV_STENCIL_SIZE 103
#define GLFBDEV_ACCUM_SIZE 104
#define GLFBDEV_LEVEL 105
#define GLFBDEV_MULTISAMPLE 106
#define GLFBDEV_NONE 0
/* For glFBDevGetString */

View File

@@ -1,21 +1,25 @@
/*
* Mesa 3-D graphics library
* Version: 4.1
* Copyright (C) 1995-1998 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* 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.
*/
@@ -48,6 +52,28 @@
#define glXGetVideoSyncSGI mglXGetVideoSyncSGI
#define glXWaitVideoSyncSGI mglXWaitVideoSyncSGI
/* GLX 1.2 */
#define glXGetCurrentDisplay mglXGetCurrentDisplay
/* GLX 1.3 */
#define glXChooseFBConfig mglXChooseFBConfig
#define glXGetFBConfigAttrib mglXGetFBConfigAttrib
#define glXGetFBConfigs mglXGetFBConfigs
#define glXGetVisualFromFBConfig mglXGetVisualFromFBConfig
#define glXCreateWindow mglXCreateWindow
#define glXDestroyWindow mglXDestroyWindow
#define glXCreatePixmap mglXCreatePixmap
#define glXDestroyPixmap mglXDestroyPixmap
#define glXCreatePbuffer mglXCreatePbuffer
#define glXDestroyPbuffer mglXDestroyPbuffer
#define glXQueryDrawable mglXQueryDrawable
#define glXCreateNewContext mglXCreateNewContext
#define glXMakeContextCurrent mglXMakeContextCurrent
#define glXGetCurrentReadDrawable mglXGetCurrentReadDrawable
#define glXQueryContext mglXQueryContext
#define glXSelectEvent mglXSelectEvent
#define glXGetSelectedEvent mglXGetSelectedEvent
/* GLX 1.4 */
#define glXGetProcAddress mglXGetProcAddress

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 2004/07/26 */
/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */
#define GLX_GLXEXT_VERSION 6
/* glxext.h last updated 2007/02/13 */
/* Current version at http://www.opengl.org/registry/ */
#define GLX_GLXEXT_VERSION 18
#ifndef GLX_VERSION_1_3
#define GLX_WINDOW_BIT 0x00000001
@@ -128,6 +122,11 @@ extern "C" {
#define GLX_SAMPLES_ARB 100001
#endif
#ifndef GLX_ARB_fbconfig_float
#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9
#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
#endif
#ifndef GLX_SGIS_multisample
#define GLX_SAMPLE_BUFFERS_SGIS 100000
#define GLX_SAMPLES_SGIS 100001
@@ -282,7 +281,11 @@ extern "C" {
#ifndef GLX_OML_sync_control
#endif
#ifndef GLX_SGIX_hyperpipe_group
#ifndef GLX_NV_float_buffer
#define GLX_FLOAT_COMPONENTS_NV 0x20B0
#endif
#ifndef GLX_SGIX_hyperpipe
#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
#define GLX_BAD_HYPERPIPE_SGIX 92
@@ -298,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
/*************************************************************/
@@ -331,24 +379,41 @@ typedef struct {
} GLXBufferClobberEventSGIX;
#endif
#if defined(__sun__) || defined(__osf__)
#ifndef GLEXT_64_TYPES_DEFINED
/* This code block is duplicated in glxext.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). */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#include <inttypes.h>
#elif defined(__sun__)
#include <inttypes.h>
#if defined(__STDC__)
#if defined(__arch64__)
typedef long int int64_t;
typedef unsigned long int uint64_t;
#else
typedef long long int int64_t;
typedef long long int int64_t;
typedef unsigned long long int uint64_t;
#endif /* __arch64__ */
#endif /* __STDC__ */
#elif defined(__UNIXOS2__) || defined(__SOL64__)
typedef long int int32_t;
typedef long long int int64_t;
#elif defined( __VMS )
#include <inttypes.h>
#elif defined(__SCO__) || defined(__USLC__)
#include <stdint.h>
#elif defined(WIN32) && defined(__GNUC__)
#elif defined(__UNIXOS2__) || defined(__SOL64__)
typedef long int int32_t;
typedef long long int int64_t;
typedef unsigned long long int uint64_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;
#else
#include <inttypes.h> /* Fallback option */
#endif
#endif
#ifndef GLX_VERSION_1_3
@@ -413,6 +478,10 @@ typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procNam
#define GLX_ARB_multisample 1
#endif
#ifndef GLX_ARB_fbconfig_float
#define GLX_ARB_fbconfig_float 1
#endif
#ifndef GLX_SGIS_multisample
#define GLX_SGIS_multisample 1
#endif
@@ -631,8 +700,12 @@ typedef Bool ( * PFNGLXWAITFORMSCOMLPROC) (Display *dpy, GLXDrawable drawable, i
typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
#endif
#ifndef GLX_SGIX_hyperpipe_group
#define GLX_SGIX_hyperpipe_group 1
#ifndef GLX_NV_float_buffer
#define GLX_NV_float_buffer 1
#endif
#ifndef GLX_SGIX_hyperpipe
#define GLX_SGIX_hyperpipe 1
typedef struct {
char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
@@ -686,6 +759,25 @@ 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
}
#endif

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

@@ -1,4 +1,3 @@
/* $XFree86: xc/lib/GL/include/GL/internal/glcore.h,v 1.7 2001/03/25 05:32:00 tsi Exp $ */
#ifndef __gl_core_h_
#define __gl_core_h_
@@ -37,9 +36,7 @@
**
*/
#ifndef XFree86LOADER
#include <sys/types.h>
#endif
#ifdef CAPI
#undef CAPI
@@ -64,12 +61,18 @@ typedef struct __GLinterfaceRec __GLinterface;
** and used by the "operating system".
*/
/*
** Mode and limit information for a context. This information is
** kept around in the context so that values can be used during
** command execution, and for returning information about the
** context to the application.
*/
/**
* Mode and limit information for a context. This information is
* kept around in the context so that values can be used during
* command execution, and for returning information about the
* context to the application.
*
* Instances of this structure are shared by the driver and the loader. To
* maintain binary compatability, new fields \b must be added only to the
* end of the structure.
*
* \sa _gl_context_modes_create
*/
typedef struct __GLcontextModesRec {
struct __GLcontextModesRec * next;
@@ -186,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
@@ -464,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;

File diff suppressed because it is too large Load Diff

View File

@@ -25,6 +25,7 @@ PROGS = \
fire \
fogcoord \
fplight \
fslight \
gamma \
gearbox \
gears \
@@ -112,6 +113,10 @@ trackball.o: trackball.c trackball.h
$(CC) -c -I$(INCDIR) $(CFLAGS) trackball.c
extfuncs.h: $(TOP)/progs/util/extfuncs.h
cp $< .
reflect: reflect.o showbuffer.o readtex.o
$(CC) -I$(INCDIR) $(CFLAGS) reflect.o showbuffer.o readtex.o $(APP_LIB_DEPS) -o $@
@@ -140,6 +145,9 @@ engine.o: engine.c trackball.h
$(CC) -c -I$(INCDIR) $(CFLAGS) engine.c
fslight.c: extfuncs.h
clean:
-rm -f $(PROGS)
-rm -f *.o *~

View File

@@ -16,6 +16,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <GL/gl.h>
#include <GL/glut.h>
#include <GL/glext.h>
@@ -56,7 +57,16 @@ static PFNGLATTACHOBJECTARBPROC glAttachObjectARB = NULL;
static PFNGLLINKPROGRAMARBPROC glLinkProgramARB = NULL;
static PFNGLUSEPROGRAMOBJECTARBPROC glUseProgramObjectARB = NULL;
static PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocationARB = NULL;
static PFNGLUNIFORM4FVARBPROC glUniform4fvARB = NULL;
static PFNGLUNIFORM3FVARBPROC glUniform3fvARB = NULL;
static PFNGLUNIFORM3FVARBPROC glUniform4fvARB = NULL;
static void normalize (GLfloat *dst, const GLfloat *src)
{
GLfloat len = sqrtf (src[0] * src[0] + src[1] * src[1] + src[2] * src[2]);
dst[0] = src[0] / len;
dst[1] = src[1] / len;
dst[2] = src[2] / len;
}
static void Redisplay (void)
{
@@ -64,8 +74,11 @@ static void Redisplay (void)
if (pixelLight)
{
GLfloat vec[3];
glUseProgramObjectARB (program);
glUniform4fvARB (uLightPos, 1, lightPos);
normalize (vec, lightPos);
glUniform3fvARB (uLightPos, 1, vec);
glDisable(GL_LIGHTING);
}
else
@@ -186,24 +199,25 @@ static void SpecialKey (int key, int x, int y)
static void Init (void)
{
static const char *fragShaderText =
"uniform vec4 lightPos;\n"
"uniform vec4 diffuse;\n"
"uniform vec4 specular;\n"
"void main () {\n"
" // Compute dot product of light direction and normal vector\n"
" float dotProd;\n"
" dotProd = clamp (dot (normalize (lightPos).xyz, normalize (gl_TexCoord[0]).xyz), 0.0, 1.0);\n"
" // Compute diffuse and specular contributions\n"
" gl_FragColor = diffuse * dotProd + specular * pow (dotProd, 20.0);\n"
"}\n"
;
static const char *vertShaderText =
"void main () {\n"
" gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n"
" gl_TexCoord[0] = vec4 (gl_NormalMatrix * gl_Normal, 1.0);\n"
"}\n"
;
static const char *fragShaderText =
"uniform vec3 lightPos;\n"
"uniform vec4 diffuse;\n"
"uniform vec4 specular;\n"
"varying vec3 normal;\n"
"void main () {\n"
" // Compute dot product of light direction and normal vector\n"
" float dotProd = max (dot (lightPos, normalize (normal)), 0.0);\n"
" // Compute diffuse and specular contributions\n"
" gl_FragColor = diffuse * dotProd + specular * pow (dotProd, 20.0);\n"
"}\n"
;
static const char *vertShaderText =
"varying vec3 normal;\n"
"void main () {\n"
" gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n"
" normal = gl_NormalMatrix * gl_Normal;\n"
"}\n"
;
if (!glutExtensionSupported ("GL_ARB_fragment_shader"))
{
@@ -234,7 +248,8 @@ static void Init (void)
glLinkProgramARB = (PFNGLLINKPROGRAMARBPROC) GETPROCADDRESS ("glLinkProgramARB");
glUseProgramObjectARB = (PFNGLUSEPROGRAMOBJECTARBPROC) GETPROCADDRESS ("glUseProgramObjectARB");
glGetUniformLocationARB = (PFNGLGETUNIFORMLOCATIONARBPROC) GETPROCADDRESS ("glGetUniformLocationARB");
glUniform4fvARB = (PFNGLUNIFORM4FVARBPROC) GETPROCADDRESS ("glUniform4fvARB");
glUniform3fvARB = (PFNGLUNIFORM3FVARBPROC) GETPROCADDRESS ("glUniform3fvARB");
glUniform4fvARB = (PFNGLUNIFORM3FVARBPROC) GETPROCADDRESS ("glUniform4fvARB");
fragShader = glCreateShaderObjectARB (GL_FRAGMENT_SHADER_ARB);
glShaderSourceARB (fragShader, 1, &fragShaderText, NULL);
@@ -254,8 +269,8 @@ static void Init (void)
uDiffuse = glGetUniformLocationARB (program, "diffuse");
uSpecular = glGetUniformLocationARB (program, "specular");
glUniform4fvARB (uDiffuse, 1, diffuse);
glUniform4fvARB (uSpecular, 1, specular);
glUniform4fvARB (uDiffuse, 1, diffuse);
glUniform4fvARB (uSpecular, 1, specular);
glClearColor (0.3f, 0.3f, 0.3f, 0.0f);
glEnable (GL_DEPTH_TEST);

View File

@@ -454,6 +454,7 @@ static void usage(void)
int main( int argc, char *argv[] )
{
glutInit(&argc, argv);
glutInitWindowPosition(0, 0);
glutInitWindowSize(600, 500);
glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );

615
progs/demos/fslight.c Normal file
View File

@@ -0,0 +1,615 @@
/**
* Test OpenGL 2.0 vertex/fragment shaders.
* Brian Paul
* 1 November 2006
*
* Based on ARB version by:
* Michal Krol
* 20 February 2006
*
* Based on the original demo by:
* Brian Paul
* 17 April 2003
*/
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <GL/gl.h>
#include <GL/glut.h>
#include <GL/glext.h>
#include "extfuncs.h"
static GLint CoordAttrib = 0;
static char *FragProgFile = NULL;
static char *VertProgFile = NULL;
static GLfloat diffuse[4] = { 0.5f, 0.5f, 1.0f, 1.0f };
static GLfloat specular[4] = { 0.8f, 0.8f, 0.8f, 1.0f };
static GLfloat lightPos[4] = { 0.0f, 10.0f, 20.0f, 0.0f };
static GLfloat delta = 1.0f;
static GLuint fragShader;
static GLuint vertShader;
static GLuint program;
static GLint uDiffuse;
static GLint uSpecular;
static GLint uTexture;
static GLuint SphereList, RectList, CurList;
static GLint win = 0;
static GLboolean anim = GL_FALSE;
static GLboolean wire = GL_FALSE;
static GLboolean pixelLight = GL_TRUE;
static GLint t0 = 0;
static GLint frames = 0;
static GLfloat xRot = 90.0f, yRot = 0.0f;
static void
normalize(GLfloat *dst, const GLfloat *src)
{
GLfloat len = sqrtf(src[0] * src[0] + src[1] * src[1] + src[2] * src[2]);
dst[0] = src[0] / len;
dst[1] = src[1] / len;
dst[2] = src[2] / len;
dst[3] = src[3];
}
static void
Redisplay(void)
{
GLfloat vec[4];
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
/* update light position */
normalize(vec, lightPos);
glLightfv(GL_LIGHT0, GL_POSITION, vec);
if (pixelLight) {
glUseProgram_func(program);
glDisable(GL_LIGHTING);
}
else {
glUseProgram_func(0);
glEnable(GL_LIGHTING);
}
glPushMatrix();
glRotatef(xRot, 1.0f, 0.0f, 0.0f);
glRotatef(yRot, 0.0f, 1.0f, 0.0f);
/*
glutSolidSphere(2.0, 10, 5);
*/
glCallList(CurList);
glPopMatrix();
glutSwapBuffers();
frames++;
if (anim) {
GLint t = glutGet(GLUT_ELAPSED_TIME);
if (t - t0 >= 5000) {
GLfloat seconds =(GLfloat)(t - t0) / 1000.0f;
GLfloat fps = frames / seconds;
printf("%d frames in %6.3f seconds = %6.3f FPS\n",
frames, seconds, fps);
t0 = t;
frames = 0;
}
}
}
static void
Idle(void)
{
lightPos[0] += delta;
if (lightPos[0] > 25.0f || lightPos[0] < -25.0f)
delta = -delta;
glutPostRedisplay();
}
static void
Reshape(int width, int height)
{
glViewport(0, 0, width, height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 25.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(0.0f, 0.0f, -15.0f);
}
static void
CleanUp(void)
{
glDeleteShader_func(fragShader);
glDeleteShader_func(vertShader);
glDeleteProgram_func(program);
glutDestroyWindow(win);
}
static void
Key(unsigned char key, int x, int y)
{
(void) x;
(void) y;
switch(key) {
case ' ':
case 'a':
anim = !anim;
if (anim)
glutIdleFunc(Idle);
else
glutIdleFunc(NULL);
break;
case 'x':
lightPos[0] -= 1.0f;
break;
case 'X':
lightPos[0] += 1.0f;
break;
case 'w':
wire = !wire;
if (wire)
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
else
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
break;
case 'o':
if (CurList == SphereList)
CurList = RectList;
else
CurList = SphereList;
break;
case 'p':
pixelLight = !pixelLight;
if (pixelLight)
printf("Per-pixel lighting\n");
else
printf("Conventional lighting\n");
break;
case 27:
CleanUp();
exit(0);
break;
}
glutPostRedisplay();
}
static void
SpecialKey(int key, int x, int y)
{
const GLfloat step = 3.0f;
(void) x;
(void) y;
switch(key) {
case GLUT_KEY_UP:
xRot -= step;
break;
case GLUT_KEY_DOWN:
xRot += step;
break;
case GLUT_KEY_LEFT:
yRot -= step;
break;
case GLUT_KEY_RIGHT:
yRot += step;
break;
}
glutPostRedisplay();
}
static void
TestFunctions(void)
{
printf("Error 0x%x at line %d\n", glGetError(), __LINE__);
{
GLfloat pos[3];
printf("Error 0x%x at line %d\n", glGetError(), __LINE__);
printf("Light pos %g %g %g\n", pos[0], pos[1], pos[2]);
}
{
GLfloat m[16], result[16];
GLint mPos;
int i;
for (i = 0; i < 16; i++)
m[i] = (float) i;
mPos = glGetUniformLocation_func(program, "m");
printf("Error 0x%x at line %d\n", glGetError(), __LINE__);
glUniformMatrix4fv_func(mPos, 1, GL_FALSE, m);
printf("Error 0x%x at line %d\n", glGetError(), __LINE__);
glGetUniformfv_func(program, mPos, result);
printf("Error 0x%x at line %d\n", glGetError(), __LINE__);
for (i = 0; i < 16; i++) {
printf("%8g %8g\n", m[i], result[i]);
}
}
assert(glIsProgram_func(program));
assert(glIsShader_func(fragShader));
assert(glIsShader_func(vertShader));
/* attached shaders */
{
GLuint shaders[20];
GLsizei count;
int i;
glGetAttachedShaders_func(program, 20, &count, shaders);
for (i = 0; i < count; i++) {
printf("Attached: %u\n", shaders[i]);
assert(shaders[i] == fragShader ||
shaders[i] == vertShader);
}
}
{
GLchar log[1000];
GLsizei len;
glGetShaderInfoLog_func(vertShader, 1000, &len, log);
printf("Vert Shader Info Log: %s\n", log);
glGetShaderInfoLog_func(fragShader, 1000, &len, log);
printf("Frag Shader Info Log: %s\n", log);
glGetProgramInfoLog_func(program, 1000, &len, log);
printf("Program Info Log: %s\n", log);
}
}
static void
MakeTexture(void)
{
#define SZ0 128
#define SZ1 64
GLubyte image0[SZ0][SZ0][SZ0][4];
GLubyte image1[SZ1][SZ1][SZ1][4];
GLuint i, j, k;
/* level 0: two-tone gray checkboard */
for (i = 0; i < SZ0; i++) {
for (j = 0; j < SZ0; j++) {
for (k = 0; k < SZ0; k++) {
if ((i/8 + j/8 + k/8) & 1) {
image0[i][j][k][0] =
image0[i][j][k][1] =
image0[i][j][k][2] = 200;
}
else {
image0[i][j][k][0] =
image0[i][j][k][1] =
image0[i][j][k][2] = 100;
}
image0[i][j][k][3] = 255;
}
}
}
/* level 1: two-tone green checkboard */
for (i = 0; i < SZ1; i++) {
for (j = 0; j < SZ1; j++) {
for (k = 0; k < SZ1; k++) {
if ((i/8 + j/8 + k/8) & 1) {
image1[i][j][k][0] = 0;
image1[i][j][k][1] = 250;
image1[i][j][k][2] = 0;
}
else {
image1[i][j][k][0] = 0;
image1[i][j][k][1] = 200;
image1[i][j][k][2] = 0;
}
image1[i][j][k][3] = 255;
}
}
}
glActiveTexture(GL_TEXTURE2); /* unit 2 */
glBindTexture(GL_TEXTURE_2D, 42);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, SZ0, SZ0, 0,
GL_RGBA, GL_UNSIGNED_BYTE, image0);
glTexImage2D(GL_TEXTURE_2D, 1, GL_RGBA, SZ1, SZ1, 0,
GL_RGBA, GL_UNSIGNED_BYTE, image1);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 1);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glActiveTexture(GL_TEXTURE4); /* unit 4 */
glBindTexture(GL_TEXTURE_3D, 43);
glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA, SZ0, SZ0, SZ0, 0,
GL_RGBA, GL_UNSIGNED_BYTE, image0);
glTexImage3D(GL_TEXTURE_3D, 1, GL_RGBA, SZ1, SZ1, SZ1, 0,
GL_RGBA, GL_UNSIGNED_BYTE, image1);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAX_LEVEL, 1);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
}
static void
MakeSphere(void)
{
GLUquadricObj *obj = gluNewQuadric();
SphereList = glGenLists(1);
gluQuadricTexture(obj, GL_TRUE);
glNewList(SphereList, GL_COMPILE);
gluSphere(obj, 2.0f, 10, 5);
glEndList();
}
static void
VertAttrib(GLint index, float x, float y)
{
#if 1
glVertexAttrib2f_func(index, x, y);
#else
glTexCoord2f(x, y);
#endif
}
static void
MakeRect(void)
{
RectList = glGenLists(1);
glNewList(RectList, GL_COMPILE);
glNormal3f(0, 0, 1);
glBegin(GL_POLYGON);
VertAttrib(CoordAttrib, 0, 0); glVertex2f(-2, -2);
VertAttrib(CoordAttrib, 1, 0); glVertex2f( 2, -2);
VertAttrib(CoordAttrib, 1, 1); glVertex2f( 2, 2);
VertAttrib(CoordAttrib, 0, 1); glVertex2f(-2, 2);
glEnd(); /* XXX omit this and crash! */
glEndList();
}
static void
LoadAndCompileShader(GLuint shader, const char *text)
{
GLint stat;
glShaderSource_func(shader, 1, (const GLchar **) &text, NULL);
glCompileShader_func(shader);
glGetShaderiv_func(shader, GL_COMPILE_STATUS, &stat);
if (!stat) {
GLchar log[1000];
GLsizei len;
glGetShaderInfoLog_func(shader, 1000, &len, log);
fprintf(stderr, "fslight: problem compiling shader:\n%s\n", log);
exit(1);
}
}
/**
* Read a shader from a file.
*/
static void
ReadShader(GLuint shader, const char *filename)
{
const int max = 100*1000;
int n;
char *buffer = (char*) malloc(max);
FILE *f = fopen(filename, "r");
if (!f) {
fprintf(stderr, "fslight: Unable to open shader file %s\n", filename);
exit(1);
}
n = fread(buffer, 1, max, f);
printf("fslight: read %d bytes from shader file %s\n", n, filename);
if (n > 0) {
buffer[n] = 0;
LoadAndCompileShader(shader, buffer);
}
fclose(f);
free(buffer);
}
static void
CheckLink(GLuint prog)
{
GLint stat;
glGetProgramiv_func(prog, GL_LINK_STATUS, &stat);
if (!stat) {
GLchar log[1000];
GLsizei len;
glGetProgramInfoLog_func(prog, 1000, &len, log);
fprintf(stderr, "Linker error:\n%s\n", log);
}
}
static void
Init(void)
{
static const char *fragShaderText =
"uniform vec4 diffuse;\n"
"uniform vec4 specular;\n"
"varying vec3 normal;\n"
"void main() {\n"
" // Compute dot product of light direction and normal vector\n"
" float dotProd = max(dot(gl_LightSource[0].position.xyz, \n"
" normalize(normal)), 0.0);\n"
" // Compute diffuse and specular contributions\n"
" gl_FragColor = diffuse * dotProd + specular * pow(dotProd, 20.0);\n"
"}\n";
static const char *vertShaderText =
"varying vec3 normal;\n"
"void main() {\n"
" gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n"
" normal = gl_NormalMatrix * gl_Normal;\n"
"}\n";
const char *version;
version = (const char *) glGetString(GL_VERSION);
if (version[0] != '2' || version[1] != '.') {
printf("Warning: this program expects OpenGL 2.0\n");
/*exit(1);*/
}
GetExtensionFuncs();
fragShader = glCreateShader_func(GL_FRAGMENT_SHADER);
if (FragProgFile)
ReadShader(fragShader, FragProgFile);
else
LoadAndCompileShader(fragShader, fragShaderText);
vertShader = glCreateShader_func(GL_VERTEX_SHADER);
if (VertProgFile)
ReadShader(vertShader, VertProgFile);
else
LoadAndCompileShader(vertShader, vertShaderText);
program = glCreateProgram_func();
glAttachShader_func(program, fragShader);
glAttachShader_func(program, vertShader);
glLinkProgram_func(program);
CheckLink(program);
glUseProgram_func(program);
uDiffuse = glGetUniformLocation_func(program, "diffuse");
uSpecular = glGetUniformLocation_func(program, "specular");
uTexture = glGetUniformLocation_func(program, "texture");
printf("DiffusePos %d SpecularPos %d TexturePos %d\n",
uDiffuse, uSpecular, uTexture);
glUniform4fv_func(uDiffuse, 1, diffuse);
glUniform4fv_func(uSpecular, 1, specular);
/* assert(glGetError() == 0);*/
glUniform1i_func(uTexture, 2); /* use texture unit 2 */
/*assert(glGetError() == 0);*/
if (CoordAttrib) {
int i;
glBindAttribLocation_func(program, CoordAttrib, "coord");
i = glGetAttribLocation_func(program, "coord");
assert(i >= 0);
if (i != CoordAttrib) {
printf("Hmmm, NVIDIA bug?\n");
CoordAttrib = i;
}
else {
printf("Mesa bind attrib: coord = %d\n", i);
}
}
/*assert(glGetError() == 0);*/
glClearColor(0.3f, 0.3f, 0.3f, 0.0f);
glEnable(GL_DEPTH_TEST);
glEnable(GL_LIGHT0);
glEnable(GL_LIGHTING);
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, diffuse);
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, specular);
glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 20.0f);
MakeSphere();
MakeRect();
CurList = SphereList;
MakeTexture();
printf("GL_RENDERER = %s\n",(const char *) glGetString(GL_RENDERER));
printf("Press p to toggle between per-pixel and per-vertex lighting\n");
/* test glGetShaderSource() */
if (0) {
GLsizei len = strlen(fragShaderText) + 1;
GLsizei lenOut;
GLchar *src =(GLchar *) malloc(len * sizeof(GLchar));
glGetShaderSource_func(fragShader, 0, NULL, src);
glGetShaderSource_func(fragShader, len, &lenOut, src);
assert(len == lenOut + 1);
assert(strcmp(src, fragShaderText) == 0);
free(src);
}
assert(glIsProgram_func(program));
assert(glIsShader_func(fragShader));
assert(glIsShader_func(vertShader));
glColor3f(1, 0, 0);
/* for testing state vars */
{
static GLfloat fc[4] = { 1, 1, 0, 0 };
static GLfloat amb[4] = { 1, 0, 1, 0 };
glFogfv(GL_FOG_COLOR, fc);
glLightfv(GL_LIGHT1, GL_AMBIENT, amb);
}
#if 0
TestFunctions();
#endif
}
static void
ParseOptions(int argc, char *argv[])
{
int i;
for (i = 1; i < argc; i++) {
if (strcmp(argv[i], "-fs") == 0) {
FragProgFile = argv[i+1];
}
else if (strcmp(argv[i], "-vs") == 0) {
VertProgFile = argv[i+1];
}
}
}
int
main(int argc, char *argv[])
{
glutInit(&argc, argv);
glutInitWindowPosition( 0, 0);
glutInitWindowSize(100, 100);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
win = glutCreateWindow(argv[0]);
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutSpecialFunc(SpecialKey);
glutDisplayFunc(Redisplay);
if (anim)
glutIdleFunc(Idle);
ParseOptions(argc, argv);
Init();
glutMainLoop();
return 0;
}

View File

@@ -471,6 +471,11 @@ main(int argc, char **argv)
glutAddMenuEntry("Quit", 666);
glutAttachMenu(GLUT_RIGHT_BUTTON);
if (!glutExtensionSupported("GL_ARB_point_parameters")) {
fprintf(stderr, "Sorry, GL_ARB_point_parameters is not supported.\n");
return -1;
}
glShadeModel(GL_FLAT);
glEnable(GL_DEPTH_TEST);
glEnable(GL_POINT_SMOOTH);

View File

@@ -29,33 +29,32 @@ static GLboolean ScaleAndBias = GL_FALSE;
static GLboolean Benchmark = GL_FALSE;
static GLubyte *TempImage = NULL;
#if 0
#define COMBO 1
#if COMBO == 0
#define ReadFormat ImgFormat
#define ReadType GL_UNSIGNED_BYTE
#endif
#if 1
#elif COMBO == 1
static GLenum ReadFormat = GL_RGBA;
static GLenum ReadType = GL_UNSIGNED_BYTE;
#endif
#if 0
#elif COMBO == 2
static GLenum ReadFormat = GL_RGB;
static GLenum ReadType = GL_UNSIGNED_BYTE;
#endif
#if 0
#elif COMBO == 3
static GLenum ReadFormat = GL_RGB;
static GLenum ReadType = GL_UNSIGNED_SHORT_5_6_5;
#endif
#if 0
#elif COMBO == 4
static GLenum ReadFormat = GL_RGBA;
static GLenum ReadType = GL_UNSIGNED_SHORT_1_5_5_5_REV;
#endif
#if 0
#elif COMBO == 5
static GLenum ReadFormat = GL_BGRA;
static GLenum ReadType = GL_UNSIGNED_SHORT_5_5_5_1;
#endif
#if 0
#elif COMBO == 6
static GLenum ReadFormat = GL_BGRA;
static GLenum ReadType = GL_UNSIGNED_SHORT_4_4_4_4_REV;
#elif COMBO == 7
static GLenum ReadFormat = GL_RGBA;
static GLenum ReadType = GL_HALF_FLOAT_ARB;
#undef GL_OES_read_format
#endif
@@ -313,8 +312,10 @@ Init( GLboolean ciMode )
Reset();
/* allocate an extra 1KB in case we're tinkering with pack alignment */
TempImage = (GLubyte *) malloc(ImgWidth * ImgHeight * 4 * sizeof(GLubyte)
/* allocate large TempImage to store and image data type, plus an
* extra 1KB in case we're tinkering with pack alignment.
*/
TempImage = (GLubyte *) malloc(ImgWidth * ImgHeight * 4 * 4
+ 1000);
assert(TempImage);
}

View File

@@ -537,6 +537,9 @@ main(int argc, char **argv)
glutAddMenuEntry("Quit", 666);
glutAttachMenu(GLUT_RIGHT_BUTTON);
makePointList();
makeSprite();
glShadeModel(GL_FLAT);
glEnable(GL_DEPTH_TEST);
glEnable(GL_POINT_SMOOTH);
@@ -546,9 +549,6 @@ main(int argc, char **argv)
glPointParameterfvARB(GL_POINT_DISTANCE_ATTENUATION_ARB, theQuad);
#endif
makePointList();
makeSprite();
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}

View File

@@ -20,101 +20,43 @@
#include "readtex.h"
enum {
WHOLERECT,
RENDER,
SWAPBUF,
UPLOAD_CONVENTIONAL,
UPLOAD_PBO_NAIVE,
UPLOAD_PBO_PINGPONG,
UPLOAD_PBO_WITH_RESET,
UPLOAD_NOOP,
#define ANIMATE 10
#define PBO 11
#define QUIT 100
QUIT
};
static GLint upload_style = UPLOAD_CONVENTIONAL;
static GLboolean Animate = GL_TRUE;
static GLboolean use_pbo = 1;
static GLboolean whole_rect = 1;
static GLboolean do_render = 1;
static GLboolean do_swapbuffers = 1;
static GLuint col = 0x0;
static GLfloat Drift = 0.0;
static GLfloat drift_increment = 1/255.0;
static GLfloat Xrot = 20.0, Yrot = 30.0;
static GLuint Width = 1024;
static GLuint Height = 512;
#define NR_PBO 2
static GLuint texObj, DrawPBO[NR_PBO];
static void Idle( void )
{
col++;
glutPostRedisplay();
if (Animate) {
Drift += drift_increment;
if (Drift >= 1.0)
Drift = 0.0;
glutPostRedisplay();
}
}
static int max( int a, int b ) { return a > b ? a : b; }
static int min( int a, int b ) { return a < b ? a : b; }
static void DrawObject()
{
GLint size = Width * Height * 4;
static char *static_image = NULL;
static int current = 0;
switch (upload_style) {
case UPLOAD_PBO_NAIVE:
/* Continually upload from the one pbo without any attempt to
* decouple from hardware trying to access the same data:
*/
glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, DrawPBO[0]);
{
char *image = glMapBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, GL_WRITE_ONLY_ARB);
memset(image, col&0xff, size);
glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT);
}
glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA, Width, Height, 0,
GL_BGRA, GL_UNSIGNED_BYTE, NULL);
glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, 0);
break;
case UPLOAD_PBO_PINGPONG:
/* Cycle through the available upload buffers to avoid waiting
* on buffers currently enqueued on the hardware. Avoids
* waiting on buffer contents that may still be referenced by
* hardware.
*/
current = (current + 1) % NR_PBO;
glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, DrawPBO[current]);
{
char *image = glMapBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, GL_WRITE_ONLY_ARB);
memset(image, col&0xff, size);
glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT);
}
glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA, Width, Height, 0,
GL_BGRA, GL_UNSIGNED_BYTE, NULL);
glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, 0);
break;
case UPLOAD_PBO_WITH_RESET:
/* Alternate approach, uses BufferDataARB(NULL) to explicitly
* release the old image contents from the pbo prior to upload.
* Similar effect to double buffering pbos as above, but a
* little more subtle as the implications of the NULL data are
* not entirely clear. I don't know if all drivers will take
* full advantage of the optimization or not.
*/
glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, DrawPBO[0]);
if (use_pbo) {
/* XXX: This is extremely important - semantically makes the buffer
* contents undefined, but in practice means that the driver can
* release the old copy of the texture and allocate a new one
@@ -124,33 +66,34 @@ static void DrawObject()
{
char *image = glMapBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, GL_WRITE_ONLY_ARB);
memset(image, col&0xff, size);
printf("char %d\n", (unsigned char)(Drift * 255));
memset(image, size, (unsigned char)(Drift * 255));
glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT);
}
/* BGRA is required for most hardware paths:
*/
glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA, Width, Height, 0,
GL_BGRA, GL_UNSIGNED_BYTE, NULL);
glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, 0);
break;
}
else {
static char *image = NULL;
if (image == NULL)
image = malloc(size);
case UPLOAD_CONVENTIONAL:
if (static_image == NULL)
static_image = malloc(size);
memset(static_image, col&0xff, size);
memset(image, size, (unsigned char)(Drift * 255));
/* BGRA should be the fast path for regular uploads as well.
*/
glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA, Width, Height, 0,
GL_BGRA, GL_UNSIGNED_BYTE, static_image);
break;
case UPLOAD_NOOP:
break;
GL_BGRA, GL_UNSIGNED_BYTE, image);
}
if (do_render)
{
int x,y,w,h;
@@ -173,10 +116,10 @@ static void DrawObject()
glTexCoord2f( x, y + h);
glVertex2f( x, y + h);
glTexCoord2f( x + w, y + h);
glTexCoord2f( x + w + .5, y + h);
glVertex2f( x + w, y + h );
glTexCoord2f( x + w, y);
glTexCoord2f( x + w, y + .5);
glVertex2f( x + w, y );
glEnd();
@@ -197,10 +140,7 @@ static void Display( void )
DrawObject();
glPopMatrix();
if (do_swapbuffers)
glutSwapBuffers();
else
glFlush();
glutSwapBuffers();
Frames++;
@@ -211,6 +151,7 @@ static void Display( void )
GLfloat fps = Frames / seconds;
printf("%d frames in %6.3f seconds = %6.3f FPS\n", Frames, seconds, fps);
drift_increment = 2.2 * seconds / Frames;
T0 = t;
Frames = 0;
}
@@ -226,34 +167,20 @@ static void Reshape( int width, int height )
gluOrtho2D( 0, width, height, 0 );
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
/* glTranslatef(0.375, 0.375, 0); */
glTranslatef(0.375, 0.375, 0);
}
static void ModeMenu(int entry)
{
switch (entry) {
case WHOLERECT:
whole_rect = !whole_rect;
break;
case RENDER:
do_render = !do_render;
break;
case SWAPBUF:
do_swapbuffers = !do_swapbuffers;
break;
case UPLOAD_CONVENTIONAL:
case UPLOAD_PBO_NAIVE:
case UPLOAD_PBO_PINGPONG:
case UPLOAD_PBO_WITH_RESET:
case UPLOAD_NOOP:
upload_style = entry;
break;
case QUIT:
if (entry==ANIMATE) {
Animate = !Animate;
}
else if (entry==PBO) {
use_pbo = !use_pbo;
}
else if (entry==QUIT) {
exit(0);
break;
}
glutPostRedisplay();
@@ -300,6 +227,7 @@ static void SpecialKey( int key, int x, int y )
static void Init( int argc, char *argv[] )
{
const char *exten = (const char *) glGetString(GL_EXTENSIONS);
GLuint texObj, DrawPBO;
GLint size;
@@ -323,17 +251,12 @@ static void Init( int argc, char *argv[] )
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glGenBuffersARB(NR_PBO, DrawPBO);
glGenBuffersARB(1, &DrawPBO);
glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, DrawPBO);
glBufferDataARB(GL_PIXEL_UNPACK_BUFFER_EXT,
Width * Height * 4, NULL, GL_STREAM_DRAW);
{
int i;
for (i = 0; i < NR_PBO; i++) {
glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, DrawPBO[i]);
glBufferDataARB(GL_PIXEL_UNPACK_BUFFER_EXT, Width * Height * 4, NULL, GL_STREAM_DRAW_ARB);
}
glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, 0);
}
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
glEnable(GL_TEXTURE_RECTANGLE_ARB);
@@ -389,16 +312,8 @@ int main( int argc, char *argv[] )
glutIdleFunc( Idle );
glutCreateMenu(ModeMenu);
glutAddMenuEntry("Wholerect", WHOLERECT);
glutAddMenuEntry("Render", RENDER);
glutAddMenuEntry("Swapbuf", SWAPBUF);
glutAddMenuEntry("Upload style CONVENTIONAL", UPLOAD_CONVENTIONAL);
glutAddMenuEntry("Upload style PBO_NAIVE", UPLOAD_PBO_NAIVE);
glutAddMenuEntry("Upload style PBO_PINGPONG", UPLOAD_PBO_PINGPONG);
glutAddMenuEntry("Upload style PBO_WITH_RESET", UPLOAD_PBO_WITH_RESET);
glutAddMenuEntry("Upload style NOOP", UPLOAD_NOOP);
glutAddMenuEntry("Toggle Animation", ANIMATE);
glutAddMenuEntry("Toggle PBO", PBO);
glutAddMenuEntry("Quit", QUIT);
glutAttachMenu(GLUT_RIGHT_BUTTON);

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

@@ -27,9 +27,9 @@
#include <math.h>
#include <directfb.h>
#include <directfbgl.h>
#include <GL/gl.h>
#include <GL/directfbgl.h>
/* the super interface */

View File

@@ -159,9 +159,9 @@ So the angle is:
#include <unistd.h>
#include <directfb.h>
#include <directfbgl.h>
#include <GL/gl.h>
#include <GL/directfbgl.h>
/* the super interface */

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