Compare commits

...

3646 Commits

Author SHA1 Message Date
Ian Romanick
582e292a88 docs: Update 7.8.1 release MD5 sums 2010-04-05 12:45:20 -07:00
Brian Paul
5683d77b22 mesa: bump MESA_TINY version 2010-04-05 11:22:32 -06:00
Brian Paul
0e0de77f0e docs: added news item for 7.8.1 release 2010-04-05 11:12:59 -06:00
Brian Paul
659669d74c docs: add link to 7.8.1 release notes 2010-04-05 11:10:51 -06:00
Brian Paul
0eea33b069 softpipe: index the correct blend/mask state index
Need to check pipe_blend_state::independent_blend_enable to determine
which render target/index to use when checking blend enable and colormask
state.

This is part of the fix for piglit/fbo-drawbuffers
2010-04-05 11:00:54 -06:00
Ian Romanick
1ad1a51f14 docs: Add 7.8.1 release MD5 sums 2010-04-05 09:51:18 -07:00
Ian Romanick
88b7329cdd mesa: set version string to 7.8.1 2010-04-05 09:49:08 -07:00
Ian Romanick
dcaa2c6e76 Initial 7.8.1 release notes 2010-04-05 09:12:33 -07:00
Henri Verbeet
f820b263db mesa: update_arrays() depends on program state.
It uses ctx->VertexProgram._Current.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-04-05 09:34:31 -06:00
Ian Romanick
42ea25cb4e Update to final names from GLX_INTEL_swap_event spec
Fixes bug #27454.
2010-04-04 23:06:01 -07:00
Ian Romanick
f66733e077 gl: updated glxext.h to version 27 2010-04-04 16:53:41 -07:00
Vinson Lee
930838efcd util: Use GCC atomic bultins on GCC 4.1 and higher only. 2010-04-03 12:14:21 -07:00
Jeremy Huddleston
71b2f1d8e6 xdemos: Build object files first
This helps debugging on darwin.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-03 11:23:09 -07:00
Vinson Lee
67776f66c9 glx: Fix compilation errors on non-GLX_DIRECT_RENDERING builds.
Add ifdef guards around variables of types defined only for
GLX_DIRECT_RENDERING.
2010-04-02 00:12:59 -07:00
Chia-I Wu
154d9242de st/vega: Do not depend on libm.
This fixes the "no rule to make target -lm" error on darwin, reported by
Jeremy Huddleston.
2010-04-02 10:32:36 +08:00
Jesse Barnes
2b4d8616f5 GLX/DRI2: pass GLX drawable ID to dri2InvalidateBuffers
The IDs will be the same in the case where an X window is used directly
as a GLX drawable, but will fail if a new GLX drawable is created
explicitly, as with glxgears_fbconfig.

Fixes fdo bug #27190.
2010-04-01 17:29:19 -07:00
Jeremy Huddleston
115203281c Revert accidental commits from the xquartz tree
This reverts commit 9aadc793f3.
This reverts commit 69ea4e7718.
This reverts commit dbe8b01393.
This reverts commit 23215ef4d6.
This reverts commit 9495e37030.
This reverts commit 0594cf7088.
This reverts commit 86a7978d37.
This reverts commit 437902ce97.
2010-04-01 17:01:51 -07:00
Jeremy Huddleston
9aadc793f3 apple: Don't build gallium
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-01 12:33:48 -07:00
Jeremy Huddleston
69ea4e7718 apple: Use mesa gl.h rather than generating one.
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2010-04-01 12:33:47 -07:00
Jeremy Huddleston
dbe8b01393 apple: Integrate our libGL into the existing build system better
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-01 12:33:47 -07:00
Jeremy Huddleston
23215ef4d6 apple: Change ifdefs for DRI to be DRI && !APPLE
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-01 12:33:46 -07:00
Jeremy Huddleston
9495e37030 apple: Remove duplicate headers that already exist in mesa.
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2010-04-01 12:33:46 -07:00
Jeremy Huddleston
0594cf7088 apple: Initial import of libGL for OSX from AppleSGLX svn repository.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-01 12:33:45 -07:00
Jeremy Huddleston
86a7978d37 xdemos: Build object files first
This helps debugging on darwin.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-01 12:33:39 -07:00
Jeremy Huddleston
437902ce97 xdemos: Fix a build failure for non-autoconf configs
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-01 12:14:45 -07:00
Vinson Lee
16f568a183 glx: Fix compilation errors on non-GLX_DIRECT_RENDERING builds.
driContext field for __GLXcontextRec struct is only defined if
GLX_DIRECT_RENDERING is set.
2010-04-01 00:10:28 -07:00
Ben Skeggs
e24f4378a1 st/mesa: use BITFIELD64_BIT to access shader OutputsWritten in more places 2010-03-31 23:34:42 +10:00
Michel Dänzer
07c6d94cd7 glx/dri2: Fix debug build with old dri2proto.
Apparently the higher compiler optimization level in non-debug builds was
eliminating the unused functions referencing the unresolved DRI2 symbols...
2010-03-30 11:50:13 +02:00
Brian Paul
2aafbd7c2a docs: fix 7.7.1 release date
(cherry picked from commit e6f5ca0fa3)
2010-03-29 12:01:28 -06:00
Ian Romanick
dec94903d9 mesa: Add 7.8 release MD5 sums 2010-03-28 16:35:56 -07:00
Ian Romanick
ef6736e646 intel: Bump intel driver date to reflect status as 2010Q1 release 2010-03-28 16:33:53 -07:00
Ian Romanick
a6a4613135 mesa: set version string to 7.8
Also set the correct release date.
2010-03-28 16:33:12 -07:00
Ian Romanick
11289924b8 mesa: Add 7.7.1 release MD5 sums
(cherry picked from commit 0c88e34049)
2010-03-28 16:33:12 -07:00
Ian Romanick
cbc99d34b9 mesa: set version string to 7.7.1
Also set the correct release date.
(cherry picked from commit 663642b435)
2010-03-28 16:33:12 -07:00
Vinson Lee
6abc3501c6 progs/tests: Remove duplicate texcompress2 in SConscript. 2010-03-27 14:40:41 -07:00
Vinson Lee
1bf67a3b3f i965g: Add brw_winsys_debug.c to SCons build. 2010-03-27 14:25:03 -07:00
Vinson Lee
1b5b04de75 identity: Add id_drm.c to SCons build.
This was missed in commit f7cbaae13d.
(cherry picked from commit 02ee7c2950)
2010-03-27 13:43:16 -07:00
Brian Paul
9903d09f82 mesa: move/update hash function comments
(cherry picked from commit 535742d75f)
2010-03-27 08:59:17 -06:00
Brian Paul
038d2607ab mesa: fix deadlock in _mesa_HashFindFreeKeyBlock()
Fixes fd.o bug 27340.
(cherry picked from commit 8fe3b3f66a)
2010-03-27 08:58:59 -06:00
Michel Dänzer
7996f0fc2c dri/swrast: Fix frontbuffer rendering.
Was broken since the endianness fixes.
(cherry picked from commit 4cf14fa80b)
2010-03-26 18:30:56 +01:00
Michel Dänzer
b005e75177 dri/swrast: Fix missed conversion of one pixel pointer increment.
This probably broke the swrast DRI driver when running X in depth 16.
(cherry picked from commit 6ec259eb17)
2010-03-26 18:30:49 +01:00
Eric Anholt
77c30c5915 i965: Fix readpixels from ReadBuffer != DrawBuffer.
Fixes piglit fbo-readdrawpix.
(cherry picked from commit 5782b2a968)
2010-03-25 17:30:37 -07:00
Eric Anholt
63fbae81e0 i965: Fix inversion for glCopyPixels to/from FBOs.
fixes piglit fbo-copypix.
(cherry picked from commit a589da14de)
2010-03-25 17:30:37 -07:00
Eric Anholt
fdbe1ca0bd intel: Rely on allocated region pitch for the miptree pitch.
Bug #26966: 945 miptree pitch disagreement with libdrm.
(cherry picked from commit da011faf48)
2010-03-25 17:30:37 -07:00
Eric Anholt
57e793644f intel: Remove extra tiling setting after allocating a tiled region.
(cherry picked from commit 32f143b432)
2010-03-25 17:30:37 -07:00
Eric Anholt
4980891252 intel: Respect src pitch in _mesa_copy_rect().
If a non-zero src_y was used, this would break piglit
depth-level-clamp.
(cherry picked from commit e1e48ea15c)
2010-03-25 17:30:37 -07:00
Tom Fogal
38cb44516e Regenerate gl_mangle.h 2010-03-25 17:10:51 -06:00
Brian Paul
59258498dc glapi: return int = 0 from NoOpGeneric()
If a GL function is called w/out a current rendering context, this stub
gets called.  It should return 0 so that non-void-valued functions return
0/NULL instead of a random number.
2010-03-25 16:04:47 -06:00
Vinson Lee
80f5f7d17a glslcompiler: Fix build. 2010-03-25 12:58:36 -07:00
Maciej Cencora
fabc744999 r300: report correct state atom size
Spotted by Pauli Nieminen
2010-03-24 20:08:17 +01:00
Maciej Cencora
88f785935e r300: fix off by one
R300_PVS_MAX_CONST_ADDR field holds highest const addr, not
const count.

Fixes missing models and others rendering errors for vertex
program using 256 params.
2010-03-24 20:08:09 +01:00
Maciej Cencora
7a77effb0b r300: fix vertex programs with big number of params (>255) under KMS
UMS will probably require some kernel work
2010-03-24 20:08:00 +01:00
Maciej Cencora
bed7d88708 r300: fix wpos/fog handling
It may happen that the vertex attribute we were going to stuff
the wpos/fog attrs in was already written by vertex program.
In such cases we need to remove instruction accessing these
attributes, so they don't overwrite the wpos/fog related
instructions.

This fixes non-textured models in many wine games.
2010-03-24 20:07:44 +01:00
Maciej Cencora
70929f4505 r300: clean fog_attr/wpos_attr if code accessing these attributes has been removed FP during compilation 2010-03-24 20:07:37 +01:00
Eric Anholt
516334b7ff i965: Stop abusing ctx->NewState flags for storing driver internal changes.
We're still abusing the flags by putting them where our driver stores
ctx->NewState changes.  Making them into more restricted state change
flags would be a project for later.

Fixes a failure where calling intel_draw_buffer() too often would trip
up Mesa assertions about when Mesa state could get changed, when it hadn't.

Bug #27034.
2010-03-23 15:51:54 -04:00
Brian Paul
ed29329b08 docs: update docs with 7.7.1 and 7.8 release info 2010-03-23 09:24:13 -06:00
Brian Paul
ff54af530b softpipe: comments, re-formatting, etc 2010-03-23 09:08:35 -06:00
Brian Paul
fc1ba0423a softpipe: add special cases for all Z compare modes for 16-bit Z buffer
We had fast paths for PIPE_FUNC_LESS and LEQUAL before.  To satisfy
OpenGL invariance rules, all depth compare modes should produce the
same fragment Z values.

Fixes progs/demos/singlebuffer.c
2010-03-23 09:00:19 -06:00
Brian Paul
4ceeb1307a st/glx: better format selection in xmesa_choose_z_stencil_format()
This is a back-port of commit ef2664da6c
from master.
2010-03-23 08:58:12 -06:00
Chia-I Wu
2ded27b2f0 Add missing EGL files to the tarballs.
Add the Makefile of Gallium EGL drivers and demos using EGL to the
tarballs.
2010-03-23 14:46:03 +08:00
Kristian Høgsberg
094c6fbc45 glx: Suppress BadDrawable from DRI2CopyRegion
This can happen when an X window is destroyed behind our back.  We use
DRI2CopyRegion behind the scenes in many places (like flushing the fake
front to the real front) so we have to ignore X errors triggered in that
case.

The glean test cases trigger this consistently as they don't destroy the
GLX drawable nicely, they just destroy the X window.
2010-03-22 22:04:23 -04:00
Ian Romanick
4eead42550 mesa: set version string to 7.8-rc2 2010-03-22 18:09:15 -07:00
Kristian Høgsberg
62d54f0387 intel: Call intel_prepare_render() before looking up regions.
Fixes #27213.
2010-03-22 17:59:04 -04:00
Karl Schultz
092ca30366 Fix potential compilation issue in visual studio project file
Add quotes around filespec in post-build event to allow paths
with embedded spaces.
2010-03-22 12:18:02 -06:00
Brian Paul
ca97f8b9ba glslcompiler: fix build breakage 2010-03-22 09:00:13 -06:00
Pauli Nieminen
361e8e9118 mesa: Add end of line to the end of a debug output. 2010-03-22 15:16:02 +02:00
Vinson Lee
fce72d5803 progs/tests: Add cva_huge to SCons build. 2010-03-21 19:21:11 -07:00
Vinson Lee
1e7d65bb5b progs/tests: Include stddef.h for ptrdiff_t on all platforms.
stddef.h is the standard C header that defines ptrdiff_t.

Fixes build of cva_huge on Mac OS X.
2010-03-21 19:09:54 -07:00
Pauli Nieminen
4ea694a26b r200: Fix emit size prediction to account elt splitting.
Emit sizes prediction didn't account for render splitting in
hwtnl path.
2010-03-21 23:39:55 +02:00
Pauli Nieminen
0900544fb5 r200: Don't flush when closing elts in KMS.
Flush in middle of rendering in KMS is not allowed because
buffers are discarded in flush.

Fixes crash when emiting split indices with RADEON_DEBUG=all.
2010-03-21 23:39:53 +02:00
Pauli Nieminen
1968d8f31d r200: Fix swtnl fallback to flush pending rendering before transition.
Flush after transition would emit wrong state that could cause
wrong state emited for pending rendering operation.

Fixes wan once from extrement tuxracer that is using per vertex
materials.
2010-03-21 20:27:49 +02:00
Pauli Nieminen
44e3ec3c05 r200: Fix mixed indetion in r200TclFallback. 2010-03-21 20:27:44 +02:00
Pauli Nieminen
9a7acbccfb vbo: Fix vbo_split_copy to pass correct max_index to draw.
vbo_split_copy was passing one past the max_index to draw function
which caused _tnl_draw_prims function to read uninitialized values
from copied array.

Bug was spoted in valgrind report of progs/tests/cva_huge.
2010-03-21 13:18:36 +02:00
Pauli Nieminen
a81cd67a4f tests: Add test for huge client arrays that has to be split.
When running this test case in valgrind report includes read of unitialized
value in _tnl_draw_prims. The bug doesn't cause any vissible errors.

Bug is caused by vbo_split_copy that is calling draw function with max_index
one past the end instead of the end.
2010-03-21 13:17:52 +02:00
Marek Olšák
3d72c4ae78 r300/compiler: fix assertion failure in the r500-fragprog emission path 2010-03-20 18:54:55 +01:00
Brian Paul
f0491c945c docs: remove the 'Last updated date' 2010-03-20 10:33:10 -06:00
Chia-I Wu
6fed3a9fa0 glapi: Fix aliases to non-static functions.
The bug is triggered by 41a87a43e1.
glBlitFramebuffer, for example, is an alias to the non-static
glBlitFramebufferEXT.  We should define glBlitFramebuffer as an alias to
_dispatch_stub_NNN.
2010-03-21 00:05:01 +08:00
Chia-I Wu
41a87a43e1 glapi: Correctly generate static disatches for X86.
The entry point names, instead of the function name, should be used to
test if the entry point should be statically dispatched.
2010-03-20 13:02:05 +08:00
Marek Olšák
7e6e049bb7 r300g: remove hacks from translate_vertex_data_swizzle
Fixing RGBA 4ub vertex colors.
2010-03-19 19:13:01 +01:00
Brian Paul
73060ec7eb drivers/x11: add PUBLIC qualifier to more API functions
Based on a patch from Tom Fogal.
2010-03-19 10:35:58 -06:00
Ian Romanick
062a208814 intel: Use bit-wise not instead of logical not (i830 path)
The assertion is checking that the low-order bits of offset are not
set.  It does this by anding the inverted offset mask with the
offset.  This is clearly intended to be a bit-wise "invert".

Fixes bug #25984.
2010-03-18 17:30:15 -07:00
Ian Romanick
689e4b5541 intel: Correct value of S0_VB_OFFSET_MASK to match hardware docs. 2010-03-18 17:28:52 -07:00
Ian Romanick
fda5078324 Use bit-wise not instead of logical not.
The assertion is checking that the low-order bits of offset are not
set.  It does this by anding the inverted offset mask with the
offset.  This is clearly intended to be a bit-wise "invert".

Fixes bug #25984.
2010-03-18 15:35:05 -07:00
Brian Paul
b7e8039132 st/mesa: s/unpack/pack/ to be more consistent 2010-03-18 09:17:11 -06:00
Kristian Høgsberg
38bd7282f2 intel: Call _mesa_make_current() after getting initial buffers
The default viewport is the window rectangle, which is set up by
_mesa_make_current().  To be able to do that we need to get the
window dimension (and buffers) first, so we have to call
intel_prepare_render() before we can call into _mesa_make_current().

Fixes #26676 and #26678.
2010-03-18 09:53:41 -04:00
Brian Paul
05a980ac2a cell: return 1 for PIPE_CAP_BLEND_EQUATION_SEPARATE
With this feature, we get OpenGL version 2.0 and the progs/glsl/
demos run as-is.
2010-03-17 17:40:13 -06:00
Brian Paul
6dd4054ca5 cell: be more conservative in cell_is_format_supported()
This fixes a regression from commit a84575cdc0
which changed the depth/stencil format we were trying to use.
2010-03-17 16:35:29 -06:00
Brian Paul
1bfc314596 st/mesa: fix glCopyPixels bugs/crashes when src region need clipping
Use the _mesa_clip_readpixels() function to clip the src region against
the buffer's bounds.  Neatly, the resulting pixel unpack object's
SkipPixels/SkipRows fields can be used to determine the position of the
region in the destination texture.

Fixes crash in progs/samples/copy.c and probably other cases.
2010-03-17 10:06:27 -06:00
Brian Paul
c492227683 mesa: rename params in prototype to match implementation 2010-03-17 09:04:26 -06:00
Brian Paul
3828910d0e swrast: remove unused compute_coveragei() function 2010-03-17 08:42:59 -06:00
Eric Anholt
a29c7948d9 i965: Fix ENDLOOP to only patch up this loop's BREAK and CONT.
Corresponds to d225a25e21a24508aea3b877c78beb35502e942d and fixes
piglit glsl-fs-loop-nested.  Bug #25173.
(cherry picked from commit a81836ee2f)
2010-03-16 12:15:18 -07:00
Eric Anholt
42e0e86866 i965: Unalias all GLSL source regs from the destination regs used.
We were doing it ad-hoc before, as instructions with potential
aliasing problems were identified.  But thanks to swizzling basically
anything can have aliasing, so just do it generally at source reg
setup time.  This is somewhat inefficient, because sometimes an
operation doesn't need unaliasing protection if the swizzling is safe,
but the unaliasing before didn't cover those cases either.

Fixes piglit glsl-fs-loop.
(cherry picked from commit 6b194dab6b)
2010-03-16 12:15:12 -07:00
Eric Anholt
d24f59d008 i965: Fix nested loops in the VS.
We were patching up all the break and continues between the start of
our loop and the end of our loop, even if they were breaks/continues
for an inner loop.  Avoiding patching already patched breaks/continues
fixes piglit glsl-vs-loop-nested.
(cherry picked from commit f6f547d87e)
2010-03-16 12:15:02 -07:00
Eric Anholt
009392f50d i965: Fix up VP constbuf leak on program delete.
(cherry picked from commit 7f6d2754d5)
2010-03-16 12:14:57 -07:00
Eric Anholt
1254d3d315 i965: Fix up the handling of point sprite coordinate replacement.
The code was walking over the regs of pairs of attributes and checking
whether the attribute with a given reg index had point sprite enabled.
So the point sprite setup code was rarely even getting executed.
Instead, we need to determine which channels of a reg need point
sprite coordinate replacement.  In addition, it was multiplying the
attribute by 1/w, when it's supposed to cover (0, 1) in each direction
regardless of w, and it wasn't filling in the Z and W components of
the texcoord as specified.

Fixes piglit point-sprite and the spriteblast demo.  Bug #24431, #22245.
(cherry picked from commit bc632d0437)
2010-03-16 12:14:48 -07:00
Eric Anholt
837f003eeb i965: Add support for the CMP opcode in the GLSL path.
This would be triggered by use of sqrt() along with control flow.
Fixes piglit-fs-sqrt-branch and a bug in Yo Frankie!.
(cherry picked from commit 48dca99feb)
2010-03-16 12:14:18 -07:00
Eric Anholt
7ee4db50b1 i965: Fix the response len of masked sampler messages for 8-wide dispatch.
The bad response length would hang the GPU with a masked sample in a
shader using control flow.  For 8-wide, the response length is always
4, and masked slots are just not written to.  brw_wm_glsl.c already
allocates registers in the right locations.

Fixes piglit glsl-fs-bug25902 (fd.o bug #25902).
(cherry picked from commit f6d210c284)
(cherry picked from commit dc8c035944)
2010-03-16 11:56:21 -07:00
Ian Romanick
c1c9fad293 Remove nonexistant files from tarballs rule of Makefile
The Makefile should eventually be fixed to stop building tarballs if
one of the individual calls to tar fails.
2010-03-16 10:21:37 -07:00
Ian Romanick
f0c3262927 mesa: set version string to 7.8-rc1 2010-03-16 10:21:37 -07:00
Matthew W. S. Bell
d320152b47 Correct GL_EQUIV code in r67/7xx.
From 247e121106e8d3e389f2e5a6edf13ea70ac18df7 Mon Sep 17 00:00:00 2001

These seem to be documented in
<http://www.svgopen.org/2003/papers/RasterOperationsUsingFilterElements/index.html>.
2010-03-16 11:39:53 -04:00
Pauli Nieminen
e9c2c4a764 radeon: Fix buffer object unmap to be called only once for dma buffers.
If flush happens inside radeonRefillCurrentMaRegion the last dma buffer would
be unmapped twice. Unmapping buffer when moving buffer to wait list fixes the
mapping error.
2010-03-16 17:00:14 +02:00
Marcin Baczyński
346298c765 Replace _mesa_strtod with _mesa_strtof.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-15 08:38:24 -07:00
Keith Whitwell
63af29bfbe mesa: Fix memory leak in decompress-with-blit.
(cherry picked from commit f05a4ee6f2840590c90da4be2fe5c6295410a5af)
2010-03-13 10:40:04 +00:00
Michel Dänzer
8561bec0ac vmwgfx/dri: Fix SCons build. 2010-03-12 18:54:23 +01:00
Michel Dänzer
51a51899d0 st/dri: Always try to set up R5G6B5 configs.
Allows compiz to work in depth 16.

The DRI2 getBuffersWithFormat hook is only required for 16/32 bit depth
buffers, for colour buffers the only requirement is that the format matches
the drawable depth, which we can't check here.

(cherry picked from commit c50477c255)
2010-03-12 18:52:07 +01:00
Luc Verhaegen
4b598ce226 dri/r700: include shader/programopt.h instead of programopt.c.
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-03-12 08:57:55 -07:00
Jeff Smith
9b81103b1a Add programs to .gitignore in redbook
Signed-off-by: Jeff Smith <whydoubt@yahoo.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-03-12 08:57:34 -07:00
Jeff Smith
3aa8692883 Add programs to .gitignore in xdemos
Signed-off-by: Jeff Smith <whydoubt@yahoo.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-03-12 08:57:06 -07:00
Jeff Smith
9787060423 Add -L$(libdir) for xdemos and egl so that the right libX11 is found
Signed-off-by: Jeff Smith <whydoubt@yahoo.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-03-12 08:56:06 -07:00
Jeff Smith
fab1f07d6a Grammar and spelling fixes
Signed-off-by: Jeff Smith <whydoubt@yahoo.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-03-12 08:55:05 -07:00
Vinson Lee
39c2d3ecd9 radeon: Fix memory leaks from early return. 2010-03-11 21:55:44 -08:00
Brian Paul
5d5c524cbe st/mesa: s/BUFFER_FRONT_LEFT/surfIndex/ 2010-03-11 14:51:02 -07:00
Brian Paul
c472ce5302 st/mesa: fix st_set_framebuffer_surface() state validation
Set the _NEW_BUFFERS flag and remove the code which updated the
parent framebuffer size.  Normal Mesa state validation will do that.

Fixes issues with Warsow on r300g and possibly other bugs.
2010-03-11 13:44:53 -07:00
Jakob Bornecrantz
683a099954 st/xorg: Fixup configure
Make sure we always test for XEXT version.
Make sure that the user has a recent version of libkms and libdrm installed.

Note that the st/xorg code requires so new versions to work but these are
needed to make a proper vmwgfx_drv.so driver which is the only real user.

Cherry picked from 46cf606cd3
Conflicts:

	configure.ac
2010-03-11 19:30:16 +00:00
Brian Paul
bff128ff9c ARB prog parser: added (float) casts and regenerate files 2010-03-11 09:08:58 -07:00
Jakob Bornecrantz
54af54277a st/xorg: Include cursorstr.h 2010-03-11 00:50:58 +00:00
Karl Schultz
60121c41ce windows: fix compilation errors and warnings 2010-03-10 15:58:10 -07:00
Karl Schultz
7439f39016 windows: Quiet warning by not defining YY_NO_UNISTD_H. 2010-03-10 14:27:34 -07:00
Brian Paul
b60aa251e4 st/mesa: fix incorrect glCopyPixels between window/FBO
There was a DrawBuffer/ReadBuffer typo and we were neglecting to invert
the texture coords when copying from a window to an FBO.

Plus, add some surface dump/debug code (disabled).

(cherry picked from commit 34f0207161)
2010-03-10 10:42:22 -07:00
Brian Paul
c78ac7fcfa st/mesa: fix incorrect glDrawPixels into FBO
We weren't inverting the textured quad when drawing into an fbo.

(cherry picked from commit 8d3f629a13)
2010-03-10 10:41:22 -07:00
Michel Dänzer
766d90f1a2 st/xorg: Work around cursor reference counting bugs in older X servers.
Could result in use of freed memory and consequently random crashes, e.g. on
screen resize.
(cherry picked from commit 21c91b410a)

Conflicts:

	src/gallium/state_trackers/xorg/xorg_tracker.h
2010-03-10 18:26:25 +01:00
Alex Deucher
ffd625d4aa radeon: don't attempt to use alternate blit formats for depth buffers
noticed by fredrikh on IRC.
2010-03-08 17:38:39 -05:00
Brian Paul
e1762fb870 softpipe: zero-out entire clear_flags array in sp_tile_cache_flush_clear()
Before, we only cleared the flags for the active tiles (the ones inside
the framebuffer bound).  The problem is if we later bound a different,
larger surface to the tile cache we'd have some stale clear-flags still
set (and mistakenly clear some tiles in the new surface).

Fixes fd.o bug 26932.
2010-03-08 11:39:51 -07:00
Brian Paul
80dc54e308 st/mesa: don't detach renderbuffer, surface in st_finish_render_texture()
There's no reason to release the renderbuffer from the framebuffer object
or release the gallium surface in this function (they're reference counted).
In fact, we don't want to do this because we may later use the texture as a
pixel source (ex: glBlitFramebuffer) and need the surface.

Fixes fd.o bug 26923 and is part of the fix for bug 26932.
2010-03-08 11:39:51 -07:00
Alex Deucher
df9bf78f88 r600: enable GL_ARB_pixel_buffer_object 2010-03-08 12:00:57 -05:00
Brian Paul
fe25bee14f mesa: add additional missing z formats for render to texture
Allow render to texture for X8_Z24 and Z24_X8 formats.
Replace big if/else with switch, etc.
2010-03-08 10:00:29 -07:00
Alex Deucher
9458c2061b radeon/r200/r600: allow src and dst BOs to be placed in GTT during blit 2010-03-08 11:50:01 -05:00
Alex Deucher
d7ad1b8b07 radeon/r200/r600: reset bos when validating buffers during blit 2010-03-08 11:49:53 -05:00
Alex Deucher
c65235f97e r600: recalculate point size, if point min/max size changes 2010-03-08 11:49:44 -05:00
Alex Deucher
d18b302365 r600: no need to flush on context init 2010-03-08 11:49:31 -05:00
Maciej Cencora
b3b6bd5da1 r300: don't enable EXT_packed_depth_stencil
R300 hw doesn't support sampling from Z24_S8 or S8_Z24 formats.
2010-03-08 11:49:23 -05:00
Maciej Cencora
29e02c7e72 radeon: no need to emit full state twice after flush 2010-03-08 11:49:16 -05:00
Maciej Cencora
4572ae1925 r300: allow src and dst BOs to be placed in GTT during blit
Fixes some relocation failures
2010-03-08 11:49:09 -05:00
Maciej Cencora
62b3321d7d r300: reset bos when validating buffers during blit 2010-03-08 11:49:01 -05:00
Maciej Cencora
8ccd83ab92 radeon: fallback to software in glCopyTexImage if blit isn't available 2010-03-08 11:48:52 -05:00
Maciej Cencora
2872c1cc32 r300: VAP flush is needed only when vertex program or constants are changed 2010-03-08 11:48:45 -05:00
Maciej Cencora
77ed4d1f5d r300: recalculate point size, if point min/max size changes
Fixes two wine d3d9 unit tests
2010-03-08 11:48:36 -05:00
Maciej Cencora
44d92d4bbe r300: no need to flush on context init 2010-03-08 11:48:28 -05:00
Maciej Cencora
b1ab15c633 r300: remove unnecessary code
_tnl_UpdateFixedFunctionProgram is already called in r300_draw.c
2010-03-08 11:48:20 -05:00
Brian Paul
26aa870a0d mesa: add render-to-texture case for MESA_FORMAT_S8_Z24 2010-03-08 09:38:07 -07:00
Brian Paul
614f490ca9 mesa: s/GL_DEPTH_STENCIL/GL_DEPTH_COMPONENT/ for MESA_FORMAT_Z16 renderbuffer
MESA_FORMAT_Z16 has no stencil bits.
2010-03-08 09:35:28 -07:00
Chia-I Wu
ee6fbf8d2f st/vega: Fix OpenVG demo segfaults.
When the paint is color, paint_bind_samplers binds a dummy sampler
without a texture.  It causes demos requiring a sampler (those use a
mask or an image) to crash.
2010-03-08 11:29:25 +08:00
Vinson Lee
661b416e07 gallivm: Initialize variables for default cases.
Fixes use of uninitialized variables in non-debug builds.
2010-03-06 20:30:28 -08:00
Vinson Lee
ba8f4c5d36 progs/demos: Add arbocclude2 to Makefile and .gitignore. 2010-03-05 23:18:01 -08:00
Brian Paul
ae7b3a632d glx: Move initialization of ext_list_first_time to where it's storage is allocated
Move the initialization of ext_list_first_time from all of the DRI loader's
CreateScreen routines, to where the storage for the screen config is
allocated.

It needs to get set in the screen-config even if DRI is forced off
using LIBGL_ALWAYS_INDIRECT, so that psc->direct_support is initialized
correctly, otherwise __glXExtensionBitIsEnabled() always returns FALSE

Specifically, this causes a problem with an X server which advertises
GLX<=1.2, and the GLX_SGIX_fbconfig extension.
glXGetFBConfigFromVisualSGIX() uses __glXExtensionBitIsEnabled() to
check if the GLX_SGIX_fbconfig extension is available, but that function
won't return correct information because that data has never been
initialized, because ext_list_first_time was never set...

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Brian Paul <brianp@vmware.com>

(cherry picked from commit 96ab4d2b84)
2010-03-05 17:32:36 -07:00
Brian Paul
c781e2841a docs: remove merge conflict garbage 2010-03-05 17:32:07 -07:00
Ian Romanick
77fc3ef911 meta: Use the DrawBuffer's stencil size
Previously the code was erroneously using the stencil size of the
context instead of the stencil size of the DrawBuffer.  With FBOs
these may be different.  As a result, clearing the stencil buffer of
an FBO bound to a context that doesn't have stencil would fail.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-05 16:04:59 -08:00
Ian Romanick
66c0abba6b swrast: Remove redundant test of the visual's accumulation buffer size
If the visual doesn't have an accumulation buffer, the renderbuffer
passed into _swrast_clear_accum_buffer will be NULL anyway.  There is
no reason the check the visual.  Moreover, the test erroneously checks
the context's visual instead of the visual of the current DrawBuffer.
With FBOs these may be different.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-05 16:04:59 -08:00
Ian Romanick
ebbec7e4e4 swrast: Adjust colors based on ReadBuffer visual, not context visual
In the presence of FBOs, the visual of the context may not match the,
possibly fake, visual of the current ReadBuffer.  Note that the caller
of adjust_colors correctly uses the visual of the ReadBuffer.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-05 16:04:59 -08:00
Ian Romanick
c67af0628b swrast: Remove stray comment that mentions ctx->Visual
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-05 16:04:59 -08:00
Brian Paul
1a0a2b64ca gallivm: checkpoint: code gen for mipmap selection 2010-03-05 16:52:11 -07:00
Brian Paul
b5038fdd65 llvmpipe: added code to set texture depth, max mipmap levels info 2010-03-05 16:51:35 -07:00
Brian Paul
7f4b5c5387 gallivm: added methods for getting texture depth, num mipmap levels 2010-03-05 16:50:48 -07:00
Brian Paul
6bc644fe62 gallivm: checkpoint: texture LOD computation code gen 2010-03-05 16:32:09 -07:00
Brian Paul
36a0c4219d gallivm: added field for sampler lod 2010-03-05 16:32:09 -07:00
Eric Anholt
8c8e664f10 i965: Only use the effective subset of the WM sampler key.
The whole structure is 836 bytes, but if only the first one or two
samplers are used (as is common), the part that matters is only 56 or
108 bytes.  By using just that subset as the key (since the key size
is also part of the key), we improve firefox-talos-gfx performance by
1%.
2010-03-05 15:23:30 -08:00
Eric Anholt
a232cc59e3 intel: Remove support for the DRI1 TFP extension. 2010-03-05 15:23:30 -08:00
Eric Anholt
20952f0378 i965: Remove the paths for making a const surface object for a NULL BO. 2010-03-05 15:23:30 -08:00
Eric Anholt
9a38f76044 i965: Remove the unused SDC BO pointer from the sampler state key.
Since it's a BO pointer, it already lives outside the key in
brw->wm.sdc_bo[] which is used for sampler state lookup and setup.
2010-03-05 15:23:30 -08:00
Eric Anholt
879ea6f279 i965: Rename SNB brw_*_key structs to gen6_*_key structs. 2010-03-05 15:23:30 -08:00
Eric Anholt
5d18e86971 i965: Pack gen6 blend_state_key structure. 2010-03-05 15:23:30 -08:00
Eric Anholt
855515859e intel: Only do batchbuffer debug if --enable-debug is used.
This saves 6.6KB on the 965 driver, and appears to speed
firefox-talos-gfx up by 1-2%.  Unlike many other asserts in the
driver, when we make a mistake that would trigger one of these it
generally shows up all the time for developers, so turning it off for
release seems fine.
2010-03-05 15:23:30 -08:00
Eric Anholt
7392002041 intel: Replace batch macro contents with function calls.
This manages to cut down another 3800 bytes.
2010-03-05 15:23:30 -08:00
Eric Anholt
342a7f23bf intel: Move the assertions about reloc delta from the macros to the function.
Cuts another 1800 bytes from the driver.
2010-03-05 15:23:30 -08:00
Eric Anholt
8a9d8bd52a intel: Check that the batch is mapped per BEGIN, not each OUT.
Shaves 800 bytes off the driver.
2010-03-05 15:23:30 -08:00
Eric Anholt
f6f5e87679 i965: Try to assign SNB SF inputs to outputs. 2010-03-05 15:23:30 -08:00
Eric Anholt
3b9612645e i965: Fix the SNB SF input size. 2010-03-05 15:23:30 -08:00
Chris Wilson
24f9011276 Always return VOLATILE for ObjectPurgeable(VOLATILE)
Fixes fdo bug 26128.

The spec mandates that VOLATILE is returned from
ObjectPurgeable(VOLATILE) irrespective of the actual status of the
object upon completion of marking it purgeable.

Conform to the spec, even though it seems wrong.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-03-05 23:20:45 +00:00
Brian Paul
b704a4e8f3 llvmpipe: add pipe_thread_wait() calls
Wait for threads to exit before cleaning up per-thread data.
Fixes hang on context destruction with glean makeCurrent test.
See fd.o bug 26536.
2010-03-05 14:24:04 -07:00
Brian Paul
76e87786ab gallium/docs: document additional wrap mode restrictions 2010-03-05 13:30:24 -07:00
Brian Paul
88e2eae271 gallivm: minor arithmetic improvements 2010-03-05 13:29:25 -07:00
Brian Paul
d660e28c9c gallivm: implement non-normalized texture wrap modes
Note that only the PIPE_TEX_WRAP_CLAMP,CLAMP_TO_EDGE,CLAMP_TO_BORDER
modes work with non-normalized texcoords.
2010-03-05 13:29:25 -07:00
Brian Paul
b5b128b268 softpipe: implement PIPE_TEX_WRAP_CLAMP_TO_EDGE for unorm texture sampling
CLAMP_TO_BORDER and CLAMP_TO_EDGE were doing the same thing.
2010-03-05 13:28:18 -07:00
Brian Paul
e9968ebfa4 mesa: minor reformatting, new comments 2010-03-05 13:28:18 -07:00
Jesse Barnes
f846a008e9 progs/xdemos: fix up GLX extension checking
A few of my programs were using the client string in addition to the
main extensions string to see if a feature was present.  Correct this to
only check for the currently available and working extensions.
2010-03-05 11:22:05 -08:00
Jesse Barnes
1ca968363d DRI2: expose OML_sync_control if possible
If the server supports the OML related protocol, enable support for the
extension.
2010-03-05 11:22:05 -08:00
Jesse Barnes
6b3145d6ee GLX: remove debug prints from glXWaitForMscOML dispatch
Leftover from earlier commit.
2010-03-05 11:22:04 -08:00
Jesse Barnes
77bc721a52 xdemos/omlsync: add waitformsc and swap interval code 2010-03-05 11:22:04 -08:00
Michal Krol
2b15f4fc68 progs: Add arbocclude2 demo. 2010-03-05 18:42:42 +01:00
Brian Paul
c3b6adccc9 gallium/docs: updated/improve sampler state documentation 2010-03-05 09:53:47 -07:00
Brian Paul
60fae3b024 docs: document GL_APPLE_object_purgeable 2010-03-05 09:24:15 -07:00
Brian Paul
e176ae5f2a mesa: whitespace fixes, 80-column wrapping, etc. 2010-03-05 09:23:43 -07:00
Chris Wilson
6ba31fb2db Merge branch 'object-purgeable'
Acked-by: Brian Paul <brianp@vmware.com>
2010-03-05 15:03:56 +00:00
Chris Wilson
755915fa5d APPLE_object_purgeable: intel
Implement support for purgeable objects by using the GEM madvise ioctl.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-03-05 11:23:59 +00:00
Chris Wilson
99864d595f APPLE_object_purgeable: core
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-03-05 11:23:55 +00:00
Chia-I Wu
3490923c81 mesa/es: Update GLAPI and APISpec for GL_OES_EGL_image.
This generates the entrypoints and dispatches for GL_OES_EGL_image.
There is no real support yet.
2010-03-05 11:33:10 +08:00
Chia-I Wu
9373447a61 st/egl: Add support for EGL_KHR_image_base and EGL_KHR_image_pixmap.
These extensions are not quite useful until the client APIs gain support
for the respective EGLImage extensions.
2010-03-05 11:33:10 +08:00
Chia-I Wu
fade8a6eb6 st/egl: Add get_param to native display interface.
get_param can be used to query the parameters of a native display.
There is only NATIVE_PARAM_USE_NATIVE_BUFFER right now.  It queries
whether the window/pixmap surfaces use the native buffers instead of
private buffers.
2010-03-05 11:32:29 +08:00
Chia-I Wu
89a75b7634 st/egl: Move modeset interface to native_modeset.h.
native.h is getting more and more complex.  Move the independent modeset
interface to native_modeset.h to simplify native.h a little.
2010-03-05 11:32:11 +08:00
Chia-I Wu
e38f28dded st/egl: Add event support to the native display interface.
There is only invalid_surface event right now.  When EGL receives the
event, it sets the force_validate flag of the context binding to the
surface.  This helps skip an unnecessary check.
2010-03-05 10:19:05 +08:00
Vinson Lee
45df4bad9f Revert "mesa: Remove pointless comparison of unsigned integer with a negative constant."
This reverts commit a05fdbcb71.

Removing the comparison is wrong. The comparison with -1 should be changed
to another value (probably PROGRAM_UNDEFINED) along with another
change in the shader assembler.

Conflicts:

	src/mesa/shader/prog_execute.c
2010-03-04 17:41:20 -08:00
Eric Anholt
bb35000b4b intel: Remove non-kernel-exec-fencing support.
Shaves 60k off the driver from removing the broken spans code.  This
means we now require 2.6.29, which seems fair given that it's a year
old and we've removed support for non-KMS already in the last release
of 2D.
2010-03-04 16:56:32 -08:00
Eric Anholt
7cbc4c07ee intel: Remove the unused s8 spans code. Not hit during no_rast piglit.
Shaves 5.5k off of the driver.
2010-03-04 16:50:51 -08:00
Michel Dänzer
391b396f3f Fix comparison of unsigned value against < 0. 2010-03-05 00:15:40 +01:00
Brian Paul
b37c541500 softpipe: minor tweaks to texture filtering code 2010-03-04 15:58:01 -07:00
Brian Paul
2b5c5c0dcf gallivm: implement texture border color, plus tweaks to some wrap modes
The progs/test/texwrap demo looks pretty good, but there are still some
tiny differences from softpipe.  There may be a sub-pixel texcoord
interpolation error somewhere.

There's some room for optimization.  Many of the wrap modes compute
intermediate values that are constant for the texture size (see the
min/max values).  These could be computed earlier and stored somewhere
for later use.
2010-03-04 15:56:55 -07:00
Brian Paul
946edea794 gallivm: added texture border_color field 2010-03-04 15:56:55 -07:00
Brian Paul
71c0568952 gallivm: added question/comment 2010-03-04 15:56:55 -07:00
Brian Paul
ad1456a444 llvmpipe: new comment 2010-03-04 15:56:55 -07:00
Brian Paul
877f2356b2 gallivm: comments 2010-03-04 15:56:55 -07:00
Francisco Jerez
a42fd95f43 dri/nouveau: Remove some CI remnants. 2010-03-04 23:43:02 +01:00
Andrew Randrianasulu
9c4937524e dri/nouveau: Trivially add GL_ARB_texture_mirrored_repeat.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-03-04 23:42:53 +01:00
Andrew Randrianasulu
44df3577a7 dri/nouveau: Enable GL_EXT_stencil_wrap.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-03-04 23:14:24 +01:00
Andrew Randrianasulu
210bcf6d15 dri/nouveau: Add GL_EXT_stencil_wrap for nv04.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-03-04 23:07:11 +01:00
Francisco Jerez
9c21c1e865 dri/nouveau: Fix rb->DataType for z24s8 renderbuffers. 2010-03-04 23:07:11 +01:00
Francisco Jerez
80316cbefa dri/nouveau: Try to keep client buffers smaller than the scratch VBO length. 2010-03-04 23:07:11 +01:00
Francisco Jerez
43c347c63e dri/nouveau: Pack client arrays as they're copied to the real BO. 2010-03-04 23:07:10 +01:00
Jesse Barnes
b6456dc234 xdemos: add OML sync test
Add program to test glXSwapBuffersMscOML behavior.  Based on glsync.c.
2010-03-04 13:14:59 -08:00
Corbin Simpson
566390bedf r300g: Fix indexbuf upper limits.
Wine tends to pessimistically use ~0 for its max index, but r300s
only can go up to 2^24-1, causing the kernel checker to freak out.

Civ4 is marginally improved now. Still crashes, but not as bad.
2010-03-04 12:49:44 -08:00
Chris Wilson
894d0ab938 APPLE_object_purgeable: autogenerated files 2010-03-04 19:43:19 +00:00
Chris Wilson
e5c49e49cc APPLE_object_purgeable: xml
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-03-04 19:26:54 +00:00
Brian Paul
4c0c728b2a gallivm: rework and implement more texture wrap modes
All the texture wrap modes are now implemented for linear and nearest
sampling.

However, texture border color is not yet supported so some wrap modes
will produce int coords outside the texture bounds.  We'll get garbage
values insted of the texture border color for now.
2010-03-04 10:53:27 -07:00
Brian Paul
516bad2272 gallivm: added lp_build_fract() 2010-03-04 10:53:27 -07:00
Brian Paul
6464d81e77 gallivm: added lp_build_set_sign() 2010-03-04 10:53:26 -07:00
Brian Paul
7d230dae70 gallivm: added lp_build_negate() 2010-03-04 10:53:26 -07:00
Brian Paul
38110fd1c3 gallivm: clarify unsigned vs. signed integer type construction
The lp_int_type() function was creating an unsigned type.  So rename
that function to lp_uint_type() and create new lp_int_type() that
creates a signed type.
2010-03-04 10:53:26 -07:00
Eric Anholt
8e7a8d6593 i915: Enable texture tiling by default.
This now passes piglit testcases, and shows performance improvements
on openarena.  Blit-heavy apps may see degradation, but the
expectation is that the common case of 3D rendering will see
significant wins.

This regresses gen-teximage on my 855, and no piglit tests on my 945.
2010-03-04 08:18:53 -08:00
Eric Anholt
41d3fdc380 i915: Fix up i830 for tiled drawing offsets.
Corresponds to b87406e55f.
2010-03-04 08:18:50 -08:00
George Sapountzis
aae81a7681 fix getprocaddress test 2010-03-04 16:34:01 +02:00
Ian Romanick
c7f7a309af DRI: Put back missing break-statement
The break in the __DRI_ATTRIB_RENDER_TYPE case was accidentally
removed in commit 5cf2c5851b.  This puts
it back.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-04 01:58:28 -08:00
Vinson Lee
34b2cec95c Revert "mesa: Fix unsigned comparison."
This reverts commit f9504e75f0.

This patch is incorrect.
2010-03-04 01:53:14 -08:00
Vinson Lee
ac610ab830 glsl: Remove unsigned greater than or equal zero comparison. 2010-03-04 01:35:28 -08:00
Vinson Lee
f9504e75f0 mesa: Fix unsigned comparison. 2010-03-04 01:24:44 -08:00
Vinson Lee
0dd40cc20a glsl: Remove unsigned greater than or equal zero comparison. 2010-03-04 01:10:44 -08:00
Vinson Lee
3c90777fd7 glsl: Return NULL on _slan_gen_asm error path on non-debug builds.
Exit the function early on the error path, instead of continuing, to
prevent a null pointer dereference later on.
2010-03-04 00:58:36 -08:00
Vinson Lee
df20c3943a glsl: Add assert to check input to strcmp. 2010-03-04 00:53:52 -08:00
Vinson Lee
df62b0da92 mesa: Add asserts to check inputs to memcpy. 2010-03-04 00:41:21 -08:00
Dave Airlie
25e439e69f r300: make blit code work on swtcl machines.
Only tested this on my rv530 with R300_NO_TCL=1, but it works there
at least. It would be nice to fix the tex_offset by chaning the vertex
program on tcl to read from offset 6 but this isn't really necessary.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-03-04 15:49:57 +10:00
Dave Airlie
c27fed58e4 r300_blit: initialise whole fp structure to 0
at least on the r500 we get a lockup unless I do this, the compiler
seems to fail to compile and we just get a null fp.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-03-04 15:11:42 +10:00
Vinson Lee
e5d0956ca4 Remove ffb and gamma from configs. 2010-03-03 19:03:45 -08:00
Vinson Lee
f4113012e0 wgl: Fix mingw32 build.
This was missed in commit fcf438e9e0.
2010-03-03 18:20:01 -08:00
Ian Romanick
6d9a9e57dc Fix unmatched parenthesis introduce by previous commits
I wasn't careful enough when removing support for GCC versions earlier
than 3.3.0.  I could have sworn that I compile tested before pushing,
but apparently not.  FAIL.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 17:50:11 -08:00
Ian Romanick
7d7e2198dd Note removal of pre-GCC 3.3.0 support in release notes. 2010-03-03 16:43:13 -08:00
Ian Romanick
f7dde2c131 Remove support for GCC older than 3.3.0 from generated sources
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 16:26:32 -08:00
Ian Romanick
6e8e4b918d Remove support for GCC older than 3.3.0 from generator scripts
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 16:26:32 -08:00
Ian Romanick
016fc30839 Remove support for GCC older than 3.3.0
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 16:26:32 -08:00
Ian Romanick
9aa3aa7138 Add version check for GCC
Mesa now requires GCC 3.3.0 or later.  See the following thread from
the mesa3d-dev mailing list for more details:

http://marc.info/?t=126748568900005&r=1&w=2

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 16:26:32 -08:00
Alex Deucher
3594bf233d radeon/r200/r300/r600: add check_blit vtbl function
Check if the native blit formats are supported, if not,
attempt to use an alternate format.

Skip 3, >4 bpp as per comments from mcencora on irc.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2010-03-03 16:14:17 -05:00
Ian Romanick
21cc53c2bc Note removal of color-index rendering in release notes. 2010-03-03 12:37:05 -08:00
Ian Romanick
0384214923 Remove stray defines of HAVE_RGBA
Now that color-index support is removed from t_dd_tritmp.h and
t_dd_unfilled.h, drivers no longer need define HAVE_RGBA.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:05 -08:00
Ian Romanick
889a0f3471 mesa/tnl_dd: Remove color-index support from t_dd_unfilled.h
The code removal and the re-indent were done together for this one
because the cause of the affected code blocks is much, much smaller
than in t_dd_tritmp.h.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:05 -08:00
Ian Romanick
e00b50c39a mesa/tnl_dd: White-space / indentation fixes after previous commit
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:05 -08:00
Ian Romanick
78742f8e86 mesa/tnl_dd: Remove color-index support from t_dd_tritmp.h
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:05 -08:00
Ian Romanick
06ceba0a7c mesa: Remove unused RasterIndex field
With the preceeding changes, gl_current_attrib::RasterIndex is not
used.  Remove it.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:05 -08:00
Ian Romanick
5c52b4292f mesa: Always return default value for CURRENT_RASTER_INDEX
Since there is no color-index rendering, it is impossible to update
this value.  Just return the initial setting and be happy.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:05 -08:00
Ian Romanick
24d311c133 mesa: Eliminate index parameter to _mesa_feedback_vertex
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:05 -08:00
Ian Romanick
bb8c3b1bcc mesa: Remove ClearIndex and IndexMask from device-driver interface
These are used to inform the driver of the clear value for color-index
buffers and to control write-masking of bits in color-index buffers.
No driver use or need (not even Nouveau) these interfaces.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:05 -08:00
Ian Romanick
5034e8ad42 swrast: Remove _swrast_logicop_ci_span
After all the recent color-index rendering removal,
_swrast_logicop_ci_span is no longer used anywhere.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:05 -08:00
Ian Romanick
3d0f608e13 mesa: Remove _mesa_add_color_index_renderbuffers
After all the recent color-index visual support removal,
_mesa_add_color_index_renderbuffers is no longer used anywhere.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:04 -08:00
Ian Romanick
b9f63c277a mesa: Remove checks of Visual.rgbMode in Get paths
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:04 -08:00
Ian Romanick
22a96f3058 mesa: Remove checks of Visual.rgbMode
This must always be true now, so there is no reason to check it.  Ever.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:04 -08:00
Ian Romanick
fcf438e9e0 mesa: Remove support for creating color-index visuals
Remove the rgbMode and indexBits parameters from _mesa_create_visual
and _mesa_initialize_visual.  These values are now hardcoded to
GL_TRUE and 0.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:04 -08:00
Ian Romanick
a9c1b3caf6 tnl: Remove color-index TNL support
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:04 -08:00
Ian Romanick
5cf2c5851b DRI: Remove support for color-index visuals
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:04 -08:00
Ian Romanick
e650c07f47 swrast_setup: Remove more color-index rendering support
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:04 -08:00
Ian Romanick
859c98c392 swrast: Remove color-index rendering support from s_spantemp.h
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:04 -08:00
Ian Romanick
81fe9949ef mesa/xlib: Remove support for color-index rendering
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:04 -08:00
Ian Romanick
641705f032 osmesa: Remove support for color-index rendering
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:04 -08:00
Ian Romanick
6f317253bf fbdev: Remove support for color-index rendering
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:04 -08:00
Ian Romanick
718ff7e87b DRI/swrast: Remove color-index support from DRI swrast driver
It appears that color-index rendering wasn't actually supported
anyway.  swrastFillInModes did not previously create an color-index
configs, so it doesn't seem like there would be any way to get a
color-index visual.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:04 -08:00
Ian Romanick
dc14ce9e36 swrast: Remove SPAN_INDEX
Also adjust the bits that appear after it to fill in the gap.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:04 -08:00
Ian Romanick
7ce12c9024 swrast: Remove _swrast_read_index_span
After all the recent color-index rendering removal,
_swrast_read_index_span is no longer used anywhere.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:04 -08:00
Ian Romanick
0ca5729578 swrast: Remove _swrast_mask_ci_span
After all the recent color-index rendering removal,
_swrast_mask_ci_span is no longer used anywhere.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:04 -08:00
Ian Romanick
b00362e51b swrast: Remove _swrast_fog_ci_span and associated code
After all the recent color-index rendering removal,
_swrast_fog_ci_span is no longer used anywhere.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:04 -08:00
Ian Romanick
c00282102a swrast: Remove _swrast_write_index_span and associated code
After all the recent color-index rendering removal,
_swrast_write_index_span is no longer used anywhere.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:04 -08:00
Ian Romanick
2b7911d37d swrast: Remove remaining color-index state tracking infrastructure
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:04 -08:00
Ian Romanick
3fd8487ac6 swrast: Remove support for ReadPixels from a color-index buffer
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:03 -08:00
Ian Romanick
9e2d30e0b8 swrast: Remove support for Clear into a color-index buffer
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:03 -08:00
Ian Romanick
e5ed4c45c6 swrast: Remove support for rendering antialiased lines into a color-index buffer
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:03 -08:00
Ian Romanick
87b9f5a725 swrast: Remove support for rendering antialiased triangles into a color-index buffer
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:03 -08:00
Ian Romanick
e6df80184b swrast: Remove support for rendering lines into a color-index buffer
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:03 -08:00
Ian Romanick
dbe901ceb0 swrast: Remove support for rendering points into a color-index buffer
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:03 -08:00
Ian Romanick
0ed9c4bc7a swrast: Remove support for rendering triangles into a color-index buffer
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:03 -08:00
Ian Romanick
d05badba29 swrast: Remove support for Bitmap into a color-index buffer
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:03 -08:00
Ian Romanick
ef0e02f93d swrast: Remove _swrast_write_zoomed_index_span and associated code
After removing support for CopyPixels and DrawPixels involving
color-index buffers, _swrast_write_zoomed_index_span is no longer
used.  Removed it and all the support for COLOR_INDEX formats in zoom_span.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:03 -08:00
Ian Romanick
e7e748cd04 swrast: Remove support for CopyPixels to / from a color-index buffer
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:03 -08:00
Ian Romanick
d82e1d7f95 swrast: Remove support for DrawPixels into a color-index buffer
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:03 -08:00
José Fonseca
4053d33703 llvmpipe: Store the original triangle coordinates in the debug build.
For debugging purposes only.
2010-03-03 19:55:49 +00:00
José Fonseca
4d5dd82558 llvmpipe: Ensure context is flushed when destroying shaders. 2010-03-03 19:55:49 +00:00
Eric Anholt
b87406e55f i915: Use x,y drawing offsets instead of changing buffer offsets.
This should fix rendering into mipmaps of tiled textures.
2010-03-03 11:33:37 -08:00
Eric Anholt
06d1472ffa i915: Tell the kernel when we actually need fence registers on our BOs.
This improves tiled texture performance of OA on my 945 from 25.3fps
to 29.0fps, whereas untiled is 28.2fps, by avoiding stalls for fence
register changes.
2010-03-03 11:33:37 -08:00
Eric Anholt
179d2c0e0b intel: Use drm_intel_bo_alloc_tiled for region allocs.
This moves the logic for how to align pitches, heights, and sizes of
objects to one central location.  Fixes rendering with texture tiling
on i915.  Note that current libdrm is required for the change for
I915_TILING_NONE pitch alignment.
2010-03-03 11:33:37 -08:00
Eric Anholt
07439cf617 i915: Don't do the pitch expansion for tiled buffers.
The weirdness that led to the bumping of pitch for those 512/1024
pixels is that in taking a 2x2 subspan or bilinear filtering we'd end
up hitting the same channel in 2 different pages, leading to lower
performance.  With tiling, that doesn't occur, so we don't need to
waste the memory.
2010-03-03 11:33:37 -08:00
Eric Anholt
55e90e46e0 intel: Use GTT mapping in the blit fallback path in case there's tiling. 2010-03-03 11:33:37 -08:00
Eric Anholt
a3593833dc i965: Fix up Sandybridge VS sizing. 2010-03-03 11:33:37 -08:00
George Sapountzis
3b8ff24554 glapi: minor cosmetic 2010-03-03 21:23:20 +02:00
George Sapountzis
8bd8aec81d glapi: drop condvar
Seems unused and replaced by functionality in os module.
2010-03-03 21:23:20 +02:00
Alex Deucher
bdbf199a8c r600: add new rs880 pci id 2010-03-03 14:09:53 -05:00
Kristian Høgsberg
4007342584 egl_dri2: Factor out DRI2 protocol bits from initialize. 2010-03-03 10:47:49 -05:00
Kristian Høgsberg
af3f1bb269 intel: Set InternalFormat for renderbuffers created from an EGLImage 2010-03-03 10:47:49 -05:00
José Fonseca
be1b7d1a04 progs/gallium/unit: Test (un)pack_4ub.
Most of them are failing.
2010-03-03 13:47:42 +00:00
José Fonseca
f7e403b129 gallium: Remove PIPE_FORMAT_R8G8B8X8_SNORM. 2010-03-03 13:08:23 +00:00
José Fonseca
a5b56c8153 util: Remove PIPE_FORMAT_R8G8B8X8_SNORM information. 2010-03-03 13:08:08 +00:00
José Fonseca
c51f7a48cd r300: Remove PIPE_FORMAT_R8G8B8X8_SNORM support. 2010-03-03 13:07:56 +00:00
José Fonseca
c2ba284386 progs/gallium/unit: Remove PIPE_FORMAT_R8G8B8X8_SNORM test cases. 2010-03-03 13:07:43 +00:00
José Fonseca
7b7b66781b llvmpipe: Linux is no longer a dependency. Llvmpipe builds and runs fine on windows too. 2010-03-03 12:07:39 +00:00
José Fonseca
9f9b44222f llvmpipe: Centralize LLVM initialization. 2010-03-03 12:02:26 +00:00
José Fonseca
a9e6da7b4c gallivm: Centralize initialization. Fix stack alignment issues on Windows. 2010-03-03 12:02:26 +00:00
José Fonseca
f58ca9b02b llvmpipe: Update for lp_bld_init.h rename. 2010-03-03 12:02:26 +00:00
José Fonseca
af36b050eb gallivm: Rename lp_bld_misc -> lp_bld_init. 2010-03-03 12:02:26 +00:00
Dave Airlie
daf85c4608 radeon/r200/r300/r600: fix blit BO buffer validation
there is no need for these to be persistent since we flush the CS
at the end of the blit, and we don't reuse these buffers at all.

on my r600 the Wine DX9 test suite doesn't crash at least anymore.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-03-03 16:28:53 +10:00
Corbin Simpson
4cb7642ff3 r300g: Use a macro to consolidate general state handling.
My God, I've reinvented R300_STATECHANGE. Forgive me. :C
2010-03-02 19:14:09 -08:00
Christoph Bumiller
20443f969d nv50: fix RT formats after format rename fixes
Getting rid of the evil pre-processor magic, but not changing our
internal format naming convention (at least for now).
2010-03-02 19:16:39 +01:00
José Fonseca
aaa2d548ed nouveau: Rename pipe formats.
These format uses were being hiden by pre-processor magic and were
missed in the previous search'n'replace.
2010-03-02 17:26:40 +00:00
José Fonseca
2998cad9ce Merge branch 'gallium-format-cleanup' 2010-03-02 16:00:34 +00:00
Zack Rusin
faf8215bae llvmpipe: improve based on review from Jose and fix else clauses
else was broken in the outter most else statemants, plus the code
didn't need an inverted mask to compute the inverse of the current
condition.
2010-03-02 10:19:56 -05:00
Keith Whitwell
0c616da241 llvmpipe: remove some ifdefs
No longer any need to protect expensive asserts with #ifdef DEBUG.
2010-03-02 15:03:09 +00:00
Keith Whitwell
5fe2ce28b6 llvmpipe: reorganize transfer usage
Move transfer creation and mapping to the "scene" object, and out of
the rasterizer.  The rasterizer operates on already-mapped
framebuffers only, and no longer needs a screen or context pointer.

The scene object has access to a pipe_context, and this reorg prepares
for moving transfer functionality from the screen to the context.
2010-03-02 15:03:09 +00:00
Brian Paul
8417528e3a intel: passs correct context type to intel_prepare_render() call 2010-03-02 07:50:15 -07:00
Brian Paul
cb099c2ecf i965: include macros.h to get CLAMP macro 2010-03-02 07:47:56 -07:00
Brian Paul
5f40a7aed1 glx: replace assertion with conditional
See fd.o bug 26832.
2010-03-02 07:38:15 -07:00
José Fonseca
8598cebf43 progs/gallium/unit: Add test cases for single precision floats. 2010-03-02 12:47:16 +00:00
José Fonseca
77d9e93901 progs/gallium/unit: Add test cases for Nx16 and Nx32 integer formats. 2010-03-02 12:40:09 +00:00
Michal Krol
4ca70c489b Merge branch 'gallium-no-rhw-position'
Conflicts:
	src/gallium/drivers/r300/r300_blit.c
	src/gallium/drivers/r300/r300_emit.c
	src/gallium/drivers/r300/r300_state_derived.c
2010-03-02 13:35:30 +01:00
José Fonseca
915bbc8b0b progs/gallium/unit: Add more test cases. 2010-03-02 11:30:46 +00:00
José Fonseca
7a31bed4b1 util: Tweak comment for D3D10-like formats. 2010-03-02 11:30:23 +00:00
José Fonseca
4e1aa4a812 progs/gallium/python: Rename pipe formats. 2010-03-02 10:22:35 +00:00
José Fonseca
3b67f87970 gallium/unit: Rename pipe formats. 2010-03-02 10:22:35 +00:00
José Fonseca
496aa4793a rbug: Rename pipe formats. 2010-03-02 10:21:55 +00:00
José Fonseca
4028fab892 gdi: Rename pipe formats. 2010-03-02 10:21:55 +00:00
José Fonseca
907d5611b2 drm/nouveau: Rename pipe formats. 2010-03-02 10:21:55 +00:00
José Fonseca
b34d138d84 svga: Rename pipe formats. 2010-03-02 10:21:55 +00:00
José Fonseca
b7b07b0029 softpipe: Rename pipe formats. 2010-03-02 10:21:54 +00:00
José Fonseca
b5cfa6f196 r300: Rename pipe formats. 2010-03-02 10:21:21 +00:00
Marek Olšák
ff9ddf4d39 util/blitter: Fix the viewport transformation for Z coordinates
When clearing buffers, the depth is specified in the range [0, 1]
and should be passed through blitter "as is".
2010-03-02 10:27:37 +01:00
Vinson Lee
c1c7fa5192 i915g: Add assert to check for null pointer dereference. 2010-03-02 01:15:02 -08:00
Vinson Lee
8462fe2bbf glsl: Add assert to check input to strcmp. 2010-03-02 01:10:29 -08:00
Vinson Lee
247008f6c2 mesa: Add asserts to check inputs to memcpy. 2010-03-02 01:01:46 -08:00
Dave Airlie
8bf5c229f3 r600: fix blender picking.
This fixes the sw fallback for GL_SELECT picking modes.

Fixes object picking blender + depthpick test

http://bugs.freedesktop.org/show_bug.cgi?id=26419

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-03-02 14:12:28 +10:00
Zack Rusin
80f3cc36c5 llvmpipe: implement some control-flow
implements if/else/endif constructs and lays down the code for looping
and others. we create a conditional execution mask which decides which
of the four inputs are enabled for any store. it's used only if an
execution mask is present, otherwise we go through a direct store.
2010-03-01 22:13:22 -05:00
George Sapountzis
d3f24ab33c glapi: fix compile with ES 2010-03-02 03:32:43 +02:00
José Fonseca
6e48f17a16 glapi: Fix syntax. 2010-03-01 23:18:49 +00:00
Pauli Nieminen
9a7776696b radeon: Reduce number of radeon_bo_map calls that require kernel entry.
DMA buffers are often remapped many times for singel cs. To reduce number of
mapping calls ending to kernel dma buffers are mapped when allocated and unmapped
when full or in cs flush. This makes indifual mapping calls in other parts of
code simple increment/decrement reference count which is faster than entering
kernel.

This improves Anholt's openarena benchmark from 36 fps to 44 fps.
2010-03-01 23:56:35 +02:00
Karl Schultz
a379fa8b30 Remove now obsolete mesa_bzero symbol. 2010-03-01 12:21:13 -07:00
George Sapountzis
d7e6e879fd glapi: drop SOLARIS_THREADS
It seems that SOLARIS_THREADS is not used and does not work.
2010-03-01 20:54:20 +02:00
George Sapountzis
d41ab94d35 glapi.c: misc coscmetic for FreeTSD
- move out of of the dispatch/context block to after corresponding init functions

- use more consistent naming with corresponding init functions

- XXX use _glthread_InitTSD() vs (void)_glthread_GetTSD() in _glapi_check_multithread() XXX
2010-03-01 20:54:20 +02:00
George Sapountzis
7b454b00a4 glapi.c: misc cosmetic
mainly, move the multithread check mutex out of the dispatch/context block,
closer to where it is used.
2010-03-01 20:54:19 +02:00
George Sapountzis
cccdc1783f glapi.c: mv init_glapi_relocs to glapi_getproc.c 2010-03-01 20:54:19 +02:00
George Sapountzis
fae5758fac glapi.c: mv check_table to glapi_getproc.c 2010-03-01 20:54:19 +02:00
George Sapountzis
42f3241e04 glapi.c: split check_table to not_null and get_proc 2010-03-01 20:54:18 +02:00
George Sapountzis
750a7f1f1d glapi.h: drop dispatch_override prototypes
cannot find them in mesa tree
2010-03-01 20:54:18 +02:00
George Sapountzis
57d31591d1 glapi.h: misc cosmetic
- revert context/dispatch order, similar to glapi.c
- stray GL_GLEXT_PROTOTYPES
2010-03-01 20:54:18 +02:00
George Sapountzis
a4ec52f245 glapi.h: consolidate GET_DISPATCH() and GET_CURRENT_CONTEXT() macros
Use likely() macro, as this is what most projects use.

Drops GL_CALL define, cannot find it in mesa tree.

Also, whitespace cleaunps in glthread.h
2010-03-01 20:54:17 +02:00
José Fonseca
c9f1db0a03 nouveau: Rename pipe formats. 2010-03-01 18:53:32 +00:00
José Fonseca
33080a8454 llvmpipe: Rename pipe formats. 2010-03-01 18:53:32 +00:00
José Fonseca
4710040617 i965: Rename pipe formats. 2010-03-01 18:53:32 +00:00
José Fonseca
b2b1e899f6 i915g: Rename pipe formats. 2010-03-01 18:53:32 +00:00
José Fonseca
c828f784e5 cell: Rename pipe formats. 2010-03-01 18:53:32 +00:00
José Fonseca
0b6e45e1ee python: Rename pipe formats. 2010-03-01 18:53:32 +00:00
José Fonseca
b306308757 vega: Rename pipe formats. 2010-03-01 18:53:32 +00:00
José Fonseca
5706d7fcaf wgl: Rename pipe formats. 2010-03-01 18:53:32 +00:00
José Fonseca
d34a1a7028 xorg: Rename pipe formats. 2010-03-01 18:53:32 +00:00
José Fonseca
41b80461b7 glx: Rename pipe formats. 2010-03-01 18:53:31 +00:00
José Fonseca
ae3926011e egl: Rename pipe formats. 2010-03-01 18:53:31 +00:00
José Fonseca
c456dd5b4b dri: Rename pipe formats. 2010-03-01 18:53:31 +00:00
José Fonseca
7d1a79a04e mesa: Rename pipe formats. 2010-03-01 18:53:31 +00:00
José Fonseca
a489753471 translate: Rename pipe formats. 2010-03-01 18:53:31 +00:00
José Fonseca
7a61722f69 draw: Rename pipe formats. 2010-03-01 18:53:31 +00:00
José Fonseca
712ba6e6b0 util: Rename pipe formats. 2010-03-01 18:53:31 +00:00
José Fonseca
3843548a67 gallium: Standardize on the LSB->MSB notation.
Less confusing, and seems to gather more consensus.

Below are the sed commands used. This and following commits are the
result of applying this too to the whole tree, plus manual whitespaces
fixes.

s/\<PIPE_FORMAT_A8R8G8B8_UNORM\>/ASDGFSJKDGSDFGSJDFGREKT/g
s/\<PIPE_FORMAT_B8G8R8A8_UNORM\>/PIPE_FORMAT_A8R8G8B8_UNORM/g
s/\<ASDGFSJKDGSDFGSJDFGREKT\>/PIPE_FORMAT_B8G8R8A8_UNORM/g

s/\<PIPE_FORMAT_X8R8G8B8_UNORM\>/ASDGFSJKDGSDFGSJDFGREKT/g
s/\<PIPE_FORMAT_B8G8R8X8_UNORM\>/PIPE_FORMAT_X8R8G8B8_UNORM/g
s/\<ASDGFSJKDGSDFGSJDFGREKT\>/PIPE_FORMAT_B8G8R8X8_UNORM/g

s/\<PIPE_FORMAT_R8G8B8A8_UNORM_REV\>/PIPE_FORMAT_A8B8G8R8_UNORM/g
s/\<PIPE_FORMAT_R8G8B8X8_UNORM\>/PIPE_FORMAT_X8B8G8R8_UNORM/g
s/\<PIPE_FORMAT_A1R5G5B5_UNORM\>/PIPE_FORMAT_B5G5R5A1_UNORM/g
s/\<PIPE_FORMAT_A4R4G4B4_UNORM\>/PIPE_FORMAT_B4G4R4A4_UNORM/g
s/\<PIPE_FORMAT_R5G6B5_UNORM\>/PIPE_FORMAT_B5G6R5_UNORM/g
s/\<PIPE_FORMAT_A2B10G10R10_UNORM\>/PIPE_FORMAT_R10G10B10A2_UNORM/g

s/\<PIPE_FORMAT_A8L8_UNORM\>/PIPE_FORMAT_L8A8_UNORM/g

s/\<PIPE_FORMAT_A8L8_SRGB\>/PIPE_FORMAT_L8A8_SRGB/g
s/\<PIPE_FORMAT_R8G8B8A8_SRGB\>/PIPE_FORMAT_A8B8G8R8_SRGB/g
s/\<PIPE_FORMAT_R8G8B8X8_SRGB\>/PIPE_FORMAT_X8B8G8R8_SRGB/g

s/\<PIPE_FORMAT_A8R8G8B8_SRGB\>/ASDGFSJKDGSDFGSJDFGREKT/g
s/\<PIPE_FORMAT_B8G8R8A8_SRGB\>/PIPE_FORMAT_A8R8G8B8_SRGB/g
s/\<ASDGFSJKDGSDFGSJDFGREKT\>/PIPE_FORMAT_B8G8R8A8_SRGB/g

s/\<PIPE_FORMAT_X8R8G8B8_SRGB\>/ASDGFSJKDGSDFGSJDFGREKT/g
s/\<PIPE_FORMAT_B8G8R8X8_SRGB\>/PIPE_FORMAT_X8R8G8B8_SRGB/g
s/\<ASDGFSJKDGSDFGSJDFGREKT\>/PIPE_FORMAT_B8G8R8X8_SRGB/g

s/\<PIPE_FORMAT_A8B8G8R8_SNORM\>/PIPE_FORMAT_R8G8B8A8_SNORM/g
s/\<PIPE_FORMAT_X8B8G8R8_SNORM\>/PIPE_FORMAT_R8G8B8X8_SNORM/g
s/\<PIPE_FORMAT_X8UB8UG8SR8S_NORM\>/PIPE_FORMAT_R8SG8SB8UX8U_NORM/g
s/\<PIPE_FORMAT_B6UG5SR5S_NORM\>/PIPE_FORMAT_R5SG5SB6U_NORM/g

s/\<PIPE_FORMAT_S8Z24_UNORM\>/ASDGFSJKDGSDFGSJDFGREKT/g
s/\<PIPE_FORMAT_Z24S8_UNORM\>/PIPE_FORMAT_S8Z24_UNORM/g
s/\<ASDGFSJKDGSDFGSJDFGREKT\>/PIPE_FORMAT_Z24S8_UNORM/g

s/\<PIPE_FORMAT_X8Z24_UNORM\>/ASDGFSJKDGSDFGSJDFGREKT/g
s/\<PIPE_FORMAT_Z24X8_UNORM\>/PIPE_FORMAT_X8Z24_UNORM/g
s/\<ASDGFSJKDGSDFGSJDFGREKT\>/PIPE_FORMAT_Z24X8_UNORM/g

s/\<PIPE_FORMAT_YCBCR\>/PIPE_FORMAT_UYVY/g
s/\<PIPE_FORMAT_YCBCR_REV\>/PIPE_FORMAT_YUYV/g
2010-03-01 18:51:55 +00:00
José Fonseca
b152abe914 progs/gallium/unit: Rename PIPE_FORMAT_A8B8G8R8_SNORM. 2010-03-01 18:47:36 +00:00
José Fonseca
568a3c7365 r300: Remove PIPE_FORMAT_A8B8G8R8_SNORM.
PIPE_FORMAT_R8G8B8A8_SNORM already listed.
2010-03-01 18:47:36 +00:00
José Fonseca
971ab386c0 softpipe: Advertise PIPE_FORMAT_R8G8B8A8_SNORM instead. 2010-03-01 18:47:36 +00:00
José Fonseca
a6c4c4486d util: Remove PIPE_FORMAT_A8B8G8R8_SNORM. 2010-03-01 18:47:36 +00:00
José Fonseca
835a725684 gallium: Remove PIPE_FORMAT_A8B8G8R8_SNORM.
Its actually an alias for PIPE_FORMAT_R8G8B8A8_SNORM.
2010-03-01 18:47:36 +00:00
Michal Krol
c863f30155 util: Generate linear<->sRGB conversion tables. 2010-03-01 19:00:40 +01:00
Michal Krol
9a2c4f907b tgsi: Cleanup exec code for CLAMP, CMP and CND. 2010-03-01 17:57:18 +01:00
José Fonseca
ac8e1c18f2 util: Fix PIPE_FORMAT_R8G8B8_SRGB swizzles.
The only user of PIPE_FORMAT_R8G8B8_SRGB is mesa, which
per src/mesa/main/texstore.c interprets it as

  R8 G8 B8

and not the other way around.
2010-03-01 16:42:54 +00:00
José Fonseca
88e640fc14 xlib: Use PIPE_FORMAT_R8G8B8A8_UNORM(_REV) as appropriate. 2010-03-01 16:28:38 +00:00
José Fonseca
a2bcdb7e50 r300: Use PIPE_FORMAT_R8G8B8A8_UNORM_REV where appropriate. 2010-03-01 16:26:36 +00:00
José Fonseca
2c1249e226 i915g: Use PIPE_FORMAT_R8G8B8A8_UNORM_REV where appropriate. 2010-03-01 16:25:25 +00:00
José Fonseca
382d1d370b mesa: Use PIPE_FORMAT_R8G8B8A8_UNORM_REV where appropriate. 2010-03-01 16:25:04 +00:00
José Fonseca
daf7caf4cf util: Use PIPE_FORMAT_R8G8B8A8_UNORM_REV where appropriate. 2010-03-01 16:24:48 +00:00
José Fonseca
cd8b652303 gallium: Introduce a new format to disambiguate PIPE_FORMAT_R8G8B8A8_UNORM.
PIPE_FORMAT_R8G8B8A8_UNORM now means just

  R8 G8 B8 A8

PIPE_FORMAT_R8G8B8A8_UNORM_REV means

  A8 B8 G8 R8

And the thumb rule is vertex buffers refer to PIPE_FORMAT_R8G8B8A8_UNORM,
while textures refer to PIPE_FORMAT_R8G8B8A8_UNORM_REV.

PIPE_FORMAT_R8G8B8A8_UNORM_REV is just a temporary name.
2010-03-01 16:24:09 +00:00
José Fonseca
d170d73b16 bin: Remove raw2png.py.
Outdated, broken, and unused.
2010-03-01 16:10:49 +00:00
José Fonseca
018f4aca79 util: Fix PIPE_FORMAT_R8G8B8_UNORM description and notes.
There is actually no ambiguity in use -- it is always used as

  R8 G8 B8
2010-03-01 16:07:53 +00:00
Michal Krol
b42455c4f4 r300: Save viewport and clip states before invoking blitter. 2010-03-01 17:07:03 +01:00
Michal Krol
932e6f8d52 util: Fix u_blitter setup code after bypass_vs_clip_and_viewport removal.
Not tested.
2010-03-01 17:06:20 +01:00
José Fonseca
4c3bfc9778 gallium: Remove inexisting formats.
Can't find these formats used in any state tracker or any API.

For some of these probably the reverse notation was meant, for which
formats already exist.
2010-03-01 15:17:41 +00:00
José Fonseca
cfdc146247 util: Remove inexisting formats.
Can't find these formats used in any state tracker or any API.

For some of these probably the reverse notation was meant, for which
formats already exist.
2010-03-01 15:16:54 +00:00
José Fonseca
28f2888565 util: A few more links for D3D formats. 2010-03-01 15:14:30 +00:00
José Fonseca
3a26193fd5 r300: Don't implement PIPE_FORMAT_R8G8B8X8_SNORM.
This format is not actually used by any state tracker. Probably the
reverse notation was mean, which would make it identical to
PIPE_FORMAT_X8B8G8R8_SNORM.
2010-03-01 15:14:00 +00:00
José Fonseca
b66b4cf646 util: A few more todo marks. 2010-03-01 14:56:20 +00:00
José Fonseca
4a991b5783 util: More documentation for u_format.csv 2010-03-01 14:56:20 +00:00
José Fonseca
ffe90af2e8 util: Tweak comments regarding R8G8B8A8/X8_UNORM. 2010-03-01 14:56:20 +00:00
José Fonseca
bd3c063da8 python: Don't mention deprecated drivers=trace option.
Now trace always built.
2010-03-01 14:56:19 +00:00
José Fonseca
f54aecc4f2 python: Don't mention deprecated drivers=trace option.
Now trace always built.
2010-03-01 13:08:07 +00:00
José Fonseca
e243e87b52 llvmpipe: Don't mention deprecated drivers=trace option.
Now trace always built.
2010-03-01 13:08:07 +00:00
José Fonseca
c05c675de6 progs/gallium: Make a phony target "unit" to run unit tests. 2010-03-01 13:08:06 +00:00
Francisco Jerez
e7ca0e126e dri/nouveau: Combine the dummy texture more deterministically on nv0x. 2010-03-01 02:07:01 +01:00
Francisco Jerez
c7955f1341 dri/nouveau: Fix up the ADD texture environment on nv0x. 2010-03-01 02:07:01 +01:00
Andrew Randrianasulu
394672659d dri/nouveau: Add two stencil operation cases in nv04_state_raster.c.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-03-01 02:07:00 +01:00
Andrew Randrianasulu
949587d169 dri/nouveau: Allow to render to XRGB8888 textures.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-03-01 02:06:13 +01:00
Marek Olšák
d2ac3d5e79 r300g: atomize texture and sampler states 2010-02-28 19:30:39 +01:00
Marek Olšák
942762cd97 r300g: decouple vertex stream setup (PSC) and VS output mapping (VAP_OUT)
Formerly known as vertex_format_state. These two are completely
unrelated when using HWTCL and decoupling them makes the design
less SWTCL-centric.

When bypass_vs_clip_and_viewport gets removed, the PSC setup will
no longer be a derived state.

This change shouldn't make unbreaking SWTCL harder.
2010-02-28 19:30:39 +01:00
Jakob Bornecrantz
79a86d312d i965g: Fix texture creation 2010-02-28 16:28:44 +00:00
Alex Weiss
54f9c509a1 Fixed mklib to properly merge static libraries on darwin.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
2010-02-28 00:55:03 -08:00
Vinson Lee
909c08d177 dri: Remove dead code. 2010-02-27 21:57:38 -08:00
Vinson Lee
edd6c338cf glut: Add asserts to check for null pointer dereferences. 2010-02-27 21:19:47 -08:00
Vinson Lee
706fffbff5 glx: Add assert to check input to memcpy. 2010-02-27 20:23:17 -08:00
Vinson Lee
75dba756b2 mesa: Add asserts to check inputs to memcpy. 2010-02-27 20:11:31 -08:00
Vinson Lee
bfdee9cc70 mesa: Add assert to check input to memcpy is not null. 2010-02-27 17:19:31 -08:00
Vinson Lee
65974f67e1 glsl: Move assert from outside to inside of _slang_gen_swizzle function. 2010-02-27 17:01:25 -08:00
Vinson Lee
cab77711b3 dri: Add assert to check for null pointer dereference. 2010-02-27 16:51:17 -08:00
Vinson Lee
975f105bb8 i810: Add assert to check for null pointer dereference. 2010-02-27 16:41:49 -08:00
Vinson Lee
b45af1ec61 mach64: Add asserts to check for null pointer dereferences. 2010-02-27 16:38:09 -08:00
Vinson Lee
689249bcbe mga: Add assert to check for null pointer dereference. 2010-02-27 16:30:49 -08:00
Vinson Lee
a5406444ae r128: Add assert to check for null pointer dereference. 2010-02-27 16:28:30 -08:00
Marek Olšák
aa4d47f68f st/mesa: do not advertise S3TC if the external lib is not available 2010-02-28 00:46:36 +01:00
Marek Olšák
d36e3952c2 r300g: put validating buffers after flushing
Also cleaning up the nasty validation process.
2010-02-28 00:46:35 +01:00
Marek Olšák
4ed97f0a73 r300g: use the atom size directly during emission 2010-02-28 00:46:35 +01:00
Marek Olšák
279715e76e r300g: atomize invalidation of texture caches 2010-02-28 00:46:35 +01:00
Marek Olšák
fe6d3b9222 r300g: atomize PVS flush
The first non-state atom. It's better and cleaner to have it.
2010-02-28 00:46:35 +01:00
Marek Olšák
841122d0e8 r300g: add size parameter to the atom emit functions
Maintaining a closer relationship between the atom size and what's passed
in BEGIN_CS.
2010-02-28 00:46:35 +01:00
Marcin Slusarz
14771ba7e4 mesa: remove libmesagallium.a on make clean
Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-02-27 23:44:08 +00:00
Vinson Lee
3d3e3a56f2 r300: Add asserts to check for null pointer dereferences. 2010-02-27 15:36:11 -08:00
Vinson Lee
5c007f42a1 savage: Add assert to check for null pointer dereference. 2010-02-27 15:29:44 -08:00
Vinson Lee
9db6a70af5 sis: Add assert to check function pointer is not null. 2010-02-27 15:13:38 -08:00
Vinson Lee
b22437937f tdfx: Add asserts to check for null pointer dereferences. 2010-02-27 15:07:30 -08:00
Vinson Lee
e31a379661 unichrome: Assert that pointer is not null before dereferencing. 2010-02-27 14:56:27 -08:00
José Fonseca
1eba490202 util: Fix X8/A8B8G8R8_SNORM's swizzle. 2010-02-27 20:29:14 +00:00
José Fonseca
5b3c0c151b progs/gallium: Add unit tests for pixel format packing/unpacking. 2010-02-27 20:29:14 +00:00
Marek Olšák
74f94e8fdf r300g: move the emission of GA_POINT_MINMAX into emit_fb_state
The only practical limits are the ones derived from the currently-set
framebuffer state.
2010-02-27 20:09:38 +01:00
Marek Olšák
a3d4d0dec2 r300g: put the emission of R300_US_OUT_FMT_UNUSED back
It wasn't such a good idea to remove it. :/
2010-02-27 20:09:38 +01:00
Marek Olšák
f129a7dd68 r300g: mark rasterizer_state as dirty only when it's not NULL 2010-02-27 20:08:46 +01:00
Marek Olšák
c05f998f02 radeong: clean up includes 2010-02-27 18:40:47 +01:00
Marek Olšák
93da152209 r300g: always emit the correct max vertex index to avoid DRM errors
Fixing bizarre reports that a vertex buffer is not large enough.
2010-02-27 18:39:35 +01:00
Marek Olšák
dba7ad8953 r300g: remove pointless "while" 2010-02-27 18:37:44 +01:00
Vinson Lee
d3004d9156 radeon: Assert pointer is not null before dereferencing.
Add back an assert that was removed in commit
cd5f167353.
2010-02-27 02:28:00 -08:00
Vinson Lee
e63f532d26 dri: Assert pointer is not null before dereferencing. 2010-02-27 02:18:06 -08:00
Vinson Lee
307071fe1e st/dri: Assert pointer is not null before dereferencing. 2010-02-27 02:01:56 -08:00
Vinson Lee
226d981738 r600: Assert pointer is not null before dereferencing. 2010-02-27 01:52:46 -08:00
Vinson Lee
24a8b470ba glsl: Assert input to strcmp is not null. 2010-02-27 00:31:14 -08:00
Vinson Lee
fd29be3831 glsl: Assert pointer is not null before dereferencing. 2010-02-27 00:08:14 -08:00
Vinson Lee
be97d2c0a6 mesa: Remove unnecessary header. 2010-02-26 23:58:59 -08:00
Jakob Bornecrantz
bbefd86125 st/xorg: Re-enable crtc on resize 2010-02-27 02:12:48 +00:00
Jakob Bornecrantz
122b472814 st/xorg: Fix copy-topy 2010-02-27 02:12:48 +00:00
Jakob Bornecrantz
cfbf75670d vmware/xorg: Bump to match vmware driver 2010-02-27 02:12:48 +00:00
Jakob Bornecrantz
956cd73c23 st/xorg: Make resize fail gracefully 2010-02-27 02:12:48 +00:00
Jakob Bornecrantz
bad4b29d77 st/xorg: Obey max {width|height} from kernel and Gallium 2010-02-27 02:12:48 +00:00
Thomas Hellstrom
55e5737bae st/xorg: Encapsulate all customizable stuff in a separate class.
This avoids exposing the ms driver structure to the winsys,
and nicely encapsulates driver customizable stuff.
In the future more things might be customizable by the winsys, like
throttling, 3D readback etc.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-02-27 02:12:47 +00:00
Jakob Bornecrantz
ab8a232b2c vmware/xorg: Export modinfo just as the other vmware X drivers does 2010-02-27 02:12:47 +00:00
Jakob Bornecrantz
dfe0cc4b02 st/xorg: A bit more debugging info 2010-02-27 02:12:47 +00:00
Jakob Bornecrantz
1eb5b42097 st/xorg: Make default of debugging fallbacks smart
Set it to the same as 2d acceleration
2010-02-27 02:12:47 +00:00
Jakob Bornecrantz
d11f9a7bd8 drm/vmware: Latest interface changes are backwards incopatible
Since the execbuffer change actually changed size off the ioctl
struct and not just a reuse of padded bits, we can't support
old kernels as easily as the scanout change was.
2010-02-27 02:12:47 +00:00
Thomas Hellstrom
0a1b760cd2 st/xorg, vmware/xorg: Fix xnfcalloc arguments.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-02-27 02:12:47 +00:00
Thomas Hellstrom
4fd43b0922 vmware: Update vmwgfx_drm.h to kernel version.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-02-27 02:12:47 +00:00
Alex Deucher
52eb2ef6bf r600: enable OQ on rv740 on drms with working pipe config 2010-02-26 15:26:51 -05:00
Klaus Schnass
424a8385e4 r600: fail to validate unsupported texture formats 2010-02-26 15:26:51 -05:00
Christoph Bumiller
d1fe9bcc3f nv40: fix include of nv04_surface_2d.h 2010-02-26 21:16:52 +01:00
Kristian Høgsberg
69a0f375cc eglinfo: Wrap extension string 2010-02-26 15:11:29 -05:00
Kristian Høgsberg
a509b8cc24 xeglgears: Add an case that exercises EGL_KHR_gl_renderbuffer_image 2010-02-26 14:52:14 -05:00
Kristian Høgsberg
557c20b309 egl_dri2: Implement EGL_KHR_gl_renderbuffer_image 2010-02-26 14:52:14 -05:00
Kristian Høgsberg
d7322c9d42 intel: Lookup requested renderbuffer in intel_create_image_from_renderbuffer
Previously we'd use the current renderbuffer.
2010-02-26 14:52:14 -05:00
Brian Paul
b056e15662 progs/tests: add compile-time option for coloring texture corners
When debugging wrap modes it's helpful to set each corner of the texture
image to a distinct color.
2010-02-26 12:32:04 -07:00
Brian Paul
f519d3d6b6 gallium: define GENERATED auxiliary files
Don't need special default dependency on u_format_pack.h anymore.
2010-02-26 12:32:04 -07:00
Brian Paul
f89c237c2c gallium: added GENERATED_SOURCES var to Makefile.template
For use in dependency checking and make clean.
2010-02-26 12:32:04 -07:00
Dan Nicholson
3a650ba3a2 progs/glsl: Ensure CFLAGS are passed during linking
Commit ab6825b3e3 fixed an issue where the
architecture option -m32 wasn't being passed to the compiler when
linking .o files. This would only fix the issue with user's building
with the hacky --enable-32-bit. The right way to fix this is to pass
CFLAGS to the linker, which the GNU make builtin rules unfortunately
don't do.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Tested-by: Török Edwin <edwintorok@gmail.com>
2010-02-26 11:05:54 -08:00
Kristian Høgsberg
88c174d182 xeglgears: Clean up the code a bit
Still a mess...
2010-02-26 13:18:47 -05:00
Kristian Høgsberg
ea203de2d0 Set API dispatch pointers for OES_EGL_image functions
This chunk fell through the cracks when I rebase the EGLImage patch series.
2010-02-26 13:18:47 -05:00
Brian Paul
ac56a44d5e Revert "gallium: remove unneeded -I path from Makefile.templast"
This reverts commit d9c65ddd52.

Looks like the nouveau drivers need this.  Perhaps the drivers
could be fixed to add the extra -I path where needed.  I'll leave
that up to others.
2010-02-26 10:54:20 -07:00
Brian Paul
5ed444a7a4 gallium/nouveau: clean-up #includes 2010-02-26 10:54:05 -07:00
Brian Paul
d9c65ddd52 gallium: remove unneeded -I path from Makefile.templast 2010-02-26 10:44:41 -07:00
Brian Paul
298a035286 softpipe: fix up #includes 2010-02-26 10:43:56 -07:00
Brian Paul
3f9ec9aa96 gallium/trace: remove unneeded path prefixes on #includes 2010-02-26 10:43:19 -07:00
Brian Paul
549ce30784 gallium/identity: remove unneeded path prefixes on #includes 2010-02-26 10:43:04 -07:00
Markus Fleschutz
83f1183e76 glx: fix incorrect array stack memory allocation
The array stack space wasn't allocated to the proper size.  Fixes out of
bounds memory writes when the client/array stack depth exceeds one.

See fd.o bug 26768.
2010-02-26 10:34:21 -07:00
José Fonseca
c78f84eebb util: Define SRGB's channels as normalized.
A better approximation than uscaled...
2010-02-26 16:46:34 +00:00
José Fonseca
9beb302212 util: Code generate functions to pack and unpack a single pixel.
Should work correctly for all pixel formats except SRGB formats.

Generated code made much simpler by defining the pixel format as
a C structure. For example this is the generated structure for
PIPE_FORMAT_B6UG5SR5S_NORM:

union util_format_b6ug5sr5s_norm {
   uint16_t value;
   struct {
      int r:5;
      int g:5;
      unsigned b:6;
   } chan;
};

Not used everywhere yet because it seems compiled code is slower than
bitshift arithmetic by some misterious reason. So we should generate
bitshift arithmetic at least for the simple UNORM pixel formats.
2010-02-26 16:46:34 +00:00
José Fonseca
4757325951 util: Factor some code into u_format_parse.py 2010-02-26 16:46:34 +00:00
José Fonseca
fda9a19b34 util: Add util_bswap16. 2010-02-26 16:46:34 +00:00
José Fonseca
092010db37 util: Use python names consistent with u_format.h 2010-02-26 16:46:34 +00:00
Brian Paul
fe25476c04 mesa: fix _BaseFormat assignment in _mesa_soft_renderbuffer_storage()
The rb->InternalFormat field will be set by the caller if the allocation
succeeds.  Until then, this field's value can't be used.  Fixes a failed
assertion with FlightGear.
2010-02-26 09:03:34 -07:00
Brian Paul
e215830c38 mesa: update tarball file list, bump version string 2010-02-26 08:21:44 -07:00
Brian Paul
68205bf5b4 progs/xdemos: fix typo in glxinfo help 2010-02-26 08:17:37 -07:00
José Fonseca
8416d34279 llvmpipe: Fix lp_tile_r5g6b5_unorm_write_4ub.
Was using 32bit integer pointers instead of 16bits.
2010-02-26 10:12:53 +00:00
José Fonseca
eee21b3812 llvmpipe: Fix scons dependencies. 2010-02-26 10:12:53 +00:00
José Fonseca
e2b02ea9db util: Add is_pot() method to formats. 2010-02-26 10:12:53 +00:00
Michel Dänzer
0c20b30333 Fix up more stale references to gl(X)_API.xml which have moved.
AFAICT the getproc* stanzas in progs/{fp,trivial}/Makefile are completely
unused at this point, so just remove them.
2010-02-26 10:48:07 +01:00
Wil Reichert
2da7f1af38 fix test progs from gl_API move
Looks like these got missed.
2010-02-26 10:48:06 +01:00
José Fonseca
49f35a379d Revert "glapi: Remove unnecessary headers."
This reverts commit ead22e6a32.

This headers are not unnecessary on windows.
2010-02-26 09:09:35 +00:00
Vinson Lee
e5c691f445 r300/compiler: Assert that array index is not negative. 2010-02-26 00:17:03 -08:00
Vinson Lee
ead22e6a32 glapi: Remove unnecessary headers. 2010-02-25 23:58:45 -08:00
Vinson Lee
c76d4db252 i965: Remove unnecessary headers. 2010-02-25 23:51:05 -08:00
Brian Paul
bdbb5f8170 swrast: add 0.5 bias in tex_array_slice() per the spec 2010-02-25 20:21:39 -07:00
Brian Paul
70d5c48341 docs: GL_EXT_texture_array updates 2010-02-25 20:11:55 -07:00
Brian Paul
4db9f83612 mesa: enable GL_EXT_texture_array for sw drivers 2010-02-25 20:11:55 -07:00
Brian Paul
1f2b495b55 glsl: implement support for GL_EXT_texture_array
GL_EXT_texture_array is different from the existing GL_MESA_texture_array
support in that the former is only supported for GLSL, not fixed-function.

The shadow compare versions of the sampler functions haven't been tested
yet.  The non-shadow versions have been tested with a new piglit test.
2010-02-25 20:11:55 -07:00
Brian Paul
1edd444c2e mesa: added new extension flag for GL_EXT_texture_array 2010-02-25 20:11:54 -07:00
Brian Paul
58ab56d323 swrast: the only wrap mode for selecting texture array slices is clamp 2010-02-25 20:11:54 -07:00
Brian Paul
ac498f2dce mesa: added texture array targets in sizeof_glsl_type() 2010-02-25 20:11:54 -07:00
Brian Paul
2c1619869a mesa: added cases for texture array targets 2010-02-25 20:11:54 -07:00
Brian Paul
a8dafe713f mesa: remove redundant call to _mesa_base_fbo_format() 2010-02-25 20:11:54 -07:00
Brian Paul
a858bc393e mesa: added renderbuffer->_BaseFormat assertion 2010-02-25 20:11:54 -07:00
Eric Anholt
839e6bd8b9 i965: Try to hook up the Sandybridge URB_WRITE SEND message.
My units still hang when doing this if the VS is enabled.
2010-02-25 18:36:44 -08:00
Eric Anholt
c8e5100a39 i965: Fix up the VUE handling for SNB, and hopefully clarify comments. 2010-02-25 18:36:44 -08:00
Eric Anholt
54ea39f768 i965: Don't set a nonexistent enable bit in several SNB state pointers.
The modify bit is now usually in the instruction header.  The
exception is CC state pointers.
2010-02-25 18:36:44 -08:00
Eric Anholt
1d7aec053b i965: Lump SNB in with Ironlake for bigger VUEs.
This gets the VS to the point of accepting vertices.  \o/
2010-02-25 18:36:44 -08:00
Eric Anholt
d790564f94 i965: Fix the SNB VE valid bit.
So, when the docs say that 0 means enabled now?  That's a lie.
2010-02-25 18:36:44 -08:00
Eric Anholt
fc26f894ba intel: Fix up INTEL_NO_HW support.
This was accidentally (it seems) deleted in
5203b7227c
2010-02-25 18:36:44 -08:00
Eric Anholt
89cce536cb i965: Don't include SNB in has_negative_rhw_bug. 2010-02-25 18:36:44 -08:00
Eric Anholt
dedfc0e6e6 i965: Fix the SNB clip near VP API bit. 2010-02-25 18:36:44 -08:00
Eric Anholt
17ddb7c7e8 i965: Fix the SNB URB entry count setup. 2010-02-25 18:36:44 -08:00
George Sapountzis
9a4a219d20 drop header files and demos for dropped window systems 2010-02-26 04:02:41 +02:00
George Sapountzis
25da8e66f8 remove hack for miniglx from dri/utils.c 2010-02-26 04:02:41 +02:00
George Sapountzis
ddecefbb82 drop linux-solo configs 2010-02-26 04:02:41 +02:00
George Sapountzis
900b163a86 minor cleanup of dri/Makefile.template's after miniglx drop
also makes the WINDOW_SYSTEM configure var useless ...
2010-02-26 04:02:41 +02:00
George Sapountzis
593eb8a642 drop stray src/mesa/main/sources 2010-02-26 04:02:40 +02:00
Brian Paul
c9e8ff1976 mesa: use simplified _BaseFormat value in render-to-texture code
Fixes fd.o bug 26762.
2010-02-25 19:00:54 -07:00
Brian Paul
31ff9b0a13 util: remove a trailing semicolon in format table code 2010-02-25 18:59:00 -07:00
Török Edvin
ab6825b3e3 progs/glsl: add ARCH_FLAGS to LDLIBS
Allows building 32-bit demos on 64-bit Debian host.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-02-25 18:58:55 -07:00
Vinson Lee
3e882e943c util: Remove import of unused sys module. 2010-02-25 17:55:36 -08:00
Kristian Høgsberg
44f78eb18e Remove unused mini and mesa glu subdirectories 2010-02-25 17:40:11 -05:00
Kristian Høgsberg
b15fe60ba5 Drop unused glut subdirectories 2010-02-25 17:40:11 -05:00
Kristian Høgsberg
74377c8d1b Remove windml progs 2010-02-25 17:40:11 -05:00
Kristian Høgsberg
a9e3669683 Remove remaining miniglx references 2010-02-25 17:40:11 -05:00
Kristian Høgsberg
79aeafd3ca Drop fb, ffb and gamma dri drivers 2010-02-25 17:40:11 -05:00
Kristian Høgsberg
40c6bb58be Drop classic mesa svga driver 2010-02-25 17:40:10 -05:00
Kristian Høgsberg
e14a5b14b2 Drop glide driver 2010-02-25 17:40:10 -05:00
Kristian Høgsberg
230d263aca Remove GGI support 2010-02-25 17:40:10 -05:00
Kristian Høgsberg
b5c3199afe Remove dos driver 2010-02-25 17:40:10 -05:00
Kristian Høgsberg
97972244d5 Remove d3d driver 2010-02-25 17:40:10 -05:00
Kristian Høgsberg
4387580e50 Remove directfb support 2010-02-25 17:40:09 -05:00
Kristian Høgsberg
dadd5094bf Remove allegro driver 2010-02-25 17:40:09 -05:00
Vinson Lee
0bca812dc4 Revert "glu/sgi: Set freed pointer to NULL."
This commit breaks flightgear fgfs. A null pointer is
dereferenced in the function MakeVertex.

This reverts commit 9be414f4b9.
2010-02-25 14:26:25 -08:00
Eric Anholt
6a9705f41d Merge branch 'sandybridge'
This brings in the initial code I've been working on for bringing up
OpenGL on Sandybridge in the i965 driver.  It doesn't work yet.
2010-02-25 10:56:18 -08:00
Eric Anholt
b43cfa9c5e docs: addition of ARB_fcc to i965. 2010-02-25 10:56:00 -08:00
Eric Anholt
38c4494092 i965: Add SNB math opcode support.
This is untested at this point.
2010-02-25 10:53:08 -08:00
Eric Anholt
078e7b62f6 i965: Emit SNB FF unit state after the unit's push constants.
There's a BUN for the WM unit that says WM_STATE must immediately
follow PS_CONSTANTS, which this addresses.  Presumably other units are
roughly the same, too.
2010-02-25 10:53:08 -08:00
Eric Anholt
c791f8a1e5 i965: Set up the SNB sampler state pointers. 2010-02-25 10:53:08 -08:00
Eric Anholt
5878c841e9 i965: Set GS rendering enabled even when the GS stage is disabled.
This is copying the behavior of other drivers.
2010-02-25 10:53:08 -08:00
Eric Anholt
f69d46150c i965: Add a couple SNB state packets I saw in other batchbuffer dumps. 2010-02-25 10:53:08 -08:00
Eric Anholt
2ab3bf2fa3 i965: Re-disable the VS.
There's stuff that needs to happen in the ISA before we can play with
actually executing anything in the VS.
2010-02-25 10:53:08 -08:00
Eric Anholt
1489f108f4 i965: Fix up some Sandybridge define checks for the structure rebase. 2010-02-25 10:53:08 -08:00
Eric Anholt
591a996ab6 i965: Move PIPELINE_SELECT to the top of gen6 3d pipeline setup. 2010-02-25 10:53:08 -08:00
Eric Anholt
ab8c37fe18 i965: Untested Sandybridge WM packets. 2010-02-25 10:53:08 -08:00
Eric Anholt
737fac7ba2 i965: Hook up remaining Sandybridge state packets besides WM. 2010-02-25 10:53:08 -08:00
Eric Anholt
70be48dff6 i965: Untested Sandybridge SF setup. 2010-02-25 10:53:08 -08:00
Eric Anholt
dd743fa36f i965: Fixup Sandybridge GS packet from doc updates. 2010-02-25 10:53:08 -08:00
Eric Anholt
da577ee880 i965: Fix up Sandybridge GS reg definitions 2010-02-25 10:53:08 -08:00
Eric Anholt
a935cb2aca i965: fix typo in SNB VS defines comment 2010-02-25 10:53:08 -08:00
Eric Anholt
305b72154f i965: fix typo in SNB GS register defines 2010-02-25 10:53:08 -08:00
Eric Anholt
0fbc0b0c17 i965: Enable clip stats. 2010-02-25 10:53:07 -08:00
Eric Anholt
1ae0cb5f28 i965: Add Sandybridge viewport setup. 2010-02-25 10:53:07 -08:00
Eric Anholt
c9065cd61f i965: Enable DRAWING_RECTANGLE emit on Sandybridge. 2010-02-25 10:53:07 -08:00
Eric Anholt
64e0c586a7 i965: Add Sandybridge scissor state. 2010-02-25 10:53:07 -08:00
Eric Anholt
93fcfc8369 i965: Fix up the VF stats packet header. 2010-02-25 10:53:07 -08:00
Eric Anholt
a38096aa94 i965: Set the state base address on Sandybridge. 2010-02-25 10:53:07 -08:00
Eric Anholt
2c3d6f8e3e i965: Free gen6 state BOs on context destroy. 2010-02-25 10:53:07 -08:00
Eric Anholt
d971375bc1 i965: Giant pile of flushing to track down SNB bringup issues.
This should go away before we push the code.
2010-02-25 10:53:07 -08:00
Eric Anholt
d512aa3d6d i965: Fix some defines of gen6 regs from docs comparison. 2010-02-25 10:53:07 -08:00
Eric Anholt
040cf3fcdc i965: Add basic decode of new gen6 packet boundaries. 2010-02-25 10:53:07 -08:00
Eric Anholt
ff3997904a i965: Reconnect the index/vertex setup. 2010-02-25 10:53:07 -08:00
Eric Anholt
c9dc6d425e i965: Set up the SNB URB.
even with vs disabled, still doesn't work.
2010-02-25 10:53:06 -08:00
Eric Anholt
0da50fa670 i965: Try sending prims down the pipeline.
Now things catch on fire.
2010-02-25 10:53:06 -08:00
Eric Anholt
8485e100b8 i965: Try uploading SNB VS constants. 2010-02-25 10:53:06 -08:00
Eric Anholt
eda1b50aa1 i965: Try turning on the VS. 2010-02-25 10:53:06 -08:00
Eric Anholt
98f9666f04 i965: Get vp-tri batchbuffers running (no rendering). 2010-02-25 10:53:06 -08:00
Eric Anholt
f58fbcf761 i965: Add untested REJECT_ALL clip state. 2010-02-25 10:53:06 -08:00
Eric Anholt
520b64ddfb i965: Add untested passthrough GS setup. 2010-02-25 10:53:06 -08:00
Eric Anholt
ba882d7827 i965: Add untested Sandybridge passthrough VS setup. 2010-02-25 10:53:06 -08:00
Eric Anholt
7ee590424c i965: Start adding support for the Sandybridge CC unit. 2010-02-25 10:53:06 -08:00
Eric Anholt
9dce60f35b i965: Set up sandybridge binding table pointers but don't enable it yet.
It hangs the GPU at the clipper stage, presumably because we're lacking
other setup.
2010-02-25 10:53:06 -08:00
Eric Anholt
0b9932ffde i965: Update WM surface state setup for sandybridge's new BLEND_STATE. 2010-02-25 10:53:06 -08:00
Eric Anholt
719f2b1d85 i965: Set up sandybridge depthbuffer. 2010-02-25 10:53:06 -08:00
Eric Anholt
554a8f4026 intel: Start adding defines and some bits for sandybridge bringup. 2010-02-25 10:53:06 -08:00
Francisco Jerez
51e8a66fa1 dri/nouveau: Use the XRGB8888 hardware texture format. 2010-02-25 18:37:39 +01:00
Francisco Jerez
59ddf8ca63 dri/nouveau: Use the hardware I8 format for intensity textures. 2010-02-25 18:37:39 +01:00
Francisco Jerez
4a7e9b5df4 dri/nouveau: Implement EXT_texture_from_pixmap. 2010-02-25 18:37:38 +01:00
Francisco Jerez
a7b8d105a6 dri/nouveau: Support rectangle textures. 2010-02-25 18:37:38 +01:00
Francisco Jerez
7432ffbdfa dri/nouveau: Don't try to map a non-existent teximage. 2010-02-25 18:37:38 +01:00
Francisco Jerez
35041ec151 dri/nouveau: Add some RGB888 span functions. 2010-02-25 18:37:37 +01:00
Francisco Jerez
3ccfce85e2 dri/nouveau: Fake A8 and L8 texture support on nv04. 2010-02-25 18:37:37 +01:00
Francisco Jerez
7269a30b86 dri/nouveau: Restructure the nv[12]0 regcombiner code, and fake A8/L8 support. 2010-02-25 18:37:36 +01:00
Francisco Jerez
323e6bbb05 dri/nouveau: Try to validate textures earlier. 2010-02-25 18:37:36 +01:00
Francisco Jerez
44602bb23c dri/nouveau: Swizzle using the CPU when we hit a limitation of SIFM. 2010-02-25 18:37:35 +01:00
Francisco Jerez
e59e5e3388 dri/nouveau: Clean up the nv04 surface code a bit. 2010-02-25 18:37:35 +01:00
Francisco Jerez
1e4c0618a8 dri/nouveau: Avoid mask overflow on nv04_surface_fill. 2010-02-25 18:37:35 +01:00
Francisco Jerez
9a8e374c46 dri/nouveau: Set _BaseFormat correctly for z24s8 renderbuffers. 2010-02-25 18:37:34 +01:00
Francisco Jerez
91af398b32 dri/nouveau: Fix stencil mask handling on glClear(). 2010-02-25 18:37:34 +01:00
José Fonseca
db2e1518ff scons: Always build trace driver
There are so many state trackers and winsys that rely on it for debug
building, and trace can really build anywhere and is thin so there's no
point is making it an option.

Based on  Xavier Chantry <chantry.xavier@gmail.com>'s patch:

"I also removed the trace check in xlib SConscript which is now useless, and
that script seems to deal with the cell driver, so I added cell in the check
for supported drivers."
2010-02-25 17:02:52 +00:00
Michal Krol
aec4d225b2 python: Fix typo. 2010-02-25 16:16:25 +00:00
George Sapountzis
fec2a67e40 glapi/gen: just copy in glx/glapi 2010-02-25 17:52:05 +02:00
George Sapountzis
f1f33f9293 glapi: EXTRA_DEBUG is never defined, make this explicit 2010-02-25 17:52:05 +02:00
George Sapountzis
ec91810147 glapi: minor ugliness to be able to copy to xorg 2010-02-25 17:52:04 +02:00
Brian Paul
8ae701cbc9 docs: remove demos.html page which contained one dead link 2010-02-25 08:36:31 -07:00
Michal Krol
aa799fa2d0 tgsi: Remove dead code. 2010-02-25 15:01:10 +01:00
Chia-I Wu
2cf44390d1 mesa: Move src/mesa/glapi/dispatch.h to mesa.
glapi/dispatch.h is a core Mesa header file.  Move the header file to
main/ to make this clear.  It also becomes clear after this change that
IN_DRI_DRIVER is only used in core Mesa to enable the remap table.
2010-02-25 21:32:58 +08:00
Chia-I Wu
27d260b410 glapi: Move src/mesa/main/dispatch.c to glapi and rename.
main/dispatch.c is a glapi source file.  It is part of GLAPI_SOURCES in
sources.mak and part of glapi_sources in SConscript.  This commit moves
it to glapi/ and renames it to glapi_dispatch.c.
2010-02-25 21:32:58 +08:00
Chia-I Wu
4cb13b433c glapi: Generated GLX sources should use glapidispatch.h.
Fix glX_proto_recv.py and glX_proto_send.py, and regenerate the sources.
2010-02-25 21:32:45 +08:00
Chia-I Wu
2be1fcaafe mesa: Remove unused Makefile.{ugl,win}. 2010-02-25 21:30:51 +08:00
Chia-I Wu
6e28a4e0bc st/egl: Reduce validation round-trips in DRI2 backend.
This is similar to the changes to reduce the round-trips in ximage
backend.

When the server supports DRI_InvalidateBuffers, the event is used to
update the server stamp (this path is not tested).  Otherwise, the
server stamp is updated when flush_frontbuffer or swap_buffers is
called.  This makes sure at least the client APIs get the new buffers
when a new frame is started while skipping all round-trips during the
drawing.
2010-02-25 21:29:37 +08:00
Chia-I Wu
33b92471a7 st/egl: Reduce validation round-trips in ximage backend.
ximage_surface_validate is called several times per frame.  This commit
adds the client and server stamps to reduce the round-trips to the
server.  The idea is to bump the server stamp when flush_frontbuffer or
swap_buffers is called, and to skip the round-trip when the client stamp
is equal to the server stamp.  This makes sure the client APIs get the
new buffers when a new frame is started while skipping all round-trips
during the drawing.  To make this work, egl_g3d_validate_context is no
longer called after swap_buffers.
2010-02-25 21:29:37 +08:00
Chia-I Wu
29ec53d843 st/egl: Refactor dri2_surface_get_buffers.
Add dri2_surface_process_drawable_buffers to process the buffers
returned by the server.
2010-02-25 21:29:37 +08:00
Chia-I Wu
545ac97f9b st/egl: Add dri2InvalidateBuffers.
src/glx/dri2.c will call dri2InvalidateBuffers when
DRI2_InvalidateBuffers event is received.  This fixes a missing symbol
error, and paves the way for event-based validation.
2010-02-25 21:29:36 +08:00
Vinson Lee
cc7904ffa5 util: Assert that pointer is not null before dereferencing. 2010-02-25 02:42:41 -08:00
Vinson Lee
d553479cc4 mesa: Remove dead error condition. 2010-02-25 02:26:18 -08:00
Vinson Lee
9be414f4b9 glu/sgi: Set freed pointer to NULL. 2010-02-25 02:19:00 -08:00
Michal Krol
235c6bdf6d util: Fix blitter vertex and viewport setup. 2010-02-25 10:22:30 +01:00
Corbin Simpson
686f69bd13 r300g: Atomize vertex shader. 2010-02-24 20:02:59 -08:00
Corbin Simpson
f05d4526e3 r300g: Move CALLOCs to correct place. 2010-02-24 19:53:47 -08:00
Marek Olšák
e6632b4bf7 r300g: prevent CS overflow when emitting the draw packets
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com>
2010-02-24 17:11:47 -08:00
Kristian Høgsberg
b7041db8f8 xeglgears: Update help text 2010-02-24 20:08:54 -05:00
Brian Paul
bc04ae21c1 llvmpipe: clean up rasterization threads upon context destruction
Fixes glean hang, bug 26536.
2010-02-24 17:30:43 -07:00
Brian Paul
072aeb57bd vbo: remove dead code 2010-02-24 16:13:46 -07:00
Brian Paul
778276a4dd r300g: remove invalid .PHONY line
The $(COMPILER_ARCHIVE) target is not a phony target.
This solves the unconditional re-making of libr300.a
2010-02-24 15:49:13 -07:00
Brian Paul
1332ee5487 gallium: remove extra -I paths from Makefile.template 2010-02-24 15:09:57 -07:00
Vinson Lee
17efc8c05c mesa: Fix SCons build. 2010-02-24 14:00:30 -08:00
Brian Paul
f393d95ff2 dri: remove old assertion (see bug 26734)
(cherry picked from commit 293f4d51b4)
2010-02-24 14:06:52 -07:00
Brian Paul
5046f2c195 llvmpipe: more lp_rasterizer_task parameter passing 2010-02-24 13:54:25 -07:00
Brian Paul
1c9db3c57f llvmpipe: pass fewer parameters to rasterization functions 2010-02-24 13:54:25 -07:00
Brian Paul
ab71a5e4c9 llvmpipe: added some assertions 2010-02-24 13:54:25 -07:00
Kristian Høgsberg
f272a780af xeglgears: Remove borrowed GL_OES_EGL_image types
These are now in gl.h.
2010-02-24 14:36:56 -05:00
Kristian Høgsberg
61cc18a866 xeglgears: Add test case for texturing from an EGLImage 2010-02-24 14:28:42 -05:00
Kristian Høgsberg
f4e7d1b1e5 egl_dri2: Implement EGL_KHR_image and EGL_KHR_image_pixmap 2010-02-24 14:28:42 -05:00
Kristian Høgsberg
10e7962741 intel: Implement GL_OES_EGL_image entrypoints 2010-02-24 14:28:42 -05:00
Kristian Høgsberg
c26247100b intel: Implement DRI image extension 2010-02-24 14:28:42 -05:00
Kristian Høgsberg
79cbcb663d dri_interface.h: Add DRI image and eglImageLookup extensions
These are used for implementing the various EGLImage extensions.
2010-02-24 14:28:41 -05:00
Brian Paul
ccd78fed88 gallium: remove $(DEFINES) from cc/c++ command lines
The $(DEFINES) is already in $(CFLAG)S and (CXXFLAGS).
This prevents all the -D args appearing twice in the compilation commands.
2010-02-24 12:03:59 -07:00
Brian Paul
51b799288a mesa: put declaration before code 2010-02-24 11:57:26 -07:00
Brian Paul
9f6990120a gallium: comment/document usage flags 2010-02-24 11:56:38 -07:00
Kristian Høgsberg
d1dc5b124e core: Implement GL_OES_EGL_image entry points 2010-02-24 13:38:56 -05:00
Kristian Høgsberg
07b07b4d72 glapi: GL_OES_EGL_image autogenerated files 2010-02-24 13:38:55 -05:00
Kristian Høgsberg
caa46f7538 glapi: Add GL_OES_EGL_image 2010-02-24 13:38:55 -05:00
Brian Paul
517faa4f37 st/mesa: updated comments 2010-02-24 11:33:54 -07:00
Brian Paul
002f914211 st/mesa: consolidate redundant format conversion code 2010-02-24 11:31:33 -07:00
Brian Paul
7802ef6f69 st/mesa: more format code clean-up and removal 2010-02-24 11:23:58 -07:00
Brian Paul
d7de632de3 st/mesa: clean-ups in FBO code 2010-02-24 11:17:41 -07:00
Brian Paul
87c85347ed st/mesa: clean-up of format-related code 2010-02-24 11:10:47 -07:00
Brian Paul
5d8aae55f2 st/mesa: use util_format_get_blocksize() 2010-02-24 11:03:58 -07:00
Brian Paul
5bc62895e2 st/mesa: code clean-ups in st_renderbuffer_alloc_storage() 2010-02-24 10:56:10 -07:00
Brian Paul
f8978f186e llvmpipe: SRGB textures not supported yet 2010-02-24 10:47:58 -07:00
Brian Paul
ba92947198 llvmpipe: vertex shader textures not supported yet 2010-02-24 10:44:01 -07:00
Alex Deucher
5997501ca0 r600: proper fix for 1560183536
PRE_EMIT_STATE_BUFSZ accounts for the start 3d, idle, cd/db flush
not for state.  The relocs for CB_COLOR0_FRAG & CB_COLOR0_TILE
are part of the render target state.
2010-02-24 11:43:33 -05:00
José Fonseca
f9f4f3df42 r300: Update for UTIL_FORMAT_LAYOUT_xxx changes. 2010-02-24 16:16:21 +00:00
José Fonseca
85434f9e3c mesa: Update for UTIL_FORMAT_LAYOUT_xxx changes. 2010-02-24 16:16:21 +00:00
José Fonseca
83686b3f92 llvmpipe: Update for UTIL_FORMAT_LAYOUT_xxx changes. 2010-02-24 16:16:21 +00:00
José Fonseca
e5a43ac594 gallivm: Update for UTIL_FORMAT_LAYOUT_xxx changes. 2010-02-24 16:16:21 +00:00
José Fonseca
816d23505a util: Kill array vs arith layouts. Revamp UTIL_FORMAT_LAYOUT_xxx.
Too confusing. I now can get the same information through other means.
2010-02-24 16:16:21 +00:00
Brian Paul
b64b78e7c3 i915g: fix a comment 2010-02-24 08:52:33 -07:00
Brian Paul
fb1834cdfd gallium/docs: clean up texture usage text, added texture geom info 2010-02-24 08:52:33 -07:00
José Fonseca
085810542f llvmpipe: Fix breakeage.
Due to the u_format.csv changes the unrolled code generator was being used
for formats it didn't support.

Bring some bugfixes from u_format_access.py too.
2010-02-24 15:45:28 +00:00
José Fonseca
1dbb5f02ae util: Refactor some code. 2010-02-24 15:45:28 +00:00
José Fonseca
3c45c4bc44 util: Cope with the fact that formats in u_format.csv are not ordered. 2010-02-24 15:45:28 +00:00
José Fonseca
943314f38f util: Factor out the code to shorten a format name. 2010-02-24 15:45:28 +00:00
José Fonseca
a9395360f2 llvmpipe: Handle correctly 24bit formats. 2010-02-24 15:45:28 +00:00
José Fonseca
395b335fa4 util: Handle correctly 24bit formats. 2010-02-24 15:45:28 +00:00
José Fonseca
5caa004829 util: Minor tweaks to ambigous/unused format descriptions. 2010-02-24 15:45:28 +00:00
José Fonseca
55f02ba364 util: Fix swizzles for SRGB formats.
Based on Marek Olšák's fix 8-bits-per-channel formats swizzles, with the
exception that the notation for several formats (the vector formats)
is actually reversed so they should be left alone.
2010-02-24 15:45:28 +00:00
José Fonseca
ba7ce0ccd4 util: Organize formats in groups. Add comments. 2010-02-24 15:45:28 +00:00
José Fonseca
b57d80da77 util: Allow '#' comments in u_format.csv. 2010-02-24 15:45:28 +00:00
Michal Krol
a9aa811af0 st/mesa: Reset clip state when clearing with quads. 2010-02-24 16:41:18 +01:00
Brian Paul
78f72d73ee mesa: disable unreachable meta mipmap gen code
More work is needed to support 3D mipmap generation.  Disable unreachable
code until then.

See bug 26722.
2010-02-24 08:14:33 -07:00
Michal Krol
5b3f8369c6 util: Reset clip state when doing blitting. 2010-02-24 15:48:30 +01:00
Michal Krol
8039ee09b8 st/mesa: Use cso context to manage clip state. 2010-02-24 15:28:41 +01:00
Michal Krol
227ae7b968 cso: Track clip state with cso context. 2010-02-24 15:16:54 +01:00
José Fonseca
573a8002d5 util: Kill unused UTIL_FORMAT_LAYOUT_SCALAR. 2010-02-24 12:15:13 +00:00
José Fonseca
4e526b42b0 llvmpipe: Kill unused UTIL_FORMAT_LAYOUT_SCALAR. 2010-02-24 12:15:13 +00:00
José Fonseca
5dce9b252b util: Store more derived data in the the format description. 2010-02-24 12:15:13 +00:00
Dave Airlie
3f5bac8960 radeon/r200: fix the state emission before kernel clear
this moves the emission outside the lock and adds r200 support.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-24 19:13:07 +10:00
Vinson Lee
e16f0c14f3 r600: Assert that array index is not negative. 2010-02-24 00:24:51 -08:00
Dave Airlie
b75d407369 radeon: fix bad state emission causes kernel to do bad depth clear
The kernel lets you clear depth without getting a depth offset
from userspace, mesa used to emit state before clear, but that got
lost in the refactoring, which made the kernel bug show up. Fix
mesa driver to emit the state properly now.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-24 17:19:09 +10:00
Kristian Høgsberg
db9c151d77 intel: Call intel_prepare_render() in intelMakeCurrent()
This restores old behaviour, where we end up doing a DRI2GetBuffers()
call from intelMakeCurrent().  The idea was that we could do this
lazily, just before we start rendering.  However, if we don't do the
DRI2GetBuffers() round-trip we don't get the drawable size and higher
level mesa ends up short-cutting a number of GL calls, such as glClear().
2010-02-23 23:20:07 -05:00
Brian Paul
402f54b0d1 gallivm: added clamp and int_to_float functions 2010-02-23 21:16:18 -07:00
Brian Paul
1eec90d660 llvmpipe: add lp_tile_image.c to sources 2010-02-23 21:14:48 -07:00
Brian Paul
5e321280c1 llvmpipe: whole image tile/untile functions 2010-02-23 21:14:48 -07:00
Brian Paul
b628950662 st/mesa: whitespace fixes 2010-02-23 19:02:25 -07:00
Brian Paul
cd25e436ef llvmpipe: remove Z16 format override hack 2010-02-23 18:57:18 -07:00
Brian Paul
0e7c22ff3c llvmpipe: Z16 format is not supported 2010-02-23 18:57:18 -07:00
Brian Paul
a84575cdc0 st/glx: improved depth/stencil format selection code
Actually ask the gallium screen what Z/stencil format is supported.
This will let us remove some hacks in the llvmpipe driver.
2010-02-23 18:57:18 -07:00
Brian Paul
f7830dc391 st/glx: added PIPE_FORMAT_Z24S8_UNORM code 2010-02-23 18:57:18 -07:00
Brian Paul
049b4c3405 llvmpipe: added assertions to verify that scene is empty 2010-02-23 18:57:18 -07:00
Brian Paul
c8aaa24f2d llvmpipe: added some assertions 2010-02-23 18:57:17 -07:00
George Sapountzis
295a02549d glapi: fix es after mv 2010-02-24 02:11:31 +02:00
George Sapountzis
ad520aaa87 glapi: fix code generation Makefile after mv 2010-02-24 02:11:31 +02:00
George Sapountzis
f437a67377 glapi: mv code generation to subdir
This just moves files, code generation Makefile will be fixed in next commit for easier review.
2010-02-24 02:11:30 +02:00
Marek Olšák
232f6e1761 r300g: fix texture swizzling for the SRGB formats 2010-02-24 01:00:34 +01:00
kleinerm
251bf298bf glx: Fix some typos in pointer checking for OML_sync_control entry points.
Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-02-23 13:35:05 -07:00
Luca Barbieri
2f5beb4b53 pipebuffer: slab: if size < alignment, use alignment to find bucket
If the size is lower than the alignment, we must use the alignment to
select the bucket.

Otherwise, the selected bucket won't be able to satisfy our request
and will fail.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-02-23 19:50:24 +00:00
Luca Barbieri
c36b912e09 pipebuffer: fix inverted signalled checking
A return of 0 means the fence is signalled.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-02-23 19:50:24 +00:00
Luca Barbieri
9f4f87893b pipebuffer: avoid assert due to increasing a zeroed refcnt
The cache manager stores buffers with a reference count that dropped to 0.
pipe_reference asserts in this case on debug builds,
so use pipe_reference_init instead.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-02-23 19:50:24 +00:00
Eric Anholt
c41cf31da8 i965: Enable GL_ARB_fragment_coord_conventions now that the GLSL is fixed.
Tested with piglit glsl-arb-fragment-coord-conventions.
2010-02-23 11:16:31 -08:00
Chia-I Wu
7d1237bc71 egl: Remove unused _EGL_SKIP_HANDLE_CHECK.
It was added to skip checking EGLDisplay, EGLSurface, and etc.  It is
never defined and the spec does not allow the checks to be skipped.
Remove it for good.
2010-02-23 22:42:46 +08:00
Chia-I Wu
58a72cd65e st/egl: Unify surface creation.
Add a new function egl_g3d_create_surface and use it to create window,
pixmap, buffer, and screen surfaces.
2010-02-23 22:42:41 +08:00
Vinson Lee
abcb6b6d01 mesa: Assert that array index is not negative. 2010-02-23 00:19:30 -08:00
Vinson Lee
83a5b7e468 glsl/apps: Assert that ftell does not return an error. 2010-02-22 23:49:50 -08:00
Vinson Lee
a0fe36a39b i965g: Add fallthrough comments in switch statement.
Silences warnings about missing break statements in static analysis.
2010-02-22 23:32:43 -08:00
Vinson Lee
6da07e45b3 draw: Remove dead code. 2010-02-22 23:23:57 -08:00
Marek Olšák
902ccfcb40 r300g: fix draw_elements for "start" != 0
Reported-by: Andre Maasikas <amaasikas@gmail.com>
2010-02-23 03:33:24 +01:00
José Fonseca
b330928549 svga: Upload user buffers only once. 2010-02-22 21:47:22 +00:00
José Fonseca
8ea7d8412c svga: Fix the guest offset of piecewise buffer DMAs.
It was being erroneously set equal to the host offset, but it should be
zero.
2010-02-22 21:47:19 +00:00
José Fonseca
066fd70639 svga: Emit a scalar rcp in shadow maps.
Small improvement in Lightsmark 2008.
2010-02-22 21:47:18 +00:00
José Fonseca
7384cdf651 svga: Don't emit zero writemasks.
This fixes a regression with Lightsmark, where more compact TGSI from Mesa
was causing a zero mask MOV to be emitted for shadow map compare, causing
problems in some backends.

Add a few more assertions to catch cases like this.
2010-02-22 21:47:15 +00:00
José Fonseca
28e80aa0b8 tgsi: Report an error when a destination has an empty writemask. 2010-02-22 21:47:07 +00:00
José Fonseca
d1a0225371 svga: Upload the dirty ranges instead of the whole buffer. 2010-02-22 21:46:42 +00:00
José Fonseca
2452921e5a svga: Break uploads of big buffers into smaller pieces.
Fixes crash in Homeworld2 which tries to create a 14MB buffer, because we
now avoid creating GMR buffers larger than 8MB to ensure progress given
we have only a 16MB pool.
2010-02-22 21:46:40 +00:00
José Fonseca
3a6e581f2f svga: Note ranges even when there is no hardware buffer around.
Not having a hardware buffer around doesn't change the fact that the
range is dirty and needs to be uploaded eventually.
2010-02-22 21:46:37 +00:00
José Fonseca
cf861335a4 svga: Further cleanup/comment svga buffer code.
Just cosmetic changes -- no behavior change.
2010-02-22 21:46:34 +00:00
José Fonseca
6390dbb373 svga: Temporarily create a sw vertex buf when failed to create a hw buf.
Many apps don't check the return of map buffer so it is better not to
fail.
2010-02-22 21:46:30 +00:00
José Fonseca
21480fb9e4 svga: Remove unused buffer download code.
Unnecessary now that we never destroy buffer storage.
2010-02-22 21:46:22 +00:00
José Fonseca
935929595c pipebuffer: Don't synchronize when checking for buffer overflows.
To avoid masking synchronization issues in debug builds.
2010-02-22 21:46:19 +00:00
José Fonseca
e9ac0fbe9b python/retrace: Dump all vertices for verbosity level 3. 2010-02-22 21:46:12 +00:00
José Fonseca
422167a9b0 svga: Prevent buffer overflow in buffer ranges.
Do this by extending the nearest range to cover the new range.

This fixes an access fault in Call of Duty which was doing many disjoint
glBufferSubData calls.
2010-02-22 21:46:09 +00:00
José Fonseca
12d5203bb3 svga: Fix PIPE_LOGICOP_INVERT.
Actually the current XOR implementation is an INVERT.

This fixes rectangle selection in Maya.
2010-02-22 21:46:00 +00:00
Michal Krol
63cb6f59ea gallium: Remove bypass_vs_clip_and_viewport from rasteriser state.
Needs testing.
2010-02-22 21:36:22 +01:00
Keith Packard
edd85bcd6b bin/mklib: Clear CDPATH to avoid damaging expand_archive output
The bash 'cd' command tends to emit random stuff to stdout when the
CDPATH variable is set, so clear it to keep extra filenames from being
emitted from the expand_archive function, which would otherwise cause
mklib to fail.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-02-22 09:56:58 -08:00
Brian Paul
52cc3b03c3 glxinfo: Fix User error in glGetProgramivARB
glxinfo needed fixing after commit 4bccd69.

Move fragment program only parameters into their own list
so that they are not queried for a vertex program.

Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>

(cherry picked from commit b0e5dcb859)
2010-02-22 08:56:18 -07:00
Brian Paul
2467354842 i965g: added missing texture cap queries 2010-02-22 08:14:14 -07:00
Brian Paul
98e2f6c38b i915g: added missing texture cap queries 2010-02-22 08:14:05 -07:00
Brian Paul
cfdd1ca695 st/mesa: change viewport Z scale/bias for glBitmap/glDrawPixels
This fixes incorrect Z position of glBitmap, glDraw/CopyPixels for the
svga driver.  Now we use 0.5, 0.5 as is typical for ordinary 3D rendering.

(cherry picked from commit bcd561c667)
2010-02-22 08:04:53 -07:00
Brian Paul
504e297a2c st/mesa: Add checks for ST_SURFACE_x vs MESA_BUFFER_x
The ST_SURFACE_x values should match the Mesa BUFFER_x values.
Added some assertions to prevent future mix-ups.

(cherry picked from commit 13cbb5fff6)
2010-02-22 08:04:39 -07:00
Brian Paul
6ce5b5e115 mesa/st: Make ST_SURFACE_DEPTH index consistent with mesa's BUFFER_DEPTH.
Some st functions assume that they are identical.

(cherry picked from commit 9d17ad2891)
2010-02-22 08:04:16 -07:00
Chris Wilson
15904c057b intel: assert that we do not overflow the batch buffer.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-02-22 09:55:41 +00:00
Chris Wilson
415b7c7775 i915: Fix logic !gen >= 3
The effect of this was that all objects were aligned to 128 bytes
on all generations, rather than just gen2.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-02-22 09:55:41 +00:00
Chris Wilson
ac6ce53af7 i915: Remove superfluous MI_NOOP from vertex emission
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-02-22 09:55:33 +00:00
Chris Wilson
5abee283d3 intel: Check that we have a bufmgr or bail out when initializing the context.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-02-22 09:53:56 +00:00
Dave Airlie
b14548ea32 Revert "r300g: rebuild winsys/pipe buffer handling and add buffer map"
This reverts commit fff5be8e7b.

Probably went too soon with this, dileX reported OA not working for him
it works here fine, but the optimisations I wanted aren't working properly
yet so I'll fix that now.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-22 17:26:35 +10:00
Dave Airlie
fff5be8e7b r300g: rebuild winsys/pipe buffer handling and add buffer map
This creates a cleaner winsys and drop the simple screen stuff.

It makes r300g use pb_bufmgr structs and adds usage of the cached
bufmgr for vertex/index buffers.

It also avoids mapping too often.

I'm not 100% sure this is perfect but it won't find its own bugs.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-22 16:23:44 +10:00
Marek Olšák
233290f203 r3OOg: support rendering of more than 65535 vertices per draw call (almost)
The path for VAP_ALT_NUM_VERTICES is also in place (and tested)
but not enabled by default due to the missing support of this reg
in the upstream kernel.

Also, a non-zero BUFFER_BASE in the INDX_BUFFER packet3 hangs the machine.
Am I missing something? Because of this, only draw_arrays can render
more than 65535 vertices without the use of VAP_ALT_NUM_VERTICES.
2010-02-22 03:12:13 +01:00
Vinson Lee
c786df2caf i965g: Fix memory leak. 2010-02-21 15:15:52 -08:00
Vinson Lee
b7eed19efe st/mesa: Fix memory leak on out-of-memory error path. 2010-02-21 15:10:50 -08:00
Vinson Lee
8ff6790afb r300g: Remove unnecessary header. 2010-02-21 14:26:53 -08:00
Ray Kohler
701ac58a0c Link egl progs to libm as necessary.
Signed-off-by: Ray Kohler <ataraxia937@gmail.com>
2010-02-22 01:26:12 +08:00
Marek Olšák
3c244dac47 r300g: precompute framebuffer register values 2010-02-21 14:24:13 +01:00
Marek Olšák
7a087e1d6f r300g: add all missing colorbuffer formats 2010-02-21 14:24:13 +01:00
Marek Olšák
5c14fd1743 r300g: make r300_translate_texformat private
Unlikely to increase performance from inlining.

And partially expose it through r300_is_sampler_format_supported.
2010-02-21 14:24:12 +01:00
Marek Olšák
2a30c268bd r300g: re-enable SRGB formats
Ouch.
2010-02-21 14:24:12 +01:00
Vinson Lee
7da9da190f mesa: Add assert to check for null pointer dereference. 2010-02-21 02:13:15 -08:00
Vinson Lee
d89de9c13f draw: Remove dead code. 2010-02-21 01:57:16 -08:00
Vinson Lee
3194197efd i965g: Remove dead code. 2010-02-21 01:30:35 -08:00
Vinson Lee
0b83f48e82 i965g: Fix assertions that were always true.
The surface_format field is 9 bits wide which has a maximum value
of 511. BRW_SURFACEFORMAT_INVALID has a value of 4095 which exceeds
the width of the surface_format field.

This patch asserts that the format is not BRW_SURFACEFORMAT_INVALID
before assignment to the surface_format field.
2010-02-21 01:19:47 -08:00
Vinson Lee
d1aafb33b5 glsl/cl: Prevent possible buffer overflow. 2010-02-21 00:36:50 -08:00
Vinson Lee
f56c9c2b19 i965g: Fix use of out-of-scope variable. 2010-02-21 00:24:05 -08:00
Chia-I Wu
1207482a03 st/egl: Disable SHM in ximage backend.
With pipe_screen::update_buffer being called in st_validate_state, it is
likely that softpipe will flush tile caches to a detached SHM segment.
Disable SHM for now until a better solution is found.
2010-02-21 15:50:33 +08:00
Vinson Lee
f96e8a033b radeon: Silence compiler format warning. 2010-02-20 23:43:33 -08:00
Vinson Lee
ae41339d4c glsl/cl: Prevent possible string overflow. 2010-02-20 23:27:07 -08:00
Chia-I Wu
dbaa845153 st/egl: Properly convert vrefresh to refresh rate.
Some kernels have vrefresh = (refresh rate * 1000) while others don't.
Use some heuristics here.
2010-02-21 10:22:08 +08:00
Chia-I Wu
5d4d54574f st/egl: Enable extensions before adding configs.
Configs are validated before added.  The validation depends on the
extensions available.  If configs are added before enabling extensions,
configs with EGL_SCREEN_SURFACE_MESA bit set will never pass the
validation for example.
2010-02-21 10:22:08 +08:00
Chia-I Wu
719c4b0fc2 st/egl: Do not force validate when update_buffer is called.
st/mesa was changed to call pipe_screen::update_buffer in
st_validate_state.  In most cases there is no need to validate.
2010-02-21 10:22:07 +08:00
Chia-I Wu
9d88006ca6 st/egl: Clean up DRI2 surface.
Mainly to move the call to DRI2GetBuffers from dri2_surface_validate to
the new dri2_surface_update_buffers.
2010-02-21 10:22:07 +08:00
Chia-I Wu
d6b348ddd1 st/egl: Clean up ximage surface.
Mainly to move buffer allocation code from ximage_surface_validate to
the new ximage_surface_update_buffers.
2010-02-21 10:22:07 +08:00
Vinson Lee
71e3abc014 st/xlib: Add assert to check for null pointer dereference. 2010-02-20 16:23:44 -08:00
Jon TURNEY
e3114d3f0f Cygwin build fix: Fix linkage
Fix the way we make static convenience libraries, such as libmesa.a,
to be the same as linux etc.

Putting archives inside archives doesn't make the objects inside
the archive linkable, so use expand_archives() to get all the objects
inside an archive out again before linking.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-02-20 09:24:15 -07:00
Vinson Lee
1613735d08 gamma: Silence uninitialized variable warnings. 2010-02-20 02:29:43 -08:00
Vinson Lee
fdcad8a583 gamma: Add missing headers. 2010-02-20 02:25:29 -08:00
Vinson Lee
fbf04cef71 gamma: Remove unnecessary header. 2010-02-20 02:02:17 -08:00
Vinson Lee
b76164dced intel: Silence compiler format warnings. 2010-02-20 01:58:27 -08:00
Vinson Lee
6cfdb61f73 progs/redbook: Silence warn_unused_result warnings. 2010-02-20 01:34:16 -08:00
Vinson Lee
5fd84e0246 tgsi: ifdef out unused function micro_sqrt. 2010-02-20 00:56:32 -08:00
Vinson Lee
a45f2ec7b7 mesa: Silence compiler format warning. 2010-02-19 23:53:27 -08:00
Brian Paul
150cce6aef mesa: fix snprintf() typo 2010-02-19 13:44:12 -07:00
Brian Paul
78a0c353d0 mesa: restore _mesa_snprintf() - it's needed for Windows
This reverts part of commit 298be2b028
2010-02-19 12:56:49 -07:00
Brian Paul
8de5a292f7 mesa: casts to silence new warnings from printf() 2010-02-19 12:45:49 -07:00
Brian Paul
984b72ad5f mesa: remove abs/negate from fetch_vector1ui()
This function is only used for the NV unpack instructions.
Negate/abs make no sense and removing the code fixes Windows
compiler warnings.  Found by Karl Schultz.
2010-02-19 12:43:47 -07:00
Kristian Høgsberg
da43aa84c8 intel: Set buffer stamp before getting new buffers
This way, if we get an invalidate as we update the buffers, we
don't clobber the drawable stamp and ignore the invalidate.

Pointed-out-by: Francisco Jerez
2010-02-19 14:12:27 -05:00
Marek Olšák
f0c50345d1 r300g: fix rendering into the L8 and A8 texture formats
RB3D_COLORPITCH.COLORFORMAT.I8 stores the C2 component.
2010-02-19 20:02:41 +01:00
Kristian Høgsberg
99ae9e8d7d Drop macro wrappers for the aligned memory functions 2010-02-19 13:30:22 -05:00
Brian Paul
3ef51b4bd9 progs/tests: new zbitmap.c test to exercize Z testing of glBitmap 2010-02-19 11:12:20 -07:00
Brian Paul
e9df31fac9 progs/demos: sort filenames 2010-02-19 11:09:05 -07:00
Michal Krol
f814a497f7 tgsi: Make more exec opcodes look pretty. 2010-02-19 19:02:35 +01:00
Michal Krol
f1f7006d1f tgsi: Change prototypes of micro opcodes to explicitly indicates number of args. 2010-02-19 19:02:31 +01:00
Michal Krol
d68f024b7d tgsi: Rewrite exec implementations of NRM and NRM4. 2010-02-19 19:02:26 +01:00
Kristian Høgsberg
298be2b028 Replace the _mesa_*printf() wrappers with the plain libc versions 2010-02-19 12:32:24 -05:00
Kristian Høgsberg
32f2fd1c5d Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versions 2010-02-19 12:03:01 -05:00
Brian Paul
6bf1ea897f mesa: replace _mesa_bzero() with memset() 2010-02-19 08:32:36 -07:00
Brian Paul
2240ba10f3 mesa: replace old MEMSET macro with memset 2010-02-19 08:12:31 -07:00
Brian Paul
e197de56cd mesa: replace old MEMCPY macro with memcpy 2010-02-19 08:09:01 -07:00
Kenneth Graunke
2efa86ea30 Remove _mesa_memcmp in favor of plain memcmp.
This may break the SUNOS4 build, but it's no longer relevant.
2010-02-19 09:19:20 -05:00
Kenneth Graunke
26f8fad145 Remove _mesa_memset in favor of plain memset.
This may break the SUNOS4 build, but it's no longer relevant.
2010-02-19 09:18:57 -05:00
Kenneth Graunke
c7ac486261 Remove _mesa_memcpy in favor of plain memcpy.
This may break the SUNOS4 build, but it's no longer relevant.
2010-02-19 09:18:36 -05:00
Kenneth Graunke
60b0cae412 Remove _mesa_atoi in favor of plain atoi. 2010-02-19 09:18:13 -05:00
Kenneth Graunke
9d9afe9393 Remove _mesa_strncmp in favor of plain strncmp. 2010-02-19 09:17:53 -05:00
Kenneth Graunke
8d73aa6d1a Remove _mesa_strcmp in favor of plain strcmp. 2010-02-19 07:53:04 -05:00
Kenneth Graunke
21d0c70b4b Remove _mesa_strlen in favor of plain strlen. 2010-02-19 07:51:02 -05:00
Kenneth Graunke
f69d1d1438 Remove _mesa_strncpy in favor of plain strncpy. 2010-02-19 07:50:40 -05:00
Kenneth Graunke
5fcaa78912 Remove _mesa_strcpy in favor of plain strcpy. 2010-02-19 07:50:22 -05:00
Kenneth Graunke
8ff7624653 Remove _mesa_strncat in favor of plain strncat. 2010-02-19 07:49:45 -05:00
Kenneth Graunke
0aecdb6383 Remove _mesa_strstr in favor of plain strstr. 2010-02-19 07:47:48 -05:00
Corbin Simpson
71214c640c Revert "r300g: remove L8_UNORM from colorbuffer formats"
This reverts commit fc427d2343.

At least xorg uses this, and just because something is not used in
OpenGL is *never* a valid reason to remove functionality from Gallium.
If something lacks a test, go add a test, don't remove features.
2010-02-19 03:12:14 -08:00
Vinson Lee
e95948ea03 gamma: s#colormac.h#main/colormac.h# 2010-02-19 00:51:21 -08:00
Vinson Lee
24bdace350 gamma: s/gammacontext.h/gamma_context.h/ 2010-02-19 00:44:17 -08:00
Chia-I Wu
496724b869 egl: Silence warnings when compiled with -pedantic.
Just follow gcc's advices here.
2010-02-19 12:40:01 +08:00
Chia-I Wu
bef4b476d7 egl: Silence warnings in check/return macros.
The macros give warnings when compiled with -pedantic.  This commit is
based on a patch by Brian Paul, with minor changes to add do {} while(0)
and rename the check macros.
2010-02-19 12:34:18 +08:00
Marek Olšák
fc427d2343 r300g: remove L8_UNORM from colorbuffer formats
Not renderable in OpenGL anyway.
2010-02-19 04:24:01 +01:00
Brian Paul
ae7a7026c7 softpipe: fix depth testing problems
The optimized Z-test functions assumed that the array of incoming quads
are adjacent, but that's not always true.  The fragment shader can cull
intermediate quads, for example.

Now these Z-test functions can cope with non-adjacent quads.  A little bit
of performance is probably lost, but it's probably not worth worring about.

This fixes broken glBitmap() Z testing, among other things.

(cherry picked from commit d437d905e6)
2010-02-18 17:00:10 -07:00
Brian Paul
0c728030ed st/mesa: added some bitmap debug code (disabled) 2010-02-18 16:58:39 -07:00
Brian Paul
86bf224cac progs/demos: update arbocclude.c to do multiple queries at once
Issue a whole bunch of queries then get the results and render.
Draw the test object in red instead of orange if the result was not
ready when we first queried it.
2010-02-18 16:58:38 -07:00
Brian Paul
00d1d8aad3 softpipe: comments and whitespace fixes 2010-02-18 16:58:38 -07:00
Brian Paul
46b5ae7169 softpipe: const qualifiers, comments 2010-02-18 16:58:38 -07:00
Jakob Bornecrantz
2ecdc2ecec identity: Propagate api->name and api->driver_name up 2010-02-18 23:17:48 +00:00
Jakob Bornecrantz
288e4b15e0 trace: Propagate api->name up 2010-02-18 23:17:48 +00:00
Jakob Bornecrantz
1ee905bc47 pipebuffer: Include fenced buffer manager in build 2010-02-18 23:17:47 +00:00
Jesse Barnes
0032525242 i915: update render buffers at prepare_render time
We need to do this before we emit any state dependent on the current
render buffers.
2010-02-18 14:59:06 -08:00
Dan Nicholson
79cc455cb8 Revert "Make mklib propogate all errors"
This reverts commit d6f55492af.

It's both not portable and not safe to trap & exit on ERR. This will
need to use a more invasive approach that tests return code only for
selected, important commands.
2010-02-18 14:48:53 -08:00
Brian Paul
cc66847c10 mklib: remove unused -contents_of_archives(), add comments 2010-02-18 13:02:59 -07:00
Brian Paul
b69dad2921 mesa: silence mklib output for libglapi.c as for other targets 2010-02-18 12:54:28 -07:00
Jon TURNEY
d6f55492af Make mklib propogate all errors
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-02-18 12:47:01 -07:00
Brian Paul
205c9659cf mklib: Teach mklib to fail build if link fails on cygwin
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Brian Paul <brianp@vmware.com>

(cherry picked from commit 551c96979e)
2010-02-18 12:46:48 -07:00
Brian Paul
979889038e configure: PTHREADS should be defined on cygwin, as well
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Brian Paul <brianp@vmware.com>

(cherry picked from commit c1a4f249f1)
2010-02-18 12:46:12 -07:00
Brian Paul
a61dce3639 swrast: fix left side clipping
Fixes bug 26623.  Original patch was submitted by Mathias Frohlich
and modified by Brian.

(cherry picked from commit 7c34c237a2)
2010-02-18 09:40:38 -07:00
Francisco Jerez
196214bf2b Revert "st/mesa: Make the frontbuffer visible on st_flush(PIPE_FLUSH_FRAME)."
We probably don't want to propagate this condition to the pipe driver,
this reverts commit f455ca6490 and the
dri_update_buffer flush altogether until an agreement is reached.
2010-02-18 14:04:14 +01:00
Kristian Høgsberg
0aa6105711 intel: Include main/hash.h using "" instead of <> 2010-02-18 07:49:55 -05:00
Vinson Lee
82e5a11077 progs/trivial: Update .gitignore. 2010-02-18 01:24:20 -08:00
Vinson Lee
7f7b7b9a02 progs/redbook: Fix array out-of-bounds access. 2010-02-18 01:17:26 -08:00
Keith Whitwell
37e955d491 st/mesa: always call FLUSH_CURRENT before st->pipe->flush()
Undoes part of commit f455ca6 which would permit pipe->flush() to be
called while the VBO module still had its buffers mapped.  Some
drivers care deeply about this.  Sorry for not spotting this earlier.
2010-02-18 09:03:36 +00:00
Vinson Lee
64d18b819b progs/rbug: Silence printf format warning. 2010-02-17 23:22:51 -08:00
Vinson Lee
869896f162 progs/rbug: Add missing headers. 2010-02-17 23:19:24 -08:00
Vinson Lee
9f5640d10b util: Fix typo of debug_dump_float_rgba_bmp. 2010-02-17 23:10:13 -08:00
Vinson Lee
8266f1e5a5 progs/rbug: Use util_format_name(). 2010-02-17 22:55:16 -08:00
Vinson Lee
20a11722a2 progs/rbug: Add missing header. 2010-02-17 22:10:04 -08:00
Vinson Lee
56b7a6f632 progs/rbug: s/read/rbug_read/
read conflicts with read in /usr/include/unistd.h.
2010-02-17 21:50:38 -08:00
Vinson Lee
3f7af84405 svga: Silence uninitialized variable warnings. 2010-02-17 21:39:24 -08:00
Marek Olšák
ca0e88ce92 r300g: add support for all missing non-FP sampler formats
The idea is to directly parse the format description in
r300_translate_texformat and return ~0 if the format is unsupported.
2010-02-18 06:37:43 +01:00
Chia-I Wu
9a939adf7d winsys/drm: Do not use --whole-archive in Makefile.egl.
--whole-archive is not portable.  Have the drivers reference _eglMain as
a poor man's --whole-archive.
2010-02-18 13:07:01 +08:00
Kristian Høgsberg
d449627829 intel: Implement the DRI2 invalidate function properly
This uses a stamp mechanisms to mark the DRI drawable as invalid.
Instead of immediately updating the buffers we just bump the drawable
stamp and call out to DRI2GetBuffers "later".

"Later" used to be at LOCK_HARDWARE time, and this patch brings back
callouts at the points where we used to call LOCK_HARDWARE.  A new function,
intel_prepare_render(), is called where we used to call LOCK_HARDWARE,
and if the buffers are invalid, we call out to DRI2GetBuffers there.

This lets us invalidate buffers only when notified instead of on
every glViewport() call.  If the loader calls the DRI invalidate
entrypoint, we disable viewport triggered buffer invalidation.

Additionally, we can clean up the old viewport mechanism a bit,
since we can just invalidate the buffers and not worry about
reentrancy and whatnot.
2010-02-17 21:53:16 -05:00
Francisco Jerez
56dcd011b5 dri/nouveau: Some multithreaded rendering fixes. 2010-02-17 23:36:29 +01:00
Francisco Jerez
52e3f0949d st/dri2: Flush FRAME instead of RENDER_CACHE on buffer invalidation. 2010-02-17 23:15:48 +01:00
Francisco Jerez
f455ca6490 st/mesa: Make the frontbuffer visible on st_flush(PIPE_FLUSH_FRAME).
So far the frontbuffer was only being flushed on st_glFlush and
st_glFinish, however, a co-state tracker may need to make sure that
any frontbuffer changes are already on its way to the actual front.

The dri2 state tracker will need this for event-driven GL applications
to resize properly (It could also be done calling "dri_flush_frontbuffer",
but that way we would flush unnecessarily in the double-buffered case).

Additionally this patch avoids flushing the mesa rendering cache if
PIPE_FLUSH_RENDER_CACHE wasn't specified.
2010-02-17 23:15:48 +01:00
Ian Romanick
7ccbeb41ac Merge commit '381d5e209815235911c4aab516037c868c8f695f'
This merges the patches from the series "[PATCH 00/14] More
client-side GLX house cleaning" that were posted to the mesa3d-dev
mailing list.  See
http://marc.info/?l=mesa3d-dev&m=126582985214612&w=2

Patches 01 through 04 eliminate a bunch of annoying warnings that I
get when building Mesa.

Patch 05 fixes an inconsistency between the implementation of
glXSwapIntervalMESA and the spec.  I chose to favor the code over the
spec in this case.  This also eliminated a warning.

Patches 06 through 12 clean up the way that context creation is
performed on the client.  When support for GLX_SGIX_fbconfig and the
related GLX 1.3 functions was added, I refactored a bunch
nuts-and-bolts of context creation to CreateContext.  The refactor was
a good idea, I just didn't do it right.

Patches 13 and 14 update glxgears_fbconfig to use GLX 1.3 interfaces.
2010-02-17 11:40:38 -08:00
Brian Paul
0583c29313 progs/demos: update GL version test to accept GL 3.x 2010-02-17 09:02:33 -07:00
Brian Paul
5b392ff49a glsl/apps: print usage info if insufficient args 2010-02-17 08:59:02 -07:00
Brian Paul
6b4a553dd3 st/mesa: replace conditional with assertion
Core Mesa will not call ctx->Driver.CheckQuery() if the Ready flag
is already set.
2010-02-17 08:29:01 -07:00
Chia-I Wu
f4542477cf progs/openvg: Add .gitignore.
Add all OpenVG demos to .gitignore.
2010-02-17 22:32:10 +08:00
Chia-I Wu
915d60dcf5 progs/es1: Update .gitignore.
Add xegl/bindtex to .gitignore.
2010-02-17 22:32:10 +08:00
Keith Whitwell
0c938143db llvmpipe: use ffs technique for full tiles also
Need to compute two masks here for full and partial 16x16 blocks.
Gives a further good improvement for isosurf particularly:

isosurf  97 -> 108
gears   597 -> 611
2010-02-17 12:12:41 +00:00
Chia-I Wu
e16f577142 docs: Update TODOs of egl.html.
Thread-safety is no longer a TODO item.  There are surely bugs to be
fixed though.
2010-02-17 20:00:12 +08:00
Chia-I Wu
4afe24808e egl: Revisit global data locking.
Lock the global mutex in _eglPreloadDrivers and _eglAllocScreenHandle.
Add comments to why certain pathes do not need locking.
2010-02-17 20:00:12 +08:00
Chia-I Wu
655f465467 egl: Always lock a display before using it.
This gives a simple access control to the display.  It is potentially
slow, but a finer grained mutex can always be used in the future.  The
benefit of this simple approach is that drivers need not to worry about
thread-safety.
2010-02-17 20:00:12 +08:00
Chia-I Wu
db5ce8b384 egl: Make eglGetDisplay atomic.
Merge _eglNewDisplay and _eglLinkDisplay into _eglFindDisplay.  Remove
unused _eglUnlinkDisplay.
2010-02-17 20:00:12 +08:00
Chia-I Wu
99bcb1f06d egl: Add a mutex to _EGLDisplay.
A display may be shared by multiple threads.  Add a mutex for access
control.
2010-02-17 20:00:11 +08:00
Chia-I Wu
b3bb180620 egl: eglGetError should return the status of the last call.
Use macros to record the status of the function call before returning.
This is the only way that eglGetError can return the status of the most
recent function call.
2010-02-17 20:00:11 +08:00
Chia-I Wu
3dee01a692 egl: Always record error code.
The error code denotes the success or failure of the most recent
function call.  A call to _eglError should always update the error code.
2010-02-17 20:00:11 +08:00
Chia-I Wu
aed7358e54 egl: Use new error checking macros.
Replace all uses of _EGL_DECLARE_* and _eglCheck* by _EGL_CHECK_*.
2010-02-17 20:00:11 +08:00
Chia-I Wu
f3e03e1277 egl: Add new error checking macros.
Add _EGL_CHECK_* which will replace _EGL_DECLARE_* for error checking.
Move _eglCheck* earlier in the file so that the macros and the functions
are grouped together.
2010-02-17 20:00:10 +08:00
Keith Whitwell
31c816731e llvmpipe: rework do_block_16 to use bitmasks and ffs
Some nice speedups:
   gears:  547 -> 597
   isosurf: 83 -> 98

Others like gloss unchanged.  Could do further work in this direction.
2010-02-17 11:12:04 +00:00
Michal Krol
cb66e9f2b4 glsl/pp: Remove sl_pp_get_extension_state().
Parse extension tokens to track current state of extension enables.
2010-02-17 11:22:01 +01:00
Michal Krol
27a68bd14a glsl/cl: Parse layout qualifiers only when an appropriate extension enabled. 2010-02-17 11:21:59 +01:00
Michal Krol
a21215a74e glsl/cl: Properly emit layout qualifier list. 2010-02-17 11:21:58 +01:00
Vinson Lee
ba0ac64f06 glsl: Silence unused value warning. 2010-02-17 02:10:49 -08:00
Vinson Lee
7eaf33ad03 progs/redbook: Fix memory leaks on error paths. 2010-02-17 01:57:14 -08:00
Johannes Obermayr
41b19c279a nouveau: fix legacy dri driver build 2010-02-17 16:16:50 +10:00
Brian Paul
de5928a615 sl/pp: re-do extension testing code
The #extension directive should not effect which extension preprocessor
symbols are defined/undefined; only whether/how the compiler accepts
language features defined by the extension.
2010-02-16 10:43:36 -07:00
Francisco Jerez
f7aea808a4 nv40: Fix incorrect so_new() numbering. 2010-02-16 18:37:43 +01:00
Francisco Jerez
8bd62dbd7c nv40: Implement PIPE_CAP_MAX_COMBINED_SAMPLERS. 2010-02-16 18:36:47 +01:00
Kristian Høgsberg
846cf49522 glx: Fix a couple of warnings 2010-02-16 10:38:50 -05:00
Kristian Høgsberg
215d0dae61 glx: Only register wire handlers for the events the server supports 2010-02-16 10:38:50 -05:00
Francisco Jerez
f845e4ff1b st/dri2: Use event-driven buffer validation. 2010-02-16 10:38:50 -05:00
Francisco Jerez
88a560691b dri/nouveau: Use event driven buffer validation. 2010-02-16 10:38:50 -05:00
Francisco Jerez
61d26bc82e dri2: Event driven buffer validation.
When a buffer invalidation event is received from the X server, the
"invalidate" hook of the DRI2 flush extension is executed: A generic
implementation (dri2InvalidateDrawable) is provided that just bumps
the "pStamp" sequence number in __DRIdrawableRec.

For old servers not supporting buffer invalidation events, the
invalidate hook will be called before flushing the fake front/back
buffer (that's typically once per frame -- not a lot worse than the
situation we were in before).

No effort has been made on preserving backwards compatibility with
version 2 of the flush extension, but I think it's acceptable because
AFAIK no released stack is making use of it.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2010-02-16 10:38:50 -05:00
Kristian Høgsberg
925b901ba3 dri2: Allocate cliprect as part of the __DRIdrawableRec 2010-02-16 10:38:50 -05:00
Kristian Høgsberg
97ec6076f5 glx: Move GetGLXDRIDrawable() prototype to glxclient.h 2010-02-16 10:38:49 -05:00
Kristian Høgsberg
aa0cd707af configure.ac: Lower require dri2proto version to 2.1
Additions after 2.1 are implemented in a conditional way and will be
supported if available.
2010-02-16 10:38:49 -05:00
Brian Paul
107a2ec9ee mesa: Lock mutex around _mesa_HashLookup linked list chase.
Remove const qualifier from _mesa_HashLookup() table parameter to
avoid LOCK/UNLOCK warnings in the function body.

Signed-off-by: Brian Paul <brianp@vmware.com>

(cherry picked from commit 3094adb3ca)
2010-02-16 08:21:38 -07:00
Brian Paul
693f4af63d mesa: Test for failed malloc in _mesa_HashInsert.
Signed-off-by: Brian Paul <brianp@vmware.com>

(cherry picked from commit 7c7247ddbf)
2010-02-16 08:21:28 -07:00
José Fonseca
b0f9717105 Revert "progs/redbook: Temporarily disable the demos that extensions not part of windows to fix build."
This reverts commit 1587eff1b6.
2010-02-16 11:23:18 +00:00
Michal Krol
fa8acb0528 glsl/pp: Do not try to enable extension `all'. 2010-02-16 10:04:58 +01:00
Ben Skeggs
828f545274 nv50: use hw idx buffers where we can 2010-02-16 15:57:59 +10:00
Brian Paul
c6e63f3cc2 progs/redbook: use glew 2010-02-15 18:04:39 -07:00
Ben Skeggs
bd3829b5f5 nouveau: fix for latest libdrm 2010-02-16 10:21:05 +10:00
José Fonseca
33cf477c37 wgl: Be lenient when sharing contexts.
My first reading of MS docs was wrong. It says:

  All rendering contexts of a shared display list must use an identical
  pixel format. Otherwise the results depend on the implementation of
  OpenGL used.

That is, it is OK to share contexts with different pixel formats.

Adobe Premiere Pro tries to do that: share lists between a rgbx8 and a
rgba8 pixel format.
2010-02-15 21:48:13 +00:00
José Fonseca
1587eff1b6 progs/redbook: Temporarily disable the demos that extensions not part of windows to fix build. 2010-02-15 21:47:20 +00:00
José Fonseca
8c7d39cc83 scons: A less magic way of not building progs by default.
The problem with the old way is that passing 'progs/subdir' as argument
would fail.
2010-02-15 20:48:24 +00:00
Michal Krol
ee67167358 glsl/pp: Fix handling of if/elif/else cases.
Once if/elif evalutes to true, all subsequent conditions are always false.
2010-02-15 21:33:22 +01:00
Brian Paul
b90f265fbf progs/redbook: test image for new redbook tests 2010-02-15 09:55:44 -07:00
Brian Paul
ce65a8debe progs/redbook: add additional tests for GL 1.4 2010-02-15 09:55:01 -07:00
Brian Paul
3be1c11001 docs: document glMultiDrawElements() fix
(cherry picked from commit ab6bcef99a)
2010-02-15 08:57:34 -07:00
Brian Paul
36a54885a4 vbo: fix broken glMultiDrawElements()
Seems to be a regression from commit 60b08eb1fd.

(cherry picked from commit c5a4cfb03f)
2010-02-15 08:57:17 -07:00
Vinson Lee
e045af4146 glu/sgi: Add assert to check for null pointer dereference. 2010-02-15 02:14:02 -08:00
Vinson Lee
a05fdbcb71 mesa: Remove pointless comparison of unsigned integer with a negative constant. 2010-02-15 02:01:20 -08:00
Vinson Lee
f0e1499805 glsl/pp: Add asserts to check for null pointer deferences. 2010-02-15 00:30:31 -08:00
Vinson Lee
6536cdf183 draw: Add assert to check input of memcpy. 2010-02-14 22:58:26 -08:00
Vinson Lee
026d4b5b91 glu/sgi: Move initialization of members to top of Curve constructor.
This is a modification of commit 53d448657b.

The members cpts and spts are possibly used as arguments later in
the constructor.
2010-02-14 22:28:32 -08:00
Vinson Lee
4bbcc11f43 glu/sgi: Initialize members of class Curvelist. 2010-02-14 22:18:41 -08:00
Vinson Lee
53d448657b glu/sgi: Initialize members of class Curve. 2010-02-14 22:04:59 -08:00
Vinson Lee
9867b6eaad glu/sgi: Initialize member of class Pool. 2010-02-14 21:45:01 -08:00
Vinson Lee
86d98fa4a2 glx: Silence uninitialized variable warning. 2010-02-14 21:03:23 -08:00
Brian Paul
08cfe3ab42 st/mesa: minor assorted clean-ups 2010-02-14 21:58:45 -07:00
Brian Paul
f4ded0ea5c st/mesa: change some function return types 2010-02-14 21:57:15 -07:00
Brian Paul
e90bc2e2ce st/mesa: move per-fragment shader fields to local vars 2010-02-14 21:57:14 -07:00
Brian Paul
33681bcf56 st/mesa: use _mesa_clone_fragment_program() 2010-02-14 21:57:14 -07:00
Brian Paul
630b83be84 r600: use new program cloning functions 2010-02-14 21:57:14 -07:00
Brian Paul
79d4954f4f r300: use new program cloning functions 2010-02-14 21:57:14 -07:00
Brian Paul
7a38d8d9a5 glsl: use new program cloning functions 2010-02-14 21:57:14 -07:00
Brian Paul
848835a3d8 mesa: added _mesa_clone_vertex/fragment_program()
To reduce casting elsewhere...
2010-02-14 21:57:14 -07:00
Vinson Lee
7851856a60 r600: Silence uninitialized variable warnings. 2010-02-14 20:49:09 -08:00
Marek Olšák
d3d3345cb8 r300g: fix the size of constant buffers
4 more piglit tests pass, sweet.
2010-02-15 04:03:12 +01:00
José Fonseca
21fe86b036 python/retrace: Reconstruct blend state from binary blobs. 2010-02-15 00:25:43 +00:00
José Fonseca
e918519fe9 python: Reconstruct blend state objects from binary blobs. 2010-02-15 00:22:59 +00:00
José Fonseca
dcdf94c87c trace: Dump blend state as a binary blob.
Gallium interfaces are too fluid -- XML or not is just too much work
trying to accommodate for differences in traces.

SWIG generated bindings are also full of quirks, making unmarshalling
the XML from too hard.

Finally, this is the first step for faster tracing.
2010-02-15 00:22:29 +00:00
José Fonseca
1fc94ab3df trace: Fix constant buffer unwrapping.
Pointer unwrapping should happen before dump the pointer, so that
the real pipe driver pointers are shown, instead of the trace driver's.
2010-02-15 00:19:22 +00:00
José Fonseca
d70c769075 util: Avoid dumping masked state. Other minor improvements. 2010-02-14 23:54:22 +00:00
José Fonseca
270279ac99 os: A stream for debug logging.
Just a wrapper around os_log_message. Although it would probably make
more sense to be the other way around.

Also some comment fixes.
2010-02-14 23:53:42 +00:00
José Fonseca
d422310498 trace: No need to dump reference counts. 2010-02-14 23:25:34 +00:00
José Fonseca
c2b0484e58 python: Pretty-printing of blend state. 2010-02-14 23:25:34 +00:00
José Fonseca
165b824343 util: Helper functions to dump all state objects. 2010-02-14 23:25:34 +00:00
José Fonseca
64606231b8 os: Add a growable string stream. 2010-02-14 23:25:34 +00:00
José Fonseca
78200989d3 os: Complement/improve stream inline helpers. 2010-02-14 23:25:34 +00:00
José Fonseca
33682e5510 os: Fix bad calloc. 2010-02-14 23:25:33 +00:00
José Fonseca
dbc7b3da3e trace: Update for os_stream changes. 2010-02-14 23:25:33 +00:00
José Fonseca
323c6f8a2e util: Update for os_stream changes. 2010-02-14 23:25:33 +00:00
José Fonseca
2b4575f16d os: Make streams abstract.
Also replace windows kernel stream with null implementation. It was
severely limited and no easy means to test it now.
2010-02-14 23:25:33 +00:00
Vinson Lee
e7660a5442 glut: Silence uninitialized variable warning. 2010-02-14 13:47:58 -08:00
Vinson Lee
0b58d029b9 llvmpipe: Silence unused value warning. 2010-02-14 13:23:21 -08:00
Vinson Lee
7e64701263 svga: Silence uninitialized variable warning. 2010-02-14 13:10:08 -08:00
Marek Olšák
558c15995f r300: add half_float_vertex support 2010-02-14 21:58:52 +01:00
Pauli Nieminen
6e958832af mesa: Don't pass paramter to __builtin_clz which would hve undefined result.
__builtin_clz with parameter 0 has undefined value. When
using -O3 optimizing this would result to too large next
power of two value.

Fix is to check if passed value is 1 and modify formula
for that case.
2010-02-14 19:55:58 +02:00
Marek Olšák
7344e20ce4 r300g: set the correct tiling flags for renderbuffers
MACRO_SWITCH is applied to samplers but not renderbuffers. This commit
fixes incorrect rendering to large and small mipmaps where the large ones
are macrotiled and the small ones are not and both are emitted
in the same CS.

Note that this is still disabled by default (rework of texture transfers
is next).
2010-02-14 18:47:09 +01:00
Marek Olšák
c608e19328 r300g: add macrotiling support to texture setup 2010-02-14 18:44:33 +01:00
Marek Olšák
f7db96cd8f radeong: flush when changing tiling flags of BO referenced by CS 2010-02-14 18:20:18 +01:00
Marek Olšák
f22ddd8e47 r300g: accelerate blitting for all formats by faking the texture format 2010-02-14 18:15:13 +01:00
Brian Paul
2523172a5e src/glu/mesa: fix mem leak (bug 26559) 2010-02-14 10:05:42 -07:00
Brian Paul
d4d0629fcd src/glu/mini: fix mem leak (bug 26559) 2010-02-14 10:05:42 -07:00
Brian Paul
291bd19a1a progs/objviewer: close file (bug 26559) 2010-02-14 10:05:42 -07:00
Brian Paul
e84eec0003 progs/fp: close file (bug 26559) 2010-02-14 10:05:42 -07:00
Marek Olšák
71ac9551c4 r300g: fix texture formats: A4R4G4B4_UNORM, A1R5G5B5_UNORM, R5G6B5_UNORM 2010-02-14 17:50:29 +01:00
José Fonseca
fe889a89d2 scons: Control caching via new SCONS_CACHE_DIR environment variable.
This serves several purposes:
- disable caching in situations were is it useless or undesired
- share caches among all trees
- simplify purging the cache (when it's a single location)
- move the cache out of the tree, since that slows downs IDEs considerably

To retain previous behavior just define do

  export SCONS_CACHE_DIR=$PWD/build/cache

before invoking scons.
2010-02-14 15:34:39 +00:00
José Fonseca
abdcdb3db7 llvmpipe: s/debug_dump_/util_dump_/ 2010-02-14 15:21:06 +00:00
José Fonseca
da8de038da gallivm: s/debug_dump_/util_dump_/ 2010-02-14 15:20:57 +00:00
José Fonseca
c16a8e0dd5 util: Rename u_debug_dump.[ch] -> u_dump.[ch].
I have more plans for this than mere debugging -- it will be an helper
to provide human readible representations of all gallium state for
the python state tracker.
2010-02-14 15:20:34 +00:00
José Fonseca
db18996d3d mesa: Add missing include. 2010-02-14 13:28:29 +00:00
José Fonseca
fd3237c97d gallium: Remove previously forgotten pf_name() prototype. 2010-02-14 13:28:17 +00:00
José Fonseca
13701aae40 draw: Use util_format_name(). 2010-02-14 13:27:00 +00:00
José Fonseca
c667a5b95d util: Use util_format_name(). 2010-02-14 13:26:51 +00:00
José Fonseca
8f2b2d113f cell: Use util_format_name(). 2010-02-14 13:26:46 +00:00
José Fonseca
9189d04cdb llvmpipe: Use util_format_name(). 2010-02-14 13:26:37 +00:00
José Fonseca
db2df0aa9b nv: Use util_format_name(). 2010-02-14 13:26:30 +00:00
José Fonseca
06f76e4a6b r300g: Use util_format_name(). 2010-02-14 13:25:22 +00:00
José Fonseca
6f5e0539dc trace: Use util_format_name(). 2010-02-14 13:25:06 +00:00
José Fonseca
ee65faffc1 xorg: Use util_format_name(). 2010-02-14 13:24:58 +00:00
José Fonseca
d468791cc8 mesa: Use util_format_name(). 2010-02-14 13:24:43 +00:00
José Fonseca
5784381b1e util: Add pf_name() replacement: util_format_name(). 2010-02-14 13:23:32 +00:00
José Fonseca
c3168e050e makefiles: Don't complaint about changing configs if the same one is reselected.
Otherwise it creates unnecessary pain when automating builds in a build
server/farm.
2010-02-14 13:15:49 +00:00
José Fonseca
4ab3f0edef python/retrace: Interpret pipe_screen::context_create(). 2010-02-14 12:48:11 +00:00
José Fonseca
11a981fda1 trace: Fix generated XML. 2010-02-14 12:47:40 +00:00
José Fonseca
f1848977e8 python: Tell swig how to index per-rendertarget blend state. 2010-02-14 12:06:37 +00:00
José Fonseca
04cc5055db python: Pass p_format.h as-is to swig now that it has no inlines. 2010-02-14 11:26:58 +00:00
José Fonseca
50812e633f progs/gallium/python: New home for python statetracker scripts. 2010-02-14 11:16:41 +00:00
Vinson Lee
0a3e362175 glut: Silence uninitialized variable warning. 2010-02-14 02:04:17 -08:00
Vinson Lee
3a299071d4 r300: Silence uninitialized variable warning. 2010-02-14 00:56:57 -08:00
Vinson Lee
4f131356cc r600: Silence uninitialized variable warning. 2010-02-14 00:45:23 -08:00
Vinson Lee
ec5e54a40a glu/sgi: Initialize members of class Curvelist. 2010-02-13 23:56:48 -08:00
Vinson Lee
1462c1299c llvmpipe: Silence uninitialized variable warning. 2010-02-13 23:48:40 -08:00
Vinson Lee
71e750f482 softpipe: Silence uninitialized variable warnings. 2010-02-13 22:51:34 -08:00
Marek Olšák
260ec80f11 st/python: fix build error after gallium-screen-context merge 2010-02-14 03:20:09 +01:00
Marek Olšák
804a6d6a68 r300g: fix scons build 2010-02-14 03:20:01 +01:00
Brian Paul
85425b3b60 softpipe: fix broken cubemap / mipmap selection code
This is a quick-fix for the time being...

The per-face mipmap LOD computation was invalid at cube edges.  In
mip_filter_nearest/linear() we were trying to compute LOD using
texcoords that were sometimes indexes into different cube faces.
The subtraction used to compute the partial derivatives basically
gave random values, so the LOD was unpredictable.  This fix simply
uses the same cube face for all four pixels in the quad.  The per-
face texcoords all reference the same cube face so the partial
deriviates are computed properly.

A more elaborate fix would involve computing the LOD at the same
time as we choose the cube faces.  But for now, this solution works
well and allows the piglit/cubemap test to pass.

(cherry picked from commit 1ff9cd5079)
2010-02-13 17:47:23 -07:00
Karl Schultz
b30898f4ab mesa: Fix compiler warnings
Add explicit casts, fix constant types, fix variable types.
Fixes about 340 warnings in MSFT Visual Studio.
2010-02-13 17:34:04 -07:00
Brian Paul
5fd2b46a20 docs: document GL_ARB_fragment_coord_conventions 2010-02-13 14:06:25 -07:00
Brian Paul
31ed663a43 mesa: enable GL_ARB_fragment_coord_conventions for sw drivers
This extension is now implemented in the GLSL compiler so it can be
enabled by other drivers where applicable.
2010-02-13 14:03:02 -07:00
Brian Paul
c2c4935cb8 glsl: implement layout qualifiers
For GL_ARB_fragment_coord_conventions.

This only applies to gl_FragCoord and controls pixel center origin and
pixel center integer.  For example:

layout (origin_upper_left, pixel_center_integer) varying vec4 gl_FragCoord;

This features introduces the idea of re-declaring variables with a changed
type.  This may also apply to arrays in some cases but that's not
implemented at this time.
2010-02-13 13:57:33 -07:00
Brian Paul
26661ac0e1 glsl: added type layout field and new type compare func
Note: because of a weird dependency checking bug, a 'make clean' may be
needed before recompiling.
2010-02-13 13:52:39 -07:00
Brian Paul
b947b1d433 mesa: copy frag coord layout fields too 2010-02-13 13:51:38 -07:00
Brian Paul
46f788c2e5 glsl/cl: implement parsing for layout qualifiers
For GL_ARB_fragment_coord_conventions support.
2010-02-13 13:50:45 -07:00
Brian Paul
3b53b7e8b0 glsl/pp: fix incorrect extension enable flag for warn mode 2010-02-13 13:48:32 -07:00
José Fonseca
744994a9c6 mesa: Export GL_EXT_texture_cube_map.
Still used by some applications.
2010-02-13 15:44:37 +00:00
José Fonseca
a583c3ab47 wgl: Implement wglSwapMultipleBuffers. 2010-02-13 15:43:49 +00:00
José Fonseca
6b1193820f svga: Fix texture border color.
Also opposite ordering.
2010-02-13 15:43:33 +00:00
Marek Olšák
43b4d2a048 r300g: do not invalidate texture caches when only sampler state is changed 2010-02-13 15:44:43 +01:00
Marek Olšák
8eb4cd5b82 r300g: cleanup the emission of RS block state
Emit as few regs as possible.
2010-02-13 15:44:43 +01:00
Marek Olšák
67049b59fd r300g: cleanup the emission of framebuffer state
Some emits are not needed anymore.
2010-02-13 15:44:43 +01:00
Marek Olšák
8e2f9f4009 r300g: disable independent blend enables
Not supported by r300.
2010-02-13 15:44:43 +01:00
Marek Olšák
75910e96dc r300g: emit INDEPENDENT_COLORFORMAT_ENABLE only on r5xx 2010-02-13 15:44:42 +01:00
Vinson Lee
bf1096a778 mesa: s/abort/sys.exit/
Python does not have the function abort.
2010-02-13 00:05:29 -08:00
Vinson Lee
672f98baf7 mesa: Remove unnecessary header. 2010-02-12 23:47:45 -08:00
Vinson Lee
1213eb6cb4 i965: Remove unnecessary headers. 2010-02-12 23:37:36 -08:00
Vinson Lee
4123df2074 st/xlib: Remove unnecessary header. 2010-02-12 23:24:22 -08:00
Vinson Lee
fcd8ffe8e1 dri: Remove unnecessary headers. 2010-02-12 23:18:08 -08:00
Vinson Lee
e7a53c78ae mesa: Remove unnecessary headers. 2010-02-12 23:04:20 -08:00
Vinson Lee
f618641631 svga: Silence uninitialized variable warning. 2010-02-12 22:33:37 -08:00
Corbin Simpson
6a07a1738c util: Properly init memory for blitter CSOs.
Fixes misrender on r300g.
2010-02-12 20:48:46 -08:00
Brian Paul
282dafcdc7 st/mesa: restore draw rasterization stage after rasterpos
This fixes invalid calls to rastpos_point/line/tri() that can occur
when glRasterPos() is called while in feedback or selection mode.

(cherry picked from commit b3c7dc6ff2)
2010-02-12 17:22:10 -07:00
José Fonseca
a4865e82ef scons: Undo bad merge from cherry-pick. 2010-02-12 23:52:18 +00:00
José Fonseca
cd5d760889 svga: A few more tweaks to blend color state emission. 2010-02-12 23:48:22 +00:00
José Fonseca
6af833add2 svga: Clamp max cube texture levels to supported max 2d levels. 2010-02-12 23:46:58 +00:00
José Fonseca
2bb4d75f28 svga: Report the 2d/3d texture sizes supported by the host. 2010-02-12 23:46:55 +00:00
José Fonseca
a80d988144 wgl: Go into dormant state when DLL is unloaded unclealy.
When our DLL is unloaded, even if we leave the data structures in memory
for sake of future calls, the MS CRT will destroy the heap. Instead we
make all calls no-ops by setting stw_dev to NULL.
2010-02-12 23:38:19 +00:00
José Fonseca
57617c8eba scons: Target Windows7. 2010-02-12 23:38:19 +00:00
Brian Paul
ff37205f93 st/mesa: improved draw_range_elements code
Don't use pipe->draw_range_elements() if min_index=max_index=~0 since
that doesn't provide any useful info.

Also, implement the loop around pipe->draw_range_elements() when
nr_prims > 1.
2010-02-12 15:42:12 -07:00
Brian Paul
b9b4e7724e st/mesa: rename state -> tgsi, updated comments 2010-02-12 15:42:10 -07:00
Brian Paul
cd0a32924d st/mesa: remove unused var 2010-02-12 15:42:10 -07:00
Vinson Lee
4be324386c intel: Remove unused variable. 2010-02-12 14:37:07 -08:00
Brian Paul
2d6f5dd62b cell: fix-up C, CPP flags
Flags like -Wmissing-prototypes don't apply to g++.
2010-02-12 15:25:12 -07:00
Brian Paul
3798cc8157 cell: implement PIPE_CAP_MAX_COMBINED_SAMPLERS query 2010-02-12 15:24:24 -07:00
Brian Paul
8a61690e84 cell: remove -mcpu=cell from CFLAGS
This reverts part of commit ebe2f76095
and allows things to build here.
2010-02-12 15:16:44 -07:00
Kristian Høgsberg
2f517b8e5a intel: Avoid dri_bo_flink() in intel_update_renderbuffers()
Now that we track the global name in struct intel_region, we can just
look it up there.
2010-02-12 16:30:39 -05:00
Kristian Høgsberg
2d99588b35 intel: Track named regions and make sure we only have one region per named bo 2010-02-12 16:30:39 -05:00
Kristian Høgsberg
93931d9e68 dri: Store the loader private passed in at dri context creation
We just threw it away before, but we haven't had a use for it yet.
2010-02-12 16:30:38 -05:00
Zack Rusin
fd40b9ff32 st/dri: don't expose visuals we'll have trouble supporting
without getBuffersWithFormat some visuals will just cause headaches (crashes),
so if we're running on an older system simply don't advertise them.
2010-02-12 16:00:45 -05:00
Zack Rusin
59b4146a5d st/dri, st/xorg: fix buffers that have attachements of different depth
we actually need to specify the formats for different attachements, otherwise
if the color buffer is 24bpp and the app asks for 16bpp depth buffer than
we end up fetching the depth from the drawable which is 24bpp and end up
creating the wrong depth buffer. use the new getBuffersWithFormat extension
to pass the depth correctly.
2010-02-12 16:00:22 -05:00
Roland Scheidegger
7082c47d14 svga: enable code to emit blend color 2010-02-12 21:43:45 +01:00
Roland Scheidegger
6602889d82 Merge branch 'gallium-dynamicstencilref' 2010-02-12 21:39:29 +01:00
Vinson Lee
af1052e280 progs/tests: Add checks for GL_NV_vertex_program. 2010-02-12 11:59:37 -08:00
Jerome Glisse
3a916b0e81 Revert "r600c: substract vbo offset to vbo size"
This reverts commit 325614a882.
Ok this was already fixed this commit actualy broke things
2010-02-12 19:26:09 +01:00
Patrice Mandin
536ae20f80 nouveau: nv30: it may have 8 texture samplers (not 4), but shader engine has 16 texture units
Signed-off-by: Patrice Mandin <patmandin@gmail.com>
2010-02-12 19:22:41 +01:00
Brian Paul
0087f9dc06 cell: adjust structure padding
The size of some core Gallium state structures has changed so the
padding on some cell structs needed to be adjusted to keep them
a multiple of 16 bytes.
2010-02-12 11:07:51 -07:00
Brian Paul
e4afe725ee cell: remove unused var 2010-02-12 11:06:19 -07:00
Brian Paul
6c35e178d3 cell: include cell_context.h 2010-02-12 11:06:04 -07:00
Brian Paul
0ad0d8125a cell: re-fix undeclared var 2010-02-12 09:47:34 -07:00
Brian Paul
8a92c2b23c cell: declare stencil_value variable 2010-02-12 09:43:18 -07:00
Jerome Glisse
325614a882 r600c: substract vbo offset to vbo size
To avoid kernel complaining and to set proper boundary on
vbo, substract the vbo offset to the vbo size.
2010-02-12 17:06:19 +01:00
Andre Maasikas
08545799e3 r600: be more exact in vb size calculation
to make kernel cs checker happier, last attribs don't need full stride of
space. Calculate as count-1*stride + size of attrib
2010-02-12 16:23:49 +02:00
Andre Maasikas
eeb49d3ad8 r600: support GL_SHORT attributes
normalized seems to work with this setting.
2010-02-12 16:23:49 +02:00
Michal Krol
69dd99ba86 Revert "util: Fix descriptors for R32_FLOAT and R32G32_FLOAT formats."
This reverts commit aa0b671422.
2010-02-12 14:45:51 +01:00
Michal Krol
aa0b671422 util: Fix descriptors for R32_FLOAT and R32G32_FLOAT formats.
Fill in ones for missing components.
2010-02-12 13:32:35 +01:00
Patrice Mandin
1dd6e0b673 nouveau: nv30: Define number of texture samplers
Signed-off-by: Patrice Mandin <patmandin@gmail.com>
2010-02-12 13:23:48 +01:00
José Fonseca
e475ae920a wgl: Do not reach out and destroy contexts on cleanup.
Simply skip cleanup when contexts are still active.

This addresses two issues:

- in some situations the ICD DLL may be unloaded before the DLL that is
  using GL contexts is, so we may receive GL calls after stw_cleanup.

- when aborting (exception, or control-c) the contexts may have been left
  in an inconsistent state and attempting to destroy can cause
  unpredictable results.
2010-02-12 11:40:05 +00:00
José Fonseca
8ce747defa gdi: Never fail at DLL load time.
Windows doesn't really expect things to fail at this point -- it
will try many times until it finally gives up, worse, something bad
happens.

The WGL state tracker will gracefully decline to do work even when it
is loaded.
2010-02-12 11:40:02 +00:00
José Fonseca
e6b66210de wgl: Fail gracefully whenever 3D could not be enabled for some reason. 2010-02-12 11:39:58 +00:00
José Fonseca
ea8f7bd2e4 svgadump: Several improvements to shader dumping. 2010-02-12 11:10:41 +00:00
Vinson Lee
d0ec18e111 glu/sgi: Initialize member of class primStream. 2010-02-12 00:41:01 -08:00
Vinson Lee
b5b1b452cd glu/sgi: Initialize members of class Arc. 2010-02-12 00:36:00 -08:00
Vinson Lee
977fa27360 glu/sgi: Initialize member of class Bin. 2010-02-12 00:28:44 -08:00
Ben Skeggs
ba3c874f08 nouveau: use AVAIL_RING() 2010-02-12 16:03:20 +10:00
Ben Skeggs
6af75a0ff4 nouveau: switch to nouveau_bo_new_tile() 2010-02-12 16:03:20 +10:00
Brian Paul
04d35714a6 svga: check min_index, max_index before assertions
It's possible for min_index and max_index to be ~0 if the min/max
values were not actually set or computed in the state tracker.
Skip some assertions in that case.

This only effects the debug build error checking.

(cherry picked from commit 408f32dc16)
2010-02-11 16:54:48 -07:00
Karl Schultz
9209843878 main: Fix compiler warning. No need to convert/store depthScale as GLfloat just to convert it back to GLuint to call unpack_depth_span.
Also removes a difference between the 24/8 and 8/24 texstore routines.
2010-02-11 16:49:41 -07:00
Roland Scheidegger
ebe12d5006 gallium: make max_anisotropy a unsigned bitfield member
saves us a dword in sampler state, hw can't do non-integer aniso degree anyway.
To allow aniso 1x (which seems of dubious value but some hardware (radeons)
have such a mode, and even d3d allows specifiying it) redefine anisotropic
filtering as disabled only if max_anistropy is 0.
2010-02-12 00:43:38 +01:00
Ian Romanick
381d5e2098 glxgears_fbconfig: Use glXCreateWindow and glXDestroyWindow 2010-02-11 15:40:29 -08:00
Ian Romanick
6518f6037c glxgears_fbconfig: Use GLX 1.3 name for function poiner types 2010-02-11 15:40:29 -08:00
Ian Romanick
d46d30f997 glx: Pass fbconfig ID or visual ID to CreateContext
Pass either the fbconfig ID or the visual ID, as appropriate, to
CreateContext.  Now CreateContext does not derefernce fbconfig or vis
(which no longer exists as a parameter).
2010-02-11 15:40:29 -08:00
Ian Romanick
c3db1d621e glx: Use the screen parameter everywhere instead of vis->screen, etc. 2010-02-11 15:40:29 -08:00
Ian Romanick
52cf8db428 glx: Move work of converting a visual to an fbconfig
For the direct rendering case, the DRI createContext function wants an
fbconfig.  When glXCreateContext is called, we have to convert the
visual to an fbconfig.  This work was done in CreateContext, but it
makes more sense for it to be done in glXCreateContext.
2010-02-11 15:40:29 -08:00
Ian Romanick
bc7b2f0dc3 glx: Re-indent CreateContext after the previous commit 2010-02-11 15:40:29 -08:00
Ian Romanick
2243029eee glx: Handle imported contexts outside of CreateContext
A long time ago I was a bit over-agressive in refactoring context
creation into a single function.  The creation code for
glXImportContextEXT does not belong  in CreateContext because it does
not use any GLX protocol.  The big if-statement for the import case
routed around almost the entire function anyway.
2010-02-11 15:40:29 -08:00
Ian Romanick
7bcfb66000 glx: Pass screen number as parameter to CreateContext
Passing the screen parameter to CreateContext will simplify a couple
of changes that are coming.
2010-02-11 15:40:29 -08:00
Ian Romanick
8bffadbc83 glx: Pass opcode to CreateContext instead of use_glx_1_3 parameter
Passing the opcode directly instead of having CreateContext infer it
from the value of fbconfig and the use_glx_1_3 flag will simplify some
changes that are coming.
2010-02-11 15:40:29 -08:00
Ian Romanick
68fef18439 glx: Fix interval test in glXSwapIntervalMESA
It appears that, in spite of what the spec says, the interval
parameter to glXSwapIntervalMESA has been an unsigned int since
day-1.  This made the 'if (interval < 0)' test useless.  The test is
removed and the spec is updated to note that the interval is an
unsigned value.
2010-02-11 15:40:29 -08:00
Ian Romanick
1add5354d0 glx: Change type to eliminate 'comparison between signed and unsigned' warning 2010-02-11 15:40:29 -08:00
Ian Romanick
71a6fb15ce glx: Add casts to eliminate 'comparison between signed and unsigned' warnings 2010-02-11 15:40:28 -08:00
Ian Romanick
26b2bee79d glx: Eliminate several 'unused variable' warnings in glxcmds.c. 2010-02-11 15:40:28 -08:00
Ian Romanick
2b4e009ed5 glx: Use wrapper macro to detect direct rendering
The wrapper macro GC_IS_DIRECT is used in CreateContext and a couple
other places to eliminate the need for some of the '#ifdef
GLX_DIRECT_RENDERING' madness.  There appear to be a *LOT* of places
in glxcmds.c where '#ifdef GLX_DIRECT_RENDERING' is missing.
2010-02-11 15:40:28 -08:00
Karl Schultz
2d1088cc17 Turn off 64-bit portability problems detection. 2010-02-11 15:55:04 -07:00
Roland Scheidegger
16d520f6d6 nouveau: fix compile errors... 2010-02-11 23:11:03 +01:00
Kristian Høgsberg
c7ab5994ee glapi: Avoid #including gl.h
It's only used for a couple of integer types and and might conflict
with other client API header files.
2010-02-11 17:04:06 -05:00
Kristian Høgsberg
cc57baff5f i915: Remove always-true irq_active struct intel_screen field 2010-02-11 16:56:44 -05:00
Kristian Høgsberg
c9b0f04b1f i915: Remove a few DRI1 era struct intel_screen fields 2010-02-11 16:54:20 -05:00
Kristian Høgsberg
5777dee02c i915: Drop intelScreenPrivate typedef and just call it struct intel_screen 2010-02-11 16:49:26 -05:00
Kristian Høgsberg
cbfd4147ca i915: Remove unused intelRegion struct
Phew, sure is nice to only have one struct called intel region.
2010-02-11 16:49:07 -05:00
Roland Scheidegger
67479eea36 nv50: adapt to stencil ref changes 2010-02-11 22:48:39 +01:00
Roland Scheidegger
dc8c0959bd nv40: adapt to stencil ref changes 2010-02-11 22:48:31 +01:00
Kristian Høgsberg
fa43956b5c i915: Remove left-over drmUnmap() 2010-02-11 16:34:11 -05:00
Roland Scheidegger
bedb6faec0 nv30: adapt to stencil ref changes
not sure if this has any hope of working
2010-02-11 20:55:33 +01:00
Brian Paul
362fa6763c mesa: additional constant/limit assertions 2010-02-11 11:34:54 -07:00
Brian Paul
0be04f710e svga: implement PIPE_CAP_MAX_COMBINED_SAMPLERS query 2010-02-11 11:34:54 -07:00
Roland Scheidegger
ed0f3b08b6 gallium: make u_blitter code save/restore stencil ref values 2010-02-11 19:01:10 +01:00
Karl Schultz
207ad94a89 Add git tips 2010-02-11 10:56:30 -07:00
Roland Scheidegger
bf4b0773c5 r300g: adapt to stencil ref changes 2010-02-11 18:48:57 +01:00
Roland Scheidegger
94c035f61d cell: adapt to stencil ref changes
not betting this compiles, some of the code handling stencil test seems
incomplete and/or never called?
2010-02-11 18:18:11 +01:00
Roland Scheidegger
0b659dee69 i965g: adapt to stencil ref changes
while there also potentially fix logic ops (were never enabled before)
2010-02-11 18:16:52 +01:00
Roland Scheidegger
388109c04d i915g: adapt to stencil ref changes 2010-02-11 18:16:09 +01:00
Roland Scheidegger
263406addb gallium: give pipe_stencil_ref its own cso_save/restore functions
seems cleaner, and other dynamic state like viewport is handled that way too
2010-02-11 18:15:10 +01:00
Brian Paul
6352f4c854 st/mesa: fix gallium texture level selection for RTT
Fixes invalid texture level when rendering to a texture where
GL_BASE_LEVEL > 0.

This will be cherry-picked to the 7.7 branch after additional
testing.
2010-02-11 09:40:52 -07:00
Brian Paul
3c28fad20b mesa: remove darwin-x86ppc and dangling darwin refs in Makefile 2010-02-11 09:04:03 -07:00
Brian Paul
d23fefe217 docs: remove old CVS references 2010-02-11 09:02:53 -07:00
José Fonseca
be29a60f9e Revert "llvmpipe: Move tile coordinate assertion into a more useful place."
This reverts commit 8c0391726a.

Too pendantic.
2010-02-11 12:14:01 +00:00
José Fonseca
c72e8b3edd scons: Fix drm/intel build. 2010-02-11 11:51:32 +00:00
José Fonseca
9381dd590f llvmpipe: Handle TGSI_TOKEN_TYPE_PROPERTY.
Avoids assertion failures with certain shaders.
2010-02-11 11:08:30 +00:00
José Fonseca
8c0391726a llvmpipe: Move tile coordinate assertion into a more useful place. 2010-02-11 10:59:41 +00:00
José Fonseca
764c172aa9 llvmpipe: Clamp both extremes of triangles to framebuffer size.
Fix segmentation fault when triangles crossed the axis.
2010-02-11 10:58:46 +00:00
José Fonseca
128d93a009 gallivm: TGSI_OPCODE_CONT is not deprecated.
Note that with FIXME instead of an assertion failure.

Addresses fdo 25956.
2010-02-11 10:08:52 +00:00
Ben Skeggs
16a91bd2fd nouveau: remove u_simple_screen.h includes 2010-02-11 15:21:31 +10:00
Roland Scheidegger
b75adabc89 gallium: also save/restore stencil_ref in cso_save/restore_depth_stencil_alpha
makes life of state trackers easier
2010-02-11 04:06:01 +01:00
Vinson Lee
7c2634dd71 i965g: ifdef out unused functions. 2010-02-10 19:03:18 -08:00
Corbin Simpson
229db2b8ad r300g: Work around "defect" in r300compiler.
r300compiler doesn't handle half swizzles for vert shaders, which don't
have them. So, for now, disable them.
2010-02-10 18:40:12 -08:00
Vinson Lee
218590f707 st/mesa: Silence uninitialized variable warning in st_cb_bitmap.c. 2010-02-10 18:37:46 -08:00
Vinson Lee
19045d3749 swrast: Silence uninitialized variable warnings in ss_tritmp.h. 2010-02-10 18:30:46 -08:00
Vinson Lee
8df7e20788 os: Do not use Pthreads barrier functions on Mac OS X.
Pthreads barrier functions are not available on some POSIX platforms.
2010-02-10 18:12:10 -08:00
Vinson Lee
57732d83e5 ffb: Fix build. 2010-02-10 16:14:28 -08:00
Brian Paul
4b1241bf76 gallium: cast to silence waring 2010-02-10 16:44:05 -07:00
Brian Paul
f6bcce0308 gallium: use os_time.h 2010-02-10 16:43:50 -07:00
Brian Paul
bcace317c7 gallium: use os_time.h in pb_bufmgr_cache.c
Untested, but seems straightforward.
2010-02-10 16:41:43 -07:00
Brian Paul
43ba0d7451 gallium: use os_time.h in u_timed_winsys.c 2010-02-10 16:37:18 -07:00
Brian Paul
eaf3ae58a9 scons: add another prefix for mingw32 on Fedora
(cherry picked from commit f1afb352da)
2010-02-10 16:34:24 -07:00
Ian Romanick
5325340fb3 dri: Fix one last copy-and-paste brain damage from a previous commit 2010-02-10 15:16:46 -08:00
José Fonseca
2311e2adf0 scons: User friendly message for code generated files 2010-02-10 22:32:50 +00:00
Karl Schultz
2717d9066d Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/mesa 2010-02-10 15:22:07 -07:00
Karl Schultz
450524a87c Update Visual Studio Project files to compile the shader compiler and build the prebuilt shader header files. 2010-02-10 15:21:06 -07:00
Corbin Simpson
412ffb7a3a r300g: Fix typo.
Thanks to Uros Bizjak for catching it.
2010-02-10 12:35:39 -08:00
Corbin Simpson
92ea8834d8 r300/compiler: r500-fs: Properly set HW register swizzles.
Fixes fallout from 9a1bf52c.
2010-02-10 12:35:30 -08:00
José Fonseca
f6a16dfa97 scons: Only build progs when explicitly requested in the command line. 2010-02-10 20:23:10 +00:00
Roland Scheidegger
9381a2777c svga: adapt to stencil ref changes
also add some disabled code to handle blendcolor?
2010-02-10 21:21:30 +01:00
Roland Scheidegger
6a509ec6dd llvmpipe: adapt to stencil ref changes
since the driver doesn't actually handle stencil yet the code won't do much.
2010-02-10 21:20:24 +01:00
Roland Scheidegger
4ea2f61e5a identity: adapt to stencil ref changes 2010-02-10 21:18:12 +01:00
Roland Scheidegger
5365d41895 fo: adapt to stencil ref changes 2010-02-10 21:17:46 +01:00
Roland Scheidegger
dfc02e3784 st/mesa: more fixes for stencil ref change.
compiles. Might need to do something to make it possible to save/restore
stencil ref.
2010-02-10 21:14:18 +01:00
José Fonseca
b44c444a0f llvmpipe: Map rendertargets when bound as textures.
Fixes gearbox segfault (fdo 25960). Corruption remains.
2010-02-10 20:12:44 +00:00
Ian Romanick
96728bb4f3 dri: Fix copy-and-paste brain damage in previous commit
A number of places in 3cce4a1e10 use
TRUE instead of GL_TRUE.  This causes build failures in all of the
drivers that I don't typically build.  Win.

Reported by sungami on IRC.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-02-10 11:43:02 -08:00
Ian Romanick
6bd9da01ea intel: Don't expose GLX_SWAP_EXCHANGE_OML
We can't always guarantee that the swap will happen by exchange, so we
can't expose this mode.  GLX_SWAP_UNDEFINED_OML already covers the
case where the swap *might be* by exchange.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2010-02-10 10:50:28 -08:00
Ian Romanick
bb65a1d009 intel: Expose a minimal number of configs with accumulation buffer
Expose one config per color depth that includes accumulation buffer.
We could probably expose only one config with accumulation buffer, but
that would require figuring out the actual color depth.  This is
easier and only exposes 2 useless configs.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2010-02-10 10:50:28 -08:00
Ian Romanick
3cce4a1e10 dri: Allow selective generation of accum. buffer configs
Modify the interface to driCreateConfigs allowing drivers to not
expose configs with an accumuation buffer.  All of the drivers calling
function have been updated to pass true for the accumulation
selector.  This maintains the current behavior.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Corbin Simpson <MostAwesomeDude@gmail.com>
2010-02-10 10:50:28 -08:00
Ian Romanick
73e24cd5a7 intel: Stop exposing useless 24 depth/0 stencil configs
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2010-02-10 10:50:28 -08:00
Ian Romanick
6d91f9a024 intel: Remove redundant init of depth_bits / stencil_bits in intelInitScreen2
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2010-02-10 10:50:28 -08:00
Ian Romanick
066f45c7a1 intel: Update comment in intelInitScreen2 to noting DRI2 protocol issues
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2010-02-10 10:50:28 -08:00
Roland Scheidegger
0786f38b46 trace: adapt to stencil ref changes 2010-02-10 19:07:26 +01:00
Roland Scheidegger
658e94578f softpipe: adapt to stencil ref changes 2010-02-10 18:59:43 +01:00
unknown
b91bb45899 Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/mesa 2010-02-10 10:55:01 -07:00
Brian Paul
3251f31d59 glsl/pp: fix extension enable/disable options
Now the #extension name: disable/enable flags do the right thing.

Fixes glean/glsl1 "Preprocessor test (extension test 3)"
2010-02-10 10:49:50 -07:00
unknown
c3b62372db Add new symbol to exports list 2010-02-10 10:49:11 -07:00
Roland Scheidegger
903bb045b5 gallium: adapt state trackers to stencil ref change 2010-02-10 18:46:43 +01:00
Michal Krol
8b1c332a77 Simplify GLSL extension mechanism.
Since extension name and extension name string are the same, collapse
them into one name.
2010-02-10 18:04:07 +01:00
Michal Krol
c1395a71ac glsl/pp: Fix ifdef directive for extension names. 2010-02-10 17:55:29 +01:00
Brian Paul
eb095b67ad glsl: GLSL extensions have the GL_ prefix
Both the #extension directive name and the preprocessor symbol start
with the GL_ prefix.  For example:

...

New glean/glsl1 tests have been added to test the #extension feature.
2010-02-10 08:28:37 -07:00
Zack Rusin
f88b43e8d0 st/xorg: fix a silly offset bug in xv
we were multiplying the difference in the wrong direction.
2010-02-10 09:26:54 -05:00
Kristian Høgsberg
3a0e4eb94c r600: Fix typo in __DRI_TEXTURE_FORMAT_RGBA rename
Oops, I n00bed it.
2010-02-10 07:56:51 -05:00
José Fonseca
ba33fed610 llvmpipe: Fix null pointer dereference when no depth buffer is bound. 2010-02-10 11:25:26 +00:00
José Fonseca
5e6a900510 llvmpipe: Leave depth buffer in swizzled format.
This fixes several assertion failures due to only Z32 being supported.
2010-02-10 11:01:26 +00:00
Vinson Lee
7a593afa17 glu/sgi: Initialize member of class Uarray. 2010-02-10 01:25:23 -08:00
Vinson Lee
58c991a640 llvmpipe: Remove unnecessary headers. 2010-02-10 00:35:48 -08:00
Zack Rusin
08e2eab8a4 scons: export drawllvm after actually checking that llvm is present 2010-02-10 00:08:36 -05:00
Kristian Høgsberg
c19dab7c59 egl_dri2: Only allocate config if we're going to keep it
Small optimization.
2010-02-09 21:24:15 -05:00
Kristian Høgsberg
c3c1a7e1d9 egl_dri2: Initialize config attributes with visual id and class from X 2010-02-09 21:24:15 -05:00
Kristian Høgsberg
368bb3dc2b eglinfo: Also print visual type, assuming X visual types
This may not make a lot of sense for non-X EGL, but for EGL under X
it's very useful.
2010-02-09 21:24:14 -05:00
Kristian Høgsberg
360faf80ca egl_dri2: Allow pbuffer and pixmap surfaces for all configs 2010-02-09 21:24:14 -05:00
Pauli Nieminen
77e6fb17d9 radeon: Fix printf formatings to match te values. 2010-02-10 03:20:11 +02:00
Pauli Nieminen
42026a8ccf radeon: Define EXT_framebuffer_object constants to match hw.
This hides the assertion failure in glean/fbo test. Underlying
problem when same texture is set twice to different attachments
will cause assertion.
2010-02-10 03:20:11 +02:00
Brian Paul
4bce2fb30e mesa: move all limit/constant assertions into check_context_limits() 2010-02-09 18:08:04 -07:00
Francisco Jerez
96100f39be Drop incorrectly revived files during the 'gallium-nopointsizeminmax' merge. 2010-02-10 00:43:43 +01:00
Corbin Simpson
dbc1340191 r300g: One less assert.
This entire codepath needs to be cleaned to be more pliant towards
shader failure.
2010-02-09 13:58:53 -08:00
Corbin Simpson
8c85002951 r300g: Don't write non-existent bit on non-r500.
Might help with compiz being funky with MRTs.
2010-02-09 13:53:30 -08:00
Corbin Simpson
67b60b9934 r300g: Correct colorbuffer measurements.
Also clarify changes from pointminmax.
2010-02-09 13:50:54 -08:00
Corbin Simpson
5a27a77d00 r300g: Be ever-so-slightly more useful on bad shaders. 2010-02-09 13:50:38 -08:00
Kristian Høgsberg
1ebc568154 configure.ac: Enable egl demos when --enable-egl is passed 2010-02-09 15:55:25 -05:00
Kristian Høgsberg
ab487f7ffa xeglgears: Add test case for eglBindTexImage() 2010-02-09 15:55:25 -05:00
Kristian Høgsberg
bba5a98dfd egl_dri2: Implement eglBindTexImage() 2010-02-09 15:55:25 -05:00
Kristian Høgsberg
debf00e5fc dri_interface: Introduce DRI tokens for the texBuffer texture formats
This used to take GLX tokens, but the DRI interface can't depend on GLX
defines.  We fix this by introducing DRI tokens that have the same value
as the GLX texture format tokens.
2010-02-09 15:55:25 -05:00
Kristian Høgsberg
8c593d3ea9 egl_dri2: Use a helper function for looking up and binding extensions 2010-02-09 15:55:24 -05:00
Roland Scheidegger
98f8c4d0bb docs: fix up documentation for stencil ref value changes
Also fix and clarify depth/stencil/alpha documentation a bit.
2010-02-09 21:48:43 +01:00
Roland Scheidegger
c59446a493 gallium: make valuemask/writemask in pipe_stencil_state bitfield members
More consistent with other state data, might allow some compilers to pack
the struct better (doesn't matter for gcc).
2010-02-09 21:26:35 +01:00
Roland Scheidegger
1a859ecf4a gallium: don't put stencil ref value in pipe_depth_stencil_alpha_state
This will make driver's life a bit harder, however it makes sense that stencil
reference value is not part of the pipe_depth_stencil_alpha_state, because
it often (there are some algorithms which require this) changes more frequently
than the rest of the dsa state. This is also encouraged by some graphic APIs.
Treat it similar to pipe_blend_color.
2010-02-09 21:23:27 +01:00
Brian Paul
ed46e90f05 gallium/auxiliary: add -D__STDC_CONSTANT_MACROS
Not sure why this is needed now, after the gallivm re-org.
2010-02-09 13:10:07 -07:00
Brian Paul
822d951b5d llvmpipe: remove .s rule (already in Makefile.template) 2010-02-09 13:08:23 -07:00
Brian Paul
aa4ed6a0e6 llvmpipe: lp_tile_surface.c isn't committed yet 2010-02-09 13:07:58 -07:00
Pauli Nieminen
4767d27ee3 radeon: Add some debug output for fbo support 2010-02-09 21:38:47 +02:00
Pauli Nieminen
9e587dbd78 r200: Fix UMS notto emit stp.
Polgon stipples are handled by kernel in UMS. Mark the
state as never to be emited for UMS.
2010-02-09 21:38:47 +02:00
Roland Scheidegger
653a83445f Merge branch 'gallium-nopointsizeminmax'
Conflicts:
	src/gallium/drivers/nv10/nv10_state.c
	src/gallium/drivers/nv20/nv20_state.c
	src/gallium/drivers/nv50/nv50_program.c
2010-02-09 19:32:21 +01:00
Brian Paul
b0613d8767 docs: fix typo: s/osdemo/osdemos/
(cherry picked from commit 0371956d66)
2010-02-09 11:21:41 -07:00
Chris Li
a8f4904fb3 gallium: Adding the %.s rule to generate asm code
Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-02-09 17:19:30 +00:00
Chris Li
62d1e40e0d gallium: Using the proper pattern rules for Makefile template.
The .o.c rule is consider obsolete.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-02-09 17:19:30 +00:00
Chris Li
8b6ec94aec llvmpipe: Make llvm unit test depend on libllvmpipe.a
Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-02-09 17:19:29 +00:00
Roland Scheidegger
dd7be07c96 st/mesa: fix wrong initialization of MaxPointSize 2010-02-08 18:48:08 +01:00
Jakob Bornecrantz
6ef1d60407 vmware/core: Support drm interface version 1.0.0 2010-02-06 03:36:47 +01:00
Jakob Bornecrantz
6a4cd124af vmware/core: Use correct flags in scanout code 2010-02-06 03:36:47 +01:00
Jakob Bornecrantz
6ffb6318a0 vmware/core: Handle new scanout field 2010-02-06 03:36:47 +01:00
Jakob Bornecrantz
a9d61c286d vmware/core: Update header to latest version 2010-02-06 03:36:46 +01:00
Jakob Bornecrantz
7afcfa0683 vmware/core: Remove old ioctl structs not used
Leftover that was never used in this driver
2010-02-06 03:36:46 +01:00
Michal Krol
72fa4ef649 llvmpipe: Remove reference to prefilter field. 2010-02-09 16:27:16 +01:00
Kristian Høgsberg
2ecbe4e208 glx: Fix TOP setting in src/glx Makefile
Argh, forgot to commit this fix before pushing.
2010-02-09 10:21:45 -05:00
Kristian Høgsberg
6e8897ff9f Retire miniglx and move the actual glx code up to src/glx 2010-02-09 09:58:36 -05:00
Kristian Høgsberg
538539d879 egl_dri2: Fix initialization with EGL_DEFAULT_DISPLAY 2010-02-09 09:51:05 -05:00
Brian Paul
a1a441179b fix bug in perspective corrected interpolants for lines 2010-02-09 15:33:06 +01:00
Brian Paul
fd6701029b progs/tests: add line drawing option to cylwrap.c 2010-02-09 15:33:03 +01:00
Brian Paul
22a3a817aa progs/tests: add x/y rotation to cylwrap.c 2010-02-09 15:33:00 +01:00
Brian Paul
dd98a979b6 st/mesa: remove special-case cyl-wrap code
Cylinder wrap mode works with perspective interpolation now.
2010-02-09 15:32:56 +01:00
Michal Krol
5fbb62f761 softpipe: Properly implement cylindrical wrapping. 2010-02-09 15:32:53 +01:00
Michal Krol
00bd85e574 Revert "softpipe: Implement cylindrical wrapping for linear interpolator."
This reverts commit 444cd62ca33a45bd39e8408979a0a01c246c6381.
2010-02-09 15:32:50 +01:00
Brian Paul
86921aaf3f progs/tests: new test program for exercising cylindrical tex wrap mode 2010-02-09 15:32:47 +01:00
Brian Paul
ae4dde6598 st/mesa: check for PROG_PARAM_BIT_CYL_WRAP flag 2010-02-09 15:32:43 +01:00
Brian Paul
4a9f1eed2b mesa: add back-door support for cylindrical texture wrap mode
If the texture priority field is 0.125 set the PROG_PARAM_BIT_CYL_WRAP
flag.  The gallium state tracker will look for this flag.

This feature is only for testing purposes and may be remove at some
point.  But if it's useful we could write a GL/Mesa extension to
expose it properly.
2010-02-09 15:32:40 +01:00
Michal Krol
9a8473da83 gallium: Remove prefilter member from pipe_sampler_state struct. 2010-02-09 15:32:36 +01:00
Michal Krol
63d6097910 docs: Document TGSI Declaration token. 2010-02-09 15:29:52 +01:00
Michal Krol
e04c8ecc61 softpipe: Implement cylindrical wrapping for linear interpolator. 2010-02-09 15:29:49 +01:00
Michal Krol
607a830fe2 tgsi: Gather cylindrical wrap info in tgsi_shader_info struct. 2010-02-09 15:29:46 +01:00
Michal Krol
33a9fb35dd tgsi: Add ureg_DECL_fs_input_cyl().
Allows one to declare fragment shader inputs with cylindrical wrap info.
2010-02-09 15:29:42 +01:00
Michal Krol
6f6d740c85 gallium: Add cylindrical wrap info to TGSI declaration. 2010-02-09 15:29:39 +01:00
Michal Krol
5ee856e195 tgsi: Remove tgsi_dump_c.[ch].
Little utility after development stabilisation, use tgsi_dump instead.
2010-02-09 15:29:34 +01:00
Michal Krol
01d7e3d5a2 mesa: Enable true refcounting for NullBufferObj.
This object can be shared with another context, so we cannot just
delete it when the owning context is being destroyed.

Ensuring that buffer objects are properly refcounted guarantees
NullBufferObj is destroyed when all references to it are removed.
2010-02-09 14:52:52 +01:00
Michal Krol
eeec2c3d95 mesa: Protect buffer objects reference counting with a mutex. 2010-02-09 14:46:32 +01:00
José Fonseca
829d9bb733 mesa: Ensure object refcount is null when destroying the buffer.
Lets see if this is not too pedantic. Obj pointers are never exposed to
GL apps so it should be possible to get this right.

Furthermore apps with GL widgets and test suits create and destroy many
contexts and objects, so bad reference counting is not really an option.
2010-02-09 11:52:08 +00:00
José Fonseca
05ac187f30 mesa: Fix null buffer object reference counting.
Always use _mesa_reference_buffer_object, and never call
ctx->Driver.DeleteBuffer() directly to prevent dangling pointers to the
null buffer object.

This fixes crash/assertions in sharedtex_mt and Autodesk Mudbox.
2010-02-09 11:52:05 +00:00
José Fonseca
1c39dbb90c mesa: Always do proper ref counting of shared state. 2010-02-09 11:52:02 +00:00
José Fonseca
b750786fb1 svga: Actually call fence_reference in texture downloads. 2010-02-09 11:51:33 +00:00
Vinson Lee
ad93f3e489 progs/xdemos: Silence uninitialized variable warning. 2010-02-09 01:35:14 -08:00
Vinson Lee
70f8aaa0c3 r300g: Fix off-by-one errors in array bounds assertions. 2010-02-09 01:26:11 -08:00
Zack Rusin
43f8a82a76 scons: don't assume llvm is always present 2010-02-09 00:00:35 -05:00
Zack Rusin
85c7ec70ad llvmpipe: switch to using dynamic stack allocation instead of registers
with mutable vars we don't need to follow the phi nodes. meaning that
control flow becomes trivial as we don't have scan the rest of the tgsi
to figure out the variable usage anymore. futhermore the memory2register
pass promotes alloca/store/load to registers while inserting the right phi
nodes. so we get simplicity and performance.
2010-02-08 21:50:33 -05:00
Vinson Lee
257267ee98 identity: Remove unnecessary header. 2010-02-08 18:22:29 -08:00
Vinson Lee
a131941e43 softpipe: Remove unnecessary headers. 2010-02-08 18:14:49 -08:00
Brian Paul
38076c9950 gallivm: added lp_bld_misc.cpp to sources list 2010-02-08 17:51:48 -07:00
Brian Paul
69c0d08678 llvmpipe: include gallivm/lp_bld_misc.h 2010-02-08 17:40:02 -07:00
Brian Paul
7d36b678c5 gallivm: added gallivm/lp_bld_misc.cpp to Makefile 2010-02-08 17:39:08 -07:00
Brian Paul
6c28cc27eb llvmpipe: remove files moved to gallivm/ from llvmpipe/Makefile 2010-02-08 17:38:35 -07:00
Brian Paul
b014d71fd4 llvmpipe: s/textured/texture/ 2010-02-08 17:34:59 -07:00
Brian Paul
4aeacdf853 llvmpipe: added counters for color tile clear, load, store 2010-02-08 16:57:23 -07:00
Brian Paul
a8270c7c29 llvmpipe: use new os time functions 2010-02-08 16:57:23 -07:00
Francisco Jerez
8b0b5ace48 glx: Fix SwapBuffers regression introduced by 01923fb72d.
After that commit, some dri2 protocol symbols were being checked from
places that weren't including dri2proto.h, effectively disabling some
valuable SwapBuffers codepaths.
2010-02-08 23:29:15 +00:00
Zack Rusin
c61bf36393 llvmpipe: export the tgsi translation code to a common layer
the llvmpipe tgsi translation is a lot more complete than what was in
gallivm so replacing the latter with the former. this is needed since
the draw llvm paths will use the same code. effectively the proven
llvmpipe code becomes gallivm.
2010-02-08 18:22:11 -05:00
Corbin Simpson
74d23546c7 radeong: Provide drm_api::destroy hook.
Pedantic Corbin is pedantic.
2010-02-08 14:03:28 -08:00
Corbin Simpson
184cefcd8c radeong: Always return something for create_screen.
Prevents a segfault on e.g. r600.
2010-02-08 13:37:55 -08:00
Keith Whitwell
361d73fcfc st/dri: fix compile breakage 2010-02-08 19:45:02 +00:00
Keith Whitwell
0b99303d1c egl: re-fix context_create typo 2010-02-08 17:17:59 +00:00
Keith Whitwell
3703e259d9 svga: remove dead debug sleep 2010-02-08 17:17:59 +00:00
Keith Whitwell
a23357ca60 gallium: remove softpipe references in other drivers 2010-02-08 17:17:59 +00:00
Keith Whitwell
6447b20ce0 drm/radeon: remove softpipe references 2010-02-08 17:17:58 +00:00
Marc Dietrich
ebe2f76095 cell: fix the usual cell breakage
also update the cell config a bit

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-02-08 07:47:04 -07:00
Keith Whitwell
7f41f5447c gallium: squash-merge of gallium screen context
Squashed commit of the following:

commit 009598122adf5cad42bf9af067eccaf8e89e1233
Author: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Date:   Mon Feb 8 11:03:26 2010 +0000

    nouveau: fix gallium-screen-context branch fallout

commit 7b2ffc2019d72e833afea7eebf3e80121187375d
Merge: 51e190e c036d13
Author: Keith Whitwell <keithw@vmware.com>
Date:   Fri Feb 5 09:55:02 2010 +0000

    Merge commit 'origin/master' into gallium-screen-context

    Conflicts:
    	src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c

    This branch has got a pretty tortured history now, I expect
    a squash merge will be appropriate when it is done.

commit 51e190e95acf120f72768fafb29e9721e358df1b
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 17:58:02 2010 +0000

    gallium: fix some build issues

commit f524bdaa723fb181637ad30c6ad708aeedabe25b
Merge: f906212 3aba0a2
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 17:51:32 2010 +0000

    Merge commit 'origin/master' into gallium-screen-context

commit f9062126883199eabf045714c717cd35f4b7b313
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 17:17:12 2010 +0000

    gallium/docs: small description of screen::create_context

commit efcb37bd3d5ed37f06c6105bd2d750b374ec0927
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:42:42 2010 +0000

    drm/radeon: more dead create_context wrapper removal

commit 6badc0dd9e06cf2ec936940bcf12b9ef5324b301
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:42:30 2010 +0000

    drm/i965: more dead create_context wrapper removal

commit cf04ebd5a54b18b2d894cfdab2b0f2fd55626ffc
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:42:05 2010 +0000

    st/python: more dead create_context wrapper removal

commit 444f114c3516abf71c430e6e9d0d2ae3b80679d3
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:37:58 2010 +0000

    idenity: wrapped context creation

commit 5a6d09cb9e468d1ee6c8d54b887618819d8d94f2
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:28:47 2010 +0000

    ws/gdi: remove dead context_create wrapper

commit 132b55f4bec39386ac625f09aaa11f609664024c
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:27:52 2010 +0000

    ws/gdi: remove dead context_create wrapper

commit 56d2d21a0cdcb197a364049d354c2f15a4fc026a
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:25:38 2010 +0000

    st/xorg: use screen::context_create

commit 838c5cfe56b2af6c644909bed3c5e7cdd64c336a
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:23:20 2010 +0000

    glx/xlib: simplify creation of trace-wrapped contexts

    Trace screen knows how to properly wrap context creation in the
    wrapped screen, so nothing special to do here.

commit c99404c03ebaec4175f08a2f363e43c9085f2635
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:18:24 2010 +0000

    st/python: no need to special case context creation for trace

commit 193a527a682b6877bb1faecd8092df4dfd055a18
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:15:30 2010 +0000

    drm/radeon: remove dead create_context declaration

commit bb984eecc25cf23bc77e1c818b81165ba1a07c9a
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:14:58 2010 +0000

    nv/drm: remove dead create_context ref

commit e809313a44287dc4e16c28e9e74ef3b2b5271aa1
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:12:51 2010 +0000

    st/egl: remove a layer of wrappers around screen::create_context

commit 39caa6672a04122f185c22e17aab86d1c40938bf
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:05:28 2010 +0000

    r300g: fill in screen::context_create

commit 407f12556d16ba0656774d8a1d9ebda22f82f473
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:04:04 2010 +0000

    cell: adapt for screen::create_context, untested

commit d02b0c6ce321a04c76fdabb09e0e4380ce1c1376
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 15:50:24 2010 +0000

    drm/nv: adapt for screen::create_context

    All contexts now created directly through the screen, so remove
    equivalent code here.

    Remove apparently un-needed array of contexts in the winsys.

commit 53eec5b1349aa1b6892a75a7bff7e7530957aeae
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 15:50:08 2010 +0000

    stw: adapt for screen::create_context, untested

commit c6a64de3eb381bc9a88e9fbdecbf87d77925aaf5
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 15:49:20 2010 +0000

    trace: expose the wrapped context's priv data

    If we are going to keep this priv idea, really want an accessor
    function for it so that trace and other drivers can wrap that.

commit 75d6104e11d86ec2b0749627ed58e35f856ee6eb
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 15:47:55 2010 +0000

    nv30: adapt to screen::context_create

commit 12f5deb6ed9723e9b5d34577052b8365813ca14e
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 15:44:47 2010 +0000

    nv40: adapt to screen::context_create

commit 14baccaa3b6bbb3b91056126f6521828e786dc62
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 15:35:27 2010 +0000

    nv50: adapt to screen::create_context

    Not build tested.  Need to figure out how to build nouveau.

commit a0e94505ccd2d7f3e604465a2ac302f1286b73b6
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 15:22:27 2010 +0000

    llvmpipe: update for screen::create_context, untested

commit 0eae17107c950346030e4f7e0ec232f868d3893d
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 15:16:57 2010 +0000

    xlib/llvmpipe: remove dead winsys context creation path

commit 2f69f9ffaa7e2a01d2483277246ed13051ae4ca3
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 14:58:27 2010 +0000

    gallium: convert most code to use screen::create_context

    I wish I could build all of gallium at once to find breakages.

commit d7b57f4061b82322cbcae176125913d9f0dea6c1
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 12:46:21 2010 +0000

    glx: permit building with older protocol headers

    I'd like to be able to build mesa on current distro releases without
    having to upgrade from the standard dri2proto and glproto headers.  With
    this change I'm able to build on ancient releases such as Ubuntu 9-10...

    In general, it would be nice to be able to build-test mesa to check for
    unintended breakages without having to follow the external dependencies
    of every group working on the codebase.

commit 57adedd6fb06c98572ed8d4aef19203df4c4eea2
Merge: da71847 e1906ae
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 11:38:15 2010 +0000

    Merge commit 'origin/master' into gallium-screen-context

    Conflicts:
    	src/gallium/drivers/softpipe/sp_video_context.h
    	src/gallium/drivers/trace/tr_context.c
    	src/gallium/state_trackers/wgl/shared/stw_context.c
    	src/gallium/winsys/gdi/gdi_softpipe_winsys.c

commit da71847ea6414d7e352c6094f8963bb4eda344dc
Author: José Fonseca <jfonseca@vmware.com>
Date:   Sat May 2 08:57:39 2009 +0100

    wgl: Use pipe_screen::context_create.

commit 2595a188f93fd903600ef5d8517737ee0592035d
Author: José Fonseca <jfonseca@vmware.com>
Date:   Sat May 2 08:56:47 2009 +0100

    trace: Implement pipe_screen::context_create.

commit f3640e4ae37a5260cbfba999d079f827de0a313a
Author: José Fonseca <jfonseca@vmware.com>
Date:   Sat May 2 08:56:17 2009 +0100

    softpipe: Implement pipe_screen::context_create.

commit 347266bddc8bd39c711bacb2193793759d0f3696
Author: José Fonseca <jfonseca@vmware.com>
Date:   Sat May 2 08:55:31 2009 +0100

    gallium: New pipe_screen::context_create callback.
2010-02-08 13:05:36 +00:00
Keith Whitwell
01923fb72d glx: permit building with older protocol headers
I'd like to be able to build mesa on current distro releases without
having to upgrade from the standard dri2proto and glproto headers.  With
this change I'm able to build on ancient releases such as Ubuntu 9-10...

In general, it would be nice to be able to build-test mesa to check for
unintended breakages without having to follow the external dependencies
of every group working on the codebase.

Seems to introduce no changes to the build of libglapi.a when tested against
new versions of the headers.
2010-02-08 13:05:35 +00:00
Joakim Sindholt
e891a9cc3a progs/demos: update .gitignore 2010-02-08 12:33:02 +01:00
Vinson Lee
7da1a528b8 progs/xdemos: Silence uninitialized variable warning. 2010-02-08 01:53:31 -08:00
Dave Airlie
eaf8fe657f radeon: fix UMS since stp addition.
UMS doesn't need the STP atom.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-08 17:18:02 +10:00
Pauli Nieminen
1a45c2bce7 mesa: Fix mesa_next_pow_two to return same value if parameter is pow2.
Without subtracting one pow2 value would be rounded up to next pow2
which is not correct behaviour for the function.
2010-02-07 13:13:24 +02:00
Pauli Nieminen
ce1f351963 r200: Fix LOD min/max emit.
Just emit minLod and maxLod to correct reisters.

Fixes lodclamp and levelclamp test cases from piglit.
2010-02-07 13:13:24 +02:00
Pauli Nieminen
0943706d35 r100/r200/r300/r600: Set MaxCombinedTextureImageunits.
Fixes glActiveTexture to set GL_INVALID_ENUM when trying
to activate texture unit that is not available.

piglit test case general/texunit passes now.
2010-02-07 13:13:23 +02:00
Pauli Nieminen
76a9831b2b r200: Fix lod bias correction.
glean/pointSprite shows that rv280 is trying to read from better
quality mipmap level. We have to correct default lod bias to match
required texture selection.
2010-02-07 13:13:23 +02:00
Vinson Lee
bfa877cdd3 llvmpipe: Silence GCC 'type qualifiers ignored on function return type' warnings. 2010-02-07 00:09:46 -08:00
Vinson Lee
4f3a023ba4 svga: Remove unnecessary header. 2010-02-07 00:05:02 -08:00
Vinson Lee
290487ce3c llvmpipe: Remove unnecessary headers. 2010-02-07 00:02:05 -08:00
Marek Olšák
5201e94801 r300g: cleanup XXXs in the DSA state 2010-02-06 23:25:29 -08:00
Marek Olšák
2f5fcce933 r300g: make a local copy of framebuffer state
The previous more direct approach was simply incorrect.

piglit/levelclamp passes again.
2010-02-06 23:25:29 -08:00
Marek Olšák
c8b34616b3 r300g: fix color channel masks
glean/maskedClear passes again.
2010-02-06 23:25:29 -08:00
Marek Olšák
93b9d91124 r300g: remove useless GA_COLOR_CONTROL emit
Already emitted in r300_emit_draw_xxx.
2010-02-06 23:25:29 -08:00
Marek Olšák
f02aec35e7 r300g: add L8_SRGB and A8L8_SRGB texture formats 2010-02-06 23:25:29 -08:00
Pauli Nieminen
198e810a20 r200: Add some debug output to texture function. 2010-02-06 19:25:14 +02:00
Pauli Nieminen
db3460e31c r300: Fix emit size prediction to know about primitive splitting.
Fixes ut2004 warnings about overflowing command buffer.
2010-02-06 19:25:13 +02:00
Pauli Nieminen
cdb0a51e8a radeon: Add some debug output to texture function.\n 2010-02-06 19:25:13 +02:00
Pauli Nieminen
e6f2819e7a radeon: Use _mesa_next_pow_two_32 instead of own implementation. 2010-02-06 19:25:13 +02:00
Pauli Nieminen
d41740e969 mesa/main: Add function to find next higher power of two.
With gcc implementation uses __builtin_clr which counts number of
leading zeros.

Fallback implementation uses bit manipulation. First it duplicates
the highest bit to all lower bits and then adds one to get the power
of two number.
2010-02-06 19:24:44 +02:00
Pauli Nieminen
f8969dd24f radeon: Add some debug output to miptree code. 2010-02-06 19:14:21 +02:00
Pauli Nieminen
9d5f882503 radeon: Remove the loop from stride size calculation.
Changed stride size calculation to do the math by rounding
the value instead of loop. r600 minimum stride is 256 which
might might cause up to about 60 rounds of the loop.
2010-02-06 19:14:20 +02:00
Alan Coopersmith
78572ebcb3 Gallium: Add Solaris atomic function definitions to u_atomic.h
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-02-06 08:54:44 -08:00
Damien Lespiau
fd2378e4b0 intel: Allow L8 PBO blit uploads.
Bug #32810
2010-02-06 16:43:58 +01:00
Eric Anholt
c8433af711 i965: Keep the CURBE BO mapped and memcpy instead of subdataing.
For the tiny bis of data we generally upload through the CURBEs, the
overhead of the kernel's pagetable trickery is actually rather high.
This improves cairo-gl gnome-terminal-vim performance by 3.8%.
2010-02-06 14:10:07 +01:00
Eric Anholt
3e498207d1 i965: Reset the "need new CURBE BO" flag when we make a new CURBE bo.
Improves cairo-gl gnome-terminal-vim times by 11%.
2010-02-06 14:10:07 +01:00
Eric Anholt
67e5fd7397 intel: Check aperture size when doing a blit glClear.
Fixes failure in cairo-gl firefox-planet-gnome.
2010-02-06 14:10:07 +01:00
Eric Anholt
12d0721ae1 intel: Allow PBO acceleration for GL_RGBA8 MESA_FORMAT_ARGB8888.
This improves firefox-talos-svg runtimes on cairo-gl by 14%.
2010-02-06 14:10:07 +01:00
Vinson Lee
507faae9e3 llvmpipe: Silence GCC 'no previous prototype' warning. 2010-02-06 00:48:18 -08:00
Vinson Lee
4e907e8bd6 i965g: Remove unnecessary headers. 2010-02-05 23:39:34 -08:00
Alan Coopersmith
8a985a988b eglplatform.h: recognize __unix as well for Solaris & other SVR4 platforms
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-02-05 19:38:16 -08:00
Zack Rusin
8109b6d313 gallium/python: support two more formats in retrace dumps
dump PIPE_FORMAT_R8G8B8A8_UNORM and PIPE_FORMAT_R16G16B16_SNORM formats.
2010-02-05 19:29:34 -05:00
Brian Paul
337d3b2b39 st/mesa: allow negative index for PROGRAM_STATE_VAR
The piglit vp-address-01 test uses negative address-relative
offsets.  In this test we're indexing into PROGRAM_STATE_VAR
which, in turn, contains references to ENV vars.

We previously fixed this issue for PROGRAM_CONSTANT.

piglit/vp-address-01 (the version from Feb 5) passes now.

(cherry picked from commit 64be837b0b)
2010-02-05 14:59:04 -07:00
Brian Paul
a636f5b4d0 mesa: debug output for ARL 2010-02-05 14:58:46 -07:00
Brian Paul
1a366701b8 docs: Fix a typo in mesa3d.org HTML.
Signed-off-by: Brian Paul <brianp@vmware.com>

(cherry picked from commit e6ee4b49c4)
2010-02-05 13:18:31 -07:00
Brian Paul
a199ccc272 osmesa: Add OSMesaColorClamp and OSMesaGetProcAddress to symbol defs.
Without this patch, the two symbols get an underscore prepended
and an "@4" appended when compiling with VC8.

Signed-off-by: Brian Paul <brianp@vmware.com>

(cherry picked from commit e65029e9b3)
2010-02-05 13:18:18 -07:00
Brian Paul
45ceabf794 progs/demos: fix typo 2010-02-05 13:16:39 -07:00
Kristian Høgsberg
077bc2fda2 egl_dri2: Use pkg-config cflags and libs from configure output
Running pkg-config in Makefiles is bad form, since it doesn't respect the
PKG_CONFIG_PATH value set at ./configure time.
2010-02-05 13:55:45 -05:00
Patrice Mandin
e423df0f0c nouveau: Fix warning for void function returning value. Add missing include for pipe_reference_init function.
Signed-off-by: Patrice Mandin <patmandin@gmail.com>
2010-02-05 19:42:33 +01:00
Kristian Høgsberg
da73c4d5fe glapi: Add back the reduced Noop dispatch
This got "simplified" away in e4f168a6f4.
2010-02-05 12:01:28 -05:00
Kristian Høgsberg
697e22146d glx: Don't mark the XF86DRI functions PUBLIC 2010-02-05 12:01:28 -05:00
Kristian Høgsberg
832f2d3c39 egl_dri2: Log both driver and core extensions 2010-02-05 12:01:28 -05:00
Kristian Høgsberg
9c94faeff1 egl_dri2: Audit and fix errors paths 2010-02-05 12:01:28 -05:00
Kristian Høgsberg
f27b4fadca egl_dri2: Just cast the pointer difference to an int 2010-02-05 12:01:27 -05:00
Brian Paul
f1d544d6a6 st/mesa: 'fix' point coord semantic info
This fixes the progs/glsl/pointcoord.c demo.  But this isn't a proper fix.
We really need a TGSI_SEMANTIC_POINT_COORD label so that the draw module
can determine which fragment input / vertex output slot needs to be set
up with the point coordinate info.  We've been using generic slot 0 so far.

This would also require telling the draw module about fragment shaders
(something it doesn't have at this time).
2010-02-05 10:00:00 -07:00
Brian Paul
cea2b8d656 tgsi: remove special-case code for fragment position
Since the origin_lower_left / pixel_center_origin changes, we need
to use the fragcoord info that's set up in setup_fragcoord_coeff().
The code in exec_declaration() was clobbering the the interpolated
fragment position.

Fixes progs/glsl/fragcoord.c demo.
2010-02-05 10:00:00 -07:00
Chris Li
476b668ccc allow make to build lp_test_* for llvmpipe
Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-02-05 15:34:28 +00:00
José Fonseca
ad60552ca1 llvmpipe: Disable multithreading on windows. 2010-02-05 13:56:01 +00:00
José Fonseca
e95e5caee6 os: Don't assert on missing implementation of barrier init/destroy. Just usage. 2010-02-05 13:54:21 +00:00
José Fonseca
8eda504203 Merge remote branch 'origin/master' 2010-02-05 13:50:24 +00:00
José Fonseca
a1af8eec66 Merge remote branch 'origin/lp-binning'
Conflicts:
	src/gallium/auxiliary/util/u_dl.c
	src/gallium/auxiliary/util/u_time.h
	src/gallium/drivers/llvmpipe/lp_state_derived.c
	src/gallium/drivers/llvmpipe/lp_state_surface.c
	src/gallium/drivers/llvmpipe/lp_tex_cache.c
	src/gallium/drivers/llvmpipe/lp_tile_cache.c
2010-02-05 13:48:35 +00:00
Pauli Nieminen
6785a8aaf4 r200: Optimize polygon stipple emit.
Only emit polygon stipple when the state is enabled.
2010-02-05 15:26:19 +02:00
Pauli Nieminen
05b0408489 r200: Add trace logging to r200PointSize. 2010-02-05 15:26:19 +02:00
Keith Whitwell
c036d13d7d Merge commit 'fj/mesa-next' 2010-02-05 09:50:21 +00:00
Pauli Nieminen
69f20294cd r100: Add the polygon stipple state to the state list.
This fixes glean paths test case.
2010-02-05 11:31:24 +02:00
Chia-I Wu
4f47684f75 egl: Add debug messages to config validation and matching.
It might be desirable find out which attribute went wrong.
2010-02-05 14:19:54 +08:00
Chia-I Wu
a37dc17c12 egl: Clean up eglconfig.h.
Update the comments to macros/functions.  Remove unused
_eglSetConfigAttrib.
2010-02-05 13:42:02 +08:00
Chia-I Wu
1b2b08c5f3 docs: Update the developer section of egl.html.
Mainly to add a subsection about EGL_RENDER_BUFFER.
2010-02-05 12:48:49 +08:00
Chia-I Wu
5f08eff2a7 egl: Remove egl_xdri.
egl_xdri steals code from src/glx/x11/.  This makes it broken from time
to time when there is a bigger change to the GLX code.  As egl_dri2 has
been merged, which also functions as a DRI2 driver loader, remove
egl_xdri for good.
2010-02-05 12:48:49 +08:00
Chia-I Wu
cb260e1d18 egl: Update the comments to typecast macros.
Put a note that the macros define functions and should not be ended with
a semicolon when used.
2010-02-05 11:45:01 +08:00
Chia-I Wu
a35e63382e egl_dri2: Use _EGL_DRIVER_STANDARD_TYPECASTS.
It saves the driver from defining the boring typecasts itself.
2010-02-05 11:45:01 +08:00
Chia-I Wu
b31255fbfd egl: Clarify IsLinked and IsBound.
Both a link and a binding creates a reference to the resource.  Drivers
should not destroy the resource when there is a reference.  The
difference is better described in doc/egl.html.
2010-02-05 11:45:01 +08:00
Chia-I Wu
fc5ca85a63 egl_dri2: Do not destroy linked resources.
A linked resource is stil owned by the display.
2010-02-05 11:45:01 +08:00
Chia-I Wu
7e7c1ba40b egl_dri2: Fix a snprintf warning.
The subtraction between two pointers has type unsigned int (only on
x86-64?), while the format string expects an int.
2010-02-05 11:44:49 +08:00
Chia-I Wu
8d411c9a12 egl_dri2: Add a debug print for DRI2 extensions. 2010-02-05 11:44:16 +08:00
Chia-I Wu
2eb7a2fccd configure.ac: Check for xcb-dri2 to enable EGL dri2 driver.
Check that xcb-dri2 is available before including EGL dri2 driver into
EGL_DRIVERS_DIRS.
2010-02-05 11:43:54 +08:00
Kristian Høgsberg
c6e830c393 egl: Implement eglCopyBuffers for DRI2, make pixmap and pbuffers actually work 2010-02-04 21:50:23 -05:00
Brian Paul
4ac9c80e5b mesa: change ctx->Driver.ProgramStringNotify() to return GLboolean
GL_TRUE indicates that the driver accepts the program.
GL_FALSE indicates the program can't be compiled/translated by the
driver for some reason (too many resources used, etc).

Propogate this result up to the GL API: set GL_INVALID_OPERATION
error if glProgramString() was called.  Set shader program link
status to GL_FALSE if glLinkProgram() was called.

At this point, drivers still don't do any program checking and
always return GL_TRUE.
2010-02-04 16:53:27 -07:00
Pauli Nieminen
0f763c5b00 r200: Add the polygon stipple state to the state list.
This fixes glean paths test case.
2010-02-04 23:59:21 +02:00
Pauli Nieminen
77768cdd73 r200: Add logging for glPolygonStripple. 2010-02-04 23:59:20 +02:00
Pauli Nieminen
66229ea184 radeon: Make debugging automaticaly increase logging verbosity for debug build.
DEBUG preprocessor macro is set by configure script when
--enable-debug is passed for configure. Radeon then just
increase debugging verbosity if DEBUG is set in compile
time.
2010-02-04 23:59:20 +02:00
Francisco Jerez
5b6b67eb3f Nuke the nv0x-nv2x gallium pipe drivers. 2010-02-04 22:15:22 +01:00
Francisco Jerez
bfb5dc68fc Import a classic DRI driver for nv0x-nv2x. 2010-02-04 22:14:39 +01:00
Roland Scheidegger
68f93ea3eb gallium: add point_quad_rasterization bit to rasterizer state
This determines if points should be rasterized according to GL point rules
or as normal quads (GL point sprites / d3d points / d3d point sprites).
2010-02-04 21:35:28 +01:00
Kristian Høgsberg
42fa009e64 egl: Add driver for EGL on X with DRI2 2010-02-04 15:03:45 -05:00
José Fonseca
7b6fa78d86 scons: Eliminate mixed space/tabs. 2010-02-04 19:37:56 +00:00
José Fonseca
9f151f93e6 scons: Only override scons CC selection in the embedded platform. 2010-02-04 19:37:30 +00:00
José Fonseca
838d9884be trace: util_stream -> os_stream 2010-02-04 18:45:25 +00:00
José Fonseca
c75d64490e auxiliary: util_stream -> os_stream 2010-02-04 18:44:51 +00:00
José Fonseca
0eb8e77ffb os: Ensure header includes are outside extern "C" {}. 2010-02-04 18:24:57 +00:00
José Fonseca
5ee324ad3c util: Reimplement u_time on top of os_time. 2010-02-04 18:24:36 +00:00
José Fonseca
b7b7ea9532 gallium: Add a define for deprecated function attribute. 2010-02-04 18:24:17 +00:00
José Fonseca
2ef6d311b7 os: Time abstractions.
Simplified version of u_time.[ch]
2010-02-04 18:23:49 +00:00
Roland Scheidegger
2c326e7266 gallium: add point size clamp to implementation limits in vertex shader
The point size min/max registers (unused by mesa state tracker) were removed
since most hardware couldn't do much with them. However, we don't want to have
to rely on hw to do point size clamping correctly to implementation
dependent limits, hence have to do that in the vertex shader. This should also
solve a potential problem with (non-AA) points smaller than 1.0 which according
to OGL still have size 1.0.
Note that OGL point rendering is odd, in particular point sprites are rasterized
differently to points. Some hardware might support those different modes, but in
any case the different clamping values used for smooth/multisampled/sprite
enabled points might help a bit for hw which rasterizes points the same as point
sprites.
Also tweak mesa's ff to vertex shader translation so don't have to clamp twice in
case of point attenuation.
2010-02-04 19:23:09 +01:00
José Fonseca
24ea02553e os/os_memory_aligned.h: fix memory allocation alignment for 64 bits
Based on Andreia Gaita <shana@jitted.com>'s patch.
2010-02-04 18:07:22 +00:00
Brian Paul
3aba0a2875 i965g: include u_inlines.h 2010-02-04 10:07:08 -07:00
Alex Deucher
339d42b4e6 r600: reduce number of cache flushes
We don't need to flush so often. Next step
would be to move the flushing to the drm and only
flush after each command buffer rather than each
draw.
2010-02-04 10:46:36 -05:00
José Fonseca
f769ab0fa6 util: Disable u_time.c implementation for embedded.
This needs to go into OS module.
2010-02-04 14:39:30 +00:00
José Fonseca
d015dfb45a trace: Use u_time. 2010-02-04 14:39:30 +00:00
José Fonseca
47a080df15 gallium: Don't try to auto-detect the OS when embedded os is already pre-defined. 2010-02-04 14:39:30 +00:00
José Fonseca
9cd2abdf8b llvmpipe: Disable unit tests on embedded platforms. 2010-02-04 14:39:30 +00:00
José Fonseca
5cf88a4787 scons: Promote EMBEDDED from subsystem to full os. 2010-02-04 14:39:30 +00:00
José Fonseca
063f1238d1 util: Add missing include. 2010-02-04 14:39:30 +00:00
José Fonseca
1207098dee os: Add missing dummy threading definitions. 2010-02-04 14:39:30 +00:00
Pauli Nieminen
f1b07f0220 swrast/sse: Fix _mesa_sse_transform_pointsX_3d_no_rot
PXOR user in code were causing the lowest SP float register to have NaN
values which made all math operations in that slot fail. Correct istruction
to clear float registers is XORPS which handles single precission floats
correctly.

Fixes progs/tests/fog in swrast SSE mode.

Now the correct commit instead of 66d09e4a2a which is not even close
of correct fix for the bug.
2010-02-04 13:13:52 +02:00
José Fonseca
5a743d9c51 scons: Have MinGW target MSVCRT 7.0
Necessary for _aligned_malloc/free().
2010-02-04 10:38:35 +00:00
José Fonseca
ef67ad05cb scons: Use only the shared object name when linking progs.
Otherwise the whole path gets baked into the executable.
2010-02-04 09:23:30 +00:00
Vinson Lee
7713069ae3 st/mesa: Remove unnecessary headers. 2010-02-03 22:57:38 -08:00
Vinson Lee
d1487dcb20 svga: Remove unnecessary header. 2010-02-03 22:44:50 -08:00
Vinson Lee
c28dd492cd util: Remove unnecessary header. 2010-02-03 22:42:02 -08:00
Chia-I Wu
9a3de505dc egl: Convert drivers to use typecast macros.
Use macros to define the standard typecasts.  This saves lots of
typings.
2010-02-04 14:36:48 +08:00
Chia-I Wu
bdb9e202de egl: Add macros to define typecast functions.
There are standard typecast functions that are common to most drivers.
They are used to typecast, for example, an _EGLSurface to a
driver-defined type.

This commits define _EGL_DRIVER_STANDARD_TYPECASTS and
_EGL_DRIVER_TYPECAST that should hopefully save some typings for driver
writers.
2010-02-04 14:36:48 +08:00
Vinson Lee
23b597cb6c identity: Remove unnecessary header. 2010-02-03 22:36:10 -08:00
Vinson Lee
18e00e5863 llvmpipe: Remove unnecessary header. 2010-02-03 22:33:58 -08:00
Pauli Nieminen
66d09e4a2a Revert "mesa: fix transform_points_3d_no_rot using undefined values in %xmm0"
This reverts commit 4c31632817.
2010-02-04 04:58:55 +02:00
Chia-I Wu
997316838d st/egl: Add missing headers to kms display.
Add stdio.h and util/u_inlines.h to native_kms.c.
2010-02-04 10:50:22 +08:00
Vinson Lee
4d01e8e26f st/egl: Add missing headers. 2010-02-03 18:36:07 -08:00
Vinson Lee
821b3e2302 winsys: Add missing headers. 2010-02-03 18:29:18 -08:00
Igor Oliveira
f225042a86 egl: fix implicit declaration of pipe_texture_reference adding u_inlines.h 2010-02-04 10:10:17 +08:00
Igor Oliveira
88af76ce94 egl: fix wrong argument. Use loader_data instead of loader 2010-02-04 10:09:37 +08:00
Dave Airlie
3584a44270 gallium: fix more missing includes from various places
nouveau/ dri st / vmware
2010-02-04 10:52:43 +10:00
Dave Airlie
adf4c1ae10 nouveau: include stdio.h and u_inlines.h in all context files since embedded changes
fixes nouveau build for me.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-04 10:03:39 +10:00
Brian Paul
b2a30497cc mesa: increase number of texture units to MAX_COMBINED_TEXTURE_IMAGE_UNITS
We were misinterpretting GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS previously.

It's the number of texture units for which we need to keep state; not
just the total number of texture units addressable by the vertex shader
plus fragment shader.

Since sw Mesa independently supports 16 texture units in vertex shaders
and 16 texture units in fragment shaders, the max combined units is 32.

Note that the docs for glActiveTexture() indicate the max legal unit is
MAX(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, MAX_TEXTURE_COORDS) - 1.

A new piglit test (texunits.c) tests the various texture unit limits.

I'm pretty sure I've got this all right now, but additional reviews
are welcome...
2010-02-03 15:48:42 -07:00
Brian Paul
ea81daf954 mesa: re-dimension RasterTexCoords and CoordReplace
These are limited to the number of texture coordinate units.
2010-02-03 15:48:42 -07:00
Brian Paul
89c8ff3382 mesa: added texcoord unit assertion 2010-02-03 15:48:42 -07:00
Brian Paul
82a2d3564a mesa: use Elements() instead of MAX_TEXTURE_COORD_UNITS 2010-02-03 15:48:42 -07:00
Brian Paul
a32e7c487c mesa: added tex unit assert, use Elements() macro 2010-02-03 15:48:42 -07:00
Brian Paul
cd130b0319 mesa: check for invalid texture coord unit in glGet queries 2010-02-03 15:48:42 -07:00
Brian Paul
60527ff32a mesa: check/clamp texture/program matrix accesses
Further testing should reveal if any these assertions are hit...
2010-02-03 15:48:42 -07:00
Brian Paul
d82c371344 mesa: add error check for querying invalid texture matrix 2010-02-03 15:48:42 -07:00
Brian Paul
a06575aed6 mesa: use Elements() as limit in loops over texture/program matrix stacks 2010-02-03 15:48:42 -07:00
Brian Paul
376ae23c3a mesa: add out of bounds assertions for accessing texture matrix stack 2010-02-03 15:48:41 -07:00
José Fonseca
7bd949734c util: Cast to match the MSVC intrinsics.
The cast is not optional in C++.
2010-02-03 22:16:39 +00:00
José Fonseca
e0da333d6b util: Don't include system headers inside extern "C" { ... }
That breaks when some of the system headers have C++ code.
2010-02-03 22:15:53 +00:00
José Fonseca
45dac0d82a Merge branch 'gallium-embedded' 2010-02-03 18:54:13 +00:00
Roland Scheidegger
8091e73cc2 docs: clean up TGSI_SEMANTIC_PSIZE description
there was some confusion between point size state and point size output.
2010-02-03 18:27:32 +01:00
Roland Scheidegger
c2b85e335d docs: fix point sprite documentation 2010-02-03 17:39:47 +01:00
Roland Scheidegger
4a4daa75a8 gallium: clean up point sprite rasterizer state
Don't need sprite coord origin per coord.
Also, don't need separate sprite enable bit - if all coords have it diabled,
then there are no point sprites (technically, there's a distinction in pre-GL3,
but it only differs in having more leniency in clamping to max size, something
the state tracker would need to handle and the hardware won't bother anyway).
Also, use packed field for the per-coord enables.
All in all, should save 3 dwords in rasterizer state (from 10 down to 7).
2010-02-03 17:25:14 +01:00
José Fonseca
976afaf98f gallium/docs: Document the OS module. 2010-02-03 15:56:36 +00:00
Brian Paul
f8d824e09a tgsi: added debugging code to catch divide by zero 2010-02-03 08:50:32 -07:00
Brian Paul
9ca6cf0f54 tgsi: convert CHECK_INF_OR_NAN to inline function
And disable with if (0).  Inf/NaN can occur normally during program
execution.  Only enable the check code when needed during debugging.
2010-02-03 08:47:09 -07:00
Francisco Jerez
2ec50d256d mesa: Factor out the fb initialization details from _mesa_new_framebuffer.
This should make things easier for drivers wanting to work with a
"subclass" of gl_framebuffer.

The complementary "_mesa_initialize_framebuffer" function is now
called "_mesa_initialize_window_framebuffer" for the sake of
symmetry.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-02-03 08:30:09 -07:00
José Fonseca
b724694f3a os: Also add the aligned memory prototypes to the embedded section. 2010-02-03 12:57:49 +00:00
José Fonseca
6b424a0550 util: Reimplement all utility functions in terms of the new OS abstraction. 2010-02-03 12:13:06 +00:00
José Fonseca
0b0e705712 os: New OS abstraction module. 2010-02-03 12:11:58 +00:00
Keith Whitwell
64da2aeebc vbo: fix void * arithmetic warning 2010-02-03 11:52:14 +00:00
Francisco Jerez
db0eb3a437 vbo: Fix up in-place splitting for non-contiguous/indexed primitives.
The in-place splitting code wasn't dealing with index buffers at all
(and it was being called from vbo_split_prims for too big index
buffers, causing some occasional corruption).

Additionally, it wasn't taking into account primitives arrays with
non-contiguous indices (e.g. given prim[0].start = 0 and prim[1].start
= max_verts, it would happily call back the driver with (max_index -
min_index) still greater than max_verts, causing infinite recursion).

It still doesn't handle too large indexed vertex buffers: use
vbo_split_copy for that.
2010-02-03 11:38:38 +00:00
José Fonseca
630c375fe9 trace: Include the appropriate header instead of defining prototypes.
Avoids header when the header was included before.
2010-02-03 11:06:23 +00:00
Keith Whitwell
9f1ee5a864 progs/fpglsl: couple more tests 2010-02-03 10:36:55 +00:00
Keith Whitwell
d7b1610ced progs/fpglsl: fp-tris for glsl 2010-02-03 10:36:55 +00:00
Keith Whitwell
84d41f3c7f svga: fix TXD and TXL opcode translation 2010-02-03 10:36:55 +00:00
Keith Whitwell
0748fc4f03 svga: deriv insns not valid in dynamic flow control either 2010-02-03 10:36:55 +00:00
Keith Whitwell
a9cdae2ae0 svga: texture from lod zero inside dynamic branching
Texture derivatives are potentially undefined inside dynamic branches,
so hardwire lod zero in this case.  Treating all if/endif and loop
constructs as dynamic branches.
2010-02-03 10:36:55 +00:00
Keith Whitwell
fc3efccdc6 svga: better method for generating white fs color outputs 2010-02-03 10:36:55 +00:00
Keith Whitwell
9b23e1f9a3 mesa/st: bump the gallium version number
This is a very informal version number, but there have been enough
changes that a bump is appropriate at this time.
2010-02-03 10:36:55 +00:00
Keith Whitwell
aac76dcea9 st/mesa: remove some floating point divides in viewport calculation
Compiler can't usually turn x/2.0f into x * 0.5f, though we're happy
with either.
2010-02-03 10:36:55 +00:00
José Fonseca
bd03025621 gallium-docs: Fix typo. 2010-02-03 09:04:46 +00:00
Dave Airlie
f9d734c309 r300: fix compiler bugs introduced with MRT changes.
the first looks like a definite bug, the second I'm not so confident
of but it works.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-03 18:58:11 +10:00
Chia-I Wu
0d089cbb48 egl: Rename _eglPreloadForEach callbacks.
Rename _eglPreloadFile to _eglLoaderFile, and _eglPreloadFile to
_eglLoaderFile.  There are several _eglPreload* functions.  The
callbacks do not belong to them and it should be better to give them a
different prefix.
2010-02-03 14:16:16 +08:00
Chia-I Wu
8e6a964411 egl: Fix a potential segfault in driver suffix matching.
The driver suffix might be NULL on some platforms.  Perform the matching
only when there is a suffix.
2010-02-03 14:16:16 +08:00
Chia-I Wu
2287f4c52a egl: Remove unnecessary #ifdef's.
There were some refactorings with the addition of EGL_DRIVERS_PATH.
They made some platform #ifdef's unnecessary.
2010-02-03 14:16:15 +08:00
Chia-I Wu
6fd8b6a9e2 egl: Ignore certain environment variables when setuid/setgid.
Specifically, ignore EGL_DRIVERS_PATH when an application is
setuid/setgid.  And ignore EGL_DRIVER when there is a slash in it.
2010-02-03 14:16:15 +08:00
Chia-I Wu
5d8646c41f egl: Add EGL_DRIVERS_PATH environment variable.
EGL_DRIVERS_PATH gives a list of colon-separated directories.  The given
directories will be searched when preloading drivers.

This is based on Mike Stroyan's patch, which honors the variable in
_eglPreloadDisplayDrivers.  It is extended to honor the variable also in
_eglPreloadUserDriver and _eglPreloadDefaultDriver in this version.
2010-02-03 14:16:15 +08:00
Brian Paul
6f2e9651a1 draw: remove old hard-coded shader length limits 2010-02-02 21:34:06 -07:00
Brian Paul
439036739d tgsi: added tgsi_alloc_tokens() 2010-02-02 21:23:23 -07:00
Brian Paul
c173eb990a draw: re-implement free_bit() with ffs() 2010-02-02 21:17:56 -07:00
Brian Paul
3d5e26ebec draw: comments and var renaming 2010-02-02 21:16:25 -07:00
Brian Paul
5670b44f82 tgsi: fix comment 2010-02-02 18:54:53 -07:00
Brian Paul
256f7f5ab2 draw: add const qualifiers, fix return types 2010-02-02 18:54:53 -07:00
Brian Paul
d6e55520e4 softpipe: remove unnecessary #include 2010-02-02 18:54:53 -07:00
Brian Paul
c740a7da61 draw: new, updated comments
Try to avoid future confusion between different, but similar functions.
2010-02-02 18:54:53 -07:00
Brian Paul
60b815604e llvmpipe: fix (potentially) broken AA points, AA lines
This patch duplicates the softpipe fix seen in the preceeding commit.
2010-02-02 18:54:53 -07:00
Brian Paul
54d7ec8e76 softpipe: fix broken AA points, AA lines
This fixes a regression when the geometry shaders branch was merged
to master with commit 89d8577fb3.

progs/demos/pointblast and progs/redbook/anti work again.
2010-02-02 18:54:53 -07:00
Corbin Simpson
797dcc04e5 gallium/docs: Opcode refs.
There is a very real possibility that I may be enjoying this too much.
2010-02-02 17:07:26 -08:00
Corbin Simpson
17c2a44761 gallium/docs: TGSI notes on replication to dst, and also cleanups.
Slowly, surely, I'm making this better.
2010-02-02 17:03:42 -08:00
Corbin Simpson
62ca7b85ae gallium/docs: Start turning notes into docs.
Yeah, what's that? You can read it? It's got, hmm, *readability*? Nice,
ain't it. :3
2010-02-02 17:03:41 -08:00
Corbin Simpson
8580522b14 gallium/docs: Add opcode formatting. 2010-02-02 17:03:41 -08:00
Brian Paul
3e572eb25e gallium/docs: default Z texture tuple is (z,z,z,1) for OpenGL 2010-02-02 16:27:07 -07:00
Brian Paul
3a3d8fb72e gallium/docs: s/convensions/conventions/ 2010-02-02 16:20:26 -07:00
Corbin Simpson
95dad1fa1c r300g: Texture format cleanups, per docs.
texenv is perfect now.
2010-02-02 13:03:31 -08:00
José Fonseca
aa8b49c9ca gallium: Move some compiler portability stuff into p_compiler.h 2010-02-02 20:55:08 +00:00
Corbin Simpson
516e7159ae gallium/docs: Did somebody call for a table? 2010-02-02 12:44:22 -08:00
Scott Moreau
3fedfc7128 Track frag shader changes introduced by commit 4769566500
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com>
2010-02-02 11:52:17 -08:00
José Fonseca
25357696c3 gallium: Move deprecated pipe/internal/p_winsys_screen.h inside util/u_simple_screen.h 2010-02-02 16:09:56 +00:00
Francisco Jerez
88593fff49 mesa: Add a BITSET_FFS function.
It will be useful for the nouveau DRI driver and IMHO there's no
reason to keep it private.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-02-02 08:53:57 -07:00
José Fonseca
2aaca1df9d gallium: Move p_thread.h and p_atomic.h out of gallium interfaces.
Into os/os_thread.h and util/u_atomic.h respectively.
2010-02-02 15:18:01 +00:00
Brian Paul
4778f46bb5 gallium/docs: table of texture formats and (x,y,z,w) tuples returned by TEX
Maybe someone can convert this into a real table instead of just
preformatted text.
2010-02-02 08:14:43 -07:00
José Fonseca
38f6f23fcf gallium: Make pipe_atomic a regular int32_t. 2010-02-02 14:43:48 +00:00
José Fonseca
28486880ca gallium: pipe/p_inlines.h -> util/u_inlines.h 2010-02-02 14:42:17 +00:00
Corbin Simpson
4fea39721d r300compiler: Add MRT number to debugging output. 2010-02-02 04:53:13 -08:00
Corbin Simpson
4769566500 r300compiler, r300 classic, r300g: Add support for MRTs in the frag shader.
This maybe breaks the vert compiler. Hopefully not.
2010-02-02 04:53:12 -08:00
Michal Krol
ad83f3bf0a tgsi: ureg_DECL_gs_input() accepts shader semantics. 2010-02-02 10:42:13 +01:00
Igor Oliveira
301a9437cc vega: implement tgsi_ureg shaders cache 2010-02-02 00:21:56 -05:00
Igor Oliveira
231d5457b2 vega: change tgsi asm by tgsi_ureg 2010-02-02 00:21:52 -05:00
Pauli Nieminen
edad20fff1 r200: Fix EXT_fogcoord rendering.
The fogcoord calue was not pushed to GPU because of implicit float to int conversion.
Fix is to use float pointer to buffer object so no conversion is done in assigment
2010-02-02 05:53:13 +02:00
Corbin Simpson
565f0cef26 r300g: Fix funky segfault. 2010-02-01 19:48:24 -08:00
Chia-I Wu
01dcadab8b st/egl: Wrong context might be used in eglBindTexImage.
If the pbuffer surface is current, gctx is set to the current context.
Make sure it is set to OpenGL ES 1 context again before binding.
2010-02-02 11:35:11 +08:00
Chia-I Wu
7fc35811c4 docs: Update for EGL environment variables.
Mention that EGL_DRIVER should be a full path, and add a link from
envvars.html to egl.html.
2010-02-02 11:06:29 +08:00
Chia-I Wu
5fa4ea2934 progs/es2: Fix an assertion failure in tri.
EGL_SURFACE_TYPE is a config attribute, not a surface attribute.  Thanks
to Mike Stroyan for pointing out this error.
2010-02-02 10:45:00 +08:00
Brian Paul
bdf975e9ad st/mesa: fix texture deallocation bug
This fixes a bug reported by Christoph Bumiller on mesa3d-dev.

When a texture is first created as RGBA, then re-defined with
glTexImage(internalFormat=GL_DEPTH_COMPONENT) we failed to deallocate
the original texture.  When this texture was bound as a FBO surface,
the depth/Z surface format was RGBA instead of Z.  Depending on the
driver this led to a failed assertion or FBO validation failure.

This patch does three things:

1. Remove ancient code that mysteriously tested if we were replacing
the smallest mipmap level and tested if the texture was not a cube map
texture.  I can't see any reason for those tests.

2. Move the width=height=depth=0 test to after the code which frees
texture data.  Calling glTexImage with width=height=depth=0 and data=NULL
is a way to free a single mipmap level.

3. Update the code comments.

There are no apparent conform, glean or piglit regressions from this change.

(cherry picked from commit 43e4b58422)
2010-02-01 19:04:16 -07:00
Brian Paul
04b14e26a2 progs/tests: add another FBO test to exercise a RGBA vs. Z texture bug
See comments in file for more details.
2010-02-01 19:02:52 -07:00
Brian Paul
a2ddb3d209 mesa: change _mesa_find_free_register() to find multiple free regs
Before, _mesa_find_free_register() would scan the given shader to
find a free/unused register of the given type.  But subsequent calls
would return the same register again.  This caused a failure in the
_mesa_remove_output_reads() function which sometimes needs several
free temps.

Now use a new function which build a vector of 'used' flags and another
function which searches that vector for an unused register starting at
a position that's incremented for each call.

Fixes fd.o bug 26317.  Note that a regression test for this has been
added to the glean/glsl1 test.

(cherry picked from commit e0d01c9d7f)
2010-02-01 18:00:12 -07:00
Corbin Simpson
9a1bf52c18 r300g: Inline immediates where possible.
Oh look, more gears. Seems to work just fine though.
2010-02-01 12:48:33 -08:00
Keith Whitwell
e1906ae98e st/mesa: remove duplicate calculation of fp input mapping
This was being calculated the same way in two different places.
Now just do it in st_translate_fragment_program().
2010-02-01 20:42:34 +00:00
Keith Whitwell
d51b04320d st/mesa: remove dead stfp input_map array
Was being calculated and not used.  Also was probably incorrect...
2010-02-01 20:33:53 +00:00
Brian Paul
12ffee5d58 mesa: added _mesa_print_vp/p_inputs() functions (debug aids) 2010-02-01 13:12:53 -07:00
Brian Paul
04c3888cb6 glslcompiler: add glapi_nop.o to OBJECTS 2010-02-01 13:07:07 -07:00
José Fonseca
57839d11ff gallium: Use MSVC atomic intrinsics directly instead of the Windows header wrappers. 2010-02-01 16:12:44 +00:00
José Fonseca
1776e738fb gallium: Remove unnecessary includes. Add others to compensate. 2010-02-01 16:11:46 +00:00
José Fonseca
b232b68cdc mesa: Add missing includes. 2010-02-01 15:12:20 +00:00
José Fonseca
854627387d llvmpipe: Add missing includes. 2010-02-01 15:11:34 +00:00
José Fonseca
f6cecbb361 i915: Add missing includes. 2010-02-01 15:11:18 +00:00
José Fonseca
ad9cc55bed util: Add missing includes. 2010-02-01 15:11:06 +00:00
José Fonseca
06f198285d draw: Add missing includes. 2010-02-01 15:10:51 +00:00
José Fonseca
7827bc73c7 gallium: Drop mutex-based pipe_atomic implementation.
First step to severe the dependency in OS abstractions from the Gallium
interfaces.
2010-02-01 14:23:36 +00:00
Vinson Lee
5cc20a06b0 mesa: Remove unnecessary headers. 2010-02-01 00:43:33 -08:00
Vinson Lee
e3a99e8522 glx: Remove unnecessary headers. 2010-02-01 00:22:50 -08:00
Vinson Lee
12f66b6dc9 st/dri: Remove duplicate type qualifier. 2010-01-31 23:52:48 -08:00
Vinson Lee
dfd76c0044 i965g: Add missing va_end. 2010-01-31 23:47:07 -08:00
Vinson Lee
2de590eacd r300g: Fix memory leak on memory allocation failure. 2010-01-31 22:38:25 -08:00
Vinson Lee
0df64f4bac r600: Remove duplicate assignment. 2010-01-31 22:33:01 -08:00
Vinson Lee
19af9ea792 egl: Remove unnecessary headers. 2010-01-31 21:56:53 -08:00
Marcin Kościelnicki
de917c1c61 nv04: Update to new nouveau_class.h
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-02-01 01:30:19 +01:00
Marcin Slusarz
112def3c17 nv50/nv40/nv30: fix small memory leak of nouveau_resources on screen_destroy
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-02-01 01:28:06 +01:00
Francisco Jerez
71b32cc838 nv10, nv20: Fix build. 2010-02-01 01:26:36 +01:00
Chia-I Wu
eb961f81d5 egl: Clean up surface attributes.
Add missing attributes and use correct types in _EGLSurface.  Remove
ifdef tests that serve no purpose.  Update _eglQuerySurface and
_eglSurfaceAttrib for missing queries and checks.
2010-01-31 22:21:26 +08:00
Chia-I Wu
0135e5d6c8 egl: Add support for more EGLImage extensions to EGL core.
Add support EGL_KHR_vg_parent_image and EGL_KHR_gl_*.  This is as simple
as adding some flags that can be enabled.  Individual drivers need to
implement the extensions before enbaling the flags.
2010-01-31 22:20:42 +08:00
Vinson Lee
f8f2520e88 st/mesa: Remove unnecessary headers. 2010-01-31 02:34:51 -08:00
Vinson Lee
980fa564e4 mesa: Remove unnecessary headers. 2010-01-31 02:30:12 -08:00
Vinson Lee
c8f781e0ad i965: Silence uninitialized variable warning. 2010-01-31 00:44:57 -08:00
Vinson Lee
d36e90f580 r300g: Silence uninitialized variable warning. 2010-01-30 22:50:35 -08:00
Chia-I Wu
bbdce27649 egl: Surface type validaction should depend on extensions supported.
EGL_SCREEN_BIT_MESA is a valid bit only when EGL_MESA_screen_surface is
supported.
2010-01-31 14:46:15 +08:00
Chia-I Wu
216925ccd1 egl: Initialize display configs with the display.
This changes _eglInitConfig to take the display as its argument.
2010-01-31 14:46:14 +08:00
Chia-I Wu
d69242be55 egl: Initialize display resources with their display.
Change _eglInitSurface, _eglInitContext, and _eglInitImage to take an
_EGLDisplay instead of an _EGLDriver.  This is a more natural form, and
plus, the display encodes information such as the extensions supported
that might be required for attribute list parsing.
2010-01-31 14:46:14 +08:00
Chia-I Wu
e694ccad80 egl: Refactor _eglInitImage.
Refactor attribute list parsing code to _eglParseImageAttribList.
2010-01-31 14:46:14 +08:00
Chia-I Wu
caa5c8dfe8 egl: Refactor _eglInitContext.
Refactor attribute list parsing code to _eglParseContextAttribList.  Add
a check to make sure the config supports the client API.
2010-01-31 14:46:14 +08:00
Chia-I Wu
6f1529293f egl: Refactor _eglInitSurface.
Refactor attribute list parsing code to _eglParseSurfaceAttribList.
2010-01-31 14:46:13 +08:00
Vinson Lee
5ad488908b i915: Set bit field of length 1 light_twoside to unsigned. 2010-01-30 22:36:54 -08:00
Vinson Lee
bc783f3d38 glut: Remove unnecessary headers. 2010-01-30 22:24:34 -08:00
José Fonseca
bee9964b29 Merge remote branch 'origin/master' into lp-binning
Conflicts:
	Makefile
	src/gallium/auxiliary/util/u_surface.c
	src/gallium/drivers/llvmpipe/lp_flush.c
	src/gallium/drivers/llvmpipe/lp_setup.c
	src/gallium/drivers/llvmpipe/lp_state_derived.c
	src/gallium/drivers/llvmpipe/lp_state_fs.c
	src/gallium/drivers/llvmpipe/lp_state_surface.c
	src/gallium/drivers/llvmpipe/lp_tex_cache.c
	src/gallium/drivers/llvmpipe/lp_texture.c
	src/gallium/drivers/llvmpipe/lp_tile_cache.c
	src/mesa/state_tracker/st_cb_condrender.c
2010-01-31 05:36:33 +00:00
Vinson Lee
8a2cf4549a radeon: Remove unnecessary headers. 2010-01-30 21:32:09 -08:00
Vinson Lee
1a0d1fa36d r600: Remove unnecessary headers. 2010-01-30 21:11:04 -08:00
Vinson Lee
b41f963136 r300: Remove unnecessary headers. 2010-01-30 20:49:42 -08:00
Vinson Lee
391892b0d8 r200: Remove unnecessary headers. 2010-01-30 20:43:23 -08:00
Vinson Lee
12eb32e342 r128: Remove unnecessary headers. 2010-01-30 20:24:13 -08:00
Chia-I Wu
996fd61442 egl: Remove code blocks that are commented out.
They are either unit tests or to demonstrate how functions are supposed
to be used.  The unit test is outdated and it should be better to take a
look at any of the working drivers to see how a function is used.
2010-01-31 11:31:58 +08:00
Chia-I Wu
89e6eb5fbe progs/egl: Update eglinfo to display more attributes.
Add config caveat, bind-to-texture, and renderable type.  Remove double
buffer and stereo attributes.
2010-01-31 11:20:15 +08:00
Chia-I Wu
66f0517695 st/egl: Do not ignore configs without a renderable type.
Configs without a renderable type are still informative for programs
such as eglinfo.
2010-01-31 11:20:15 +08:00
Chia-I Wu
6d12c7083e st/egl: Remove egl_g3d_get_current_context.
There is now _eglGetAPIContext that can return the current context of
the given API.
2010-01-31 11:20:15 +08:00
Vinson Lee
c6e26d76c7 intel: Remove unnecessary headers. 2010-01-30 19:11:31 -08:00
Vinson Lee
6e0f702b23 i965: Remove unnecessary headers. 2010-01-30 19:01:19 -08:00
Vinson Lee
c641703f21 i915: Remove unnecessary headers. 2010-01-30 18:54:56 -08:00
Eric Anholt
22bbc97994 intel: Respect texture tiling when doing a PBO blit teximage upload.
Bug #26008.  Fixes piglit pbo-teximage-tiling-2.
2010-01-30 15:12:23 -08:00
Corbin Simpson
a794c660d3 Revert "r300g: Don't handle SHADOW_AMBIENT."
This reverts commit 627a45848f.

I was wrong. Who could have known? :3
2010-01-30 14:30:13 -08:00
Eric Anholt
a44219c554 intel: Fix inverting of inversion test for windows in glClear cleanup.
Bug #26290.
2010-01-30 12:38:31 -08:00
Corbin Simpson
b6ac2403ac r300g: Independent blend enables only work on r500. 2010-01-30 12:33:44 -08:00
Corbin Simpson
627a45848f r300g: Don't handle SHADOW_AMBIENT.
Bisected so that only this commit has to be reverted if I'm wrong.

...Pfft, like I'm ever wrong. :3
2010-01-30 12:23:43 -08:00
Corbin Simpson
f7467f7437 r300g: Fix comment on SHADOW_AMBIENT. 2010-01-30 12:23:24 -08:00
Corbin Simpson
268cc5ff38 gallium-docs: Fix missing PIPE_CAPs.
Hmm, need to cross-ref those TGSI things. My work is never done... :3
2010-01-30 12:16:10 -08:00
Corbin Simpson
bfbec0818f r300g: Dual-source blending isn't possible, period. 2010-01-30 12:03:20 -08:00
Mathias Fröhlich
5a64bdaa01 r300g: Add alpha render targets.
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com>
Tested-by: Mathias Fröhlich <Mathias.Froehlich@gmx.net>
2010-01-30 11:40:41 -08:00
Chia-I Wu
7056a74734 progs/es1: Add bindtex.
It is ported from progs/egl/xeglbindtex.c.  With the OpenGL ES port, the
OpenGL version is removed.
2010-01-30 23:16:17 +08:00
Chia-I Wu
5714e674c7 st/egl: eglBindTexImage should bind to an OpenGL ES texture.
The spec says that it only works with OpenGL ES.
2010-01-30 23:15:21 +08:00
Chia-I Wu
2c3a23a96f egl: Remove my_strdup.
There is already _eglstrdup for the main library's use.
2010-01-30 23:02:45 +08:00
Chia-I Wu
6fc304456e egl: Remove unused VisibleRefCount. 2010-01-30 22:58:03 +08:00
Chia-I Wu
00e1790f32 egl: Rename Binding to CurrentContext in _EGLSurface.
A context can be bound to a surface just like it can be bound to a
thread.  CurrentContext is a more consistent name.
2010-01-30 22:57:18 +08:00
Chia-I Wu
94cb321b5d egl: Clean up header inclusions.
Mainly to remove eglcurrent.h and egldisplay.h from eglglobals.h.
2010-01-30 22:55:49 +08:00
Roland Scheidegger
847ac8ec5f gallium: fix blend state cso
if independent blend state was disabled, only the data from first rt was
stored, however the comparison used the full state, hence there never was
a match and always a new object was created.
Fixes a huge performance drop with llvmpipe due to recompilation.
2010-01-30 01:58:00 +01:00
Brian Paul
b8d4cbd7e2 progs/demos: new image dissolve demo
Dissolve between two images using a random pattern in the stencil
buffer and a varying stencil ref value.
2010-01-29 14:01:34 -07:00
Brian Paul
98f3f1c695 gallium: document pipe_context::get_query_result() 2010-01-29 14:01:34 -07:00
Keith Whitwell
3fc73c389a Merge commit 'lb2/arb_fragment_coord_conventions' 2010-01-29 20:24:26 +00:00
Corbin Simpson
882279d31a docs: Mark what I've been up to.
Brian, feel free to split/revert if you disagree.
2010-01-29 09:54:42 -08:00
Brian Paul
e94021660b progs/tests: added a few more files to .gitignore 2010-01-29 08:43:28 -07:00
Brian Paul
6fea2be795 tnl: check that state is validated before drawing
(cherry picked from commit 9fd3c74724)

Conflicts:

	src/mesa/tnl/t_draw.c
2010-01-29 08:40:46 -07:00
Brian Paul
987dd63b90 st/mesa: check that state is validated before drawing
(cherry picked from commit 4d1234e222)

Conflicts:

	src/mesa/state_tracker/st_draw.c
2010-01-29 08:39:47 -07:00
Brian Paul
5ce9183c1c vbo: fix missing state validation bugs
Commit 2708ddfb06 caused a few regressions.
We need to check/validate state after calling bind_arrays() because
it might set the _NEW_ARRAYS flag if the varying VP inputs change.

The symptom of this problem was some attribute arrays being ignored
(or interpreted as constant-valued) in glDrawRangeElements or
glMultiDrawElements.

A follow-on patch will add some additional asserts to try to catch
this kind of thing in the future.

(cherry picked from commit 3cba779e16)
2010-01-29 08:38:21 -07:00
Brian Paul
a38859569d mesa: do state validation in _mesa_valid_to_render()
...rather than checking/validating before all the calls to
_mesa_valid_to_render() and valid_to_render().

The next patch will actually fix some bugs...

(cherry picked from commit 23eda89ec8)
2010-01-29 08:38:11 -07:00
Brian Paul
364b008d18 docs: Fixed Windows build for 7.7.1
(cherry picked from commit a0518e66b2)
2010-01-29 08:37:31 -07:00
Brian Paul
ee5e84eba6 windows: assorted build fixes
These changes were originally submitted by Karl Schultz for Mesa 7.7-rc2
but weren't applied.

(cherry picked from commit 82c76cd16f)
2010-01-29 08:37:15 -07:00
Rodolfo Ribeiro Gomes
81cca6d453 glx: fix possible memory leaks in dri2CreateScreen()
Original patch fixed up by Brian Paul.
2010-01-29 08:36:47 -07:00
Brian Paul
4886f677ec mesa: Warn when indices are out of bounds, but do not skip the draw in debug builds.
The driver (or preferably the hardware) should handle out of bounds
indices.

If there are problems then it's better to detect those in the debug
builds.

(cherry picked from commit e3257912e0)
2010-01-29 08:31:48 -07:00
Luca Barbieri
b2299d80b4 softpipe: support all TGSI fragment coord conventions (v4)
Changes in v4:
- Rebase and modify for changes in previous patches

Changes in v3:
- Use positive caps instead of negative caps

Changes in v2:
- Now takes the fragment convention directly from the fragment shader

Adds internal support for all fragment coord conventions to softpipe.

This patch is not required for use with the current state trackers, but it
allows softpipe to run any TGSI program and enhances performance.
2010-01-29 14:14:29 +01:00
Luca Barbieri
62c673b6ac st/mesa: Gallium support for ARB_fragment_coord_conventions (v4)
Changes in v4;
- Implemented Brian Paul's style suggestions

Changes in v3:
- Use positive caps instead of negative ones

Changes in v2:
- Updated formatting

The state tracker will use the TGSI convention properties if the hardware
exposes the appropriate capability, and otherwise adjust WPOS itself.

This will also fix some drivers that were previously broken due to their
incorrect, inadvertent, use of conventions other than upper_left+half_integer.
2010-01-29 14:14:29 +01:00
Luca Barbieri
6c403750d6 tgsi: add caps for fragment coord conventions (v3)
Changes in v3:
- Renumber caps to accomodate caps to add to master in the meantime
- Document caps
- Add unsupported caps to *_screen.c too

Changes in v2:
- Split for properties patch
- Use positive caps instead of negative caps

This adds 4 caps to indicate support of each of the fragment coord
conventions.

All drivers are also modifed to add the appropriate caps.

Some drivers were incorrectly using non-Gallium-default conventions,
and caps for them have them set so that they will behave correctly
after the later state tracker patches.

This drivers are softpipe/llvmpipe (uses integer rather than half
integer) and pre-nv50 Nouveau (uses lower left rather than upper left).

Other drivers might be broken. With this patchset, fixing them is
only a matter of exposing the appropriate caps that match the behavior
of the existing code.

Drivers are encouraged to support all conventions themselves for better
performance, and this feature is added to softpipe in a later patch.
2010-01-29 14:13:14 +01:00
Luca Barbieri
73317139a4 tgsi: add properties for fragment coord conventions (v3)
Changes in v3:
- Documented the new properties
- Added comments for property values
- Rebased to current master

Changes in v2:
- Caps are added in a separate, subsequent patch

This adds two TGSI fragment program properties that indicate the
fragment coord conventions.

The properties behave as described in the extension spec for
GL_ARB_fragment_coord_conventions, but the default origin in
upper left instead of lower left as in OpenGL.

The syntax is:
PROPERTY FS_COORD_ORIGIN [UPPER_LEFT|LOWER_LEFT]
PROPERTY FS_COORD_PIXEL_CENTER [HALF_INTEGER|INTEGER]

The names have been chosen for consistency with the GS properties
and the OpenGL extension spec.

The defaults are of course the previously assumed conventions:
UPPER_LEFT and HALF_INTEGER.
2010-01-29 14:13:14 +01:00
Luca Barbieri
3cea5525d0 mesa: don't expose GL_ARB_fragment_coord_conventions until the GLSL part is done
Exposing it was incorrect, as the GLSL part of the extension is
missing.

We still keep the ARB_fragment_coord_conventions field, so that the
ARBfp parser can know whether to accept or reject the keywords.
2010-01-29 14:13:13 +01:00
Alan Hourihane
7683271e63 another gcc 4.2.x check for mstackrealign 2010-01-29 10:22:50 +00:00
Vinson Lee
df8273494e glu/sgi: Remove unnecessary headers. 2010-01-28 18:07:04 -08:00
Vinson Lee
548b9c4ece svga: Remove unnecessary headers. 2010-01-28 17:32:33 -08:00
Vinson Lee
7280c4c9fe softpipe: Remove unnecessary header. 2010-01-28 15:56:50 -08:00
Vinson Lee
1a2f9d722e llvmpipe: Remove unnecessary header. 2010-01-28 15:54:57 -08:00
Vinson Lee
fc4939bff9 egl: Remove unnecessary headers. 2010-01-28 15:39:11 -08:00
Vinson Lee
d40070029f progs/tests: Remove unnecessary headers. 2010-01-28 15:11:39 -08:00
Vinson Lee
bbb41153c2 progs/glsl: Fix bump GLSL compilation error on Mac OS. 2010-01-28 14:58:24 -08:00
Vinson Lee
77b1f2fbcf progs/glsl: Remove unused variable in bump.c. 2010-01-28 14:54:10 -08:00
Vinson Lee
07fb52bcf6 progs/glsl: Remove unnecessary header from samplers.c. 2010-01-28 14:22:15 -08:00
Corbin Simpson
0087322729 r300g: Clean up blend masks, change caps.
progs/tests/drawbuffers should work, except I can't test it. GG new
shader parser. GG.
2010-01-28 13:39:47 -08:00
Corbin Simpson
2e481e9fad gallium-docs: Minor grammar, need to talk about dual-source blends. 2010-01-28 13:37:09 -08:00
Corbin Simpson
505a43aff2 gallium-docs: Clean up constantbuf info a bit.
Hmm, does this belong in context, next to set_constant_buffer? Maybe
a paragraph in shaders might be useful.
2010-01-28 12:35:12 -08:00
Corbin Simpson
a5f7c63fc0 gallium-docs: Add PIPE_CAP info. 2010-01-28 12:22:51 -08:00
Eric Anholt
f20e83210e intel: Set the region's tiling to none when attaching a PBO to a region.
Note that when detaching the PBO from the region and making a new BO
for the region, we don't make it tiled even if the region originally
was.

Fixes piglit pbo-teximage-tiling.
2010-01-28 10:55:25 -08:00
Eric Anholt
c9886d535e i915: Remove unused initial and current state, now that there's nothing else. 2010-01-28 10:55:25 -08:00
Eric Anholt
f9439e4a46 intel: Remove long-disabled meta readpixels, and associated meta support. 2010-01-28 10:55:25 -08:00
Jakob Bornecrantz
c75e238434 st/xorg: Update to new libkms interface but be backwards compatible 2010-01-28 18:37:54 +00:00
Alan Hourihane
32e6043150 define own embedded target and cleanup previous commit. 2010-01-28 17:26:05 +00:00
Alan Hourihane
75cd6f3ece Don't define HAVE_POSIX_MEMALIGN for embedded target. 2010-01-28 17:23:31 +00:00
Roland Scheidegger
9b346f83a7 Merge commit 'origin/perrtblend'
Conflicts:
	src/gallium/drivers/softpipe/sp_screen.c
	src/gallium/include/pipe/p_defines.h
2010-01-28 17:23:58 +01:00
Roland Scheidegger
2fa34bf44c gallium: remove PIPE_CAP_S3TC, and add PIPE_CAP_DUAL_SOURCE_BLEND
there's no point in keeping deprecated PIPE_CAPS around since there's no
stable interface (yet).
Reuse the enum for PIPE_CAP_DUAL_SOURCE_BLEND. Drivers advertizing this
will accept the pipe blendfactors with SRC1 in them and be able to do dual
source blending (src color from pixel shader output 0, and blendfactor with
SRC1 will come from output 1, only one render target may be bound when using
any of these blend factors).
2010-01-28 17:11:49 +01:00
Alan Hourihane
bd60e6cd5c add PIPE_SUBSYSTEM_EMBEDDED when embedded platform used 2010-01-28 15:34:10 +00:00
Michal Krol
9e895831bc tgsi: Constants declared with ureg_DECL_constant() are one-dimensional.
This is to maintain backward compatibility with drivers
that don't support arrays of constant buffers.
2010-01-28 14:08:22 +01:00
Michal Krol
3ba2ab3a23 tgsi: Add ureg_property_gs_output_prim/max_vertices(). 2010-01-28 14:08:19 +01:00
Michal Krol
6522804cb3 docs: Implement constant buffer CAPs. 2010-01-28 14:08:16 +01:00
Michal Krol
3320acb67d softpipe: Report some sane values for constant buffer CAP queries. 2010-01-28 14:08:12 +01:00
Michal Krol
25123e0c88 gallium: Add CAPs for constant buffers. 2010-01-28 14:08:08 +01:00
Michal Krol
7c5f255201 gallium: Rename PIPE_MAX_CONSTANT to PIPE_MAX_CONSTANT_BUFFERS. 2010-01-28 14:08:03 +01:00
Michal Krol
333c035a51 regress: Add vertex shaders tests for constant buffers. 2010-01-28 14:07:58 +01:00
Michal Krol
9851644435 gallium: Enable multiple constant buffers for vertex and geometry shaders. 2010-01-28 14:07:53 +01:00
Michal Krol
44ac4c4e2c regress: Add fragment shader test for one-dimensional constant buffers. 2010-01-28 14:07:48 +01:00
Michal Krol
4771e536e1 regress: Add two-dimension constant buffer test. 2010-01-28 14:07:45 +01:00
Michal Krol
91d58c3520 python: Link to ws2_32 on windows. 2010-01-28 14:07:42 +01:00
Michal Krol
dcf8543ab3 tgsi: Handle two-dimensional constants in text parser. 2010-01-28 14:07:38 +01:00
Michal Krol
d96bb01d2d regress: Fix shader header. 2010-01-28 14:07:34 +01:00
Michal Krol
835bab0143 gallium: Implement 2D constant buffers for fragment shader in softpipe. 2010-01-28 14:07:29 +01:00
Michal Krol
4367de152c tgsi: Handle 2-D declarations. 2010-01-28 14:07:24 +01:00
Michal Krol
0adfdaeaa1 gallium: Add tgsi_declaration_dimension token.
This will allow us to declare two-dimensional constant buffers.
2010-01-28 14:07:19 +01:00
Corbin Simpson
241a0b8cf3 radeong: Slight improvement to buffer creation. 2010-01-28 03:05:46 -08:00
Corbin Simpson
f0a3f824ac gallium-docs: Moar buffer info.
Oh look, that one question about map_buffer_range is answered.
2010-01-28 03:05:46 -08:00
Corbin Simpson
2102ee204c gallium-docs: Start doc'ing screen buffers. 2010-01-28 03:05:46 -08:00
Corbin Simpson
12f97d9c09 r300g: Fix bizarre half-flushes with immd mode. 2010-01-28 03:05:46 -08:00
Corbin Simpson
b9ae570bab r300g: Atomize framebuffers.
There might be some optimizations possible here...
2010-01-28 03:05:46 -08:00
Chia-I Wu
14cbf324dc docs: Update the developer section of egl.html.
Mainly to add a subsection on the lifetime of display resources.
2010-01-28 18:10:05 +08:00
Vinson Lee
51ab599ddb scons: Do not use linker option '-Bsymbolic' on Mac OS X.
ld on Mac OS X does not recognize the option '-Bsymbolic'.
2010-01-28 01:34:40 -08:00
Chia-I Wu
6baa2c8d02 egl: Migrate drivers to use _eglBindContext.
_eglMakeCurrent is a big hammer that is not easy to use.  Migrate
drivers to use _eglBindContext and un-export _eglMakeCurrent.
2010-01-28 17:28:48 +08:00
Chia-I Wu
45ba533243 egl: Correctly unbind contexts in eglReleaseThread.
MakeCurrent unbinds the current context of the current API.  Modify the
current API to make sure all contexts are correctly unbound.
2010-01-28 17:28:48 +08:00
Chia-I Wu
17330479b3 egl: eglMakeCurrent should accept an uninitialized display.
When no context or surface are given, the display is allowed to be
uninitialized.  Most drivers cannot handle an uninitialized display.
But they are updated to at least throw a fatal message.
2010-01-28 17:28:47 +08:00
Chia-I Wu
959481ad70 egl: Add _eglBindContext.
It works similar to _eglMakeCurrent, except that the old context and
surfaces are returned instead of destroyed.  _eglMakeCurrent is now
calling the new _eglBindContext.
2010-01-28 17:28:47 +08:00
Chia-I Wu
a933259daa egl: Use a boolean to indicate whether a display is initialized.
The driver pointer of the display was used to decide whether a display
is initialized.  Use a boolean for that purpose allows accessing the
driver of an uninitialized display.
2010-01-28 17:28:47 +08:00
Vinson Lee
8f81769148 scons: Fix GLEW build on Mac OS X. 2010-01-28 01:19:53 -08:00
Vinson Lee
5dcc088bf1 tgsi: Silence uninitialized variable warning. 2010-01-28 00:40:43 -08:00
Vinson Lee
1eb1d4e238 radeon: Silence "format" compiler warnings. 2010-01-28 00:33:30 -08:00
Vinson Lee
347cd2b0d5 st/xorg: Remove unnecessary headers. 2010-01-28 00:25:20 -08:00
Vinson Lee
4030cd5a2d st/dri: Remove unnecessary headers. 2010-01-28 00:20:22 -08:00
Vinson Lee
c2bd1657a8 llvmpipe: Remove unnecessary headers. 2010-01-27 18:08:37 -08:00
Brian Paul
714d3ec9bc swrast: s/FIXED_TO_FLOAT/FixedToFloat/ 2010-01-27 17:48:34 -07:00
Brian Paul
36a0819ff4 llvmpipe: added debug option to disable LLVM optimization passes 2010-01-27 17:16:42 -07:00
Vinson Lee
978568c647 r300g: Remove unnecessary headers. 2010-01-27 16:12:51 -08:00
Brian Paul
dd89ac249c mesa: fix int/uint comparison warnings
Reported by Karl Schultz.
2010-01-27 17:04:30 -07:00
Brian Paul
20fbb24b67 mesa: fix double->float assignment warnings, int/uint comparison warnings
Reported by Karl Schultz.
2010-01-27 17:04:30 -07:00
Brian Paul
6703fb1917 mesa: fix double->float assignment warnings
Reported by Karl Schultz.
2010-01-27 17:04:30 -07:00
Brian Paul
ca0d048e4e mesa: fix int/uint comparison warnings
Reported by Karl Schultz.
2010-01-27 17:04:30 -07:00
Brian Paul
28bd4a1d81 tnl: fix double->float and int/uint conversion warnings
Reported by Karl Schultz.
2010-01-27 17:04:30 -07:00
Brian Paul
880411c72a swrast: silence double->float assignment warnings
Reported by Karl Schultz.
2010-01-27 17:04:30 -07:00
Brian Paul
4e5364d6fc mesa: more info in glActiveTexture error msg 2010-01-27 17:04:30 -07:00
Brian Paul
f103f7e460 configs: added vega to default GALLIUM_STATE_TRACKERS_DIRS 2010-01-27 17:04:30 -07:00
Vinson Lee
83e6ba564c i965g: Remove unnecessary headers. 2010-01-27 15:54:21 -08:00
Vinson Lee
f7f59b50ce util: Remove unnecessary header. 2010-01-27 15:35:58 -08:00
Vinson Lee
00c3607917 tgsi: Remove unnecessary header. 2010-01-27 15:32:48 -08:00
Vinson Lee
83d2b4d4a6 gallium/draw: Remove unnecessary headers. 2010-01-27 15:06:13 -08:00
Vinson Lee
01ed5c6ef5 r300g: Silence GCC "missing braces around initializer" warning. 2010-01-27 14:04:53 -08:00
Brian Paul
e95ad2a2b5 llvmpipe: count/report time spent in LLVM compilations 2010-01-27 13:49:43 -07:00
Brian Paul
5460da5436 gallium/util: comments for time-related functions 2010-01-27 13:46:43 -07:00
Brian Paul
99f1e32fad gallium/util: print dlerror() info upon dlopen() failure 2010-01-27 13:46:23 -07:00
Alex Deucher
ccb4ba3e3b r600: fix warning 2010-01-27 12:18:02 -05:00
Alex Deucher
1fdf04ade3 r600: rv670 support 8 tex instructions just like other r6xx
also clarify some other const values.
2010-01-27 12:16:50 -05:00
Brian Paul
b8656c4825 cell: remove commas from structs wrapped in PIPE_ALIGN_TYPE macro
This avoids the need to make PIPE_ALIGN_TYPE a variadic macro.
2010-01-27 09:26:39 -07:00
Alan Hourihane
1ecf505087 Duplicate CCVERSION check code to compensate for different env CC. 2010-01-27 12:46:46 +00:00
Andre Maasikas
07d47cb92d r600: increase max texture units to 16 2010-01-27 11:22:56 +02:00
Andre Maasikas
fb24c2678a r600: fix XPD with writemask
same variable used for 2 different temp registers
fixes e.g. glsl/bump
2010-01-27 10:22:32 +02:00
Vinson Lee
2a06221822 softpipe: Remove unnecessary header. 2010-01-26 23:28:23 -08:00
Vinson Lee
aa2423b5b3 i915g: Remove unnecessary headers. 2010-01-26 23:26:41 -08:00
Vinson Lee
7d29afb3a2 scons: Use '-Werror=' option on GCC 4.2.x and greater.
The existing code only checked for GCC 4.2.x and 4.3.x.
2010-01-26 22:56:58 -08:00
Corbin Simpson
fc20efe8e5 r300g: Turn the RS block into an atom.
At least one extraneous dirty was eliminated, as well as the chance for
avoiding dirty on shader change.
2010-01-26 22:08:11 -08:00
Corbin Simpson
60aa7f1f80 r300g: Make vertex_format into an atom.
Some delicious hax here.
2010-01-26 21:49:02 -08:00
Corbin Simpson
e62520de70 r300g: Kill dead code for hashing custom state.
It just wasn't meant to be.
2010-01-26 21:41:44 -08:00
Corbin Simpson
15e283669a r300g: Add A8_UNORM texture format.
Keeps teeworld happy.
2010-01-26 20:11:39 -08:00
Dave Airlie
395e08a839 radeon/r200/r300: don't clean non-emitted state.
So if we don't actually emit an atom to the hw because we don't
need it in the current state (e.g. lighting related atoms when
lighting is off) then don't mark it as clean, because when
lighting gets switched on we won't emit it at all.

This fixes funky gears colors.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-27 12:48:47 +10:00
Dave Airlie
e6df209490 radeon: remove unused file 2010-01-27 12:48:41 +10:00
Eric Anholt
2792baec34 intel: Remove dead code from having to clip copyteximage source rect.
mesa core does it now.  If only it did so for other entrypoints.
2010-01-26 18:27:07 -08:00
Eric Anholt
c8e6a0f2f8 intel: Use a handy helper in glReadPixels source clipping. 2010-01-26 18:02:21 -08:00
Eric Anholt
41f4d82ba8 intel: Clean up stale comments about cliprects. 2010-01-26 18:02:21 -08:00
Eric Anholt
a389d6bd56 intel: Remove the remaining cliprects code from DRI1. 2010-01-26 18:02:20 -08:00
Eric Anholt
ee454f0ba4 intel: Remove DRI1 junk from spans code.
This reduces the driver size by over 1%.
2010-01-26 18:02:20 -08:00
Eric Anholt
348fadc5df intel: Remove DRI1 junk from blit glBitmap. 2010-01-26 18:02:20 -08:00
Eric Anholt
3f912e0b3a intel: Remove DRI1 junk from CopyPixels. 2010-01-26 18:02:20 -08:00
Eric Anholt
3efd88f183 intel: Remove DRI1 junk from glClear blit implementation. 2010-01-26 18:02:20 -08:00
Eric Anholt
a3d8e7e481 i965: Remove DRI1 leftovers from stipple offset handling. 2010-01-26 18:02:20 -08:00
Vinson Lee
25b8ce3a6a i965g: Silence uninitialized variable warning. 2010-01-26 17:00:15 -08:00
Vinson Lee
6ab9740b7a softpipe: Remove unused variables. 2010-01-26 16:45:32 -08:00
Vinson Lee
1187a3c957 st/mesa: Silence uninitialized variable warning. 2010-01-26 16:39:25 -08:00
Eric Anholt
63b10e8fe7 intel: Fix PBO blit ReadPixels from an FBO.
Bug #25921 -- clutter PBO usage gave unreliable results.
2010-01-26 16:30:12 -08:00
Igor Oliveira
db89bf4002 docs: add documentation to double opcodes
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-26 17:18:44 -07:00
Eric Anholt
ab53f71015 i965: Add support for EXT_draw_buffers2. 2010-01-26 14:43:23 -08:00
Eric Anholt
f62c2a0bb8 i965: Fix fp fragment.position handling and enable HW part of ARB_fcc.
As with swrast, this fixes the default pixel center behavior which was
broken, and implements the previous behavior for integer.  Fixes
piglit fp-arb-fragment-coord-conventions-none.  The extension won't be
exposed until we get the GLSL part implemented.

The DRI1 origin_x/y parts are dropped since they're no longer relevant.
2010-01-26 13:30:26 -08:00
Eric Anholt
11c581c6ce swrast: Implement ARB_fragment_coord_conventions but don't enable.
This brings swrast's support up to the state of gallium, and fixes the
default center behavior of fragment.position.xy in piglit
fp-arb-fragment-coord-conventions-none.

The extension is not enabled currently because the GLSL part of the
extension isn't supported, so piglit
glsl-arb-fragment-coord-conventions-define fails as would any serious
test of the GLSL part.
2010-01-26 13:30:26 -08:00
Alan Hourihane
dea98eb792 support an 'embedded' platform target which turns off most parts of the
build.
2010-01-26 20:59:12 +00:00
Alan Hourihane
46f453b298 Check for __USE_MISC for defining uint & ushort 2010-01-26 20:59:11 +00:00
Brian Paul
43867acb6a Merge branch 'mesa_7_7_branch'
Merging was easier than cherry picking in this instance.
2010-01-26 13:25:53 -07:00
Erik Wien
68ca19afd7 mesa: Don't bind DRAW/READ_FRAMEBUFFER separately without FBO blit support
If GL_EXT_framebuffer_blit was not supported _mesa_DeleteFramebuffersEXT
would raise an error when deleting the currently bound framebuffer. This
because it tried to bind the default DRAW- and READ_FRAMEBUFFER separately.
This patch binds the default FRAMEBUFFER instead in that case.

Encountered in the fbo/fbo-copyteximage piglit test on R600.

Patch cleaned up a bit by Brian Paul.
2010-01-26 13:19:32 -07:00
Jesse Barnes
06d228d8b9 intel: make sure we update the renderbuffers after a swap
Now that LOCK_HARDWARE is gone, we don't have a convenient place to
update the renderbuffers everywhere we need them.  So grab new buffers
when we invalidate the old ones until we optimize things further.
2010-01-26 22:18:27 +02:00
Alan Hourihane
550fc19a5f add missing SCons.Util 2010-01-26 19:57:34 +00:00
Brian Paul
cbecb8fc8e vbo: if 'end' is out of bounds, clamp it
If we determine that the 'end' parameter to glDrawElements() is out of
bounds, clamp it to the max legal index value.
2010-01-26 12:49:48 -07:00
Brian Paul
645e297a00 vbo: clamp DrawElements start/end to max possible values
Some apps are sloppy with their start/end values.  Clamp them to
max possible values to prevent problems later.
2010-01-26 12:47:54 -07:00
Alan Hourihane
18bb614acf fix typo 2010-01-26 19:18:32 +00:00
Alan Hourihane
6544be6223 Allow the environment to override certain flags. 2010-01-26 19:14:50 +00:00
Alan Hourihane
1019f0de11 only use -Werror flags with gcc 4.2.x and 4.3.x.
could use a better test here though.
2010-01-26 19:14:49 +00:00
Aaron Plattner
cec0e7c086 glxgears: Support GLX_EXT_swap_control for querying the current swap interval.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-26 12:00:51 -07:00
Brian Paul
af1e9403e7 mesa: remove redundant _MaxElement computation
Eric added some new code to check if offset < obj_size before computing
_MaxElement but my original code was still present afterward and it
clobbered the _MaxElement value.

Not sure if this came from a bad merge or what.
2010-01-26 10:53:40 -07:00
Brian Paul
782f66c8a2 progs/tests: use glDrawRangeElements() in bufferobj.c 2010-01-26 10:48:00 -07:00
Christoph Bumiller
a5d67dc011 nv50: supports independent blend enables 2010-01-26 18:33:05 +01:00
Roland Scheidegger
1a9d01dcde gallium: add the new PIPE_CAP blend bits to more drivers
some drivers will complain if they don't know the cap bit
2010-01-26 17:32:57 +01:00
Brian Paul
1d8b308cbf docs: document Intel, R300 env vars 2010-01-26 09:12:32 -07:00
Corbin Simpson
786bd78be4 r300g: Per-MRT blending is not supported. 2010-01-26 07:35:33 -08:00
Roland Scheidegger
9bc80ff174 mesa/st: code cleanups for new blend functionality
minor code changes, style and comment fixes
2010-01-26 15:35:31 +01:00
Chia-I Wu
092b1ca989 egl: Remove _eglOpenDriver and _eglCloseDriver.
_eglCloseDriver is no-op and _eglOpenDriver does nothing but call
_eglMatchDriver.  Export _eglMatchDriver directly.
2010-01-26 18:46:06 +08:00
Chia-I Wu
545eaf83b5 egl: Fix a segfault when a display is initialized again.
Reset dpy->MaxConfigs so that dpy->Configs is re-allocated.
2010-01-26 18:46:05 +08:00
Chia-I Wu
a1717970e7 egl: Remove _eglGetCurrentSurface and _eglGetCurrentDisplay.
They have little use in drivers since drivers need to work for multiple
current contexts.
2010-01-26 18:46:05 +08:00
Chia-I Wu
11cf3cb2c4 egl: Fix leaks in eglReleaseThread.
There may be multiple bound contexts that should be unbound.
2010-01-26 18:46:05 +08:00
Chia-I Wu
7c09296d4c egl: Refactor _eglMakeCurrent.
Refactor _eglMakeCurrent into _eglCheckMakeCurrent,
_eglBindContextToSurface, and _eglBindContextToThread.
2010-01-26 18:46:05 +08:00
Chia-I Wu
6f6f3e4227 egl: Add _eglGetAPIContext.
It will return the currently bound context of the given API.
2010-01-26 18:46:05 +08:00
Chia-I Wu
f65ed0a309 egl: Use a boolean to indicate whether a resource is linked.
An unlinked resource may still be a current resource such as current
surfaces.  There might still be a need to know which display the
unlinked resource belongs to.
2010-01-26 18:46:05 +08:00
Chia-I Wu
d21ee93fdb egl: Mark _eglCheckResource as PUBLIC.
To support extensions such as GL_OES_EGL_image, the drivers need a way
to check if a given EGLImageKHR is valid.
2010-01-26 18:46:05 +08:00
Vinson Lee
c73dbce891 glsl/pp: Silence GCC "no previous prototype" warning. 2010-01-26 00:47:31 -08:00
Eric Anholt
7aed23c362 intel: Don't do client-side frame throttling with DRI2 SwapBuffers.
The server side does the throttling on our behalf now by putting the
client to sleep, so we don't need our previous hacks for limiting the
number of outstanding frames.  Same effect as
7d4e674b21.
2010-01-25 22:57:33 -08:00
Eric Anholt
c7fc9bfb22 Revert "intel: Use the new DRI2 flush invalidate entrypoint to signal frame done."
This reverts commit 7d4e674b21.  It broke
throttling in the non-new-DRI2 case.
2010-01-25 22:57:33 -08:00
Eric Anholt
5e1851b144 i965: Remove unnecessary malloc/free in VS binding table setup. 2010-01-25 22:57:30 -08:00
Eric Anholt
a098fd71d7 i965: Fix build after merge of mesa stable branch. 2010-01-25 22:27:46 -08:00
Chia-I Wu
74aa773f7c docs: Mention EGL and OpenGL ES in 7.8 release notes. 2010-01-26 11:35:30 +08:00
Chia-I Wu
146931769c glx: Build GLX normally.
GLX was built specially and before Mesa core because libglapi.a could
not be built with IN_DRI_DRIVER defined.  This is no longer the case
since 6e99e6ddbf.

It works fine in my (limited) testing with both direct and indirect
rendering.  I also compare the outputs after preprocessing (gcc -E) with
or without this commit, and they are identical.
2010-01-26 11:03:54 +08:00
Chia-I Wu
a6342afe50 docs: Update EGL documentation.
Add --enable-gallium-swrast to the example.  Document missing
--with-egl-driver-dir and update TODOs.
2010-01-26 10:55:28 +08:00
Chia-I Wu
0d2d40451d egl/xdri: Update with glxclient.h change.
__glXFindDisplay is no longer static since
7a9329ba99.
2010-01-26 10:48:16 +08:00
Robert Bragg
7a9329ba99 mesa: misc GLX_INTEL_swap_event fixes
Fixup a few issues found through testing:
  - update GLX names to match glproto
  - register DRI2WireToEvent so it actually gets called

Signed-off-by: Robert Bragg <robert@linux.intel.com>
2010-01-25 15:40:56 -08:00
Brian Paul
9b22427911 Merge branch 'mesa_7_7_branch'
Conflicts:

	src/mesa/drivers/dri/intel/intel_screen.c
	src/mesa/drivers/dri/intel/intel_swapbuffers.c
	src/mesa/drivers/dri/r300/r300_emit.c
	src/mesa/drivers/dri/r300/r300_ioctl.c
	src/mesa/drivers/dri/r300/r300_tex.c
	src/mesa/drivers/dri/r300/r300_texstate.c
2010-01-25 14:46:17 -07:00
Alex Deucher
7e7f8815fb r300: rv350+ support FLT16_2/4 vertex formats 2010-01-25 16:19:19 -05:00
Corbin Simpson
5fe71949d9 r300g: Finish and enable immediate mode.
Based on Marek's immd-mode patch.
2010-01-25 11:30:39 -08:00
Corbin Simpson
1571602153 radeong: Make sure that we're not emitting relocations for local buffers.
Split from Marek's immd-mode patch.
2010-01-25 11:30:39 -08:00
Corbin Simpson
c486bfb463 radeong: Make is_r3xx inline to avoid warnings.
Split from Marek's immd-mode patch.
2010-01-25 11:30:39 -08:00
Corbin Simpson
67149051be radeong: Clean up domain usages.
Split from Marek's immd-mode patch.
2010-01-25 11:30:39 -08:00
Corbin Simpson
72778a9d25 Revert "r300g,radeong: finish and enable the immediate mode"
This reverts commit 112239e9a6.
2010-01-25 11:30:38 -08:00
Roland Scheidegger
df4395198c softpipe: enable new blend functionality
works with tests/drawbuffers2
2010-01-25 20:20:52 +01:00
Jakob Bornecrantz
6749310d3f st/xorg: Fix crash on resize with libkms 2010-01-25 20:12:59 +01:00
Roland Scheidegger
5fae36147e st/mesa: handle EXT_draw_buffers2 per rendertarget blend enables / colormasks
uses the new gallium per-rt blend functionality
2010-01-25 19:27:05 +01:00
Igor Oliveira
0d051af612 vega: fix incorrect samplers, textures indexes in blend_bind_samplers()
Fixes fd.o bug 25863.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-25 09:53:53 -07:00
Roland Scheidegger
0d3a6a505d vega: don't enable blending if not necessary
In some places blending was enabled even though it wasn't necessary.
Also remove a (bogus) reenabling of color writes, which wasn't really used.
2010-01-25 16:52:14 +01:00
Roland Scheidegger
dbc0e24ab8 xorg: do not enable unnecessary blending for xv 2010-01-25 16:43:33 +01:00
Roland Scheidegger
13b74b585a trace: adapt to blend changes 2010-01-25 16:41:57 +01:00
Roland Scheidegger
6893948d48 svga: adapt to blend changes 2010-01-25 16:39:39 +01:00
Roland Scheidegger
4e6bfa6de1 softpipe: adapt to blend changes 2010-01-25 16:39:16 +01:00
Roland Scheidegger
e908abf174 nouveau: adapt drviers to blend changes 2010-01-25 16:38:32 +01:00
Roland Scheidegger
d241964e47 r300g: adapt to blend changes 2010-01-25 16:37:51 +01:00
Roland Scheidegger
4e0c825a79 i965g: adapt to blend changes 2010-01-25 16:37:27 +01:00
Roland Scheidegger
bc160fc9b2 i915g: adapt to blend changes 2010-01-25 16:37:09 +01:00
Roland Scheidegger
88388b99fb cell: adapt to blend changes 2010-01-25 16:36:37 +01:00
Roland Scheidegger
99e28d4ee3 llvmpipe: adapt to blend changes 2010-01-25 16:35:56 +01:00
Roland Scheidegger
3770769f21 st/python: adapt to blend changes 2010-01-25 16:34:29 +01:00
Roland Scheidegger
feefa7a510 vega: adapt to blend changes 2010-01-25 16:33:09 +01:00
Roland Scheidegger
92676b9fe6 xorg: adapt to blend changes 2010-01-25 16:32:18 +01:00
Roland Scheidegger
cbb8d35a3a gallium: fix cast for size calc of pipe_blend_state 2010-01-25 16:31:21 +01:00
Luca Barbieri
9328f3a670 Fix compressed texture loads for non-minimal pitches again
My commit eea6a7639f does a memcpy of height
lines, but that's wrong because the texture has a block layout and we
must thus use the number of vertical blocks instead of the height.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-25 08:11:49 -07:00
Chia-I Wu
2204447de3 winsys/drm: Correctly install EGL drivers.
Remove extraneous quotes that prevent some drivers to be installed when
there are more than one display in EGL_DISPLAYS.
2010-01-25 23:06:05 +08:00
José Fonseca
cb64ca5066 pipebuffer: Reapply the mesa_7_7_branch's changes.
After the last mesa_7_7_branch merge the old master code remained,
instead of the newer mesa_7_7_branch's code. This commit makes both
branches match, modulo interface changes.

Note: future mesa_7_7_branch -> master merges will most likely hit
conflicts in these files. Unless otherwise stated, the mesa_7_7_branch
is the reference.
2010-01-25 13:17:47 +00:00
José Fonseca
4c082faa7e llvmpipe: Remove lp_tex_sample_c.c again.
Popped back to life in some merge. Not necessary even as a reference,
since it is identical to softpipe's sp_tex_sample.c with renamed symbols.
2010-01-25 11:54:54 +00:00
Jakob Bornecrantz
6877c5de3c vmware/xorg: Do buffer round-robin logic differently 2010-01-25 12:27:47 +01:00
Jakob Bornecrantz
0b482c4fbe st/xorg: Improve options and print them to log
Set 2D acceleration to off by default
Get fallback debugging from the Xorg config
Also print if 3D acceleration is enabled
2010-01-25 11:24:56 +01:00
Jakob Bornecrantz
a3b783ea29 vmware/xorg: Export pci_probe function for ugly chain-loading 2010-01-25 11:24:55 +01:00
Jakob Bornecrantz
36fd55f9f0 st/xorg: Export helper function for detecting modesetting 2010-01-25 11:24:55 +01:00
Jakob Bornecrantz
16cf7e14a6 st/xorg: Fix warning 2010-01-25 11:24:55 +01:00
Corbin Simpson
8cf1af4507 gallium-docs: Add note on scissor. 2010-01-25 01:12:30 -08:00
Marek Olšák
112239e9a6 r300g,radeong: finish and enable the immediate mode
Nearly 100% performance increase in glxgears.
2010-01-24 23:03:29 -08:00
Marek Olšák
9f8ec53312 r300g: fix zero-area scissor 2010-01-24 23:03:29 -08:00
Marek Olšák
b7a002df1e r300g,radeong: set tiling flags in libdrm 2010-01-24 23:03:29 -08:00
Marek Olšák
8505996430 radeong: do not emit a zero-sized command stream
Fixing a hardlock introduced in fcbd285e42 and
reproducible with piglit/bugs/fdo23489.
2010-01-24 23:03:29 -08:00
Chia-I Wu
4aed0944f4 egl: Native types are renamed in EGL 1.3.
Rename Native*Type to EGLNative*Type.
2010-01-25 11:59:12 +08:00
Chia-I Wu
dbb866ab33 egl: Make resource void pointer in _eglCheckResource.
This emphasizes the fact that the resource to be checked could really be
invalid and have an unknown type.
2010-01-25 11:44:13 +08:00
Chia-I Wu
3f932a4440 egl: Install EGL headers.
Install EGL (and KHR) headers along with the library.
2010-01-25 11:34:59 +08:00
Chia-I Wu
a1c4a8a3c8 egl: Add support for EGL_KHR_image.
Individual drivers still need to implement the API hooks.
2010-01-25 11:28:27 +08:00
Chia-I Wu
95f8f75ad8 egl: Update headers.
Update to the current versions found at
http://www.khronos.org/registry/egl/.  There is one modification in
khrplatform.h for GCC visibility.
2010-01-25 11:28:27 +08:00
Igor Oliveira
daea9270f8 egl: check if driver_name is null 2010-01-25 10:30:51 +08:00
Brian Paul
47d30b0c2c st/mesa: fix int->uint conversion for negative scissor bound values
Based on a patch by Xavier Chantry <chantry.xavier@gmail.com>:

If x+width or y+height is negative, then maxx or maxy will get a bogus value
when converting that to unsigned. Fix this by setting 0 as minimal value.

This was also triggered by teeworlds, but only with some combination of
resolution and map section. For example upper part of dm2 at 1280x1024.
2010-01-24 18:18:17 -07:00
Brian Paul
e88d6fe299 mesa: move _mesa_debug() call earlier in _mesa_Scissor
Part of a patch from Xavier Chantry <chantry.xavier@gmail.com>
2010-01-24 17:54:47 -07:00
Xavier Chantry
fdfa4c8529 st/mesa: fix unsigned/signed breakage in scissor
commit 53174afeeb introduced a portability change that converted GLint x,y
to GLuint. That breaks when x and y are negative, which seems to be allowed,
and which at least one game uses : teeworlds.

Rather than simply reverting the change, it seems possible to convert the
16bit unsigned to GLint so that comparisons are made between signed integers
instead.  This hopefully does not break anything while keeping MSVC happy.

Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-24 16:45:49 -07:00
Marcin Slusarz
9e1550dbaf nv50: fix uninitialized variable in nv50_revdep_reorder
"unsafe" is never initialized, but used
(found by valgrind)
2010-01-25 09:45:23 +10:00
Marcin Slusarz
0ef781c1ae nv50: fix crash in nv50_pre_pipebuffer_map (nv50_screen->cur_ctx)
nv50_pre_pipebuffer_map references screen->cur_ctx which points
to freed memory after the context is destroyed.
This crash is easily triggerable by progs/xdemos/glxcontexts.
2010-01-25 09:44:34 +10:00
Marcin Slusarz
74989972ba nouveau/winsys: be nice and close the device on destroy 2010-01-25 09:43:59 +10:00
Marcin Slusarz
283b21d02b nouveau: fix winsys object leak 2010-01-25 09:43:33 +10:00
Christoph Bumiller
833acea8f6 nv50: fix handling of FragCoord input 2010-01-24 15:17:57 +01:00
Christoph Bumiller
49dde55b96 nv50: only flush texture caches on st request 2010-01-24 15:17:53 +01:00
Christoph Bumiller
d6fd31a8d4 nv50: implement render_condition
Still not handling queries on multiple contexts though.
2010-01-24 15:13:17 +01:00
Chia-I Wu
21b2c0a6e5 egl: Add and use make_library_path.
Add a platform specific function to turn a library name to a library
path.  It is used to convert EGL_DRIVER or the default driver to a
library path that can be loaded.
2010-01-24 21:27:52 +08:00
Chia-I Wu
cecc33cd4f egl: Remove _eglFindAPIs.
This function is not used and should have been removed by last commit.
My mistake.
2010-01-24 20:55:17 +08:00
Chia-I Wu
cf7c1ea4f1 egl: Remove unused helper functions.
_eglFillInConfigs and _eglFindAPIs have no user in Mesa and are unlikely
to find one soon.  It should be fine to remove them.
2010-01-24 20:52:30 +08:00
Chia-I Wu
56b93a25ea egl: Remove unused casting functions.
_eglUIntToPointer and _eglPointerToUInt are no longer used.
2010-01-24 20:38:16 +08:00
Chia-I Wu
ecb3b3102a egl: Make surfaces and contexts resources.
Turn _EGLSurface and _EGLContext into _EGLResource so that they can be
managed uniformly.
2010-01-24 20:38:16 +08:00
Chia-I Wu
7abf42626f egl: Add _EGLResource and _EGLResourceType.
Resources are objects managed by a display.  They can be linked to or
unlinked from a display.  It is also possible to check if a resource is
valid.
2010-01-24 20:38:15 +08:00
Chia-I Wu
b4d2c97a2d egl: Move surface functions in egldisplay.[ch] to eglsurface.[ch]
Move functions to where they should be.  There should be no real change
here.
2010-01-24 20:38:15 +08:00
Chia-I Wu
5e66d18932 egl: Move context functions in egldisplay.[ch] to eglcontext.[ch].
Move functions to where they should be.  There should be no real change
here.
2010-01-24 20:38:15 +08:00
Chia-I Wu
7be4d6b5f7 mesa/es: Improve Makefile rules.
Make sure glapi headers are cleaned when "make clean".  Make sure all
sources depend on subdirs-stamp-tmp so that sources/headers are
generated first.

subdirs-stamp-tmp will be removed after a successful build.  It might be
a problem when a build fails.  But it is much better than where we
currently are: glapi headers are never cleaned or re-generated.
2010-01-24 20:15:25 +08:00
Vinson Lee
e85cb98a16 r200: Silence fprintf format warning. 2010-01-24 00:17:00 -08:00
Vinson Lee
e02dc13952 x86: Do not build read_rgba_span_x86.S on Mac OS X.
read_rgba_span_x86.S uses the pseudo-ops .hidden and .type which are
not recognized on Mac OS X.
2010-01-23 23:18:33 -08:00
Vinson Lee
f429b80fff x86: Do not use .hidden pseudo-op on Mac OS X.
The .hidden directive is an unknown pseudo-op on Mac OS X.
2010-01-23 23:12:34 -08:00
Vinson Lee
bc75ec0f38 glapi: Do not use .type pseudo-op on Mac OS X.
The .type directive is an unknown pseudo-op on Mac OS X.
2010-01-23 22:59:31 -08:00
Vinson Lee
6b55aacccb scons: Do not use ld options start-group and end-group on Darwin.
Mac OS X ld does not support these options.
2010-01-23 21:43:26 -08:00
Dave Airlie
e9bb06441e r300g: avoid the use of goto
I was being lazy on Sunday morning, Droste on irc called me on it ;-)
2010-01-24 15:37:23 +10:00
Vinson Lee
d57ba16ae3 scons: Define _DARWIN_C_SOURCE on Darwin builds. 2010-01-23 21:05:58 -08:00
Dave Airlie
232ddfec24 r300g: fix flushing harder.
I swear ipers runs here after this commit.

After we flush we need to redo the space check
2010-01-24 15:00:06 +10:00
Vinson Lee
7f2f42dd80 progs/demos: Remove unnecessary header from shadowtex.c. 2010-01-23 20:56:49 -08:00
Vinson Lee
b62b524fee r300: Remove unnecessary headers. 2010-01-23 20:43:27 -08:00
Vinson Lee
fb6bff3712 intel: Remove unnecessary headers. 2010-01-23 14:33:29 -08:00
Chia-I Wu
28c3e57c83 egl: Install drivers to ${libdir}/egl.
Install EGL drivers to EGL_DRIVER_INSTALL_DIR, which is default to
${libdir}/egl.
2010-01-23 20:30:11 +08:00
Chia-I Wu
6c4431c092 st/vega: Clean up Makefile. 2010-01-23 20:15:28 +08:00
Chia-I Wu
60cd2449f8 st/es: Pass -linker and -ldflags to mklib. 2010-01-23 20:15:24 +08:00
Vinson Lee
146a77af3f radeon: Remove unused variable. 2010-01-23 02:14:56 -08:00
Dave Airlie
3b002c9f75 r300: fix wrong call in last commit 2010-01-23 20:07:08 +10:00
Vinson Lee
4bad0aef40 tdfx: Remove unnecessary headers. 2010-01-23 01:54:53 -08:00
Vinson Lee
283d9565bf sis: Remove unnecessary headers. 2010-01-23 01:40:44 -08:00
Dave Airlie
76bc66b664 r300g: fix up buffer emission ordering.
This fixes the code space checking VBOs, then resetting the space list
and space checking other buffers. it fixes demos/ipers

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-23 19:35:42 +10:00
Vinson Lee
09a142e5db savage: Remove unnecessary headers. 2010-01-23 00:38:14 -08:00
Vinson Lee
ca54a5b920 mga: Remove unnecessary headers. 2010-01-23 00:19:29 -08:00
Vinson Lee
634ec5c2ab i965: Remove unnecessary headers. 2010-01-22 23:53:39 -08:00
Vinson Lee
329c1b5910 i915: Remove unnecessary headers. 2010-01-22 23:22:16 -08:00
Dave Airlie
9a62f0ce3b r300: only enable half floats on r500s.
Thank to MAD for point it out.
2010-01-23 12:57:51 +10:00
Dave Airlie
782b6885c2 Merge branch 'arb_half_float_vertex' 2010-01-23 12:29:33 +10:00
Chia-I Wu
0928418922 Revert "add segl"
This reverts commit fe33b7083b.  It was
not supposed to be pushed yet.
2010-01-23 10:33:03 +08:00
Dave Airlie
d82b8038fd r300: half float support
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-23 12:28:33 +10:00
Dave Airlie
96f2f0daea i965: add support for ARB_half_float_vertex
enables the extension on i965 and adds support to the draw upload for
the vertex format.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-23 12:28:32 +10:00
Dave Airlie
cfe884e203 mesa: add core support for ARB_half_float_vertex.
Adds the extension to the list + support to the APIs.

also add t_draw.c support to convert for sw rast.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-23 12:28:32 +10:00
Dave Airlie
1ac5fd594a glapi: add GL_HALF_FLOAT enum support.
Regenerate enums files and GLX indirect.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-23 12:28:32 +10:00
Dave Airlie
dcaf6687e8 progs: add trivial ARB_half_float_vertex support.
This is just a trivial port of vp-array.c

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-23 12:28:28 +10:00
Chia-I Wu
4b770d1a11 glapi: Include glheader.h in glapi_nop.c.
In addition to OpenGL headers, glheader.h also defines OpenGL ES types
that are used in core Mesa or ES overlay.
2010-01-23 10:24:49 +08:00
Chia-I Wu
fe33b7083b add segl 2010-01-23 10:10:47 +08:00
Brian Paul
2292c93bc0 glapi: define GLfixed, GLclampx types for ES 1
I'm not 100% sure this is the best fix, but it seems OK.
2010-01-22 18:47:25 -07:00
Brian Paul
f6a49ac217 svga: fix up breakage from earlier 7.7 merge 2010-01-22 18:35:36 -07:00
Brian Paul
46c7cd665c st/mesa: fix incorrect freeing of drawpixels vertex shaders
These shaders are not st_vertex_shaders, but tgsi ureg shaders.
Fixes fd.o bug 25959.
2010-01-22 17:56:37 -07:00
Brian Paul
dd618a006a gallium/util: add missing util/u_bitmask.c to Makefile 2010-01-22 17:20:37 -07:00
Brian Paul
5e78903952 gallium/util: fix incorrect shift in a4r4g4b4_put_tile_rgba()
Fixes fd.o bug 23313.
2010-01-22 17:17:05 -07:00
Brian Paul
b23b13b690 mesa: use memcpy() in _mesa_ProgramEnv/LocalParameters4fvEXT() 2010-01-22 16:24:15 -07:00
Brian Paul
ffe4e2a667 mesa: use switch in _mesa_DeletePrograms() 2010-01-22 16:18:56 -07:00
Brian Paul
7b5ad23c7f Merge branch 'mesa_7_7_branch'
Conflicts:

	src/mesa/shader/prog_execute.c
2010-01-22 16:09:03 -07:00
Brian Paul
099e8ec54d mesa: re-implement _mesa_ProgramEnvParameter4fvARB() with memcpy()
This is faster and ensures that NaN floats get stored properly.
Before, NaN values (which might be used with UP2H, UP2US, UP4B and
UP4UB) weren't getting stored properly with gcc -O3.

This is the second part of the fix for the piglit fp-unpack-01 failure
(bug 25973).
2010-01-22 15:41:11 -07:00
Brian Paul
8d1a01d370 mesa: use new fetch_vector1ui() function for 'unpack' GPU instructions
The UP2H, UP2US, UP4B and UP4UB instructions interpret the float
registers as integers.  With gcc -O3 some bits were getting mixed up
somewhere.  This is part of the fix for the piglit fp-unpack-01 test
failure (bug 25973).
2010-01-22 15:36:38 -07:00
Brian Paul
efde2df114 xlib/softpipe: more buffer free fixes
The previous memory leak fix didn't always work properly.
Now check the xm_buffer::smh field (now documented!) to
see if the buffer points to shared memory.
2010-01-22 13:07:07 -07:00
Alan Hourihane
d88b219cf3 Remove obsolete file 2010-01-22 19:33:04 +00:00
Brian Paul
1e4b81267c gallium/aux: re-add pb_buffer_fenced.[ch] accidentally remove during merge 2010-01-22 12:27:25 -07:00
Brian Paul
cd8614b028 Merge branch 'mesa_7_7_branch'
Conflicts:
	src/gallium/auxiliary/draw/draw_context.c
	src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c
	src/gallium/auxiliary/pipebuffer/Makefile
	src/gallium/auxiliary/pipebuffer/SConscript
	src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
	src/gallium/auxiliary/tgsi/tgsi_scan.c
	src/gallium/drivers/i915/i915_surface.c
	src/gallium/drivers/i915/i915_texture.c
	src/gallium/drivers/llvmpipe/lp_setup.c
	src/gallium/drivers/llvmpipe/lp_tex_sample_c.c
	src/gallium/drivers/llvmpipe/lp_texture.c
	src/gallium/drivers/softpipe/sp_prim_vbuf.c
	src/gallium/state_trackers/xorg/xorg_dri2.c
	src/gallium/winsys/drm/intel/gem/intel_drm_api.c
	src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c
	src/gallium/winsys/drm/radeon/core/radeon_drm.c
	src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c
	src/mesa/state_tracker/st_cb_clear.c
2010-01-22 12:17:02 -07:00
Brian Paul
64871747bb gallium/draw: apply DRAW_PIPE_FLAG_MASK to all vertex elements
Depending on first/last provoking vertex either the first or last
element/index may have the extra DRAW_PIPE_x flags.  Mask off those
bits for all vertex elements to be safe (esp. for the quad case).
This may be overly cautious, but it's a cheap operation.

Fixes a segfault caused by large/bogus vertex indexes otherwise.
2010-01-22 11:49:51 -07:00
Brian Paul
5ab0d49a07 gallium/draw: added comments, whitespace fixes 2010-01-22 11:39:19 -07:00
Alan Coopersmith
2b20b60427 mesa: Add "shader/" path to #include statements in shader parser/lexer sources
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>

Note sure why the compiler's -I paths aren't doing the job, but this is OK.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-22 10:38:06 -07:00
Brian Paul
e4f168a6f4 glapi: clean-up and simplify glapi_nop.c code
Removed _glapi_noop_enable_warnings() and _glapi_set_warning_func().
Just check the DEBUG env vars and call fprintf(stderr) with a warning
message instead.
2010-01-22 09:56:55 -07:00
Brian Paul
126aff18aa glapi: split the no-op dispatch code into new glapi_nop.c file
This unclutters the glapi.c file a bit.
2010-01-22 09:32:12 -07:00
Brian Paul
ea5918be0e glapi: fix int->pointer conversions warnings in no-op functions 2010-01-22 08:15:14 -07:00
Brian Paul
2f1a49e335 progs/xdemos: add z/Z keys for scaling the rendering 2010-01-22 08:08:45 -07:00
Brian Paul
5023a7f53f gallium/draw: fix-up comments, whitespace 2010-01-22 08:08:45 -07:00
Brian Paul
3c31b1b6d1 gallium/draw: replace int with boolean 2010-01-22 08:08:45 -07:00
Ruediger Oertel
96280c2a41 Fix PowerPC related typo in spantmp2.h
Signed-off-by: Matthias Hopf <mhopf@suse.de>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-22 08:07:41 -07:00
Andre Maasikas
69e26a08c6 r600: enable sampler lod* bits
bits, settings derived from testing, might contain some errors...
2010-01-22 16:57:47 +02:00
Andre Maasikas
70ccca4251 r600: update vport z & clipping when depth_clamp is changed
fixes piglit depth_clamp
2010-01-22 14:14:01 +02:00
Andre Maasikas
9bf40cea00 r600: fix brownbag, only align if we are dealing with cubemap 2010-01-22 13:49:12 +02:00
Andre Maasikas
714d9c21ec r600: cubemap levels seem to be aligned to 8 images 2010-01-22 13:33:15 +02:00
Andre Maasikas
278ad74fe0 radeon/fbo: flush rendering before generating mipmaps
or maybe should flush(also) in finish_render_texture...
2010-01-22 12:58:27 +02:00
Andre Maasikas
7c6f51cdcc radeon/fbo: use correct depth texture offset for depth textures 2010-01-22 12:38:34 +02:00
Andre Maasikas
defd45e95e r600: enable draw_offset
fixes some fbo cases (mipmaps, cube textures ..)
2010-01-22 12:38:19 +02:00
Chia-I Wu
cec2eeb33e docs: Update sourcetree.html for EGL and the state trackers. 2010-01-22 18:10:52 +08:00
Chia-I Wu
3c967a9207 st/egl_g3d: Rename to st/egl.
Simply the name to egl.
2010-01-22 16:45:28 +08:00
Chia-I Wu
3a4b7d3071 winsys/drm: Update the options of mklib in Makefile.egl_g3d.
Pass -linker, -ldflags, and $(MKLIB_OPTIONS) to mklib.
2010-01-22 16:44:13 +08:00
Chia-I Wu
3b0ffd5a36 egl: Remove egl_softpipe.
With the addition egl_x11_swrast, egl_softpipe is sort of deprecated.
The new driver serves the same purpose as egl_softpipe does.  It is
based on egl_g3d and provides more features.
2010-01-22 16:44:13 +08:00
Chia-I Wu
a1306f4ef6 winsys/drm: Add swrast.
The swrast winsys always returns NULL when drm_api_create is called.
2010-01-22 16:44:09 +08:00
José Fonseca
383f460cf7 vmware/core: Update for pipebuffer changes.
In particular, delay patching GMR relocations until the buffers are
validated, since the buffers relative offset can only be established then.
2010-01-22 09:41:52 +01:00
Vinson Lee
3f6d732bfb st/mesa: Remove unnecessary header from st_cb_viewport.c. 2010-01-21 23:41:57 -08:00
Chia-I Wu
52d7b2cede st/egl: Remove the egl state tracker.
The egl_g3d state tracker has support for KMS, and the support is based
on the egl state tracker.  As egl_g3d provides more features, it should
be better to keep only egl_g3d to unify the efforts.
2010-01-22 15:37:56 +08:00
Vinson Lee
8bc3c06d86 progs/trivial: Remove unnecessary header from tri-fbo-tex-mip.c. 2010-01-21 23:24:40 -08:00
Chia-I Wu
2a928899e3 egl: Remove USING_EGL and the related drivers.
They do not build for a long while and there seems to be no active
users.  It might be better for them to live in the git histroy.
2010-01-22 15:16:31 +08:00
Chia-I Wu
324fdf7364 egl: Remove the demo driver.
The demo driver has outdated.  It is suggested to look at any of the
drivers that is functioning.
2010-01-22 15:10:09 +08:00
Vinson Lee
a1c5d8f61d i915g: Remove unnecessary header. 2010-01-21 23:09:06 -08:00
Vinson Lee
cea9250ff0 pipebuffer: Remove unnecessary header. 2010-01-21 23:07:29 -08:00
Chia-I Wu
cfb1ed3977 st/egl_g3d: Use glxinit.c from egl_xdri.
It is used to fetch the GLX visuals/fbconfigs.  Use egl_xdri's version
to avoid duplication.  It might be better to rewrite that part though.
2010-01-22 15:06:06 +08:00
Chia-I Wu
29732f982c docs: Update the status of egl_xdri.
Mention that it also supports DRISW.
2010-01-22 15:06:06 +08:00
Chia-I Wu
18b63b55d5 egl_xdri: Add support for DRISW.
Try DRISW if both DRI2 and DRI fail.  It can also be forced by setting
EGL_SOFTWARE.  When DRISW is used, single-buffered modes are ignored.
2010-01-22 15:03:45 +08:00
Vinson Lee
dc544ad9c6 draw: Remove unnecessary headers. 2010-01-21 22:57:12 -08:00
Chia-I Wu
caa75a7ce0 egl_xdri: Flush commands on context switch and buffer swap.
The corresponding DRI functions does not flush for us.
2010-01-22 14:54:41 +08:00
Chia-I Wu
3c9bf648ac egl_xdri: Report only OpenGL support.
It reported OpenGL ES support because some demos did not set
EGL_RENDERABLE_TYPE correctly.  The demos are fixed.
2010-01-22 14:54:40 +08:00
Chia-I Wu
fe0e35aba8 egl_xdri: Do not reinitialize in __glXInitialize.
__glXInitialize should return the same GLX display for the same X
display.  This issue is triggered by
a35f6bb207.
2010-01-22 14:54:40 +08:00
Chia-I Wu
0e54f9c529 egl_glx: Report only OpenGL support.
It reported OpenGL ES support because some demos did not set
EGL_RENDERABLE_TYPE correctly.  The demos are fixed.
2010-01-22 14:24:46 +08:00
Chia-I Wu
2279fa3c06 egl: Update driver Makefiles.
Update to use the new Makefile.template.
2010-01-22 13:29:23 +08:00
Chia-I Wu
e63272050f egl: Add Makefile.template for EGL drivers. 2010-01-22 12:02:00 +08:00
Chia-I Wu
883b57e66c winsys/drm: Update Makefile.template.
Mainly to respect LDFLAGS and remove unused target $(LIBNAME_EGL).  This
is based on the patch by Tomáš Chvátal <scarabeus@gentoo.org>.
2010-01-22 11:28:48 +08:00
Brian Paul
3bca8691b5 llvmpipe: use some local vars to index step arrays
Saves a few more cycles.
2010-01-21 19:10:03 -07:00
Brian Paul
1d23954a08 llvmpipe: s/inline/INLINE/ 2010-01-21 19:05:54 -07:00
Brian Paul
e24ea786fa llvmpipe: consolidate lp_scene_alloc_aligned() calls
Use just one call instead of four.  Good for a few more fps.
2010-01-21 19:04:55 -07:00
Brian Paul
798a9d3f94 llvmpipe: re-use a1 var in linear_coef() 2010-01-21 18:25:31 -07:00
Vinson Lee
e8b5203fbb svga: Remove unused variable. 2010-01-21 17:24:07 -08:00
Alan Coopersmith
f8107a45ce Fix typo in configure message for gcc -fvisibility=hidden
Need to use $CC for a shell variable, not $(CC) for a make variable
which the shell interprets as running the command "CC".

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-21 16:43:59 -08:00
Brian Paul
ff9b55da9a llvmpipe: area is an int here, not float 2010-01-21 17:31:43 -07:00
José Fonseca
a626565178 vmware/core: Flush preemptively the FIFO commands to keep the GMR working set within reasonable bounds. 2010-01-21 15:51:37 -08:00
José Fonseca
beb8e8f2f2 vmware/core: Put GMR pool size in a define. 2010-01-21 15:47:52 -08:00
José Fonseca
e45579e50b vmw/wgl: Update for pipebuffer changes.
This is a minimum change to keep things building and running minimally -- it
might cause applications to fail to allocate buffers due to out of
GMR memory.

A proper update will be commited later.
2010-01-21 15:27:26 -08:00
Brian Paul
a904a7b990 llvmpipe: manually unroll the inputs.step[] setup code
Good for a few more fps in some tests.
2010-01-21 16:21:33 -07:00
José Fonseca
31e49dc54e svga: Remove duplicate code. 2010-01-21 15:18:40 -08:00
José Fonseca
50edefec2d svga: Remove unused code. 2010-01-21 15:18:40 -08:00
José Fonseca
9782d7cdf3 svga: Don't swap buffers to system memory -- winsys' responsibility. 2010-01-21 15:18:40 -08:00
José Fonseca
c4ceba1141 pipebuffer: Release the lock during map wait. Cleanups. 2010-01-21 15:18:40 -08:00
José Fonseca
3498616b03 pipebuffer: Swap buffers out to system memory when running out of memory. 2010-01-21 15:18:40 -08:00
José Fonseca
0bc8851884 svga: Avoid synchronization issues when doing SW TNL. 2010-01-21 15:18:40 -08:00
José Fonseca
8410f7cde3 mesa: Use pipe_buffer_write_nooverlap where appropriate. 2010-01-21 15:18:40 -08:00
José Fonseca
37246f854b util: Set DISCARD & UNSYNCHRONIZED when uploading vertices sequentially. 2010-01-21 15:18:40 -08:00
José Fonseca
1797494946 util: Use pipe_buffer_write_nooverlap in blits / mipmap generation. 2010-01-21 15:18:40 -08:00
José Fonseca
a8477fb00c gallium: New inline to write buffers which avoids synchronization. 2010-01-21 15:18:40 -08:00
José Fonseca
707b28136f gallium: Set PIPE_BUFFER_USAGE_DISCARD flag in pipe_buffer_write. 2010-01-21 15:18:40 -08:00
José Fonseca
13c2475339 gallium: Remove temporary hack for the absence of a discard flag.
PIPE_BUFFER_USAGE_DISCARD flag now exists.
2010-01-21 15:18:40 -08:00
José Fonseca
0ae076bf40 svga: Follow buffer usage semantics properly.
It's necessary to download buffers from the host always, except if the
buffer is undefined, because:
- just PIPE_BUFFER_USAGE_CPU_WRITE doesn't guarantee all data is written
  -- old contents may still pierce through
- PIPE_BUFFER_USAGE_DISCARD refers to a range, not the whole buffer, so
  unless we track which parts have been modified and not we still need
  to download the data.
2010-01-21 15:18:40 -08:00
Vinson Lee
efc08bddb7 st/xorg: Remove unnecessary headers. 2010-01-21 15:05:21 -08:00
Brian Paul
e5829ccc2b progs/demos: call glutDestroyWindow() upon exit 2010-01-21 15:41:03 -07:00
Brian Paul
cd9d9e2436 llvmpipe: added simple perf/statistics counting facility
Currently counting number of tris, how many tiles of each size are
fully covered, partially covered or empty, etc.

Set LP_DEBUG=counters to enable.  Results are printed upon context
destruction.
2010-01-21 15:39:57 -07:00
Roland Scheidegger
2cf8164065 r200: fix CS section size mismatch
Partial fix for fdo bug 25544

The tex handling will still need CS drm changes,
see bug 25544 for more.
2010-01-21 17:33:51 -05:00
Vinson Lee
4222bf3d3c llvmpipe: Remove unnecessary headers. 2010-01-21 14:31:15 -08:00
Vinson Lee
c50fe2c55c svga: Remove unnecessary headers. 2010-01-21 12:12:11 -08:00
Roland Scheidegger
629bb3fa32 docs: enhance blend documentation 2010-01-21 20:48:13 +01:00
Roland Scheidegger
c6c9d3b091 docs: clean up sampler description 2010-01-21 20:22:24 +01:00
Roland Scheidegger
eba1e2a447 gallium: adapt util code to blend changes 2010-01-21 19:56:29 +01:00
Brian Paul
d65d5d2993 gallium: fix conditional rendering comment 2010-01-21 11:52:54 -07:00
Brian Paul
6c1549a77d gallium/docs: document conditional rendering 2010-01-21 11:52:36 -07:00
Roland Scheidegger
41667a9a3e gallium: new PIPE_CAP bits for the independent blend functionality 2010-01-21 19:45:43 +01:00
Brian Paul
6d4805b363 gallium: updated comments, whitespace fixes 2010-01-21 11:35:33 -07:00
Brian Paul
dc2914ab26 mesa: minor whitespace fix 2010-01-21 09:44:42 -07:00
Luca Barbieri
e59353f592 mesa: support for GL_ARB_fragment_coord_conventions
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-21 09:41:28 -07:00
Brian Paul
1ca2285511 progs/fp: testcases for GL_ARB_fragment_coord_conventions
Based on a patch from Luca Barbieri but moved the comments after
the !!ARBfp1.0 header
2010-01-21 09:38:50 -07:00
Brian Paul
24d3a7a251 docs: remove old pbuffer info 2010-01-21 08:16:54 -07:00
Brian Paul
aeff9f9725 docs: added target attribute to external URLs 2010-01-21 08:14:42 -07:00
Brian Paul
656834a871 docs: add links to the egl, openvg, opengles pages
And move the GLSL link up the use User Topics section.
2010-01-21 08:14:29 -07:00
Brian Paul
074abd889f softpipe: added region assertions in softpipe_get_tex_transfer() 2010-01-21 08:04:15 -07:00
Brian Paul
ed9bd82656 docs: new Mesa source tree overview page.
This has been sitting around for a while.  Incomplete, but a good start.
2010-01-21 08:04:15 -07:00
Chia-I Wu
4736e1cbbd dri: Remove unnecessary glapi headers.
They are not used at all.
2010-01-21 17:49:59 +08:00
Chia-I Wu
bdd2500805 Do not include glapi/dispatch.h outside Mesa core.
Include the glapi*.h directly instead.  glapi/dispatch.h became a Mesa
core header since 22884db174.
2010-01-21 17:48:38 +08:00
Chia-I Wu
1af67195b3 docs: Update documentation for OpenVG and OpenGL ES.
Update the instructions and add references to egl.html.
2010-01-21 15:59:06 +08:00
Chia-I Wu
ada46053a4 docs: Add documentation for EGL.
This is a short guide to EGL.  The drivers that are to be removed soon
are not mentioned in the guide.
2010-01-21 15:58:47 +08:00
Vinson Lee
e19b3c01f4 mach64: Remove unnecessary headers. 2010-01-20 22:52:49 -08:00
Vinson Lee
7c66211b7d i810: Remove unnecessary headers. 2010-01-20 22:02:51 -08:00
Alan Coopersmith
208e815c88 gallium/i965: Make brw_batchbuffer prototypes match in source & header
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-20 18:06:34 -08:00
Brian Paul
63f249bf90 llvmpipe: optimize tile writing code
The code which converts/copies color tiles to the linear layout has
been rewritten.  There's less arithmetic and better loop unrolling,
and possibly a better memory access pattern.
Some demos, like gears, are about 20% faster now.
2010-01-20 17:48:13 -07:00
Brian Paul
7319ae0954 llvmpipe: remove tile clipping code
The surface is always a multiple of the tile size now.
2010-01-20 17:47:26 -07:00
Brian Paul
0706dae088 llvmpipe: align display target size to multiple of tile size
This will allow us to skip clipping tiles to surface bounds.
2010-01-20 17:44:12 -07:00
Vinson Lee
0bc2cbf82a ffb: Remove unnecessary headers. 2010-01-20 16:27:44 -08:00
Brian Paul
58903b3781 llvmpipe: put TILE_SIZE #define in its own header
To avoid including lp_tile_soa.h in other places.
2010-01-20 17:23:11 -07:00
Brian Paul
9b534400d9 llvmpipe: add makefile rule for generating .s files 2010-01-20 17:19:00 -07:00
Corbin Simpson
c1334ce235 radeong: Fix EGL driver names.
Using "radeon" instead of "radeong" because we don't have classic EGL.
2010-01-20 12:22:05 -08:00
Tomas Chvatal
1ffb72a6bf Fix touching live system during install. 2010-01-20 12:22:05 -08:00
Brian Paul
4d2dc9da82 llvmpipe: updated comment 2010-01-20 11:32:48 -07:00
Brian Paul
a416123f5b xlib/softpipe: fix buffer memory leak
Fixes leak caused by window resize.
2010-01-20 10:34:45 -07:00
Roland Scheidegger
04cb5dfb1e llvmpipe: adapt to per-rendertarget blend changes 2010-01-20 18:27:53 +01:00
Roland Scheidegger
bef610f693 gallium: prepare for per-rendertarget blend enables, writemasks, blend funcs
GL 3.0 (EXT_draw_buffers2) and other APIs allow independent blend enables and
write masks per render target, ARB_draw_buffers_blend (and other APIs) also
allow independent blend functions. Things like dithering, logic ops however
are not extended to be per rendertarget, that might be conceptually possible
however it doesn't look like any API wants to expose this.
2010-01-20 18:26:49 +01:00
Alex Deucher
156c90e5c3 r200: re-adding missing pitch alignment check in blit code
lost after switch to common code
2010-01-20 11:19:06 -05:00
Brian Paul
05208b298d mesa: replace questionable CPU_TO_LE32 macro with function 2010-01-20 08:18:33 -07:00
Alan Coopersmith
506e27b972 Copy __FUNCTION__ portability #defines from mesa/compiler.h to eglcompiler.h
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-20 23:18:07 +08:00
Brian Paul
65d2a26637 st/mesa: fix format logic in compatible_src_dst_formats()
We need to consider the user-requested formats, not the actual device-
chosen formats.  See code comments for more details.
2010-01-20 08:09:53 -07:00
Brian Paul
4e34c5d0b5 docs: updated Mesa mailing list info 2010-01-20 08:09:53 -07:00
Alex Deucher
67aa704112 r200: fix some breakage after move to common blit code 2010-01-20 10:00:50 -05:00
Jakob Bornecrantz
9f728ed1c9 st/xorg: Fic bug and close drm_api at proper place 2010-01-20 14:55:07 +00:00
Alex Deucher
5a99ca490f r200: fix typo in 76cf261832
noticed by Maciej on IRC.
2010-01-20 09:06:49 -05:00
Chia-I Wu
c8b694b2c2 st/egl_g3d: Add support for driver probe.
Hook the drv->Probe callback to allow the drivers to probe displays.
The loading of state trackers is delayed to avoid unnecessary loading.
2010-01-20 18:15:30 +08:00
Chia-I Wu
11f4360f2e st/egl_g3d: Add support for probe to native displays.
The functions can be used to check if a display is supported without
creating a struct native_display.  It uses a probe object that can be
shared across drivers.
2010-01-20 18:15:26 +08:00
Chia-I Wu
c5766c4ae3 egl: Add a simple cache for driver probe.
In current design, multiple drivers will probe the same display and the
best driver is determined.  The cache can be used by the drivers to
store and share the probed data.
2010-01-20 17:44:12 +08:00
Chia-I Wu
cf22fd5e5b egl: Improve driver matching.
Make drv->Probe return a score so that the matching can be done by
finding the driver with the highest score.
2010-01-20 17:44:11 +08:00
Chia-I Wu
925f8113be egl: Rename _EGL_PLATFORM_X to _EGL_PLATFORM_POSIX.
The macro is used to determine if dlfcn.h or dirent.h is available.
POSIX is a better name than X in such case.
2010-01-20 17:44:11 +08:00
Chia-I Wu
f0c2871bf4 egl: Remove unused driver and display functions.
Remove _eglPreloadDriver, _eglLookupDriver, and _eglSplitDisplayString.
2010-01-20 17:40:07 +08:00
Chia-I Wu
57929eda3e egl: Use _eglPreloadDrivers.
Replace the use of _eglPreloadDriver by _eglPreloadDrivers.  The latter
supports EGL_DISPLAY which have a better chance to "just work".
2010-01-20 17:40:07 +08:00
Chia-I Wu
b3bcd33f7a egl: Add _eglPreloadDrivers.
It can be used to load the user driver specified by EGL_DRIVER, or a set
of drivers specified by EGL_DISPLAY, or the default driver, and in that
order.
2010-01-20 17:40:00 +08:00
Vinson Lee
e3cb614f93 softpipe: Remove unnecessary headers. 2010-01-20 00:08:54 -08:00
Vinson Lee
ac2a665fd7 i915g: Remove unnecessary headers. 2010-01-19 22:47:03 -08:00
Chia-I Wu
f291200a4b st/egl_g3d: Do not reuse the pipe transfer in ximage.
A pipe transfer is supposed to be temporary.  It should be created
before X*PutImage and destroyed afterwards.
2010-01-20 13:30:55 +08:00
Alan Coopersmith
77c0800381 mklib: Fix static library generation/installation on Solaris
Change ar flag from -v (-verbose) to -c (silence console output)
so that it stops causing make_ar_static_lib() to return a bunch
of output other than the resulting library file.

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-19 19:06:06 -08:00
Alan Coopersmith
917b6d2a4b Remove hardcoded -Wall from Radeon DRI makefiles
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-19 19:05:52 -08:00
Corbin Simpson
d4a3f7d3ca r300g: Move GB_AA_CONFIG to its eventual new home. 2010-01-19 18:15:17 -08:00
Corbin Simpson
fcbd285e42 r300g: Make invariant state into an atom. 2010-01-19 18:15:17 -08:00
Chia-I Wu
5e8240320a Merge remote branch 'origin/opengl-es-v2' 2010-01-20 10:02:15 +08:00
Brian Paul
1658f80153 util/blit: document params to util_blit_pixels_writemask() 2010-01-19 18:01:02 -07:00
Brian Paul
031f23ac3a mesa: added comment about future FBO formats 2010-01-19 18:01:02 -07:00
Marek Olšák
cd232ae22f st/mesa: enable EXT_framebuffer_multisample
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-19 18:01:02 -07:00
Alex Deucher
76cf261832 r100/r200: fix Y coord flipping in accelerated blits 2010-01-19 19:13:26 -05:00
Brian Paul
ec459f2aec llvmpipe: asst. task-related clean-ups 2010-01-19 16:58:25 -07:00
Alex Deucher
1bb6b1d9db r100/r200: fix dst pitch in blit code 2010-01-19 18:52:19 -05:00
Alex Deucher
f965345ea5 r200: add missing symlink to radeon_tex_copy.c 2010-01-19 18:48:36 -05:00
Maciej Cencora
1f0709fd8f r100/r200: align to pitch updates in blit interface 2010-01-20 00:09:11 +01:00
Maciej Cencora
2706bc6a88 r200: use common glCopyTex(Sub)Image code 2010-01-19 23:38:35 +01:00
Maciej Cencora
5170d2452b r100: use common glCopyTex(Sub)Image code 2010-01-19 23:38:35 +01:00
Maciej Cencora
8a4d7393bd radeon/r300/r600: share common glCopyTex(Sub)Image code 2010-01-19 23:38:34 +01:00
Maciej Cencora
0aed44f8a3 r600: align to r300 changes in the blit code
Pitch here means aligned width, not aligned width * bpp.
2010-01-19 23:38:34 +01:00
Maciej Cencora
0174dac5f3 r300/r600: move some bo offsets checking to blit code
In preperation for texcopy code sharing.
2010-01-19 23:38:34 +01:00
Maciej Cencora
ac8afd401f r600: prepare for some code sharing 2010-01-19 23:38:34 +01:00
Maciej Cencora
f54e96c597 r300: check if blitting for given format is supported earlier
Prevents failing assertions at later stage.
2010-01-19 23:38:33 +01:00
Maciej Cencora
acac99e35a r300: use nearest texture filtering for accelerated blits 2010-01-19 23:38:33 +01:00
Maciej Cencora
f2fea26269 r300: fix Y coord flipping in accelerated blits 2010-01-19 23:38:33 +01:00
Maciej Cencora
11affafc75 radeon: use mesa provided _mesa_tex_target_to_face function 2010-01-19 23:38:33 +01:00
Maciej Cencora
9363a813f1 r300: prepare for texcopy code sharing 2010-01-19 23:38:33 +01:00
Maciej Cencora
f542fde77e radeon: add blit function to vtbl 2010-01-19 23:38:09 +01:00
Jakob Bornecrantz
bea9ed4dc6 svga: Do a more propper creation of textures from handles 2010-01-19 23:30:31 +01:00
Jakob Bornecrantz
c78fe6e050 st/xorg: Don't leak BusID buffer 2010-01-19 23:30:30 +01:00
Eric Anholt
8f7dfe3025 intel: Remove dead note_fence vtbl hook. 2010-01-19 12:09:29 -08:00
Eric Anholt
a45f24c0a4 i965: Improve the hashing of brw_state_cache keys to include the cache_id.
No measurable difference on cairoperf.
2010-01-19 11:35:33 -08:00
Eric Anholt
d1cefabf98 i965: Remove obsolete comment about the state atoms. 2010-01-19 11:32:57 -08:00
Eric Anholt
fb4901593c i965: Upload as many VS constants as possible through the push constants.
The pull constants require sending out to an overworked shared unit
and waiting for a response, while push constants are nicely loaded in
for us at thread dispatch time.  By putting things we access in every
VS invocation there, ETQW performance improved by 2.5% +/- 1.6% (n=6).
2010-01-19 11:31:23 -08:00
Eric Anholt
62a96f74c9 i965: Allow for variable-sized auxdata in the state cache.
Everything has been constant-sized until now, but constant buffer
handling changes will make us want some additional variable sized
array.
2010-01-19 11:31:05 -08:00
Eric Anholt
7d4e674b21 intel: Use the new DRI2 flush invalidate entrypoint to signal frame done.
Previously for frame throttling we would wait on the first batch after
a swap before emitting another swap, because we had no hook after a
swap was emitted.  This meant that if an app managed to squeeze
everything it for a frame had into one batch, it would lock-step with
the GPU.  With the swapbuffers changes, we now have the entrypoint we
want.

This takes the WoW intro screen from 25% GPU idle and visibly jerky to
4-5% GPU idle and rather smooth.  Other apps such as OpenArena have
run into this problem as well.
2010-01-19 11:07:51 -08:00
Brian Paul
d8d80a8d74 llvmpipe: fix-up comment 2010-01-19 11:58:43 -07:00
Alan Coopersmith
a7aaf052f9 Sun compilers now support some gcc __attribute__ values
Sun cc 5.9 and later (__SUNPRO_C >= 0x590) support __attribute__ calls
for aligned, always_inline, noinline, pure, const, and malloc.

This commit includes updates to files that were regenerated by gl_XML.py
after adding the __SUNPRO_C checks to it

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-19 10:15:55 -08:00
Alan Coopersmith
adda7f3215 Check if gcc supports -fvisibility=hidden before adding to CFLAGS
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-19 10:15:55 -08:00
Brian Paul
aec3fe82e4 softpipe: remove redundant assignments
We initialized width/height/depth from pt->width0/height0/depth0 above.
2010-01-19 11:14:00 -07:00
Brian Paul
1073e39ab9 llvmpipe: re-order file list, fix indentation 2010-01-19 09:45:51 -07:00
Brian Paul
0fccfc9cc0 llvmpipe: remove unneeded DEBUG checks, use step var 2010-01-19 09:30:44 -07:00
Brian Paul
75f262b8b4 llvmpipe: updated comments 2010-01-19 09:30:13 -07:00
Jakob Bornecrantz
65354a7e3d st/xorg: Pass kernel driver name to drmOpen 2010-01-19 17:12:12 +01:00
Jakob Bornecrantz
a5fb5d6a54 st/drm: Expose kernel driver name
Based on patch by Chia-I Wu <olvaffe@gmail.com>

Expose the name of the kernel driver as accepted by drmOpenByName.
2010-01-19 17:10:04 +01:00
Ben Skeggs
116a02be22 st/dri: update dri2 drawables when viewport is changed
Fixes gnome-shell on nouveau, as well as window resize with various
other applications.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-01-19 17:06:22 +01:00
Luca Barbieri
e88294328c glx: Set GL context to null in __glXSetCurrentContextNull
__glXSetCurrentContextNull currently does not set the GL context to null
in the direct rendering case.

This can result in a segfault trying to flush an invalid old context
in glXMakeCurrent.

This fixes a crash starting the Unigine demos (they still don't work due
to missing extensions though).

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-19 08:59:37 -07:00
José Fonseca
7a39a5c1cb wgl: Check for PIPE_TEXTURE_USAGE_DISPLAY_TARGET support in exported color pixel formats.
Since all formats we export have PFD_DRAW_TO_WINDOW flag.
2010-01-19 06:14:12 -08:00
José Fonseca
5e870f4fe9 wgl: Don't export pure-stencil pixel formats.
They cause DCT's conform to always fail.
2010-01-19 06:14:12 -08:00
José Fonseca
e5da7b8548 softpipe: Fix vertex buffer memory leak. 2010-01-19 06:14:12 -08:00
Vinson Lee
faa99dd31d unichrome: Remove unnecessary headers. 2010-01-19 00:45:16 -08:00
Vinson Lee
45a27eacd6 mesa: Remove unnecessary header from attrib.c. 2010-01-18 22:50:08 -08:00
Alex Deucher
ef631104d5 r100/r200/r600: fix typo in 2b1d5ea4f0 2010-01-19 01:47:04 -05:00
Vinson Lee
2613fa815a mesa: Remove unnecessary header from blend.c. 2010-01-18 22:45:23 -08:00
Alex Deucher
2b1d5ea4f0 r100/r200/r600: check if blitting for given format is supported earlier
based on Maciej's r300 patch.
2010-01-19 01:42:41 -05:00
Alex Deucher
a67cd1994f r100/r200: add blit support for ARGB4444 2010-01-19 01:26:35 -05:00
Vinson Lee
c4ad036ce1 mesa: Remove unnecessary headers from buffers.c. 2010-01-18 22:17:03 -08:00
Vinson Lee
7366d8e7d2 mesa: Remove unnecessary header from convolve.c. 2010-01-18 21:56:58 -08:00
Vinson Lee
08063ba449 mesa: Fix typo of 'unknown' in debug.c. 2010-01-18 21:41:31 -08:00
Vinson Lee
b36b85f9d0 mesa: Remove unnecessary headers from debug.c. 2010-01-18 21:37:18 -08:00
Vinson Lee
6deb8c9831 mesa: Remove unnecessary header from depthstencil.c. 2010-01-18 21:34:25 -08:00
Vinson Lee
2660511ea9 mesa: Remove unnecessary headers from dlist.c. 2010-01-18 21:31:02 -08:00
Vinson Lee
7395ab042a mesa: Remove unnecessary header from drawpix.c. 2010-01-18 21:22:47 -08:00
Vinson Lee
0b3109aa05 mesa: Remove unnecessary header from enable.c. 2010-01-18 21:17:45 -08:00
Vinson Lee
536e3c9168 mesa: Remove unnecessary headers from fbobject.c. 2010-01-18 21:14:04 -08:00
Vinson Lee
b6dce54214 mesa: Remove unnecessary header from formats.c. 2010-01-18 21:07:53 -08:00
Vinson Lee
2cbc3e0a20 mesa: Remove unnecessary header from image.c. 2010-01-18 21:02:19 -08:00
José Fonseca
65fa11959f softpipe: Skip depth testing for PIPE_S8_UNORM. 2010-01-18 20:34:19 -08:00
José Fonseca
8fb92e96e9 mesa: Handle PIPE_FORMAT_B8G8R8X8_UNORM. 2010-01-18 20:34:19 -08:00
José Fonseca
bcadde2068 pipebuffer: Ensure buffer size/alignment is not zero. 2010-01-18 20:34:19 -08:00
José Fonseca
dc298559c6 svga: Ensure buffer size/alignment is not zero. 2010-01-18 20:34:19 -08:00
Vinson Lee
ebd1075598 mesa: Remove unnecessary headers from lines.c. 2010-01-18 19:32:51 -08:00
Vinson Lee
d0125e3c29 mesa: Remove unnecessary header from mipmap.c. 2010-01-18 19:23:47 -08:00
Vinson Lee
ed5a116eb4 mesa: Remove unnecessary header from pixel.c. 2010-01-18 19:20:56 -08:00
Vinson Lee
2f83948370 mesa: Remove unnecessary headers from pixelstore.c. 2010-01-18 19:14:23 -08:00
Vinson Lee
419ae5a483 mesa: Remove unnecessary header from points.c. 2010-01-18 19:10:05 -08:00
Vinson Lee
80ea879cfa mesa: Remove unnecessary header from polygon.c. 2010-01-18 19:03:54 -08:00
Alex Deucher
f6d529083f r60: Add relocs for CB_TILE/FRAG
as per 46dc6fd3ed
2010-01-18 22:00:05 -05:00
Vinson Lee
6603550353 mesa: Remove unnecessary header from state.c. 2010-01-18 18:54:54 -08:00
Vinson Lee
ec29ba12a6 mesa: Remove unnecessary headers from texcompress.c. 2010-01-18 18:52:24 -08:00
Vinson Lee
f8db32acbd st/dri: Add comment for intentional fallthrough in case statement. 2010-01-18 18:14:03 -08:00
Corbin Simpson
09f69b1e5d docs: Clarify PIPE_TEXTURE_USAGE_DYNAMIC. 2010-01-18 18:06:55 -08:00
Corbin Simpson
f90733c116 docs: Use proper XOR symbol. 2010-01-18 18:06:55 -08:00
Alex Deucher
daccc962a1 r100: add blit support
Only enabled with KMS.
2010-01-18 20:56:58 -05:00
Alex Deucher
1ced546577 r200: add blit support
Only enabled with KMS.
2010-01-18 20:56:58 -05:00
Corbin Simpson
047719182f docs: Spacing in TGSI formulae.
Some of those still look atrocious. :T
2010-01-18 17:31:56 -08:00
Corbin Simpson
28fd246634 docs: Grammar and refs in Rasterizer. 2010-01-18 17:17:09 -08:00
Corbin Simpson
2598f00078 docs: Cleanup Rasterizer a bit.
I'm getting better at this, I think.
2010-01-18 17:12:13 -08:00
Corbin Simpson
2b4ad02321 docs: Fix terms and refs.
I fail at Sphinx-style ReST.
2010-01-18 16:40:39 -08:00
Brian Paul
9a23d810be llvmpipe: tweak a comment 2010-01-18 17:39:54 -07:00
Corbin Simpson
4f52dfeda2 docs: Slowly keep fleshing out more info. 2010-01-18 15:30:28 -08:00
Corbin Simpson
9811ebf61f docs: PIPE_TEXTURE_USAGE info.
From IRC with Jakob.
2010-01-18 15:30:28 -08:00
Eric Anholt
0714474ae2 i965: Clean up constbuf handling by splitting reladdr/non-reladdr loads.
The codepaths in the function were almost entirely different.
2010-01-18 13:52:47 -08:00
Eric Anholt
c653f5f387 i965: Only set up the stack register if it's going to get used. 2010-01-18 13:52:47 -08:00
Eric Anholt
d5b964234c i965: Fix loads of non-relative-addr constants after a reladdr load.
Fixes piglit vp-arl-constant-array-huge-overwritten.
2010-01-18 13:52:47 -08:00
Brian Paul
89bb07730b util: fix broken util_ringbuffer_dequeue()
The tests for an empty ring buffer were incorrect.
Fixes glxinfo segfaults.

Plus, add a new assertion.
2010-01-18 14:35:43 -07:00
Christoph Bumiller
c6559b7e01 nv50: fix constant vtxattr methods
This function was untested, sorry.
2010-01-18 21:40:30 +01:00
Brian Paul
62623c4dc5 llvmpipe: added show_tiles and show_subtiles debug options
These options draw lines over the tiles to show the 64x64 tile
bounds and 16x16 sub-tile bounds.  For debugging/visualization.
2010-01-18 13:10:14 -07:00
Christoph Bumiller
0d6e3dd84d nv50: make instanced drawing work with edge flags
And fix some obvious mistakes introduced in the
previous instancing commit.
2010-01-18 19:53:29 +01:00
Christoph Bumiller
e74db4f20f nv50: cannot exit shaders on a control flow instruction
Fixes lockup triggered by this ingenious shader:
   1: CALL :3
   2: END
   3: BGNSUB ...
2010-01-18 19:53:29 +01:00
Marcin Slusarz
9fb9c9f9ca nv50: fix nv50_program->immd memory leak 2010-01-18 19:53:29 +01:00
Brian Paul
28576c9ac5 st/mesa: change instruction count assertion to > 0
Shaders should at least have an END instruction.
2010-01-18 11:26:57 -07:00
Michal Krol
7472cd0f1f tgsi: Fix behaviour of dimension index.
The dimension index always addresses the second-dimension axis.
2010-01-18 19:13:49 +01:00
Michal Krol
463351ea6c tgsi: Allow TEMPORARY registers as indirect address into source operands. 2010-01-18 19:13:45 +01:00
Michal Krol
4698a865e0 tgsi: Add ureg_DECL_immediate_block_uint().
Allows declaring a contiguous block of immediates. Useful for
relative indexing.
2010-01-18 19:13:42 +01:00
Brian Paul
4c041fac96 glsl: remove __inline directive
It makes no difference with gcc -O3, for example.
2010-01-18 11:06:57 -07:00
Marcin Slusarz
e978b24c87 st/dri: fix optionCache memory leaks
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-18 10:48:06 -07:00
Marcin Slusarz
23ae318200 glxgears: unbind current context before "destroying" it
glXDestroyContext does not destroy the context if it's still
connected to some window. Unbind context from window to test it.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-18 10:44:53 -07:00
Brian Paul
0766780a98 st/mesa: updated comments and whitespace 2010-01-18 10:43:33 -07:00
Marcin Slusarz
e5347ca94d st/mesa: fix memory leak in st_translate_mesa_program
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-18 10:39:27 -07:00
Alex Deucher
3310fe0e91 r600: fix some warnings 2010-01-18 11:21:19 -05:00
Jerome Glisse
1560183536 r600: Update default state size to account for the new relocation
the new relocation for CB_COLOR0_FRAG & CB_COLOR0_TILE add 4
dwords to the default command stream. Increase the prediction
default size to take this into account
2010-01-18 15:32:24 +01:00
Jerome Glisse
46dc6fd3ed r6xx/r7xx: emit relocation for FRAG & TILE buffer
FRAG & TILE buffer are unused but still they need
to be associated with a valid relocation so that
userspace can't try to abuse them to overwritte
GART and then try to write anywhere in system
memory.
2010-01-18 12:14:07 +01:00
Andre Maasikas
7b82f0f67e r600: fix shadow_ambient shader
rtype enums are different, DST_REG_OUTPUT got SRC_REG_CONSTANT in some
shaders and produced invalid output/hang
as TEX output is temp register always set out src to SRC_REG_TEMPORARY
2010-01-18 12:49:06 +02:00
Corbin Simpson
0857f38c39 radeong: Don't allocate HW BOs for constantbufs.
We have broken 1000 FPS. Hell yes.

Heavily inspired by Marek's patch, but using pipebuffer instead of
a roll-your-own malloc.
2010-01-18 02:35:08 -08:00
Marek Olšák
673ae6266e r300g: fix polygon offset
As per classic r300.

Not sure why glean/polygonOffset still fails, but we do emit the same register
values as in classic.
2010-01-18 02:35:08 -08:00
Marek Olšák
d3d41cbc35 r300g: fix vertex data swizzle 2010-01-18 02:35:08 -08:00
Marek Olšák
cd553ec8be r300g: do not align compressed textures to a tile size 2010-01-18 02:35:08 -08:00
Chia-I Wu
064eb0a095 st/egl_g3d: Clean up for x11_drawable_get_depth.
Fix a wrong comment and remove an unnecessary #include.
2010-01-18 17:15:57 +08:00
Corbin Simpson
a16d353b5e dri: Add an MSAA-enabled factor to DRI configs.
4 samples should be enough for GLUT to be satisfied, and I think most
of the HW that does any MSAA, can do it.

Note that any pipe that doesn't multisample can just ignore the
corresponding flag in pipe_rasterizer_state.
2010-01-18 01:13:33 -08:00
Corbin Simpson
c273ab007d dri: Properly calculate number of modes for MSAA.
Split from the next patch for bisection purposes only.
2010-01-18 01:13:33 -08:00
Corbin Simpson
58a7d8db98 radeong: Check DRM version, and report stats. 2010-01-18 01:13:33 -08:00
Corbin Simpson
11a2bbc3e9 radeong: Use vram_size instead of vram_visible.
The kernel will decide on its own what to give us.
2010-01-18 01:13:33 -08:00
Chia-I Wu
8311a49b2d progs/egl: Pass EGLDisplay to eglCopyBuffers.
X Display was wrongly passed to eglCopyBuffers.
2010-01-18 17:07:19 +08:00
Chia-I Wu
ede755af4c st/egl_g3d: Add support for eglCopyBuffers.
It uses a slow path to copy the render buffer of the surface to the
target pixmap.  We might be able to create a pipe context for
EGLDisplay's use and use a blitter context for the purpose.  It is left
for a future consideration.
2010-01-18 17:07:06 +08:00
Chia-I Wu
f8244e2946 st/egl_g3d: Add is_pixmap_supported to native display interface.
The function may be used to support, for example,
EGL_MATCH_NATIVE_PIXMAP and EGL_KHR_image_pixmap.
2010-01-18 17:04:02 +08:00
Chia-I Wu
fda897ad71 st/egl_g3d: Update validate to use an attachment mask.
A validate call asks for the buffers of a native surface.  Using a mask
to represent the interested buffers is more intuitive.  It also rules
out corner cases such as a single attachment being listed multiple
times.
2010-01-18 14:28:13 +08:00
Chia-I Wu
1ed6311945 st/vega: Fix window resizing with egl_g3d.
egl_g3d calls st_set_framebuffer_surface on window resize.  It updates
the renderbuffer's geometry and makes st_resize_framebuffer a no-op.
This commit improves the no-op check a little bit.  It can do better
after gallium-fb-dimensions is merged.
2010-01-18 12:07:57 +08:00
Chia-I Wu
ef517c9385 st/vega: Call screen->update_buffer instead of winsys->update_buffer.
This removes the last reference to winsys and is per mesa/st.
2010-01-18 11:57:30 +08:00
Chia-I Wu
3b71386426 tgsi: Add missing semantic name in text parser.
This time, INSTANCEID is missing...
2010-01-18 11:57:30 +08:00
Jakob Bornecrantz
90cdf0d67c cso: Add set_vertex_samplers function 2010-01-18 00:12:42 +00:00
Jakob Bornecrantz
2a60302e51 softpipe: Fix leak in vbuf draw module 2010-01-18 00:12:42 +00:00
Christoph Bumiller
1448d2f252 nv50: implement instanced drawing
Too bad we don't have hw array divisors or a method for
setting startInstance.
2010-01-17 17:48:01 +01:00
Jakob Bornecrantz
a4bbabf494 softpipe: Move st/python's malloc winsys to softpipe
Users of softpipe can still specify thier own winsys
but now there is a default one also that uses malloc.
This allows the malloc winsys to be shared with other
users of softpipe.
2010-01-17 16:44:39 +00:00
Jakob Bornecrantz
0e4e2c57d1 st/xlib: Make glXGetProcAddressARB visible 2010-01-17 16:44:39 +00:00
Jakob Bornecrantz
876a6b4865 gallium: Support swig "compiler" in p_compiler.h 2010-01-17 16:44:39 +00:00
Jakob Bornecrantz
31c626811a i965g: Link against drm_intel instead of drm_radeon 2010-01-17 16:44:25 +00:00
Corbin Simpson
945cea01d9 r300g: Check for bogus texture targets. 2010-01-17 01:13:45 -08:00
Marek Olšák
b62d339301 r300g: fix the rasterization of secondary color
When the secondary color is used, the primary color must always be rasterized
regardless of whether it is used or not.
2010-01-17 01:10:58 -08:00
Marek Olšák
7d3090f0fe r300g: fix vertex colors with 8 bits per channel
The piglit BGRA tests pass now.
2010-01-17 01:10:32 -08:00
Marek Olšák
c4a2f13a5c r300g: simplify is_format_supported 2010-01-17 01:04:30 -08:00
Marek Olšák
8959608051 r300g: output texture debug messages if only RADEON_DEBUG=tex is set 2010-01-17 01:03:50 -08:00
Marek Olšák
08edbe9f14 r300g: move debug flags into r300_screen 2010-01-17 01:02:12 -08:00
Marek Olšák
21f3bbf149 r300g: disable the MIP filter for NPOT textures
Safety first.
2010-01-17 01:01:25 -08:00
Marek Olšák
37897a65e2 r300g: fix the CS size when emitting invariant state 2010-01-17 01:00:35 -08:00
Alan Coopersmith
816cb90e7c radeon_compiler: include main/compiler.h for compiler portability macros
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Corbin Simpson <MostAwesomeDude@gmail.com>
2010-01-17 00:55:39 -08:00
Corbin Simpson
c69bd0ead7 r300g: Stop using indices.
Sorry, it was a good game, but it just doesn't work.
2010-01-16 18:17:40 -08:00
Corbin Simpson
eedebfa579 r300g: Respect fill modes in indices fallback. 2010-01-16 18:17:40 -08:00
Keith Whitwell
591401ff05 llvmpipe: use new u_ringbuffer for scene queue 2010-01-17 00:30:23 +00:00
José Fonseca
ba5d600c90 Merge remote branch 'origin/master' into lp-binning
Conflicts:
	src/gallium/drivers/llvmpipe/lp_quad.h
	src/gallium/drivers/llvmpipe/lp_setup.c
2010-01-16 23:21:06 +00:00
Keith Whitwell
164fd16cfb util: add generic ringbuffer utitilty 2010-01-16 21:15:55 +00:00
Chia-I Wu
dee52d5bd3 gallium: Fix uninitialized instance divisor and index. 2010-01-16 18:18:09 +01:00
Christoph Bumiller
83387cb6c4 nv50: fix tile flags for scanout tex usage 2010-01-16 18:07:31 +01:00
Christoph Bumiller
0ae3db1734 nv50: handle all and more system values 2010-01-16 18:07:31 +01:00
Christoph Bumiller
4c223aaa3b nv50: hook up geometry programs 2010-01-16 18:07:31 +01:00
Christoph Bumiller
bbb615382d nv50: support for geometry programs in nv50_program 2010-01-16 18:07:31 +01:00
Christoph Bumiller
e791e6f27c nv50: get access to primitive input space
Vertex data in geometry programs is located in p[] space.
The base address in p[] for vertex i is located in vertex
attribute space, i.e. a[i << 2].

This means p[] is always accessed with an address register,
and I had to to mess with their allocation once again.

Also fixes negative offsets e.g. CONST[ADDR[0].x - 3].
2010-01-16 18:07:30 +01:00
Alex Deucher
8d24273750 r600: remove stray END_BATCH in blit code 2010-01-16 08:45:08 -05:00
Jakob Bornecrantz
a5c03bd6f1 draw: Fix memory leak in gs code 2010-01-16 10:44:57 +00:00
Dave Airlie
66e561a036 i965g: make xorg state tracker build i965g_drv.so
don't make modesetting_drv.so anymore
2010-01-16 19:28:45 +10:00
Alex Deucher
8b704396a3 r600: improve blit support
- fill in more src/dst formats
- disable depth copies for now
- set proper data formats in render target regs
- fill in additional default state

The swizzles on some of the less used mesa formats
are probably wrong.
2010-01-15 23:06:18 -05:00
Andre Maasikas
7283a246ce r600: add initial blit support 2010-01-15 23:06:05 -05:00
Alex Deucher
ec8ce40083 r600: add r600_blit.c
Unfinished.
2010-01-15 23:05:56 -05:00
Patrice Mandin
923aab93d9 nouveau: nv30: Remove useless variables fs, txp. Also do not change txf, as bit 13 is in the texture format
Signed-off-by: Patrice Mandin <patmandin@gmail.com>
2010-01-15 22:29:13 +01:00
Brian Paul
fdfe06ad80 llvmpipe: implement scissor test in triangle setup 2010-01-15 12:06:00 -07:00
Brian Paul
adb48d5350 llvmpipe: remove lp_rast_triangle::min/max fields
These values aren't needed outside the do_triangle_ccw() function.
2010-01-15 11:52:14 -07:00
Brian Paul
47fee14687 llvmpipe: skip 4x4 in/out test code
It's a litte faster to just do the in/out testing in the shader
jit code.
2010-01-15 11:35:30 -07:00
Brian Paul
12ba9e99db llvmpipe: added comment about lookup-tables vs. computation 2010-01-15 11:26:35 -07:00
Brian Paul
4bef3575e6 llvmpipe: change 'in' to boolean, add comments 2010-01-15 11:25:13 -07:00
Brian Paul
2797f2bf57 llvmpipe: generate two shader varients, one omits triangle in/out testing
When we know that a 4x4 pixel block is entirely inside of a triangle
use the jit function which omits the in/out test code.

Results in a few percent speedup in many tests.
2010-01-15 11:21:16 -07:00
Michal Krol
e124080cd6 util: Handle FORMAT_Z32_FLOAT in util_pack_z(). 2010-01-15 19:00:15 +01:00
Michal Krol
1433a2d935 util: Handle the remaining formats in pipe_put_tile_rgba(). 2010-01-15 19:00:11 +01:00
Michal Krol
d29e72633c util: Fix encoding for R8G8B8A8_UNORM formats and friends. 2010-01-15 19:00:09 +01:00
Michal Krol
42d55953b1 tgsi: Add ureg_property_gs_input_prim(). 2010-01-15 19:00:06 +01:00
Michal Krol
181adca5d6 tgsi: Add ureg_src_dimension(). 2010-01-15 19:00:03 +01:00
Michal Krol
857b37980c regress: Add .gitgnore for *.png files. 2010-01-15 18:59:59 +01:00
Michal Krol
b96976cc7c draw: Add missing header include. 2010-01-15 18:59:55 +01:00
Brian Paul
3b1920a349 llvmpipe: asst code changes in lp_state_fs.c 2010-01-15 10:25:59 -07:00
Roland Scheidegger
bf575b6c27 gallium: document set_constant_buffer 2010-01-15 18:25:14 +01:00
Roland Scheidegger
5e5d0ad081 Merge branch 'gallium-noconstbuf'
Conflicts:
	src/gallium/drivers/softpipe/sp_draw_arrays.c
	src/mesa/state_tracker/st_draw_feedback.c
2010-01-15 18:09:45 +01:00
Brian Paul
345178a7fc llvmpipe: put labels on some value refs 2010-01-15 10:04:16 -07:00
Roland Scheidegger
1c4ad77812 gallium: remove set_edgeflags from docs 2010-01-15 17:55:42 +01:00
Brian Paul
f97eeeec6b llvmpipe: add extra flags to DEFINES, no CFLAGS
Doesn't make any real difference but -D flags are put into DEFINES
everywhere else.
2010-01-15 09:16:34 -07:00
Brian Paul
5d57e70ffa configs: remove -ansi from linux-debug
-ansi implies -std=c89 but that conflicts with the -std=c99 flag
which is also provided.

Allows the r300g driver to compile.
2010-01-15 09:02:56 -07:00
Michal Krol
d1767bfdab tgsi: Fix sanity checks for indirect registers. 2010-01-15 11:44:23 +01:00
Chia-I Wu
8cfdbfbcbd st/egl_g3d: Avoid validation upon buffer swap or flush frontbuffer.
With screen->update_buffer being hooked, leave the job to the state
trackers.
2010-01-15 18:12:23 +08:00
Chia-I Wu
b2c7b08299 st/egl_g3d: Hook to update_buffer of the pipe screen.
It is a notification from the client APIs that the surface size might
have changed.
2010-01-15 18:12:20 +08:00
Chia-I Wu
51b00574a2 st/egl_g3d: Always override flush_frontbuffer.
Instead of letting the native displays install their own version of
flush_frontbuffer, always override the callback with a version that
calls the flush_frontbuffer of the native surface.
2010-01-15 17:42:57 +08:00
Michal Krol
6664a6dd7f st/mesa: Initialise vertex element instance divisor to 0. 2010-01-15 07:52:18 +01:00
Luca Barbieri
f7748d72b4 draw: Add GALLIUM_DUMP_VS environment variable.
Add GALLIUM_DUMP_VS to dump the vertex shader to the console like
GALLIUM_DUMP_FS in softpipe.
2010-01-15 07:30:17 +01:00
Brian Paul
8b29d39e99 progs/trival: updated tri-scissor-tri.c test
The scissor left/right/bottom/top bounds can be moved by pressing
the l/r/b/t and L/R/B/T keys.
2010-01-14 19:22:38 -07:00
Brian Paul
4461442849 llvmpipe: implement scissor testing
The scissor test is implemented as another per-quad operation in
the JIT code.  The four scissor box params are passed via the
lp_jit_context.  In the JIT code we compare the quad's x/y coords
against the clip bounds and create a new in/out mask that's AND'd
with the main quad mask.

Note: we should also do scissor testing in the triangle setup code
to improve efficiency.  That's not done yet.
2010-01-14 19:15:00 -07:00
Brian Paul
ca12e30d97 llvmpipe: minor comment update 2010-01-14 19:08:19 -07:00
Brian Paul
16ecd2f078 llvmpipe: clean-up, fixing up frame dump/debug code 2010-01-14 19:05:55 -07:00
Brian Paul
4f5675e94b gallium/util: added debug_dump_texture() and ppm output
Now we can get dump debug images on Linux too.
2010-01-14 19:04:42 -07:00
Jakob Bornecrantz
ccc888c39e st/xorg: If dri2 version is 2 support version 1 as well
Thanks to X server commit 2e2c5b216cc1c7a9bc26bd2c68226aaed5fc52ca
it is possible to be ABI compatible in version 2 with version 1 of
the DRI2 interface.
2010-01-15 01:38:04 +00:00
Jakob Bornecrantz
3e1241d4f8 st/xorg: Set enforce version to 1 if not defined 2010-01-15 01:38:04 +00:00
Thomas Hellstrom
ae97520e37 ws/vmware: Check DRM version also when bootstrapping in dri2 mode.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-01-18 15:56:57 +01:00
Thomas Hellstrom
5f2d60a715 st/dri: Don't request a fake front if the server adds one automatically.
We use the presence of the getBuffersWithFormat extension function to
detect whether the server automatically adds a front.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-01-18 13:39:25 +01:00
Vinson Lee
d773f28ff2 mesa: Remove unnecessary headers from texformat.c. 2010-01-18 00:47:56 -08:00
Vinson Lee
39824945fa mesa: Remove unnecessary headers from texgetimage.c. 2010-01-18 00:14:51 -08:00
Vinson Lee
6938dccf1a mesa: Remove unnecessary header from teximage.c. 2010-01-17 22:31:53 -08:00
Vinson Lee
c847e7d07b mesa: Remove unnecessary header from texobj.c. 2010-01-17 20:50:15 -08:00
Vinson Lee
59eed7a201 mesa: Remove unnecessary header from texparam.c. 2010-01-17 16:21:11 -08:00
Vinson Lee
3e876431d0 mesa: Remove unnecessary headers from texstate.c. 2010-01-17 16:08:59 -08:00
Vinson Lee
6b6ac9aca0 mesa: Use preprocessor to comment out code. 2010-01-17 15:48:39 -08:00
Vinson Lee
ae943f8e20 mesa: Remove unnecessary headers from vtxfmt.c. 2010-01-17 01:49:16 -08:00
Vinson Lee
97e44cde17 mesa: Remove unnecessary headers from arbprogparse.c. 2010-01-16 23:41:05 -08:00
Vinson Lee
97fc7ae69f mesa: Remove unnecessary header from nvvertparse.c. 2010-01-16 16:15:37 -08:00
Vinson Lee
5a4d5b694c glsl: Remove unnecessary header from prog_execute.c. 2010-01-16 16:06:58 -08:00
Vinson Lee
148498d8cc glsl: Remove unnecessary header from prog_statevars.c. 2010-01-16 15:51:52 -08:00
Vinson Lee
0d62242082 glsl: Remove unnecessary headers from shader_api.c. 2010-01-16 15:35:56 -08:00
Vinson Lee
1f7762f62b glsl: Remove unnecessary header from slang_emit.c. 2010-01-16 15:00:29 -08:00
Vinson Lee
89950fbe24 st/mesa: Remove unnecessary header from st_cb_drawpixels.c. 2010-01-16 13:29:15 -08:00
Vinson Lee
59db91e2ee glsl: Remove unnecessary header from slang_builtin.c. 2010-01-16 02:20:51 -08:00
Vinson Lee
535084996b glsl: Remove unnecessary headers from slang_compile.c. 2010-01-16 02:16:24 -08:00
Vinson Lee
1d3bdc2090 glsl: Remove unnecessary header from slang_link.c. 2010-01-16 02:02:49 -08:00
Vinson Lee
10bd931949 glsl: Remove unnecessary header from slang_log.c. 2010-01-16 01:50:08 -08:00
Vinson Lee
533b6e8deb st/mesa: Remove unnecessary header from st_atom_framebuffer.c. 2010-01-16 01:39:04 -08:00
Vinson Lee
3eb85bf7d9 st/mesa: Remove unnecessary header from st_atom_pixeltransfer.c. 2010-01-16 00:52:34 -08:00
Vinson Lee
bc639f291b st/mesa: Remove unnecessary header from st_atom_sampler.c. 2010-01-16 00:45:36 -08:00
Vinson Lee
227fc5a308 st/mesa: Remove unnecessary header from st_atom_shader.c. 2010-01-16 00:36:31 -08:00
Vinson Lee
cc2f2268f5 st/mesa: Remove unnecessary headers from st_cb_accum.c. 2010-01-16 00:30:25 -08:00
Vinson Lee
e1d4781cd4 st/mesa: Remove unnecessary headers from st_cb_bitmap.c. 2010-01-16 00:08:54 -08:00
Vinson Lee
cc770c8409 st/mesa: Remove unnecessary headers from st_cb_blit.c. 2010-01-15 23:17:00 -08:00
Vinson Lee
6906bf08cc st/mesa: Remove unnecessary headers from st_cb_clear.c. 2010-01-15 23:02:07 -08:00
Vinson Lee
668d871d95 st/mesa: Remove unnecessary headers from st_cb_drawpixels.c. 2010-01-15 22:55:47 -08:00
Alex Deucher
adcde22952 r600: fill in some missing XRGB tex formats 2010-01-15 23:04:19 -05:00
Alex Deucher
81eed59a2c r600: set tiling correctly for texturing from depth buffer 2010-01-15 23:04:09 -05:00
Alex Deucher
114ab07aee r600: fix typo in SQ setup 2010-01-15 23:04:00 -05:00
Vinson Lee
56cd5806e8 st/mesa: Remove unnecessary header from st_cb_fbo.c. 2010-01-15 18:24:12 -08:00
Vinson Lee
a9f6255431 st/mesa: Remove unnecessary headers from st_cb_feedback.c. 2010-01-15 18:20:56 -08:00
Vinson Lee
2d2d890048 st/mesa: Remove unnecessary header from st_cb_program.c. 2010-01-15 16:28:56 -08:00
Vinson Lee
fbda223893 st/mesa: Remove unnecessary header from st_cb_queryobj.c. 2010-01-15 16:27:28 -08:00
Brian Paul
f595e72337 tgsi: fix detection of front-facing attribute
This code was not updated when we added TGSI_SEMANTIC_FACE a while ago.
2010-01-15 14:57:58 -07:00
Brian Paul
2c5aa02e20 swrast: add missing call to _swrast_depth_bounds_test()
We were calling this from the CI span function, but not the RGBA
span function.

I don't know of a test program for the GL_EXT_depth_bounds_test
extension...
2010-01-15 14:25:33 -07:00
Brian Paul
7385681797 swrast: fix broken _swrast_depth_clamp_span()
The integer Z clamping range depends on the number of bits
in the Z buffer because that's the scale factor used when we
transform NDC coords by the viewport/depth range.

Fixes fd.o bug #25972 but only for Z buffers up to a depth
of 30 bits.  Beyond that we get into messy integer overflow
issues and things fall apart.
2010-01-15 14:19:25 -07:00
Vinson Lee
79a5a28390 st/mesa: Remove unnecessary header from st_cb_rasterpos.c. 2010-01-14 23:05:42 -08:00
Vinson Lee
9c2ef74a76 st/mesa: Remove unnecessary headers from st_cb_readpixels.c. 2010-01-14 23:03:37 -08:00
Vinson Lee
cde041cd13 st/mesa: Remove unnecessary header from st_cb_strings.c. 2010-01-14 22:30:00 -08:00
Vinson Lee
644572a372 st/mesa: Remove unnecessary headers from st_cb_texture.c. 2010-01-14 22:27:13 -08:00
Vinson Lee
4f8baf7dce st/mesa: Remove unnecessary headers from st_cb_viewport.c. 2010-01-14 19:00:27 -08:00
Vinson Lee
53c6c38412 st/mesa: Remove unnecessary headers from st_context.c. 2010-01-14 18:53:51 -08:00
Vinson Lee
604e9ec2c4 st/mesa: Remove unnecessary header from st_draw_feedback.c. 2010-01-14 18:46:51 -08:00
Vinson Lee
9e7778d7aa st/mesa: Remove unnecessary header from st_extensions.c. 2010-01-14 18:34:59 -08:00
Vinson Lee
8a8a27b01a st/mesa: Remove unnecessary header from st_format.c. 2010-01-14 18:19:39 -08:00
Vinson Lee
eaedc1bb3e st/mesa: Remove unnecessary headers from st_framebuffer.c. 2010-01-14 18:10:06 -08:00
Vinson Lee
6890b06982 st/mesa: Remove unnecessary headers from st_gen_mipmap.c. 2010-01-14 17:54:47 -08:00
Brian Paul
dfd6e762e7 llvmpipe: remove redundant code in llvmpipe_set_blend_color() 2010-01-14 16:21:49 -07:00
Jakob Bornecrantz
877cadb655 r300g: Build driver by default
Do the auto trick that is used for both i915, i965 and svga.
2010-01-14 22:51:25 +00:00
Jakob Bornecrantz
b01ffb12ed Merge branch 'mesa_7_7_branch'
Conflicts:
	src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
	src/gallium/auxiliary/util/Makefile
	src/gallium/drivers/r300/r300_state_derived.c
2010-01-14 22:31:04 +00:00
Brian Paul
4414a1a73c llvmpipe: assorted clean-ups in texture code 2010-01-14 14:19:16 -07:00
Michal Krol
ffd2848056 gallium: Document drawing commands. 2010-01-14 18:55:52 +01:00
Michal Krol
5184b02b07 Merge branch 'instanced-arrays'
Conflicts:
	src/gallium/drivers/softpipe/sp_draw_arrays.c
2010-01-14 18:11:41 +01:00
Corbin Simpson
1bc77e9931 r300g: Cleanup from last few commits.
Strangely enough, the code solidified pretty quickly.
2010-01-14 09:01:37 -08:00
Łukasz Krotowski
60628c65c9 r300g: Really destroy translated buffer at the end.
Note that indexSize is changed by r300_translate_elts(). Also make sure
it's destroyed on errors.
2010-01-14 09:01:37 -08:00
Brian Paul
7fcfb71931 progs/trivial: test user clip plane in tri-point-line-clipped.c 2010-01-14 09:38:47 -07:00
Brian Paul
0a82692154 progs/trivial: test glPolygonMode(POINT/LINE) with frustum clipping
Note whether the new verts introduced by clipping show up as points
and lines along the edge of the window...
2010-01-14 09:22:30 -07:00
Brian Paul
d6b4655e13 gallium/util: silence warning about array initializers 2010-01-14 09:22:30 -07:00
Chia-I Wu
81430b95d0 egl_g3d: Check if the creation of pipe or st context fails.
It should not return an incomplete EGLContext to the users.
2010-01-14 17:29:48 +08:00
Chia-I Wu
6cb89b23ee st/egl_g3d: Use a sequence number to decide if validation is required.
It is not safe to assume that the native surface has not changed since
the last validation by checking the geometry alone.  Add a sequence
number to "validate" callback for that purpose.  This is inspired by
Luca Barbieri's work.
2010-01-14 17:25:19 +08:00
Vinson Lee
252812bf15 st/mesa: Remove unnecessary header from st_program.c. 2010-01-13 23:28:00 -08:00
Vinson Lee
c109ca9c49 st/mesa: Remove unnecessary header from st_texture.c. 2010-01-13 23:16:05 -08:00
Vinson Lee
6b39e8aeb0 swrast: Remove unnecessary header from s_accum.c. 2010-01-13 23:01:03 -08:00
Vinson Lee
78411881d3 swrast: Remove unnecessary header from s_atifragshader.c. 2010-01-13 22:58:07 -08:00
Vinson Lee
0a70868131 swrast: Remove unnecessary header from s_bitmap.c. 2010-01-13 22:45:54 -08:00
Vinson Lee
886cffb44e swrast: Remove unnecessary headers from s_copypix.c. 2010-01-13 22:43:16 -08:00
Vinson Lee
cf061c24e0 swrast: Remove unnecessary header from s_depth.c. 2010-01-13 22:36:01 -08:00
Vinson Lee
d1631f734a swrast: Remove unnecessary header from s_drawpix.c. 2010-01-13 22:30:04 -08:00
Vinson Lee
f649870c9b swrast: Remove unnecessary header from s_feedback.c. 2010-01-13 22:20:44 -08:00
Corbin Simpson
6a2936b876 gallium/docs: Random things sitting around in my stash. 2010-01-13 20:46:53 -08:00
Corbin Simpson
264e548d86 r300g: Use indices to translate index buffers of ubytes.
progs/redbook/aapoly, among others, works fine now.
2010-01-13 20:44:49 -08:00
Corbin Simpson
8feb27b8ff radeong: Change DRI driver name to radeong. 2010-01-13 18:37:17 -08:00
Corbin Simpson
9bb2b90191 r300g: Disable immediate mode rendering for now.
Will re-enable when the bugs are ironed out.
2010-01-13 18:36:54 -08:00
Brian Paul
2ba1c8189a llvmpipe: use one loop in lp_rast_clear_zstencil()
This is just a tiny bit faster.
2010-01-13 18:58:42 -07:00
Brian Paul
f94a99170e llvmpipe: optimize lp_rast_clear_color() for non-gray colors
This makes a big difference in progs that clear to a non-gray color.
Some demos are 30-50% faster.
2010-01-13 18:54:50 -07:00
Brian Paul
f19f218e7a llvmpipe: minor assorted clean-ups 2010-01-13 18:01:45 -07:00
Brian Paul
bc1b38af71 gallium/draw: s/clipper/clip_stage/ to be consistant with other stages 2010-01-13 17:39:45 -07:00
Brian Paul
c873613403 gallium/draw: whitespace and comments 2010-01-13 17:39:45 -07:00
Brian Paul
ee343feba1 gallium/draw: remove always-true conditional 2010-01-13 17:39:45 -07:00
Brian Paul
8519b244f7 gallium: remove forward struct decl
Other struct types (like pipe_texture) are referenced before they're
defined so no reason to special-case this one.
2010-01-13 17:39:44 -07:00
Jesse Barnes
1cfd769c2e DRI2: don't send DRI2 requests the server doesn't know about
At init time, NULL out the hooks that send the server new requests.
DRI2 never supported these extensions, so this preserves old behavior on
old servers with new Mesa.
2010-01-13 19:01:51 -05:00
Jesse Barnes
62eb28c810 GLX/DRI2: pass X drawable ID instead
These happened to be the same in my testing since I was using apps that
depend on the GLX 1.2 behavior where X and GLX drawables are
interchangeable.
2010-01-13 18:42:55 -05:00
Brian Paul
018b78ad64 llvmpipe: check render targets before other textures 2010-01-13 15:32:55 -07:00
Brian Paul
1287277446 llvmpipe: also check render target textures in lp_setup_is_texture_referenced() 2010-01-13 15:30:42 -07:00
Brian Paul
0b279c5382 llvmpipe: indentation fixes 2010-01-13 15:10:57 -07:00
Brian Paul
db58192cfb llvmpipe: re-get scene pointer after flushing 2010-01-13 15:10:57 -07:00
Brian Paul
d59fe44896 llvmpipe: check for texture usage in all scenes 2010-01-13 15:10:57 -07:00
Brian Paul
a27b12171d llvmpipe: add scene texture referencing code 2010-01-13 15:10:57 -07:00
Brian Paul
592e40aa7b llvmpipe: added scene functions for texture reference counting
When a texture is used in the scene we add it to a list of texture
references.  The lp_scene_is_textured_referenced() function tells
us if a texture is referenced by the scene.
2010-01-13 15:10:57 -07:00
Brian Paul
4769328fe1 llvmpipe: comments 2010-01-13 15:10:57 -07:00
Brian Paul
a36395d487 llvmpipe: comments 2010-01-13 15:10:57 -07:00
Brian Paul
9be1feacf2 llvmpipe: added llvmpipe_texture_const() 2010-01-13 15:10:56 -07:00
Brian Paul
ddb94661a4 llvmpipe: minor comment upgrades 2010-01-13 15:10:56 -07:00
José Fonseca
7df4c88088 llvmpipe: Opaque shader implies complete colormask too. 2010-01-13 22:07:24 +00:00
José Fonseca
a1acbff299 llvmpipe: Reset the bin when shading a whole tile with an opaque shader. 2010-01-13 21:51:47 +00:00
Jesse Barnes
ed59b13da8 GLX: use glproto CFLAGS etc. when building
Roll the glproto check into the dri2proto and libdrm check so we get the
proper CFLAGS and LDFLAGS for the package.
2010-01-13 15:48:14 -05:00
Keith Whitwell
4231006e29 llvmpipe: add bin debugger
Adjust definition of empty_bin according to what's actually in empty
bins.  We often have a state packet before/after load commands.

Still need to do something about the fence packets.
2010-01-13 20:14:04 +00:00
Keith Whitwell
95ee14f147 llvmpipe: implement lp_rast_load_zstencil
Load zbuffer contents for binned scenes that don't start with a clear
and which have a bound zbuffer.
2010-01-13 16:52:44 +00:00
Thomas Hellstrom
a9086f2d17 st/dri: Make sure we always request a fake front.
This should be the correct, but sub-optimal way to handle things on
pre-1.7 servers. For servers that automatically adds a fake front
we should never request the fake front and handle the reply differently.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-01-13 17:45:21 +01:00
Brian Paul
0bb5c3060f llvmpipe: added debug warning 2010-01-13 09:32:21 -07:00
Brian Paul
4439aab7b7 llvmpipe: comments and LLVMValueRef naming 2010-01-13 09:32:21 -07:00
Brian Paul
212f3a6cb3 llvmpipe: tweak subpixel_snap() arithmetic
This adjustment fixes some rasterization differences between llvmpipe
and softpipe (and other renderers).
2010-01-13 09:32:21 -07:00
Keith Whitwell
db83ad4b43 llvmpipe: improve empty-bin test further
Remove unused param, add comments.  Thanks to Brian for review.
2010-01-13 16:29:39 +00:00
Keith Whitwell
f4b29e6ad3 llvmpipe: improve empty-bin test
We emit at most two clear packets (color and z respectively).
2010-01-13 15:49:24 +00:00
Keith Whitwell
da45f49cc6 llvmpipe: quick hack to short-circuit empty bins 2010-01-13 15:18:32 +00:00
José Fonseca
1b333453e4 svga: Fix compile_vs error code.
It could erroneously return PIPE_OK in some circumstances.

Make compile_fs code identical.
2010-01-13 13:40:09 +00:00
Michal Krol
ea0cc47a4f svga: Fix call to translate::run(). 2010-01-13 11:13:00 +01:00
Corbin Simpson
aeb34b2489 r300g: Account for CS space used per atom.
Oh yeah, those atoms are startin' to pay off. The main obstacle now
for OA playability is the absurdly low default mouse sensitivity, IMO.
Not totally smooth yet, but getting there.
2010-01-13 01:44:58 -08:00
Corbin Simpson
a930dc7ee9 r300g: Two dirty state optimizations. 2010-01-13 01:07:49 -08:00
Corbin Simpson
ae4eb25132 r300g: DCE in emit. 2010-01-13 00:57:03 -08:00
Vinson Lee
831764fa75 swrast: Remove unnecessary header from s_fragprog.c. 2010-01-12 23:54:15 -08:00
Corbin Simpson
e4e5acc833 r300g: Lower the immd mode threshold. 2010-01-12 22:22:22 -08:00
Vinson Lee
d6588a9372 swrast: Remove unnecessary header in s_lines.c. 2010-01-12 21:59:58 -08:00
Corbin Simpson
c1db20280c r300g: Fix is_r400 status for rs4xx and rc4xx.
As suggested by agd5f.
2010-01-12 21:52:00 -08:00
Vinson Lee
7debc532d5 swrast: Remove unnecessary header from s_points.c. 2010-01-12 21:51:19 -08:00
Corbin Simpson
948b7e97a6 r300g: Switch to immediate mode for tiny renders.
Useful for e.g. blitter.
2010-01-12 21:50:14 -08:00
Vinson Lee
11034bfa97 swrast: Remove unnecessary header from s_readpix.c. 2010-01-12 21:41:09 -08:00
Vinson Lee
a01b9eac04 swrast: Remove unnecessary header from s_texcombine.c. 2010-01-12 20:36:33 -08:00
Vinson Lee
c239f38709 tnl: Remove unnecessary header from t_context.c. 2010-01-12 20:14:36 -08:00
Vinson Lee
2c7cf3f9c9 tnl: Remove unnecessary headers from t_draw.c. 2010-01-12 20:02:44 -08:00
Vinson Lee
dffcbee8e7 tnl: Remove unnecessary header from t_pipeline.c. 2010-01-12 19:55:24 -08:00
Vinson Lee
a24d852630 tnl: Remove unnecessary header from t_rasterpos.c. 2010-01-12 19:49:19 -08:00
Vinson Lee
264f4101cd tnl: Remove unnecessary header from t_vb_program.c. 2010-01-12 19:45:25 -08:00
Marek Olšák
50ae9c6073 r300g: emit blend LTE/GTE thresholds on >=RV350
As per classic r300.
2010-01-12 18:08:58 -08:00
Marek Olšák
46992664d1 r300g: update the texture initialization so that it respects tiling
This is still work-in-progress and tiling is not enabled by default.
2010-01-12 18:08:58 -08:00
Marek Olšák
99ea4c0c7e r300g: add emission of texture tiling bits 2010-01-12 18:08:58 -08:00
Marek Olšák
e279d18232 r300g: add is_r400 flag
r4xx has some additional fragment shader registers compared to r3xx.
2010-01-12 18:08:58 -08:00
Marek Olšák
4c9a8a14e5 r300g: silence a warning 2010-01-12 18:08:58 -08:00
Marek Olšák
f3c4f2ef62 r300g: only emit scissor when needed
Reverting some bits from ce1c493ff8.

Given the latest fixes, it's not needed to always emit scissor, really.
2010-01-12 18:08:57 -08:00
Marek Olšák
a2926a2a8b Revert "r300g: Placate kernel checker by explicitly disabling depth test."
This reverts commit e920ee23b3.

Assuming the FB state is not dirty and the DSA state is, then the depth test
will be re-enabled, making the kernel checker angry. Reverting the commit
fixes piglit/glsl-bug-22603.
2010-01-12 18:08:57 -08:00
Marek Olšák
6633484774 r300g: mark all states as dirty after flush
It fixes almost all regressions introduced lately.
2010-01-12 18:08:57 -08:00
Vinson Lee
c631501003 vbo: Remove unnecessary headers from vbo_exec.c. 2010-01-12 17:07:24 -08:00
Vinson Lee
94d238e757 vbo: Remove unnecessary header from vbo_exec_array.c. 2010-01-12 16:55:36 -08:00
Vinson Lee
37d326503d vbo: Remove unnecessary header from vbo_exec_draw.c. 2010-01-12 16:37:30 -08:00
Brian Paul
7e4c75c040 llvmpipe: fix indentation, comment typo 2010-01-12 17:12:49 -07:00
Brian Paul
ec9cfac768 llvmpipe: debug checks: make sure scene is empty at key points 2010-01-12 17:12:07 -07:00
Brian Paul
c560b97b17 llvmpipe: assert that we're putting data into a valid bin 2010-01-12 17:11:40 -07:00
Brian Paul
214ffad015 llvmpipe: clamp maxx,maxy to framebuffer size (in terms of tiles)
In some corner cases the right-most / bottom-most vertex can be
right on the edge of the framebuffer.  Because the maxx, maxy vals
are computed with a series of float/int, pixel/tile transformations
we can end up with maxx >= scene->x_tiles or maxy >= scene->y_tiles.
This leads to putting data into bins that never get processed, or
reset.  This becomes stale data that can lead to segfaults.

Clamping fixes this.
2010-01-12 17:08:07 -07:00
Brian Paul
de10168a46 llvmpipe: added lp_scene_is_empty() 2010-01-12 17:06:19 -07:00
Brian Paul
4061ca02dd llvmpipe: silence unused var warnings 2010-01-12 13:01:32 -07:00
Michal Krol
8c53a2576e gallium: draw_arrays/elements_instanced() are of type void. 2010-01-12 18:51:27 +01:00
Brian Paul
a32e9b2a2d llvmpipe: remove unused #define 2010-01-12 10:11:36 -07:00
Marcin Slusarz
90762bd355 nv50: fix 2 off by one memory leaks (nv50_miptree_level->image_offset) 2010-01-12 17:39:23 +01:00
Marcin Slusarz
c83093973e nv50: fix memory leak on nv50_pc free 2010-01-12 17:38:52 +01:00
Roland Scheidegger
a407636efb gallium: remove point_size_min and point_size_max from rasterizer state
The state tracker is responsible for clamping to any graphics API enforced
size min/max limits for both the static point_size setting as well as per
vertex point size (in the vertex shader).
Note that mesa state tracker didn't actually use these values.
2010-01-12 15:54:13 +01:00
José Fonseca
26c78a4968 gallium: Rename ALIGN_STACK -> PIPE_ALIGN_STACK for consistency. 2010-01-12 12:15:24 +00:00
José Fonseca
5dfd5ed5e7 gallium: Simplify PIPE_ALIGN_VAR.
gcc allows pre-fix variable attributes.

Suggested by Ian Romanick.
2010-01-12 12:11:04 +00:00
José Fonseca
86bfe974b8 gallium: Generalize the alignment macros to other compilers and any alignment. 2010-01-12 12:11:04 +00:00
Corbin Simpson
ce1c493ff8 r300g: Always emit scissors.
Save some code, improve FPS, and fix piglit tests. Everybody wins.
2010-01-12 02:33:55 -08:00
Chia-I Wu
28272bc472 st/egl_g3d: Get the stapi from the driver.
egl_g3d_get_st was called because the driver argument was not given
before.  It can be fixed now.
2010-01-12 17:56:48 +08:00
Chia-I Wu
3e6139d158 egl: Add _EGLDriver as the first argument to GetProcAddress.
The rest of the driver API has it as the first argument.  It should be
there so that a driver has access to itself.
2010-01-12 17:53:57 +08:00
Chia-I Wu
31d2786239 egl_xdri: Fix build breakage.
driScreen->swapBuffers takes 3 more arguments since
daf7fe69f7.
2010-01-12 17:51:08 +08:00
Vinson Lee
aee9a6f4e1 vbo: Remove unnecessary headers from vbo_save.c. 2010-01-12 00:50:05 -08:00
Vinson Lee
d2271d8a39 vbo: Remove unnecessary header from vbo_save_loopback.c. 2010-01-11 23:53:13 -08:00
Vinson Lee
083dae14bd vbo: Remove unnecessary header from vbo_split_copy.c. 2010-01-11 22:46:30 -08:00
Chia-I Wu
1c1015bd53 st/egl_g3d: Improve comments to the native display interface.
Document the future of __GLcontextModes.  Improve the description of
surface validation and native_flush_frontbuffer.
2010-01-12 14:06:11 +08:00
Vinson Lee
0d65a68f51 x86: Remove unnecessary header from x86_xform.c. 2010-01-11 21:04:16 -08:00
Corbin Simpson
daa446fa83 r300g: Add back dirty state check.
From 07ea7e6c80. This is the only questionable part of that commit,
AFAICT...
2010-01-11 20:54:12 -08:00
Corbin Simpson
e920ee23b3 r300g: Placate kernel checker by explicitly disabling depth test.
This probably should disable stencil, too, if the kernel cares enough.

Note: When atomized, framebuffer setup should go towards the end anyway,
but it *must* follow these test setups anyway.
2010-01-11 20:54:12 -08:00
Corbin Simpson
22d615a9c4 r300g: Avoid segfault on binding null RS state. 2010-01-11 20:54:11 -08:00
Brian Paul
fe0e627685 st/mesa: removed unused var 2010-01-11 21:25:58 -07:00
Brian Paul
935fdbe142 st/mesa: comments, whitespace 2010-01-11 21:25:58 -07:00
Vinson Lee
8e9ceb8309 progs/xdemos: Remove unnecessary header from corender.c. 2010-01-11 20:24:57 -08:00
Vinson Lee
477d51537f progs/trivial: Remove unnecessary headers from tri-fbo-tex.c. 2010-01-11 20:21:50 -08:00
Vinson Lee
7241f5140f progs/trivial: Remove unnecessary header from tri-fbo-tex-mip.c. 2010-01-11 20:15:59 -08:00
Vinson Lee
ae8ed89f24 progs/tests: Remove duplicate included header in vparray.c. 2010-01-11 19:58:08 -08:00
Vinson Lee
6ed607cce6 progs/tests: Add newline to end of printf in vparray.c. 2010-01-11 19:56:04 -08:00
Vinson Lee
7bfa54c6a4 progs/redbook: Remove unnecessary header from aapoly.c. 2010-01-11 19:52:22 -08:00
Vinson Lee
2178abfba3 progs/glsl: Remove duplicate included header from shtest.c. 2010-01-11 19:42:55 -08:00
Vinson Lee
78ddce9fda progs/demos: Remove unnecessary header from morph3d.c. 2010-01-11 19:29:26 -08:00
Chia-I Wu
d8299af4ab docs: Add documentation for OpenGL ES.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-12 11:25:09 +08:00
Chia-I Wu
76e726515a progs/es2: Correctly set renderable type and client version.
Correctly set EGL_RENDERABLE_TYPE and EGL_CONTEXT_CLIENT_VERSION for
OpenGL ES 2.0.  Because es2_info is copied from es1_info, the fix for it
actually goes to es1_info.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-12 11:25:09 +08:00
Chia-I Wu
43f67b61fd progs/es1: Bind texture image after rendering.
Unlike FBO, eglBindTexImage is supposed to be called after rendering.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-12 11:25:09 +08:00
Chia-I Wu
99a37ed195 configure.ac: Fix es state tracker build.
mesa/es should be built before the es state trackers.  This is done by
separating those that need to be built early from SRC_DIRS to CORE_DIRS.
The new variable is not exported, and will be prepended to SRC_DIRS.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-12 11:25:09 +08:00
Chia-I Wu
3f3340ca16 st/es: Clean up install target.
Use DESTDIR and MINSTALL.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-12 11:25:09 +08:00
Chia-I Wu
182c382813 st/es: Fix build issue after merge.
In c847a13d38, auxiliaries becomes a
single library;  In e388d62b47, the
default build is changed to have -fvisibility=hidden.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-12 11:25:09 +08:00
Chia-I Wu
0ce5b128d7 mesa/es: Update sources.mk.
Add/remove files that are unused/used to the omit list.  Finally, they
should all be features that can be omitted.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-12 11:25:09 +08:00
Chia-I Wu
bffe94d48a mesa/es: Fix build issue after merge.
In cd6b8dd9e8, color read/type fields are
moved;  Based on 068596c9a7 and
cc020425e9, GLSL builtin library is
autogenerated and GLSL libraries are built and used.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-12 11:25:08 +08:00
Chia-I Wu
562c127693 Merge branch 'master' into opengl-es-v2
Conflicts:
	src/mesa/main/dd.h
2010-01-12 11:25:02 +08:00
Brian Paul
3fce8ad2de Revert "util: Build u_bitmask.o when using make."
This reverts commit 01eff0e6d2.

u_bitmask.c was already in the C_SOURCES list.
2010-01-11 20:19:30 -07:00
Vinson Lee
f07e87ffba progs/tests: Silence fprintf format warning. 2010-01-11 19:16:36 -08:00
Chia-I Wu
077d6dd750 winsys/drm: Use egl_g3d to build EGL drivers.
The new EGL drivers use egl_g3d and respect EGL_DISPLAYS.  They are
named after the display supported and the DRM name.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-12 11:09:00 +08:00
Chia-I Wu
a68b51deb2 st/egl_g3d: Add support for KMS native display.
The KMS native display implements the modeset interface using DRM
modesetting.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-12 11:09:00 +08:00
Chia-I Wu
2dcdf19ee3 st/egl_g3d: Add support for EGL_MESA_screen_surface.
This is implemented through the modeset interface.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-12 11:09:00 +08:00
Chia-I Wu
c67ad0eee8 st/egl_g3d: Update the native display interface for modesetting.
The new interface can be used to implement EGL_MESA_screen_surface.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-12 11:09:00 +08:00
Chia-I Wu
49381d63e6 st/egl_g3d: New EGL state tracker that uses Gallium.
This new (intermediate) EGL state tracker is the base work for EGL
drivers that uses Gallium.  It makes it easier to support new window
systems.

Currently, there is support only for X11.  This driver supports multiple
APIs (OpenVG, OpenGL, ...) and supports hardware acceleration through
winsys/drm.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-12 11:08:57 +08:00
Vinson Lee
b4bc208529 progs/demos: Remove unnecessary header from isosurf.c. 2010-01-11 19:03:18 -08:00
Chia-I Wu
6dafd61ab2 winsys/drm: Add name field to drm_api.
The name can be used for driver selection.  It has the same name as the
DRI driver does right now.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-12 10:55:36 +08:00
Chia-I Wu
39790cab13 egl: EGL_SCREEN_BIT_MESA is a valid bit.
Update _eglValidateConfig so that it passes the test.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-12 10:55:35 +08:00
Chia-I Wu
472a601966 progs/egl: Fix screen surface demos.
Set the screen surface size to the mode size, as the spec requires the
screen surface size to be larger than the mode size.  Besides, bind the
API to OpenGL as they are written in it.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-12 10:55:35 +08:00
Chia-I Wu
c657c80180 progs/egl: glGenTextures is called too early in xeglbindtex.
It should be called after eglMakeCurrent.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-12 10:55:35 +08:00
Chia-I Wu
3bcb08f6c4 progs: Check the number of configs returned by eglChooseConfig.
A successful eglChooseConfig call does not imply there are valid
configs.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-12 10:55:35 +08:00
Chia-I Wu
033bd95802 progs: Add missing EGL_RENDERABLE_TYPE for EGL demos.
The default value of EGL_RENDERABLE_TYPE is EGL_OPENGL_ES_BIT.  The
proper values should be specified if we are not using OpenGL ES.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-12 10:55:35 +08:00
Chia-I Wu
2d44b6f884 st/mesa: Remove st_api.c.
st_api.c is supposed to define st_api_OpenGL to advertise OpenGL
support.  However, the linker discards the symbol because it has no
user.  It is better to leave this to other state trackers that link to
libmesagallium.a.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-12 10:55:35 +08:00
Chia-I Wu
ea014ed461 st/vega: Make it compatible with st_public.h.
It missed a stub for st_get_proc_address, and st_make_current should
return a boolean.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-12 10:55:35 +08:00
Chia-I Wu
940360a2e5 st/vega: Advertise OpenVG support.
Define st_api_OpenVG to advertise OpenVG support.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-12 10:55:35 +08:00
Zack Rusin
d880b64423 st/xorg: move exaMoveInPixmap before trying to fetch it
as Michel suggested, this is a cleaner way of fixing crashes caused
by exaGetPixmapDriverPrivate returning null since the data hasn't
been moved yet.
2010-01-11 18:27:59 -05:00
Zack Rusin
3447d545d9 st/xorg: fix a rare video crash
sometimes dst isn't present if a window is in a middle of a resize, stop
crashing in those cases and just ignore a frame.
2010-01-11 18:03:49 -05:00
Brian Paul
5cf4630969 llvmpipe: disable the all in/out test code for now
It's still faster not to try to special case the "all pixels are
known to be inside the triangle" case.
2010-01-11 15:30:56 -07:00
Jesse Barnes
f2f83d9a78 GLX: check glproto version
This was a silent dependency before, but now we really need 1.4.11 for
INTEL_swap_event support, so check for it.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-01-11 17:30:41 -05:00
Brian Paul
9a10d14a44 llvmpipe: move, update comments 2010-01-11 15:30:17 -07:00
Jesse Barnes
c6ef705e41 Merge branch 'master' of ssh://people.freedesktop.org/~jbarnes/mesa
Conflicts due to DRI1 removal:
	src/mesa/drivers/dri/intel/intel_context.c
	src/mesa/drivers/dri/intel/intel_screen.c
2010-01-11 15:23:29 -05:00
Brian Paul
3b5d849268 llvmpipe: refactor generate_fragment() code
This will make it easier to generate multiple versions of the fragment
code per variant.
2010-01-11 13:16:02 -07:00
Brian Paul
46b5bd6cad llvmpipe: do the all-in test on the scalar c0 instead of vector c0
This still isn't faster, but committing it for posterity.
2010-01-11 12:59:39 -07:00
Roland Scheidegger
70c8d2a297 gallium: remove const qualifier from pipe_buffer argument in set_constant_buffer 2010-01-11 16:30:48 +01:00
Chia-I Wu
cca66dbb59 st/xlib: Mark GLX functions as public.
Mark all functions start with glX as public.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-11 10:04:44 -05:00
Chia-I Wu
b1356df647 st: Mark functions in st_public.h and vg_tracker.h as public.
These functions are the API of Gallium state tracker, and are used by
EGL.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-11 10:04:41 -05:00
Chia-I Wu
108c2bf5ab gallium: Add PUBLIC macro for function visibility.
As the default build has -fvisibility=hidden, add a macro to control the
visibility.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-11 10:04:37 -05:00
Chia-I Wu
5ec99c04a9 st/vega: Fix breakage from -fvisibility=hidden.
Mark VG and VGU functions as public.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-11 10:04:28 -05:00
José Fonseca
015a5a126b python: Integrate with llvmpipe if possible.
Temporary. We should soon have the ability to integrate with any driver
via glx extensions.
2010-01-11 14:01:07 +00:00
José Fonseca
f2f1672027 python: Mask out PIPE_TEXTURE_USAGE_DISPLAY_TARGET usage.
As displaying surfaces directly isn't supported by the python state
tracker.
2010-01-11 14:01:07 +00:00
José Fonseca
3e8c82037f python: Prefer PIPE_FORMAT_Z32_UNORM. 2010-01-11 14:01:07 +00:00
José Fonseca
76185ecad6 python: Set PIPE_TEXTURE_USAGE_RENDER_TARGET instead of DISPLAY_TARGET.
As the python state tracker is not integrated with window system an
cannot present surfaces directly.
2010-01-11 14:01:06 +00:00
Corbin Simpson
1c75edf3e8 util: Set flatshade for blitter.
It was bugging me. +1 FPS on softpipe.
2010-01-11 05:43:29 -08:00
Corbin Simpson
2bfb21790c radeong: Check for DONTBLOCK before flushing, remove dead code. 2010-01-11 05:43:29 -08:00
Keith Whitwell
86f450060d llvmpipe: force constant interpolation of flatshade colors
Nice speedup for gears.
2010-01-11 12:12:59 +00:00
Keith Whitwell
ad74ea2869 st/mesa: early exit on error path
Can't rely on asserts having any effect on flowcontrol for release
builds.
2010-01-11 12:02:53 +00:00
Keith Whitwell
094525fb23 llvmpipe: remove opencoded constant 2010-01-11 11:06:15 +00:00
Keith Whitwell
16c1ad54bc llvmpipe: remove scissor cliprect derived state
Was previously calculating the intersection of the scissor rectangle
and the framebuffer dimensions.  Rendering is already restricted to
framebuffer dimensions by other means, so scissor testing (when
implemented) can just use the scissor state directly.
2010-01-11 11:06:15 +00:00
Keith Whitwell
f9626ce10e util/blitter: remove unused variable 2010-01-11 10:56:41 +00:00
Luca Barbieri
eea6a7639f Fix compressed texture loads for non-minimal pitches
The current glCompressedTexImage support in the state tracker assumes
that compressed textures have minimal pitch.

However, in some cases this is not true, such as for mipmaps of non-POT
compressed textures on nVidia hardware.

This patch adds a check and does a memcpy for each line instead of the
whole image in that case.

Signed-off-by: Keith Whitwell <keithw@vmware.com>

Tweaks for C90 compilation.
2010-01-11 10:53:02 +00:00
Corbin Simpson
bfcafbe15d r300g: Don't bother testing for empty scissors.
If somebody goes through that much effort, they probably intended it.
So humor them. :3
2010-01-10 23:38:05 -08:00
Corbin Simpson
973326027f util: Apply Brian's suggested blit improvements.
copypix works just fine.
2010-01-10 23:30:01 -08:00
Dave Airlie
deaa634e02 gallium: u_blitter add overlapping blit support.
the xorg state tracker really wants the driver to handle overlapping
blits, and r300 uses u_blitter for blits. This patch adds overlapping
blit support via a temporary surface when its required.
2010-01-10 23:18:31 -08:00
Corbin Simpson
1e9ffb6340 r300g: Atomize scissors.
Argfl. Some of this code is so questionable.
2010-01-10 23:15:05 -08:00
Corbin Simpson
8ca491386d r300g: Move TCL bypass switch to main context. 2010-01-10 23:15:05 -08:00
Corbin Simpson
47f59cfc8e r300g: Atomize viewport.
Goddammit, some of these hax are really annoying.
2010-01-10 23:15:05 -08:00
Corbin Simpson
e7d760ff09 r300g: Move ROPCNTL to the top of the emit order.
According to the docs, this decreases stalls, and indeed we get a tiny
bit more glxgears from it.
2010-01-10 23:15:05 -08:00
Corbin Simpson
7b569bef15 r300g: Don't avoid rewriting ZTOP.
Simplify the code. Added a comment to keep me from doing it again.
2010-01-10 23:15:05 -08:00
Corbin Simpson
46fafdd455 r300g: Atomize rasterizer.
I want to stab things now.
2010-01-10 23:15:04 -08:00
Marcin Kościelnicki
d9de848de1 nouveau: Make winsys recognise the original NV50. 2010-01-11 15:16:12 +10:00
Dave Airlie
42f2880ffd radeon: fix prediction for r100 inline vert/elt emits.
On r100 we emit the indices inline so we need to account
for that in the emission size.
2010-01-11 13:24:59 +10:00
Dave Airlie
554043bff7 radeon: fix bug in realloc code.
This bug was fixed in libdrm ages ago, port to non-kms
2010-01-11 13:24:58 +10:00
Ben Skeggs
32da02f7c1 st/dri: update dri2 drawables when viewport is changed
Fixes gnome-shell on nouveau, as well as window resize with various
other applications.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-01-11 11:44:38 +10:00
Corbin Simpson
8a2c961798 r300g: Atomize ZTOP.
Also do state-change checks. ZTOP's too important to not check.
2010-01-10 11:49:25 -08:00
Corbin Simpson
07ea7e6c80 r300g: Atomize DSA.
Also a bit of ztop.
2010-01-10 11:17:34 -08:00
Corbin Simpson
249374b853 r300g: Atomize UCP.
Meh.
2010-01-10 11:17:34 -08:00
Corbin Simpson
9d3db601c7 r300g: Atomize blend color. 2010-01-10 11:17:34 -08:00
Corbin Simpson
d496399156 r300g: Start using atoms.
No benefits yet.
2010-01-10 11:17:34 -08:00
José Fonseca
12576556e4 llvmpipe: Update instructions.
Explain how to build for windows. Both MSVC 9 and cross MinGW supported.

Stop documenting LLVM 2.5 as supported. It still supported at the moment
but it will soon stop being.
2010-01-10 18:37:42 +00:00
Keith Whitwell
c1a0441602 llvmpipe: initial mrt support
Non-mrt apps work, and the code looks correct, but not many mrt test apps
handy atm...
2010-01-10 17:22:09 +00:00
Chia-I Wu
d4c1ee0534 egl: Clean up the Makefile rules.
This allows libEGL to be built as a static library and removes libX11
from the dependencies.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-11 01:11:05 +08:00
Chia-I Wu
064242ae9f egl_softpipe: Remove the unnecessary call to _eglSwapBuffers.
The call to _eglSwapBuffers is unnecessary, and the function is missing
when -fvisibility=hidden.  Also remove the extraneous braces and indent
the block.
2010-01-11 01:06:47 +08:00
José Fonseca
cdc11056de llvmpipe: Yet another hack to get release LLVM static libraries to link in debug builds. 2010-01-10 11:20:11 +00:00
José Fonseca
a921458c16 scons: LLVM <-> MSVC integration tweaks. 2010-01-10 10:51:42 +00:00
José Fonseca
74f520861f gallium: Remove dead code. 2010-01-10 10:44:25 +00:00
José Fonseca
dc6bcc92ee gallium: Provide alternative stdint.h and stdbool.h C99 headers, instead of ad-hoc definitions.
Everybody is using the C99's integer types. Everybody except Microsoft,
which in turns means everybody is including their own definitions of C99
integer types for MSVC, causing duplicate definitions when linking two
projects. This is the case of building Gallium and LLVM with MSVC.

Shipping alternative stdint.h and stdbool.h headers for MSVC allows us
to share a single definition. It also removes clutter from the Gallium
headers.
2010-01-10 10:39:29 +00:00
Maciej Cencora
0b7b76fb16 r300: minor accelerated blit fixes 2010-01-09 19:53:17 +01:00
Maciej Cencora
cf1748053a r300: fallback on depth buffer blits
Depth buffer accelerated blits aren't implemented yet.
2010-01-09 19:52:42 +01:00
Brian Paul
f4321fbd96 llvmpipe: optimize case when all four pixels are inside the triangle
When the incoming c0,c1,c2 values are equal to INT_MIN it means that
all pixels are inside the triangle.  Thus we can skip the detailed
pixel inside/outside triangle tests.  Use the new lp_build_if()/endif()
functions to generate the branching code.

The code is disabled ATM however because it's actually a little slower
than the original code.  A little more tuning may fix that though...
2010-01-08 14:49:34 -07:00
Brian Paul
5208af7853 llvmpipe: fix more if/else/endif design bugs 2010-01-08 12:47:30 -07:00
Brian Paul
855d7f51e4 llvmpipe: move some fields to the private lp_build_flow_if struct 2010-01-08 11:32:36 -07:00
Brian Paul
af31e65b55 llvmpipe: free the phi array 2010-01-08 11:20:38 -07:00
Brian Paul
70b8d59792 llvmpipe: checkpoint if/else/endif contructs work
The LLVM IR looks correct now.  Basic blocks are where they're supposed
to be and the Phi functions have the right (var,block) information.
2010-01-08 11:06:16 -07:00
Kristian Høgsberg
7c50d29f7c intel/DRI2: add DRI2flushExtension support with invalidate hook
Needed to support the SwapBuffers code properly.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2010-01-08 12:40:58 -05:00
Jesse Barnes
c642f3941b xdemos/glsync: handle no sync method better
Print out count, finish rendering, etc.  Makes the -sn option more useful.
2010-01-08 12:37:44 -05:00
Jesse Barnes
0269dc19b5 xdemos/glsync: check glXMakeCurrent return value
Since this program is used for testing, catching this case can be helpful.
2010-01-08 12:37:43 -05:00
Jesse Barnes
f860aac0d8 xdemos/glsync: Make glsync test draw a rectangle
Doing simple buffer clears isn't enough to actually allocate render buffers, we
need to do real drawing.
2010-01-08 12:37:43 -05:00
Jesse Barnes
f35f666f81 xdemos/glsync: Add swap interval support to glsync test 2010-01-08 12:37:43 -05:00
Jesse Barnes
7f170573ea DRI2/GLX: add INTEL_swap_event support
Add event support for the GLX swap buffers event, along with DRI2 protocol
support for generating GLX swap buffers events in the direct rendered case.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-01-08 12:37:43 -05:00
Jesse Barnes
efc82e7c70 DRI2: add SwapInterval support
Add support for the DRI2SwapInterval protocol request.  This allows
direct rendered clients to control their swap interval per the
SGI_swap_control extension.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-01-08 12:33:32 -05:00
Jesse Barnes
daf7fe69f7 DRI2: add OML_sync_control support
Add OML_sync_control support, along with a simple program for testing
it.  This means adding support for the DRI2GetMSC, DRI2WaitMSC and
DRI2WaitSBC requests.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-01-08 12:31:10 -05:00
Jesse Barnes
a35f6bb207 DRI2: add SwapBuffers support
Support the new DRI2 protocol request, DRI2SwapBuffers, in both direct
and indirect rendering context.  This request allows the display server
to optimize back->front swaps (e.g. through page flipping) and allows us
to more easily support other GLX features like swap interval and the OML
sync extension in DRI2.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-01-08 12:29:50 -05:00
Christoph Bumiller
99637ba80e nv50: handle TGSI_OPCODE_UMAD,UMUL,NOT and fix SAD 2010-01-08 18:23:12 +01:00
Christoph Bumiller
222738fcf5 nv50: free src temp_temps on emit 2010-01-08 18:23:08 +01:00
Christoph Bumiller
a5f771d758 nv50: try to honor sprite coord mode 2010-01-08 18:23:04 +01:00
José Fonseca
080c40ab32 Merge remote branch 'origin/master' into lp-binning
Conflicts:
	src/gallium/auxiliary/util/u_surface.c
	src/gallium/drivers/llvmpipe/Makefile
	src/gallium/drivers/llvmpipe/SConscript
	src/gallium/drivers/llvmpipe/lp_bld_arit.c
	src/gallium/drivers/llvmpipe/lp_bld_flow.c
	src/gallium/drivers/llvmpipe/lp_bld_interp.c
	src/gallium/drivers/llvmpipe/lp_clear.c
	src/gallium/drivers/llvmpipe/lp_context.c
	src/gallium/drivers/llvmpipe/lp_context.h
	src/gallium/drivers/llvmpipe/lp_draw_arrays.c
	src/gallium/drivers/llvmpipe/lp_jit.c
	src/gallium/drivers/llvmpipe/lp_jit.h
	src/gallium/drivers/llvmpipe/lp_prim_vbuf.c
	src/gallium/drivers/llvmpipe/lp_setup.c
	src/gallium/drivers/llvmpipe/lp_setup_point.c
	src/gallium/drivers/llvmpipe/lp_state.h
	src/gallium/drivers/llvmpipe/lp_state_blend.c
	src/gallium/drivers/llvmpipe/lp_state_derived.c
	src/gallium/drivers/llvmpipe/lp_state_fs.c
	src/gallium/drivers/llvmpipe/lp_state_sampler.c
	src/gallium/drivers/llvmpipe/lp_state_surface.c
	src/gallium/drivers/llvmpipe/lp_tex_cache.c
	src/gallium/drivers/llvmpipe/lp_tex_cache.h
	src/gallium/drivers/llvmpipe/lp_tex_sample.h
	src/gallium/drivers/llvmpipe/lp_tile_cache.c
2010-01-08 15:42:57 +00:00
Brian Paul
fd70841121 Merge branch 'mesa_7_7_branch'
Conflicts:

	src/mesa/drivers/dri/i965/brw_wm_emit.c
2010-01-08 08:21:12 -07:00
José Fonseca
9cdf6f025b scons: Set the default windows platform to be windows userspace.
I thought I had done this ages ago.
2010-01-08 14:31:25 +00:00
Dan Nicholson
a1de400e8d mklib: Extract archives into temporary directories
When static libraries are created from other archives, objects are
extracted and then deleted when the static library is done. This can
race when there are multiple static libraries being created from the
same archives as with libmesa.a and libmesagallium.a.

Should fix this issue with parallel jobs:

make[5]: *** No rule to make target
> `../../../../../../src/mesa/libmesagallium.a', needed by
> `radeon_dri.so'. Stop

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reported-and-Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
2010-01-08 06:01:22 -08:00
Michal Krol
dddd5a36ac tgsi: Cleanup dot-product opcodes in interpreter. 2010-01-08 12:03:55 +01:00
Francisco Jerez
95f603a5f3 nv20: Fix build for the latest nouveau_class.h changes. 2010-01-08 04:42:28 +01:00
José Fonseca
d699b6720c scons: Don't build xlib when dri is enabled.
Hopefully adddresses fdo 25828.
2010-01-08 01:25:27 +00:00
José Fonseca
ba33ef0011 lvmpipe: Initialize all coordinates.
Fixes assertion failure with fp-incomplete-tex (fdo 24298).
2010-01-08 01:15:17 +00:00
José Fonseca
c6509f89b4 scons: Output a meaningful message when xlib libGL.so can't be built. 2010-01-08 00:50:09 +00:00
José Fonseca
de22c940a1 scons: Use static glew library on Unices to avoid binary compatability issues
Fixes bug 25926.
2010-01-08 00:33:58 +00:00
Keith Whitwell
45fe1d7d00 st/xorg: remove unused xorg_exa_get_pixmap_handle function 2010-01-07 22:08:23 +00:00
Christoph Bumiller
7fc5fcada5 nv50: preallocate TEMPs written first time in a subroutine
Otherwise we risk overwriting them with temporary GPRs if
they're not used immediately after the CALL.
2010-01-07 21:19:58 +01:00
Christoph Bumiller
a009fa4305 nv50: handle TGSI_OPCODE_SAD,UADD 2010-01-07 21:19:58 +01:00
Christoph Bumiller
d550de2342 nv50: handle TGSI_OPCODE_IMAX,IMIN,UMAX,UMIN 2010-01-07 21:19:58 +01:00
Christoph Bumiller
607b9c2e09 nv50: handle integer SET operations 2010-01-07 21:19:58 +01:00
Christoph Bumiller
ccc7d0cb7a nv50: handle TGSI_OPCODE_SHL,ISHR,USHR 2010-01-07 21:19:58 +01:00
Christoph Bumiller
152b3bd6ef nv50: handle TGSI_OPCODE_F2I,F2U,I2F,U2F plus src mods 2010-01-07 21:19:58 +01:00
Eric Anholt
46f5579826 intel: Remove leftover symlinks from DRI1 removal. 2010-01-07 11:21:29 -08:00
Brian Paul
7335d8006f tgsi: add assertion to verify legal register file
This assertion fails with piglit glsl-vs-mov-after-deref test
because we're double freeing the memory.  It seems there's some
confusion between what's placed in the hash table and what isn't.
2010-01-07 11:18:12 -07:00
Brian Paul
0c6794c46f tgsi: fix incorrectly placed braces, add more braces to be clear 2010-01-07 10:57:33 -07:00
Brian Paul
16b5d2eba3 tgsi: move register checking code before check_register_usage()
check_register_usage() frees the scan_register *reg data so we were
reading from freed memory.  This fixes a valgrind error found with
piglit's glsl-vs-mov-after-deref test.
2010-01-07 10:55:00 -07:00
Brian Paul
b841c2756e swrast: fix color masking for glAccum(GL_RETURN)
Should fix fdo bug 25837.
2010-01-07 09:43:11 -07:00
Brian Paul
fa47eff55b i810: use ColorMask[0] 2010-01-07 09:40:08 -07:00
Brian Paul
7c55fe9bfd progs/fp: increase buffer size to read larger shaders 2010-01-07 09:20:48 -07:00
Brian Paul
c642c246d7 gallium/util: remove useless assertions 2010-01-07 09:20:48 -07:00
Brian Paul
c3e846af30 gallium/util: update comment: s/src_pitch/src_stride 2010-01-07 09:20:48 -07:00
Brian Paul
f39bae8e68 gallium/util: make src_y unsigned like the other x/y params 2010-01-07 09:20:48 -07:00
José Fonseca
8081c1eaa5 llvmpipe: Remove TGSI sampler pointers from JIT context too. 2010-01-07 16:16:45 +00:00
José Fonseca
12c6b871a3 llvmpipe: Remove more loose ends of TGSI exec sampling. 2010-01-07 16:10:04 +00:00
Kristian Høgsberg
27fe7a7303 configure: Fix matching for dri driver to actually work
The shell case statement obviously only evaluates the first matching
block.  Thanks to Julien Cristau for spotting the bug.
2010-01-07 10:44:44 -05:00
Brian Paul
c9a210f158 makefile: added src/glsl/Makefile.template to tarball list 2010-01-07 08:43:24 -07:00
Keith Whitwell
150108024d i965g: updates for draw retval 2010-01-07 15:37:41 +00:00
José Fonseca
7bd7e2da75 llvmpipe: Axe texture sampling code inherited from softpipe.
Was used only as a reference, since texture sampling is now code generated.
Already axed in the lp-binning branch too.

This fixes the llvmpipe build after recent sampling changes.
2010-01-07 15:35:24 +00:00
Michal Krol
4440428faa gallium: Fix texture sampling with explicit LOD in softpipe. 2010-01-07 13:48:41 +01:00
Michal Krol
4bfe1c955f gallium: Pass per-element (not per-quad) LOD bias values down to texture sampler. 2010-01-07 12:48:10 +01:00
Michal Krol
e313dabdc7 tgsi: Cleanup exec_tex(). 2010-01-07 11:10:24 +01:00
Michal Krol
8d38ef4551 svga: Fix fs key size computation and key comparison.
This also allows us to have texture_target
back as a bitfield and save us a few bytes.
2010-01-07 07:58:07 +01:00
Jakob Bornecrantz
61f7252448 Revert "pipebuffer: Multi-threading fixes for fencing."
This reverts commit 5b64d94390.
2010-01-07 05:14:20 +01:00
Thomas Hellstrom
cb51f02678 Revert "st/dri: no need to request fake front buffer, only handle it being returned"
This reverts commit 1336989ec6.

The commit breaks frontbuffer rendering and the possibility to do
on-demand frontbuffer requests on all Xservers prior to 1.7.

The commit should be conditioned on a dri2 version check.
I've submitted a patch to Xserver to bump dri2 minor, and it's acked by Ian.

To be able to check the version from within the state tracker, we will
probably need another dri2 extension function that returns the server
version. The protocol has support for it.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-01-11 21:36:51 +01:00
Thomas Hellstrom
01eff0e6d2 util: Build u_bitmask.o when using make.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-01-11 21:36:51 +01:00
Brian Paul
baeb3a2351 llvmpipe: checkpoint commit of new if/else/endif flow control
Totally untested at this point.  More work to do.
2010-01-06 17:53:12 -07:00
Brian Paul
db7f9b053b llvmpipe: more comments in flow builder code 2010-01-06 14:11:54 -07:00
Marek Olšák
6f498a7eff r300g: add back-face color VS outputs
Required for two-sided lighting. BTW we are approaching softpipe-level
quality. ;)
2010-01-06 12:49:16 -08:00
Marek Olšák
7679ac2caa r300g: fix SWTCL stream locations of texture coordinates
It might have caused hardlocks when TCL was bypassed, not sure.
2010-01-06 12:49:15 -08:00
Marek Olšák
1a4f242be6 r300g: if no DS buffer is set, disable reading from and writing to it
It fixes another "Bad CS" issue.
2010-01-06 12:49:15 -08:00
Marek Olšák
26f67a272b r300g: disable the rasterization of WPOS if it's unused by the FS 2010-01-06 12:49:15 -08:00
Marek Olšák
bf60eb3fec r300g: add WPOS 2010-01-06 12:49:15 -08:00
Marek Olšák
dc7f309f9c r300/compiler: add full viewport transformation support in WPOS codegen 2010-01-06 12:49:15 -08:00
Marek Olšák
ddfc4e31ad r300g: consolidate params 2010-01-06 12:49:15 -08:00
Marek Olšák
e78648db0a r300g: fix outputting depth in the FS 2010-01-06 12:49:15 -08:00
Marek Olšák
7c902b43d8 r300g: optimize blending by conditionally disabling reads from the colorbuffer 2010-01-06 12:49:15 -08:00
Marek Olšák
6b9b3213c5 r300g: optimize blending by discarding pixels that don't change the colorbuffer
Let's get some performance out of the blender.
2010-01-06 12:49:14 -08:00
Marek Olšák
717c28055a r300g: fix blending when SRC_ALPHA_SATURATE is used 2010-01-06 12:49:14 -08:00
Marek Olšák
a6d91a141f util/blitter: allow NULL CSOs to be saved 2010-01-06 12:49:14 -08:00
Keith Whitwell
8e559e05a8 softpipe: fix draw return value 2010-01-06 18:05:08 +00:00
Brian Paul
60f5608bd7 r300g: add missing is_anistropic param 2010-01-06 10:36:51 -07:00
Brian Paul
4e8d67af57 llvmpipe: flow-control comments 2010-01-06 10:16:34 -07:00
Keith Whitwell
b08583da46 llvmpipe: fix double free 2010-01-06 17:13:37 +00:00
Keith Whitwell
601969c587 llvmpipe: rename some functions 2010-01-06 17:13:28 +00:00
Keith Whitwell
c9240c4c8f llvmpipe: remove dead code 2010-01-06 17:00:26 +00:00
Keith Whitwell
72120292b9 llvmpipe: restrict header visibility 2010-01-06 16:56:28 +00:00
Brian Paul
d8331aaf5b svga: make texture_target a ubyte, not a bitfield
gcc won't let us take the address of a bitfield in the svga_fs_key_size()
function.
2010-01-06 09:54:36 -07:00
Keith Whitwell
5ce0380a0f llvmpipe: merge setup and draw vbuf submodules
The setup tiling engine is now plugged directly into the draw module
as a rendering backend.

Removed a couple of layering violations such that the setup code no
longer reaches out into the surrounding llvmpipe state or context.
2010-01-06 16:44:43 +00:00
Brian Paul
439b34c9dd gallium/docs: finish up description of pipe_rasterizer_state fields 2010-01-06 09:42:53 -07:00
Brian Paul
251363e8f1 configs: set INTEL_LIBS, INTEL_CFLAGS, etc 2010-01-06 08:22:11 -07:00
Michal Krol
ace932450c util: Fix format descriptor table entries. 2010-01-06 16:11:28 +01:00
Michal Krol
4e014c0a14 pipe_sampler_state::compare_mode is not a boolean enable flag.
It's a 1-bit enum.
2010-01-06 16:11:26 +01:00
Michal Krol
4fd566ea31 util: Handle the remaining format cases in pipe_tile_raw_to_rgba(). 2010-01-06 16:11:24 +01:00
Michal Krol
955f51270b Make sure we use only signed/unsigned ints with bitfields.
Seems to be the only way to stay fully portable.
2010-01-06 16:11:21 +01:00
Brian Paul
1b5476a353 i965g: fix invalid assertion in emit_xpd(), again 2010-01-06 07:18:04 -07:00
José Fonseca
e32487b8a1 Merge remote branch 'origin/mesa_7_7_branch'
Conflicts:
	configs/default
	src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
	src/mesa/main/version.h
2010-01-06 13:52:22 +00:00
José Fonseca
aaf7ecfd81 glew: Update to version 1.5.2. 2010-01-06 12:23:37 +00:00
Luca Barbieri
f023473748 gallium: remove PIPE_TEX_FILTER_ANISO
This patch removes PIPE_TEX_FILTER_ANISO.

Anisotropic filtering is enabled if and only if max_anisotropy > 1.0.
Values between 0.0 and 1.0, inclusive, of max_anisotropy are to be
considered equivalent, and meaning to turn off anisotropic filtering.

This approach has the small drawback of eliminating the possibility of
enabling anisotropic filter on either minification or magnification
separately, which Radeon hardware seems to support, is currently
support by Gallium but not exposed to OpenGL.  If this is actually
useful it could be handled by splitting max_anisotropy in two values
and adding an appropriate OpenGL extension.

NOTE: some fiddling & reformatting by keithw to get this patch to
apply.  Hopefully nothing broken in the process.
2010-01-06 10:35:47 +00:00
Brian Paul
a6975507ad docs: added more GL3 items 2010-01-05 21:25:56 -07:00
Brian Paul
d4f2d6556e mesa: added GL_MAJOR_VERSION and GL_MINOR_VERSION queries
New in GL 3.0.
2010-01-05 21:24:48 -07:00
Brian Paul
3510a1b0c5 mesa: call _mesa_compute_version() to set context's version info 2010-01-05 21:23:59 -07:00
Brian Paul
29f50f61ea mesa: added version.c to build 2010-01-05 21:23:16 -07:00
Brian Paul
e0b9e33afb mesa: added _mesa_compute_version() in new version.c file 2010-01-05 21:23:01 -07:00
Brian Paul
e16fd07225 mesa: added version fields to GLcontext 2010-01-05 21:17:55 -07:00
Brian Paul
88330c6438 gallium/util: replace 8 with PIPE_MAX_COLOR_BUFS 2010-01-05 17:07:44 -07:00
Brian Paul
2fbc3931fc gallium/util: comments and whitespace fixes 2010-01-05 16:55:35 -07:00
Brian Paul
9089436930 docs: added link to wiki page about missing Mesa features 2010-01-05 16:03:11 -07:00
Brian Paul
15b05c54b7 i965g: fix invalid assertion in emit_xpd()
Invalid assertion found by Roel Kluin <roel.kluin@gmail.com>
2010-01-05 15:54:50 -07:00
Eric Anholt
5a7c2a99a6 i965: Fix build after blind merge of mesa 7.7 by Brian. 2010-01-05 11:09:21 -08:00
Maarten Maathuis
c77ade8fed nouveau: rewrite nouveau_stateobj to use BEGIN_RING properly
- The previous solution was hacky and didn't do subchannel autobinding.
- The beheaviour should match what libdrm_nouveau does closely.
- The solution remains statically sized, but when debugging is on it will check
for abuse.

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
2010-01-05 19:13:34 +01:00
Marcin Slusarz
29d2ab37e6 nouveau: kill nouveau_push.h and use libdrm versions of BEGIN_RINGs, etc 2010-01-05 19:13:34 +01:00
Maarten Maathuis
c306ef5e81 nv50: remove vtxbuf stateobject after a referenced vtxbuf is mapped
- This avoids problematic "reloc'ed while mapped" messages and
some associated corruption as well.

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
2010-01-05 19:13:34 +01:00
Corbin Simpson
3e18bad36d Merge branch 'gallium-docs' 2010-01-05 08:37:49 -08:00
Chia-I Wu
897cb8950a egl: Fix breakage from -fvisibility=hidden.
Mark EGL API and driver functions as PUBLIC.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-05 11:23:52 -05:00
Corbin Simpson
467cccf0a7 docs: Don't check in generated docs.
Per ML discussion.
2010-01-05 08:22:52 -08:00
Corbin Simpson
acb8073d07 docs: Stub out list of modules in core distribution of G3D. 2010-01-05 08:22:18 -08:00
Kristian Høgsberg
ae44b92f61 Merge branch 'remove-intel-dri1'
* remove-intel-dri1:
  intel: intelScreenContext() is no longer used
  intel: Remove remaining dri2.enabled tests
  intel: Drop more cliprect bookkeeping
  intel: Remove struct intel_framebuffer
  intel: Remove client-side vblank code
  intel: Drop intelWindowMoved()
  intel: Drop batchbuffer cliprect_mode tracking
  intel: Drop DRI1 static regions
  intel: Use depth buffer from ctx.DrawBuffer in copypix_src_region()
  intel: Drop LOCK/UNLOCK_HARDWARE()
  intel: Drop DRI1 SwapBuffer implementation
  intel: Drop DRI1 CopySubBuffer implementation
  intel: Drop DRI1 support
  Push __driDriverExtensions out of dri_util.c and into the drivers
  Remove leftover __DRI{screen,drawable,context}Private references
  Check for libdrm_$chipset.pc when needed
2010-01-05 10:31:11 -05:00
Chia-I Wu
e5d351dcfd Add es state tracker to autoconf.
mesa/es is needed in SRC_DIRS to build es state tracker.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-05 08:08:34 -07:00
Chia-I Wu
976c858acc Clean up ES_FILES.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-05 08:08:30 -07:00
Keith Whitwell
c727fa6dbf Merge commit 'origin/gallium-draw-retval'
Conflicts:
	src/gallium/drivers/identity/id_context.c
2010-01-05 14:13:40 +00:00
Andre Maasikas
c91ceeec32 r600: adjust after radeon mipmap changes in 7118db8700
R600_OUT_BATCH_RELOC doesn't really use offset so set it
in TEX_RESOURCE2
+ typo fix
2010-01-05 15:36:32 +02:00
Andre Maasikas
750c1e7bb4 r600: support depth compare functions & shadow_ambient 2010-01-05 13:48:04 +02:00
Michal Krol
76ff89d2de gallium: Handle InstanceID as a true 32-bit uint. 2010-01-05 11:48:32 +01:00
Michal Krol
9b21b3c52a Merge branch 'master' into instanced-arrays
Conflicts:
	src/gallium/auxiliary/tgsi/tgsi_dump.c
	src/gallium/include/pipe/p_shader_tokens.h
2010-01-05 11:04:50 +01:00
Michal Krol
1f9aa38f4e tgsi: Simplify implementation of few interpreter's instructions. 2010-01-05 11:00:07 +01:00
Michal Krol
55b5c8816e tgsi: Use FREE() to release MALLOC-ed() memories in sanity. 2010-01-05 09:28:41 +01:00
Michal Krol
767d1472df tgsi: Fix bogus loop condition in sanity. 2010-01-05 09:28:39 +01:00
Michal Krol
c301fa6fc8 tgsi: Treat MOV source operand as FLOAT so modifiers works as expected. 2010-01-05 09:28:36 +01:00
Michal Krol
7218322703 tgsi: Store ADDR file in interpreter as an int. 2010-01-05 09:28:34 +01:00
Michal Krol
7c8e67e4aa tgsi: Remove dead micro_umod(). 2010-01-05 09:28:32 +01:00
Michal Krol
97f9a147db tgsi: Make interpreter aware of float and integer data types.
Debug check for inf and nan only on float channels.

Apply absolute and negate source operand modifiers based on
opcode type.
2010-01-05 09:28:29 +01:00
Michal Krol
c34f6faf35 gallium: Add UMOD TGSI opcode.
Either that or have UDIV have two destination operands.
2010-01-05 09:28:27 +01:00
Michal Krol
062aab96e0 gallium: Add SWITCH, CASE, DEFAULT and ENDSWITCH opcodes to TGSI.
Provide reference implementation of them in tgsi_exec.

Note that BREAK opcode is overloaded and can be used to break out
of either a loop or a switch-case statement.
2010-01-05 09:28:25 +01:00
Michal Krol
08a3efee10 tgsi/ureg: Improve immediate match & expand logic.
Do not pollute immediates with unsuccessfull attempts to expand them.
2010-01-05 09:27:13 +01:00
Michal Krol
ff56a12051 tgsi: Support signed/unsigned integer immediate types. 2010-01-05 09:27:10 +01:00
Michal Krol
b1c55e80aa gallium: Add signed/unsigned int immediate data types. 2010-01-05 09:27:08 +01:00
Michal Krol
bf4b4c1b6f tgsi: Cleanup interpreter code for other existing integer opcodes. 2010-01-05 09:27:06 +01:00
Michal Krol
2c046034dc Remove TGSI_OPCODE_SHR, map existing usage to TGSI_OPCODE_ISHR.
This is to differentiate it from its unsigned version, TGSI_OPCODE_USHR.
2010-01-05 09:26:48 +01:00
Michal Krol
df0826fba3 tgsi: Implement new integer opcodes.
Update interpreter and ureg.
Also, get rid of SHR -- it's actually an alias for ISHR.
2010-01-05 09:26:46 +01:00
Michal Krol
c59eda0993 gallium: Add more integer TGSI opcodes. 2010-01-05 09:26:43 +01:00
Brian Paul
7836a96657 mesa: added _mesa_[Get]TexParameterI[u]iv() functions
New in GL 3.0.  Primarily meant for setting int/uint-valued texture
border color.  Not plugged into dispatch table yet.
2010-01-04 20:00:09 -07:00
Brian Paul
f6c2d1f94f mesa: make texture BorderColor a union of float/int/uint
When we have integer-valued texture formats, the texture border color
must also store integer and uint values.

With GL 3.0, the new glTexParameterIiv() and glTexParameterIuiv() functions
can set the border color to int or uint values.
2010-01-04 19:53:30 -07:00
Brian Paul
32b9983c0a mesa: use get_texobj() in _mesa_GetTexParameter() funcs 2010-01-04 19:20:33 -07:00
Brian Paul
5ac16495a2 Merge branch 'mesa_7_7_branch'
Conflicts:
	docs/relnotes.html
	src/gallium/drivers/llvmpipe/lp_tex_sample_c.c
	src/gallium/drivers/r300/r300_cs.h
	src/mesa/drivers/dri/i965/brw_wm_surface_state.c
	src/mesa/main/enums.c
2010-01-04 19:16:24 -07:00
Chia-I Wu
8e6774937f progs/es1: Add compressed paletted texture tests to torus.
The tests can be toggled by `t'.  It will print current texture format
and the size of the image.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-04 14:15:16 -07:00
Chia-I Wu
a316b700ef mesa/es: Improve support for GL_OES_compressed_paletted_texture.
Add error checking and fix handling of level (it should be negative).
Besides, always use the palette entry format/type when calling
_mesa_TexImage2D.  It respects the base internal formats of the cpal
formats, and is simpler and faster, except for cases where the unpack
alignment needs to be changed.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-04 14:15:16 -07:00
Chia-I Wu
c4b9e1aa1a mesa/es: Fix GL_RGB565 support in FBO.
In GL_OES_framebuffer_object and OpenGL ES 2.0, GL_RGB565 is a valid
internal format.  Since it is not supported by the core, map it to
GL_RGB5 as a workaround.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-04 14:15:16 -07:00
Chia-I Wu
b80ec33f35 mesa/es: Fix GL_OES_texture_cube_map support.
Unlike in OpenGL, GL_OES_texture_cube_map says that all coordinates are
changed the same time by the token GL_TEXTURE_GEN_STR_OES, and the
initial mode is GL_REFLECTION_MAP_OES.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-04 14:15:15 -07:00
Chia-I Wu
3a4d0811b4 mesa/es: Clean up extension string.
Add some new extensions and remove those that do not belong to
OpenGL ES 2.0.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-04 14:15:15 -07:00
Chia-I Wu
f88297b369 mesa/es: Add more exnteions to APIspec.
This commit adds definitions of

  GL_EXT_texture_compression_dxt1
  GL_EXT_texture_lod_bias
  GL_EXT_blend_minmax
  GL_EXT_multi_draw_arrays

to APIspec.xml and get_gen.py.  Some of the enums are not avaiable in
the header files and the defining extensions are disabled.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-04 14:15:15 -07:00
Chia-I Wu
29bd20ad14 mesa/es: Add more extensions to glapi.
This commit adds definitions of

  GL_OES_texture_half_float_linear, GL_OES_texture_float_linear
  GL_OES_texture_half_float, GL_OES_texture_float
  GL_OES_vertex_half_float
  GL_OES_vertex_type_10_10_10_2
  GL_OES_get_program_binary
  GL_EXT_texture_compression_dxt1
  GL_EXT_texture_format_BGRA8888
  GL_EXT_texture_lod_bias
  GL_EXT_blend_minmax
  GL_EXT_read_format_bgra
  GL_EXT_multi_draw_arrays

to glapi.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-04 14:15:15 -07:00
Chia-I Wu
a2d21f67f9 mesa/es: Generate code for special functions.
es_generator.py did not generate code for special functions.  They were
supposed to be defined elsewhere.  But as a result, parameter checking
was also skipped.  This commit changes the way special functions are
called so that parameter checking is always performed.

When there is nothing to check, the check functions becomes macros
expanding to the real functions, as an optimization.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-04 14:15:15 -07:00
Chia-I Wu
f7d23dfef5 mesa/es: Remove unused code in es_generator.py.
Remove unused GetLoopSizeExpression.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-04 14:15:15 -07:00
Chia-I Wu
e0ab739c06 mesa/es: Generate _mesa_GetFixedv.
Have get_gen.py generate _mesa_GetFixedv.  The generated function does
all the checkings and thus simplifies APIspec.xml a bit.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-04 14:15:15 -07:00
Chia-I Wu
c3bd857917 mesa/es: Add a sanity check to APIspec.py.
Some attributes are constant in a switch.  Raise an exception if they
are not.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-04 14:15:15 -07:00
Chia-I Wu
8264a6a8a6 mesa/es: Switch to APIspec.xml.
Update Makefile and ES generator to use APIspec.xml.  Remove APIspec.txt
and related files.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-04 14:15:15 -07:00
Chia-I Wu
0c1a7bbe0d mesa/es: Add APIspec.xml and its parser.
APIspec.xml is based on APIspec.txt.  The new format has less code
duplications and should be easier to read.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-04 14:15:15 -07:00
Vinson Lee
bfc34c8804 i965g: Fix assert. 2010-01-04 11:28:37 -08:00
Vinson Lee
ad80009c88 tgsi: Fix assert. 2010-01-04 11:25:38 -08:00
Brian Paul
0fb1eaddfb Merge branch 'gallium-conditional-rendering' 2010-01-04 11:47:39 -07:00
Brian Paul
195568e4cb mesa: more detailed error message in extract_float_rgba() 2010-01-04 11:27:17 -07:00
Alan Hourihane
1baaf111c8 fix overflow 2010-01-04 17:41:49 +00:00
Kristian Høgsberg
51362a75a7 intel: intelScreenContext() is no longer used 2010-01-04 11:48:03 -05:00
Kristian Høgsberg
5a0b60aa1b intel: Remove remaining dri2.enabled tests 2010-01-04 11:48:02 -05:00
Kristian Høgsberg
2861d9200b intel: Drop more cliprect bookkeeping 2010-01-04 11:48:02 -05:00
Kristian Høgsberg
d282128ff6 intel: Remove struct intel_framebuffer
With the vsync fields no longer relevant and by refactoring the code
to no longer use color_rb[0-1] we can just use struct gl_framebuffer
directly.
2010-01-04 11:48:02 -05:00
Kristian Høgsberg
a6e1d3edac intel: Remove client-side vblank code 2010-01-04 11:48:02 -05:00
Kristian Høgsberg
5bc4b886e4 intel: Drop intelWindowMoved()
Everything this functions does under DRI2 is also taken care of
by intel_draw_buffer(), which is always called where intelWindowMoved()
is called.
2010-01-04 11:48:02 -05:00
Kristian Høgsberg
5203b7227c intel: Drop batchbuffer cliprect_mode tracking 2010-01-04 11:48:02 -05:00
Kristian Høgsberg
f55d0920cd intel: Drop DRI1 static regions 2010-01-04 11:48:01 -05:00
Kristian Høgsberg
ee49ac8742 intel: Use depth buffer from ctx.DrawBuffer in copypix_src_region()
This function was using intel->depth_region, which is the static region
for the DRI1 depth buffer.  This code has always been broken with DRI2
but I suspect it doesn't get excersized much.
2010-01-04 11:48:01 -05:00
Kristian Høgsberg
01dc463e5d intel: Drop LOCK/UNLOCK_HARDWARE() 2010-01-04 11:48:01 -05:00
Kristian Høgsberg
3566bc7584 intel: Drop DRI1 SwapBuffer implementation 2010-01-04 11:48:01 -05:00
Kristian Høgsberg
4611f08c07 intel: Drop DRI1 CopySubBuffer implementation 2010-01-04 11:48:01 -05:00
Kristian Høgsberg
48c0ff1424 intel: Drop DRI1 support
The DDX driver stopped supporting DRI1 so we're dropping support for
that from the DRI driver too.
2010-01-04 11:48:00 -05:00
Kristian Høgsberg
39a0e4e7de Push __driDriverExtensions out of dri_util.c and into the drivers
This lets the individual drivers select which extensions to advertise.
Specifically, most drivers (tdfx, sis, savage etc) don't support DRI2
but the shared extension list in dri_util.c does list the DRI2 extension.

Pushing the list into the drivers, lets us avoid listing the DRI2
extension for drivers that don't support it.
2010-01-04 11:48:00 -05:00
Kristian Høgsberg
d61f07318c Remove leftover __DRI{screen,drawable,context}Private references
As part of the DRI driver interface rewrite I merged __DRIscreenPrivate
and __DRIscreen, and likewise for __DRIdrawablePrivate and
__DRIcontextPrivate.  I left typedefs in place though, to avoid renaming
all the *Private use internal to the driver.  That was probably a
mistake, and it turns out a one-line find+sed combo can do the mass
rename.  Better late than never.
2010-01-04 11:48:00 -05:00
Kristian Høgsberg
8616cec5c9 Check for libdrm_$chipset.pc when needed
This adds missing pkg-config lookup for intel and moves the radeon
lookup into a case...esac so it's only looked up when one or more of
the radeon drivers are enabled.
2010-01-04 11:47:59 -05:00
Alan Hourihane
a3abb9d1cc silence compiler warning 2010-01-04 12:42:51 +00:00
Alan Hourihane
4a531fb46a Fix test 2010-01-04 12:41:33 +00:00
Michal Krol
86b336f71b docs: Explain TGSI_SEMANTIC_NORMAL. 2010-01-04 13:38:58 +01:00
Michal Krol
8ab89d7681 docs: Fix indent. 2010-01-04 13:23:41 +01:00
Michal Krol
07f416cdc9 docs: Clarify what truncate means. 2010-01-04 13:21:32 +01:00
Michal Krol
cef218062a docs: Replace bogus \times' back with *'. 2010-01-04 13:15:28 +01:00
Michal Krol
c929664fdf docs: TGSI SIN and COS are scalar instructions. 2010-01-04 13:12:27 +01:00
Michal Krol
b3567fc983 docs: Clarify math description of TGSI LRP instruction operation. 2010-01-04 12:59:17 +01:00
Michal Krol
b6659681f2 docs: Correct TGSI acronym expansion. 2010-01-04 12:52:43 +01:00
Andre Maasikas
e04a818606 r600: support vertex_array_bgra
Use vertex program key mechanism and swizzle during vertex fetch - is there
a better way?
2010-01-04 12:39:37 +02:00
Kristian Høgsberg
2b218d94b5 Only enable verbose NoOp dispatch if DEBUG is defined
By default we generate a function per GL entry point to warn if it's
called without a context set.  This is to allow the function to print
it's name in the warning.  By using a generic function that doesn't print
the function name in the non-DEBUG case, we reduce libGL size from
320008 bytes to 283144 bytes (11%).
2010-01-03 23:24:13 -05:00
Kristian Høgsberg
c3047e73f7 Noop dispatch: move warning code out of the generated functions
This reduces libGL size by 11% here, going from 360968 bytes to
320008 bytes.
2010-01-03 23:01:23 -05:00
Kristian Høgsberg
b8326b011d Fix glut to work with -fvisibility=hidden
The GLUTAPI #define used in the header file to mark the font structs
visible wasn't kicking in because of the #define glutBitmap9By15 XXX
prior to #include <GL/glut.h>.  High quality code... worked around by
copying the GLUTAPI specifier to the invidual C files.
2010-01-03 20:59:56 -05:00
Kristian Høgsberg
8d62eb4599 Export a few glapi functions used by gallium and r300
Fixes breakage from -fvisibility-hidden commit.
2010-01-03 19:53:01 -05:00
Kristian Høgsberg
e388d62b47 Compile with -fvisibility-hidden by default
We have all functions that need to be visible marked with PUBLIC and
this is trimming around 4% off the DRI driver .so size.
2010-01-03 15:40:59 -05:00
Francis Galiegue
a60084088b mesa: fix blend enable/disable calls in meta.c code
Fixes regression in some DRI drivers since the GL_EXT_draw_buffers2 changes.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-03 09:43:24 -07:00
José Fonseca
c978ab017d gallium: Hunt down all references to GALLIUM_AUXILIARY_DIRS. 2010-01-02 20:22:52 +00:00
Marc Dietrich
995c342018 autoconf: fix build breakage 2010-01-02 10:33:15 -07:00
Brian Paul
1fbc71937f mesa: added _mesa_GetBufferParameteri64v()
This is a new function in GL 3.2.  No dispatch for this function yet.
2010-01-02 10:32:37 -07:00
José Fonseca
52eb3e4235 scons: Build glew on all platforms.
It is required for progs.
2010-01-02 01:12:35 +00:00
José Fonseca
321aef7da3 scons: Update the MSVC SA to match latest scons code. 2010-01-02 00:56:01 +00:00
José Fonseca
58d376ac42 scons: Axe generic.py.
Progs are now built together with the rest so no longer needed.
2010-01-02 00:55:29 +00:00
José Fonseca
8a318edd08 scons: Put glut and glew shared libraries into build/xxx/bin or lib.
Use bin subdir for windows dlls, lib for unices.
2010-01-02 00:01:43 +00:00
José Fonseca
ee39dc20e6 python: Don't generate a import library for python module either. 2010-01-02 00:01:43 +00:00
José Fonseca
6f19ec64fc i965: Add missing include. 2010-01-02 00:01:43 +00:00
José Fonseca
2104cbb694 scons: Remove duplicated code. 2010-01-02 00:01:42 +00:00
José Fonseca
b2e40643a3 scons: Disable version symlinking for DLLs.
Fixes windows build.
2010-01-02 00:01:42 +00:00
José Fonseca
187066caa0 gdi: Don't generate import libraries for opengl32.dll.
Both MinGW and MSVC include opengl32 import libraries, and its safer to
always use those.
2010-01-02 00:01:42 +00:00
José Fonseca
14a8c9dac7 scons: Fix glew build on MSVC.
The environment for building the DLL needs to be quite different from
the environment for building the programs, in order to get
the dllexport/dllimport attribute done currectly. I don't know how MinGW
managed to build the programs, but MS linker refuses to link symbols with
mismatching attributes.
2010-01-02 00:01:42 +00:00
José Fonseca
c852e960cc util: Silent potential loss of precision warnings.
Also ensure multiplication doesn't happen for negative numbers.
2010-01-02 00:01:42 +00:00
Igor Oliveira
9595b59247 tgsi: Add missing semantic name in text parser. 2010-01-01 19:03:27 +01:00
José Fonseca
486ccb55a8 r300: Fix scons build. 2010-01-01 12:16:20 +00:00
José Fonseca
89d778ff02 scons: Don't list cell as a driver.
Cell driver's SConscript never got written, and it is not trivial one to
write, so don't accept cell in the driver option to avoid confusion.
2010-01-01 12:16:20 +00:00
José Fonseca
cf9be46c01 llvmpipe: Add missing include path.
The abscense was being masked previously.
2010-01-01 12:16:20 +00:00
José Fonseca
c847a13d38 gallium: Generate a single library for auxiliaries with Make too. 2010-01-01 12:16:19 +00:00
José Fonseca
f8f4757d46 scons: Aggregate all tiny libraries in a single library.
Makes integration of gallium into out of tree components much easier. No
pratical change for components in this tree,
2010-01-01 12:16:19 +00:00
José Fonseca
fc8e0b97e5 gallium: Remove the sct module.
Not used, and its functionality is now addressed by
pipe_context::is_texture/buffer_referenced callbacks.
2010-01-01 12:16:19 +00:00
José Fonseca
7bbf7f94ea scons: Build progs together with everything else.
This is a substantial reorganization, This particular commit enables:
- building the progs for unices platforms
- glew is now built as a shared library (it is the default, and it is
inconvenient and pointless to shift away from that default)
- all progs get built by default
2010-01-01 12:16:19 +00:00
José Fonseca
58b401315b progs: Ignore derived files. 2010-01-01 12:16:19 +00:00
José Fonseca
cbb23523a8 glsl: Ignore programs. 2010-01-01 12:16:19 +00:00
José Fonseca
3d747eded4 scons: Don't globally define WIN32_LEAN_AND_MEAN.
Some of the demo progams legitimately need the functionality
that's disabled by WIN32_LEAN_AND_MEAN.

Instead the solution should be to define WIN32_LEAN_AND_MEAN just before
including windows.h on a case by case basis.
2010-01-01 12:16:19 +00:00
José Fonseca
33f44b93d2 mesa: Avoid WIN32_LEAN_AND_MEAN re-definition. 2010-01-01 12:16:18 +00:00
José Fonseca
04c7f483b4 mesa: Make condrender.[ch] prototypes match.
GLAPI on windows is more than "extern" -- it includes the --, so the
mismatch between condrender.[ch] prototypes causes "different linkage"
errors on windows.
2010-01-01 11:20:38 +00:00
José Fonseca
97e2c5ac0b scons: Expose convienience libraries to the host environment.
This fixes MinGW cross compilation build, recently broken due to the use
of convenience libraries in the GLSL preprocessor.
2010-01-01 11:00:58 +00:00
José Fonseca
700a2ebbf1 glut: Silent the glut*_ATEXIT_HACK defined but not used warnings.
There are two ways to silent this: put inline keyword, or reimplement the
hack as a #define. inline keyword actually varies slightly with compiler
so I've opted by the latter.
2010-01-01 11:00:58 +00:00
Brian Paul
c9b5583518 st/mesa: implement conditional rendering 2009-12-31 14:47:21 -07:00
Brian Paul
f1b382d2e6 st/mesa: move st_query_object type to header to make it public 2009-12-31 14:46:57 -07:00
Brian Paul
41450b03a8 softpipe: implement conditional rendering 2009-12-31 14:46:15 -07:00
Brian Paul
c0b4fb06b8 gallium: pipe_context::render_condition() and mode flags
For conditional rendering predicated on results of an occlusion query.

If this driver function is NULL, conditional rendering is not supported by
the driver.
2009-12-31 14:45:15 -07:00
Christoph Bumiller
45a01bc5bd nv50: small fix for handling "dangerous" swizzles 2009-12-31 22:29:39 +01:00
Brian Paul
25024d9482 Merge branch 'mesa_7_7_branch'
Conflicts:
	configs/darwin
	src/gallium/auxiliary/util/u_clear.h
	src/gallium/state_trackers/xorg/xorg_exa_tgsi.c
	src/mesa/drivers/dri/i965/brw_draw_upload.c
2009-12-31 09:02:27 -07:00
Brian Paul
d14beea534 mesa: remove a line of dead code 2009-12-31 08:50:26 -07:00
Brian Paul
06f10903cb docs: 7.8 relnotes: GL_NV_conditional_render and GL_EXT_draw_buffers2 2009-12-31 08:49:28 -07:00
Brian Paul
f10470e3fe mesa: enable ColorMaskIndexed in display lists 2009-12-31 08:49:28 -07:00
Brian Paul
34075d0219 progs/tests: added test for GL_EXT_draw_buffers2
Render into two color buffers (render targets).  Display half of each
buffer in the window.  Use different color masks for each render target.
Only enable blending for the second render target.
2009-12-31 08:49:27 -07:00
Brian Paul
fcc2e1a729 mesa: enable GL_EXT_draw_buffers2 for sw drivers 2009-12-31 08:49:27 -07:00
Brian Paul
c28b451e40 docs: update status for conditional rendering 2009-12-31 08:49:27 -07:00
Brian Paul
08d145e1d7 progs/tests: added conditional rendering test program 2009-12-31 08:49:27 -07:00
Brian Paul
aa491c19b9 mesa: turn on NV_conditional_render for software drivers 2009-12-31 08:49:27 -07:00
Brian Paul
ab26682eb4 swrast: add check for conditional rendering 2009-12-31 08:49:27 -07:00
Brian Paul
699cfaeb3c tnl: add check for conditional rendering 2009-12-31 08:49:26 -07:00
Brian Paul
ff3a52643d mesa: plug in API functions for conditional rendering 2009-12-31 08:49:26 -07:00
Brian Paul
007b1f42c4 mesa: added dispatch for GL_NV_conditional_render extension 2009-12-31 08:49:26 -07:00
Brian Paul
5a0eb89da5 mesa: added FLUSH_VERTICES(), more comments 2009-12-31 08:49:26 -07:00
Brian Paul
2be0d77a97 mesa: add flag for GL_NV_conditional_render extension 2009-12-31 08:49:26 -07:00
Brian Paul
0fbe828c1d mesa: _mesa_Begin/EndConditionalRender() functions
For GL_NV_conditional_render and GL3.

The drawing functions don't check the query object yet.
No API dispatch yet.
2009-12-31 08:49:26 -07:00
Brian Paul
534e005185 mesa: make _mesa_lookup_query_object() an non-private inline function 2009-12-31 08:49:25 -07:00
Christoph Bumiller
4e4244b910 nv50: fix TEXLOD sequence and use it only in FPs 2009-12-31 14:34:46 +01:00
Christoph Bumiller
616ddc8dfa nv50: cannot kill branch if immediate is used
The immediate's bits eat the condition bits.
2009-12-31 14:34:42 +01:00
Christoph Bumiller
b3425bc360 nv50: make assimilate_temp safe
Cannot change hw reg assigned to a TGSI TEMP on the fly if
we are in a loop, conditional, or can jump around wildly.
2009-12-31 14:34:38 +01:00
Christoph Bumiller
d9ae8f31d5 nv50: handle TGSI_OPCODE_EXP,LOG
Not that they make much sense on nv50, but we also do LIT ...
2009-12-31 14:34:34 +01:00
Christoph Bumiller
f2cca04bd8 nv50: add support for subroutines 2009-12-31 14:34:30 +01:00
Christoph Bumiller
170cdb4507 nv50: alloc_reg on reg_instance
If we create multiple instances of an nv50_reg referencing
them same resource, register allocation from alloc_reg has
to be done with the original nv50_reg.
2009-12-31 14:34:26 +01:00
Christoph Bumiller
0ba518e327 nv50: multiply polygon offset units by 2 2009-12-31 14:34:22 +01:00
Christoph Bumiller
4d2551beb7 nv50: neg and abs modifiers for flops
Also fixes RSQ of negative sources.
2009-12-31 14:34:17 +01:00
Christoph Bumiller
3019afdbd8 nv50: don't negate immediates in set_immd
This negation would only be triggered in situations
where it's incorrect.
The caller of set_immd should negate the immediate value
in the instruction itself if desired, and will also know
if it's a float or an int.

ADD TEMP[0], CONST[0], -IMMD[0] would load the immediate
into extra TEMP, negated, and set the negate flag in add
as well - double negation.
2009-12-31 14:34:10 +01:00
Michal Krol
543b9566bd Add lame support for instanceID to draw module.
It's all screaming for integer support -- fake it with float for now.
2009-12-30 22:18:53 +01:00
Michal Krol
5754185d39 tgsi: Support system values in ureg. 2009-12-30 21:52:01 +01:00
Michal Krol
6481f40eec draw: Implement draw_arrays() in terms of draw_arrays_instanced(). 2009-12-30 18:54:04 +01:00
Michal Krol
230355648b sp: Generalise drawing code to remove dupes.
Also, avoid nested draw calls from simpler versions.
2009-12-30 18:41:05 +01:00
Brian Paul
9b0bbe15a5 docs: added GL 3.x feature checklist to track what's done in Mesa 2009-12-30 10:39:20 -07:00
Brian Paul
16e91d4c0e mesa: implement _mesa_GetStringi() for GL3
Note: not plugged into the dispatch table yet.
2009-12-30 10:30:23 -07:00
Brian Paul
56bdaca03e mesa: _mesa_get_enabled_extension() function 2009-12-30 10:29:53 -07:00
Michal Krol
bccdb239c7 sp: Implement draw_elements_instanced(). 2009-12-30 18:27:58 +01:00
Michal Krol
5007e39f76 Implement instanced indexed draw. 2009-12-30 18:26:40 +01:00
Brian Paul
802b808939 mesa: implement GL3 GL_NUM_EXTENSIONS query 2009-12-30 10:16:01 -07:00
Brian Paul
1ec6de9f94 mesa: simplify some extension testing code 2009-12-30 10:13:31 -07:00
Brian Paul
05fb922e61 mesa: display list support for glClearBuffer functions
Note: some code disabled until dispatch table supports GL3 entrypoints.
2009-12-30 09:45:58 -07:00
Brian Paul
2b5ece5746 mesa: implement GL3 glClearBuffer() functions
These functions clear color/depth/stencil buffers with a value that's
passed to the function, rather than the context clear values.

For now these functions are implemented in terms of the existing
ctx->Driver.Clear() hook.  In the future when we have non-normalized
integer and unsigned integer color buffer formats we'll need new
driver hook(s) to pass int and uint clear values to the driver.

Note: these functions are not hooked into the dispatch table at this time.
2009-12-30 09:30:24 -07:00
Brian Paul
12039aa7a9 mklib: use a wrapper for ar 2009-12-30 09:30:24 -07:00
Michal Krol
76e53923ba translate: Fix a call to indexed SSE run. 2009-12-30 16:28:01 +01:00
Luca Barbieri
9656177bc0 nouveau: Fix glTexSubImage on swizzled surfaces on <=NV40
Currently in nvXX_transfer_new a temporary as large as the surface is created.
If the subrectangle is not the whole texture we would need to read
back the whole texture, but we aren't.
Thus, everything but the subrectangle specified is loaded as garbage.
This can be seen in progs/demos/ray.

This patch fixes the problem by creating a temporary that covers only
the desired subrectangle.

That makes us hit an alignment assert in nv04_surface_2d.c. Fix it
using the point registers instead of manipulating the swizzled surface
offset to account for the destination coordinates (which do not seem
to have a 1024 limit).

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2009-12-30 14:37:19 +01:00
Michal Krol
09c0287b84 translate: Implement instancing for linear SSE run. 2009-12-30 14:23:12 +01:00
Michal Krol
0f185cb027 rtasm: Add x86_div(). 2009-12-30 14:20:29 +01:00
Brian Paul
1677d5c0ae mesa: fix-up blend enable/disable code in _mesa_PopAttrib() 2009-12-29 23:04:27 -07:00
Brian Paul
36092fa2d8 mesa: finish-up indexed color mask code in _mesa_PopAttrib() 2009-12-29 22:58:44 -07:00
Brian Paul
81c72a1dab mesa: plug in GL_EXT_draw_buffers2 functions 2009-12-29 22:56:32 -07:00
Brian Paul
285d3f9ed8 mesa: regenerate API files related to GL_EXT_draw_buffers2 2009-12-29 22:55:57 -07:00
Brian Paul
ca3a8538b6 glapi: extension info for GL_EXT_draw_buffers2 2009-12-29 22:54:30 -07:00
Brian Paul
8f6f112463 mesa: added infrastructure for GL_EXT_draw_buffers2 2009-12-29 20:51:20 -07:00
Brian Paul
a856d635d3 mesa: add dlist support for indexed colormask and indexed enables/disables
Not plugged into dispatch table yet...
2009-12-29 16:30:04 -07:00
Brian Paul
fd5511d27f mesa: implement per-buffer color masking
This is part of the GL_EXT_draw_buffers2 extension and part of GL 3.0.

The ctx->Color.ColorMask field is now a 2-D array.  Until drivers are
modified to support per-buffer color masking, they can just look at
the 0th color mask.

The new _mesa_ColorMaskIndexed() function will be called by
glColorMaskIndexedEXT() or glColorMaski().
2009-12-29 16:17:14 -07:00
Michal Krol
7ca0ce3834 Implement draw_arrays_instanced() in softpipe.
Modify the translate module to respect instance divisors and accept
instance id as a parameter to calculate input vertex offset.
2009-12-29 23:21:01 +01:00
Brian Paul
126b35bd3a mesa: implement indexed glGet functions
The functions are _mesa_GetBooleanIndexedv(), _mesa_GetIntegerIndexedv(), and
_mesa_GetInteger64Indexedv().  These will be called from API functions such as
glGetBooleanIndexedvEXT() and glGetBooleani_v().

Only the GL_BLEND query is supported at this time.
2009-12-29 15:09:16 -07:00
Brian Paul
3728673bd1 mesa: per-buffer blend enabled flags
ctx->Color.BlendEnabled is now a GLbitfield instead of a GLboolean to
indicate blend on/off status for each color/draw buffer.

This is infrastructure for GL_EXT_draw_buffers2 and OpenGL 3.x

New functions include _mesa_EnableIndexed(), _mesa_DisableIndexed(), and
_mesa_IsEnabledIndexed().  The enable function corresponds to
glEnableIndexedEXT() for GL_EXT_draw_buffers2 or glEnablei() for GL3.

Note that there's quite a few tests for ctx->Color.BlendEnabled != 0 in
drivers, etc.  Those tests can remain as-is since the mask will be 0 or ~0
unless GL_EXT_draw_buffers2 is enabled.
2009-12-29 15:04:03 -07:00
Michal Krol
7124fa16ef translate: Fix translate_key_compare().
Sizes of translate keys must also match.
2009-12-29 22:49:31 +01:00
Michal Krol
f7d1689cfa gallium: Move instance_divisor field from vertex_buffer to vertex_element. 2009-12-29 19:18:54 +01:00
Brian Paul
561a107df7 glsl: added default case in _fetch_token() to silence warnings 2009-12-29 08:47:40 -07:00
Eric Anholt
a099644755 intel: Fix false positives in checking for non-packed depth/stencil RB.
The wine d3d9 visual.c testcase was tripping over this and failing.
Presumably it's binding a packed depth/stencil texture to both
stencil and depth attachment points, and we make a new renderbuffer
wrapper for each in that case.
2009-12-28 19:21:27 -08:00
Eric Anholt
089144e4e5 intel: Allow binding a stencil but not a depth buffer.
Wine's d3d9 visual.c testcase tries this a lot, so I've added some
piglit tests (fbo-nodepth-test, fbo-nostencil-test, fbo-stencil-only)
and enabled it.
2009-12-28 18:52:47 -08:00
Eric Anholt
e4df8d32b5 intel: Improve INTEL_DEBUG=fbo output. 2009-12-28 18:51:18 -08:00
Eric Anholt
1e4677a61f intel: Remove dead fthrottle_mode option. We only do IRQ waits.
Noticed by clang.
2009-12-28 18:51:18 -08:00
Eric Anholt
2515ccaf24 mesa: remove gratuitous stores I added in remove_instructions. 2009-12-28 18:51:18 -08:00
Younes Manton
85dcc07071 nouveau: Unreference state/buffer objects on context/screen destruction.
- unreference state objects so that buffer objects are unreferenced and
eventually destroyed
- free channel at screen's destruction

Based on Krzysztof Smiechowicz's patch.
2009-12-28 17:59:01 -05:00
Luca Barbieri
cb9214f330 nouveau: Fix swizzling for copies to rectangular textures
nVidia hardware seems to swizzle rectangular texture (with width !=
height) coordinates by swizzling the lower bits and then adding the
higher bits from the larger dimension.
However, nv04_swizzle_bits ignores width and height and just
interleaves everything.
This causes problems with rectangular POT textures with height or
width 2048 or 4096 (but not 2048x1024 where it works by chance) since
the driver swizzles them in 1024x1024 chunks and gets the start
position for the non-first chunks wrong.
The following patch seems to fix those problems.
2009-12-28 17:59:01 -05:00
Luca Barbieri
3a0c527bd0 nouveau: Fix nv20-40 swizzled miptree RTs
I just coded a patch that does this and seems to work fine. It must be
fixed since it breaks OpenGL (or the state tracker can be changed, but
it seems better to do it in the driver).

The patch also fixes NV20 and NV30 in the same way. They compile but
are untested.

I would guess that using the 3D engine is faster for the larger
levels, but the 2D engine is faster for the smaller ones (and lacks
this issue).
2009-12-28 17:59:01 -05:00
Luca Barbieri
a55e50b082 NV30/NV40 CMP and SCS src == dst handling
CMP and SCS can produce incorrect results if the source and
destination are the same.
This patch should fix the issues.
CMP is fixed by predicating both moves.
SCS by changing the order if the source component is X.
2009-12-28 17:59:00 -05:00
José Fonseca
926562fe27 llvmpipe: Unmapping vertex/index buffers does NOT flush draw module anymore.
Not since 6094e79f4e.

Drivers now need to flush draw module explicitely (which explains why
all those previous commits adding draw_flushes calls were necessary).

This is a good thing, but it's tricky to get this right in face of user buffers
(it's not even clear who has the responsibility to flush when a user buffer
is seen -- statetracker or pipe driver), so just force flush (temporarily)
since it's not a bottleneck now.
2009-12-28 22:53:41 +00:00
José Fonseca
64893eb501 python/retrace: Dump only the specified image rectangles. 2009-12-28 22:53:40 +00:00
José Fonseca
67171ed85f xlib: Integrate the trace driver with all pipe drivers.
And not just softpipe.

It is particularly convenient to use llvmpipe instead, since it is much
faster. It also allows to use rbug with all xlib drivers.
2009-12-28 22:53:40 +00:00
José Fonseca
7abdaf574a scons: Fix xlib build.
After glsl rework merge.
2009-12-28 22:53:40 +00:00
Francisco Jerez
49a0f291ae nv04: Fix build after the latest nouveau_class.h changes. 2009-12-28 18:11:06 +01:00
Marcin Kościelnicki
c84cc09d41 nv50: Dehexify and bring up to date with new method defines.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2009-12-28 18:09:26 +01:00
Brian Paul
b46bcd8e7b Merge branch 'mesa_7_7_branch' 2009-12-27 10:24:21 -07:00
Brian Paul
cb504a026c cell: add glsl to SRC_DIRS 2009-12-27 10:24:12 -07:00
Dave Airlie
bdbabcd1e4 r300g: fix use of uninitialised variables.
These buffers were getting dereferenced later.
2009-12-27 16:13:41 +10:00
Dave Airlie
9ee5b78e7f r300g: rename modesetting_drv.so to radeong_drv.so 2009-12-27 16:13:16 +10:00
José Fonseca
4ccf0bb74e softpipe: Flush draw module when fragment pipeline state changes. 2009-12-26 21:06:46 +00:00
José Fonseca
080703e398 llvmpipe: Treat state changes systematically.
That is:
- check for no op
- update/flush draw module
- update bound state and mark it as dirty

In particular flushing the draw module is important since it may contain
unflushed primitives which would otherwise be draw with wrong state.
2009-12-26 21:06:46 +00:00
Eric Anholt
c4ac1f8299 i965: Extra asserts on flow control instructions to clarify for clang. 2009-12-26 11:18:02 -08:00
Eric Anholt
c196a3592a i965: Clean up double initialization of dst_flags from a rebase resolve.
Caught by clang.
2009-12-26 11:18:02 -08:00
Eric Anholt
070bbd4fcd i965: Fix setup of immediate types for gen4 disasm.
Caught by clang.
2009-12-26 11:18:02 -08:00
José Fonseca
d01c7bef29 llvmpipe: Use comments and more code from softpipe's is_texture_referenced implementation. 2009-12-26 11:02:02 +00:00
José Fonseca
7a15642f41 softpipe: Flush draw module before switching framebuffer.
Otherwise geometry might end up in the wrong rendertarget.
2009-12-26 11:01:05 +00:00
José Fonseca
491a184943 llvmpipe: Flush draw module before switching framebuffer.
Otherwise geometry will end up in the wrong rendertarget.
2009-12-26 11:00:42 +00:00
José Fonseca
399190d136 tgsi: Don't dump parenthesis for negation.
It doesn't seem necessary, and more importantly, tgsi_parse doesn't know
how to read them.
2009-12-26 10:59:46 +00:00
José Fonseca
230a5b5f1c python: Update python state tracker and samples for recent interface changes. 2009-12-26 01:14:59 +00:00
José Fonseca
3f176bf08c trace: Fix transfer size computation. 2009-12-26 01:14:08 +00:00
José Fonseca
8b7552673f scons: Put the configuration info in the build directory too.
It fixes cached configuration results from one platform being erroneously
used in other platforms.
2009-12-26 01:14:08 +00:00
José Fonseca
8353c87cce svga: Allow to dump an individual command. 2009-12-26 01:14:08 +00:00
Dave Airlie
5676082d28 r300g: fixup for GS additions
draw_set_mapped_constant_buffer changed API
2009-12-26 07:28:21 +10:00
Zack Rusin
fb0a9aa5e0 gallium: remove TGSI_SEMANTIC_VERTICES
it's a leftover from an early version of geometry shading support.
geometry shaders now encode the primitive size in the PROPERTY token
and don't need special input with their size.
2009-12-25 05:52:20 -05:00
Zack Rusin
b0bc582db7 draw: disable some debugging output coming from the geometry shaders 2009-12-25 05:52:20 -05:00
Zack Rusin
519a6d308d gallium: geometry shader can be always enabled and we don't need a cap for that
using the draw module allows us to enable geometry shading even on hardware
that doesn't support it.
2009-12-25 05:52:20 -05:00
Zack Rusin
a00da63e66 util: put vertices_per_primitive function in its proper location 2009-12-25 05:52:19 -05:00
Zack Rusin
49155c3264 draw/tgsi: fix geometry shader input/output swizzling 2009-12-25 05:52:19 -05:00
Zack Rusin
afd01366b0 tgsi: dump the indices correctly when dealing with 2d arrays 2009-12-25 05:52:19 -05:00
Zack Rusin
960be012a9 tgsi: fix property parsing/building 2009-12-25 05:52:19 -05:00
Zack Rusin
e9c6f01a52 python: fix python state tracker after some latest changes 2009-12-25 05:52:18 -05:00
Zack Rusin
ac96ee1c16 softpipe: make it possible to dump geometry shader from the softpipe 2009-12-25 05:52:18 -05:00
Zack Rusin
22370990f2 tgsi: add missing support for two dimensional arrays in various places
in particular asm text parsing and sanity checking were missing code
to handle multi-dimensional arrays/geometry shaders
2009-12-25 05:52:18 -05:00
Zack Rusin
8a39f5dfdd python/gs: fix the example 2009-12-25 05:52:18 -05:00
Zack Rusin
f658fa5e8f gallium: add an inline that returns number of vertices per primitive 2009-12-25 05:52:18 -05:00
Zack Rusin
42eefb8235 softpipe/gs: don't crash with null shader 2009-12-25 05:52:17 -05:00
Zack Rusin
b0575151b6 gs: fix drivers so they work with geometry shaders 2009-12-25 05:52:17 -05:00
Zack Rusin
5aac920e49 tgsi: make the tgsi assembly parser report line/column on error 2009-12-25 05:52:17 -05:00
Zack Rusin
89d8577fb3 gallium: add geometry shader support to gallium 2009-12-25 05:52:16 -05:00
Brian Paul
57cce7a409 mklib: put usage info into usage() function 2009-12-24 07:24:33 -07:00
Brian Paul
191d9651cd mklib: expand .a into .o files on FreeBSD, put common code into subroutines 2009-12-24 07:24:33 -07:00
Keith Whitwell
5f6dcf65e7 i965g: get trivial/tri working again after edgeflag changes 2009-12-24 12:53:07 +00:00
Keith Whitwell
6c30e17f9e i965g: strict aliasing changes 2009-12-24 12:53:06 +00:00
Keith Whitwell
e4069d07dd gallium/util: quieten compiler 2009-12-24 12:53:06 +00:00
Keith Whitwell
9546c3dbd2 i965g: calculate depth min/max
Previously hard-wired to 0..1
2009-12-24 12:53:06 +00:00
Christoph Bumiller
b7b2226a75 nv50: support TGSI_OPCODE_CONT 2009-12-24 13:36:54 +01:00
Christoph Bumiller
d29f55546d nv50: make edgeflags work
It doesn't seem to be possible to set the egdeflag in the
vertex shader, so we need to fallback to pushing vertices
through the FIFO and use method 0x15e4 if they are used.

This only works if VP does MOV OUT[X] IN[Y] where X is the
edgeflag output, and Y is saved so we can tell the correct
input later.

The VP still writes the useless values to wasted outputs
as punishment.
2009-12-24 12:48:00 +01:00
Corbin Simpson
54ddf642df docs: Add all semantics to TGSI doc, regen. 2009-12-23 23:36:06 -08:00
Roland Scheidegger
1278507e3b gallium: adapt drivers to pipe_constant_buffer removal 2009-12-24 00:55:49 +01:00
Roland Scheidegger
e3be32ccf9 gallium: propagate draw retval changes into cell driver 2009-12-23 21:48:36 +01:00
Roland Scheidegger
f44b0ff843 gallium: adapt state trackers etc. to pipe_constant_buffer removal 2009-12-23 20:44:06 +01:00
Roland Scheidegger
beb712ee9a gallium: API cleanup, remove pointless pipe_constant_buffer 2009-12-23 20:42:55 +01:00
Michal Krol
d0b55120be gallium: Add interfaces needed for instanced drawing. 2009-12-23 19:37:18 +01:00
José Fonseca
b5a408bae5 llvmpipe: Install unit tests on build/xxx/bin 2009-12-23 16:38:50 +00:00
José Fonseca
88b2d8f796 util: Define common dynamic library extensions. 2009-12-23 16:38:50 +00:00
Keith Whitwell
b2a615e3cd glsl/pp: move static functions out of header file 2009-12-23 16:10:37 +00:00
Keith Whitwell
cdd25ab8cf glsl/pp: quieten compiler about missing case statements 2009-12-23 16:10:37 +00:00
Tomas Carnecky
cc7a2d8e64 i965g: Rename {pf->util_format}_is_depth_or_stencil() 2009-12-23 16:58:53 +01:00
Roland Scheidegger
faae0e5da3 rbug: rename pf_is_compressed to util_format_is_compressed 2009-12-23 16:57:46 +01:00
Tomas Carnecky
315ca95666 [i965] Rename {pf -> util}_format_is_depth_or_stencil()
The function was moved and renamed in 0bed834b.

Signed-off-by: Tomas Carnecky <tom@dbservice.com>
2009-12-23 15:40:20 +00:00
Vinson Lee
0f6cbc55b7 progs/tests: Fix build.
(cherry picked from commit 1bf2d78b11)
2009-12-22 23:30:23 -08:00
Eric Anholt
f677480389 intel: Replace some gen3 IS_* checks with context structure usage.
Shaves 400 bytes or so from i915_dri.so.
2009-12-22 14:20:27 -08:00
Eric Anholt
cb3810dd19 intel: Replace IS_965 checks with context structure usage.
Saves another 600 bytes or so of code.
2009-12-22 14:20:27 -08:00
Eric Anholt
0b87f143c4 intel: Replace IS_G4X() across the driver with context structure usage.
Saves ~2KB of code.
2009-12-22 14:20:26 -08:00
Eric Anholt
1c96e85c9d intel: Replace IS_IGDNG checks with intel->is_ironlake or needs_ff_sync.
Saves ~480 bytes of code.
2009-12-22 14:20:26 -08:00
Eric Anholt
b08ed4f595 mesa: Fix a NULL deref in glDeleteFragmentShaderATI(badname);
Fixes piglit ati-fs-bad-delete.  Caught by clang.
2009-12-22 14:20:26 -08:00
Eric Anholt
fbeceec97b mesa: remove unnecessary store. 2009-12-22 14:20:26 -08:00
Eric Anholt
6260d4a14c mesa: Remove an unnecessary store reported by clang.
This was a workaround for a compiler warning that was showing a real
error.  The real error was later fixed.
2009-12-22 14:20:26 -08:00
Eric Anholt
d85a6f70eb intel: Fix leakage of active texture state in glBitmap fp metaops.
Noticed by clang.
2009-12-22 14:20:26 -08:00
Eric Anholt
e3202a8cc7 i915: Fix use of uninitialized variable in OPCODE_NOISE stub.
We don't actually care which register is used since we're just
swizzling (0,0,0,0), but it should be a valid variable number.
Detected by clang.
2009-12-22 14:20:26 -08:00
Eric Anholt
d203dbc73d mesa: Replace CLAMP_SELF() macro with more obvious CLAMP() usage.
The same code is generated, and readers and static analyzers are
happier.
2009-12-22 14:20:26 -08:00
Eric Anholt
5727147f89 intel: Remove unused stored values reported by clang. 2009-12-22 14:20:26 -08:00
Eric Anholt
1a80fe461e mesa: Remove _mesa_exit wrapper for exit().
It does nothing else while being less useful than exit() because it lacks
attributes that real exit() has.
2009-12-22 14:20:26 -08:00
Brian Paul
ddd9729bc3 mesa: adjust OPCODE_IF/ELSE BranchTarget fields to point to ELSE/ENDIF instr.
This is a little more logical.  Suggested in bug report 25654.
2009-12-22 14:26:06 -07:00
Brian Paul
db721151b7 mesa: adjust BRK/CONT BranchTarget to always point to ENDLOOP instruction
To be more consistant.
2009-12-22 14:26:06 -07:00
Brian Paul
e8ea2d26cd mesa: added some assertions in BNGLOOP/ENDLOOP cases 2009-12-22 14:26:06 -07:00
Roland Scheidegger
d186079520 i965g: fix for edgeflag changes (untested) 2009-12-22 21:26:51 +01:00
Roland Scheidegger
35e8283c69 Merge branch 'gallium-edgeflags'
Conflicts:
	src/mesa/state_tracker/st_draw.c
2009-12-22 20:54:26 +01:00
José Fonseca
00b463fc30 scons: Set the default windows platform to be windows userspace.
I thought I had done this ages ago.
2009-12-22 19:03:56 +00:00
Michal Krol
79bb3da4d3 tgsi: Implement BREAKC in interpreter. 2009-12-22 16:11:40 +01:00
Keith Whitwell
f069e45750 i965g: fix bo_reference 2009-12-22 09:57:16 +00:00
Keith Whitwell
96d63ebbf5 i965g: update for u_format changes 2009-12-22 09:52:26 +00:00
Keith Whitwell
aa02683e45 Merge branch 'i965g-restart'
Conflicts:
	configure.ac
2009-12-22 09:40:39 +00:00
Christoph Bumiller
ebbc73d1ae nv50: correct the negation of DDY sources
The state tracker now does the correct thing, so
interpret negation normally.
2009-12-22 10:14:45 +01:00
Corbin Simpson
5bcd26c172 docs: Re-adjust headers for TGSI, regenerate. 2009-12-21 21:04:10 -08:00
Corbin Simpson
1a7b2f7e95 docs: Regenerate. 2009-12-21 20:33:18 -08:00
Corbin Simpson
da65ac6bba docs: Moar cleanup.
Good enough for now!
2009-12-21 20:32:46 -08:00
Corbin Simpson
ecb2f2a230 docs: \times.
Yay for sed.
2009-12-21 20:07:10 -08:00
Corbin Simpson
14743ac0e3 docs: abs, lg2, ceil. 2009-12-21 20:01:42 -08:00
Corbin Simpson
dd801e5c02 docs: Pow, sqrt. 2009-12-21 19:41:09 -08:00
Corbin Simpson
d92a685bc3 docs: Clean floor, sine, cosine. 2009-12-21 19:30:29 -08:00
Corbin Simpson
e8ed3b9607 docs: Start mathifying TGSI insts. 2009-12-21 19:12:55 -08:00
Ian Romanick
71678a7ede intel: Replace release info in DRIVER_DATE with "DEVELOPMENT" 2009-12-21 18:46:17 -08:00
Ian Romanick
a4b6b42885 Merge branch 'mesa_7_7_branch'
Conflicts:
	src/mesa/main/version.h
2009-12-21 18:45:31 -08:00
Brian Paul
ef17105134 glsl: assorted clean-ups in slang_compile.c 2009-12-21 19:14:41 -07:00
Corbin Simpson
9ddeab48c8 More docs. Glossary. 2009-12-21 18:01:24 -08:00
Jeremy Huddleston
3839f6768d darwin: Build glsl
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2009-12-21 17:49:44 -08:00
Jeremy Huddleston
5bbdc7f420 osmesa: Fix a copy/paste error in building libOSMesa
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2009-12-21 17:49:43 -08:00
Brian Paul
9eb7fc6661 Merge branch 'mesa_7_7_branch'
Conflicts:
	src/mesa/main/version.h
	src/mesa/state_tracker/st_atom_shader.c
2009-12-21 18:35:54 -07:00
Fabio Pedretti
ae1c0a06e8 configure.ac: fix for libdrm_radeon API changes. 2009-12-22 10:43:35 +10:00
Keith Whitwell
f3347fe397 gallium/docs: extend the context docs a little 2009-12-21 23:44:32 +00:00
Keith Whitwell
14eacb041b docs: remove some old opcodes and other cruft from tgsi doc 2009-12-21 23:38:29 +00:00
Keith Whitwell
a62aaa7399 docs: pull in tgsi-instruction-set.txt verbatim 2009-12-21 23:25:15 +00:00
Keith Whitwell
03f212b0d8 gallium: propogate draw retval changes into more drivers 2009-12-21 22:55:40 +00:00
Keith Whitwell
09e785ee04 gallium: remove return value from draw calls 2009-12-21 22:14:35 +00:00
Brian Paul
bd5fbcf92b osmesa: added new GLSL libs 2009-12-21 13:37:49 -07:00
Brian Paul
d26cdaaa23 progs/osmes: add missing libGL dependency, remove unneeded lines 2009-12-21 13:37:11 -07:00
Keith Whitwell
0fc4dd3819 i965g: fixes to build after merge of master 2009-12-21 19:50:05 +00:00
Keith Whitwell
f72de22439 i965g: remove half-finished change to tgsi_parse 2009-12-21 19:22:45 +00:00
Keith Whitwell
57531baa92 i965g: back out unintentional changes to linux-dri 2009-12-21 19:21:09 +00:00
Keith Whitwell
66e779c22b i965g: back out unintentional changes to gears 2009-12-21 19:19:01 +00:00
Keith Whitwell
a5585cb533 Merge commit 'origin/master' into i965g-restart
Conflicts:
	SConstruct
	configs/default
	configs/linux-dri
2009-12-21 19:18:41 +00:00
Christoph Bumiller
c020a83fae util: draw cube mipmaps with TEX CUBE 2009-12-21 19:04:06 +00:00
Roland Scheidegger
8f1d2ab590 python: fix some pipe_format_simplify merge damage 2009-12-21 18:20:31 +01:00
Roland Scheidegger
ba25137655 svga: fix typo 2009-12-21 18:20:01 +01:00
Keith Whitwell
d288a30610 ws/i965: respect DEBUG_WINSYS flag 2009-12-21 16:58:14 +00:00
Keith Whitwell
061411b261 i965g: hook vertex state emit up to PIPE_NEW_VERTEX_BUFFER 2009-12-21 16:57:37 +00:00
Keith Whitwell
1ec7e058f5 i965g: keep refcounts to bound vertex buffers 2009-12-21 16:56:46 +00:00
Keith Whitwell
6c719d4c22 i965g: add DEBUG_WINSYS flag 2009-12-21 16:55:40 +00:00
Keith Whitwell
f217927a57 i965g: remove duplicate set_viewport_state, fixes samples/depth 2009-12-21 15:38:08 +00:00
Andre Maasikas
764899d7ab r600: support more of arb_point_sprite and also sprite_coord_origin 2009-12-21 15:23:37 +02:00
Andre Maasikas
69728a2ae2 r600: disallow negative offsets for relative addressing for now
otherwise for example const[ADDR-3] gets us 253 - ALU_SRC_LITERAL which
expects immediate floats to follow and hangs
2009-12-21 15:23:27 +02:00
Michal Krol
3d3480abbc vega: Add missing actual argument. 2009-12-21 11:58:17 +01:00
Jeremy Huddleston
ad7f9d71e2 darwin: mklib: Use lipo rather than file to figure out architectures of object files 2009-12-20 21:34:27 -08:00
Jeremy Huddleston
4a1e103858 darwin: Cleanup CPPFLAGS a bit 2009-12-20 21:32:35 -08:00
Corbin Simpson
c083fa9bba Regen docs. 2009-12-20 19:42:03 -08:00
Corbin Simpson
a524aab8ae Moar docs, mostly context. 2009-12-20 19:41:50 -08:00
Corbin Simpson
9f936f2001 Regenerate docs. 2009-12-20 17:25:44 -08:00
Corbin Simpson
fa33812d47 Document rasterizer. 2009-12-20 17:25:36 -08:00
Corbin Simpson
c80f2b04e0 Fill out some of the CSO info.
...And looks like there's already things I don't know. Go figure.
2009-12-20 16:40:39 -08:00
Dave Airlie
393857a2f5 r600: fix glFrontFace(GL_CW)
fd.o bug #25290

Suggested fix from Rafael Monica
2009-12-21 10:21:28 +10:00
Corbin Simpson
32d737397c r300g: Add a few more params. 2009-12-20 15:47:48 -08:00
Corbin Simpson
8283e200af Add screen and context to docs. 2009-12-20 15:28:00 -08:00
Dave Airlie
55c43ee315 glsl: make stack compile.
it would be nice if this stuff would be test built on mesa's primary
platform with mesa's primary build system.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-21 09:10:21 +10:00
Corbin Simpson
a8df5cad9d Add a compiled HTML doctree. 2009-12-20 15:02:33 -08:00
Corbin Simpson
c686e17e52 Add Gallium docs.
In Sphinx/ReST format.
2009-12-20 15:00:40 -08:00
Dave Airlie
b065aec840 radeon/r600: use new libdrm_radeon api 2009-12-21 08:09:11 +10:00
Corbin Simpson
65ecbdd49c r300g: Add a few more params. 2009-12-20 14:00:34 -08:00
Michal Krol
1071ad70f5 glsl/apps: Update after glsl cl interface changes. 2009-12-20 21:19:10 +01:00
Michal Krol
1cc9610f88 slang: Update after glsl cl interface changes. 2009-12-20 21:19:09 +01:00
Michal Krol
d801c296c6 glsl: Do syntax parsing inline with processing. 2009-12-20 21:19:07 +01:00
Michal Krol
5fb345c422 slang: Add gitignore for autogenerated files. 2009-12-20 21:19:06 +01:00
Michal Krol
ec73cd011d slang: Update after glsl pp changes. 2009-12-20 21:19:05 +01:00
Michal Krol
9c15948125 glsl/apps: Update after glsl pp interface changes. 2009-12-20 21:19:03 +01:00
Michal Krol
e0f57a37b2 glsl/apps: Do not print number of eaten tokens in version.
This is due to the glsl pp interface changes.
2009-12-20 21:19:02 +01:00
Michal Krol
0874ce48a6 glsl/apps: Print error line number in compile. 2009-12-20 21:19:01 +01:00
Michal Krol
d696cb279d glsl/pp: Do processing inline with tokenisation. 2009-12-20 21:18:59 +01:00
Michal Krol
7631dca25b glsl/pp: Remove outdated TODO.
Already implemented in mesa compiler using predefined symbols.
2009-12-20 21:18:58 +01:00
Michal Krol
e9aa65d2b7 glsl/pp: Report correct error line for purify and tokeniser errors. 2009-12-20 21:18:57 +01:00
Christoph Bumiller
a6e663def4 util: util_format_get_blocksizebits() returns bits per block. 2009-12-20 19:09:35 +01:00
Christoph Bumiller
b3ac75f7eb nv50: make address reg allocation a little less hacky
Before I tried to distinguish int +0 and -0, and regs
relative to $a1 would have been considered reserved
for TGSI.
This would probably never occur, let it be fixed even so.
2009-12-20 14:15:51 +01:00
Christoph Bumiller
2ed083dda9 nv50: use BREAKADDR and BREAK for loops
This is easier, we don't have to record all the BRK branches
to fill in the address at ENDLOOP - which wasn't done before
and thus made all but the last BRK branch jump to the start.

Also, we don't risk reactivting threads that already left
the loop if we join threads after a conditional with a BRK
(although it might be wiser to remove the join altogether
in such cases).
2009-12-20 14:15:51 +01:00
Christoph Bumiller
3c7f109d67 nv50: handle TGSI_OPCODE_RET,KILP 2009-12-20 14:15:51 +01:00
Marek Olšák
6ba83cd63f r300g: add texture compare modes 2009-12-19 23:54:53 -08:00
Roland Scheidegger
420ff89067 gallium: don't use edgeflags if the app didn't supply them 2009-12-19 20:25:43 +01:00
Roland Scheidegger
1aba413a70 gallium: fix not generating new vp varient when polygon mode changes 2009-12-19 17:12:14 +01:00
Maciej Cencora
4b6dee0865 r300: minor blit rework
Use vert/tex coords instead of byte offsets for specyfing src/dst image offsets.
This will allow for blitting between tiled/untiled buffers.
2009-12-19 14:43:08 +01:00
Maciej Cencora
a1428868a6 r300: better fix for glCopyTexSubImage 2009-12-19 14:43:08 +01:00
Corbin Simpson
759fd1f25f r300g: Fix provoking vertex for non-quads.
Read the comments. In short, we can't possibly pass piglit's
glean/clipFlat without some help from Gallium and an API/spec change.
2009-12-18 21:50:45 -08:00
Corbin Simpson
f13a904c34 r300g: Respect provoking vertex for trifans.
Fixes part of piglit's clipFlat test; next up is to get quads right.
2009-12-18 19:49:14 -08:00
Roland Scheidegger
429f0e3b37 gallium: fix up drivers for edgeflag changes
several drivers which chose to ignore edgeflags might require some more work,
while edgeflags never worked there they might now crash.
2009-12-19 00:18:43 +01:00
Roland Scheidegger
ff5b0c72db gallium: store edgflag info in tgsi_shader_info
provides easier access for drivers which may base fallback decision on this
2009-12-18 23:53:25 +01:00
Corbin Simpson
bf611cef29 r300g: Eliminate a couple more asserts. 2009-12-18 14:07:12 -08:00
Corbin Simpson
62afcbb233 r300g: Nuke r300_vbo. 2009-12-18 14:07:12 -08:00
Brian Paul
263f4322e7 progs/demos: fix glut initialization calls
Remove glutInitWindowPosition() calls to play nicer with window managers.

Move glutInitWindowSize() calls before glutInit() so the the default window
size can be overridden by the -geometry cmd line option.
2009-12-18 13:58:14 -07:00
Brian Paul
6a7b6a530d llvmpipe: added linux-llvm-debug configuration 2009-12-18 11:17:06 -07:00
Brian Paul
04794080d2 llvmpipe: change configs/linux-llvm from debug build to optimized build
Basically equivalent to the SCons non-debug build now.
2009-12-18 11:13:06 -07:00
Alex Deucher
c8de081dc1 radeon: protect fbo allocation message with debug
fixes fdo bug 25708

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2009-12-18 10:57:37 -05:00
Roland Scheidegger
9d938e29f2 fix debug output mising from edgeflag changes 2009-12-18 16:09:32 +01:00
Roland Scheidegger
890809d71b gallium: fix mesa to tgsi translation for edgeflags
test apps (progs/trivial/tri-edgeflags and similar) seem to work now
2009-12-18 15:54:28 +01:00
Michal Krol
c35e5c19e7 util: Add util_format_has_alpha(), enclose in extern C. 2009-12-18 14:15:21 +01:00
Michal Krol
b1580a1623 util/pack: Handle the remaining formats with generic u_format access functions. 2009-12-18 13:06:10 +01:00
Corbin Simpson
f874da422b util: Update blitter for u_format changes.
:T
2009-12-18 03:20:19 -08:00
Corbin Simpson
a70eba5648 Revert "r300g: flush CS if a buffer being deleted is referenced by it"
As requested by just about everybody. I'm going back to actually reading
patches before ACKing and pushing them.

This reverts commit 417ce06306.

Conflicts:

	src/gallium/winsys/drm/radeon/core/radeon_buffer.c
2009-12-18 02:55:28 -08:00
Michal Krol
7855fcb63b Merge branch 'pipe-format-simplify' 2009-12-18 09:08:26 +01:00
Richard Li
465333ab70 r600 : enable gl2, set R600_ENABLE_GLSL_TEST by default. 2009-12-18 00:23:04 -05:00
Dave Airlie
112908c279 radeon: fix frontbuffer read/drawpixels
Bug 25699

The main problem was the optimising flush wasn't doing the front
rendering checks properly.
2009-12-18 14:35:03 +10:00
Dave Airlie
5f59e79f3a r300g: store own copy of flush_cb and flush data.
don't go sneaking around inside the libdrm copy.
2009-12-18 10:24:50 +10:00
Michal Krol
b1ed72ebe2 Move the remaining format pf_get_* functions to u_format.h.
Previously they depended on format blocks, but after removing those
they started depending on format encoding.
2009-12-17 23:41:57 +01:00
Michal Krol
ec5577a83d util: Remove util_format_get_block(). 2009-12-17 22:39:03 +01:00
Michal Krol
16c6dce013 Merge branch 'master' into pipe-format-simplify
Conflicts:
	src/gallium/auxiliary/draw/draw_pipe_aaline.c
	src/gallium/auxiliary/draw/draw_pipe_pstipple.c
	src/gallium/auxiliary/util/u_blit.c
	src/gallium/auxiliary/util/u_gen_mipmap.c
	src/gallium/auxiliary/util/u_surface.c
	src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c
	src/gallium/drivers/cell/ppu/cell_texture.c
	src/gallium/drivers/llvmpipe/lp_texture.c
	src/gallium/drivers/r300/r300_emit.c
	src/gallium/drivers/r300/r300_texture.c
	src/gallium/drivers/softpipe/sp_texture.c
	src/gallium/drivers/softpipe/sp_tile_cache.c
	src/gallium/drivers/svga/svga_state_vs.c
	src/gallium/include/pipe/p_format.h
	src/gallium/state_trackers/dri/dri_drawable.c
	src/gallium/state_trackers/egl/egl_surface.c
	src/gallium/state_trackers/python/p_device.i
	src/gallium/state_trackers/python/st_softpipe_winsys.c
	src/gallium/state_trackers/vega/api_filters.c
	src/gallium/state_trackers/vega/image.c
	src/gallium/state_trackers/vega/mask.c
	src/gallium/state_trackers/vega/paint.c
	src/gallium/state_trackers/vega/renderer.c
	src/gallium/state_trackers/vega/vg_tracker.c
	src/gallium/state_trackers/xorg/xorg_crtc.c
	src/gallium/state_trackers/xorg/xorg_dri2.c
	src/gallium/state_trackers/xorg/xorg_exa.c
	src/gallium/state_trackers/xorg/xorg_renderer.c
	src/gallium/state_trackers/xorg/xorg_xv.c
	src/gallium/state_trackers/xorg/xvmc/surface.c
	src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c
	src/gallium/winsys/drm/radeon/core/radeon_buffer.c
	src/gallium/winsys/egl_xlib/sw_winsys.c
	src/gallium/winsys/g3dvl/xlib/xsp_winsys.c
	src/gallium/winsys/gdi/gdi_llvmpipe_winsys.c
	src/gallium/winsys/gdi/gdi_softpipe_winsys.c
	src/gallium/winsys/xlib/xlib_cell.c
	src/gallium/winsys/xlib/xlib_llvmpipe.c
	src/gallium/winsys/xlib/xlib_softpipe.c
	src/mesa/state_tracker/st_cb_fbo.c
	src/mesa/state_tracker/st_cb_texture.c
	src/mesa/state_tracker/st_texture.c
2009-12-17 22:37:15 +01:00
Brian Paul
aeb6351a09 llvmpipe: fix upper/lower-case typo 2009-12-17 14:26:48 -07:00
Brian Paul
7d9b97703a llvmpipe: added function comments 2009-12-17 14:22:43 -07:00
Michal Krol
440fc5bf78 util/format: Fix bogus assertion. 2009-12-17 21:57:24 +01:00
Michal Krol
3af2ddbe94 s/desc->type/desc->channel[0].type/ 2009-12-17 21:25:47 +01:00
Sedat Dilek
294bd53d4b glsl/apps: Add dummy install target to fix 'make install'
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-12-17 12:46:55 -07:00
Sedat Dilek
2f127e5236 configure.ac: Add glsl to SRC_DIRS
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-12-17 12:46:55 -07:00
Brian Paul
5771f3d483 llvmpipe: remove unused code, added comments, etc 2009-12-17 10:52:50 -07:00
Brian Paul
808170a0ff llvmpipe: replace INT_MIN/2 with INT_MIN
Since changing the in/out test we can just use INT_MIN to be sure the
comparison against the step values always passes.
2009-12-17 09:01:01 -07:00
Michal Krol
e195eab909 Merge branch 'glsl-pp-rework-2' 2009-12-17 17:00:46 +01:00
Brian Paul
b9d33db0a4 llvmpipe: improve the in/out test a little
Instead of:
  s = c + step
  m = s > 0
Do:
  m = step > c  (with negated c)
2009-12-17 08:17:04 -07:00
Keith Whitwell
7f2ba80025 llvmpipe: keep copy of framebuffer state in setup context
Avoids crashes when first frame is rendered before window is mapped.
Avoids potential issue where fb state is changed before setup context is
flushed.
2009-12-17 11:29:37 +00:00
Dave Airlie
1c28073fdf radeon: drop assert accessing cref which is meant to be hidden 2009-12-17 14:23:53 +10:00
Dave Airlie
5484f9dfc6 radeon: drop unused members of radeon_state. 2009-12-17 14:23:47 +10:00
Dave Airlie
f24c29cc39 r600: move structs for legacy cmdbuf into cmdbuf C file.
these really shouldn't be exposed here
2009-12-17 14:23:08 +10:00
Brian Paul
ab94381930 llvmpipe: do final the pixel in/out triangle test in the fragment shader
The test to determine which of the pixels in a 2x2 quad is now done in
the fragment shader rather than in the calling C code.  This is a little
faster but there's a few more things to do.

Note that the step[] array elements are in a different order now.  Rather
than being in row-major order for the 4x4 grid, they're in "quad-major"
order.  The setup of the step arrays is a little more complicated now.
So is the course/intermediate tile test code, but some lookup tables
help with that.

Next steps:
 - early-cull 2x2 quads which are totally outside the triangle.
 - skip the in/out test for fully contained quads
 - make the in/out comparison code tighter/faster.
2009-12-16 16:10:05 -07:00
Roland Scheidegger
50caff5675 gallium: edgeflags change fixes
use correct number of vertex inputs
fix not running pipeline in case of edgeflags
changes to mesa to tgsi translation still very broken
2009-12-16 22:12:16 +01:00
Brian Paul
e288796c92 llvmpipe: added lp_build_int32_vec4_type() 2009-12-16 12:33:11 -07:00
Brian Paul
2297bc9233 llvmpipe: refactor lp_build_cmp() to use lp_build_compare() 2009-12-16 12:32:45 -07:00
Richard Li
09cef45393 r600 : clean a bit to prepare to enable gl2. 2009-12-16 11:41:37 -05:00
José Fonseca
2584c5bd25 llvmpipe: add LP_DEBUG env var
Cherry-picked from dec35d04ae.
2009-12-16 15:06:17 +00:00
Brian Paul
f1f49bd465 llvmpipe: fix broken TGSI_OPCODE_FRC codegen 2009-12-16 15:06:17 +00:00
Brian Paul
43d6c81ae2 llvmpipe: fix broken lp_build_abs() 2009-12-16 15:06:16 +00:00
Marek Olšák
2ddee2cfbc r300g: fix emission of which textures are enabled
It fixes most of the "Bad CS" issues in piglit/texCombine and piglit/fbo.
Some other issues of this kind will get fixed in the kernel soon (depth-only
rendering, S3TC, and RGTC).
2009-12-15 19:04:46 -08:00
Marek Olšák
ded4ecde60 r300g: clean up the invariant state 2009-12-15 19:04:46 -08:00
Marek Olšák
acce4824ec r300g: clamp vertex indices to [min,max] everywhere 2009-12-15 19:04:46 -08:00
Marek Olšák
a6d701d1c6 r300g: if no colorbuffers are set, disable blending and set the color mask to 0
This seems to be the only way to disable the first colorbuffer.
2009-12-15 19:04:46 -08:00
Marek Olšák
cf85bf9cd0 r300g: set the number of colorbuffers in RB3D_CCTL 2009-12-15 19:04:46 -08:00
Marek Olšák
de0befc4b2 r300g: remove unnecessary flush in set_sampler_textures 2009-12-15 19:04:45 -08:00
Marek Olšák
c5e0b0bc37 r300g: add Z24X8 to the list of unsupported sampler formats on R3xx-R4xx 2009-12-15 19:04:45 -08:00
Marek Olšák
38a97148bf r300g: add acceleration of the clear, surface_copy, and surface_fill functions 2009-12-15 19:04:45 -08:00
Marek Olšák
417ce06306 r300g: flush CS if a buffer being deleted is referenced by it 2009-12-15 19:04:45 -08:00
Michel Dänzer
bc443d841c r300: Fix typo on < R5xx RS setup for blits. 2009-12-16 00:51:55 +01:00
Brian Paul
cdbcd96fdf llvmpipe: tighten up an assertion 2009-12-15 15:39:48 -07:00
Marek Olšák
80e8156394 util/blitter: kill the draw_quad callback 2009-12-15 18:00:48 +00:00
Marek Olšák
85bf420a78 util/blitter: allocate most of the state objects on-demand 2009-12-15 18:00:48 +00:00
Marek Olšák
ab85ba30e2 util/blitter: use PIPE_MAX_* limits, and fix a memory leak 2009-12-15 18:00:48 +00:00
Marek Olšák
e1d0f47808 pipe: add PIPE_MAX_TEXTURE_TYPES 2009-12-15 18:00:39 +00:00
Marek Olšák
55753f59ae util: add blitter 2009-12-15 18:00:30 +00:00
Marek Olšák
4c61022b4a util: add a function which converts 2D coordinates to cubemap coordinates
The code was taken over from u_gen_mipmap.
2009-12-15 17:59:54 +00:00
Marek Olšák
dff4c9ed55 util: add new fragment shaders to simple_shaders
New shaders:
* Fragment shader which writes depth sampled from a texture
* Fragment shader which copies COLOR[0] to multiple render targets

Additional improvements:
* The fragment 'tex' shaders now take a sampler type (TGSI_TEXTURE_*)
  so that they can sample from any type of texture, not only from a 2D one.
2009-12-15 17:59:50 +00:00
Brian Paul
276b8523e8 llvmpipe: use 1ULL to be ready for 64-bit arithmetic someday 2009-12-15 07:58:37 -07:00
José Fonseca
3a15c48ece llvmpipe: Fix yet another copynpaste typo in lp_build_log2_approx.
Now fslight looks perfect.
2009-12-15 14:46:43 +00:00
José Fonseca
85c27c3ef7 llvmpipe: Fix lp_build_polynomial comment. 2009-12-15 14:15:52 +00:00
José Fonseca
72c9878069 llvmpipe: Fix typo in lp_build_log constant. 2009-12-15 13:58:53 +00:00
José Fonseca
079b1cf4cf util: Fix unity value for swizzle 1.
It should be 255 for ubytes, and not 1.

Thanks Michal for spotting this.
2009-12-15 13:40:13 +00:00
José Fonseca
846e38f1c3 llvmpipe: Fix bad SI -> FP conversion into lp_build_log2_approx.
It should be a bitcast  as the integer value is actually an encoded FP
already.
2009-12-15 13:15:16 +00:00
José Fonseca
d508bf862b util: Add dl wrappers.
Borrowed from Mesa, slightly changed for more type safety.
2009-12-15 13:15:16 +00:00
Michal Krol
c1efa45e04 tgsi/text: Don't use strncasecmp(), it breaks windows build.
Also, break out of the for-loop when a matching property is found.
2009-12-15 13:54:05 +01:00
Andre Maasikas
f8135d545b r600: use _mesa_insert_instructions to fixup wpos instead of manual ins insert
this keeps branch targets correct.
glsl/trirast works correctly now afaics
2009-12-15 12:08:55 +02:00
Andre Maasikas
dbc374cd30 r600: fix typos for vert-tex
at least i think this is how it was meant to work
2009-12-15 10:26:37 +02:00
Andre Maasikas
bae5e7f213 r600: fix fragment.position
wpos.y seems inferted to what opengl expexts, so calculate correct
value from window dimension and replace references in fragmentprog
with calculated value
2009-12-15 09:46:57 +02:00
Andre Maasikas
10f5cff6ac r600: add support for FRAG_ATTRIB_PNTC 2009-12-15 09:46:49 +02:00
Andre Maasikas
0c046bec8f r600: add DDX DDY opcodes 2009-12-15 09:46:34 +02:00
Richard Li
18ebcfe393 r600 : add texture support for vertex shader. 2009-12-14 18:08:40 -05:00
Brian Paul
55879440d7 llvmpipe: fix broken TGSI_OPCODE_FRC codegen 2009-12-14 15:27:35 -07:00
Brian Paul
6e2a93739e llvmpipe: fix broken lp_build_abs() 2009-12-14 15:24:31 -07:00
Zack Rusin
3ff688ea29 tgsi: add properties and system value register
adds support for properties to all parts of the tgsi framework, plus
introduces a new register which will be used for system generated
values.
2009-12-14 16:35:09 -05:00
Brian Paul
b06b3a4925 llvmpipe: update file list in Makefile 2009-12-14 11:49:23 -07:00
Maarten Maathuis
41b52aa336 nouveau: avoid running out of relocs
- Added flush notify functions for NV30 and NV40.
- Flushing mid frame will call flush notify, which will resubmit all
relocs.
- We don't try to recover from reloc failure yet.
2009-12-14 19:31:54 +01:00
Christoph Bumiller
2677f199a5 nv50: be more cautious about using reg_instance
Trying to free part of nv50_pc->reg_instances[] for an
nv50_reg representing an indirect constant resulted in
a segmentation fault.
2009-12-14 18:39:13 +01:00
Roland Scheidegger
a0127b6ced gallium: more work for edgeflags changes
fixes, cleanups, etc.
not working yet
2009-12-14 18:36:33 +01:00
Michal Krol
c14be63c56 tgsi/ureg: Add ureg_DECL_gs_input().
Allows one to declare GS input registers.
2009-12-14 17:29:58 +01:00
Christoph Bumiller
1778ddaf74 nv50: store immediates as uint32
Sometimes we want non-float immediates, hacking them into
floats isn't nice.

Sorry, this should have already been committed before.
2009-12-14 11:12:59 +01:00
Patrice Mandin
d4d880199e nouveau: nv50: Add missing ctor_immd_4u32 function 2009-12-13 20:09:33 +01:00
Keith Whitwell
663750d556 llvmpipe: rename bins to scene
It was pretty confusing having an entity named "bin" and another named
"bins", not least because sometimes there was a need to talk about >1
of the "bins" objects, which couldn't be pluralized any further...

Scene is a term used in a bunch of places to talk about what a binner
operates on, so it's a decent choice here.
2009-12-13 18:17:25 +00:00
Maciej Cencora
e76bb2f337 r300: enable accelerated support for glCopyTexImage only under KMS 2009-12-13 17:22:33 +01:00
Maciej Cencora
8403df33e0 r300: fix regression introduced by da73c1ed
The 0 value is correct for I8 format.
2009-12-13 17:20:11 +01:00
Maciej Cencora
9d8501bf27 r300: fix glCopyTexSubImage
Need to properly setup colorbuffer when dst pitch != dst width.
2009-12-13 17:20:11 +01:00
Christoph Bumiller
079b670111 nv50: add proper zslice offset in miptree_surface 2009-12-13 14:39:19 +01:00
Christoph Bumiller
7b5a6fa0c8 nv50: use m2mf z pos instead of calculating offset manually 2009-12-13 14:39:19 +01:00
Christoph Bumiller
44d8c9add2 nv50: add craziness for non-constant TXB and TXL
If lod or bias can be non-constant across a quad of fragments,
we need to execute TEX separately for each value.
Don't ask why.
2009-12-13 14:39:19 +01:00
Patrice Mandin
b91503f457 Revert "nouveau: nv30: Disable swizzled surface usage if any dimension is 1 (Warsow creates a 1x1 front buffer)"
This reverts commit ec7844537e.
2009-12-12 23:15:08 +01:00
Patrice Mandin
ec7844537e nouveau: nv30: Disable swizzled surface usage if any dimension is 1 (Warsow creates a 1x1 front buffer) 2009-12-12 22:31:53 +01:00
Keith Whitwell
39dd7108bf llvmpipe: rename queue size to count 2009-12-12 20:29:39 +00:00
Keith Whitwell
314d3cd751 llvmpipe: rename one of the two rasterize_bins functions 2009-12-12 20:19:46 +00:00
Michal Krol
75f371e973 Remove grammar module -- no dependencies left. 2009-12-12 16:58:43 +01:00
Michal Krol
a3b32934c8 slang: Delete a file that is now autogenerated.
This file has been modified in master and removed in feature branch.
This gave a merge conflict I couldn't resolve by removing and git adding
it to index.
2009-12-12 16:49:26 +01:00
Michal Krol
a3eb0f718e Merge branch 'master' into glsl-pp-rework-2
Conflicts:
	progs/perf/drawoverhead.c
	progs/perf/teximage.c
	progs/perf/vbo.c
	progs/perf/vertexrate.c
	src/mesa/shader/slang/library/slang_common_builtin_gc.h
2009-12-12 16:48:32 +01:00
Christoph Bumiller
d80778218d nv50: support TXB and TXL
... and don't set the 'live' flag for TEX anymore, we'd
have to know if results affect the inputs for another TEX,
and I'm not going to do that kind of analysis now.
2009-12-12 16:39:00 +01:00
Christoph Bumiller
b0036f391a nv50: add S8Z24 depth texture format too 2009-12-12 16:38:59 +01:00
Christoph Bumiller
cc0ffaba7d nv50: fix depth comparison func TSC bits
Unfortunately it seems that if depth comparison is
active and we read a 2D texture, i.e. provide only
2 inputs, the second is used for comparison ...
2009-12-12 16:38:59 +01:00
Christoph Bumiller
6a689783b9 nv50: add src_mask case for IF opcode 2009-12-12 16:38:59 +01:00
Christoph Bumiller
9f3644c423 nv50: plug memory leak in miptree creation/destruction
Keeping this dynamically allocated for texture arrays.
Since we don't use it to store zslice offsets anymore
it's either 1 or 6 integers (cube) ...
2009-12-12 16:38:59 +01:00
Christoph Bumiller
f7a9734492 nv50: use copies of tgsi src nv50_regs
So we can use the 'mod' member without concern
if a source is used multiple times in 1 insn.
2009-12-12 16:38:59 +01:00
Christoph Bumiller
6a15ec9141 nv50: support vertex program textures 2009-12-12 16:38:59 +01:00
Brian Paul
6cbb1219a3 llvmpipe: checkpoint: plug in the new fencing code
This has only been very lightly tested.  More work to come.
2009-12-11 17:59:32 -07:00
Brian Paul
4b70af918d llvmpipe: added lp_rast_fence() bin function 2009-12-11 17:57:45 -07:00
Brian Paul
9323740738 llvmpipe: added lp_rast_get_num_threads() 2009-12-11 17:45:52 -07:00
Brian Paul
8736ee1e7d llvmpipe: added lp_bin_get_num_bins() 2009-12-11 17:33:30 -07:00
Brian Paul
2876b684de llvmpipe: remove old fence code, compile new lp_fence.c file 2009-12-11 17:32:45 -07:00
Brian Paul
edbaca6fd1 llvmpipe: initial fence implementation 2009-12-11 17:32:08 -07:00
Maciej Cencora
784cca9fa5 r300: disable blit debugging info 2009-12-12 00:52:52 +01:00
Maciej Cencora
6b8315494a r300: emit number of used colorbuffers to pass radeon cs checker 2009-12-12 00:52:52 +01:00
Maciej Cencora
dbd53f8f55 r300: setup render target format for r300/r400 cards too 2009-12-12 00:52:51 +01:00
Maciej Cencora
353966b2da r300: finish blit support for r300 2009-12-12 00:52:51 +01:00
Maciej Cencora
c1a7cc1e44 more blit fixes 2009-12-12 00:52:51 +01:00
Maciej Cencora
cd5f167353 blit WIP 2009-12-12 00:52:51 +01:00
Maciej Cencora
7255a5486d r300: use accelerated emit for CopyTex[Sub]Image functions 2009-12-12 00:52:51 +01:00
Maciej Cencora
a4df3f9227 r300: accelerated blit support 2009-12-12 00:52:51 +01:00
Maciej Cencora
0a0d410bdb r300: fix wrong assertion 2009-12-12 00:52:51 +01:00
Maciej Cencora
bd58253f67 r300: export translateTexFormat function 2009-12-12 00:52:51 +01:00
Maciej Cencora
9975c484ad r300: refactor PVS code and constants emission 2009-12-12 00:52:50 +01:00
Maciej Cencora
545a2f4f2d r300: refactor R500 fragment program emission 2009-12-12 00:52:50 +01:00
Maciej Cencora
05fae9fbf6 r300: refactor color buffer setup 2009-12-12 00:52:50 +01:00
Maciej Cencora
5ee270820b r300: use _mesa_meta_Clear for buffer clears 2009-12-12 00:52:50 +01:00
Maciej Cencora
da73c1ed41 r300: minor texture code refactoring 2009-12-12 00:52:50 +01:00
Brian Paul
4430a05a3a gallium: added comment for pipe_reference() return value 2009-12-11 16:50:25 -07:00
Brian Paul
9c01cf425f mesa: minor reformatting/rewrapping in dd.h 2009-12-11 16:42:31 -07:00
Brian Paul
56dce15dcc mesa: remove unused ctx->Driver.ActiveTexture() hook 2009-12-11 16:42:31 -07:00
Brian Paul
e24a8de8ba mesa: updated comment 2009-12-11 16:42:30 -07:00
Brian Paul
92dc0f92b0 llvmpipe: implement lp_rast_load_color() 2009-12-11 15:00:28 -07:00
Brian Paul
2bce5c195f llvmpipe: checkpoint: more thread/queuing changes
Now mapping/unmapping the framebuffer is done by a rasteizer thread
rather than the main calling thread.
2009-12-11 14:52:46 -07:00
Brian Paul
24d894e557 gallium: comments and minor re-org in p_thread.h
There's more work to do in this file:
1. Implement condvars for Windows via Win32 CONDITION_VARIABLE type.
2. Implement barriers for Windows
3. Try to get rid of PIPE_THREAD_HAVE_CONDVAR (only used in trace driver)
4. Why the 2 in _P_THREAD2_H_?
2009-12-11 14:07:27 -07:00
Brian Paul
0fc90dfa28 gallium: added pipe_barrier type and functions 2009-12-11 14:00:25 -07:00
Brian Paul
de31b0e60c llvmpipe: remove unused lp_rasterizer::fb field 2009-12-11 11:56:22 -07:00
Brian Paul
156eabbaf9 llvmpipe: improve framebuffer/surface code 2009-12-11 11:46:23 -07:00
Brian Paul
9d0faea58c llvmpipe: fix-up #includes 2009-12-11 11:42:18 -07:00
Brian Paul
544882eb58 llvmpipe: fix inverted util_framebuffer_state_equal() result 2009-12-11 11:41:11 -07:00
Brian Paul
d1fa748cdb gallium/util: added util_unreference_framebuffer_state() 2009-12-11 11:40:52 -07:00
Brian Paul
8f2a173663 gallium/util: simplify util_framebuffer_state_equal()
And copy width, height in util_copy_framebuffer_state().
2009-12-11 11:39:55 -07:00
Brian Paul
205da96fc6 llvmpipe: remove unused fb parameter 2009-12-11 11:25:22 -07:00
Brian Paul
4e67f10331 llvmpipe: minor comment fix 2009-12-11 11:16:48 -07:00
Brian Paul
09aa984494 Revert "scons: Pass -fno-strict-aliasing to gcc."
This reverts commit a2937a2f4e.

Per Jose's comment, We don't want this on master.
2009-12-11 10:11:45 -07:00
Brian Paul
a087eb590d Merge branch 'mesa_7_7_branch'
Conflicts:
	src/gallium/state_trackers/xorg/xorg_xv.c
	src/mesa/drivers/dri/intel/intel_span.c
2009-12-11 10:04:07 -07:00
Brian Paul
9509f73c21 llvmpipe: checkpoint: use empty/full bin queues 2009-12-10 14:56:30 -07:00
Brian Paul
9a6567f1ed llvmpipe: updated comment 2009-12-10 14:56:11 -07:00
Brian Paul
6d810e5a7b llvmpipe: simplify llvmpipe_set_framebuffer_state() 2009-12-10 14:55:28 -07:00
Brian Paul
a67f39810b gallium/util: added framebuffer compare, copy util funcs 2009-12-10 14:54:57 -07:00
Brian Paul
721b5167dc llvmpipe: added some bin queue debug code 2009-12-10 14:54:32 -07:00
Eric Anholt
cb640c8d40 mesa: Fix default (swrast) GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS.
The swrast pipeline shouldn't have any problem with all the frag and vert
textures being bound at the same time.  Note that this may result in
DRI drivers that don't set this limit having an improbable return
(fragment + vertex < combined), but it seems like it shouldn't cause
problems for apps.
2009-12-10 10:05:31 -08:00
Brian Paul
21008441e4 llvmpipe: updated comments 2009-12-10 10:59:46 -07:00
Eric Anholt
51e945ec9c intel: Attempt to fix up after "Update vertex texture code."
The MaxCombinedTextureImageUnits is the total number of samplers that can
be bound between vertex, geometry, and fragment, not 0.  This should report
the correct value on 965 now.  Other DRI drivers may also need updating if
their MaxVertexTextureImageUnits != 0 (for example, if using the sw vertex
pipeline).

It's not clear to me if there's going to be a valid value for this
limit other than MaxTextureImageUnits + MaxVertexTextureImageUnits (+
MaxGeometryTextureImageUnits eventually).  If not, then we should probably
just move this into the core at Get time.

Bug #25518 (wine regression).  Fixes piglit vp-combined-image-units.
2009-12-10 09:56:52 -08:00
José Fonseca
491f384c39 scons: Get GLSL code building correctly when cross compiling.
This is quite messy. GLSL code has to be built twice: one for the
host OS, another for the target OS.
2009-12-10 16:30:08 +00:00
Brian Paul
289eab5389 glsl/sl: fix _parse_boolconstant()
Need to emit the radix before the digits.
This fixes several glean/glgl1 regressions.
2009-12-10 09:16:39 -07:00
Brian Paul
cc020425e9 mesa: added new libglslpp.a and libglslcl.a to libGL build 2009-12-10 08:33:01 -07:00
Brian Paul
05eccfe79e glsl/apps: remove unused vars 2009-12-10 08:25:47 -07:00
Brian Paul
0d654a7f2c glsl/pp: make some functions static 2009-12-10 08:25:35 -07:00
Brian Paul
52271c5345 glsl/pp: declare sl_pp_purify_options to silence warning 2009-12-10 08:25:16 -07:00
Brian Paul
7502b6affa glsl/cl: silence unused var warning 2009-12-10 08:24:45 -07:00
Michal Krol
f00805a117 slang: Predefine ES symbols for FEATURE_es2_glsl. 2009-12-10 12:59:23 +01:00
Michal Krol
417f36ccb0 glsl/apps: Predefine __GLSL_PP_PREDEFINED_MACRO_TEST for testing. 2009-12-10 12:58:44 +01:00
Michal Krol
22200bcafc glsl/pp: Add support for user-defined macros. 2009-12-10 12:58:21 +01:00
Michal Krol
d1a09a9ba4 glsl/apps: Explicitly add ARB_draw_buffers and ARB_texture_rectangle. 2009-12-10 12:39:37 +01:00
Michal Krol
48c60b0ecb slang: Explicitly enable ARB_draw_buffers and ARB_texture_rectangle.
They are no longer built into the glsl preprocessor.
2009-12-10 12:39:10 +01:00
Michal Krol
91e164b3d0 glsl/pp: Add sl_pp_context_add_extension().
This way third parties are able to add supported extension strings.
2009-12-10 12:38:22 +01:00
Roland Scheidegger
71f4267ac2 winsys/intel: fix dereferencing of opaque type due to pipe_reference changes 2009-12-10 03:51:35 +01:00
michal
068596c9a7 Build mesa glsl with make.
Still don't know how to add glsl to mesa dependencies.
2009-12-10 01:03:15 +01:00
Brian Paul
96689d451a llvmpipe: added some debug/info code 2009-12-09 16:32:32 -07:00
Brian Paul
ad3c16c127 llvmpipe: simplify the tiles_x, tiles_y code a bit 2009-12-09 16:30:05 -07:00
Brian Paul
edf11da7f8 progs/demos/gloss: press 'n' to advance by one frame 2009-12-09 16:23:30 -07:00
Brian Paul
3bee8c2e7c llvmpipe: use the empty_bins queue now 2009-12-09 16:06:04 -07:00
Brian Paul
288ea9770a progs/demos: call glutDestroyWindow() in gloss.c 2009-12-09 14:53:53 -07:00
Brian Paul
d7dbc66636 llvmpipe: checkpoint: begin plugging in bin queue code 2009-12-09 14:53:33 -07:00
Marek Olšák
c6b450033d r300g: fix routing of vertex streams if TCL is bypassed
Generating mipmaps finally works, among other things. Yay!
2009-12-09 13:38:11 -08:00
Marek Olšák
6de7ac73bf r300g: always disable unused colorbuffers 2009-12-09 13:38:11 -08:00
Marek Olšák
87b822e024 r300g: make pow(0,0) return 1 instead of NaN in the R500 fragment shader
Unfortunately we can't fix this easily in the R300 fragment shader,
and it's probably not worth the effort.
2009-12-09 13:38:11 -08:00
Marek Olšák
8cc570a48c r300g: clean up r300_emit_aos 2009-12-09 13:38:11 -08:00
Brian Paul
ea35993e74 llvmpipe: added new lp_bin_queue.[ch] files
The queues will be used for keeping track of full and empty bins so
we can overlap setup with the rasterization threads.
2009-12-09 14:36:54 -07:00
Richard Li
8927b72118 r600 : add pre-compile mesa shader calling interface, in order to handle
complex built-in shader instructions.
2009-12-09 15:39:16 -05:00
Brian Paul
22b07b8be4 llvmpipe: use new lp_setup_get_current_bins() function
This stub function will interface to the queue system...
2009-12-09 12:28:59 -07:00
Brian Paul
88e62b33dc llvmpipe: more bin functions for create/destroy/queries 2009-12-09 12:22:12 -07:00
Keith Whitwell
a08e348a84 gallium: first steps to treat edgeflags as regular vertex element
The idea here is to eliminate the set_edgeflags() call in pipe_context
by treating edgeflags as a regular vertex element.

Edgeflags provoke special treatment in hardware, which means we need to
label them in some way, in this case we'll be passing them through the
vertex shader and labelling the vertex shader output with a new TGSI
semantic (TGSI_SEMANTIC_EDGEFLAG).
2009-12-09 19:03:10 +01:00
Michal Krol
dfdf83d714 Revert "Simplify the redundant meaning of format layout."
This reverts commit eb926ddf9e.
2009-12-09 14:22:30 +01:00
José Fonseca
59f6af51b8 util: Document the meaning of util_format_layout.
The util_format_layout name was unfortunate and there
are  as been a lot of confusion due to this. Hopefully
this will shed some light on what it was meant for.

Bottom line is: do not rely on these values unless
you're automatically code generating pixel
packing/unpacking routines.

Suggestions for better names than util_format_layout
are welcome!
2009-12-09 11:00:26 +00:00
Michal Krol
eb926ddf9e Simplify the redundant meaning of format layout.
We really just need to know whether the format is compressed or not.
For more detailed information format colorspace should suffice.
2009-12-08 20:48:47 +01:00
Roland Scheidegger
47c780180b nouveau: use boolean instead of bool 2009-12-08 19:58:46 +01:00
Roland Scheidegger
849a0644ad cell: use boolean instead of bool 2009-12-08 19:58:36 +01:00
Roland Scheidegger
fd7a9ec7f9 gallium: use boolean instead of bool in p_refcnt.h
all code in gallium should use boolean not bool
2009-12-08 19:58:28 +01:00
Michal Krol
876a785a18 Format layout cannot be used to distinguish scaled/normalised formats. 2009-12-08 19:58:13 +01:00
Roland Scheidegger
4ebc54795d Merge branch 'gallium-strict-aliasing' 2009-12-08 19:26:20 +01:00
Roland Scheidegger
ee1720b99d gallium: fix more potential strict aliasing issues
In particular, gcc man page warns that
union a_union {
   int i;
   double d;
};

int f() {
   double d = 3.0;
   return ((union a_union *) &d)->i;
}

"might" not be ok (why not?), even though it doesn't seem to generate
any warnings. Hence don't use this and do the extra step to actually use
assignment to get the values in/out of the union.
This changes parts of 3456f9149b.
2009-12-08 19:17:08 +01:00
Brian Paul
bc7567d966 tgsi: fix some off-by-one errors in shader length, instruction length
The ureg and/or tgsi-simplification work introduced some inconsistencies
between the ureg and traditional TGSI construction code.

Now the tgsi_instruction::NrTokens field is consistant and the
tgsi_header::BodySize field isn't off by one.

Fixes bug 25455.
2009-12-08 08:14:14 -07:00
Michal Krol
ddbd2d08b7 util/format: Take advantage of sequential nature of pipe_format enum.
Make sure the format descriptor table can be indexed directly.
2009-12-08 15:46:15 +01:00
Michal Krol
714e1880d9 gallium: Make pipe_format a sequential enum. 2009-12-08 15:35:54 +01:00
Michal Krol
ceb3cf5519 util/format: Remove unreferenced local. 2009-12-08 15:31:07 +01:00
Michal Krol
6fd8b9b550 Remove remaining pipe format utility functions.
Depricate pf_type(), pf_size_*(), pf_layout() and pf_exp2().

Map depricated PIPE_FORMAT_TYPE to new UTIL_FORMAT_ values:

UNKNOWN = TYPE_VOID
UNORM   = TYPE_UNSIGNED + LAYOUT_ARITH
SNORM   = TYPE_SIGNED + LAYOUT_ARITH
FIXED   = TYPE_FIXED
FLOAT   = TYPE_FLOAT
USCALED = TYPE_UNSIGNED + LAYOUT_ARRAY
SSCALED = TYPE_SIGNED + LAYOUT_ARRAY
SRGB    = TYPE_COLORSPACE_SRGB
2009-12-08 15:30:10 +01:00
Andre Maasikas
629a648b05 r600: and finally fix SCS 2009-12-08 15:45:26 +02:00
Andre Maasikas
0f854105f5 r600: remove (now) dead code 2009-12-08 15:44:42 +02:00
Andre Maasikas
fbe06a9c29 r600: fix SIN also 2009-12-08 15:44:34 +02:00
Andre Maasikas
2b8b16f6a6 r600: use the new inline constants feature to fix COS 2009-12-08 15:44:23 +02:00
Andre Maasikas
4e86cedf5b r600: add assembler support for literal(inline) constants
and use it in cubemap instruction sequence for testing
2009-12-08 15:43:12 +02:00
Andre Maasikas
602ba357ed r600: merge alu_instruction/alu_instruction2 2009-12-08 15:39:57 +02:00
Andre Maasikas
17e212e263 r600: add ABS support for source regs to assembler
use it in tex cube instruction sequence
2009-12-08 15:39:45 +02:00
Andre Maasikas
50ab51101e r600: glsl - allow specifying texture sampler via uniforms
looks kinda hackish, should rethink later
2009-12-08 15:39:39 +02:00
Andre Maasikas
94723b60cf r600: implement FRAG_ATTRIB_FACE, glsl/twoside works 2009-12-08 15:39:29 +02:00
Andre Maasikas
323d1fb391 r600: quick hack to get KIL_NV working - does condition TR only for now 2009-12-08 15:39:20 +02:00
Andre Maasikas
c1d79a4235 r600: wip glsl - refactor conditional instructions a bit
remember the dst register which is used for cond updates
when it's time to use the cond codes issue a separate PRED instruction
2009-12-08 15:39:08 +02:00
Andre Maasikas
94c6ec5809 r600: execute SET funtions on all channels
seems assemble_LOGIC was meant for non-condition-code instructions
so execute in for all components as previously
2009-12-08 15:38:59 +02:00
Alan Hourihane
2aebc5e01f move assert to avoid crash in debug build. 2009-12-08 13:12:02 +00:00
Michel Dänzer
eaa3a025da Merge branch 'mesa_7_7_branch' 2009-12-08 12:25:34 +01:00
Andre Maasikas
b5e256c76d Merge branch 'mesa_7_7_branch'
Conflicts:
	src/mesa/drivers/dri/r600/r700_assembler.c
	src/mesa/main/version.h
2009-12-08 11:57:24 +02:00
José Fonseca
7f457acabc llvmpipe: Use number of CPUs as default number of threads.
Also bump MAX_THREADS to 8.
2009-12-08 08:02:49 +00:00
Brian Paul
73e13c33fd llvmpipe: remove some left-over debug code 2009-12-07 18:18:37 -07:00
Brian Paul
aab1ceceec llvmpipe: implement threaded rasterization
The LP_NUM_THREADS env var controls how many threads are created.
The default (and max) is 4, for now.
If LP_NUM_THREADS = 0, threading is not used.
2009-12-07 18:04:54 -07:00
Brian Paul
87c9ceaea2 gallium: added pipe_semaphore and related code 2009-12-07 18:04:54 -07:00
Brian Paul
3a06c113c7 llvmpipe: repartition lp_rasterizer state for threading
Some of the state is per-thread.  Put that state in new lp_rasterizer_task
struct.
2009-12-07 18:04:54 -07:00
Brian Paul
cdaea049c9 llvmpipe: use bin iteration functions when rasterizing bins 2009-12-07 18:04:54 -07:00
Brian Paul
270f154860 llvmpipe: introduce mutex and bin iteration functions 2009-12-07 18:04:31 -07:00
Roland Scheidegger
72362a5cd4 mesa: fix shader prog_execute strict aliasing violations
use unions instead of pointer casts.
2009-12-07 21:47:49 +01:00
Roland Scheidegger
3456f9149b gallium/util: fix util_color_[un]pack[-ub] to be strict aliasing safe
use pointer to union instead of void pointer.
gcc complained a lot, depending what the pointer originally actually was.
Looks like it's in fact maybe legal to cast for instance uint pointers to
union pointers as long as union contains a uint type, hence use this with some
callers, other just use union util_color in the first place.
2009-12-07 20:35:42 +01:00
Roland Scheidegger
c36d1aacf4 mesa: fix strict aliasing issues in half-to-float/float-to-half conversions
use union instead of casts
2009-12-07 20:11:46 +01:00
Michal Krol
ac66598ed8 util/tile: Support R8G8B8A8_UNORM format. 2009-12-07 18:21:37 +01:00
Brian Paul
c90baf444c st/mesa: remove debug code 2009-12-07 09:05:40 -07:00
Brian Paul
0311d9ccf4 progs/glsl: updates to deriv.c test
Pass window size into the shader so scaling the window doesn't effect
the colors.
2009-12-07 09:03:41 -07:00
Brian Paul
8ce1713443 st/mesa: negate DDY to match GL semantics
This fixes the regression from commit 884007546c
Fixes bug 25456 (piglit derivs regression).
2009-12-07 09:00:59 -07:00
Brian Paul
8468234bfa st/mesa: fix up comment 2009-12-07 08:59:38 -07:00
Brian Paul
8796dbf519 progs/glsl: added texture mapping to bump demo
Press 't' to toggle texture map.
2009-12-07 07:46:02 -07:00
Corbin Simpson
12981589b7 radeong: Automatically softpipe for non-r3xx.
Well, technically non-r[345]xx. At any rate...

$ glxgears
libGL: OpenDriver: trying /home/simpson/mesa/lib/gallium/r600_dri.so
131 frames in 5.0 seconds = 26.107 FPS

I'm sure you can see where this is going. :3
2009-12-06 23:55:58 -08:00
Corbin Simpson
e3a3ca097c radeong: Call softpipe_create directly.
Allows us to finally remove radeon_winsys_softpipe.
2009-12-06 23:50:31 -08:00
Corbin Simpson
d8d8b0d244 softpipe: sp_winsys.h should define/include what it needs. 2009-12-06 23:49:02 -08:00
Corbin Simpson
c99fb991a3 r300g: Clean up previous commit.
If *I* can't read it, there's a strong possibility others can't,
either.
2009-12-06 23:34:53 -08:00
Marek Olšák
7091afed78 r300g: enhance ZTOP conditions 2009-12-06 23:34:53 -08:00
Younes Manton
c574f515f0 nouveau: Work around nv04-nv40 miptrees not matching nouveau_miptree.
Thanks to Bob Gleitsmann for the patch.

I'll clean this up in a better way later if noone else beats me to it.
2009-12-06 12:34:27 -05:00
Marek Olšák
0748764351 r300g: don't render if everything is culled by scissoring
Otherwise a CS is refused by kernel 2.6.31 (and maybe all later
versions, not sure).
2009-12-06 01:13:37 -08:00
Marek Olšák
e1380cae88 r300g: remove redundant code and clean up 2009-12-06 01:13:36 -08:00
Alex Deucher
df02bc42b3 radeon/r200/r600: fix drivers for changes in 433f0a82f5 2009-12-05 18:24:41 -05:00
Younes Manton
cbb7226a4b st/xvmc: No more pf_get_block(). 2009-12-05 13:19:54 -05:00
Michel Dänzer
56a4342a04 r300g: Need to emit a hardware scissor rectangle even if scissor is disabled.
Just make it cover the whole framebuffer in that case. Otherwise the kernel CS
checker may complain, e.g. running progs/demos/gearbox. That runs fast now
here, but doesn't look right yet.
2009-12-05 17:59:49 +01:00
Michel Dänzer
01537a84df st/mesa: Prefer alpha-less formats for RGB textures.
This can e.g. increase the chance of being able to accelerate
glCopyTex(Sub)Image from an alpha-less renderbuffer.
2009-12-05 17:59:49 +01:00
Michel Dänzer
d13c603e37 Add 'texture leak' test. 2009-12-05 17:59:49 +01:00
Michel Dänzer
433f0a82f5 radeon: Only get DRI2 front buffer information for glXBindTexImageEXT. 2009-12-05 17:54:23 +01:00
José Fonseca
5b1a7843f8 svga: Dump SVGA_3D_CMD_BLIT_SURFACE_TO_SCREEN commands. 2009-12-05 06:34:59 +00:00
José Fonseca
781d8fccba svga: Use _debug_printf, so that output may be dumped in release builds too.
The dump calls should be wrapped in #ifdef DEBUG .. #endif.
2009-12-05 06:05:56 +00:00
José Fonseca
501989bbcd llvmpipe: Tweak disassembly to match gdb.
Helps verifying udis86 output.
2009-12-05 05:43:53 +00:00
José Fonseca
dd51b4f909 llvmpipe: Stop disassembling when an unsupported opcode is found.
Otherwise the terminal gets full of garbage.
2009-12-05 05:43:10 +00:00
Brian Paul
8a23105fa0 llvmpipe: still more bin code reorganization
Move tiles_x,y fields from setup state into bin state.
Move more bin-adding commands into lp_bin.[ch].
2009-12-04 15:59:25 -07:00
Brian Paul
2c8d5c66ce llvmpipe: remove dead code left over from a previous commit 2009-12-04 15:46:37 -07:00
Brian Paul
01b1900084 llvmpipe: reorganization of binning data structions and funtions
New lp_bins struct contains all bin information.
More move bin-related code into lp_bin.[ch]
Use new/updated bin-access functions to hide implementation details.
The result is more/cleaner separation between the setup and rast components.
This will make double-buffering of the bins easier, etc.
2009-12-04 15:31:09 -07:00
Brian Paul
b533b56750 llvmpipe: move lp_rasterize_bin() into lp_rast.c
First step of moving bin rasterization/execution code out of lp_setup.c
2009-12-04 14:47:46 -07:00
José Fonseca
c0a13bbae1 llvmpipe: Port vertex sampler support from softpipe.
Just enough boilerplate code to avoid segfaulting.
2009-12-04 21:27:03 +00:00
José Fonseca
a312e76468 llvmpipe: Ensure transfers are mapped.
This shouldn't happen but it does by some misterious reason. Fail the
assertion but at least do not segfault on release builds.
2009-12-04 21:27:03 +00:00
José Fonseca
b00b06b6e4 llvmpipe: Remove debug printf. 2009-12-04 21:27:03 +00:00
José Fonseca
818fd6b101 gallium: Disable force_align_arg_pointer attribute on x86_64.
Apparently not only unnecessary but also causes gcc to complain.
2009-12-04 21:27:03 +00:00
Brian Paul
9fca3e065b llvmpipe: simplify framebuffer state code 2009-12-04 14:22:08 -07:00
Brian Paul
a08d630216 llvmpipe: use LP_DBG() macro everywhere 2009-12-04 14:11:25 -07:00
Brian Paul
15a2a588d8 llvmpipe: fix-up polygon culling/winding 2009-12-04 13:53:28 -07:00
Brian Paul
24a3b0d23a llvmpipe: add missing sources to Makefile 2009-12-04 13:01:03 -07:00
Brian Paul
49a720c5cd llvmpipe: comments and minor clean-ups 2009-12-04 12:59:34 -07:00
Brian Paul
d9dc3d5976 llvmpipe: move bin-related structures and functions into new lp_bin.[ch]
And put lp_ prefixes on some functions.
2009-12-04 12:54:37 -07:00
Brian Paul
5c7d1b592a llvmpipe: remove lp_rast_triangle::oneoverarea field
Makes lp_rast_triangle a little smaller (now 280 bytes on a 32-bit system).
2009-12-04 11:58:26 -07:00
Brian Paul
b1659b9213 llvmpipe: bin state-change commands
Previously, each triangle had a pointer to the state to use for shading.
Now we insert state-change commands into the bins.  When we execute one
of those commands we just update a 'current state' pointer and use that
pointer when calling the jit shader.

When inserting state-change commands into a bin we check if the previous
command was also a state-change command and simply replace it.  This
avoids accumulating useless/redundant state-change commands.
2009-12-04 11:50:43 -07:00
Brian Paul
9dca010048 llvmpipe: struct cmd_bin
Just introducing a new structure to represent a per-tile bin.
2009-12-04 10:41:42 -07:00
Roland Scheidegger
7d9b2edb97 identity: fix copy&paste error 2009-12-04 18:34:52 +01:00
Marek Olšák
042b524d48 radeong: flush CS if a buffer being mapped is referenced by it
Also, overlapping occlusion queries seems to work now.
2009-12-04 09:23:59 -08:00
Marek Olšák
7679447b58 r300g, radeong: fix the CS overflow 2009-12-04 09:23:59 -08:00
Marek Olšák
3da8265cd3 r300g: fix warnings 2009-12-04 09:23:59 -08:00
Roland Scheidegger
c977dd9c77 svga: fix another pipe_reference strict aliasing violation 2009-12-04 18:23:35 +01:00
Brian Paul
1796ffd3bc llvmpipe: fix typo, whitespace 2009-12-04 09:19:09 -07:00
Brian Paul
04e12e31b2 llvmpipe: dynamic allocation of triangle a0/dadx/dady arrays
Much less memory per triangle now.
2009-12-04 09:14:42 -07:00
Keith Whitwell
6bb415f862 softpipe: dont claim to support PIPE_FORMAT_NONE 2009-12-04 14:15:21 +00:00
Keith Whitwell
a4b3bb12d7 softpipe: fix double-minify in texture layout 2009-12-04 11:49:42 +00:00
Brian Paul
c6057ab8ff llvmpipe: comments regarding lp_rast_triangle 2009-12-03 17:28:48 -07:00
Brian Paul
9c1debe208 llvmpipe: comment about blend color 2009-12-03 17:28:02 -07:00
Brian Paul
f492edee98 llvmpipe: comments 2009-12-03 17:27:37 -07:00
Brian Paul
30c122a4c9 llvmpipe: new comment in do_triangle_ccw() 2009-12-03 17:27:10 -07:00
Brian Paul
4e058f6c48 llvmpipe: fix incorrect array indexing when saving blend color 2009-12-03 17:00:22 -07:00
Roland Scheidegger
9dfbd1be44 vega: fix missing include 2009-12-04 00:42:53 +01:00
Roland Scheidegger
9c6a9363ef Merge branch 'gallium-noblocks'
Conflicts:
	src/gallium/state_trackers/xorg/xorg_exa.c
2009-12-04 00:35:14 +01:00
Brian Paul
a9be9cd8be llvmpipe: comments, clean-ups in lp_rast_priv.h 2009-12-03 16:23:52 -07:00
Brian Paul
e2f4634456 llvmpipe: checkpoint some initial state binning code 2009-12-03 16:05:12 -07:00
Roland Scheidegger
4153ec547c gallium: fix remaining users of pipe_reference function 2009-12-03 23:58:30 +01:00
Roland Scheidegger
86c8f70db1 mesa: use _mesa_memcpy for COPY_4FV macro
Gets rid of one of the worst strict-aliasing offenders, and actually
produces faster code (at least in some cases, when compiler can use
for instance 64bit moves for memcpy).
(note _mesa_memcpy should get inlined)
2009-12-03 23:26:13 +01:00
José Fonseca
13c647fa0d gallium: fix ref counting bug in pb_bufmgr
This was discovered by the pipe_reference api change.
2009-12-03 23:20:56 +01:00
Roland Scheidegger
35a15f0263 gallium: fix reference counting functions to be strict-aliasing compliant
Historically, parts of mesa code are not strict-aliasing safe, hence
-fno-strict-aliasing is needed to compile (this got forgotten for scons
builds for gallium, which indeed not only caused compiler warnings but also
unexplicable crashes in non-debug builds). However, we should try to eliminate
code not complying with strict-aliasing code at least for gallium.
Hence change pipe_reference functions to make them strict-aliasing compliant.
This adds a bit more complexity (especially for derived classes) but is the
right thing to do, and it does in fact fix a segfault.
2009-12-03 23:15:38 +01:00
Brian Paul
ffd0759973 llvmpipe: comments and a stub for lp_rast_set_state() 2009-12-03 14:57:44 -07:00
Brian Paul
29207a2ae6 llvmpipe: comments 2009-12-03 14:57:13 -07:00
Brian Paul
0e042bed49 llvmpipe: set LP_SETUP_NEW_FS in lp_setup_set_fs()
Fixes progs/trivial/tri-blend.c, but I think we're just getting
lucky in this case.
2009-12-03 14:56:38 -07:00
Brian Paul
3094fc2009 llvmpipe: more debug info 2009-12-03 14:25:08 -07:00
Brian Paul
51410a254c llvmpipe: fix blend debug strings 2009-12-03 14:13:22 -07:00
Brian Paul
52081f0a2c progs/trivial: readback and print Z value in tri-z-eq.c 2009-12-03 11:43:19 -07:00
Brian Paul
51663f0506 llvmpipe: quick & dirty implementation of lp_rast_store_zstencil()
This allows us to do a glReadPixels(GL_DEPTH_COMPONENT) to see what's
in the depth buffer to help debugging.
2009-12-03 11:41:48 -07:00
Brian Paul
69fe4281ea llvmpipe: additional comment about float->uint conversion 2009-12-03 11:40:49 -07:00
Brian Paul
e01fa1eaec llvmpipe: comments 2009-12-03 11:39:40 -07:00
Michal Krol
72befaaae5 Remove pf_swizzle_* internal macros. 2009-12-03 12:25:49 +01:00
Michal Krol
018f33a328 gallium: Remove pf_mixed_*(). 2009-12-03 12:05:21 +01:00
Michal Krol
9861ad46ab gallium: Remove pf_rev(). 2009-12-03 12:03:57 +01:00
Michal Krol
f5bd93fae2 Move pf_get_component_bits() to u_format auxiliary module. 2009-12-03 11:58:36 +01:00
Michal Krol
cceeab39ea Move pf_get_bits/size() to u_format auxiliary module. 2009-12-03 11:17:37 +01:00
Michal Krol
6df42d8023 Move pf_get_block() to u_format auxiliary module. 2009-12-03 10:52:47 +01:00
Michal Krol
0bed834be4 Move pf_is_depth_and_stencil() to u_format auxiliary module. 2009-12-03 10:20:49 +01:00
Michal Krol
d28740c298 Move pf_is_depth_stencil() to u_format auxiliary module. 2009-12-03 10:12:47 +01:00
Michal Krol
3400b668e3 Move pf_is_compressed() to u_format auxiliary module. 2009-12-03 09:56:03 +01:00
Michal Krol
3ffe25c917 gallium: Remove unused format functions. 2009-12-03 09:48:18 +01:00
Michal Krol
cdb6849fc1 tgsi/ureg: Fix ureg_emit_src(). 2009-12-03 09:13:52 +01:00
Brian Paul
866e6856d3 llvmpipe: execute shaders on 4x4 blocks instead of 8x2
This matches the convention used by the recursive rasterizer.
Also fixed assorted typos, comments, etc.
Now tri-z.c, gears.c, etc look basically right but there's still some
cracks in triangle rasterization.
2009-12-02 15:13:47 -07:00
Brian Paul
5750a6426b llvmpipe: whitespace for readability 2009-12-02 14:55:48 -07:00
Corbin Simpson
ab7e70fabd radeong: Clean up some bad code. 2009-12-02 12:58:15 -08:00
Corbin Simpson
f79028bbd4 radeong: Add helper to determine pipe driver. 2009-12-02 12:58:15 -08:00
Corbin Simpson
4395d35c8a radeong: Do ioctls before selecting pipe driver. 2009-12-02 12:58:15 -08:00
Corbin Simpson
4f77b0103d r300g, radeong: De-specialize r300_winsys into radeon_winsys.
There's like five good reasons for this, I swear.
2009-12-02 12:58:15 -08:00
Corbin Simpson
dad193d516 radeong: Change ioctl order, document it. 2009-12-02 12:58:14 -08:00
Corbin Simpson
08383af4c7 r300g: No vertex textures here. 2009-12-02 12:58:14 -08:00
Brian Paul
debc0b6fa8 cso: check if pipe_context::bind_vertex_sampler_states is non-null
Fixes segfaults upon exit when the CSO module is releasing its objects.
2009-12-02 12:24:27 -07:00
Brian Paul
d5e5909f17 Revert "llvmpipe: plug in dummy pipe_context::set_vertex_sampler_textures function"
This reverts commit 792888121b.

We're instead returning 0 for the PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS query.
2009-12-02 12:20:15 -07:00
Brian Paul
f42192e783 llvmpipe: return 0 for PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS query
The driver (and draw module) don't support vertex shader textures yet.
2009-12-02 12:19:33 -07:00
Brian Paul
792888121b llvmpipe: plug in dummy pipe_context::set_vertex_sampler_textures function
Fixes immediate segfault.
2009-12-02 10:11:05 -07:00
Brian Paul
429bf75417 cell: fix TGSI breakage 2009-12-02 09:23:37 -07:00
Brian Paul
144afacc6f gallium/util: __builtin_bswap32() is in only gcc 4.3 or later 2009-12-02 09:23:15 -07:00
Brian Paul
f6d5e58427 gallium/util: added PIPE_CC_GCC_VERSION symbol 2009-12-02 09:22:42 -07:00
Roland Scheidegger
94b5c28a98 gallium: adapt nv drivers to interface cleanups 2009-12-02 16:55:33 +01:00
Jakob Bornecrantz
cc8a537c57 Merge branch 'mesa_7_7_branch' 2009-12-02 14:56:56 +01:00
José Fonseca
7fc75ef7d4 util: Fix generated swizzle comments. 2009-12-03 18:19:43 +00:00
Roland Scheidegger
c78748a527 gallium: adapt drivers to interface cleanups 2009-12-02 02:08:26 +01:00
Brian Paul
63fe997e28 llvmpipe: added assertions
And remove unused BLOCKSIZE.
2009-12-01 16:25:00 -07:00
Brian Paul
9c48677491 llvmpipe: simplify mask computation
Make this a little easier to understand.
2009-12-01 16:24:19 -07:00
Brian Paul
6bde3e0fdf llvmpipe: replace shifts with multiplies to be clearer
The compiler will still do the multiplies with shifts.
It's just a bit easier to follow the logic with multiplies.
2009-12-01 16:00:30 -07:00
Brian Paul
938acf0367 llvmpipe: make nr_blocks unsigned 2009-12-01 16:00:08 -07:00
Brian Paul
63b1f23b3e llvmpipe: comments, reformatting and assertions in tri rast code 2009-12-01 15:43:01 -07:00
Brian Paul
09325b9ff4 mesa: added comment for target_enum_to_index() 2009-12-01 12:28:25 -07:00
Brian Paul
e0399fddf2 softpipe: setup machine->Face without a conditional 2009-12-01 12:25:13 -07:00
Keith Whitwell
ba4cb8b2ca i965g: nasty hack for clearing y-tiled surfaces 2009-12-01 17:04:46 +00:00
Keith Whitwell
63a8637c74 i965g: add missing header 2009-12-01 16:39:02 +00:00
Keith Whitwell
eb68acaf6d i965g: don't reference unused vars in RSQ
Probably overly pedantic
2009-12-01 16:33:59 +00:00
Keith Whitwell
759c094bf8 mesa/st: avoid quadstrips if its easy to do so
Tristrips are easier for many drivers to handle.
2009-12-01 16:33:59 +00:00
Keith Whitwell
574715d836 tgsi: fix ureg emit after version token change 2009-12-01 15:01:00 +00:00
Keith Whitwell
b7f94c9002 st/xorg: fix merge droppings
These were stranded in emacs and not saved before committing.
2009-12-01 14:54:32 +00:00
Keith Whitwell
87eec80c11 Merge commit 'origin/tgsi-simplify-ext'
Conflicts:
	src/gallium/drivers/r300/r300_vs.c
2009-12-01 14:31:14 +00:00
Keith Whitwell
06d3732a90 Merge commit 'origin/mesa_7_7_branch'
Conflicts:
	src/gallium/drivers/svga/svga_screen_texture.c
	src/gallium/state_trackers/xorg/xorg_composite.c
	src/gallium/state_trackers/xorg/xorg_exa.c
	src/gallium/state_trackers/xorg/xorg_renderer.c
	src/gallium/state_trackers/xorg/xorg_xv.c
	src/mesa/main/texgetimage.c
	src/mesa/main/version.h
2009-12-01 10:57:37 +00:00
Michal Krol
853d4807fe mesa: Update vertex texture code after gallium changes. 2009-12-01 11:21:21 +01:00
Marek Olšák
af3dea3660 r300g: simplify allocations of VS output registers
No need to parse TGSI tokens since it's easier to walk through shader
semantics.

Also fog coordinates now work reliably.
2009-12-01 01:20:26 -08:00
Marek Olšák
f55c088f89 r300g: simplify allocations of FS input registers 2009-12-01 01:20:26 -08:00
Marek Olšák
cb90235135 r300g: clean up derived states
The state setups which aren't derived anymore have been moved to the VS
and FS objects.
2009-12-01 01:20:26 -08:00
Marek Olšák
6f05eba020 r300g: VS->FS attribute routing rework
Now it always correctly pairs up VS and FS even if the semantics and indices
of VS outputs and FS inputs don't match.
2009-12-01 01:20:26 -08:00
Marek Olšák
759604e32b r300g: add R300 prefix in reg definitions 2009-12-01 01:20:26 -08:00
Michal Krol
7a43c39d20 cso: Fix function prototype. 2009-12-01 10:07:15 +01:00
Michal Krol
57ed791305 trace: Implement separate vertex sampler state. 2009-12-01 09:52:44 +01:00
Michal Krol
f8969db2f8 fo: Implement separate vertex sampler state. 2009-12-01 09:52:42 +01:00
Michal Krol
f2f7bd855a id: Implement separate vertex sampler state. 2009-12-01 09:52:39 +01:00
Michal Krol
3f900c33ae trace: Reduce double semicolons to single ones. 2009-12-01 09:52:37 +01:00
Michal Krol
0f884ed993 sp: Do not falsely advertise support for some SNORM formats. 2009-12-01 09:52:35 +01:00
Michal Krol
8a619e62bf sp: Implement separate vertex sampler state. 2009-12-01 09:52:32 +01:00
Michal Krol
ee86b1b58d python: Update for renamed sampler/texture state setters. 2009-12-01 09:52:30 +01:00
Michal Krol
e197652ce0 st: Update for renamed sampler/texture state setters. 2009-12-01 09:52:27 +01:00
Michal Krol
eeb8dd12b4 trace: Update for renamed sampler/texture state setters. 2009-12-01 09:52:25 +01:00
Michal Krol
8eecd3bafb svga: Update for renamed sampler/texture state setters. 2009-12-01 09:52:23 +01:00
Michal Krol
c1bcedc4ce r300: Update for renamed sampler/texture state setters. 2009-12-01 09:52:20 +01:00
Michal Krol
d15bb1cba3 nv: Update for renamed sampler/texture state setters. 2009-12-01 09:52:18 +01:00
Michal Krol
551b2db82b lp: Update for renamed sampler/texture state setters. 2009-12-01 09:52:15 +01:00
Michal Krol
f0d3abf383 id: Update for renamed sampler/texture state setters. 2009-12-01 09:52:13 +01:00
Michal Krol
25bb04a1ee i915: Update for renamed sampler/texture state setters. 2009-12-01 09:52:11 +01:00
Michal Krol
e04324b8f9 fo: Update for renamed sampler/texture state setters. 2009-12-01 09:52:08 +01:00
Michal Krol
cd3409ce05 cell: Update for renamed sampler/texture state setters. 2009-12-01 09:52:06 +01:00
Michal Krol
204e586c56 vl: Update for renamed sampler/texture state setters. 2009-12-01 09:52:04 +01:00
Michal Krol
f33c064f32 draw: Update for renamed sampler/texture state setters. 2009-12-01 09:52:01 +01:00
Michal Krol
fd4aa4f323 cso: Add support for separate vertex sampler state. 2009-12-01 09:51:59 +01:00
Michal Krol
15d1b406af gallium: Introduce separate vertex texture/sampler state.
Previously, gallium shared sampler and texture state between vertex
and fragment shader stages. This change generalises this concept by
providing separate entrypoints for vertex and fragment sampler state
setting.

A new capability bit is added to query the driver for the number
of samplers that can be utilised by a vertex and fragment shader
at the same time.
2009-12-01 09:51:56 +01:00
Michal Krol
2fd1aee217 tgsi/sanity: Up MAX_REGISTERS to 1024. 2009-12-01 09:51:54 +01:00
Brian Paul
344a2a9abb progs/trivial: added two simple texture tests
One draws a series of quads with different textures.
The other draws with one texture which is changed with glTexSubImage2D().
2009-11-30 15:31:34 -07:00
Roland Scheidegger
decf6ed810 fixups for interface changes (mostly state trackers) 2009-11-30 23:02:49 +01:00
Brian Paul
7505510c7b llvmpipe: add a bunch of comments 2009-11-30 14:02:01 -07:00
Brian Paul
7d042ac2a2 llvmpipe: minor refactoring of bin rasterization code 2009-11-30 14:01:31 -07:00
Roland Scheidegger
ac400ffce6 gallium: interface cleanups, remove nblocksx/y from pipe_texture and more
This patch removes nblocksx, nblocksy arrays from pipe_texture (can be
recalculated if needed). Furthermore, pipe_format_block struct is gone
completely (again, contains just derived state).
nblocksx, nblocksy, block are also removed from pipe_transfer, together with
the format enum (can be obtained from the texture associated with the transfer).
2009-11-30 20:29:18 +01:00
Brian Paul
bfa1a766d6 llvmpipe: update C_SOURCES 2009-11-30 10:43:23 -07:00
Keith Whitwell
bb1cde755b i965g: turn on texture tiling by default 2009-11-30 16:16:30 +00:00
Brian Paul
7725744433 st/mesa: handle front/back-face +1/-1 vs. 1/0 conversion
Fixes progs/glsl/twoside.c demo.
2009-11-30 08:57:04 -07:00
Keith Whitwell
6781f624af i965g: pass backbuffer tiling information to driver
The gem winsys gets this information, needs to pass it on.
2009-11-30 15:37:27 +00:00
Keith Whitwell
1fd3a2773b ws/i965: more debug output 2009-11-30 15:37:27 +00:00
Keith Whitwell
1dfdc0a615 ws/i965: rename and change sense of I965_SEND_CMD to BRW_NO_HW 2009-11-30 15:37:27 +00:00
Keith Whitwell
cddc7e3a9c brw: add dumping to gem winsys 2009-11-30 15:37:27 +00:00
Keith Whitwell
4490122d0c i965g: remove redundant nr_attrs member 2009-11-30 15:37:27 +00:00
Richard Li
a1b9c4e22a r600 : clena up a bit for last commit. 2009-11-29 12:33:14 -05:00
Richard Li
2db72f329f r600 : add read port allocation for uniform;
mapping ps input based on vs output;
       fix bugs including constants updating for vs.
2009-11-29 12:33:14 -05:00
Christoph Bumiller
c332525ad3 nv50: update linkage on rasterizer change
We need to update VP_RESULT_MAP and/or COORD_REPLACE_MAP
when light_twoside and/or point_sprite are changed.
2009-11-29 13:41:47 +01:00
Christoph Bumiller
7494b82905 nv50: match VP outputs to FP inputs ourselves
For each FP input, don't assume that the VP output will be
at the same position, but scan the semantics instead, then
put the correct output reg indices into VP_RESULT_MAP.

Position is still assumed to be the first output/input.

See 07fafc7c93, which renders
previous assumptions incorrect.
2009-11-29 13:41:47 +01:00
Christoph Bumiller
3f471c7948 nv50: don't permanently negate src in emit_ddy 2009-11-29 13:41:47 +01:00
Dave Airlie
ca9b0e942c i965g: remove surface from views list before freeing
this fixes a crash with the xorg state tracker, however it then locks
up the GPU once rendering is enabled but at least it doesn't crash.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-11-29 18:59:19 +10:00
Corbin Simpson
287bdd8e75 util: Fix bad code.
Uf. How embarrassing.
2009-11-28 10:45:17 -08:00
Corbin Simpson
c93dcbfea7 util: Improve bitcount.
Sorry for not pushing this before, it got lost in stashes.
2009-11-28 10:14:42 -08:00
Dave Airlie
6f1bc4267f i965g: link xorg state tracker with -ldrm_intel 2009-11-28 17:44:28 +10:00
Christoph Bumiller
cad14c2542 nv50: do conversion of last insn to 64 bit format first
Simplifies things since the second to last one will then
be converted in the subsequent pass that ensures alignment
automatically.
2009-11-27 21:29:38 +01:00
Christoph Bumiller
510fd280b5 nv50: bswap32 the polygon stipple pattern
The hardware wants the pattern the same way it is
passed to glPolygonStipple.
2009-11-27 21:29:22 +01:00
Christoph Bumiller
e65258abf5 gallium/util: added util_bswap32() 2009-11-27 21:28:56 +01:00
Roland Scheidegger
7fa1bcc05a svga: fix for not using texture width/height/depth arrays 2009-11-27 17:41:42 +01:00
Roland Scheidegger
b748a9f574 r300g,llvmpipe: fix some more merge problems 2009-11-27 17:40:24 +01:00
Roland Scheidegger
c95cbd45c6 Merge branch 'width0'
Conflicts:
	src/gallium/drivers/r300/r300_texture.c
	src/gallium/state_trackers/xorg/xorg_exa.c
	src/mesa/state_tracker/st_cb_texture.c
2009-11-27 17:15:47 +01:00
Michal Krol
5285de7c0f vega: Update shader headers.
Drop the 1.1 version suffix.
2009-11-27 10:13:53 +01:00
Michal Krol
9a4e4e035c python/tests: Update shader headers.
Drop the 1.1 version suffix.
2009-11-27 10:13:19 +01:00
Michal Krol
456b5bd5d0 svga: Update text shader header. 2009-11-27 10:11:18 +01:00
Michal Krol
72420daa21 vl: Do not emit tgsi_version token. 2009-11-27 10:07:07 +01:00
Michal Krol
e6133564bf tgsi: Remove tgsi_version token. 2009-11-27 10:06:41 +01:00
Michal Krol
5455e88f1c gallium: Remove tgsi_version token.
Not really needed, never served its purpose.
2009-11-27 09:19:01 +01:00
Roland Scheidegger
d509f84543 gallium: fix more statetrackers/drivers for not using texture width/height/depth arrays 2009-11-26 22:51:45 +01:00
Michal Krol
884007546c tgsi/exec: Fix orientation of DDY. 2009-11-26 20:41:46 +01:00
Michal Krol
a2c101029d tgsi/exec: Force return from a subroutine at ENDSUB. 2009-11-26 20:41:43 +01:00
Keith Whitwell
3bae72e204 draw: Fix max_index check.
We want to fallback to draw splitting when vertex element indices
might be too high for atomic draw path (currently limited to 4095).
2009-11-26 20:41:41 +01:00
Michal Krol
75df599e30 tgsi/ureg: Add forgotten goto in ureg_DECL_constant(). 2009-11-26 20:41:38 +01:00
José Fonseca
953b74d116 llvmpipe: Fake missing SSSE3 when simulation less capabable machines.
SSE3 != SSSE3 and so far we only use the later.
2009-11-26 11:16:35 +00:00
José Fonseca
da1c40260d llvmpipe: Update/correct CPU requirements.
There are no hard requirements at the moment.

We don't really emit any sse3 yet. Just some ssse3.

Thanks to Roland for spotting these incorrections.
2009-11-26 11:16:34 +00:00
Roland Scheidegger
4dcdf3b9c6 Merge commit 'origin/st-shader-varients'
Conflicts:
	src/mesa/state_tracker/st_atom_shader.c
	src/mesa/state_tracker/st_program.c
2009-11-26 01:15:25 +01:00
José Fonseca
9e3728c858 scons: Make it work with MinGW build of LLVM 2.6.
LLVM 2.5 is no longer supported on windows.
2009-11-25 18:07:27 +00:00
Michal Krol
e13add8cae tgsi: Fix token builder. 2009-11-25 16:08:36 +01:00
Michal Krol
ea6b36ca3f tgsi: Update raw token dumper after token definition changes. 2009-11-25 15:56:10 +01:00
Michal Krol
77a0a3e5ca glsl/apps: Make compile more shell friendly. 2009-11-25 14:59:29 +01:00
Michal Krol
ee27b713dc slang/library: Don't need the *_gc.h files, they are autogenerated now. 2009-11-25 14:53:37 +01:00
Michal Krol
3371f7e502 scons: Autogenerate GLSL builtin library *_gc.h from *.gc files. 2009-11-25 14:52:21 +01:00
Dave Airlie
ce56a867f7 r600: add ARB_texture_non_power_of_two support.
This makes the miptree rounds up to the near POT for each level for
all radeons, however since mipmaps aren't support with NPOT on previous
radeons this calculation shouldn't cause any problems. If it does
we can just make it r600 only.

I tested a few mipmap demos on r500 and they all seem to work.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-25 15:45:31 +10:00
Richard Li
11dce74030 r600 : reset stack flag with one channel only. 2009-11-24 16:00:25 -05:00
Richard Li
d4c2f53ca5 r600 : fix stack depth setting bug. 2009-11-24 12:16:39 -05:00
José Fonseca
8bf4e5d617 llvmpipe: Update instructions. 2009-11-24 16:01:01 +00:00
Keith Whitwell
91a4e6d53f tgsi: rename fields of tgsi_full_src_register to reduce verbosity
SrcRegister -> Register
SrcRegisterInd -> Indirect
SrcRegisterDim -> Dimension
SrcRegisterDimInd -> DimIndirect
2009-11-24 15:13:17 +00:00
Keith Whitwell
5b0824dfe5 tgsi: rename fields of tgsi_full_dst_register to reduce verbosity
DstRegister -> Register
DstRegisterInd -> Indirect
2009-11-24 15:08:55 +00:00
Keith Whitwell
fe2b31e4a8 tgsi: rename fields of tgsi_full_declaration to reduce verbosity
DeclarationRange -> Range
2009-11-24 15:04:18 +00:00
Keith Whitwell
7d6c8f980d tgsi: rename fields of tgsi_full_instruction to avoid excessive verbosity
InstructionPredicate -> Predicate
InstructionLabel -> Label
InstructionTexture -> Texture
FullSrcRegisters -> Src
FullDstRegisters -> Dst
2009-11-24 15:02:23 +00:00
Keith Whitwell
763426a025 tgsi: reduce repetition of structure name in its members
Rename Semantic.SemanticName to Semantic.Name.  Similar for
SemanticIndex, and the members of the tgsi_version struct.
2009-11-24 14:53:29 +00:00
José Fonseca
f3a0615fb0 svga: Handle comment tokens when dumping. 2009-11-24 14:49:21 +00:00
Keith Whitwell
42ae003069 tgsi: remove unnecessary full_token init and free functions 2009-11-24 14:45:56 +00:00
Keith Whitwell
9fbfe6b65d tgsi: remove unused Flags member from full_instruction 2009-11-24 14:44:45 +00:00
José Fonseca
d185c2fd13 svga: Use consistent names for public symbol names of shader dumping facilities. 2009-11-24 14:43:30 +00:00
José Fonseca
a71f836504 svga: Use consistent file names for dumping facilities. 2009-11-24 14:37:45 +00:00
José Fonseca
1325361abe util: Describe a few more formats. 2009-11-24 14:25:21 +00:00
José Fonseca
4ae3e88dc9 llvmpipe: Use assert instead of abort. Only verify functions on debug builds. 2009-11-24 14:25:21 +00:00
José Fonseca
066991c8d1 llvmpipe: Fix memory leak. 2009-11-24 14:25:20 +00:00
José Fonseca
2282fb7710 llvmpipe: Use the generic conversion routine for depths.
This allows for z32f depth format to work correctly.
2009-11-24 14:25:20 +00:00
José Fonseca
b375526b50 llvmpipe: Be more conservative with the supported formats.
We'll likely support much more formats, but doing this allows to run
more testsuites without immediately hit assertion failures.
2009-11-24 14:25:20 +00:00
José Fonseca
c6d663e6dc wgl: Fix copy'n'paste typo in comment. 2009-11-24 14:25:20 +00:00
José Fonseca
52df532b02 llvmpipe: Fix typo in comparison operator. 2009-11-24 14:25:20 +00:00
Keith Whitwell
56ee132f96 gallium: try and update r300 and nv drivers for tgsi changes
It would be nice if these drivers built under the linux-debug header
so that these types of interface changes can be minimally propogated
into those drivers by people without the hardware.  They don't have to
generate a working driver -- though a command-dumping winsys would be
an excellent for regression checking.
2009-11-24 14:09:24 +00:00
Keith Whitwell
ba1ca28cc6 gallium: simplify tgsi tokens further
Drop anonymous 'Extended' fields, have every optional token named
explicitly in its parent.  Eg. there is now an Instruction.Label flag,
etc.

Drop destination modifiers and other functionality which cannot be
generated by tgsi_ureg.c, which is now the primary way of creating
shaders.

Pull source modifiers into the source register token, drop the second
negate flag.  The source register token is now full - if we need to
expand it, probably best to move all of the modifiers to a new token
and have a single flag for it.
2009-11-24 13:41:03 +00:00
Michal Krol
3c46bbee1b tgsi: Document Declaration Semantic token and FACE semantic name. 2009-11-24 11:58:01 +01:00
Michal Krol
bae9ece685 slang: Fix allocation size.
We don't need 16K+ to store a single pointer.
2009-11-24 11:22:03 +01:00
Michal Krol
53d9b7d361 mesa: Fix pointer arithmetic. 2009-11-24 11:17:16 +01:00
Michal Krol
0c54d76f37 tgsi: Implement predicated instructions in exec. 2009-11-24 09:05:31 +01:00
Michal Krol
59a70c364d tgsi: Add ureg_DECL_loop(). 2009-11-24 09:05:29 +01:00
Michal Krol
5ee0d9f632 tgsi: Account for gallium shader token representation changes. 2009-11-24 09:05:28 +01:00
Michal Krol
57221c5438 gallium: Refactor the instruction predicate TGSI token.
Rename it to tgsi_instruction_predicate -- it's no longer an extended
token. Its presence is indicated by a new flag in tgsi_instruction that
indicates whether an instruction is predicated.

Also, change predicate index representation to match the other
tokens that specify register indices.
2009-11-24 09:05:26 +01:00
Dave Airlie
2176b3ed9a r300: fix swtcl bo leak problem.
We can get a lot of swtcl bo allocations - need to probably abstract
this a bit further.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-24 11:56:45 +10:00
Dave Airlie
bd13e6e5e2 radeon/r200/r300/r600: make bo mapping be explicit
This moves the bo mapping outside the DMA layer and makes it explicit,
this should in theory make it simpler to split the clean up the dma/cmdbuf
linkage that I created before that is broken.

Tested on: r600, rv380 (tcl/no-tcl), rv200 (tcl/no-tcl)

Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-24 11:38:36 +10:00
Brian Paul
863ad9a683 mesa: use gcc __builtin_popcount() 2009-11-23 18:09:46 -07:00
Brian Paul
8d80b5400a r300g: use util_bitcount() 2009-11-23 18:06:19 -07:00
Brian Paul
0a27c7b963 egl: use util_bitcount() 2009-11-23 18:04:47 -07:00
Brian Paul
15740eb03c gallium/util: added util_bitcount() 2009-11-23 18:04:22 -07:00
Maciej Cencora
5173d14cb5 Merge commit 'origin/mesa_7_7_branch' 2009-11-23 22:14:48 +01:00
Michal Krol
03f0ebe3bd slang: Fix order of parameters to sl_pp_tokenise(). 2009-11-23 20:12:17 +01:00
Michal Krol
18384af749 slang: Check return value from emit_instruction(). 2009-11-23 13:22:04 +01:00
Michal Krol
c511e0b844 tgsi: Clamp the source argument in micro_exp2() to avoid Inf. 2009-11-23 11:32:58 +01:00
Michal Krol
eacdd8fa75 tgsi: Remove code that actually had no effect. 2009-11-23 11:29:29 +01:00
Michal Krol
cc93fa3527 softpipe: Initialise TGSI machine's Face. 2009-11-23 10:51:07 +01:00
Michal Krol
cc35a454da tgsi: Fix POSITION and FACE fragment shader inputs. 2009-11-23 10:49:41 +01:00
Michal Krol
b7590cde4a tgsi: Bring BGNFOR/ENDFOR implementation up to spec. 2009-11-23 10:40:05 +01:00
Michal Krol
cde758a2b5 tgsi: Fake TXD implementation in exec. 2009-11-23 10:29:08 +01:00
Michal Krol
f359ac5486 tgsi: Add execution debugging facilities to exec. 2009-11-23 10:29:07 +01:00
Michal Krol
f61865799d slang: Be more robust with memory in concat_shaders(). 2009-11-23 10:29:05 +01:00
Keith Whitwell
0a89ad80d9 i965g: gs nr_attrs also tracks nr fragment shader inputs
Or, equivalently, nr of outputs of active vertex shader varient.
2009-11-23 03:06:58 +00:00
Keith Whitwell
cd0e6619e6 i965g: correct test for unfilled modes 2009-11-23 03:00:47 +00:00
Richard Li
a12b468d00 r600 : add support for shader instruction trunc and discard. 2009-11-22 21:37:44 -05:00
Keith Whitwell
968a7dfb29 i965g: use correct key size for vs upload 2009-11-23 01:47:57 +00:00
Keith Whitwell
21172d4358 i965g: apply linear math to both linear and perspective attrs 2009-11-23 00:58:13 +00:00
Dave Airlie
c3c8c40cab r600: hopefully fix segfault. 2009-11-23 06:44:29 +10:00
Dave Airlie
f9b0f1dfa1 r600: fix inline issues 2009-11-23 06:31:29 +10:00
Richard Li
1f8c23d9db r600 : add stack depth calculation, enable CF pop. 2009-11-22 13:03:20 -05:00
Richard Li
a02938a842 r600 : use cf for all pop now, left optimization for future. 2009-11-22 13:03:19 -05:00
Corbin Simpson
2b07b64061 r300g: Build fix.
Oops.
2009-11-21 19:13:26 -08:00
Marek Olšák
44c0aaf990 r300g: do not reallocate r300_vertex_info and r300_rs_block all the time 2009-11-21 14:52:26 -08:00
Marek Olšák
3a2cd66af8 r300g: clean up vs/fs tabs
Instead of vs_tab, we use vs_output_tab and it's local now. fs_tab hasn't
been used anywhere, so I removed it and r300_update_fs_tab too.
2009-11-21 14:52:26 -08:00
Michal Krol
6199a0cf89 glsl/apps: No need to purify source text for tokeniser. 2009-11-21 20:44:16 +01:00
Michal Krol
1cf021475a slang: No need to purify source text for tokeniser. 2009-11-21 20:43:02 +01:00
Michal Krol
abe1f33298 glsl/pp: Do purification and tokenisation in a single step. 2009-11-21 20:41:48 +01:00
Marek Olšák
435c495549 r300g: silence warnings 2009-11-20 18:06:21 -08:00
Marek Olšák
624a0cd9c1 r300g: fix typo in r300_reg.h to prevent the RS unit from doing random things
And reorder fragment shader inputs so that the colors are before texcoords,
as is allocated by the shader compiler. This commit makes VS->FS attribute
routing work on R500.
2009-11-20 18:05:21 -08:00
Marek Olšák
4e1236e602 r300g: fix updating a vertex format
We must update PSC when we change the vertex format, e.g. vertex colors
from RGBA to BGRA.
2009-11-20 18:04:06 -08:00
Marek Olšák
b7078a8811 r300g: add texture lod clamping
These now work:
piglit/lodclamp
piglit/levelclamp
2009-11-20 17:58:13 -08:00
Keith Whitwell
8bf75f28de i965g: get basic texturing working again
Revert to fixed-layout surface binding table -- it's probably the best
way to do this.  Pass sampler and texture numbers separately even
though we're always keeping them the same at present.
2009-11-21 01:52:22 +00:00
Corbin Simpson
1c181a7eff r300g: Begin separating HW TCL and SW TCL state and setup.
This patch removes draw_context entirely from the HW TCL path and cleans up
a few other things along the way. Hopefully, nothing got broken.

Thanks to Marek Olšák for testing, review, and pointing out my bugs. :3
2009-11-20 17:48:10 -08:00
Marek Olšák
015e7e7724 r300g: emit R300_TEX_ENABLE to indicate there are no textures bound
Previously, this reg wasn't emitted at all if texture_count == 0.
2009-11-20 15:12:18 -08:00
Marek Olšák
ae70cd1f02 r300g: remove variant states from emit_state_invariant 2009-11-20 15:08:52 -08:00
Corbin Simpson
6a95996abb r300g: Texrect factor cleanup.
(0, 0, 0, 1) is a much saner default value, and texrect factors only need
to be (1/s, 1/t, 0, 1).
2009-11-20 14:56:13 -08:00
Marek Olšák
f4041b37e2 r300g: fix rectangle textures on r3xx
Adapted from Maciej Cencora's patch.
2009-11-20 14:47:31 -08:00
Corbin Simpson
06ec216d19 r300g: Clean up bitcounting function.
I didn't see this in u_math; surely somebody else has this wheel
reinvented elsewhere.
2009-11-20 14:10:59 -08:00
Corbin Simpson
6a3eb1f91b r300g: Use MAX3 and MIN3. 2009-11-20 14:10:45 -08:00
Corbin Simpson
37ba97421c util: Add MAX3 and MIN3. 2009-11-20 14:08:58 -08:00
Marek Olšák
beea241374 r300g: set better values in the R300_VAP_CNTL register 2009-11-20 13:33:37 -08:00
Alan Hourihane
0295edf596 Fix comment to use /* */ rather than // 2009-11-20 18:11:30 +00:00
Alan Hourihane
904469dcd2 Fix indentation. 2009-11-20 18:10:54 +00:00
Alan Hourihane
8f648cd3e4 Fix vega compilation. 2009-11-20 18:09:10 +00:00
Alan Hourihane
a24631bcd7 Fix memory leak. 2009-11-20 18:08:29 +00:00
Richard Li
08e5d1ecad r600 : eliminate Wondows line ending for test code. 2009-11-20 11:03:09 -05:00
Michal Krol
b89cd8afc5 glsl/pp: Expand unknown identifiers to 0 in if/elif expressions. 2009-11-20 08:59:50 +01:00
Keith Whitwell
95d7aca4b9 i965g: fix typo converting wm src regs 2009-11-19 20:40:41 -08:00
Keith Whitwell
9507a6c206 i965g: fragment shader immediates working 2009-11-19 20:02:42 -08:00
Keith Whitwell
63b0af0775 i965g: first pass at vs immediates in curbe 2009-11-19 19:51:14 -08:00
Keith Whitwell
3fafe2b969 progs/vp: add param and imm test 2009-11-19 19:50:19 -08:00
Keith Whitwell
d2f4c80c8b i965g: get linear vs perspective interpolation working again 2009-11-19 19:41:25 -08:00
Keith Whitwell
4fb77ef840 i965g: include interpolation info in fs signature 2009-11-19 19:31:32 -08:00
Keith Whitwell
34a01929d5 i965g: special case setup when fs has no inputs 2009-11-19 19:29:33 -08:00
Keith Whitwell
47cef2bb8f i965g: add new state flag tracking fs signature changes 2009-11-19 18:55:18 -08:00
Keith Whitwell
c58e20fbbb i965g: fix typo in previous commit 2009-11-19 18:47:07 -08:00
Dave Airlie
3f2c77659c Merge remote branch 'origin/mesa_7_7_branch' 2009-11-20 11:48:10 +10:00
Keith Whitwell
7e5cd3eb14 progs/fp: add simple imm, param tests 2009-11-19 16:53:02 -08:00
Keith Whitwell
8db59a1fa3 i965g: setup nr_attrs should track nr fragment shader inputs
This would be equivalent to taking the nr outputs of the vp varient
2009-11-19 16:14:44 -08:00
Keith Whitwell
1b9eda4c74 i965g: get fragment constants sort-of working 2009-11-19 16:09:39 -08:00
Keith Whitwell
9e4f3eaf66 i965g: make the load-before-use vs immediate path work 2009-11-19 15:04:00 -08:00
Keith Whitwell
25cbf9b4da i965g: fix initialization of texture width/height/depth arrays
Will remove these arrays in another branch - they're completely redundant.
2009-11-19 14:47:24 -08:00
Richard Li
b09e74901a r600 : Clean up a bit test code mess. 2009-11-19 17:41:10 -05:00
Keith Whitwell
683e35f726 gallium: don't use arrays for texture width,height,depth 2009-11-19 14:39:34 -08:00
Richard Li
48dfd3938e r600 : change shader pop method for now. 2009-11-19 16:55:16 -05:00
Richard Li
49b3f4a6bc Merge branch 'master' of ssh://richardradeon@git.freedesktop.org/git/mesa/mesa 2009-11-19 16:17:13 -05:00
Richard Li
6345a7ba44 r600 : check in shader code test enable flag: if flag
R600_ENABLE_GLSL_TEST defined, IL shader code will goto r600 assembler.
The test base is /mesa/progs/glsl/brick, and changes
shader code in CH06-brick.frag/vert to test different logic op
combination. (if,else,while,function,...). The stack depth code is not
in yet, so it is hard coded now. So complex code would not run (such as
things like 8 loops embeded loop in loop).
2009-11-19 16:05:43 -05:00
José Fonseca
90e69c81e4 pb: Make fenced buffers threadsafe. 2009-11-19 19:46:21 +00:00
Eric Anholt
827ba44f6e intel: Remove non-GEM support.
This really isn't supported at this point.  GEM's been in the kernel for
a year, and the fake bufmgr never really worked.
2009-11-19 11:47:22 +01:00
Eric Anholt
667760f53c intel: Remove dead intel_context members and move some packing around. 2009-11-19 11:47:21 +01:00
Eric Anholt
ee64347979 intel: Remove our special color packing macros and just use colormac.h. 2009-11-19 11:47:21 +01:00
Eric Anholt
c4b7c47fe3 intel: Pack colors for blit at blit time, rather than at ClearColor. 2009-11-19 11:47:21 +01:00
Eric Anholt
a376e5c482 intel: Consistently use no_batch_wrap in intel_context struct. 2009-11-19 11:47:21 +01:00
Eric Anholt
edd449fb97 i965: Pack brw_wm_fragment_program better. 2009-11-19 11:47:21 +01:00
Eric Anholt
15fa484f51 mesa: Remove gratuitous padding in prog_dst_register.
The padding was there to indicate the amount of space left from the
number of expected bytes in the struct minus allocated bits.  But
uint bitfields get packed so that they don't cross uint boundaries, and we
ended up allocating an extra dword to hold the pad field!
2009-11-19 11:47:21 +01:00
Eric Anholt
92d35b91f1 i965: Pack the brw_wm_prog_key better. 2009-11-19 11:47:21 +01:00
Eric Anholt
cc39fcad89 i915: Remove dead meta_draw_quad code. 2009-11-19 11:47:05 +01:00
Eric Anholt
37c79d4d76 tnl: Replace deprecated FogCoordPtr with AttribPtr[_TNL_ATTRIB_FOG] 2009-11-19 11:47:05 +01:00
Eric Anholt
0a91878015 tnl: Replace deprecated ColorPtr[] with AttribPtr or new BackfaceColorPtr. 2009-11-19 11:47:05 +01:00
Eric Anholt
fc9a2970dc tnl: Replace deprecated IndexPtr[] with AttribPtr[] or new BackfaceIndexPtr 2009-11-19 11:47:05 +01:00
Eric Anholt
165b860da6 tnl: Replace deprecated ObjPtr with AttribPtr[_TNL_ATTRIB_POS] 2009-11-19 11:47:05 +01:00
Eric Anholt
df582ca767 tnl: Replace deprecated TexCoordPtr with AttribPtr[_TNL_ATTRIB_TEX*] 2009-11-19 11:47:05 +01:00
Eric Anholt
22bcb59a95 tnl: Replace NormalPtr with AttribPtr[_TNL_ATTRIB_NORMAL] 2009-11-19 11:47:04 +01:00
Eric Anholt
abed06421b tnl: Remove unused NotifyInputChanges() tnl dd hook. 2009-11-19 11:47:04 +01:00
Michal Krol
f56b95e407 identity: Add missing screen methods. 2009-11-19 08:25:25 +01:00
Michal Krol
c5dc8d7ecc tgsi: Provide ultimate solution for SOA dependencies in exec.
Reorder STOREs in such a way that they appear after the last FETCH.
2009-11-19 08:25:23 +01:00
Keith Whitwell
6b1ede0110 i965g: remove more references to nr_vp_outputs in wm compilation
We're really more concerned about how many inputs the fragment shader
is expecting.
2009-11-18 14:40:43 -08:00
Richard Li
eec4282800 r600 : update PS and VS emit count for loop constants. 2009-11-18 15:38:45 -05:00
Richard Li
de46087160 r600 : add some defs 2009-11-18 15:38:45 -05:00
Richard Li
3132853e12 r600 : Initial version of glsl fc. 2009-11-18 15:38:45 -05:00
Zack Rusin
fafc016e1f st/xorg: enable yv12 for xv 2009-11-18 12:06:49 -05:00
Brian Paul
3ba983bf5d docs: setup 7.8 release notes file 2009-11-18 07:46:17 -07:00
Brian Paul
d252f9d278 mesa: bump version to 7.8 2009-11-18 07:26:28 -07:00
Brian Paul
61a3716ab5 mesa: bump version to 7.8 2009-11-18 07:26:28 -07:00
Keith Whitwell
1877e6cd2d i965g: handle special vs outputs specially
Where vs output semantic tags indicate an output is signficant for
fixed function processing (such as clipping, unfilled modes, etc),
retain information about that output so that we can get to it easily
later on.

Fix up the unfilled processing, but hard-wire edgeflag to one for now.

With this change, trivial/tri-unfilled works.
2009-11-17 14:50:49 -08:00
Keith Whitwell
d299ee771b i965g rename offset_edge to offset_edgeflag 2009-11-17 14:50:49 -08:00
Michal Krol
547ac2869b glsl/pp: Fix macro formal argument parsing, more descriptive error msgs. 2009-11-17 09:06:53 +01:00
Keith Whitwell
c5f9713bd3 i965g: remove droppings in xlib winsys 2009-11-15 12:25:18 -08:00
Keith Whitwell
07fafc7c93 mesa/st: refactor vertex and fragment shader translation
Translate vertex shaders independently of fragment shaders.

Previously tried to make fragment shader semantic indexes always start
at zero and exclude holes.  This was unnecessary but meant that vertex
shader translation had to be adjusted to take this into account.

Now use a fixed scheme for labelling special FS input semantics
(color, etc), and another fixed scheme for the generics.

With this, vertex shaders can be translated independently of the bound
fragment shader, assuming mesa has done its own job and ensured that
the vertex shader provides at least the inputs the fragment shader is
looking for.  The state-tracker didn't attempt to do anything about
this previously, so it shouldn't be needed now.
2009-11-15 11:23:30 -08:00
Keith Whitwell
1454f20a99 mesa/st: emit tgsi vertex shader directly for drawpixels
One of several cases where we build mesa shaders and then translate
them to tgsi.  Many of those cases it's because we're combining two
mesa programs and there are helpers for that, but in this case at
least can go straight to tgsi.
2009-11-15 11:23:29 -08:00
Keith Whitwell
9953fe4cb4 mesa/st: don't calculate unused output_flags data either 2009-11-15 11:23:29 -08:00
Keith Whitwell
0ffdd1c1e8 mesa/st: don't calculate unused input_flags data 2009-11-15 11:23:29 -08:00
Keith Whitwell
b44b70dc11 mesa/st: don't calculate unused vs input semantic tags 2009-11-15 11:23:29 -08:00
Keith Whitwell
d03a1c2216 i965g: restore check on line smooth state 2009-11-14 16:06:57 -08:00
Michal Krol
eaa34c2dea glsl/apps: Report syntax parser errors. 2009-11-13 19:51:49 +01:00
Michal Krol
3f147c71ed slang: Report syntax parser errors. 2009-11-13 19:51:24 +01:00
Michal Krol
99c89ebdb0 glsl/cl: Add simple error reporting. 2009-11-13 19:51:02 +01:00
Michal Krol
b385312bc7 slang: Regenerate .gc files. 2009-11-13 06:03:56 +01:00
Michal Krol
7593562a61 slang: Get rid of the old syntax file and utilities. 2009-11-13 05:58:46 +01:00
Michal Krol
cd5553b457 slang: Plug in the new syntax parser. 2009-11-13 05:52:39 +01:00
Michal Krol
f5b6e06390 gdi: Link to glslcl. 2009-11-13 05:49:25 +01:00
Michal Krol
38a1f0b5d1 glsl/apps: Add GLSL compiler that translates source text into binary stream.
Should be used in place of gc_to_bin utility to precompile builtin library.
2009-11-13 03:02:14 +01:00
Michal Krol
08e90bdea1 glsl/cl: Add a hard-coded syntax parser. 2009-11-13 03:00:45 +01:00
Keith Whitwell
2f54d02d20 i965g: consult fs inputs when laying out vs output regs
Vertex shader now emits just the FS inputs, in the positions and order
expected by the fragment shader.

This means potentially regenerating the vertex shader to match
different fragment shader's input layouts.
2009-11-11 18:51:58 -08:00
Keith Whitwell
0c547d63c4 i965g: skip over vertex position output when preallocating FS inputs 2009-11-11 18:51:57 -08:00
Keith Whitwell
a010307e0a i965g: some more cases where file_max[] is used without obligatory +1 2009-11-11 18:51:57 -08:00
Keith Whitwell
e4d174ea1b i965g: smaller upload buffer for index data 2009-11-11 18:51:57 -08:00
Keith Whitwell
d86e9079a8 i965g: fix off-by-one on curbe upload 2009-11-11 18:51:57 -08:00
Keith Whitwell
e243279a48 i965g: avoid use of internally generated immediates
Currently not working, so don't generate more of them.
2009-11-11 18:51:57 -08:00
Keith Whitwell
98c2b53381 trivial: make tri-orig more closely match the original version of tri... 2009-11-11 18:51:57 -08:00
Michal Krol
d44cebd1ee glsl/pp: Add sl_pp_purify_getc(). 2009-11-10 20:49:45 +01:00
Chia-I Wu
9f38553018 Update config linux-opengl-es.
Build demos that require EGL_MESA_screen_surface, and build egl_i915.so
that supports EGL_MESA_screen_surface.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-10 11:25:00 -07:00
Chia-I Wu
b30876658b progs/es1: Port eglgears to OpenGL ES 1.1.
This demo requires EGL_MESA_screen_surface to run.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-10 11:24:53 -07:00
Chia-I Wu
381cbc7192 progs/es1: Port egltri to OpenGL ES 1.1.
This demo requires EGL_MESA_screen_surface to run.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-10 11:24:39 -07:00
Chia-I Wu
4b9cc50345 st/egl: Allow APIs other than OpenGL.
This is done by stopping linking to libmesagallium.a and removing DRI
related stuff.  The state tracker an application links to decides the
API supported.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-10 11:24:26 -07:00
Chia-I Wu
5f0ea53747 egl_softpipe: Clean up Makefile.
Fix generation of depend.  Link to the dynamic libraries used.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-10 11:24:10 -07:00
Chia-I Wu
0b9f0ba706 progs/es: Add .gitignore.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-10 11:23:47 -07:00
Chia-I Wu
9de051e85e mesa/es: Add .gitignore.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-10 11:23:40 -07:00
Michal Krol
4703d7d3f8 slang: Update for glsl/pp interface changes. 2009-11-10 00:16:09 +01:00
Michal Krol
b5c8c87eab glsl/apps: Update for glsl/pp interface changes. 2009-11-10 00:15:54 +01:00
Michal Krol
d37f7694b6 glsl/pp: Have sl_pp_purify() return error msg/line no. 2009-11-10 00:15:33 +01:00
Jakob Bornecrantz
cbad97b685 i965g: Fixup texture formats 2009-11-07 17:47:00 +00:00
Jakob Bornecrantz
229f6b9a7e i965g: Formalize on S8Z24 as the suported depth format 2009-11-07 15:47:21 +00:00
Chia-I Wu
97ea8e9263 Add new config for OpenGL ES.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-06 14:19:24 -07:00
Chia-I Wu
1046f70a7d gallium: Allow state trackers to install files.
State trackers like es or vega need to install their libraries.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-06 14:19:24 -07:00
Chia-I Wu
7fb41df2cb mesa/main: linear_to_nonlinear is not always available.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-06 14:19:24 -07:00
Chia-I Wu
37dca7955a mesa/es: Improve support for parallel execution of make.
Running make with -j for the first time might fail because glapi headers
haven't been generated.  This commit should make it more reliable.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-06 14:19:23 -07:00
Chia-I Wu
f1c7874cd9 mesa/es: Fix symbol conflicts and warnings.
drawtex.c was listed in LOCAL_ES1_SOURCES twice.  My mistake when
merging the patches.

Also, run gl_apitemp.py with -c to silence warnings and add target
"install".

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-06 14:19:23 -07:00
Chia-I Wu
1af44e9e5a glapi: Add OpenGL ES compatibility mode to scripts.
When the mode is on, the scripts would generate headers that are
suitable for OpenGL ES.  There are two differences.  One is that they
will generate function prototypes for OpenGL ES specific functions.  The
other is that, when a function has multiple names, SET/GET/CALL macros
would be generated for each of names.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-06 14:19:23 -07:00
Jakob Bornecrantz
1f94c06d3f i965g: Fixup buffer creation function
First tri!
2009-11-06 20:45:40 +00:00
Jakob Bornecrantz
9708ce874e i965g: Add texture transfer functions
They don't seem to work. Maybe we are forgetting to flush the gpu or something.
2009-11-06 20:45:08 +00:00
Jakob Bornecrantz
dc97a5d782 i965g: Match pitch modification on get buffer as well
This is a ugly hack in order to match what the intel
X driver gives us. However putting this in the winsys
where it fits better forces it reach more into the
driver then it already does.
2009-11-06 19:05:41 +00:00
Jakob Bornecrantz
8353162a4c progs/trivial: Ignores 2009-11-06 18:40:23 +00:00
Jakob Bornecrantz
833f5bbfaf i965g: First clear! 2009-11-06 18:34:23 +00:00
Keith Whitwell
4fbe6c4e4e i965g: get rid of cc key, simplify state upload
Keep a valid reloc table active between uploads, avoid
recalculating it every time.
2009-11-06 17:26:52 +00:00
Jakob Bornecrantz
0532cc0c86 i965g: trivial/clear can now send stuff to hardware
Added a flag if we should send commands to hardware
as what we send isn't all that correct.
2009-11-06 17:03:01 +00:00
Jakob Bornecrantz
2eb6b0defe i965g: Fix texture blanket function 2009-11-06 16:40:54 +00:00
Jakob Bornecrantz
215b49ae1e i965g: Add functions needed by the winsys 2009-11-06 15:55:06 +00:00
Jakob Bornecrantz
6949d5c777 i965g: Winsys whitespace 2009-11-06 15:55:06 +00:00
Jakob Bornecrantz
68b5a501c5 i965g: Build winsys again 2009-11-06 15:55:06 +00:00
Jakob Bornecrantz
12ea198fd2 i965g: Header whitespace 2009-11-06 15:55:06 +00:00
Keith Whitwell
86c32df3e0 i965g: get brw_state_debug.c building 2009-11-06 15:40:16 +00:00
Keith Whitwell
4d1ae7a546 i965g: propogate index size state 2009-11-06 14:18:28 +00:00
Keith Whitwell
11805726d3 i965g: remove references to brw_surface_bo() 2009-11-06 13:41:52 +00:00
Keith Whitwell
eacd13bcc8 i965g: plumb through fb_write target and eot data 2009-11-06 13:28:04 +00:00
Keith Whitwell
3e14a482da i965g: propogate nr_cbufs into wm prog key 2009-11-06 12:51:26 +00:00
Keith Whitwell
1e3910a878 i965g: init saturate field in fp dst_reg helper 2009-11-06 12:01:11 +00:00
Keith Whitwell
a485341455 i965g: add dumping for our new pass_fp output 2009-11-06 11:56:52 +00:00
Keith Whitwell
381cd2d63f i965g: disassemble each instruction as generated 2009-11-06 11:45:01 +00:00
Keith Whitwell
aab9601a75 i965g: hardwire linear interpolation for now
seems to generate saner code, need to go back and fix perspective
interpolation (and remove the hard-wire) once this is working.
2009-11-06 11:21:08 +00:00
Keith Whitwell
caf2cf884c i965g: fix some reloc counts 2009-11-06 10:38:19 +00:00
Keith Whitwell
212fb8adbd i965g: don't set up vs stack register for non-branching shaders 2009-11-06 10:24:19 +00:00
Keith Whitwell
1d6b5957c6 i965g: add DEBUG_MIN_URB flag 2009-11-06 10:19:39 +00:00
Keith Whitwell
5d7c0cf563 i965g: tgsi outputs cannot be used as source regs 2009-11-06 10:19:24 +00:00
Keith Whitwell
b216f1aa47 i965g: use curr.vertex_element state directly 2009-11-06 09:38:14 +00:00
Keith Whitwell
5a24c66915 trivial: add vbo-tri, an even simpler version of tri.c 2009-11-06 09:34:02 +00:00
Keith Whitwell
c22b47ebb1 i965g: don't emit line stipple packet if stipple disabled 2009-11-06 08:57:40 +00:00
Keith Whitwell
fc7fa678f5 i965g: populate brw_context chipset id 2009-11-06 08:57:02 +00:00
Keith Whitwell
0e80e4ea75 i965g: make sure blend color packet header is initialized
We will emit this packet at startup (dirty == ~0), even if we haven't
had the state tracker call into brw_set_blend_color() yet.

This way is a little more efficient also.
2009-11-06 08:54:01 +00:00
Keith Whitwell
018e2250b8 i965g: remove/disable inactive state atoms 2009-11-06 08:33:10 +00:00
Keith Whitwell
4a3e24522b i965g: populate wm reloc array earlier
Still have to calculate the reloc background in two places.
2009-11-06 08:29:09 +00:00
Keith Whitwell
b8e63e9210 i965g: point_rast_rule comment no longer applies
Not sure exactly what state we want here now, will need to experiment.
2009-11-06 08:28:17 +00:00
Keith Whitwell
b9bb41321a i965g: scissor off by one 2009-11-06 08:27:43 +00:00
Keith Whitwell
a49ccf0fd2 i965g: restore code to populate the relocation background
I'm emitting this in two places now, to the data presented
for upload and also in the delta field of the reloc struct.
Probably want to remove the delta field and just pull the
background from the key.
2009-11-06 07:47:07 +00:00
Chia-I Wu
5b85cada60 progs/es: OpenGL ES 1.x and 2.X demo programs.
The demo programs are written by Brian Paul, and cherry-picked from
opengl-es branch.  Several minor issues such as a linking problem are
fixed.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:04:21 -07:00
Chia-I Wu
d14ac1073c st/es: Add OpenGL ES state trackers.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:04:21 -07:00
Chia-I Wu
34064756a5 mesa/es: Add support for GL_OES_draw_texture.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:04:20 -07:00
Chia-I Wu
bfa66bd6f9 mesa/es: Add OpenGL ES overlay.
This is primitive support for OpenGL ES.  It uses a subset of mesa
sources to build libesXgallium.a and libesXapi.a, where X is 1 for
OpenGL ES 1.x, 2 for OpenGL ES 2.x.  The static libraries serve the same
purpose as libmesagallium.a and libglapi.a do for OpenGL.

This is based on the work of opengl-es branch.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:04:20 -07:00
Chia-I Wu
f68bf0621d mesa/es: Add OpenGL ES XMLs.
These XMLs define OpenGL ES 1.x and 2.x APIs.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:04:20 -07:00
Chia-I Wu
7cdf8ab096 mesa/main: Make _mesa_TexGenf and _mesa_GetTexGenfv global again.
They are needed by OpenGL ES overlay.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:04:20 -07:00
Chia-I Wu
5b426288c2 glapi: Include headers with directory prefixes.
This allows different sets of generated sources and headers to be used.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:04:11 -07:00
Chia-I Wu
7df4c7e1b8 glapi: Avoid hardcoded category names in remap helper script.
The output of the script is unchanged.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:04:10 -07:00
Chia-I Wu
6418f836d4 glapi: Add is_abi() to test if a function is in the ABI.
The test is done by checking if the offset is manually assigned.  The
generated headers are unchanged.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:04:10 -07:00
Chia-I Wu
8d2edbf139 mesa/main: Add more OpenGL ES types to glheader.h.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:04:10 -07:00
Chia-I Wu
c3d61d3785 mesa/main: Add support for point size array in _mesa_GetPointerv.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:04:10 -07:00
Chia-I Wu
6678f597e7 gallium/xlib: Fix missing symbols when GLX_INDIRECT_RENDERING is defined.
When GLX_INDIRECT_RENDERING is defined, some symbols are used in
libglapi.a but are not defined.  Define them through the help of
glapitemp.h.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:03:57 -07:00
Chia-I Wu
888429360a mesa/xlib: Fix missing symbols when GLX_INDIRECT_RENDERING is defined.
When GLX_INDIRECT_RENDERING is defined, some symbols are used in
libglapi.a but are not defined.  Define them through the help of
glapitemp.h.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:03:57 -07:00
Chia-I Wu
7870298086 glapi: Allow normal entry points to be skipped.
Reorganize glapitemp.h such that it is possible to skip normal entry
points or protocol entry points by defining
_GLAPI_SKIP_NORMAL_ENTRY_POINTS or _GLAPI_SKIP_PROTO_ENTRY_POINTS.

Protocol entry points are those with different GLX protocols.  They are
skipped in libglapi.a when GLX_INDIRECT_RENDERING is defined.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:03:56 -07:00
Keith Whitwell
c93d9c1ce3 i965g: clean up winsys dumping code a little 2009-11-05 22:51:34 +00:00
Keith Whitwell
4c196ed7a8 i965g: pass relocation information in an array with bo_subdata
Makes it easier to dump as we get all of the information
about the upload in a single hit.

Opens the window to simplification in the driver if these
relocation arrays can be maintained statically rather than
being recreated whenever we check for a new upload.

Still needs some cleanup to avoid uglyness introduced with the
delta values.
2009-11-05 22:43:36 +00:00
Keith Whitwell
3763457892 i965g: propogate map-buffer-range semantics down to winsys 2009-11-05 21:09:51 +00:00
Keith Whitwell
963728665a i965g: make the winsys responsible for all buffer->offset handling
The winsys now inserts the presumed offset into referring buffers from
inside of bo_emit_reloc().  Remove the many locally coded places where
this was happening in the driver and eliminate the worry of getting it
wrong.

No longer need to expose offset values to the driver at all, so no need
to worry about what to do in the driver when they change.  Just use
zero values wherever we had offsets previously -- the relocations will
fix it all up for us.
2009-11-05 20:34:27 +00:00
Keith Whitwell
658da189b6 i965g: remove duplicate viewport state in brw_context 2009-11-05 19:58:02 +00:00
Keith Whitwell
8f0e51be47 i965g: correct sense of writedisable flags 2009-11-05 19:57:59 +00:00
Keith Whitwell
b229ee342f brw: push more dumping into the winsys 2009-11-05 19:57:28 +00:00
Keith Whitwell
a70e6178d4 i965g: correct size of surf_bo array 2009-11-05 17:42:38 +00:00
Keith Whitwell
205871c76a i965g: use Elements in loops over arrays 2009-11-05 17:42:13 +00:00
Keith Whitwell
674c390aaf i965g: add const qualifiers 2009-11-05 17:41:35 +00:00
Keith Whitwell
aa9773d056 i965g: disassemble more than one instruction at a time 2009-11-05 15:34:18 +00:00
Keith Whitwell
203adb8ea6 i965g: remove old dumping code 2009-11-05 15:15:04 +00:00
Keith Whitwell
61a8ab3359 i965g: call dissassembler for appropriate data uploads 2009-11-05 15:10:22 +00:00
Keith Whitwell
c796aed5dd i965g: add lots of error checks and early returns
Any allocation that may fail should be checked, and propogate the
error upwards.  At the highest level we will flush batch and retry.

This is an alternate strategy to what the original DRI driver did of
attempting to flush batch from the lowest levels (eg inside
BEGIN_BATCH).  The trouble with that strategy was that flushes could
occur at unexpected times, and additionally there was a need for a
wierd notification mechanism to propogate the 'lost context' state
back up to higher levels.

Propogating the errors directly gives us a lot of flexibility how to
deal with these states, at the expense of a lot more checking in the
code.

Will add some sanity checks later to make sure that out-of-memory
conditions are properly escalated and not lost halfway up the stack.
2009-11-05 14:01:37 +00:00
José Fonseca
31b8b1dd36 i965g: Don't dump pads or dwords aliases. 2009-11-05 12:45:23 +00:00
Keith Whitwell
09454f68e5 i965g: hook up dumpers in dumping winsys 2009-11-05 12:35:22 +00:00
José Fonseca
9069c791d0 i965g: Dumper for i965 structures. 2009-11-05 12:22:01 +00:00
Keith Whitwell
6ac38232ee i965g: add data type tags to aid dumping/decoding 2009-11-05 10:59:02 +00:00
Keith Whitwell
b2bf5f98d9 i965g: use pipe_error return value for brw_batchbuffer_require_space
trivial/tri runs without crashing (on debug winsys) but still produces
obviously incorrect command buffers.
2009-11-05 08:01:48 +00:00
Keith Whitwell
2475e5db67 i965g: fix compiler warning 2009-11-05 08:00:33 +00:00
Jakob Bornecrantz
47cbbb7253 i965g: Builds with scons
But there are some missing symbols, "nm -u i965_dri.so"
[SNIP]
                 U brw_surface_bo
                 U brw_surface_pitch
                 U brw_texture_blanket_winsys_buffer
                 U brw_texture_get_winsys_buffer
                 U brw_update_dirty_counts
[SNIP]
2009-11-05 01:22:10 +00:00
Jakob Bornecrantz
643bb3419d i965g: Fix debug check 2009-11-05 01:22:10 +00:00
Jakob Bornecrantz
ce4f23aab9 i965g: Build with configure 2009-11-05 01:22:10 +00:00
Jakob Bornecrantz
37c6820d0d i965g: Do not create a symlink for i965_dri.so 2009-11-05 01:22:10 +00:00
Jakob Bornecrantz
9bc59a9b6d i915g: Do not create a symlink for i965_dri.so 2009-11-05 01:22:10 +00:00
Keith Whitwell
ffc2446391 i965g: enable line stipple packet emit
With this change, trivial/tri manages to build and emit
a fairly unconvincing command buffer (to the debug winsys),
and then crashes.
2009-11-04 23:44:25 +00:00
Keith Whitwell
c2e51effe6 i965g: fix order of calculation of brw->wm.nr_surfaces 2009-11-04 23:41:30 +00:00
Keith Whitwell
220566d8dc i965g: consolidate some includes 2009-11-04 23:37:52 +00:00
Keith Whitwell
e84e86ecb2 i965g: fix some asserts 2009-11-04 23:33:08 +00:00
Keith Whitwell
7a49bd6d15 i965g: remove redundant screen pointer in brw context struct 2009-11-04 23:30:52 +00:00
Keith Whitwell
e3e084c660 i965g: initialize winsys pointer in surface cache 2009-11-04 23:27:50 +00:00
Keith Whitwell
518171a887 i965g: init pointer to null, avoid segfault 2009-11-04 23:27:30 +00:00
Keith Whitwell
bf4a518cf2 i965g: clean up wm init_registers func 2009-11-04 23:22:48 +00:00
Keith Whitwell
1b611f99b4 i965g: hook up some missing vertex shader code 2009-11-04 23:18:07 +00:00
Keith Whitwell
cc8105d740 i965g: hook up some vertex state funcs 2009-11-04 23:09:23 +00:00
Keith Whitwell
18efe9a687 ws/i965: allow NULL buffer in winsys::bo_unreference
Special case to avoid clutter in the driver
2009-11-04 23:09:05 +00:00
Keith Whitwell
951fdac566 i965g: pull in a copy of intel_decode.c for now
With the stubbed out, non-hardware xlib winsys, trivial/clear runs and
prints a plausible command stream
2009-11-04 21:37:07 +00:00
Keith Whitwell
cde48bc8d1 i965g: hook up flush-frontbuffer 2009-11-04 21:12:48 +00:00
Keith Whitwell
b8bb48f452 i965g: fix up batchbuffer confusion 2009-11-04 21:05:34 +00:00
Keith Whitwell
c5ed7b6e76 i965g: plumb in some surface state 2009-11-04 20:36:48 +00:00
Keith Whitwell
e18f223da7 i965g: hook up pipe_clear functions 2009-11-04 20:26:41 +00:00
Keith Whitwell
19119517ce i965g: add constant buffer setter 2009-11-04 19:41:02 +00:00
Keith Whitwell
4e335a213a i965g: add missing is_*_referenced callbacks 2009-11-04 19:32:44 +00:00
Keith Whitwell
0cf432c7a1 i965g: initialize surface refcount 2009-11-04 19:03:06 +00:00
Keith Whitwell
58e3360c11 i965g: add more missing pipe callbacks 2009-11-04 18:26:34 +00:00
Keith Whitwell
99394a737a i965g: add some missing texture creation code 2009-11-04 16:42:44 +00:00
Keith Whitwell
5f8dde99ed i965g: stubs for brw_pipe_vertex.c 2009-11-04 16:03:52 +00:00
Keith Whitwell
7373bc0e02 i965g: hook up pipe sampler callbacks 2009-11-04 15:59:56 +00:00
Keith Whitwell
9706a83bc9 i965g: hook up more pipe_context functions 2009-11-04 15:25:42 +00:00
Keith Whitwell
a09b3d5097 i965g: add missing buffer functions 2009-11-04 15:10:34 +00:00
Keith Whitwell
82a19f0974 ws/i965: add load-time driver registration
Otherwise xlib state-tracker doesn't know about us.
2009-11-04 14:03:25 +00:00
Keith Whitwell
b549bbb498 ws/i965: add butt-ugly linker hack
Need more linker magic to keep the glX symbols externally visible even
though they started off in a .a file.
2009-11-04 13:59:59 +00:00
Keith Whitwell
b1d2933214 i965g: hook up brw_screen.c 2009-11-04 13:54:44 +00:00
Keith Whitwell
211d7ab22b i965g: add standalone xlib debug winsys
Create a dummy winsys that just debug-prints on calls into the winsys
functions.  Will use this to get to the point where we are generating
sane-looking debug dumps and diassembly.

Also fix various warnings generated with the new compiler flags set in
this config.
2009-11-04 13:03:35 +00:00
Keith Whitwell
a277bb20de i965g: convert read/write domain pairs into single usage value
Easier to understand what's going on in the driver sources, convert
stereotype usage values back to GEM read/write domain flags in the
winsys.
2009-11-04 10:09:39 +00:00
Keith Whitwell
4ea94c04c9 i965g: format RELOCs similarly 2009-11-02 08:50:16 +00:00
Keith Whitwell
23c2ba8280 i965g: rename brw_constant_buffer to brw_curbe_buffer
Now that there are real constant buffers, try to reduce naming confusion.
2009-11-02 08:48:26 +00:00
Keith Whitwell
15a8ac2c9d i965g: driver and winsys compile
A milestone of sorts.  Still a long way from something working --
the old one compiled too, at least some of the time...
2009-11-01 19:30:53 +00:00
Keith Whitwell
efda453d64 i965g: the whole drivers/i965 directory is compiling
That was a lot more work than I expected.  Still the winsys to go,
then the small matter of making it work and re-enabling the
missing functionality.
2009-11-01 17:55:16 +00:00
Keith Whitwell
4a3e002cf9 i965g: more files compiling 2009-11-01 17:18:56 +00:00
Keith Whitwell
6981bbfabe i965g: more files compiling 2009-11-01 15:59:21 +00:00
Keith Whitwell
15e7a3b8bb i965g: more files compiling 2009-11-01 14:33:01 +00:00
Keith Whitwell
39448a9aa0 i965g: more files compiling 2009-11-01 13:11:56 +00:00
Keith Whitwell
9b18ca0955 i965g: more work on compilation -- surface management 2009-11-01 12:08:14 +00:00
Keith Whitwell
e7b7600082 i965g: more work on compilation 2009-10-31 20:05:19 +00:00
Keith Whitwell
f202a34cb1 i965g: non-glsl fragment shader path is compiling
Disabled glsl code for now, probably want to clean this up somehow.
2009-10-31 18:23:14 +00:00
Keith Whitwell
5d61b6f1f6 i965g: wip on fragment shaders 2009-10-31 15:05:01 +00:00
Keith Whitwell
99cc0fd675 i965g: work in progress on fragment shaders 2009-10-29 20:18:01 +00:00
Keith Whitwell
81b8589f06 i965g: still working on compilation 2009-10-28 21:24:03 +00:00
Keith Whitwell
7ba2fe40fa i965g: still working on compilation 2009-10-27 00:29:21 +00:00
Keith Whitwell
5a304995e0 i965g: still working on compilation 2009-10-26 01:35:05 +00:00
Keith Whitwell
09c231f84a i965g: still working on compilation 2009-10-26 00:20:33 +00:00
Keith Whitwell
590949553f i965g: start hooking up some to the gallium context interfaces
- create/bind/destroy blend and depth state
- framebuffer and viewport
- etc.
2009-10-25 11:37:39 +00:00
Keith Whitwell
562ca4eae2 i965g: more compiling wip 2009-10-25 01:20:56 +01:00
Keith Whitwell
4dd2f6640b i965g: more work on compiling, particularly the brw_draw files 2009-10-25 00:02:16 +01:00
Keith Whitwell
4f7931bb35 i965g: more work on compiling 2009-10-24 17:07:28 +01:00
Keith Whitwell
074606a806 i965g: more files compiling 2009-10-24 13:19:26 +01:00
Keith Whitwell
7ee60648a3 i965g: hook into build system 2009-10-24 11:55:25 +01:00
Keith Whitwell
357e5c9a0e ws/i965: renames from i915, hook up makefiles 2009-10-24 11:55:05 +01:00
Keith Whitwell
d71af266df i965g: first compiling file 2009-10-24 11:53:43 +01:00
Keith Whitwell
c93d2e4540 ws/i965: pull in the rest of the i915 winsys tree.
The intel_xorg file looks like it's got quite a bit of code that could
be lifted up into the xorg state tracker -- should really just have a
list of pci ids and a pointer to a screen create func.
2009-10-23 23:37:45 +01:00
Keith Whitwell
b7efe646b6 ws/i965: clone the i915 winsys
I'll want to rework this, not sure trying to share this code is a very
good idea at least until the interfaces from the two drivers calm
down.
2009-10-23 23:36:02 +01:00
Keith Whitwell
22906f7301 i965g: wip on removing GL stuff, trying to get a few files compiling 2009-10-23 23:27:43 +01:00
Keith Whitwell
6b48fb0022 i965: ignore cliprect_mode 2009-10-23 20:19:14 +01:00
Keith Whitwell
57a920cb1a i965g: wip 2009-10-23 17:03:45 +01:00
Keith Whitwell
2f5f7c0773 i965g: re-starting from the dri driver 2009-10-23 17:03:45 +01:00
Keith Whitwell
280c8acc43 llvmpipe: fix the worst of the depth regressions since switch to 4x4 2009-10-22 17:21:37 +01:00
Keith Whitwell
694f05ac18 llvmpipe: remove one of two definitions of TILESIZE 2009-10-21 15:21:11 +01:00
Keith Whitwell
341edde1d2 llvmpipe: remove dead code 2009-10-21 14:35:54 +01:00
Keith Whitwell
cccb184209 llvmpipe: minor opts to setup_tri 2009-10-20 10:11:52 +01:00
Keith Whitwell
3199c6e764 llvmpipe: move block list into rast struct 2009-10-20 09:44:23 +01:00
Keith Whitwell
8d752a20c6 llvmpipe: build list of 4x4 blocks to be shaded 2009-10-20 08:56:58 +01:00
Keith Whitwell
1735325a23 llvmpipe: recursive rasterization within a tile 2009-10-20 03:38:07 +01:00
Keith Whitwell
7b116e13a2 llvmpipe: pass mask as a linear encoding of the 4x4 block 2009-10-20 03:17:17 +01:00
Keith Whitwell
7670628061 llvmpipe: precalculate some offsets 2009-10-20 02:46:00 +01:00
Keith Whitwell
5b07d4de38 llvmpipe: remove a leftover 8x2 usage 2009-10-19 17:10:48 +01:00
Keith Whitwell
b0828b0adc llvmpipe: calculate masks in format desired by shader
Also remove branches calculating masks for quads.
2009-10-19 16:41:27 +01:00
Keith Whitwell
3fd6b724cc llvmpipe: pre-multiply some constants by fixed_one 2009-10-19 14:55:05 +01:00
José Fonseca
2f5f357c5b llvmpipe: Reshape the shader input from 8x2 to 4x4.
Incorrect rendering until the interpolation code generation is updated.
2009-10-19 14:02:01 +01:00
Keith Whitwell
0580079864 llvmpipe: fixed-point rasterization 2009-10-19 13:36:55 +01:00
José Fonseca
301c1494b2 llvmpipe: Reset the pointer to stored jit context. 2009-10-19 13:14:33 +01:00
José Fonseca
f2be08ae0e llvmpipe: Allocate the blend color from the data store, and ensure it's aligned. 2009-10-19 11:53:22 +01:00
Keith Whitwell
269342d916 llvmpipe: correctly scale top/left fill adjustments
Was overdoing it previously.
2009-10-19 11:29:05 +01:00
Keith Whitwell
d9f44abe3b llvmpipe: fix typo correcting for fill convention
Adjustments for top-left fill convention were being lost.
2009-10-19 11:23:43 +01:00
José Fonseca
2e3580d994 llvmpipe: Maintain a copy of the shader constants to prevent clobbering. 2009-10-18 11:57:43 +01:00
José Fonseca
0177c6e66c llvmpipe: Only invoke the shader if necessary. 2009-10-10 18:44:46 +01:00
José Fonseca
7908c239e0 llvmpipe: Additional checks for binner block lists. 2009-10-09 19:17:30 +01:00
José Fonseca
61f3eeb640 llvmpipe: Use framebuffer coords consistently. 2009-10-09 19:16:36 +01:00
José Fonseca
8c80413360 llvmpipe: Fix type in tri bounding box check. 2009-10-09 17:14:11 +01:00
Keith Whitwell
b4924d62c7 llvmpipe: fill in tri min/max values 2009-10-09 16:59:24 +01:00
José Fonseca
6464ec4836 llvmpipe: Remove partial tile override. 2009-10-09 16:50:32 +01:00
José Fonseca
8c34c86d19 llvmpipe: Undo debug override. 2009-10-09 16:23:00 +01:00
Keith Whitwell
05131f7502 llvmpipe: properly clip tile writes 2009-10-09 16:20:56 +01:00
José Fonseca
c2e926b72d llvmpipe: Pass framebuffer coords to shader. 2009-10-09 16:18:38 +01:00
José Fonseca
b0cd386e77 llvmpipe: Tell setup shader inputs. 2009-10-09 16:18:37 +01:00
Keith Whitwell
82ec7f018d llvmpipe: correct binning maths for iterating over whole tiles 2009-10-09 16:07:58 +01:00
José Fonseca
8599969582 llvmpipe: Get jit_context/jit_function across the rasterizer. 2009-10-09 15:53:53 +01:00
Keith Whitwell
f406ffaea6 llvmpipe: set block count/used values back to zero on reset 2009-10-09 15:29:10 +01:00
Keith Whitwell
da1808ccc9 llvmpipe: just bin whole tiles for now 2009-10-09 15:10:15 +01:00
Keith Whitwell
402c189af7 llvmpipe: always call begin_binning on transition to active state 2009-10-09 15:07:18 +01:00
Keith Whitwell
dec35d04ae llvmpipe: add LP_DEBUG env var 2009-10-09 14:59:35 +01:00
Keith Whitwell
082b3b0a89 llvmpipe: initialize setup data store 2009-10-09 14:36:41 +01:00
Keith Whitwell
163a31952c llvmpipe: initialize setup line/tri/point funcs 2009-10-09 14:34:23 +01:00
José Fonseca
608c222723 llvmpipe: Put jit_context in store. 2009-10-09 14:33:21 +01:00
Keith Whitwell
e0e2008f1d llvmpipe: trivial/clear works 2009-10-09 14:29:25 +01:00
Keith Whitwell
295aea0489 llvmpipe: more debug 2009-10-09 14:07:40 +01:00
José Fonseca
659609e0ae llvmpipe: Replace util_pack_color with straight float_to_ubyte. 2009-10-09 14:03:24 +01:00
Keith Whitwell
4e1334ced6 llvmpipe: debug, crash fixes 2009-10-09 14:02:39 +01:00
Keith Whitwell
b0475a4b0d llvmpipe: fix crash on init 2009-10-09 13:55:04 +01:00
Keith Whitwell
1928c965b1 llvmpipe: fix a couple of warnings 2009-10-09 13:53:14 +01:00
José Fonseca
c0e3e35b03 llvmpipe: Add stub lp_setup_is_texture_referenced. 2009-10-09 13:44:24 +01:00
José Fonseca
d904ed88c1 llvmpipe: Pass state to setup. 2009-10-09 13:41:33 +01:00
José Fonseca
00ffef383c util: Force ESI register for cpuid's ebx result.
Fixes a segfault and better code. Unfortunately using an arbitrary
register ("=r") causes the gcc to abort when the code is optimized saying
it can't satisfy the constraint. Setting seems to do the trick.
2009-10-09 13:25:16 +01:00
José Fonseca
c4d54b62f5 llvmpipe: Eliminate constant mapping/unmapping. 2009-10-09 13:25:15 +01:00
Keith Whitwell
c1013f5d40 llvmpipe: remove dead code 2009-10-09 12:26:49 +01:00
Keith Whitwell
e215f94f15 llvmpipe: get lp_setup_tri building 2009-10-09 12:19:49 +01:00
Keith Whitwell
4cdd10cb4b llvmpipe: use union lp_cmd_rast_arg directly, rather than through a pointer
The union itself consists of pointers.  We don't need to be passing
pointer to pointers.
2009-10-09 11:29:01 +01:00
Keith Whitwell
415b271b51 llvmpipe: hook up some state, add stub line and point functions 2009-10-09 10:44:07 +01:00
José Fonseca
47510040a6 llvmpipe: Follow write_color/write_zstencil. 2009-10-09 10:37:24 +01:00
Keith Whitwell
84ab7dcf48 llvmpipe: calculate overall width and height, pass to rasterizer 2009-10-09 10:24:19 +01:00
Keith Whitwell
de902d3275 llvmpipe: more wip on coefficients 2009-10-09 10:23:53 +01:00
Keith Whitwell
253dfed939 llvmpipe: get lp_setup compiling 2009-10-08 23:08:41 +01:00
Keith Whitwell
1814395b7e llvmpipe: triangle struct owns its copy of shader inputs 2009-10-08 22:46:21 +01:00
Keith Whitwell
0718c77005 llvmpipe: work on clears and coefficients 2009-10-08 19:58:54 +01:00
José Fonseca
21489d2275 llvmpipe: Remove quad headers. 2009-10-08 19:56:01 +01:00
José Fonseca
df8cedf989 llvmpipe: Adjust interpolation coeffs declaration. 2009-10-08 19:53:56 +01:00
José Fonseca
7ef36171d5 llvmpipe: Call lp_rast_shade_quads from tri rasterizer. 2009-10-08 19:53:14 +01:00
José Fonseca
07ee87e664 llvmpipe: Fix typo. 2009-10-08 19:18:52 +01:00
Keith Whitwell
c7227f4b8d llvmpipe: rast_tri updates 2009-10-08 19:17:44 +01:00
José Fonseca
86dba3e414 llvmpipe: Final adjustments to rasterizer methods. 2009-10-08 19:16:47 +01:00
José Fonseca
f92787679d llvmpipe: More assorted build fixes. 2009-10-08 19:03:35 +01:00
José Fonseca
ab76b2a8b8 llvmpipe: Complete more rasterizer methods.. 2009-10-08 19:03:14 +01:00
José Fonseca
35a90e67eb llvmpipe: Assorted build fixes. 2009-10-08 17:59:57 +01:00
José Fonseca
37b86aa55c llvmpipe: Implement some of the rasterizer functions. 2009-10-08 17:59:44 +01:00
Keith Whitwell
1caa26202c llvmpipe: start cleaning up 2009-10-08 17:53:12 +01:00
Keith Whitwell
d0c918b87a llvmpipe: remove some old sampler support structs 2009-10-08 17:53:12 +01:00
José Fonseca
921584181e llvmpipe: Fix up lp_rast_shade_quads. 2009-10-08 17:26:13 +01:00
José Fonseca
5974b80380 llvmpipe: Remove dead files from SConscript. 2009-10-08 17:06:49 +01:00
José Fonseca
ce7ac8e743 llvmpipe: Update lp_setup_clear invocation. 2009-10-08 17:06:32 +01:00
José Fonseca
ee3383bc5a llvmpipe: Update more copyright headers. 2009-10-08 17:06:03 +01:00
Keith Whitwell
6b65685def llvmpipe: remove tex tile cache and related code 2009-10-08 16:33:12 +01:00
Keith Whitwell
d2e2b75633 llvmpipe: rewrite llvmpipe_clear() 2009-10-08 16:32:03 +01:00
Keith Whitwell
931210424b llvmpipe: wip me harder 2009-10-08 15:46:29 +01:00
José Fonseca
d614ced756 llvmpipe: Update includes and copyright headers. 2009-10-08 12:51:46 +01:00
José Fonseca
46df37ebfa llvmpipe: Update SConscript. 2009-10-08 12:44:52 +01:00
José Fonseca
a6676d896e llvmpipe: Add the rast -> jit shader glue.
Ugly code. Will eventually be reduced to a very thin inlined function.
2009-10-08 12:44:30 +01:00
Keith Whitwell
5e13dfe618 llvmpipe: whip out the intra-tile code from lp_setup_tri.c
The "setup" module handles building per-tile display lists.
Intra-tile rendering is handled by lp_rast*.c
2009-10-08 12:15:12 +01:00
Keith Whitwell
e529170c11 llvmpipe: more wipping 2009-10-08 11:49:49 +01:00
Keith Whitwell
89498d0153 llvmpipe: import experimental softpipe rasterizer code, wip binning code
WIP, does't build or run.

Rasterizer code is based on Nick Capen's devmaster posts and the
larrabee articles, but currently doesn't share either the performance
or correctness of either...
2009-10-08 08:32:43 +01:00
Michal Krol
c4bd6ccde8 glsl/pp: Expand macro actual arguments before pasting into its body. 2009-09-28 11:30:15 +02:00
Michal Krol
92e33569f3 glsl/pp: Add forward decls to silence gcc warnings. 2009-09-24 10:57:55 +02:00
Michal Krol
69fec23251 glsl/pp: Avoid using `__VERSION__' as an identifier. 2009-09-24 10:57:32 +02:00
Michal Krol
7a95a3c7c4 glsl/pp: Include missing headers. 2009-09-24 10:56:46 +02:00
Michal Krol
e1eed56702 glsl/pp: Allow builds on all platforms. 2009-09-24 10:56:01 +02:00
Michal Krol
e8e3fe15e1 glsl/apps: Include missing header, properly escape format strings. 2009-09-24 10:55:37 +02:00
Michal Krol
db097a9a3f glsl/apps: Allow builds on all platforms. 2009-09-24 10:54:56 +02:00
Michal Krol
a58360dbc2 glsl/pp: Use struct instead of union. 2009-09-24 09:04:15 +02:00
Michal Krol
13f9a39cea glsl/apps: Fix apps after pp interface changes. 2009-09-24 08:43:54 +02:00
Michal Krol
9a1447d449 glsl/pp: Store both line number and file index in a single token. 2009-09-24 08:43:05 +02:00
Michal Krol
8212e4d9fa grammar: Include the correct glsl pp header. 2009-09-23 09:40:40 +02:00
Michal Krol
1ed1dc8b41 glsl/pp: Include missing headers. 2009-09-23 09:40:24 +02:00
Michal Krol
2f89e1a5a1 glsl/pp: Add 0' and 1' to dictionary. 2009-09-23 09:37:37 +02:00
Michal Krol
32966991c6 glsl/pp: Check for reserved macro names. 2009-09-23 09:33:12 +02:00
Michal Krol
b1e6514a94 slang: Differentiate between uints and floats. 2009-09-22 12:54:45 +02:00
Michal Krol
cd41395073 grammar: Differentiate between uints and floats. 2009-09-22 12:52:53 +02:00
Michal Krol
125691dda3 glsl/apps: Update after recent pp interface changes. 2009-09-22 12:52:21 +02:00
Michal Krol
0481e85af7 glsl/pp: Differentiate between integer and floating-point number tokens. 2009-09-22 12:51:08 +02:00
Michal Krol
bb32b0908f progs/perf: Fix newlines. 2009-09-18 11:42:30 +02:00
Michal Krol
5f9f30a752 glsl/apps: Use glsl pp public interface. 2009-09-18 11:20:42 +02:00
Michal Krol
8302208b02 slang: Use glsl pp public interface. 2009-09-18 11:19:54 +02:00
Michal Krol
95956bb8cb glsl/pp: Define a public interface for external modules.
Make sl_pp_context struct opaque.
Move all public declarations to sl_pp_public.h.
2009-09-18 11:19:25 +02:00
Michal Krol
2a661c383f Merge commit 'origin/master' into glsl-pp-rework-2
Conflicts:
	src/gallium/winsys/gdi/SConscript
2009-09-17 12:44:24 +02:00
Michal Krol
90daefd1c4 glsl/pp: Add a TODO for FEATURE_es2_glsl. 2009-09-17 12:33:26 +02:00
Michal Krol
4fcda5000e slang/pp: Fix file number parsing. 2009-09-17 12:14:12 +02:00
Michal Krol
ce8f486156 slang/pp: Use a dictionary for the remaining string literals. 2009-09-17 12:12:34 +02:00
Michal Krol
0ddf41d34d glsl/pp: Add remaining error messages. 2009-09-17 11:51:35 +02:00
Michal Krol
69bdd47dba glsl/apps: Always write out error condition. 2009-09-17 10:45:16 +02:00
Michal Krol
cc629940d4 glsl/apps: Always write out error condition. 2009-09-16 22:04:22 +02:00
Michal Krol
a7382628f2 glsl/pp: Validate numbers. 2009-09-16 21:51:12 +02:00
Michal Krol
de0753e4cb glsl/pp: Add more error messages. 2009-09-16 20:40:02 +02:00
Michal Krol
c9de313f1b slang: Propagate error messages from preprocessor. 2009-09-16 20:28:20 +02:00
Michal Krol
d4638f5dce glsl/pp: Add more error messages. 2009-09-16 20:27:59 +02:00
Michal Krol
eeb5202e5d slang: Invoke the preprocessor from withing the slang compiler.
This allows us to validate the shader version number.
2009-09-16 19:24:50 +02:00
Michal Krol
0f302b60fd glsl/pp: Support GL_ARB_draw_buffers and GL_ARB_texture_rectangle. 2009-09-14 13:09:36 +02:00
Michal Krol
cd26ccf6fe grammar: Adapt to pp interface change. 2009-09-14 13:08:16 +02:00
Michal Krol
169aead1b5 glsl/apps: Adapt to pp interface change. 2009-09-14 13:08:07 +02:00
Michal Krol
a67f32289a glsl/pp: Add a dictionary to a context. 2009-09-14 13:07:25 +02:00
Michal Krol
9f273f1098 Merge commit 'origin/master' into glsl-pp-rework-2 2009-09-14 11:22:05 +02:00
Michal Krol
fab99092a0 slang: Correctly handle end of tokens marker. 2009-09-08 13:32:20 +02:00
Michal Krol
2ec2936454 slang: Do not parse whitespace.
The preprocessor tokeniser deals with those.
2009-09-08 13:29:17 +02:00
Michal Krol
58fa89c902 slang: Correctly parse numbers from the new preprocessor. 2009-09-08 12:46:34 +02:00
Michal Krol
b837f6c372 grammar: Fix token stripping. 2009-09-08 10:57:39 +02:00
Michal Krol
d06069f305 slang: Remove the old preprocessor. 2009-09-08 10:46:29 +02:00
Michal Krol
7e6e5cd60a slang: Remove dependencies on error tokens. 2009-09-08 10:33:49 +02:00
Michal Krol
0aeff7638b gdi: Fix prototype of gdi_softpipe_surface_buffer_create(). 2009-09-08 10:23:05 +02:00
Michal Krol
5ddcdc4227 slang: Adapt shader syntax description to grammar parser changes. 2009-09-07 21:30:34 +02:00
Michal Krol
ce9309d245 grammar: Adapt grammar to the glsl preprocessor. 2009-09-07 21:27:42 +02:00
Michal Krol
d26d77295b gdi: Add glsl to LIBS. 2009-09-07 21:23:43 +02:00
Michal Krol
b97a734658 grammar: Remove dead code. 2009-09-07 17:45:26 +02:00
Michal Krol
8bed21ecf9 grammar: Remove grammar_check(). 2009-09-07 10:55:45 +02:00
Michal Krol
5ad8937752 glsl: Add error messages for version parser. 2009-09-07 10:12:12 +02:00
Michal Krol
b7960b3d3a glsl: Handle file tokens in apps/process. 2009-09-07 10:12:11 +02:00
Michal Krol
a64ba93aab glsl: Handle file numbering. 2009-09-07 10:12:10 +02:00
Michal Krol
2d2d638444 glsl: Actually respect the hash-line directive. 2009-09-07 10:12:09 +02:00
Michal Krol
b6df77fb9a glsl: Handle line tokens in apps/process. 2009-09-07 10:12:08 +02:00
Michal Krol
4aa3222df3 glsl: Correctly handle line numbering. 2009-09-07 10:12:07 +02:00
Michal Krol
0d9c5eafeb glsl: Preserve newline inside comment blocks. 2009-09-07 10:12:06 +02:00
Michal Krol
e8afc65589 glsl: Implement predefinded macros.
The values are hardcoded: __LINE__ = 1, __FILE__ = 0 and __VERSION__ = 110.
2009-09-07 10:12:05 +02:00
Michal Krol
bb8f38ea6f glsl: Implement `line' preprocessor directive. 2009-09-07 10:12:03 +02:00
Michal Krol
ddd8ae7fbc glsl: Output endof token after processing a directive.
Some directives may output tokens as a result of their operation.
2009-09-07 10:12:03 +02:00
Michal Krol
7f187583c1 glsl: Handle extension tokens in apps/proces. 2009-09-07 10:12:02 +02:00
Michal Krol
87d2de04fb glsl: Implement `extension' preprocessor directive.
No extensions supported.
2009-09-07 10:12:00 +02:00
Michal Krol
94321b4441 glsl: Handle pragma tokens in apps/process. 2009-09-07 10:11:59 +02:00
Michal Krol
0e046420e4 glsl: Implement `pragma' preprocessor directive.
Handle `optimize(on|off)' and `debug(on|off)' pragmas.
2009-09-07 10:11:58 +02:00
Michal Krol
c42428c787 glsl: Print out error message in apps/process. 2009-09-07 10:11:56 +02:00
Michal Krol
f9bd6f7152 glsl: Implement `error' preprocessor directive. 2009-09-07 10:11:55 +02:00
Michal Krol
3dc2b5f71c glsl: Implement `undef' preprocessor directive. 2009-09-07 10:11:54 +02:00
Michal Krol
a294715612 glsl: Allow for preprocessor macro redefinition. 2009-09-07 10:11:52 +02:00
Michal Krol
153b179862 glsl: Handle `defined' preprocessor operator. 2009-09-07 10:11:51 +02:00
Michal Krol
3b027bca9d glsl: Support if preprocessor directive and friends. 2009-09-07 10:11:50 +02:00
Michal Krol
3bb446ba6e glsl: Add expression interpreter. 2009-09-07 10:11:49 +02:00
Michal Krol
2dad8ed9d6 glsl: Centralise sl_pp_macro constructor. 2009-09-07 10:11:48 +02:00
Michal Krol
6a11d4150c glsl: Implement macro expansion. 2009-09-07 10:11:47 +02:00
Michal Krol
5e8e3cddae glsl: Rename sl_pp_context_add_str to sl_pp_context_add_unique_str.
Return the same offset for same strings. Allows to compare strings
by comparing their's offsets.
2009-09-07 10:11:46 +02:00
Michal Krol
fd991d845a glsl: Parse define directive in preprocessor. 2009-09-07 10:11:45 +02:00
Michal Krol
3ce5e66818 glsl: Simplify directive parser skeleton. 2009-09-07 10:11:44 +02:00
Michal Krol
f24322fbf6 glsl: Introduce sl_pp_context and maintain a reuseable pool of strings. 2009-09-07 10:11:43 +02:00
Michal Krol
f24ec185c5 glsl: Add `process' test app that returns tokenised and preprocessed text. 2009-09-07 10:11:42 +02:00
Michal Krol
9d336c5264 glsl: Add preprocessor skeleton for directive parsing. 2009-09-07 10:11:40 +02:00
Michal Krol
5d26deef98 glsl: Remove bogus sl_pp_directive.h include. 2009-09-07 10:11:39 +02:00
Michal Krol
b4e92367f3 glsl: Allow for multiple version statements. 2009-09-07 10:11:38 +02:00
Michal Krol
55f75c13f0 glsl/apps: Print out the number of tokens eaten in version test. 2009-09-07 10:11:38 +02:00
Michal Krol
474f754282 glsl: Raise an error on an unfinished comment block. 2009-09-07 10:11:37 +02:00
Michal Krol
af617c6037 glsl/apps: Add version test app. 2009-09-07 10:11:36 +02:00
Michal Krol
229e72956c glsl: Parse optional version directive. 2009-09-07 10:11:33 +02:00
Michal Krol
0d5ef796f8 glsl: Add a tokenise app. 2009-09-07 10:11:32 +02:00
Michal Krol
2c9a627b48 glsl: Add a preprocessor tokeniser. 2009-09-07 10:11:31 +02:00
Michal Krol
121769eeb3 glsl: Add a purify command-line tool. 2009-09-07 10:11:30 +02:00
Michal Krol
0bbf59c305 glsl: Add preprocessor purifier. 2009-09-07 10:11:29 +02:00
2771 changed files with 181706 additions and 243181 deletions

1
.gitignore vendored
View File

@@ -4,6 +4,7 @@
*.ilk
*.o
*.obj
*.os
*.pc
*.pdb
*.pyc

115
Makefile
View File

@@ -48,7 +48,7 @@ install:
done
.PHONY: default doxygen clean realclean distclean install linux-directfb-install
.PHONY: default doxygen clean realclean distclean install
# If there's no current configuration file
$(TOP)/configs/current:
@@ -80,8 +80,6 @@ catamount-osmesa-pgi \
darwin \
darwin-fat-32bit \
darwin-fat-all \
darwin-static \
darwin-static-x86ppc \
freebsd \
freebsd-dri \
freebsd-dri-amd64 \
@@ -105,12 +103,12 @@ irix6-n32-static \
irix6-o32 \
irix6-o32-static \
linux \
linux-i965 \
linux-alpha \
linux-alpha-static \
linux-cell \
linux-cell-debug \
linux-debug \
linux-directfb \
linux-dri \
linux-dri-debug \
linux-dri-x86 \
@@ -120,12 +118,13 @@ linux-dri-xcb \
linux-egl \
linux-indirect \
linux-fbdev \
linux-glide \
linux-ia64-icc \
linux-ia64-icc-static \
linux-icc \
linux-icc-static \
linux-llvm \
linux-llvm-debug \
linux-opengl-es \
linux-osmesa \
linux-osmesa-static \
linux-osmesa16 \
@@ -134,9 +133,6 @@ linux-osmesa32 \
linux-ppc \
linux-ppc-static \
linux-profile \
linux-solo \
linux-solo-x86 \
linux-solo-ia64 \
linux-sparc \
linux-sparc5 \
linux-static \
@@ -149,7 +145,6 @@ linux-x86-64 \
linux-x86-64-debug \
linux-x86-64-profile \
linux-x86-64-static \
linux-x86-glide \
linux-x86-profile \
linux-x86-static \
netbsd \
@@ -172,17 +167,20 @@ sunos5-v9 \
sunos5-v9-static \
sunos5-v9-cc-g++ \
ultrix-gcc:
@ if test -f configs/current || test -L configs/current ; then \
echo "Please run 'make realclean' before changing configs" ; \
exit 1 ; \
@ if test -f configs/current -o -L configs/current; then \
if ! cmp configs/$@ configs/current > /dev/null; then \
echo "Please run 'make realclean' before changing configs" ; \
exit 1 ; \
fi ; \
else \
cd configs && rm -f current && ln -s $@ current ; \
fi
(cd configs && rm -f current && ln -s $@ current)
$(MAKE) default
# Rules for making release tarballs
VERSION=7.7.1-devel
VERSION=7.8.1
DIRECTORY = Mesa-$(VERSION)
LIB_NAME = MesaLib-$(VERSION)
DEMO_NAME = MesaDemos-$(VERSION)
@@ -207,8 +205,6 @@ MAIN_FILES = \
$(DIRECTORY)/docs/RELNOTES* \
$(DIRECTORY)/docs/*.spec \
$(DIRECTORY)/include/GL/internal/glcore.h \
$(DIRECTORY)/include/GL/dmesa.h \
$(DIRECTORY)/include/GL/ggimesa.h \
$(DIRECTORY)/include/GL/gl.h \
$(DIRECTORY)/include/GL/glext.h \
$(DIRECTORY)/include/GL/gl_mangle.h \
@@ -221,10 +217,16 @@ MAIN_FILES = \
$(DIRECTORY)/include/GL/mesa_wgl.h \
$(DIRECTORY)/include/GL/mglmesa.h \
$(DIRECTORY)/include/GL/osmesa.h \
$(DIRECTORY)/include/GL/svgamesa.h \
$(DIRECTORY)/include/GL/vms_x_fix.h \
$(DIRECTORY)/include/GL/wglext.h \
$(DIRECTORY)/include/GL/wmesa.h \
$(DIRECTORY)/include/VG/*.h \
$(DIRECTORY)/include/KHR/*.h \
$(DIRECTORY)/src/glsl/Makefile \
$(DIRECTORY)/src/glsl/Makefile.template \
$(DIRECTORY)/src/glsl/SConscript \
$(DIRECTORY)/src/glsl/*/Makefile \
$(DIRECTORY)/src/glsl/*/*.[ch] \
$(DIRECTORY)/src/Makefile \
$(DIRECTORY)/src/mesa/Makefile* \
$(DIRECTORY)/src/mesa/sources.mak \
@@ -240,12 +242,9 @@ MAIN_FILES = \
$(DIRECTORY)/src/mesa/shader/*.[chly] \
$(DIRECTORY)/src/mesa/shader/Makefile \
$(DIRECTORY)/src/mesa/shader/descrip.mms \
$(DIRECTORY)/src/mesa/shader/grammar/*.[ch] \
$(DIRECTORY)/src/mesa/shader/slang/*.[ch] \
$(DIRECTORY)/src/mesa/shader/slang/descrip.mms \
$(DIRECTORY)/src/mesa/shader/slang/library/*.[ch] \
$(DIRECTORY)/src/mesa/shader/slang/library/*.gc \
$(DIRECTORY)/src/mesa/shader/slang/library/*.syn \
$(DIRECTORY)/src/mesa/shader/slang/library/Makefile \
$(DIRECTORY)/src/mesa/swrast/*.[ch] \
$(DIRECTORY)/src/mesa/swrast/descrip.mms \
@@ -263,25 +262,13 @@ 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/directfb/*.[ch] \
$(DIRECTORY)/src/mesa/drivers/directfb/Makefile \
$(DIRECTORY)/src/mesa/drivers/dos/*.[chS] \
$(DIRECTORY)/src/mesa/drivers/fbdev/Makefile \
$(DIRECTORY)/src/mesa/drivers/fbdev/glfbdev.c \
$(DIRECTORY)/src/mesa/drivers/glide/*.[ch] \
$(DIRECTORY)/src/mesa/drivers/ggi/*.[ch] \
$(DIRECTORY)/src/mesa/drivers/ggi/ggimesa.conf.in \
$(DIRECTORY)/src/mesa/drivers/ggi/default/*.c \
$(DIRECTORY)/src/mesa/drivers/ggi/default/genkgi.conf.in \
$(DIRECTORY)/src/mesa/drivers/ggi/display/*.c \
$(DIRECTORY)/src/mesa/drivers/ggi/display/fbdev.conf.in \
$(DIRECTORY)/src/mesa/drivers/ggi/include/ggi/mesa/*.h \
$(DIRECTORY)/src/mesa/drivers/osmesa/Makefile \
$(DIRECTORY)/src/mesa/drivers/osmesa/Makefile.win \
$(DIRECTORY)/src/mesa/drivers/osmesa/descrip.mms \
$(DIRECTORY)/src/mesa/drivers/osmesa/osmesa.def \
$(DIRECTORY)/src/mesa/drivers/osmesa/*.[ch] \
$(DIRECTORY)/src/mesa/drivers/svga/*.[ch] \
$(DIRECTORY)/src/mesa/drivers/windows/*/*.[ch] \
$(DIRECTORY)/src/mesa/drivers/windows/*/*.def \
$(DIRECTORY)/src/mesa/drivers/x11/Makefile \
@@ -303,12 +290,28 @@ MAIN_FILES = \
$(DIRECTORY)/progs/util/sampleMakefile \
$(DIRECTORY)/windows/VC8/
EGL_FILES = \
$(DIRECTORY)/include/EGL/*.h \
ES_FILES = \
$(DIRECTORY)/include/GLES/*.h \
$(DIRECTORY)/include/GLES2/*.h \
$(DIRECTORY)/src/mesa/glapi/gen/*.xml \
$(DIRECTORY)/src/mesa/glapi/gen/*.py \
$(DIRECTORY)/src/mesa/glapi/gen/*.dtd \
$(DIRECTORY)/src/mesa/es/glapi/Makefile \
$(DIRECTORY)/src/mesa/es/glapi/*.xml \
$(DIRECTORY)/src/mesa/es/glapi/*.py \
$(DIRECTORY)/src/mesa/es/state_tracker/*.[ch] \
$(DIRECTORY)/src/mesa/es/main/*.[ch] \
$(DIRECTORY)/src/mesa/es/main/*.xml \
$(DIRECTORY)/src/mesa/es/main/*.py \
$(DIRECTORY)/src/mesa/es/main/*.dtd \
$(DIRECTORY)/src/mesa/es/Makefile \
$(DIRECTORY)/src/mesa/es/sources.mak \
EGL_FILES = \
$(DIRECTORY)/include/EGL/*.h \
$(DIRECTORY)/src/egl/Makefile \
$(DIRECTORY)/src/egl/*/Makefile \
$(DIRECTORY)/src/egl/*/Makefile.template \
$(DIRECTORY)/src/egl/*/*.[ch] \
$(DIRECTORY)/src/egl/*/*/Makefile \
$(DIRECTORY)/src/egl/*/*/*.[ch] \
@@ -321,6 +324,7 @@ GALLIUM_FILES = \
$(DIRECTORY)/src/gallium/*/Makefile \
$(DIRECTORY)/src/gallium/*/SConscript \
$(DIRECTORY)/src/gallium/*/*/Makefile \
$(DIRECTORY)/src/gallium/*/*/Makefile.egl \
$(DIRECTORY)/src/gallium/*/*/Makefile.template \
$(DIRECTORY)/src/gallium/*/*/SConscript \
$(DIRECTORY)/src/gallium/*/*/*.[ch] \
@@ -339,8 +343,8 @@ DRI_FILES = \
$(DIRECTORY)/include/GL/internal/glcore.h \
$(DIRECTORY)/include/GL/internal/sarea.h \
$(DIRECTORY)/src/glx/Makefile \
$(DIRECTORY)/src/glx/x11/Makefile \
$(DIRECTORY)/src/glx/x11/*.[ch] \
$(DIRECTORY)/src/glx/Makefile \
$(DIRECTORY)/src/glx/*.[ch] \
$(DIRECTORY)/src/mesa/drivers/dri/Makefile \
$(DIRECTORY)/src/mesa/drivers/dri/Makefile.template \
$(DIRECTORY)/src/mesa/drivers/dri/dri.pc.in \
@@ -376,15 +380,6 @@ SGI_GLU_FILES = \
$(DIRECTORY)/src/glu/sgi/libtess/*.[ch] \
$(DIRECTORY)/src/glu/sgi/libutil/*.[ch]
MESA_GLU_FILES = \
$(DIRECTORY)/src/glu/mesa/README[12] \
$(DIRECTORY)/src/glu/mesa/Makefile* \
$(DIRECTORY)/src/glu/mesa/descrip.mms \
$(DIRECTORY)/src/glu/mesa/mms_depend \
$(DIRECTORY)/src/glu/mesa/*.def \
$(DIRECTORY)/src/glu/mesa/depend \
$(DIRECTORY)/src/glu/mesa/*.[ch]
GLW_FILES = \
$(DIRECTORY)/src/glw/*.[ch] \
$(DIRECTORY)/src/glw/Makefile* \
@@ -413,6 +408,14 @@ DEMO_FILES = \
$(DIRECTORY)/progs/demos/*.cxx \
$(DIRECTORY)/progs/demos/*.dat \
$(DIRECTORY)/progs/demos/README \
$(DIRECTORY)/progs/egl/Makefile \
$(DIRECTORY)/progs/egl/*.[ch] \
$(DIRECTORY)/progs/es1/*/Makefile \
$(DIRECTORY)/progs/es1/*/*.[ch] \
$(DIRECTORY)/progs/es2/*/Makefile \
$(DIRECTORY)/progs/es2/*/*.[ch] \
$(DIRECTORY)/progs/openvg/*/Makefile \
$(DIRECTORY)/progs/openvg/*/*.[ch] \
$(DIRECTORY)/progs/fbdev/Makefile \
$(DIRECTORY)/progs/fbdev/glfbdevtest.c \
$(DIRECTORY)/progs/objviewer/*.[ch] \
@@ -435,11 +438,7 @@ DEMO_FILES = \
$(DIRECTORY)/progs/glsl/*.c \
$(DIRECTORY)/progs/glsl/*.frag \
$(DIRECTORY)/progs/glsl/*.vert \
$(DIRECTORY)/progs/glsl/*.shtest \
$(DIRECTORY)/progs/windml/Makefile.ugl \
$(DIRECTORY)/progs/windml/*.c \
$(DIRECTORY)/progs/windml/*.bmp \
$(DIRECTORY)/progs/ggi/*.c
$(DIRECTORY)/progs/glsl/*.shtest
GLUT_FILES = \
$(DIRECTORY)/include/GL/glut.h \
@@ -451,22 +450,11 @@ GLUT_FILES = \
$(DIRECTORY)/src/glut/glx/*.[ch] \
$(DIRECTORY)/src/glut/beos/*.[ch] \
$(DIRECTORY)/src/glut/beos/*.cpp \
$(DIRECTORY)/src/glut/beos/Makefile \
$(DIRECTORY)/src/glut/dos/*.[ch] \
$(DIRECTORY)/src/glut/dos/PC_HW/*.[chS] \
$(DIRECTORY)/src/glut/ggi/*.[ch] \
$(DIRECTORY)/src/glut/ggi/Makefile \
$(DIRECTORY)/src/glut/fbdev/Makefile \
$(DIRECTORY)/src/glut/fbdev/*[ch] \
$(DIRECTORY)/src/glut/mini/*[ch] \
$(DIRECTORY)/src/glut/mini/glut.pc.in \
$(DIRECTORY)/src/glut/directfb/Makefile \
$(DIRECTORY)/src/glut/directfb/NOTES \
$(DIRECTORY)/src/glut/directfb/*[ch]
$(DIRECTORY)/src/glut/beos/Makefile
DEPEND_FILES = \
$(TOP)/src/mesa/depend \
$(TOP)/src/glx/x11/depend \
$(TOP)/src/glx/depend \
$(TOP)/src/glw/depend \
$(TOP)/src/glut/glx/depend \
$(TOP)/src/glu/sgi/depend
@@ -474,6 +462,7 @@ DEPEND_FILES = \
LIB_FILES = \
$(MAIN_FILES) \
$(ES_FILES) \
$(EGL_FILES) \
$(GALLIUM_FILES) \
$(DRI_FILES) \

View File

@@ -23,6 +23,7 @@
import os
import os.path
import sys
import SCons.Util
import common
@@ -32,11 +33,14 @@ import common
default_statetrackers = 'mesa'
if common.default_platform in ('linux', 'freebsd', 'darwin'):
default_drivers = 'softpipe,failover,svga,i915,trace,identity,llvmpipe'
default_drivers = 'softpipe,failover,svga,i915,i965,trace,identity,llvmpipe'
default_winsys = 'xlib'
elif common.default_platform in ('winddk',):
default_drivers = 'softpipe,svga,i915,trace,identity'
default_drivers = 'softpipe,svga,i915,i965,trace,identity'
default_winsys = 'all'
elif common.default_platform in ('embedded',):
default_drivers = 'softpipe,llvmpipe'
default_winsys = 'xlib'
else:
default_drivers = 'all'
default_winsys = 'all'
@@ -46,9 +50,9 @@ common.AddOptions(opts)
opts.Add(ListVariable('statetrackers', 'state trackers to build', default_statetrackers,
['mesa', 'python', 'xorg']))
opts.Add(ListVariable('drivers', 'pipe drivers to build', default_drivers,
['softpipe', 'failover', 'svga', 'i915', 'cell', 'trace', 'r300', 'identity', 'llvmpipe']))
['softpipe', 'failover', 'svga', 'i915', 'i965', 'trace', 'r300', 'identity', 'llvmpipe']))
opts.Add(ListVariable('winsys', 'winsys drivers to build', default_winsys,
['xlib', 'vmware', 'intel', 'gdi', 'radeon']))
['xlib', 'vmware', 'intel', 'i965', 'gdi', 'radeon']))
opts.Add(EnumVariable('MSVS_VERSION', 'MS Visual C++ version', None, allowed_values=('7.1', '8.0', '9.0')))
@@ -59,19 +63,36 @@ env = Environment(
ENV = os.environ,
)
if os.environ.has_key('CC'):
env['CC'] = os.environ['CC']
if os.environ.has_key('CFLAGS'):
env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CFLAGS'])
if os.environ.has_key('CXX'):
env['CXX'] = os.environ['CXX']
if os.environ.has_key('CXXFLAGS'):
env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS'])
if os.environ.has_key('LDFLAGS'):
env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])
Help(opts.GenerateHelpText(env))
# replicate options values in local variables
debug = env['debug']
dri = env['dri']
llvm = env['llvm']
machine = env['machine']
platform = env['platform']
drawllvm = 'llvmpipe' in env['drivers']
# LLVM support in the Draw module
if drawllvm:
env.Tool('llvm')
if not env.has_key('LLVM_VERSION'):
drawllvm = False
# derived options
x86 = machine == 'x86'
ppc = machine == 'ppc'
gcc = platform in ('linux', 'freebsd', 'darwin')
gcc = platform in ('linux', 'freebsd', 'darwin', 'embedded')
msvc = platform in ('windows', 'winddk')
Export([
@@ -79,7 +100,7 @@ Export([
'x86',
'ppc',
'dri',
'llvm',
'drawllvm',
'platform',
'gcc',
'msvc',
@@ -89,6 +110,10 @@ Export([
#######################################################################
# Environment setup
# Always build trace driver
if 'trace' not in env['drivers']:
env['drivers'].append('trace')
# Includes
env.Append(CPPPATH = [
'#/include',
@@ -97,6 +122,25 @@ env.Append(CPPPATH = [
'#/src/gallium/drivers',
])
if env['msvc']:
env.Append(CPPPATH = ['#include/c99'])
# Embedded
if platform == 'embedded':
env.Append(CPPDEFINES = [
'_POSIX_SOURCE',
('_POSIX_C_SOURCE', '199309L'),
'_SVID_SOURCE',
'_BSD_SOURCE',
'_GNU_SOURCE',
'PTHREADS',
])
env.Append(LIBS = [
'm',
'pthread',
'dl',
])
# Posix
if platform in ('posix', 'linux', 'freebsd', 'darwin'):
@@ -110,6 +154,8 @@ if platform in ('posix', 'linux', 'freebsd', 'darwin'):
'PTHREADS',
'HAVE_POSIX_MEMALIGN',
])
if platform == 'darwin':
env.Append(CPPDEFINES = ['_DARWIN_C_SOURCE'])
env.Append(CPPPATH = ['/usr/X11R6/include'])
env.Append(LIBPATH = ['/usr/X11R6/lib'])
env.Append(LIBS = [
@@ -119,7 +165,6 @@ if platform in ('posix', 'linux', 'freebsd', 'darwin'):
'dl',
])
# DRI
if dri:
env.ParseConfig('pkg-config --cflags --libs libdrm')
@@ -130,13 +175,9 @@ if dri:
'GLX_INDIRECT_RENDERING',
])
# LLVM
if llvm:
# See also http://www.scons.org/wiki/UsingPkgConfig
env.ParseConfig('llvm-config --cflags --ldflags --libs backend bitreader engine instrumentation interpreter ipo')
env.Append(CPPDEFINES = ['MESA_LLVM'])
# Force C++ linkage
env['LINK'] = env['CXX']
# LLVM support in the Draw module
if drawllvm:
env.Append(CPPDEFINES = ['DRAW_LLVM'])
# libGL
if platform in ('linux', 'freebsd', 'darwin'):
@@ -160,8 +201,38 @@ Export('env')
# TODO: Build several variants at the same time?
# http://www.scons.org/wiki/SimultaneousVariantBuilds
if env['platform'] != common.default_platform:
# GLSL code has to be built twice -- one for the host OS, another for the target OS...
host_env = Environment(
# options are ignored
# default tool is used
tools = ['default', 'custom'],
toolpath = ['#scons'],
ENV = os.environ,
)
host_env['platform'] = common.default_platform
host_env['machine'] = common.default_machine
host_env['debug'] = env['debug']
SConscript(
'src/glsl/SConscript',
variant_dir = os.path.join(env['build'], 'host'),
duplicate = 0, # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
exports={'env':host_env},
)
SConscript(
'src/SConscript',
variant_dir = env['build'],
duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
)
env.Default('src')
SConscript(
'progs/SConscript',
variant_dir = os.path.join('progs', env['build']),
duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
)

258
bin/mklib
View File

@@ -25,6 +25,109 @@
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Clear CDPATH as the 'cd' command will echo stuff
# to stdout if it is set
unset CDPATH
# Given a list of files, look for .a archives and unpack them.
# Return the original list of files minus the .a files plus the unpacked files.
# first param: name of a temp directory (to be deleted when finished)
# remaining params: list of .o and .a files
expand_archives() {
DIR=$1
shift
FILES=$@
NEWFILES=""
ORIG_DIR=`pwd`
mkdir -p "$DIR"
cd "$DIR"
for FILE in $FILES ; do
case $FILE in
*.a)
# extract the .o files from this .a archive
case $FILE in
/*) ;;
*) FILE="$ORIG_DIR/$FILE" ;;
esac
MEMBERS=`ar t $FILE`
ar x $FILE
for MEMBER in $MEMBERS ; do
NEWFILES="$NEWFILES $DIR/$MEMBER"
done
;;
*)
# other file type, just add to list
NEWFILES="$NEWFILES $FILE"
;;
esac
done
cd "$ORIG_DIR"
echo $NEWFILES
}
# Make static library with 'ar'
# params:
# options to ar
# 1 or 0 to indicate if ranlib should be run
# libname to make
# list of object files
# Return name of library we made
# Example: "make_ar_static_lib -ru 1 libfoo.a foo.o bar.o"
make_ar_static_lib() {
OPTS=$1
shift;
RANLIB=$1
shift;
LIBNAME=$1
shift;
OBJECTS=$@
# remove existing lib, if present
rm -f ${LIBNAME}
# make static lib
ar ${OPTS} ${LIBNAME} ${OBJECTS}
# run ranlib
if [ ${RANLIB} = 1 ] ; then
ranlib ${LIBNAME}
fi
echo ${LIBNAME}
}
# Print usage info.
usage() {
echo 'Usage: mklib [options] objects'
echo 'Create a shared library from object files.'
echo ' -o LIBRARY specifies the name of the resulting library, without'
echo ' the leading "lib" or any suffix.'
echo ' (eg: "-o GL" might result in "libGL.so" being made)'
echo ' -major N specifies major version number (default is 1)'
echo ' -minor N specifies minor version number (default is 0)'
echo ' -patch N specifies patch version number (default is 0)'
echo ' -lLIBRARY specifies a dependency on LIBRARY'
echo ' -LDIR search in DIR for library dependencies at build time'
echo ' -RDIR search in DIR for library dependencies at run time'
echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)'
echo ' Not observed on all systems at this time.'
echo ' -ldflags OPT specify any additional linker flags in OPT'
echo ' -cplusplus link with C++ runtime'
echo ' -static make a static library (default is dynamic/shared)'
echo ' -dlopen make a shared library suitable for dynamic loading'
echo ' -install DIR put resulting library file(s) in DIR'
echo ' -arch ARCH override using `uname` to determine host system'
echo ' -archopt OPT specify an extra achitecture-specific option OPT'
echo ' -altopts OPTS alternate options to override all others'
echo " -noprefix don't prefix library name with 'lib' nor add any suffix"
echo ' -exports FILE only export the symbols listed in FILE'
echo ' -id NAME Sets the id of the dylib (Darwin)'
echo ' -h, --help display this information and exit'
}
#
# Option defaults
#
@@ -52,31 +155,7 @@ while true
do
case $1 in
'-h' | '--help')
echo 'Usage: mklib [options] objects'
echo 'Create a shared library from object files.'
echo ' -o LIBRARY specifies the name of the resulting library, without'
echo ' the leading "lib" or any suffix.'
echo ' (eg: "-o GL" might result in "libGL.so" being made)'
echo ' -major N specifies major version number (default is 1)'
echo ' -minor N specifies minor version number (default is 0)'
echo ' -patch N specifies patch version number (default is 0)'
echo ' -lLIBRARY specifies a dependency on LIBRARY'
echo ' -LDIR search in DIR for library dependencies at build time'
echo ' -RDIR search in DIR for library dependencies at run time'
echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)'
echo ' Not observed on all systems at this time.'
echo ' -ldflags OPT specify any additional linker flags in OPT'
echo ' -cplusplus link with C++ runtime'
echo ' -static make a static library (default is dynamic/shared)'
echo ' -dlopen make a shared library suitable for dynamic loading'
echo ' -install DIR put resulting library file(s) in DIR'
echo ' -arch ARCH override using `uname` to determine host system'
echo ' -archopt OPT specify an extra achitecture-specific option OPT'
echo ' -altopts OPTS alternate options to override all others'
echo " -noprefix don't prefix library name with 'lib' nor add any suffix"
echo ' -exports FILE only export the symbols listed in FILE'
echo ' -id NAME Sets the id of the dylib (Darwin)'
echo ' -h, --help display this information and exit'
usage
exit 1
;;
'-o')
@@ -197,11 +276,11 @@ fi
# Error checking
#
if [ "x${LIBNAME}" = "x" ] ; then
echo "mklib: Error: no library name specified"
echo "mklib: Error: no library name specified (-h for help)"
exit 1
fi
if [ "x${OBJECTS}" = "x" ] ; then
echo "mklib: Error: no object files specified"
echo "mklib: Error: no object files specified (-h for help)"
exit 1
fi
@@ -269,45 +348,24 @@ case $ARCH in
# finish up
FINAL_LIBS="${LIBNAME}"
elif [ $STATIC = 1 ] ; then
# make a static .a library
LIBNAME="lib${LIBNAME}.a" # prefix with "lib", suffix with ".a"
echo "mklib: Making" $ARCH "static library: " ${LIBNAME}
LINK="ar"
OPTS="-ru"
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
rm -f ${LIBNAME}
# expand any .a objects into constituent .o files.
NEWOBJECTS=""
DELETIA=""
for OBJ in $OBJECTS ; do
case $OBJ in
*.a)
# extract the .o files from this .a archive
FILES=`ar t $OBJ`
ar x $OBJ
NEWOBJECTS="$NEWOBJECTS $FILES"
# keep track of temporary .o files and delete them below
DELETIA="$DELETIA $FILES"
;;
*)
# ordinary .o file
NEWOBJECTS="$NEWOBJECTS $OBJ"
;;
esac
done
# expand .a into .o files
NEW_OBJECTS=`expand_archives ${LIBNAME}.obj $OBJECTS`
# make lib
${LINK} ${OPTS} ${LIBNAME} ${NEWOBJECTS}
ranlib ${LIBNAME}
# make static lib
FINAL_LIBS=`make_ar_static_lib ${OPTS} 1 ${LIBNAME} ${NEW_OBJECTS}`
# remove temporary extracted .o files
rm -f ${DELETIA}
# finish up
FINAL_LIBS=${LIBNAME}
rm -rf ${LIBNAME}.obj
else
# make dynamic library
LIBNAME="lib${LIBNAME}" # prefix with "lib"
case $ARCH in 'Linux' | 'GNU' | GNU/*)
OPTS="-Xlinker -Bsymbolic -shared -Wl,-soname,${LIBNAME}.so.${MAJOR}"
@@ -368,9 +426,7 @@ case $ARCH in
if [ $STATIC = 1 ] ; then
LIBNAME="lib${LIBNAME}.a"
echo "mklib: Making SunOS static library: " ${LIBNAME}
rm -f ${LIBNAME}
ar -ruv ${LIBNAME} ${OBJECTS}
FINAL_LIBS=${LIBNAME}
FINAL_LIBS=`make_ar_static_lib -ruc 0 ${LIBNAME} ${OBJECTS}`
else
if [ $NOPREFIX = 0 ] ; then
LIBNAME="lib${LIBNAME}.so"
@@ -489,13 +545,19 @@ case $ARCH in
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
FINAL_LIBS=${LIBNAME}
elif [ $STATIC = 1 ] ; then
# make a static .a library
STLIB="lib${LIBNAME}.a"
echo "mklib: Making FreeBSD static library: " ${STLIB}
rm -f ${STLIB}
ar cq ${STLIB} ${OBJECTS}
ranlib ${STLIB}
FINAL_LIBS=${STLIB}
# expand .a into .o files
NEW_OBJECTS=`expand_archives ${STLIB}.obj $OBJECTS`
FINAL_LIBS=`make_ar_static_lib cq 1 ${STLIB} ${NEW_OBJECTS}`
# remove temporary extracted .o files
rm -rf ${STLIB}.obj
else
# make dynamic library
SHLIB="lib${LIBNAME}.so.${MAJOR}"
OPTS="-shared -Wl,-soname,${SHLIB}"
if [ "${ALTOPTS}" ] ; then
@@ -513,10 +575,7 @@ case $ARCH in
if [ $STATIC = 1 ] ; then
LIBNAME="lib${LIBNAME}_pic.a"
echo "mklib: Making NetBSD PIC static library: " ${LIBNAME}
rm -f ${LIBNAME}
ar cq ${LIBNAME} ${OBJECTS}
ranlib ${LIBNAME}
FINAL_LIBS=${LIBNAME}
FINAL_LIBS=`make_ar_static_lib cq 1 ${LIBNAME} ${OBJECTS}`
else
LIBNAME="lib${LIBNAME}.so.${MAJOR}.${MINOR}"
echo "mklib: Making NetBSD PIC shared library: " ${LIBNAME}
@@ -529,9 +588,7 @@ case $ARCH in
'IRIX' | 'IRIX64')
if [ $STATIC = 1 ] ; then
LIBNAME="lib${LIBNAME}.a"
rm -f ${LIBNAME}
ar rc ${LIBNAME} ${OBJECTS}
FINAL_LIBS=${LIBNAME}
FINAL_LIBS=`make_ar_static_lib rc 0 ${LIBNAME} ${OBJECTS}`
else
LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so"
@@ -582,9 +639,7 @@ case $ARCH in
if [ $STATIC = 1 ] ; then
LIBNAME="lib${LIBNAME}.a"
echo "mklib: Making HP-UX static library: " ${LIBNAME}
rm -f ${LIBNAME}
ar -ruv ${LIBNAME} ${OBJECTS}
FINAL_LIBS=${LIBNAME}
FINAL_LIBS=`make_ar_static_lib -ruv 0 ${LIBNAME} ${OBJECTS}`
else
# HP uses a .2 for their current GL/GLU libraries
if [ ${LIBNAME} = "GL" -o ${LIBNAME} = "GLU" ] ; then
@@ -614,8 +669,7 @@ case $ARCH in
if [ $STATIC = 1 ] ; then
LIBNAME="lib${LIBNAME}.a"
echo "mklib: Making AIX static library: " ${LIBNAME}
ar -ruv ${X64} ${LIBNAME} ${OBJECTS}
FINAL_LIBS=${LIBNAME}
FINAL_LIBS=`make_ar_static_lib -ruv 0 ${LIBNAME} ${OBJECTS}`
else
EXPFILE="lib${LIBNAME}.exp"
LIBNAME="lib${LIBNAME}.a" # shared objects are still stored in the .a libraries
@@ -666,9 +720,7 @@ case $ARCH in
if [ $STATIC = 1 ] ; then
LIBNAME="lib${LIBNAME}.a"
echo "mklib: Making OSF/1 static library: " ${LIBNAME}
rm -f ${LIBNAME}
ar -ruv ${LIBNAME} ${OBJECTS}
FINAL_LIBS=${LIBNAME}
FINAL_LIBS=`make_ar_static_lib -ruv 0 ${LIBNAME} ${OBJECTS}`
else
VERSION="${MAJOR}.${MINOR}"
LIBNAME="lib${LIBNAME}.so"
@@ -691,12 +743,20 @@ case $ARCH in
if [ $STATIC = 1 ] ; then
LIBNAME="lib${LIBNAME}.a"
echo "mklib: Making Darwin static library: " ${LIBNAME}
LINK="ar"
OPTS="-ruvs"
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
${LINK} ${OPTS} ${LIBNAME} ${OBJECTS}
# expand .a into .o files
NEW_OBJECTS=`expand_archives ${LIBNAME}.obj $OBJECTS`
# make static lib
FINAL_LIBS=`make_ar_static_lib ${OPTS} 1 ${LIBNAME} ${NEW_OBJECTS}`
# remove temporary extracted .o files
rm -rf ${LIBNAME}.obj
FINAL_LIBS=${LIBNAME}
else
# On Darwin a .bundle is used for a library that you want to dlopen
@@ -755,16 +815,14 @@ case $ARCH in
'LynxOS')
LIBNAME="lib${LIBNAME}.a"
echo "mklib: Making LynxOS static library: " ${LIBNAME}
rm -f ${LIBNAME}
ar ru ${LIBNAME} ${OBJECTS}
FINAL_LIBS=${LIBNAME}
FINAL_LIBS=`make_ar_static_lib -ru 0 ${LIBNAME} ${OBJECTS}`
;;
'BeOS')
if [ $STATIC = 1 ] ; then
LIBNAME="lib${LIBNAME}.a"
echo "mklib: Making BeOS static library: " ${LIBNAME}
ar -cru "${LIBNAME}" ${OBJECTS}
FINAL_LIBS=`make_ar_static_lib -cru 0 ${LIBNAME} ${OBJECTS}`
else
LIBNAME="lib${LIBNAME}.so"
echo "mklib: Making BeOS shared library: " ${LIBNAME}
@@ -843,9 +901,7 @@ case $ARCH in
if [ $STATIC = 1 ] ; then
LIBNAME="lib${LIBNAME}.a"
echo "mklib: Making AIX GCC static library: " ${LIBNAME}
rm -f ${LIBNAME}
ar ru ${LIBNAME} ${OBJECTS}
FINAL_LIBS=${LIBNAME}
FINAL_LIBS=`make_ar_static_lib ru 0 ${LIBNAME} ${OBJECTS}`
else
LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so"
echo "mklib: Making AIX GCC shared library: " ${LIBNAME}
@@ -866,9 +922,7 @@ case $ARCH in
fi
LIBNAME="lib${LIBNAME}.a"
echo "mklib: Making static library for Ultrix: " ${LIBNAME}
rm -f ${LIBNAME}
ar ru ${LIBNAME} ${OBJECTS}
FINAL_LIBS="${LIBNAME}"
FINAL_LIBS=`make_ar_static_lib ru 0 ${LIBNAME} ${OBJECTS}`
;;
CYGWIN*)
@@ -888,17 +942,20 @@ case $ARCH in
LIBNAME="lib${LIBNAME}" # prefix with "lib"
if [ $STATIC = 1 ] ; then
echo "mklib: Making" $ARCH "static library: " ${LIBNAME}.a
LINK="ar"
LIBNAME=${LIBNAME}.a
echo "mklib: Making" $ARCH "static library: " ${LIBNAME}
OPTS="-ru"
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
# make lib
${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS}
ranlib ${LIBNAME}.a
# finish up
FINAL_LIBS=${LIBNAME}.a
# expand .a into .o files
NEW_OBJECTS=`expand_archives ${LIBNAME}.obj $OBJECTS`
FINAL_LIBS=`make_ar_static_lib ${OPTS} 1 ${LIBNAME} ${NEW_OBJECTS}`
# remove temporary extracted .o files
rm -rf ${LIBNAME}.obj
else
OPTS="-shared -Wl,--enable-auto-image-base -Wl,-export-all -Wl,--out-implib=${LIBNAME}-${MAJOR}.dll.a"
if [ "${ALTOPTS}" ] ; then
@@ -920,6 +977,11 @@ case $ARCH in
# make lib
${LINK} ${OPTS} ${LDFLAGS} -o ${CYGNAME}-${MAJOR}.dll ${OBJECTS} ${DEPS}
# make build fail if link failed
es=$?
if [ "$es" -ne "0" ]; then
exit $es
fi
# make usual symlinks
ln -s ${LIBNAME}-${MAJOR}.dll.a ${LIBNAME}.dll.a
# finish up
@@ -936,9 +998,7 @@ case $ARCH in
if [ $STATIC = 1 ] ; then
LIBNAME="lib${LIBNAME}.a"
echo "mklib: Making static library for example arch: " ${LIBNAME}
rm -f ${LIBNAME}
ar rv ${LIBNAME} ${OBJECTS}
FINAL_LIBS="${LIBNAME}"
FINAL_LIBS=`make_ar_static_lib rv 0 ${LIBNAME} ${OBJECTS}`
else
LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so"
echo "mklib: Making shared library for example arch: " ${LIBNAME}

View File

@@ -1,366 +0,0 @@
#!/usr/bin/env python
##########################################################################
#
# Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
# 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, sub license, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice (including the
# next paragraph) shall be included in all copies or substantial portions
# of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
# IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
##########################################################################
import os.path
import sys
import struct
import Image # http://www.pythonware.com/products/pil/
PIPE_FORMAT_LAYOUT_RGBAZS = 0
PIPE_FORMAT_LAYOUT_YCBCR = 1
PIPE_FORMAT_LAYOUT_DXT = 2
PIPE_FORMAT_LAYOUT_MIXED = 3
PIPE_FORMAT_COMP_R = 0
PIPE_FORMAT_COMP_G = 1
PIPE_FORMAT_COMP_B = 2
PIPE_FORMAT_COMP_A = 3
PIPE_FORMAT_COMP_0 = 4
PIPE_FORMAT_COMP_1 = 5
PIPE_FORMAT_COMP_Z = 6
PIPE_FORMAT_COMP_S = 7
PIPE_FORMAT_TYPE_UNKNOWN = 0
PIPE_FORMAT_TYPE_FLOAT = 1
PIPE_FORMAT_TYPE_UNORM = 2
PIPE_FORMAT_TYPE_SNORM = 3
PIPE_FORMAT_TYPE_USCALED = 4
PIPE_FORMAT_TYPE_SSCALED = 5
PIPE_FORMAT_TYPE_SRGB = 6
PIPE_FORMAT_TYPE_FIXED = 7
def _PIPE_FORMAT_RGBAZS( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, EXP2, TYPE ):
return ((PIPE_FORMAT_LAYOUT_RGBAZS << 0) |\
((SWZ) << 2) |\
((SIZEX) << 14) |\
((SIZEY) << 17) |\
((SIZEZ) << 20) |\
((SIZEW) << 23) |\
((EXP2) << 26) |\
((TYPE) << 29) )
def _PIPE_FORMAT_SWZ( SWZX, SWZY, SWZZ, SWZW ):
return (((SWZX) << 0) | ((SWZY) << 3) | ((SWZZ) << 6) | ((SWZW) << 9))
def _PIPE_FORMAT_RGBAZS_1( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, TYPE ):
return _PIPE_FORMAT_RGBAZS( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, 0, TYPE )
def _PIPE_FORMAT_RGBAZS_2( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, TYPE ):
_PIPE_FORMAT_RGBAZS( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, 1, TYPE )
def _PIPE_FORMAT_RGBAZS_8( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, TYPE ):
return _PIPE_FORMAT_RGBAZS( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, 3, TYPE )
def _PIPE_FORMAT_RGBAZS_64( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, TYPE ):
return _PIPE_FORMAT_RGBAZS( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, 6, TYPE )
def _PIPE_FORMAT_MIXED( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, SIGNX, SIGNY, SIGNZ, SIGNW, NORMALIZED, SCALE8 ):
return ((PIPE_FORMAT_LAYOUT_MIXED << 0) |\
((SWZ) << 2) |\
((SIZEX) << 14) |\
((SIZEY) << 17) |\
((SIZEZ) << 20) |\
((SIZEW) << 23) |\
((SIGNX) << 26) |\
((SIGNY) << 27) |\
((SIGNZ) << 28) |\
((SIGNW) << 29) |\
((NORMALIZED) << 30) |\
((SCALE8) << 31) )
_PIPE_FORMAT_R001 = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_1 )
_PIPE_FORMAT_RG01 = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_1 )
_PIPE_FORMAT_RGB1 = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_B, PIPE_FORMAT_COMP_1 )
_PIPE_FORMAT_RGBA = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_B, PIPE_FORMAT_COMP_A )
_PIPE_FORMAT_ARGB = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_A, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_B )
_PIPE_FORMAT_ABGR = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_A, PIPE_FORMAT_COMP_B, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_R )
_PIPE_FORMAT_BGRA = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_B, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_A )
_PIPE_FORMAT_1RGB = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_1, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_B )
_PIPE_FORMAT_1BGR = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_1, PIPE_FORMAT_COMP_B, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_R )
_PIPE_FORMAT_BGR1 = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_B, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_1 )
_PIPE_FORMAT_0000 = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )
_PIPE_FORMAT_000R = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_R )
_PIPE_FORMAT_RRR1 = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_1 )
_PIPE_FORMAT_RRRR = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R )
_PIPE_FORMAT_RRRG = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_G )
_PIPE_FORMAT_Z000 = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_Z, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )
_PIPE_FORMAT_0Z00 = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_Z, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )
_PIPE_FORMAT_SZ00 = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_S, PIPE_FORMAT_COMP_Z, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )
_PIPE_FORMAT_ZS00 = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_Z, PIPE_FORMAT_COMP_S, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )
_PIPE_FORMAT_S000 = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_S, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )
def _PIPE_FORMAT_YCBCR( REV ):
return ((PIPE_FORMAT_LAYOUT_YCBCR << 0) |\
((REV) << 2) )
def _PIPE_FORMAT_DXT( LEVEL, RSIZE, GSIZE, BSIZE, ASIZE ):
return ((PIPE_FORMAT_LAYOUT_DXT << 0) | \
((LEVEL) << 2) | \
((RSIZE) << 5) | \
((GSIZE) << 8) | \
((BSIZE) << 11) | \
((ASIZE) << 14) )
PIPE_FORMAT_NONE = _PIPE_FORMAT_RGBAZS_1 ( _PIPE_FORMAT_0000, 0, 0, 0, 0, PIPE_FORMAT_TYPE_UNKNOWN )
PIPE_FORMAT_A8R8G8B8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_ARGB, 1, 1, 1, 1, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_X8R8G8B8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_1RGB, 1, 1, 1, 1, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_B8G8R8A8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_BGRA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_B8G8R8X8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_BGR1, 1, 1, 1, 1, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_A1R5G5B5_UNORM = _PIPE_FORMAT_RGBAZS_1 ( _PIPE_FORMAT_ARGB, 1, 5, 5, 5, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_A4R4G4B4_UNORM = _PIPE_FORMAT_RGBAZS_1 ( _PIPE_FORMAT_ARGB, 4, 4, 4, 4, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_R5G6B5_UNORM = _PIPE_FORMAT_RGBAZS_1 ( _PIPE_FORMAT_RGB1, 5, 6, 5, 0, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_A2B10G10R10_UNORM = _PIPE_FORMAT_RGBAZS_2 ( _PIPE_FORMAT_ABGR, 1, 5, 5, 5, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_L8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RRR1, 1, 1, 1, 0, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_A8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_000R, 0, 0, 0, 1, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_I8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RRRR, 1, 1, 1, 1, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_A8L8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RRRG, 1, 1, 1, 1, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_L16_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RRR1, 2, 2, 2, 0, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_YCBCR = _PIPE_FORMAT_YCBCR( 0 )
PIPE_FORMAT_YCBCR_REV = _PIPE_FORMAT_YCBCR( 1 )
PIPE_FORMAT_Z16_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_Z000, 2, 0, 0, 0, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_Z32_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_Z000, 4, 0, 0, 0, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_Z32_FLOAT = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_Z000, 4, 0, 0, 0, PIPE_FORMAT_TYPE_FLOAT )
PIPE_FORMAT_S8Z24_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_SZ00, 1, 3, 0, 0, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_Z24S8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_ZS00, 3, 1, 0, 0, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_X8Z24_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_0Z00, 1, 3, 0, 0, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_Z24X8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_Z000, 3, 1, 0, 0, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_S8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_S000, 1, 0, 0, 0, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_R64_FLOAT = _PIPE_FORMAT_RGBAZS_64( _PIPE_FORMAT_R001, 1, 0, 0, 0, PIPE_FORMAT_TYPE_FLOAT )
PIPE_FORMAT_R64G64_FLOAT = _PIPE_FORMAT_RGBAZS_64( _PIPE_FORMAT_RG01, 1, 1, 0, 0, PIPE_FORMAT_TYPE_FLOAT )
PIPE_FORMAT_R64G64B64_FLOAT = _PIPE_FORMAT_RGBAZS_64( _PIPE_FORMAT_RGB1, 1, 1, 1, 0, PIPE_FORMAT_TYPE_FLOAT )
PIPE_FORMAT_R64G64B64A64_FLOAT = _PIPE_FORMAT_RGBAZS_64( _PIPE_FORMAT_RGBA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_FLOAT )
PIPE_FORMAT_R32_FLOAT = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 4, 0, 0, 0, PIPE_FORMAT_TYPE_FLOAT )
PIPE_FORMAT_R32G32_FLOAT = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 4, 4, 0, 0, PIPE_FORMAT_TYPE_FLOAT )
PIPE_FORMAT_R32G32B32_FLOAT = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 4, 4, 4, 0, PIPE_FORMAT_TYPE_FLOAT )
PIPE_FORMAT_R32G32B32A32_FLOAT = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 4, 4, 4, 4, PIPE_FORMAT_TYPE_FLOAT )
PIPE_FORMAT_R32_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 4, 0, 0, 0, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_R32G32_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 4, 4, 0, 0, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_R32G32B32_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 4, 4, 4, 0, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_R32G32B32A32_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 4, 4, 4, 4, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_R32_USCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 4, 0, 0, 0, PIPE_FORMAT_TYPE_USCALED )
PIPE_FORMAT_R32G32_USCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 4, 4, 0, 0, PIPE_FORMAT_TYPE_USCALED )
PIPE_FORMAT_R32G32B32_USCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 4, 4, 4, 0, PIPE_FORMAT_TYPE_USCALED )
PIPE_FORMAT_R32G32B32A32_USCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 4, 4, 4, 4, PIPE_FORMAT_TYPE_USCALED )
PIPE_FORMAT_R32_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 4, 0, 0, 0, PIPE_FORMAT_TYPE_SNORM )
PIPE_FORMAT_R32G32_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 4, 4, 0, 0, PIPE_FORMAT_TYPE_SNORM )
PIPE_FORMAT_R32G32B32_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 4, 4, 4, 0, PIPE_FORMAT_TYPE_SNORM )
PIPE_FORMAT_R32G32B32A32_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 4, 4, 4, 4, PIPE_FORMAT_TYPE_SNORM )
PIPE_FORMAT_R32_SSCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 4, 0, 0, 0, PIPE_FORMAT_TYPE_SSCALED )
PIPE_FORMAT_R32G32_SSCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 4, 4, 0, 0, PIPE_FORMAT_TYPE_SSCALED )
PIPE_FORMAT_R32G32B32_SSCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 4, 4, 4, 0, PIPE_FORMAT_TYPE_SSCALED )
PIPE_FORMAT_R32G32B32A32_SSCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 4, 4, 4, 4, PIPE_FORMAT_TYPE_SSCALED )
PIPE_FORMAT_R16_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 2, 0, 0, 0, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_R16G16_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 2, 2, 0, 0, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_R16G16B16_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 2, 2, 2, 0, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_R16G16B16A16_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 2, 2, 2, 2, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_R16_USCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 2, 0, 0, 0, PIPE_FORMAT_TYPE_USCALED )
PIPE_FORMAT_R16G16_USCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 2, 2, 0, 0, PIPE_FORMAT_TYPE_USCALED )
PIPE_FORMAT_R16G16B16_USCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 2, 2, 2, 0, PIPE_FORMAT_TYPE_USCALED )
PIPE_FORMAT_R16G16B16A16_USCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 2, 2, 2, 2, PIPE_FORMAT_TYPE_USCALED )
PIPE_FORMAT_R16_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 2, 0, 0, 0, PIPE_FORMAT_TYPE_SNORM )
PIPE_FORMAT_R16G16_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 2, 2, 0, 0, PIPE_FORMAT_TYPE_SNORM )
PIPE_FORMAT_R16G16B16_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 2, 2, 2, 0, PIPE_FORMAT_TYPE_SNORM )
PIPE_FORMAT_R16G16B16A16_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 2, 2, 2, 2, PIPE_FORMAT_TYPE_SNORM )
PIPE_FORMAT_R16_SSCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 2, 0, 0, 0, PIPE_FORMAT_TYPE_SSCALED )
PIPE_FORMAT_R16G16_SSCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 2, 2, 0, 0, PIPE_FORMAT_TYPE_SSCALED )
PIPE_FORMAT_R16G16B16_SSCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 2, 2, 2, 0, PIPE_FORMAT_TYPE_SSCALED )
PIPE_FORMAT_R16G16B16A16_SSCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 2, 2, 2, 2, PIPE_FORMAT_TYPE_SSCALED )
PIPE_FORMAT_R8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 1, 0, 0, 0, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_R8G8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 1, 1, 0, 0, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_R8G8B8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 0, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_R8G8B8A8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_R8G8B8X8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 1, PIPE_FORMAT_TYPE_UNORM )
PIPE_FORMAT_R8_USCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 1, 0, 0, 0, PIPE_FORMAT_TYPE_USCALED )
PIPE_FORMAT_R8G8_USCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 1, 1, 0, 0, PIPE_FORMAT_TYPE_USCALED )
PIPE_FORMAT_R8G8B8_USCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 0, PIPE_FORMAT_TYPE_USCALED )
PIPE_FORMAT_R8G8B8A8_USCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_USCALED )
PIPE_FORMAT_R8G8B8X8_USCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 1, PIPE_FORMAT_TYPE_USCALED )
PIPE_FORMAT_R8_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 1, 0, 0, 0, PIPE_FORMAT_TYPE_SNORM )
PIPE_FORMAT_R8G8_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 1, 1, 0, 0, PIPE_FORMAT_TYPE_SNORM )
PIPE_FORMAT_R8G8B8_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 0, PIPE_FORMAT_TYPE_SNORM )
PIPE_FORMAT_R8G8B8A8_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SNORM )
PIPE_FORMAT_R8G8B8X8_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SNORM )
PIPE_FORMAT_B6G5R5_SNORM = _PIPE_FORMAT_RGBAZS_1 ( _PIPE_FORMAT_BGR1, 6, 5, 5, 0, PIPE_FORMAT_TYPE_SNORM )
PIPE_FORMAT_A8B8G8R8_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_BGRA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SNORM )
PIPE_FORMAT_X8B8G8R8_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SNORM )
PIPE_FORMAT_R8_SSCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 1, 0, 0, 0, PIPE_FORMAT_TYPE_SSCALED )
PIPE_FORMAT_R8G8_SSCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 1, 1, 0, 0, PIPE_FORMAT_TYPE_SSCALED )
PIPE_FORMAT_R8G8B8_SSCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 0, PIPE_FORMAT_TYPE_SSCALED )
PIPE_FORMAT_R8G8B8A8_SSCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SSCALED )
PIPE_FORMAT_R8G8B8X8_SSCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SSCALED )
PIPE_FORMAT_R32_FIXED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 4, 0, 0, 0, PIPE_FORMAT_TYPE_FIXED )
PIPE_FORMAT_R32G32_FIXED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 4, 4, 0, 0, PIPE_FORMAT_TYPE_FIXED )
PIPE_FORMAT_R32G32B32_FIXED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 4, 4, 4, 0, PIPE_FORMAT_TYPE_FIXED )
PIPE_FORMAT_R32G32B32A32_FIXED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 4, 4, 4, 4, PIPE_FORMAT_TYPE_FIXED )
PIPE_FORMAT_L8_SRGB = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RRR1, 1, 1, 1, 0, PIPE_FORMAT_TYPE_SRGB )
PIPE_FORMAT_A8_L8_SRGB = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RRRG, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SRGB )
PIPE_FORMAT_R8G8B8_SRGB = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 0, PIPE_FORMAT_TYPE_SRGB )
PIPE_FORMAT_R8G8B8A8_SRGB = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SRGB )
PIPE_FORMAT_R8G8B8X8_SRGB = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SRGB )
PIPE_FORMAT_X8UB8UG8SR8S_NORM = _PIPE_FORMAT_MIXED( _PIPE_FORMAT_1BGR, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1 )
PIPE_FORMAT_B6UG5SR5S_NORM = _PIPE_FORMAT_MIXED( _PIPE_FORMAT_BGR1, 6, 5, 5, 0, 0, 1, 1, 0, 1, 0 )
PIPE_FORMAT_DXT1_RGB = _PIPE_FORMAT_DXT( 1, 8, 8, 8, 0 )
PIPE_FORMAT_DXT1_RGBA = _PIPE_FORMAT_DXT( 1, 8, 8, 8, 8 )
PIPE_FORMAT_DXT3_RGBA = _PIPE_FORMAT_DXT( 3, 8, 8, 8, 8 )
PIPE_FORMAT_DXT5_RGBA = _PIPE_FORMAT_DXT( 5, 8, 8, 8, 8 )
formats = {}
for name, value in globals().items():
if name.startswith("PIPE_FORMAT_") and isinstance(value, int):
formats[value] = name
def clip(g):
return min(max(g, 0), 255)
def yuv2rgb(y, u, v):
C = y - 16
D = u - 128
E = v - 128
r = clip(( 298 * C + 409 * E + 128) >> 8)
g = clip(( 298 * C - 100 * D - 208 * E + 128) >> 8)
b = clip(( 298 * C + 516 * D + 128) >> 8)
return r, g, b
def translate_r5g6b5(data):
value, = struct.unpack_from("H", data)
r = ((value >> 11) & 0x1f)*0xff/0x1f
g = ((value >> 5) & 0x3f)*0xff/0x3f
b = ((value >> 0) & 0x1f)*0xff/0x1f
a = 255
return [[(r, g, b, a)]]
def translate_a8r8g8b8(data):
b, g, r, a = struct.unpack_from("BBBB", data)
return [[(r, g, b, a)]]
def translate_x8r8g8b8(data):
b, g, r, x = struct.unpack_from("BBBB", data)
a = 255
return [[(r, g, b, a)]]
def translate_r8g8b8a8(data):
r, g, b, a = struct.unpack_from("BBBB", data)
return [[(r, g, b, a)]]
def translate_ycbcr(data):
y1, u, y2, v = struct.unpack_from("BBBB", data)
r1, g1, b1 = yuv2rgb(y1, u, v)
r2, g2, b2 = yuv2rgb(y1, u, v)
return [[(r1, g1, b1, 255), (r2, g2, b2, 255)]]
def translate_ycbcr_rev(data):
v, y2, u, y1 = struct.unpack_from("BBBB", data)
r1, g1, b1 = yuv2rgb(y1, u, v)
r2, g2, b2 = yuv2rgb(y1, u, v)
return [[(r1, g1, b1, 255), (r2, g2, b2, 255)]]
def translate_x8z24(data):
value, = struct.unpack_from("I", data)
r = g = b = (value & 0xffffff)*0xff/0xffffff
a = 255
return [[(r, g, b, a)]]
def translate_s8z24(data):
value, = struct.unpack_from("I", data)
r = (value & 0xffffff)*0xff/0xffffff
g = value >> 24
b = 0
a = 255
return [[(r, g, b, a)]]
translate = {
PIPE_FORMAT_A8R8G8B8_UNORM: (4, 1, 1, translate_a8r8g8b8),
PIPE_FORMAT_X8R8G8B8_UNORM: (4, 1, 1, translate_x8r8g8b8),
PIPE_FORMAT_B8G8R8A8_UNORM: (4, 1, 1, translate_r8g8b8a8),
PIPE_FORMAT_B8G8R8X8_UNORM: (4, 1, 1, translate_r8g8b8a8),
PIPE_FORMAT_A8B8G8R8_SNORM: (4, 1, 1, translate_r8g8b8a8),
PIPE_FORMAT_R5G6B5_UNORM: (2, 1, 1, translate_r5g6b5),
PIPE_FORMAT_YCBCR: (4, 2, 1, translate_ycbcr),
PIPE_FORMAT_YCBCR_REV: (4, 2, 1, translate_ycbcr_rev),
PIPE_FORMAT_S8Z24_UNORM: (4, 1, 1, translate_s8z24),
PIPE_FORMAT_X8Z24_UNORM: (4, 1, 1, translate_x8z24),
}
def read_header(infile):
header_fmt = "IIII"
header = infile.read(struct.calcsize(header_fmt))
return struct.unpack_from(header_fmt, header)
def process(infilename, outfilename):
sys.stderr.write("%s -> %s\n" % (infilename, outfilename))
infile = open(infilename, "rb")
format, cpp, width, height = read_header(infile)
sys.stderr.write(" %ux%ux%ubpp %s\n" % (width, height, cpp*8, formats[format]))
outimage = Image.new(
mode='RGB',
size=(width, height),
color=(0,0,0))
outpixels = outimage.load()
try:
bsize, bwidth, bheight, translate_func = translate[format]
except KeyError:
sys.stderr.write('error: unsupported format %s\n' % formats[format])
return
for y in range(0, height, bheight):
for x in range(0, width, bwidth):
indata = infile.read(bsize)
outdata = translate_func(indata)
for j in range(bheight):
for i in range(bwidth):
r, g, b, a = outdata[j][i]
outpixels[x+i, y+j] = r, g, b
outimage.save(outfilename, "PNG")
def main():
if sys.platform == 'win32':
# wildcard expansion
from glob import glob
args = []
for arg in sys.argv[1:]:
args.extend(glob(arg))
else:
args = sys.argv[1:]
for infilename in args:
root, ext = os.path.splitext(infilename)
outfilename = root + ".png"
process(infilename, outfilename)
if __name__ == '__main__':
main()

View File

@@ -12,7 +12,7 @@ import platform as _platform
_platform_map = {
'linux2': 'linux',
'win32': 'winddk',
'win32': 'windows',
}
default_platform = sys.platform
@@ -59,9 +59,8 @@ def AddOptions(opts):
opts.Add(EnumOption('machine', 'use machine-specific assembly code', default_machine,
allowed_values=('generic', 'ppc', 'x86', 'x86_64')))
opts.Add(EnumOption('platform', 'target platform', default_platform,
allowed_values=('linux', 'cell', 'windows', 'winddk', 'wince', 'darwin')))
allowed_values=('linux', 'cell', 'windows', 'winddk', 'wince', 'darwin', 'embedded')))
opts.Add(EnumOption('toolchain', 'compiler toolchain', 'default',
allowed_values=('default', 'crossmingw', 'winsdk', 'winddk')))
opts.Add(BoolOption('llvm', 'use LLVM', 'no'))
opts.Add(BoolOption('dri', 'build DRI drivers', default_dri))

View File

@@ -22,6 +22,8 @@ LDFLAGS = @LDFLAGS@
EXTRA_LIB_PATH = @EXTRA_LIB_PATH@
RADEON_CFLAGS = @RADEON_CFLAGS@
RADEON_LDFLAGS = @RADEON_LDFLAGS@
INTEL_LIBS = @INTEL_LIBS@
INTEL_CFLAGS = @INTEL_CFLAGS@
# Assembler
MESA_ASM_SOURCES = @MESA_ASM_SOURCES@
@@ -52,6 +54,7 @@ GLU_LIB_NAME = @GLU_LIB_NAME@
GLUT_LIB_NAME = @GLUT_LIB_NAME@
GLW_LIB_NAME = @GLW_LIB_NAME@
OSMESA_LIB_NAME = @OSMESA_LIB_NAME@
EGL_LIB_NAME = @EGL_LIB_NAME@
# Globs used to install the lib and all symlinks
GL_LIB_GLOB = @GL_LIB_GLOB@
@@ -59,19 +62,20 @@ GLU_LIB_GLOB = @GLU_LIB_GLOB@
GLUT_LIB_GLOB = @GLUT_LIB_GLOB@
GLW_LIB_GLOB = @GLW_LIB_GLOB@
OSMESA_LIB_GLOB = @OSMESA_LIB_GLOB@
EGL_LIB_GLOB = @EGL_LIB_GLOB@
# Directories to build
LIB_DIR = @LIB_DIR@
SRC_DIRS = @SRC_DIRS@
GLU_DIRS = @GLU_DIRS@
DRIVER_DIRS = @DRIVER_DIRS@
EGL_DRIVERS_DIRS = @EGL_DRIVERS_DIRS@
GALLIUM_DIRS = @GALLIUM_DIRS@
GALLIUM_AUXILIARY_DIRS = @GALLIUM_AUXILIARY_DIRS@
GALLIUM_DRIVERS_DIRS = @GALLIUM_DRIVERS_DIRS@
GALLIUM_WINSYS_DIRS = @GALLIUM_WINSYS_DIRS@
GALLIUM_WINSYS_DRM_DIRS = @GALLIUM_WINSYS_DRM_DIRS@
GALLIUM_STATE_TRACKERS_DIRS = @GALLIUM_STATE_TRACKERS_DIRS@
GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a)
GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a
GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
# Which subdirs under $(TOP)/progs/ to enter:
@@ -80,7 +84,7 @@ PROGRAM_DIRS = @PROGRAM_DIRS@
# Driver specific build vars
DRI_DIRS = @DRI_DIRS@
WINDOW_SYSTEM = @WINDOW_SYSTEM@
USING_EGL = @USING_EGL@
EGL_DISPLAYS = @EGL_DISPLAYS@
# Dependencies
X11_INCLUDES = @X11_INCLUDES@
@@ -126,6 +130,9 @@ DRI_DRIVER_INSTALL_DIR = @DRI_DRIVER_INSTALL_DIR@
# Where libGL will look for DRI hardware drivers
DRI_DRIVER_SEARCH_DIR = @DRI_DRIVER_SEARCH_DIR@
# EGL driver install directory
EGL_DRIVER_INSTALL_DIR = @EGL_DRIVER_INSTALL_DIR@
# Xorg driver install directory (for xorg state-tracker)
XORG_DRIVER_INSTALL_DIR = @XORG_DRIVER_INSTALL_DIR@
@@ -146,3 +153,6 @@ GLW_PC_LIB_PRIV = @GLW_PC_LIB_PRIV@
GLW_PC_CFLAGS = @GLW_PC_CFLAGS@
OSMESA_PC_REQ = @OSMESA_PC_REQ@
OSMESA_PC_LIB_PRIV = @OSMESA_PC_LIB_PRIV@
EGL_DRI2_CFLAGS = @EGL_DRI2_CFLAGS@
EGL_DRI2_LIBS = @EGL_DRI2_LIBS@

View File

@@ -16,7 +16,7 @@ DEFINES = -D_DARWIN_C_SOURCE -DPTHREADS -D_GNU_SOURCE \
-DGLX_ALIAS_UNSUPPORTED -DGLX_INDIRECT_RENDERING
# -D_GNU_SOURCE - for src/mesa/main ...
# -DGLX_DIRECT_RENDERING - pulls in libdrm stuff in glx/x11
# -DGLX_DIRECT_RENDERING - pulls in libdrm stuff in glx
# -DGLX_USE_APPLEGL - supposed to be used with GLX_DIRECT_RENDERING to use AGL rather than DRM, but doesn't compile
# -DIN_DRI_DRIVER
@@ -49,7 +49,7 @@ GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXmu -lXt -lXi -lm
# omit glw lib for now:
SRC_DIRS = glx/x11 mesa gallium glu glut/glx glew
SRC_DIRS = glsl glx mesa gallium glu glut/glx glew
GLU_DIRS = sgi
DRIVER_DIRS = osmesa
#DRIVER_DIRS = dri

View File

@@ -1,33 +0,0 @@
# Configuration for Darwin / MacOS X, making dynamic libs
include $(TOP)/configs/default
CONFIG_NAME = darwin
# Compiler and flags
CC = cc
CXX = cc
CFLAGS = -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
-I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
CXXFLAGS = -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
-I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
MKLIB_OPTIONS = -archopt "-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
# Library names (actual file names)
GL_LIB_NAME = libGL.dylib
GLU_LIB_NAME = libGLU.dylib
GLUT_LIB_NAME = libglut.dylib
GLW_LIB_NAME = libGLw.dylib
OSMESA_LIB_NAME = libOSMesa.dylib
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL -lGLU -L/usr/X11R6/lib -lX11 -lXmu -lXi -lXext
GLW_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXt $(TOP)/lib/GL.dylib
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
# omit glw lib for now:
SRC_DIRS = gallium mesa glu glut/glx glew

View File

@@ -9,7 +9,7 @@ CONFIG_NAME = default
# Version info
MESA_MAJOR=7
MESA_MINOR=7
MESA_MINOR=8
MESA_TINY=1
MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
@@ -55,6 +55,7 @@ GLUT_LIB = glut
GLEW_LIB = GLEW
GLW_LIB = GLw
OSMESA_LIB = OSMesa
EGL_LIB = EGL
# Library names (actual file names)
@@ -64,6 +65,7 @@ GLUT_LIB_NAME = lib$(GLUT_LIB).so
GLEW_LIB_NAME = lib$(GLEW_LIB).a
GLW_LIB_NAME = lib$(GLW_LIB).so
OSMESA_LIB_NAME = lib$(OSMESA_LIB).so
EGL_LIB_NAME = lib$(EGL_LIB).so
# globs used to install the lib and all symlinks
GL_LIB_GLOB = $(GL_LIB_NAME)*
@@ -71,6 +73,7 @@ GLU_LIB_GLOB = $(GLU_LIB_NAME)*
GLUT_LIB_GLOB = $(GLUT_LIB_NAME)*
GLW_LIB_GLOB = $(GLW_LIB_NAME)*
OSMESA_LIB_GLOB = $(OSMESA_LIB_NAME)*
EGL_LIB_GLOB = $(EGL_LIB_NAME)*
# Optional assembly language optimization files for libGL
MESA_ASM_SOURCES =
@@ -83,25 +86,26 @@ MOTIF_CFLAGS = -I/usr/include/Motif1.2
# Directories to build
LIB_DIR = lib
SRC_DIRS = mesa gallium egl gallium/winsys glu glut/glx glew glw
SRC_DIRS = glsl mesa gallium egl gallium/winsys glu glut/glx glew glw
GLU_DIRS = sgi
DRIVER_DIRS = x11 osmesa
# Which subdirs under $(TOP)/progs/ to enter:
PROGRAM_DIRS = demos redbook samples glsl objviewer xdemos
# EGL directories
EGL_DRIVERS_DIRS = demo
# EGL drivers to build
EGL_DRIVERS_DIRS = glx
# Gallium directories and
GALLIUM_DIRS = auxiliary drivers state_trackers
GALLIUM_AUXILIARY_DIRS = rbug draw translate cso_cache pipebuffer tgsi sct rtasm util indices vl
GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a)
GALLIUM_DRIVERS_DIRS = softpipe failover svga i915 trace identity
GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a
GALLIUM_DRIVERS_DIRS = softpipe failover svga i915 i965 r300 trace identity
GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
GALLIUM_WINSYS_DIRS = xlib egl_xlib
GALLIUM_WINSYS_DRM_DIRS =
GALLIUM_STATE_TRACKERS_DIRS = glx
GALLIUM_WINSYS_DIRS = drm xlib
GALLIUM_WINSYS_DRM_DIRS = swrast
GALLIUM_STATE_TRACKERS_DIRS = glx vega
# native displays EGL should support
EGL_DISPLAYS = x11
# Library dependencies
#EXTRA_LIB_PATH ?=
@@ -126,6 +130,9 @@ DRI_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/dri
# Where libGL will look for DRI hardware drivers
DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
# EGL driver install directory
EGL_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/egl
# Xorg driver install directory (for xorg state-tracker)
XORG_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/xorg/modules/drivers

View File

@@ -41,15 +41,13 @@ GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/local/lib -lGL -lXt -lX11
# Directories
SRC_DIRS = glx/x11 gallium mesa glu glut/glx glew glw
SRC_DIRS = glx gallium mesa glu glut/glx glew glw
DRIVER_DIRS = dri
PROGRAM_DIRS =
WINDOW_SYSTEM=dri
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 i965 mach64 mga r128 r200 r300 radeon tdfx \
unichrome savage sis

View File

@@ -1,6 +1,6 @@
# linux-cell (non-debug build)
include $(TOP)/configs/default
include $(TOP)/configs/linux
CONFIG_NAME = linux-cell
@@ -25,15 +25,19 @@ OPT_FLAGS = -O3
SDK = /opt/cell/sdk/usr
CFLAGS = $(OPT_FLAGS) -Wall -Winline -Wmissing-prototypes \
-fPIC -m32 -std=c99 -mabi=altivec -maltivec \
-I. -I$(SDK)/include \
-DGALLIUM_CELL -DUSE_XSHM -D_BSD_SOURCE -D_SVID_SOURCE
CXXFLAGS = $(CFLAGS)
COMMON_C_CPP_FLAGS = $(OPT_FLAGS) -Wall -Winline \
-fPIC -m32 -mabi=altivec -maltivec \
-I. -I$(SDK)/include \
-DGALLIUM_CELL $(DEFINES)
CFLAGS = $(COMMON_C_CPP_FLAGS) -Wmissing-prototypes -std=c99
CXXFLAGS = $(COMMON_C_CPP_FLAGS)
# Omitting glw here:
SRC_DIRS = gallium mesa gallium/winsys glu glut/glx glew
SRC_DIRS = glsl mesa gallium gallium/winsys glu glut/glx glew
# Build no traditional Mesa drivers:
DRIVER_DIRS =

View File

@@ -5,5 +5,5 @@ include $(TOP)/configs/linux
CONFIG_NAME = linux-debug
OPT_FLAGS = -g
CFLAGS += -ansi -pedantic
CFLAGS += -pedantic
DEFINES += -DDEBUG -DDEBUG_MATH

View File

@@ -1,38 +0,0 @@
# Configuration for DirectFB
include $(TOP)/configs/default
CONFIG_NAME = linux-directfb
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -Wall -O3 -ffast-math -fPIC -std=c99 -D_GNU_SOURCE -D_POSIX_SOURCE -D_SVID_SOURCE \
-D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -DPTHREADS
CXXFLAGS = -Wall -O3 -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
# Work around aliasing bugs - developers should comment this out
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
HAVE_X86 = $(shell uname -m | grep 'i[3-6]86' >/dev/null && echo yes)
ifeq ($(HAVE_X86), yes)
CFLAGS += -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
CXXFLAGS += -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
MESA_ASM_SOURCES = $(X86_SOURCES)
GLAPI_ASM_SOURCES = $(X86_API)
endif
# Directories
SRC_DIRS = gallium mesa glu glut/directfb glew
GLU_DIRS = sgi
DRIVER_DIRS = directfb
PROGRAM_DIRS = demos directfb
# Library/program dependencies
GL_LIB_DEPS = -lm -lpthread
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -l$(GLU_LIB)
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -l$(GLU_LIB) -l$(GLUT_LIB)

View File

@@ -51,17 +51,23 @@ GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
# Directories
SRC_DIRS := glx/x11 egl $(SRC_DIRS)
SRC_DIRS := glx egl $(SRC_DIRS)
PROGRAM_DIRS := egl $(PROGRAM_DIRS)
# EGL directories
EGL_DRIVERS_DIRS = demo glx
EGL_DRIVERS_DIRS = glx
DRIVER_DIRS = dri
WINDOW_SYSTEM = dri
GALLIUM_WINSYS_DIRS = drm
GALLIUM_WINSYS_DRM_DIRS = vmware intel
GALLIUM_WINSYS_DRM_DIRS = vmware intel i965
GALLIUM_STATE_TRACKERS_DIRS = egl
DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon \
savage sis tdfx unichrome ffb swrast
savage sis tdfx unichrome swrast
INTEL_LIBS = `pkg-config --libs libdrm_intel`
INTEL_CFLAGS = `pkg-config --cflags libdrm_intel`
RADEON_LIBS = `pkg-config --libs libdrm_radeon`
RADEON_CFLAGS = `pkg-config --cflags libdrm_radeon`

View File

@@ -16,7 +16,7 @@ LIB_DIR = lib64
# Library/program dependencies
EXTRA_LIB_PATH=-L/usr/X11R6/lib64
# ffb, gamma, and sis are missing because they have not be converted to use
# sis is missing because it has not been converted to use
# the new interface. i810 are missing because there is no x86-64
# system where they could *ever* be used.
#

View File

@@ -47,26 +47,11 @@ 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) $(shell pkg-config --libs xcb) $(shell pkg-config --libs x11-xcb) $(shell pkg-config --libs xcb-glx)
# This is now 0 by default since it seems to confuse the hell out of people
# and generate a lot of extra noise on bugzilla. If you need to build with
# EGL, do 'make linux-dri USING_EGL=1'
USING_EGL=0
# Directories
ifeq ($(USING_EGL), 1)
SRC_DIRS = egl glx/x11 gallium mesa glu glut/glx glew glw
PROGRAM_DIRS = egl
else
SRC_DIRS = glx/x11 gallium mesa glu glut/glx glew glw
SRC_DIRS = glx gallium mesa glu glut/glx glew glw
PROGRAM_DIRS = xdemos
endif
DRIVER_DIRS = dri
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 \
savage sis tdfx unichrome ffb
savage sis tdfx unichrome

View File

@@ -46,12 +46,6 @@ GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
$(LIBDRM_LIB)
# This is now 0 by default since it seems to confuse the hell out of people
# and generate a lot of extra noise on bugzilla. If you need to build with
# EGL, do 'make linux-dri USING_EGL=1'
USING_EGL=0
# Directories
SRC_DIRS = gallium mesa gallium/winsys glu egl
PROGRAM_DIRS = egl
@@ -60,6 +54,4 @@ DRIVER_DIRS = dri
WINDOW_SYSTEM = dri
GALLIUM_WINSYS_DIRS = egl_drm
# gamma are missing because they have not been converted to use the new
# interface.
DRI_DIRS = intel

View File

@@ -1,23 +0,0 @@
# Configuration for generic Linux with 3Dfx Glide driver
include $(TOP)/configs/default
CONFIG_NAME = linux-glide
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DFX -I/usr/include/glide -I/usr/local/glide/include
CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
GLUT_CFLAGS = -fexceptions
# Work around aliasing bugs - developers should comment this out
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
# Library/program dependencies
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -L/usr/local/glide/lib -lglide3x -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) -L/usr/local/glide/lib -lglide3x -lm

8
configs/linux-i965 Normal file
View File

@@ -0,0 +1,8 @@
# Configuration for standalone mode i965 debug
include $(TOP)/configs/linux-debug
CONFIG_NAME = linux-i965
GALLIUM_DRIVER_DIRS = i965
GALLIUM_WINSYS_DIRS = drm/i965/xlib

View File

@@ -47,7 +47,7 @@ GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl
# Directories
SRC_DIRS = glx/x11 glu glut/glx glew glw
SRC_DIRS = glx glu glut/glx glew glw
DRIVER_DIRS =
PROGRAM_DIRS =
WINDOW_SYSTEM=dri

View File

@@ -1,18 +1,18 @@
# -*-makefile-*-
# Configuration for Linux and LLVM with debugging info
# Configuration for Linux and LLVM with optimizations
# Builds the llvmpipe gallium driver
include $(TOP)/configs/linux
CONFIG_NAME = linux-llvm
#GALLIUM_AUXILIARY_DIRS += gallivm
# Add llvmpipe driver
GALLIUM_DRIVERS_DIRS += llvmpipe
OPT_FLAGS = -g -ansi -pedantic
DEFINES += -DDEBUG -DDEBUG_MATH -DGALLIUM_LLVMPIPE -DHAVE_UDIS86
OPT_FLAGS = -O3 -ansi -pedantic
ARCH_FLAGS = -m32 -mmmx -msse -msse2 -mstackrealign
DEFINES += -DNDEBUG -DGALLIUM_LLVMPIPE -DDRAW_LLVM -DHAVE_UDIS86
# override -std=c99
CFLAGS += -std=gnu99
@@ -31,7 +31,7 @@ ifeq ($(MESA_LLVM),1)
# LLVM_CFLAGS=`llvm-config --cflags`
LLVM_CXXFLAGS=`llvm-config --cxxflags backend bitreader engine ipo interpreter instrumentation` -Wno-long-long
LLVM_LDFLAGS = $(shell llvm-config --ldflags backend bitreader engine ipo interpreter instrumentation)
LLVM_LIBS = $(shell llvm-config --libs backend bitreader engine ipo interpreter instrumentation)
LLVM_LIBS = $(shell llvm-config --libs backend bitwriter bitreader engine ipo interpreter instrumentation)
MKLIB_OPTIONS=-cplusplus
else
LLVM_CFLAGS=

12
configs/linux-llvm-debug Normal file
View File

@@ -0,0 +1,12 @@
# -*-makefile-*-
# Configuration for Linux and LLVM with debugging info
# Builds the llvmpipe gallium driver
include $(TOP)/configs/linux-llvm
CONFIG_NAME = linux-llvm-debug
OPT_FLAGS = -g -ansi -pedantic
DEFINES += -DDEBUG -UNDEBUG

28
configs/linux-opengl-es Normal file
View File

@@ -0,0 +1,28 @@
# Configuration for OpenGL ES on Linux
include $(TOP)/configs/linux
CONFIG_NAME = linux-opengl-es
# Directories to build
LIB_DIR = lib
SRC_DIRS = egl glsl mesa/es gallium gallium/winsys
PROGRAM_DIRS = es1/screen es1/xegl es2/xegl
# egl st needs this
DEFINES += -DGLX_DIRECT_RENDERING
# no mesa or egl drivers
DRIVER_DIRS =
EGL_DRIVERS_DIRS =
GALLIUM_DRIVERS_DIRS = softpipe
# build libGLES*.so
GALLIUM_STATE_TRACKERS_DIRS = es
# build egl_x11_{swrast,i915}.so
GALLIUM_DRIVERS_DIRS += trace i915
GALLIUM_STATE_TRACKERS_DIRS += egl
GALLIUM_WINSYS_DIRS += drm
GALLIUM_WINSYS_DRM_DIRS += intel swrast

View File

@@ -1,54 +0,0 @@
# Configuration for linux-solo: Linux DRI hardware drivers for fbdev
include $(TOP)/configs/default
CONFIG_NAME = linux-solo
# Compiler and flags
CC = gcc
CXX = g++
WARN_FLAGS = -Wall -Wundef
OPT_FLAGS = -O3 -g
PIC_FLAGS = -fPIC
# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support.
ARCH_FLAGS ?=
# DRM and pciaccess
LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm)
LIBDRM_LIB = $(shell pkg-config --libs libdrm)
PCIACCESS_CFLAGS = $(shell pkg-config --cflags pciaccess)
PCIACCESS_LIB = $(shell pkg-config --libs pciaccess)
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
-D_BSD_SOURCE -D_GNU_SOURCE -DHAVE_POSIX_MEMALIGN \
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
-DHAVE_ALIAS
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)
# Work around aliasing bugs - developers should comment this out
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
MESA_ASM_SOURCES =
# Library/program dependencies
DRI_LIB_DEPS = -lm -lpthread -lexpat -ldl -L$(TOP)/$(LIB_DIR) $(PCIACCESS_LIB)
GL_LIB_DEPS = -lm -lpthread -ldl
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lpthread
# Directories
SRC_DIRS = glx/mini gallium mesa glu glut/mini glew
DRIVER_DIRS = dri
PROGRAM_DIRS = miniglx
#DRI_DIRS = ffb gamma sis savage tdfx unichrome fb
DRI_DIRS = i810 i915tex i915 mach64 mga r128 r200 radeon

View File

@@ -1,7 +0,0 @@
# Configuration for linux-solo-ia64: Linux DRI hardware drivers for fbdev
include $(TOP)/configs/linux-solo
CONFIG_NAME = linux-solo-ia64
DRI_DIRS = fb mach64 mga r128 r200 radeon sis tdfx unichrome

View File

@@ -1,10 +0,0 @@
# -*-makefile-*-
# Configuration for linux-solo-x86: Linux hardware drivers for fbdev for x86
include $(TOP)/configs/linux-solo
CONFIG_NAME = linux-solo-x86
ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
MESA_ASM_SOURCES = $(X86_SOURCES)
GLAPI_ASM_SOURCES = $(X86_API)

View File

@@ -1,28 +0,0 @@
# Configuration for Linux with 3Dfx Glide driver and x86 optimizations
include $(TOP)/configs/default
CONFIG_NAME = linux-x86-glide
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include -DFX -I/usr/include/glide -I/usr/local/glide/include
CXXFLAGS = -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
GLUT_CFLAGS = -fexceptions
# Work around aliasing bugs - developers should comment this out
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
MESA_ASM_SOURCES = $(X86_SOURCES)
GLAPI_ASM_SOURCES = $(X86_API)
# Library/program dependencies
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -L/usr/local/glide/lib -lglide3x -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) -L/usr/local/glide/lib -lglide3x -lm

View File

@@ -20,7 +20,10 @@ AC_CANONICAL_HOST
dnl Versions for external dependencies
LIBDRM_REQUIRED=2.4.15
LIBDRM_RADEON_REQUIRED=2.4.17
DRI2PROTO_REQUIRED=1.99.3
DRI2PROTO_REQUIRED=2.1
GLPROTO_REQUIRED=1.4.11
LIBDRM_XORG_REQUIRED=2.4.17
LIBKMS_XORG_REQUIRED=1.0.0
dnl Check for progs
AC_PROG_CPP
@@ -45,6 +48,28 @@ solaris*)
;;
esac
dnl If we're using GCC, make sure that it is at least version 3.3.0. Older
dnl versions are explictly not supported.
if test "x$GCC" = xyes; then
AC_MSG_CHECKING([whether gcc version is sufficient])
major=0
minor=0
GCC_VERSION=`$CC -dumpversion`
if test $? -eq 0; then
major=`echo $GCC_VERSION | cut -d. -f1`
minor=`echo $GCC_VERSION | cut -d. -f1`
fi
if test $major -lt 3 -o $major -eq 3 -a $minor -lt 3 ; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([If using GCC, version 3.3.0 or later is required.])
else
AC_MSG_RESULT([yes])
fi
fi
MKDEP_OPTIONS=-fdepend
dnl Ask gcc where it's keeping its secret headers
if test "x$GCC" = xyes; then
@@ -91,12 +116,22 @@ linux*|*-gnu*|gnu*)
solaris*)
DEFINES="$DEFINES -DPTHREADS -DSVR4"
;;
cygwin*)
DEFINES="$DEFINES -DPTHREADS"
;;
esac
dnl Add flags for gcc and g++
if test "x$GCC" = xyes; then
CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -std=c99 -ffast-math"
# Enable -fvisibility=hidden if using a gcc that supports it
save_CFLAGS="$CFLAGS"
AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden])
CFLAGS="$CFLAGS -fvisibility=hidden"
AC_LINK_IFELSE([AC_LANG_PROGRAM()], AC_MSG_RESULT([yes]),
[CFLAGS="$save_CFLAGS" ; AC_MSG_RESULT([no])]);
# Work around aliasing bugs - developers should comment this out
CFLAGS="$CFLAGS -fno-strict-aliasing"
fi
@@ -243,24 +278,28 @@ GLU_LIB_NAME='lib$(GLU_LIB).'${LIB_EXTENSION}
GLUT_LIB_NAME='lib$(GLUT_LIB).'${LIB_EXTENSION}
GLW_LIB_NAME='lib$(GLW_LIB).'${LIB_EXTENSION}
OSMESA_LIB_NAME='lib$(OSMESA_LIB).'${LIB_EXTENSION}
EGL_LIB_NAME='lib$(EGL_LIB).'${LIB_EXTENSION}
GL_LIB_GLOB='lib$(GL_LIB).*'${LIB_EXTENSION}'*'
GLU_LIB_GLOB='lib$(GLU_LIB).*'${LIB_EXTENSION}'*'
GLUT_LIB_GLOB='lib$(GLUT_LIB).*'${LIB_EXTENSION}'*'
GLW_LIB_GLOB='lib$(GLW_LIB).*'${LIB_EXTENSION}'*'
OSMESA_LIB_GLOB='lib$(OSMESA_LIB).*'${LIB_EXTENSION}'*'
EGL_LIB_GLOB='lib$(EGL_LIB).*'${LIB_EXTENSION}'*'
AC_SUBST([GL_LIB_NAME])
AC_SUBST([GLU_LIB_NAME])
AC_SUBST([GLUT_LIB_NAME])
AC_SUBST([GLW_LIB_NAME])
AC_SUBST([OSMESA_LIB_NAME])
AC_SUBST([EGL_LIB_NAME])
AC_SUBST([GL_LIB_GLOB])
AC_SUBST([GLU_LIB_GLOB])
AC_SUBST([GLUT_LIB_GLOB])
AC_SUBST([GLW_LIB_GLOB])
AC_SUBST([OSMESA_LIB_GLOB])
AC_SUBST([EGL_LIB_GLOB])
dnl
dnl Arch/platform-specific settings
@@ -380,7 +419,7 @@ fi
dnl
dnl Driver configuration. Options are xlib, dri and osmesa right now.
dnl More later: directfb, fbdev, ...
dnl More later: fbdev, ...
dnl
default_driver="xlib"
@@ -414,13 +453,16 @@ esac
dnl
dnl Driver specific build directories
dnl
SRC_DIRS="mesa glew"
dnl this variable will be prepended to SRC_DIRS and is not exported
CORE_DIRS="glsl mesa"
SRC_DIRS="glew"
GLU_DIRS="sgi"
WINDOW_SYSTEM=""
GALLIUM_DIRS="auxiliary drivers state_trackers"
GALLIUM_WINSYS_DIRS=""
GALLIUM_WINSYS_DRM_DIRS=""
GALLIUM_AUXILIARY_DIRS="rbug draw translate cso_cache pipebuffer tgsi sct rtasm util indices vl"
GALLIUM_DRIVERS_DIRS="softpipe failover trace identity"
GALLIUM_STATE_TRACKERS_DIRS=""
@@ -430,7 +472,7 @@ xlib)
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS xlib"
;;
dri)
SRC_DIRS="glx/x11 $SRC_DIRS"
SRC_DIRS="$SRC_DIRS glx"
DRIVER_DIRS="dri"
WINDOW_SYSTEM="dri"
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS drm"
@@ -447,10 +489,7 @@ AC_SUBST([GALLIUM_DIRS])
AC_SUBST([GALLIUM_WINSYS_DIRS])
AC_SUBST([GALLIUM_WINSYS_DRM_DIRS])
AC_SUBST([GALLIUM_DRIVERS_DIRS])
AC_SUBST([GALLIUM_AUXILIARY_DIRS])
AC_SUBST([GALLIUM_STATE_TRACKERS_DIRS])
AC_SUBST([RADEON_CFLAGS])
AC_SUBST([RADEON_LDFLAGS])
dnl
dnl User supplied program configuration
@@ -575,16 +614,10 @@ dri)
# Check for libdrm
PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED])
PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED])
GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED"
PKG_CHECK_MODULES([GLPROTO], [glproto >= $GLPROTO_REQUIRED])
GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED glproto >= $GLPROTO_REQUIRED"
DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED"
PKG_CHECK_MODULES([LIBDRM_RADEON], [libdrm_radeon libdrm >= $LIBDRM_RADEON_REQUIRED], HAVE_LIBDRM_RADEON=yes, HAVE_LIBDRM_RADEON=no)
if test "$HAVE_LIBDRM_RADEON" = yes; then
RADEON_CFLAGS="-DHAVE_LIBDRM_RADEON=1 $LIBDRM_RADEON_CFLAGS"
RADEON_LDFLAGS=$LIBDRM_RADEON_LIBS
fi
# find the DRI deps for libGL
if test "$x11_pkgconfig" = yes; then
# add xcb modules if necessary
@@ -693,10 +726,6 @@ yes)
;;
esac
dnl Just default to no EGL for now
USING_EGL=0
AC_SUBST([USING_EGL])
dnl Set DRI_DIRS, DEFINES and LIB_DEPS
if test "$mesa_driver" = dri; then
# Use TLS in GLX?
@@ -704,10 +733,6 @@ if test "$mesa_driver" = dri; then
DEFINES="$DEFINES -DGLX_USE_TLS -DPTHREADS"
fi
if test "x$USING_EGL" = x1; then
PROGRAM_DIRS="egl"
fi
# Platform specific settings and drivers to build
case "$host_os" in
linux*)
@@ -719,10 +744,9 @@ if test "$mesa_driver" = dri; then
case "$host_cpu" in
x86_64)
# ffb, gamma, and sis are missing because they have not be
# converted to use the new interface. i810 are missing
# because there is no x86-64 system where they could *ever*
# be used.
# sis is missing because they have not be converted to use
# the new interface. i810 are missing because there is no
# x86-64 system where they could *ever* be used.
if test "x$DRI_DIRS" = "xyes"; then
DRI_DIRS="i915 i965 mach64 mga r128 r200 r300 r600 radeon \
savage tdfx unichrome swrast"
@@ -738,7 +762,7 @@ if test "$mesa_driver" = dri; then
sparc*)
# Build only the drivers for cards that exist on sparc`
if test "x$DRI_DIRS" = "xyes"; then
DRI_DIRS="mach64 r128 r200 r300 r600 radeon ffb swrast"
DRI_DIRS="mach64 r128 r200 r300 r600 radeon swrast"
fi
;;
esac
@@ -754,8 +778,6 @@ if test "$mesa_driver" = dri; then
CXXFLAGS="$CXXFLAGS -ansi -pedantic"
fi
# ffb and gamma are missing because they have not been converted
# to use the new interface.
if test "x$DRI_DIRS" = "xyes"; then
DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \
unichrome savage sis swrast"
@@ -777,7 +799,7 @@ if test "$mesa_driver" = dri; then
# default drivers
if test "x$DRI_DIRS" = "xyes"; then
DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon \
savage sis tdfx unichrome ffb swrast"
savage sis tdfx unichrome swrast"
fi
DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/ */ /g'`
@@ -804,6 +826,29 @@ AC_SUBST([DRI_DIRS])
AC_SUBST([EXPAT_INCLUDES])
AC_SUBST([DRI_LIB_DEPS])
case $DRI_DIRS in
*i915*|*i965*)
PKG_CHECK_MODULES([INTEL], [libdrm_intel >= 2.4.19])
;;
esac
case $DRI_DIRS in
*radeon*|*r200*|*r300*|*r600*)
PKG_CHECK_MODULES([LIBDRM_RADEON],
[libdrm_radeon libdrm >= $LIBDRM_RADEON_REQUIRED],
HAVE_LIBDRM_RADEON=yes,
HAVE_LIBDRM_RADEON=no)
if test "$HAVE_LIBDRM_RADEON" = yes; then
RADEON_CFLAGS="-DHAVE_LIBDRM_RADEON=1 $LIBDRM_RADEON_CFLAGS"
RADEON_LDFLAGS=$LIBDRM_RADEON_LIBS
fi
;;
esac
AC_SUBST([RADEON_CFLAGS])
AC_SUBST([RADEON_LDFLAGS])
dnl
dnl OSMesa configuration
dnl
@@ -888,17 +933,28 @@ AC_ARG_ENABLE([egl],
[enable_egl=yes])
if test "x$enable_egl" = xyes; then
SRC_DIRS="$SRC_DIRS egl"
EGL_LIB_DEPS="$DLOPEN_LIBS -lpthread"
EGL_DRIVERS_DIRS=""
if test "$enable_static" != yes; then
# build egl_glx when libGL is built
if test "$mesa_driver" != osmesa; then
EGL_DRIVERS_DIRS="glx"
fi
if test "$x11_pkgconfig" = yes; then
PKG_CHECK_MODULES([EGL], [x11])
EGL_LIB_DEPS="$EGL_LIBS"
else
# should check these...
EGL_LIB_DEPS="$X_LIBS -lX11"
# build egl_dri2 when xcb-dri2 is available
PKG_CHECK_MODULES([EGL_DRI2], [x11-xcb xcb-dri2 xcb-xfixes libdrm],
[have_xcb_dri2=yes],[have_xcb_dri2=no])
if test "$have_xcb_dri2" = yes; then
EGL_DRIVERS_DIRS="$EGL_DRIVERS_DIRS dri2"
fi
fi
if test "$with_demos" = yes; then
PROGRAM_DIRS="$PROGRAM_DIRS egl"
fi
EGL_LIB_DEPS="$EGL_LIB_DEPS $DLOPEN_LIBS"
fi
AC_SUBST([EGL_LIB_DEPS])
AC_SUBST([EGL_DRIVERS_DIRS])
dnl
dnl GLU configuration
@@ -1149,7 +1205,7 @@ yes)
GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS egl"
fi
# Have only tested st/xorg on 1.6.0 servers
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.6.0],
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.6.0 libdrm >= $LIBDRM_XORG_REQUIRED libkms >= $LIBKMS_XORG_REQUIRED],
HAVE_XORG="yes"; GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS xorg",
HAVE_XORG="no")
;;
@@ -1162,19 +1218,69 @@ yes)
test -d "$srcdir/src/gallium/state_trackers/$tracker" || \
AC_MSG_ERROR([state tracker '$tracker' doesn't exist])
if test "$tracker" = egl && test "x$enable_egl" != xyes; then
AC_MSG_ERROR([cannot build egl state tracker without EGL library])
fi
if test "$tracker" = xorg; then
PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
HAVE_XEXTPROTO_71="yes"; DEFINES="$DEFINES -DHAVE_XEXTPROTO_71",
HAVE_XEXTPROTO_71="no")
fi
case "$tracker" in
egl)
if test "x$enable_egl" != xyes; then
AC_MSG_ERROR([cannot build egl state tracker without EGL library])
fi
;;
xorg)
PKG_CHECK_MODULES([LIBDRM_XORG], [libdrm >= $LIBDRM_XORG_REQUIRED])
PKG_CHECK_MODULES([LIBKMS_XORG], [libkms >= $LIBKMS_XORG_REQUIRED])
HAVE_XORG="yes"
;;
es)
# mesa/es is required to build es state tracker
CORE_DIRS="$CORE_DIRS mesa/es"
;;
esac
done
GALLIUM_STATE_TRACKERS_DIRS="$state_trackers"
;;
esac
if test "x$HAVE_XORG" = xyes; then
PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
HAVE_XEXTPROTO_71="yes"; DEFINES="$DEFINES -DHAVE_XEXTPROTO_71",
HAVE_XEXTPROTO_71="no")
fi
AC_ARG_WITH([egl-displays],
[AS_HELP_STRING([--with-egl-displays@<:@=DIRS...@:>@],
[comma delimited native displays libEGL supports, e.g.
"x11,kms" @<:@default=auto@:>@])],
[with_egl_displays="$withval"],
[with_egl_displays=yes])
EGL_DISPLAYS=""
case "$with_egl_displays" in
yes)
if test "x$enable_egl" = xyes && test "x$mesa_driver" != xosmesa; then
EGL_DISPLAYS="x11"
fi
;;
*)
if test "x$enable_egl" != xyes; then
AC_MSG_ERROR([cannot build egl state tracker without EGL library])
fi
# verify the requested driver directories exist
egl_displays=`IFS=', '; echo $with_egl_displays`
for dpy in $egl_displays; do
test -d "$srcdir/src/gallium/state_trackers/egl/$dpy" || \
AC_MSG_ERROR([EGL display '$dpy' does't exist])
done
EGL_DISPLAYS="$egl_displays"
;;
esac
AC_SUBST([EGL_DISPLAYS])
AC_ARG_WITH([egl-driver-dir],
[AS_HELP_STRING([--with-egl-driver-dir=DIR],
[directory for EGL drivers [[default=${libdir}/egl]]])],
[EGL_DRIVER_INSTALL_DIR="$withval"],
[EGL_DRIVER_INSTALL_DIR='${libdir}/egl'])
AC_SUBST([EGL_DRIVER_INSTALL_DIR])
AC_ARG_WITH([xorg-driver-dir],
[AS_HELP_STRING([--with-xorg-driver-dir=DIR],
[Default xorg driver directory[[default=${libdir}/xorg/modules/drivers]]])],
@@ -1221,10 +1327,10 @@ AC_ARG_ENABLE([gallium-intel],
[enable_gallium_intel="$enableval"],
[enable_gallium_intel=auto])
if test "x$enable_gallium_intel" = xyes; then
GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS intel"
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915"
GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS intel i965"
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915 i965"
elif test "x$enable_gallium_intel" = xauto; then
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915"
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915 i965"
fi
dnl
@@ -1234,10 +1340,12 @@ AC_ARG_ENABLE([gallium-radeon],
[AS_HELP_STRING([--enable-gallium-radeon],
[build gallium radeon @<:@default=disabled@:>@])],
[enable_gallium_radeon="$enableval"],
[enable_gallium_radeon=no])
[enable_gallium_radeon=auto])
if test "x$enable_gallium_radeon" = xyes; then
GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS radeon"
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
elif test "x$enable_gallium_radeon" = xauto; then
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
fi
dnl
@@ -1250,9 +1358,23 @@ AC_ARG_ENABLE([gallium-nouveau],
[enable_gallium_nouveau=no])
if test "x$enable_gallium_nouveau" = xyes; then
GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS nouveau"
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nv04 nv10 nv20 nv30 nv40 nv50"
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nv30 nv40 nv50"
fi
dnl
dnl Gallium swrast configuration
dnl
AC_ARG_ENABLE([gallium-swrast],
[AS_HELP_STRING([--enable-gallium-swrast],
[build gallium swrast @<:@default=disabled@:>@])],
[enable_gallium_swrast="$enableval"],
[enable_gallium_swrast=auto])
if test "x$enable_gallium_swrast" = xyes; then
GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS swrast"
fi
dnl prepend CORE_DIRS to SRC_DIRS
SRC_DIRS="$CORE_DIRS $SRC_DIRS"
dnl Restore LDFLAGS and CPPFLAGS
LDFLAGS="$_SAVE_LDFLAGS"
@@ -1306,7 +1428,6 @@ if echo "$SRC_DIRS" | grep 'gallium' >/dev/null 2>&1; then
echo " Gallium dirs: $GALLIUM_DIRS"
echo " Winsys dirs: $GALLIUM_WINSYS_DIRS"
echo " Winsys drm dirs:$GALLIUM_WINSYS_DRM_DIRS"
echo " Auxiliary dirs: $GALLIUM_AUXILIARY_DIRS"
echo " Driver dirs: $GALLIUM_DRIVERS_DIRS"
echo " Trackers dirs: $GALLIUM_STATE_TRACKERS_DIRS"
else
@@ -1317,7 +1438,11 @@ dnl Libraries
echo ""
echo " Shared libs: $enable_shared"
echo " Static libs: $enable_static"
echo " EGL: $enable_egl"
if test "$enable_egl" = yes; then
echo " EGL: $EGL_DRIVERS_DIRS"
else
echo " EGL: no"
fi
echo " GLU: $enable_glu"
echo " GLw: $enable_glw (Motif: $enable_motif)"
echo " glut: $enable_glut"

69
docs/GL3.txt Normal file
View File

@@ -0,0 +1,69 @@
Status of OpenGL 3.x features in Mesa
Note: when an item is marked as "DONE" it means all the core Mesa
infrastructure is complete but it may be the case that few (if any) drivers
implement the features.
Feature Status
----------------------------------------------------- ------------------------
GL 3.0:
GLSL changes (GL_EXT_gpu_shader4, etc) not started
Conditional rendering (GL_NV_conditional_render) DONE (swrast & softpipe)
Map buffer subranges (GL_APPLE_flush_buffer_range) not started
Float textures, renderbuffers some infrastructure done
Framebuffer objects (GL_EXT_framebuffer_object) DONE
Half-float some infrastructure done
Multisample blit DONE
Non-normalized Integer texture/framebuffer formats not started
1D/2D Texture arrays core Mesa, swrast done
Packed depth/stencil formats DONE
Per-buffer blend and masks (GL_EXT_draw_buffers2) DONE
GL_EXT_texture_compression_rgtc not started
Red and red/green texture formats Ian?
Transform feedback (GL_EXT_transform_feedback) not started
Vertex array objects (GL_APPLE_vertex_array_object) DONE
sRGB framebuffer format (GL_EXT_framebuffer_sRGB) not started
glClearBuffer commands DONE, except for dispatch
glGetStringi command DONE, except for dispatch
glTexParameterI, glGetTexParameterI commands DONE, except for dispatch
glVertexAttribI commands not started
glBindFragDataLocation, glGetFragDataLocation cmds not started
glBindBufferRange, glBindBufferBase commands not started
GL 3.1:
GLSL 1.30 and 1.40 not started
Instanced drawing (GL_ARB_draw_instanced) not started
Buffer copying (GL_ARB_copy_buffer) DONE
Primitive restart (GL_NV_primitive_restart) not started
16 vertex texture image units not started
Texture buffer objs (GL_ARB_textur_buffer_object) not started
Rectangular textures (GL_ARB_texture_rectangle) DONE
Uniform buffer objs (GL_ARB_uniform_buffer_object) not started
Signed normalized texture formats not started
GL 3.2:
Core/compatibility profiles not started
GLSL 1.50 not started
Geometry shaders (GL_ARB_geometry_shader4) partially done (Zack)
BGRA vertex order (GL_ARB_vertex_array_bgra) DONE
Base vertex offset(GL_ARB_draw_elements_base_vertex) DONE
Frag shader coord (GL_ARB_fragment_coord_conventions) not started
Provoking vertex (GL_ARB_provoking_vertex) DONE
Seamless cubemaps (GL_ARB_seamless_cube_map) DONE, mostly?
Multisample textures (GL_ARB_texture_multisample) not started
Frag depth clamp (GL_ARB_depth_clamp) DONE
Fence objects (GL_ARB_sync) DONE
More info about these features and the work involved can be found at
http://dri.freedesktop.org/wiki/MissingFunctionality

View File

@@ -43,7 +43,7 @@ Issues
New Procedures and Functions
int glXSwapIntervalMESA(int interval)
int glXSwapIntervalMESA(unsigned int interval)
int glXGetSwapIntervalMESA(void)
New Tokens
@@ -103,11 +103,8 @@ Additions to the GLX 1.3 Specification
Errors
glXSwapIntervalMESA returns GLX_BAD_VALUE if parameter <interval> is
less than zero.
glXSwapIntervalMESA returns GLX_BAD_CONTEXT if there is no current
GLXContext.
GLXContext or if the current context is not a direct rendering context.
GLX Protocol

View File

@@ -1,534 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Mini GLX Specification</title>
</head>
<body>
<h1>
<center>Mini GLX Specification</center>
</h1>
<h2>
<center>Tungsten Graphics, Inc.<br>
<br>
January 20, 2003<br>
<br>
</center>
</h2>
<p> Copyright &copy; 2002-2003 by Tungsten Graphics, Inc., Cedar Park,
Texas. All Rights Reserved. <br>
<br>
Permission is granted to make and distribute verbatim copies of this
document provided the copyright notice and this permission notice are
preserved on all copies.<br>
<br>
</p>
<h1>1. Introduction</h1>
<p>The Mini GLX interface facilitates OpenGL rendering on embedded
devices. The interface is a subset of the GLX interface, plus a minimal
set of Xlib-like functions.</p>
<p>Programs written to the Mini GLX specification should run unchanged
on systems with the X Window System and the GLX extension. The intention
is to allow flexibility for prototyping and testing.</p>
<p>This document serves as both the reference guide and programming
guide for Mini GLX.<br>
<br>
</p>
<h1>2. Mini GLX Concepts</h1>
<p>The OpenGL specification does not describe how OpenGL rendering
contexts and drawing surfaces (i.e. the frame buffer) are created and
managed. Rather, this is handled by an OpenGL window system interface,
such as Mini GLX.</p>
<p>There are three main datatypes or resources managed by Mini GLX. The
resources and their corresponding GLX or Xlib data types are:</p>
<table cellspacing="10" align="center">
<tbody>
<tr>
<td><u>Resource</u></td>
<td><u>Data type</u></td>
</tr>
<tr>
<td>pixel formats</td>
<td>X Visual and XVisualInfo</td>
</tr>
<tr>
<td>drawing surfaces</td>
<td>X Window or GLXDrawable</td>
</tr>
<tr>
<td>rendering contexts</td>
<td>GLXContext</td>
</tr>
</tbody>
</table>
<p>Pixel formats or X Visuals describe the per-pixel attributes of the
frame buffer. For example, bits per color component, Z buffer size,
stencil size, TrueColor vs PseudoColor, etc.</p>
<p>Drawing surfaces or X Windows typically describe a spatial
allocation of the frame buffer (i.e. the position and size of a
rectangular region of pixels). Since MiniGLX doesn't really support a
window system, the window is effectively the entire frame buffer.</p>
<p>A rendering context represents the current OpenGL state such as
current drawing color, line width, blending mode, texture parameters,
etc. Several rendering contexts can be created but only one can be in
use at any given time.</p>
<p>The Mini GLX interface provides all the functions needed for
choosing pixel formats, create drawing surfaces, creating rendering
contexts and binding rendering contexts to drawing surfaces.<br>
<br>
</p>
<h1>3. Using Mini GLX</h1>
<p>To use the Mini GLX interface in your application, include the
GL/miniglx.h header file at compile time:</p>
<blockquote><code> #include &lt;GL/miniglx.h&gt;<br>
</code></blockquote>
<code></code>Applications should link with libGL.so (i.e. <code>gcc
myprogram.o -lGL -o myprogram</code>). &nbsp;libGL.so implements the
MiniGLX API functions and, in turn, loads a hardware-specific device
driver (such as <code>radeon_dri.so</code>) at runtime. &nbsp;The
environment variable <code>LIBGL_DRIVERS_PATH</code> should name the
directory where these modules are located.<br>
<br>
The remainder of this section describes the MiniGLX API functions.<br>
<br>
<h2>3.1 Initialization</h2>
<p>The XOpenDisplay function is used to initialize the graphics system:</p>
<blockquote>
<pre>Display *XOpenDisplay(const char *displayname)<br></pre>
</blockquote>
<p>The <code>displayName</code> parameter is currently ignored in Mini
GLX. It is recommended that <code>NULL</code> be passed as the<code>displayName</code>
parameter.</p>
<p>If XOpenDisplay is able to initialize the graphics system a pointer
to a Display will be returned. Otherwise, NULL will be returned.</p>
<h2>3.2 Choosing a Visual</h2>
<p>A visual (i.e. pixel format) must be chosen before a drawing surface
or rendering context can be created. This is done with the
glXChooseVisual function:</p>
<blockquote>
<pre>XVisualInfo *glXChooseVisual(Display *dpy, int screen, const int *attribList)<br></pre>
</blockquote>
<p><code>dpy</code> is a pointer to the display returned by
XOpenDisplay. </p>
<p><code>screen</code> is currently ignored by Mini GLX and should be
zero. </p>
<p><code>attribList</code> is a list of GLX attributes which describe
the desired pixel format. It is terminated by the token <code>None</code>.
The attributes are as follows:</p>
<blockquote>
<dl>
<dt><code>GLX_USE_GL</code></dt>
<dd>This attribute should always be present in order to maintain
compatibility with GLX.</dd>
<dt><code>GLX_RGBA</code></dt>
<dd>If present, only RGBA pixel formats will be considered.
Otherwise, only color index formats are considered.</dd>
<dt><code>GLX_DOUBLEBUFFER</code></dt>
<dd>if present, only double-buffered pixel formats will be chosen.</dd>
<dt><code>GLX_RED_SIZE n</code></dt>
<dd>Must be followed by a non-negative integer indicating the
minimum number of bits per red pixel component that is acceptable.</dd>
<dt><code>GLX_GREEN_SIZE n</code></dt>
<dd>Must be followed by a non-negative integer indicating the
minimum number of bits per green pixel component that is acceptable.</dd>
<dt><code>GLX_BLUE_SIZE n</code></dt>
<dd>Must be followed by a non-negative integer indicating the
minimum number of bits per blue pixel component that is acceptable.</dd>
<dt><code>GLX_ALPHA_SIZE n</code></dt>
<dd>Must be followed by a non-negative integer indicating the
minimum number of bits per alpha pixel component that is acceptable.</dd>
<dt><code>GLX_STENCIL_SIZE n</code></dt>
<dd>Must be followed by a non-negative integer indicating the
minimum number of bits per stencil value that is acceptable.</dd>
<dt><code>None</code></dt>
<dd>This token is used to terminate the attribute list.</dd>
</dl>
</blockquote>
<p>glXChooseVisual will return a pointer to an XVisualInfo object which
most closely matches the requirements of the attribute list. If there
is no visual which matches the request, NULL will be returned.</p>
<p>Note that visuals with accumulation buffers and depth buffers are
not available.<br>
<br>
</p>
<h2>3.3 Creating a Drawing Surface</h2>
<p>Drawing surfaces are created as X windows. &nbsp;For Mini GLX,
windows are <i>full-screen</i>; they cover the entire frame buffer.
&nbsp;Also, Mini GLX imposes a limit of one window. A second window
cannot be created until the first one is destroyed.</p>
<h3>3.3.1 Window Creation</h3>
<p>The XCreateWindow function is used to create a drawing surface:</p>
<blockquote>
<pre>Window XCreateWindow( Display *display,<br> Window parent,<br> int x, int y,<br> unsigned int width, unsigned int height,<br> unsigned int borderWidth,<br> int depth,<br> unsigned int class,<br> Visual *visual,<br> unsigned long valuemask,<br> XSetWindowAttributes *attributes )<br></pre>
</blockquote>
<p>The parameters are as follows:</p>
<blockquote>
<dl>
<dt><code>display</code></dt>
<dd>A Display pointer, as returned by XOpenDisplay.</dd>
<dt><code>parent</code></dt>
<dd>The parent window for the new window. For Mini GLX, this
should be<code>RootWindow(dpy, 0)</code>.</dd>
<dt><code>x, y</code></dt>
<dd>The position of the window. For Mini GLX, both values should
be zero.</dd>
<dt><code>width, height</code></dt>
<dd>The size of the window. For Mini GLX, this specifies the
desired screen size such as 1024, 768 or 1280, 1024.</dd>
<dt><code>borderWidth</code></dt>
<dd>This parameter should be zero.</dd>
<dt><code>depth</code></dt>
<dd>The pixel depth for the window. For Mini GLX this should be
the depth found in the XVisualInfo object returned by <code>glxChooseVisual</code>.</dd>
<dt><code>class</code></dt>
<dd>The window class. For Mini GLX this value should be <code>InputOutput</code>.</dd>
<dt><code>visual</code></dt>
<dd>This parameter should be the <code>visual</code> field of the <code>XVisualInfo</code>
object returned by <code>glxChooseVisual</code>.</dd>
<dt><code>valuemask</code></dt>
<dd>This parameter indicates which fields of the <code>XSetWindowAttributes</code>
are to be used. For Mini GLX this is typically the bitmask<code>CWBackPixel
| CWBorderPixel | CWColormap</code>.</dd>
<dt><code>attributes</code></dt>
<dd>Initial window attributes. Of the fields in the <code>XSetWindowAttributes</code>
structure, the<code>background_pixel</code>, <code>border_pixel</code>
and <code>colormap</code> fields should be set. &nbsp;See the discussion
below regarding colormaps.</dd>
</dl>
</blockquote>
<p><code>XCreateWindow</code> will return a window handle if it succeeds
or zero if it fails.</p>
<h3>3.3.2 Window Mapping</h3>
<p>To display the window the XMapWindow function must be called:</p>
<blockquote>
<pre>void XMapWindow(Display *dpy, Window w)</pre>
</blockquote>
<p>This function does nothing in Mini GLX but is required for Xlib/GLX
compatibility</p>
<h3>3.3.3 Colormaps<br>
</h3>
<p>Xlib requires specification of a colormap when creating a window.
&nbsp;For purposes of interoperability, Mini GLX requires this as well,
though the colormap is not actually used. &nbsp;The XCreateColormap
function is used to create a colormap:</p>
<blockquote><code>Colormap XCreateColormap(Display *dpy, Window window,
Visual *visual, int alloc)</code><br>
<code></code></blockquote>
<p>The parameters are as follows:<br>
</p>
<blockquote>
<dl>
<dt><code>dpy</code></dt>
<dd>The display handle as returned by XOpenDisplay.</dd>
<dt><code>window</code></dt>
<dd> This parameter is ignored by Mini GLX but should be the value
returned by the <code>RootWindow(dpy, 0)</code> macro.<br>
</dd>
<dt><code>visual</code></dt>
<dd>This parameter is ignored by Mini GLX but should be the visual
field of the XVisualInfo object returned by glXChooseVisual. </dd>
<dt><code>alloc</code></dt>
<dd>This parameter is ignored by Mini GLX but should be set to <code>AllocNone</code>.</dd>
</dl>
</blockquote>
<br>
<h2>3.4 Creating a Rendering Context</h2>
<p>An OpenGL rendering context is created with the <code>glXCreateContext</code>
function:</p>
<blockquote>
<pre>GLXContext glXCreateContext(Display *dpy, XVisualInfo *visInfo, GLXContext shareList, Bool direct)<br></pre>
</blockquote>
<p>The parameters are as follows:</p>
<blockquote>
<dl>
<dt><code>dpy</code></dt>
<dd>The display handle as returned by XOpenDisplay.</dd>
<dt><code>visInfo</code></dt>
<dd>The visual as returned by glXChooseVisual.</dd>
<dt><code>shareList</code></dt>
<dd>If non-zero, texture objects and display lists are shared with
the named rendering context. If zero, texture objects and display lists
will (initially) be private to this context. They may be shared when a
subsequent context is created.</dd>
<dt><code>direct</code></dt>
<dd>Specifies whether direct or indirect rendering is desired. For
Mini GLX this value is ignored but it should be set to <code>True</code>.</dd>
</dl>
</blockquote>
<p><code>glXCreateContext</code> will return a GLXContext handle if it
succeeds or zero if it fails due to invalid parameter or insufficient
resources.<br>
<br>
</p>
<h2>3.5 Binding a Rendering Context</h2>
<p>The final step before beginning OpenGL rendering is to bind (i.e.
activate) a rendering context and drawing surface with the
glXMakeCurrent function:</p>
<blockquote>
<pre>Bool glXMakeCurrent(Display *dpy, GLXDrawable drawable, GLXContext ctx)<br></pre>
</blockquote>
<p>The parameters are as follows:</p>
<blockquote>
<dl>
<dt><code>dpy</code></dt>
<dd>The display handle, as returned by XOpenDisplay.</dd>
<dt><code>drawable</code></dt>
<dd>The window or drawable to bind to the rendering context. This
should be the value returned by XCreateWindow.</dd>
<dt><code>ctx</code></dt>
<dd>The rendering context to bind, as returned by glXCreateContext.</dd>
</dl>
</blockquote>
<p>If glXMakeCurrent succeeds True is returned. Otherwise False is
returned to indicate an invalid display, window or context parameter.</p>
<p>After the rendering context has been bound to the drawing surface
OpenGL rendering can begin.</p>
<p>The current rendering context may be unbound by calling
glXMakeCurrent with the window and context parameters set to zero.</p>
<p>An application may create any number of rendering contexts and bind
them as needed. Note that binding a rendering context is generally not a
light-weight operation. &nbsp;Most simple OpenGL applications create
only one rendering context.<br>
<br>
</p>
<h2>3.6 Color Buffer Swapping</h2>
<p>A double buffered window has two color buffers: a front buffer and a
back buffer. Normally, rendering is directed to the back buffer while
the front buffer is displayed. When rendering of a frame is finished
the front and back buffers are swapped to provide the illusion of
instanteous screen updates.</p>
<p>The color buffers for a particular window (i.e. drawable) may be
swapped with the glXSwapBuffers command:</p>
<blockquote>
<pre>void glXSwapBuffers(Display *dpy, GLXDrawable drawable)<br></pre>
</blockquote>
Any pending rendering commands will be completed before the buffer swap
takes place.<br>
<br>
Calling glXSwapBuffers on a window which is single-buffered has no
effect.<br>
<br>
<h2>3.7 Releasing Resources</h2>
<h3>3.7.1 Releasing Rendering Contexts</h3>
<p>A rendering context may be destroyed by calling glXDestroyContext:</p>
<blockquote>
<pre>void glXDestroyContext(Display *dpy, GLXContext ctx)<br></pre>
</blockquote>
<h3>3.7.2 Releasing Windows</h3>
<p>A window may be destroyed by calling XDestroyWindow:</p>
<blockquote>
<pre>void XDestroyWindow(Display *dpy, Window window)<br></pre>
</blockquote>
<h3>3.7.3 Releasing Visuals</h3>
<p>An XVisualInfo object may be freed by calling XFree:</p>
<blockquote>
<pre>void XFree(void *data)<br></pre>
</blockquote>
<h3>3.7.4 Releasing Colormaps</h3>
<p>A colormap may be freed by calling XFreeColormap:</p>
<blockquote>
<pre>void XFreeColormap(Display *dpy, Colormap colormap)<br></pre>
</blockquote>
<h3>3.7.4 Releasing Display Resources</h3>
<p>When the application is about to exit, the resources associated with
the graphics system can be released by calling XCloseDisplay:</p>
<blockquote>
<pre>void XCloseDisplay(Display *dpy)<br></pre>
</blockquote>
<p>The display handle becomes invalid at this point.<br>
<br>
</p>
<h2>3.8 Query Functions</h2>
<h3>3.8.1 Querying Available Visuals</h3>
A list of all available visuals can be obtained with the XGetVisualInfo
function:<br>
<br>
<div style="margin-left: 40px;"><code>XVisualInfo
*XGetVisualInfo(Display *dpy, long vinfo_mask, XVisualInfo
*vinfo_template, int *nitems_return)<br>
</code></div>
<br>
The parameters are as follows:<br>
<blockquote>
<dl>
<dt><code>dpy</code></dt>
<dd>The display handle, as returned by XOpenDisplay.</dd>
<dt><code>vinfo_mask</code></dt>
<dd>A bitmask indicating which fields of the vinfo_template are to
be matched. &nbsp;The value must be VisualScreenMask.</dd>
<dt><code>vinfo_template</code></dt>
<dd>A template whose fields indicate which visual attributes must
be matched by the results. &nbsp;The screen field of this structure must
be zero.</dd>
<dt><code>nitems_return</code></dt>
<dd>Returns the number of visuals returned. </dd>
</dl>
</blockquote>
The return value is the address of an array of all available visuals.<br>
<br>
An example of using XGetVisualInfo to get all available visuals follows:<br>
<br>
<div style="margin-left: 40px;"><code>XVisualInfo visTemplate, *results;</code><br>
<code>int numVisuals;</code><br>
<code>Display *dpy = XOpenDisplay(NULL);</code><br>
<code>visTemplate.screen = 0;</code><br>
<code>results = XGetVisualInfo(dpy, VisualScreenMask, &amp;visTemplate,
&amp;numVisuals);</code><br>
<code></code></div>
<br>
<h3>3.8.2 Querying Visual Attributes</h3>
<p>The GLX attributes of an X visual may be queried with the
glXGetConfig function:</p>
<blockquote>
<pre>int glXGetConfig(Display *dpy, XVisualInfo *vis, int attribute, int *value)<br></pre>
</blockquote>
<p>The parameters are as follows:</p>
<blockquote>
<dl>
<dt><code>dpy</code></dt>
<dd>The display handle, as returned by XOpenDisplay.</dd>
<dt><code>vis</code></dt>
<dd>The visual, as returned by glXChooseVisual.</dd>
<dt><code>attribute</code></dt>
<dd>The attribute to query. The attributes are listed below.</dd>
<dt><code>value</code></dt>
<dd>Pointer to an integer in which the result of the query will be
stored. </dd>
</dl>
</blockquote>
<p>The return value will be zero if no error occurs.<code>
&nbsp;GLX_INVALID_ATTRIBUTE</code> will be returned if the attribute
parameter is invalid.<code> &nbsp;GLX_BAD_VISUAL</code> will be returned
if the XVisualInfo parameter is invalid.</p>
<p>The following attributes may be queried:</p>
<blockquote>
<dl>
<dt><code>GLX_USE_GL</code></dt>
<dd>The result will be <code>True</code> or <code>False</code> to
indicate if OpenGL rendering is supported with the visual. Mini GLX
always return <code>True</code>.</dd>
<dt><code>GLX_RGBA</code></dt>
<dd>The result will be <code>True</code> for RGBA visuals or <code>False</code>
for color index visuals.</dd>
<dt><code>GLX_DOUBLEBUFFER</code></dt>
<dd>The result will be <code>True</code> if the visual has two
color buffers or <code>False</code> if the visual has one color buffer.</dd>
<dt><code>GLX_RED_SIZE</code></dt>
<dd>The result will be the number of red bits per pixel.</dd>
<dt><code>GLX_GREEN_SIZE</code></dt>
<dd>The result will be the number of green bits per pixel.</dd>
<dt><code>GLX_BLUE_SIZE</code></dt>
<dd>The result will be the number of blue bits per pixel.</dd>
<dt><code>GLX_ALPHA_SIZE</code></dt>
<dd>The result will be the number of alpha bits per pixel.</dd>
<dt><code>GLX_DEPTH_SIZE</code></dt>
<dd>The result will be the number of bits per Z value.</dd>
<dt><code>GLX_STENCIL_SIZE</code></dt>
<dd>The result will be the number of bits per stencil value.<br>
<br>
</dd>
</dl>
</blockquote>
<h3>3.8.3 Querying the Current Rendering Context</h3>
<p>The current rendering context can be queried with
glXGetCurrentContext: </p>
<blockquote>
<pre>GLXContext glXGetCurrentContext(void)<br></pre>
</blockquote>
<p>Zero will be returned if no context is currently bound.<br>
<br>
</p>
<h3>3.8.4 Querying the Current Drawable</h3>
<p>The current drawable (i.e. window or drawing surface) can be queried
with glXGetCurrentDrawable:</p>
<blockquote>
<pre>GLXDrawable glXGetCurrentDrawable(void)<br></pre>
</blockquote>
<p>Zero will be returned if no drawable is currently bound.<br>
<br>
</p>
<h3>3.8.5 Function Address Queries</h3>
<p>The glXGetProcAddress function will return the address of any
available OpenGL or Mini GLX function:</p>
<blockquote>
<pre>void *glXGetProcAddress(const GLubyte *procName)<br></pre>
</blockquote>
<p>If <code>procName</code> is a valid function name, a pointer to that
function will be returned. &nbsp;Otherwise, NULL will be returned.</p>
<p>The purpose of glXGetProcAddress is to facilitate using future
extensions to OpenGL or Mini GLX. If a future version of the library
adds new extension functions they'll be accessible via
glXGetProcAddress. The alternative is to hard-code calls to the new
functions in the application but doing so will prevent linking the
application with older versions of the library.<br>
<br>
</p>
<h2>3.9 Versioning</h2>
The Mini GLX version can be queried at run time with glXQueryVersion:
<blockquote>
<pre>Bool glXQueryVersion(Display *dpy, int *major, int *minor)<br></pre>
</blockquote>
<p><code>major</code> will be set to the major version number and<code>minor</code>
will be set to the minor version number.<code>True</code> will be
returned if the function succeeds. <code>False</code> will be returned
if the function fails due to invalid parameters. The <code>dpy</code>
argument is currently ignored, but should be the value returned by
XOpenDisplay.</p>
<p>At compile time, the Mini GLX interface version can be tested with
the MINI_GLX_VERSION_1_<i>x</i> preprocessor tokens. For example, if
version 1.0 of Mini GLX is supported, then<code> MINI_GLX_VERSION_1_0</code>
will be defined. If version 1.1 of Mini GLX is supported, then<code>
MINI_GLX_VERSION_1_1</code> will be defined.</p>
<p>At the time of writing the current Mini GLX version is 1.0.<br>
<br>
</p>
<h1>4.0 Interoperability with GLX and Xlib</h1>
While Mini GLX strives to be compatible with GLX and Xlib there are
some unavoidable differences which must be taken into consideration.<br>
<h2>4.1 Public vs Private Structures</h2>
The structure of many X data types is public. &nbsp;For example, the <code>Display</code>
data type is defined as a structure in /usr/include/X11/Xlib.h and
programmers may access any fields of that structure at will. &nbsp;Mini
GLX also defines a Display data type but its fields are hidden and not
visiblein <code>miniglx.h</code>. &nbsp;Duplicating the Xlib
declaration for the <code>Display</code> data type in minigl.h would
require defining a large number of other superfluous Xlib datatypes.<br>
<br>
Mini GLX users are discouraged from directly accessing the fields of
Xlib data types to maximize portability - though this is unavoidable to
some extent. &nbsp;For example, the <code>XVisualInfo</code> and <code>XSetWindowAtttributes</code>
data types must be completely public.
<h2>4.2 Macros</h2>
In some cases, Xlib defines macros which are meant to be used instead
of direct structure accesses. &nbsp;For example, the <code>RootWindow(dpy,
screen)</code> macro returns the root window for a given screen on a
given display. &nbsp;Unfortunately, macros do nothing to aid in ABI
compatibility since they are resolved at compile time instead of at
link/run time.<br>
<br>
Mini GLX also defines a <code>RootWindow</code> macro since it's
essential for creating windows. &nbsp;But the implementation of this
macro by Xlib and Mini GLX is completely different.<br>
<h2>4.3 Summary</h2>
Because Xlib and Mini GLX define data types and macros differently,
Mini GLX applications must be recompiled when retargeting Mini GLX or
native Xlib/GLX. &nbsp;That is, applications can't simply be re-linked
because of ABI incompatibilities.<br>
<br>
Nevertheless, the fact that Mini GLX programs can be recompiled for
Xlib and GLX increases portability and flexibility for testing and
prototyping.<br>
<br>
<h1>5.0 Example Program</h1>
<p>This section shows an example program which uses the Mini GLX
interface. The program simply draws several frames of a rotating square.<br>
</p>
<p>The program may be compiled for use with Xlib/GLX or Mini GLX by
setting the <code>USE_MINIGLX</code> token to 0 or 1, respectively.
&nbsp;Note that the only difference is the header files which are
included.<br>
</p>
<p> </p>
<pre><code><br></code>#define USE_MINIGLX 1 /* 1 = use Mini GLX, 0 = use Xlib/GLX */<br><br>#include &lt;stdio.h&gt;<br>#include &lt;stdlib.h&gt;<br>#include &lt;GL/gl.h&gt;<br><br>#if USE_MINIGLX<br>#include &lt;GL/miniglx.h&gt;<br>#else<br>#include &lt;GL/glx.h&gt;<br>#include &lt;X11/Xlib.h&gt;<br>#endif<br><br><code>/*<br> * Create a simple double-buffered RGBA window.<br> */<br>static Window<br>MakeWindow(Display * dpy, unsigned int width, unsigned int height)<br>{<br> int visAttributes[] = {<br> GLX_RGBA,<br> GLX_RED_SIZE, 1,<br> GLX_GREEN_SIZE, 1,<br> GLX_BLUE_SIZE, 1,<br> GLX_DOUBLEBUFFER,<br> None<br> };<br> XSetWindowAttributes attr;<br> unsigned long attrMask;<br> Window root;<br> Window win;<br> GLXContext ctx;<br> XVisualInfo *visinfo;<br><br> root = RootWindow(dpy, 0);<br><br> /* Choose GLX visual / pixel format */<br> visinfo = glXChooseVisual(dpy, 0, visAttributes);<br> if (!visinfo) {<br> printf("Error: couldn't get an RGB, Double-buffered visual\n");<br> exit(1);<br> }<br><br> /* Create the window */<br> attr.background_pixel = 0;<br> attr.border_pixel = 0;<br> attr.colormap = XCreateColormap(dpy, root, visinfo-&gt;visual, AllocNone);<br> attrMask = CWBackPixel | CWBorderPixel | CWColormap;<br> win = XCreateWindow(dpy, root, 0, 0, width, height,<br> 0, visinfo-&gt;depth, InputOutput,<br> visinfo-&gt;visual, attrMask, &amp;attr);<br> if (!win) {<br> printf("Error: XCreateWindow failed\n");<br> exit(1);<br> }<br><br> /* Display the window */<br> XMapWindow(dpy, win);<br><br> /* Create GLX rendering context */<br> ctx = glXCreateContext(dpy, visinfo, NULL, True);<br> if (!ctx) {<br> printf("Error: glXCreateContext failed\n");<br> exit(1);<br> }<br><br> /* Bind the rendering context and window */<br> glXMakeCurrent(dpy, win, ctx);<br><br> return win;<br>}<br><br><br>/*<br> * Draw a few frames of a rotating square.<br> */<br>static void<br>DrawFrames(Display * dpy, Window win)<br>{<br> int angle;<br> glShadeModel(GL_FLAT);<br> glClearColor(0.5, 0.5, 0.5, 1.0);<br> for (angle = 0; angle &lt; 360; angle += 10) {<br> glClear(GL_COLOR_BUFFER_BIT);<br> glColor3f(1.0, 1.0, 0.0);<br> glPushMatrix();<br> glRotatef(angle, 0, 0, 1);<br> glRectf(-0.8, -0.8, 0.8, 0.8);<br> glPopMatrix();<br> glXSwapBuffers(dpy, win);<br> }<br>}<br><br><br>int<br>main(int argc, char *argv[])<br>{<br> Display *dpy;<br> Window win;<br><br> dpy = XOpenDisplay(NULL);<br> if (!dpy) {<br> printf("Error: XOpenDisplay failed\n");<br> return 1;<br> }<br><br> win = MakeWindow(dpy, 300, 300);<br><br> DrawFrames(dpy, win);<br><br> return 0;<br>}<br></code></pre>
<br>
</body>
</html>

View File

@@ -644,7 +644,7 @@ Hints and Special Features:
- The Voodoo driver supports the GL_EXT_paletted_texture. it works
only with GL_COLOR_INDEX8_EXT, GL_RGBA palettes and the alpha value
is ignored because this is a limitation of the the current Glide
is ignored because this is a limitation of the current Glide
version and of the Voodoo hardware. See Mesa-3.1/3Dfx/demos/paltex.c for
a demo of this extension.

View File

@@ -1,124 +0,0 @@
DirectX 6 Driver for Mesa 3.0
This software is distributed under the terms of the GNU Library
General Public License, see the LICENSE file for details.
What do you need ?
------------------
- A PC with a DirectX 6 video driver installed.
- Mesa 3.0
- The 3Dfx Glide library 2.3 or later for your OS (the 2.4 works fine).
The Voodoo2 requires the Glide library 2.51. The Glide 3.0 is not
compatible with the Glide 2.x so it doesn't work with the current
version of the driver;
- Visual C++ 5.0 is only compiler test but others should be ok with
changes to the makefiles (CFLAGS/LFLAGS).
- DirectX 6 SDK (was a MS download but not sure if still available).
- SoftIce or another debugger that will get DPF's is nice.
Tested on:
----------
Windows 95
Windows 98
Windows NT 5.0 (beta 2)
What is able to do ?
--------------------
- the driver will try and use DirectX to rasterize the OpenGL primitives
that are sent to the driver. The driver will fall back to SW if the rendering
context is too big. The fallback to SW still uses DirectDraw. If the driver
fails to support and operation (accum, stencil, etc) then it will try and get
Mesa to render it in SW. DirectX 6 features that are unsupported by the
installed DirectX 6 driver will be mapped to some other best fit feature.
How to compile:
---------------
These instructions assume you have Visual C++ installed.
You might need to increase you enviroment space. You can do this by
adding the following statement to you config.sys.
shell=C:\COMMAND.COM C:\ /p /e:8198
Next setup you compiler enviroment by running vcvars32.bat in the Visual C++
'bin' directoy.
c:\DevStudio\VC\bin\vcvars32.bat
Modify the D3D makefile to point at your SDK install. Example has the SDK
installed on my 'f' drive in the root.
file: \Mesa-3.0\src\makefile.d3d
SDKROOT=f:\mssdk
Now you can simply make the project. If you look in the makefile you can see
I have some different targets like 'install'.
nmake /f makefile.d3d
FAQ:
----
1) I don't think the driver is using my DirectX driver.
This maybe true as the current version will only select the Primary D3D driver
installed. If you 3D card is the secondary (3dfx) then your out of luck for this
release.
2) The driver seems like its not HW accelerated.
If you have a video card with limited memory then you might want to try and
change your destop resolution to a low setting (640x480x16) so that the 3D part
of the card has more resources. Remeber the driver can't make the card better...
3) Nothing works.
Make sure you have a DirectX '6' driver installed. Check you driver docs for this
info or use the SDK info utilities.
The final 'dll' is named opengl32.dll and is either in the same directory as the
OpenGL program or in your system directory (x:\windows\system or x:\winnt\system32).
Check your destop resolution. Most DirectX 6 drivers will only support 16bit and
32bit color depth. To find out for sure you can check the DirectX Info Viewer in
the SDK.
4) Rendering doesn't look right.
Sometimes this is because the card doesn't support a feature that that is required.
This is usually due to unsupported alpha functions (test/blend) or texture mapping.
Some cards suffer from too small of an alpha channel. The driver does its best to
fallback on unsupported features. This is not to say the driver may not have a bug(s).
5) Textures look bad.
No mipmapping in this release.
Thanks to:
----------
Brian Paul
Leigh McRae (leigh@altsoftware.com)
February 9, 1999

View File

@@ -1,29 +0,0 @@
Mesa DirectFB Information
Requirements
============
To build Mesa with DirectFB (DirectFBGL) support you need:
- DirectFB at least 1.0.0 (http://directfb.org)
- pkg-config at least 0.9 (http://pkgconfig.sf.net)
Installation
============
Run
make linux-directfb
to build Mesa and DirectFBGL module,
make install
to install OpenGL libraries and
cd src/mesa/drivers/directfb ; make install
to install DirectFBGL module in the proper location.
Actually, that last command may not be needed. Please provide feedback.

View File

@@ -52,9 +52,12 @@ a:visited {
<b>User Topics</b>
<ul>
<li><a href="shading.html" target="MainFrame">Shading Language</a>
<li><a href="egl.html" target="MainFrame">EGL</a>
<li><a href="opengles.html" target="MainFrame">OpenGL ES</a>
<li><a href="openvg.html" target="MainFrame">OpenVG / Vega</a>
<LI><A HREF="envvars.html" target="MainFrame">Environment Variables</A>
<LI><A HREF="osmesa.html" target="MainFrame">Off-Screen Rendering</A>
<LI><A HREF="pbuffers.html" target="MainFrame">Pbuffer Rendering</A>
<LI><A HREF="debugging.html" target="MainFrame">Debugging Tips</A>
<LI><A HREF="perf.html" target="MainFrame">Performance Tips</A>
<LI><A HREF="extensions.html" target="MainFrame">Mesa Extensions</A>
@@ -65,8 +68,8 @@ a:visited {
<ul>
<li><a href="http://sourceforge.net/projects/mesa3d" target="_parent">SourceForge homepage</a>
<li><a href="repository.html" target="MainFrame">Source Code Repository</a>
<li><a href="sourcetree.html" target="MainFrame">Source Code Tree</a>
<li><a href="memory.html" target="MainFrame">DRI Memory Management</a>
<li><a href="shading.html" target="MainFrame">Shading Language</a>
<li><a href="glu.html" target="MainFrame">SGI's GLU</a>
<li><a href="utilities.html" target="MainFrame">Utilities</a>
<li><a href="helpwanted.html" target="MainFrame">Help Wanted</a>
@@ -89,7 +92,6 @@ a:visited {
<li><a href="modelers.html" target="MainFrame">Modeling and Rendering</a>
<li><a href="science.html" target="MainFrame">Science and Technical</a>
<li><a href="utility.html" target="MainFrame">Utilities</a>
<li><a href="demos.html" target="MainFrame">Demos / other</a>
</ul>
<b>Hosted by:</b>

View File

@@ -1,18 +0,0 @@
<HTML>
<TITLE>Demos</TITLE>
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Demos</H1>
<ul>
<li><a href="http://www.geocities.com/shobhand/homepage.html">Shobhan Dutta's Geartrain and Walkthrough Demos</a>
</li></ul>
</body>
</html>

View File

@@ -107,7 +107,7 @@ Global variables are not allowed.
Function name examples:
</p>
<pre>
glFooBar() - a public GL entry point (in dispatch.c)
glFooBar() - a public GL entry point (in glapi_dispatch.c)
_mesa_FooBar() - the internal immediate mode function
save_FooBar() - retained mode (display list) function in dlist.c
foo_bar() - a static (private) function

View File

@@ -199,7 +199,7 @@ few preprocessor defines.</p>
<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>SOLARIS_THREADS</tt>, <tt>WIN32_THREADS</tt>, or <tt>BEOS_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>
@@ -244,8 +244,8 @@ isn't a significant problem.</p>
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>
<tt>src/mesa/glapi/glapi_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>

324
docs/egl.html Normal file
View File

@@ -0,0 +1,324 @@
<html>
<title>Mesa EGL</title>
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
<body>
<h1>Mesa EGL</h1>
<p>The current version of EGL in Mesa implements EGL 1.4. More information
about EGL can be found at
<a href="http://www.khronos.org/egl/" target="_parent">
http://www.khronos.org/egl/</a>.</p>
<p>The Mesa's implementation of EGL uses a driver architecture. The main
library (<code>libEGL</code>) is window system neutral. It provides the EGL
API entry points and helper functions for use by the drivers. Drivers are
dynamically loaded by the main library and most of the EGL API calls are
directly dispatched to the drivers.</p>
<p>The driver in use decides the window system to support. For drivers that
support hardware rendering, there are usually multiple drivers supporting the
same window system. Each one of of them supports a certain range of graphics
cards.</p>
<h2>Build EGL</h2>
<ol>
<li>
<p>Run <code>configure</code> with the desired state trackers and enable
the Gallium driver for your hardware. For example</p>
<pre>
$ ./configure --with-state-trackers=egl,es,vega --enable-gallium-{swrast,intel}
</pre>
<p>The main library will be enabled by default. The <code>egl</code> state
tracker is needed by a number of EGL drivers. EGL drivers will be covered
later. The <a href="opengles.html">es state tracker</a> provides OpenGL ES 1.x
and 2.x and the <a href="openvg.html">vega state tracker</a> provides OpenVG
1.x.</p>
</li>
<li>Build and install Mesa as usual.</li>
</ol>
<p>In the given example, it will build and install <code>libEGL</code>,
<code>libGLESv1_CM</code>, <code>libGLESv2</code>, <code>libOpenVG</code>, and
one or more EGL drivers.</p>
<h3>Configure Options</h3>
<p>There are several options that control the build of EGL at configuration
time</p>
<ul>
<li><code>--enable-egl</code>
<p>By default, EGL is enabled. When disabled, the main library and the drivers
will not be built.</p>
</li>
<li><code>--with-egl-driver-dir</code>
<p>The directory EGL drivers should be installed to. If not specified, EGL
drivers will be installed to <code>${libdir}/egl</code>.</p>
</li>
<li><code>--with-egl-displays</code>
<p>List the window system(s) to support. It is by default <code>x11</code>,
which supports the X Window System. Its argument is a comma separated string
like, for example, <code>--with-egl-displays=x11,kms</code>. Because an EGL
driver decides which window system to support, this example will enable two
(sets of) EGL drivers. One supports the X window system and the other supports
bare KMS (kernel modesetting).</p>
</li>
<li><code>--with-state-trackers</code>
<p>The argument is a comma separated string. It is usually used to specify the
rendering APIs, like OpenGL ES or OpenVG, to build. But it should be noted
that a number of EGL drivers depend on the <code>egl</code> state tracker.
They will <em>not</em> be built without the <code>egl</code> state tracker.</p>
</li>
<li><code>--enable-gallium-swrast</code>
<p>This option is not specific to EGL. But if there is no driver for your
hardware, or you are experiencing problems with the hardware driver, you can
enable the swrast DRM driver. It is a dummy driver and EGL will fallback to
software rendering automatically.</p>
</li>
</ul>
<h3>OpenGL</h3>
<p>The OpenGL state tracker is not built in the above example. It should be
noted that the classic <code>libGL</code> is not a state tracker and cannot be
used with EGL (unless the EGL driver in use is <code>egl_glx</code>). To build
the OpenGL state tracker, one may append <code>glx</code> to
<code>--with-state-trackers</code> and manually build
<code>src/gallium/winsys/xlib/</code>.</p>
<h2>Use EGL</h2>
<p> The demos for OpenGL ES and OpenVG can be found in <code>progs/es1/</code>,
<code>progs/es2/</code> and <code>progs/openvg/</code>. You can use them to
test your build. For example,</p>
<pre>
$ cd progs/es1/xegl
$ make
$ ./torus
</pre>
<h3>Environment Variables</h3>
<p>There are several environment variables that control the behavior of EGL at
runtime</p>
<ul>
<li><code>EGL_DRIVERS_PATH</code>
<p>By default, the main library will look for drivers in the directory where
the drivers are installed to. This variable specifies a list of
colon-separated directories where the main library will look for drivers, in
addition to the default directory. This variable is ignored for setuid/setgid
binaries.</p>
</li>
<li><code>EGL_DRIVER</code>
<p>This variable specifies a full path to an EGL driver and it forces the
specified EGL driver to be loaded. It comes in handy when one wants to test a
specific driver. This variable is ignored for setuid/setgid binaries.</p>
</li>
<li><code>EGL_DISPLAY</code>
<p>When <code>EGL_DRIVER</code> is not set, the main library loads <em>all</em>
EGL drivers that support a certain window system. <code>EGL_DISPLAY</code> can
be used to specify the window system and the valid values are, for example,
<code>x11</code> or <code>kms</code>. When the variable is not set, the main
library defaults the value to the first window system listed in
<code>--with-egl-displays</code> at configuration time.
</li>
<li><code>EGL_LOG_LEVEL</code>
<p>This changes the log level of the main library and the drivers. The valid
values are: <code>debug</code>, <code>info</code>, <code>warning</code>, and
<code>fatal</code>.</p>
</li>
<li><code>EGL_SOFTWARE</code>
<p>For drivers that support both hardware and software rendering, setting this
variable to true forces the use of software rendering.</p>
</li>
</ul>
<h2>EGL Drivers</h2>
<p>There are two categories of EGL drivers: Gallium and classic.</p>
<p>Gallium EGL drivers supports all rendering APIs specified in EGL 1.4. The
support for optional EGL functions and EGL extensions is usually more complete
than the classic ones. These drivers depend on the <code>egl</code> state
tracker to build. The available drivers are</p>
<ul>
<li><code>egl_&lt;dpy&gt;_i915</code></li>
<li><code>egl_&lt;dpy&gt;_i965</code></li>
<li><code>egl_&lt;dpy&gt;_radeon</code></li>
<li><code>egl_&lt;dpy&gt;_nouveau</code></li>
<li><code>egl_&lt;dpy&gt;_swrast</code></li>
<li><code>egl_&lt;dpy&gt;_vmwgfx</code></li>
</ul>
<p><code>&lt;dpy&gt;</code> is given by <code>--with-egl-displays</code> at
configuration time. There will be one EGL driver for each combination of the
displays listed and the hardware drivers enabled.</p>
<p>Classic EGL drivers, on the other hand, supports only OpenGL as its
rendering API. They can be found under <code>src/egl/drivers/</code>. There
are 3 of them</p>
<ul>
<li><code>egl_glx</code>
<p>This driver provides a wrapper to GLX. It uses exclusively GLX to implement
the EGL API. It supports both direct and indirect rendering when the GLX does.
It is accelerated when the GLX is. As such, it cannot provide functions that
is not available in GLX or GLX extensions.</p>
</li>
<li><code>egl_dri2</code>
<p>This driver supports the X Window System as its window system. It functions
as a DRI2 driver loader. Unlike <code>egl_glx</code>, it has no dependency on
<code>libGL</code>. It talks to the X server directly using DRI2 protocol.</p>
</li>
<li><code>egl_dri</code>
<p>This driver lacks maintenance and does <em>not</em> build. It is similiar
to <code>egl_dri2</code> in that it functions as a DRI(1) driver loader. But
unlike <code>egl_dri2</code>, it supports Linux framebuffer devices as its
window system and supports EGL_MESA_screen_surface extension. As DRI1 drivers
are phasing out, it might eventually be replaced by <code>egl_dri2</code>.</p>
</li>
</ul>
<p>To use the classic drivers, one must manually set <code>EGL_DRIVER</code> at
runtime.</p>
<h2>Developers</h2>
<p>The sources of the main library and the classic drivers can be found at
<code>src/egl/</code>. The sources of the <code>egl</code> state tracker can
be found at <code>src/gallium/state_trackers/egl/</code>.</p>
<p>The suggested way to learn to write a EGL driver is to see how other drivers
are written. <code>egl_glx</code> should be a good reference. It works in any
environment that has GLX support, and it is simpler than most drivers.</p>
<h3>Lifetime of Display Resources</h3>
<p>Contexts and surfaces are examples of display resources. They might live
longer than the display that creates them.</p>
<p>In EGL, when a display is terminated through <code>eglTerminate</code>, all
display resources should be destroyed. Similarly, when a thread is released
throught <code>eglReleaseThread</code>, all current display resources should be
released. Another way to destory or release resources is through functions
such as <code>eglDestroySurface</code> or <code>eglMakeCurrent</code>.</p>
<p>When a resource that is current to some thread is destroyed, the resource
should not be destroyed immediately. EGL requires the resource to live until
it is no longer current. A driver usually calls
<code>eglIs&lt;Resource&gt;Bound</code> to check if a resource is bound
(current) to any thread in the destroy callbacks. If it is still bound, the
resource is not destroyed.</p>
<p>The main library will mark destroyed current resources as unlinked. In a
driver's <code>MakeCurrent</code> callback,
<code>eglIs&lt;Resource&gt;Linked</code> can then be called to check if a newly
released resource is linked to a display. If it is not, the last reference to
the resource is removed and the driver should destroy the resource. But it
should be careful here because <code>MakeCurrent</code> might be called with an
uninitialized display.</p>
<p>This is the only mechanism provided by the main library to help manage the
resources. The drivers are responsible to the correct behavior as defined by
EGL.</p>
<h3><code>EGL_RENDER_BUFFER</code></h3>
<p>In EGL, the color buffer a context should try to render to is decided by the
binding surface. It should try to render to the front buffer if the binding
surface has <code>EGL_RENDER_BUFFER</code> set to
<code>EGL_SINGLE_BUFFER</code>; If the same context is later bound to a
surface with <code>EGL_RENDER_BUFFER</code> set to
<code>EGL_BACK_BUFFER</code>, the context should try to render to the back
buffer. However, the context is allowed to make the final decision as to which
color buffer it wants to or is able to render to.</p>
<p>For pbuffer surfaces, the render buffer is always
<code>EGL_BACK_BUFFER</code>. And for pixmap surfaces, the render buffer is
always <code>EGL_SINGLE_BUFFER</code>. Unlike window surfaces, EGL spec
requires their <code>EGL_RENDER_BUFFER</code> values to be honored. As a
result, a driver should never set <code>EGL_PIXMAP_BIT</code> or
<code>EGL_PBUFFER_BIT</code> bits of a config if the contexts created with the
config won't be able to honor the <code>EGL_RENDER_BUFFER</code> of pixmap or
pbuffer surfaces.</p>
<p>It should also be noted that pixmap and pbuffer surfaces are assumed to be
single-buffered, in that <code>eglSwapBuffers</code> has no effect on them. It
is desirable that a driver allocates a private color buffer for each pbuffer
surface created. If the window system the driver supports has native pbuffers,
or if the native pixmaps have more than one color buffers, the driver should
carefully attach the native color buffers to the EGL surfaces, re-route them if
required.</p>
<p>There is no defined behavior as to, for example, how
<code>glDrawBuffer</code> interacts with <code>EGL_RENDER_BUFFER</code>. Right
now, it is desired that the draw buffer in a client API be fixed for pixmap and
pbuffer surfaces. Therefore, the driver is responsible to guarantee that the
client API renders to the specified render buffer for pixmap and pbuffer
surfaces.</p>
<h3><code>EGLDisplay</code> Mutex</h3>
The <code>EGLDisplay</code> will be locked before calling any of the dispatch
functions (well, except for GetProcAddress which does not take an
<code>EGLDisplay</code>). This guarantees that the same dispatch function will
not be called with the sample display at the same time. If a driver has access
to an <code>EGLDisplay</code> without going through the EGL APIs, the driver
should as well lock the display before using it.
<h3>TODOs</h3>
<ul>
<li>Pass the conformance tests</li>
<li>Better automatic driver selection: <code>EGL_DISPLAY</code> loads all
drivers and might eat too much memory.</li>
</ul>
</body>
</html>

View File

@@ -51,5 +51,28 @@ See the <A HREF="xlibdriver.html">Xlib software driver page</A> for details.
</ul>
<p>
These environment variables are for the Intel i945/i965 drivers:
</p>
<ul>
<li>INTEL_STRICT_CONFORMANCE - if set to 1, enable sw fallbacks to improve
OpenGL conformance. If set to 2, always use software rendering.
<li>INTEL_NO_BLIT - if set, disable hardware-accelerated glBitmap,
glCopyPixels, glDrawPixels.
</ul>
<p>
These environment variables are for the Radeon R300 driver:
</p>
<ul>
<li>R300_NO_TCL - if set, disable hardware-accelerated Transform/Clip/Lighting.
</ul>
<p>
Mesa EGL supports different sets of environment variables. See the
<a href="egl.html">Mesa EGL</a> page for the details.
</p>
</BODY>
</HTML>

View File

@@ -351,20 +351,11 @@ example linux or windows, <i>machine</i> is x86 or x86_64, optionally followed
by -debug for debug builds.
</p>
<p>
The sample programs are built seperately. To build them do
<pre>
scons -C progs
</pre>
And the build output will be placed in progs/build/...
</p>
<p>
To build Mesa with SCons for Windows on Linux using the MinGW crosscompiler toolchain do
</p>
<pre>
scons platform=windows toolchain=crossmingw machine=x86 statetrackers=mesa drivers=softpipe,trace winsys=gdi
scons -C progs platform=windows toolchain=crossmingw machine=x86 -k
</pre>
<p>
This will create:

View File

@@ -13,36 +13,41 @@
</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 and DRI.
Newbie questions are appropriate, but please try the general OpenGL
target="_parent">mesa3d-users</a> - intended for end-users of Mesa and DRI
drivers. Newbie questions are OK, but please try the general OpenGL
resources and Mesa/DRI documentation first.
</li>
<br>
<li><a href="https://lists.sourceforge.net/lists/listinfo/mesa3d-dev"
target="_parent">mesa3d-dev</a> - for discussion of Mesa and Direct Rendering
Infrastructure development. Not for beginners.
target="_parent">mesa3d-dev</a> - for Mesa, Gallium and DRI development
discussion. 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).
In general, people should not post to this list.
</li>
<br>
Note: the old mesa3d-cvs list is no longer in use.
<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. Very low traffic.
</li>
</ul>
<p>
Follow the links above for list archives.
</p>
<p>For mailing lists about Direct Rendering Modules (drm) in Linux/BSD
kernels, see <a href="http://dri.freedesktop.org/wiki/MailingLists">wiki</a>.
kernels, see the
<a href="http://dri.freedesktop.org/wiki/MailingLists" target="_parent">
DRI wiki</a>.
</p>
<p>
<b>Notice</b>: non-member posts to any of these lists will be automatically
rejected.
<b>Notice</b>: You must subscribe to these lists in order to post to them.
</p>

View File

@@ -10,6 +10,27 @@
<H1>News</H1>
<h2>April 5, 2010</h2>
<p>
<a href="relnotes-7.8.1.html">Mesa 7.8.1</a> is released. This is a bug-fix
release for a few critical issues in the 7.8 release.
</p>
<h2>March 28, 2010</h2>
<p>
<a href="relnotes-7.7.1.html">Mesa 7.7.1</a> is released. This is a bug-fix
release fixing issues found in the 7.7 release.
</p>
<p>
Also, <a href="relnotes-7.8.html">Mesa 7.8</a> is released. This is a new
development release.
</p>
<h2>December 21, 2009</h2>
<p>
<a href="relnotes-7.6.1.html">Mesa 7.6.1</a> is released. This is a bug-fix

79
docs/opengles.html Normal file
View File

@@ -0,0 +1,79 @@
<html>
<title>OpenGL ES State Trackers</title>
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
<body>
<h1>OpenGL ES State Trackers</h1>
<p>The current version of the OpenGL ES state trackers implement OpenGL ES 1.1 and OpenGL ES 2.0.
More informations about OpenGL ES can be found at
<a href="http://www.khronos.org/opengles/" target="_parent">
http://www.khronos.org/opengles/</a>.</p>
<p>The OpenGL ES state trackers depends on the Gallium architecture and a
working EGL implementation. Please refer to <a href="egl.html">Mesa EGL</a>
for more information about EGL.</p>
<h2>Build the Libraries</h2>
<ol>
<li>Run <code>configure</code> with <code>--with-state-trackers=egl,es</code> and enable the Gallium driver for your hardware.</li>
<li>Build and install Mesa as usual.</li>
</ol>
<p>It will install libGLESv1_CM, libGLESv2, libEGL, and one or more EGL drivers for your hardware.</p>
<h2>Run the Demos</h2>
<p>There are some demos in <code>progs/es1/</code> and <code>progs/es2/</code>. You can use them to test your build. For example,</p>
<pre>
$ cd progs/es1/xegl
$ make
$ ./torus
</pre>
<h2>Developers</h2>
<p>The core of OpenGL ES state trackers is the ES overlay. It is located in
<code>src/mesa/es/</code>.</p>
<h3>Structure</h3>
<p>The ES overlay uses as much code as possible from Mesa. It has its own glapi XMLs to describe the APIs of OpenGL ES. The ES overlay can be built parallelly with Mesa, and they will give</p>
<table border="1">
<tr><td>Library Name</td><td>Usage</td><td>Source</td></tr>
<tr><td>libmesagallium.a</td><td>OpenGL state tracker</td><td>Mesa</td></tr>
<tr><td>libes1gallium.a</td><td>OpenGL ES 1.x state tracker</td><td>ES overlay</td></tr>
<tr><td>libes2gallium.a</td><td>OpenGL ES 2.x state tracker</td><td>ES overlay</td></tr>
<tr><td>libglapi.a</td><td>OpenGL API</td><td>Mesa</td></tr>
<tr><td>libes1api.a</td><td>OpenGL ES 1.x API</td><td>ES overlay</td></tr>
<tr><td>libes2api.a</td><td>OpenGL ES 2.x API</td><td>ES overlay</td></tr>
</table>
<p>The OpenGL ES state trackers and APIs are then used by <code>src/gallium/state_trackers/es/</code> to create the final libraries.</p>
<h3>Dispatch Table</h3>
<p>The ES overlay uses an additional indirection when dispatching fucntions</p>
<pre>
Mesa: glFoo() --&gt; _mesa_Foo()
ES overlay: glFoo() --&gt; _es_Foo() --&gt; _mesa_Foo()
</pre>
<p>The indirection serves several purposes</p>
<ul>
<li>When a function is in Mesa and the type matches, it checks the arguments and calls the Mesa function.</li>
<li>When a function is in Mesa but the type mismatches, it checks and converts the arguments before calling the Mesa function.</li>
<li>When a function is not available in Mesa, or accepts arguments that are not available in OpenGL, it provides its own implementation.</li>
</ul>
<p>Other than the last case, the ES overlay uses <code>APIspec.xml</code> to generate functions to check and/or converts the arguments.</p>
</body>
</html>

View File

@@ -1,6 +1,6 @@
<HTML>
<TITLE>Mesa Release Notes</TITLE>
<TITLE>OpenVG State Tracker</TITLE>
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
@@ -20,12 +20,13 @@ http://www.khronos.org/openvg/</a> .
</p>
<p>
The OpenVG state tracker depends on the Gallium architecture and a working EGL implementation.
Please refer to <a href="egl.html">Mesa EGL</a> for more information about EGL.
</p>
<h2>Building the library</h2>
<ol>
<li>Build Mesa3D with Gallium3D. Any build that builds Gallium3D libraries and EGL will suffice</li>
<li>Build Mesa3D with Gallium3D. Any build that builds Gallium3D libraries, EGL, and Gallium EGL drivers will suffice</li>
<li>cd src/gallium/state_trackers/vega; make</li>
<li>The last step will build libOpenVG library. You can add the libdir to LD_LIBRARY_PATH or install libOpenVG</li>
</ol>
@@ -33,12 +34,9 @@ The OpenVG state tracker depends on the Gallium architecture and a working EGL i
<h3>Sample build</h3>
A sample build looks as follows:
<pre>
make linux-x86-64-debug
cd src/gallium/state_trackers/vega
make
cd ../../../..
export LD_LIBRARY_PATH=$PWD/lib64
export EGL_DRIVER="egl_softpipe"
$ ./configure --with-state-trackers=egl,vega --enable-gallium-intel
$ make
$ make install
</pre>
<h2>OpenVG Demos</h2>
@@ -59,10 +57,5 @@ To run a demo:
</pre>
<h2>Notes</h2>
<ul>
<li>EGL_DRIVER environmental variable: forces usage of a specific EGL driver. Unless you force egl_softpipe the implementation will look for a DRI hardware accelerate driver and unless you have a Gallium driver that supports it, you'll see crashes</li>
</ul>
</body>
</html>

View File

@@ -26,7 +26,7 @@ more information about the API functions.
</p>
<p>
There are several examples of OSMesa in the <code>progs/osdemo/</code>
There are several examples of OSMesa in the <code>progs/osdemos/</code>
directory.
</p>

View File

@@ -1,54 +0,0 @@
<HTML>
<TITLE>PBuffer Rendering</TITLE>
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>PBuffer Rendering</H1>
<p>
Basically, FBconfigs and PBuffers allow you to do off-screen rendering
with OpenGL. The OSMesa interface does basically the same thing, but
fbconfigs and pbuffers are supported by more vendors.
PBuffer rendering may also be hardware accelerated.
</p>
<p>
PBuffers are getting more use nowadays, though they've actually been
around for a long time on IRIX systems and other workstations.
</p>
<p>
The
<a href="http://oss.sgi.com/projects/ogl-sample/registry/SGIX/fbconfig.txt"
target="_parent">GL_SGIX_fbconfig</a>
and
<a href="http://oss.sgi.com/projects/ogl-sample/registry/SGIX/pbuffer.txt"
target="_parent">
GL_SGIX_pbuffer</a> extensions describe the functionality.
More recently, these extensions have been promoted to ARB extensions (on
Windows at least).
</p>
<p>
The Mesa/progs/xdemos/ directory has some useful code for working
with pbuffers:
</p>
<ul>
<li><b>pbinfo.c</b> - like glxinfo, it prints a list of available
fbconfigs and whether each supports pbuffers.
<li><b>pbutil.c</b> - a few utility functions for dealing with
fbconfigs and pbuffers.
<li><b>pbdemo.c</b> - a demonstration of off-screen rendering with pbuffers.
</ul>
<p>
Mesa 4.1 and later support GL_SGIX_fbconfig and GL_SGIX_pbuffer (software
rendering only).
</p>
</BODY>
</HTML>

View File

@@ -8,7 +8,7 @@
<body bgcolor="#eeeeee">
<H1>Mesa 7.7.1 Release Notes / date tbd</H1>
<H1>Mesa 7.7.1 Release Notes / March 28, 2010</H1>
<p>
Mesa 7.7.1 is a bug-fix release.
@@ -26,16 +26,18 @@ for DRI hardware acceleration.
<h2>MD5 checksums</h2>
<pre>
tbd
3ab0638cfa7ce8157337a229cf0db2c4 MesaLib-7.7.1.tar.gz
46664d99e03f1e3ac078a7fea02af115 MesaLib-7.7.1.tar.bz2
4e73ba8abb59aff79485eb95d7cefff7 MesaLib-7.7.1.zip
bf1b108983995f7a712cf3343df1c918 MesaDemos-7.7.1.tar.gz
aeb39645d80d656e0adebaa09e5bcd03 MesaDemos-7.7.1.tar.bz2
01c49b7454fd292244eaf8bdc6ed8cf0 MesaDemos-7.7.1.zip
37ec6386693dcb6dc770d1efd63a7a93 MesaGLUT-7.7.1.tar.gz
1e16c85282f843791a21f7bc7b6a1ca8 MesaGLUT-7.7.1.tar.bz2
d352c9e36a8e4d1059f4abc017b131e0 MesaGLUT-7.7.1.zip
</pre>
<h2>New features</h2>
<ul>
<li>tbd
</ul>
<h2>Bug fixes</h2>
<ul>
<li>Assorted fixes to VMware SVGA gallium driver.
@@ -43,6 +45,14 @@ tbd
<li>Allocate constants more tightly in GL_ARB_vertex/fragment parser.
<li>Fixed mipmap generation bug caused by invalid viewport state.
<li>Gallium SSE codegen for XPD didn't always work.
<li>Fixed Windows build.
<li>Fixed broken glMultiDrawElements().
<li>Silence bogus GL errors generated in glxinfo.
<li>Fixed several render to texture bugs.
<li>Assorted bug fixes in Mesa/Gallium state tracker including
glCopy/DrawPixels() to FBOs.
<li>Assorted fixes to Gallium drivers.
<li>Fixed broken glPush/PopClientAttrib() for vertex arrays in GLX code.
</ul>

62
docs/relnotes-7.8.1.html Normal file
View File

@@ -0,0 +1,62 @@
<HTML>
<TITLE>Mesa Release Notes</TITLE>
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<body bgcolor="#eeeeee">
<H1>Mesa 7.8.1 Release Notes / April, 5, 2010</H1>
<p>
Mesa 7.8.1 fixes a couple critical bugs in the recent Mesa 7.8 release. Even
though this is a bug fix release, given its proximity to the 7.8 release, a
new development release, it should also be considered new development release.
People who are concerned with stability and reliability should stick
with a previous release, such as 7.7.1, or wait for Mesa 7.8.2.
</p>
<p>
Mesa 7.8.1 implements the OpenGL 2.1 API, but the version reported by
glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
<h2>MD5 checksums</h2>
<pre>
62e8e47cbd63741b4bbe634dcdc8a56a MesaLib-7.8.1.tar.gz
25ec15f8e41fde6d206118cc786dbac4 MesaLib-7.8.1.tar.bz2
22b1153010ffdf513836ea9931159e80 MesaLib-7.8.1.zip
c9c0a830923d3820807a08c09d521b3e MesaDemos-7.8.1.tar.gz
9ef47f911869657c6bf2f43ebce86b61 MesaDemos-7.8.1.tar.bz2
93720605eb3f784f9bcc289a4dd2ff52 MesaDemos-7.8.1.zip
ed1d0b1e960afe6a3768eab747cbdbd3 MesaGLUT-7.8.1.tar.gz
6bae516a44c6d26ff3152c960ab648e7 MesaGLUT-7.8.1.tar.bz2
ba306f603ea73c30ee0e7efa14dc5581 MesaGLUT-7.8.1.zip
</pre>
<h2>New features</h2>
<p>None.</p>
<h2>Bug fixes</h2>
<ul>
<li>Fix incorrect enums for GLX_INTEL_swap_event by updating glxext.h to
version 27 from OpenGL.org.</li>
<li>Fix compilation errors on non-GLX_DIRECT_RENDERING builds.</li>
<li>Various fixes for building Mesa on OS X.</li>
<li>Pass GLX drawable ID to dri2InvalidateBuffers. Fixes bug #27190.</li>
</ul>
<h2>Changes</h2>
<p>None.</p>
</body>
</html>

70
docs/relnotes-7.8.html Normal file
View File

@@ -0,0 +1,70 @@
<HTML>
<TITLE>Mesa Release Notes</TITLE>
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<body bgcolor="#eeeeee">
<H1>Mesa 7.8 Release Notes / March 28, 2010</H1>
<p>
Mesa 7.8 is a new development release.
People who are concerned with stability and reliability should stick
with a previous release or wait for Mesa 7.8.1.
</p>
<p>
Mesa 7.8 implements the OpenGL 2.1 API, but the version reported by
glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
<h2>MD5 checksums</h2>
<pre>
5fcfde5383eccb3e9fd665f08a0ea59b MesaLib-7.8.tar.gz
85cb891eecb89aae4fdd3499cccd934b MesaLib-7.8.tar.bz2
754f39593006effc1c8ec3c27c2f1296 MesaLib-7.8.zip
c3869c29fa6c3dbdd763f7428d271e12 MesaDemos-7.8.tar.gz
9fe8ec184c7f78691e43c4c0a7f97d56 MesaDemos-7.8.tar.bz2
063a96947f7b83d4ad789c6cf291b184 MesaDemos-7.8.zip
5f4246756b7daaddb4fb3f970cad1e28 MesaGLUT-7.8.tar.gz
ca7048a4aa7a437dcc84cc2c7d731336 MesaGLUT-7.8.tar.bz2
b54581aeb79b585b158d6a32f94feff2 MesaGLUT-7.8.zip
</pre>
<h2>New features</h2>
<ul>
<li>GL_NV_conditional_render extension (swrast driver only)
<li>GL_EXT_draw_buffers2 extension (swrast and i965 driver only)
<li>GL_ARB_fragment_coord_conventions extension (for swrast, i965, and Gallium drivers)
<li>GL_EXT_texture_array extension (swrast driver only)
<li>GL_APPLE_object_purgeable extension (swrast and i945/i965 DRI drivers)
<li>Much improved support for <a href="egl.html">EGL in Mesa</a>
<li>New state trackers for <a href="opengles.html">OpenGL ES 1.1 and 2.0</a>
<li>Dedicated documentation for Gallium
</ul>
<h2>Bug fixes</h2>
<ul>
<li>Massive improvements to the Gallium driver for R300-R500 Radeons; this
driver is now moderately stable but not terribly performant.
</ul>
<h2>Changes</h2>
<ul>
<li>Removed support for color-index rendering</li>
<li>Removed support for GCC versions earlier than 3.3.0.</li>
</ul>
</body>
</html>

View File

@@ -13,6 +13,8 @@ The release notes summarize what's new or changed in each Mesa release.
</p>
<UL>
<LI><A HREF="relnotes-7.8.1.html">7.8.1 release notes</A>
<LI><A HREF="relnotes-7.8.html">7.8 release notes</A>
<LI><A HREF="relnotes-7.7.1.html">7.7.1 release notes</A>
<LI><A HREF="relnotes-7.7.html">7.7 release notes</A>
<LI><A HREF="relnotes-7.6.1.html">7.6.1 release notes</A>

View File

@@ -1,6 +1,6 @@
<HTML>
<TITLE>Cocd Repository</TITLE>
<TITLE>Code Repository</TITLE>
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
@@ -9,11 +9,8 @@
<h1>Code Repository</h1>
<p>
As of December 5, 2006, Mesa is using
<a href="http://git.or.cz/"target="_parent">git</a>
Mesa uses <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
@@ -125,6 +122,83 @@ Questions about branch status/activity should be posted to the
mesa3d-dev mailing list.
</p>
<H2>Developer Git Tips</H2>
<ol>
<li>Setting up to edit the master branch
<p>
If you try to do a pull by just saying<code> git pull </code>
and git complains that you have not specified a
branch, try:
<pre>
git config branch.master.remote origin
git config branch.master.merge master
</pre>
Otherwise, you have to say<code> git pull origin master </code>
each time you do a pull.
</p>
<li>Small changes to master
<p>
If you are an experienced git user working on substancial modifications,
you are probably
working on a separate branch and would rebase your branch prior to
merging with master.
But for small changes to the master branch itself,
you also need to use the rebase feature in order to avoid an
unnecessary and distracting branch in master.
</p>
<p>
If it has been awhile since you've done the initial clone, try
<pre>
git pull
</pre>
to get the latest files before you start working.
</p>
<p>
Make your changes and use
<pre>
git add &lt;files to commit&gt;
git commit
</pre>
to get your changes ready to push back into the fd.o repository.
</p>
<p>
It is possible (and likely) that someone has changed master since
you did your last pull. Even if your changes do not conflict with
their changes, git will make a fast-forward
merge branch, branching from the point in time
where you did your last pull and merging it to a point after the other changes.
</p>
<p>
To avoid this,
<pre>
git pull --rebase
git push
</pre>
If you are familiar with CVS or similar system, this is similar to doing a
<code> cvs update </code> in order to update your source tree to
the current repository state, instead of the time you did the last update.
(CVS doesn't work like git in this respect, but this is easiest way
to explain it.)
</br>
In any case, your repository now looks like you made your changes after
all the other changes.
</p>
<p>
If the rebase resulted in conflicts or changes that could affect
the proper operation of your changes, you'll need to investigate
those before doing the push.
</p>
<p>
If you want the rebase action to be the default action, then
<pre>
git config branch.master.rebase true
git config --global branch.autosetuprebase=always
</pre>
<p>
See <a href="http://www.eecs.harvard.edu/~cduan/technical/git/" target="_parent">Understanding Git Conceptually</a> for a fairly clear explanation about all of this.
</p>
</ol>
</body>
</html>

View File

@@ -14,10 +14,6 @@ This page describes the features and status of Mesa's support for the
OpenGL Shading Language</a>.
</p>
<p>
Last updated on 15 December 2008.
</p>
<p>
Contents
</p>

165
docs/sourcetree.html Normal file
View File

@@ -0,0 +1,165 @@
<HTML>
<TITLE>Mesa Source Tree</TITLE>
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<h1>Mesa source code tree overview</h1>
<p>
This is a brief summary of Mesa's directory tree and what's contained in
each directory.
</p>
<ul>
<li><b>docs</b> - Documentation
<li><b>include</b> - Public OpenGL header files
<li><b>src</b>
<ul>
<li><b>egl</b> - EGL library sources
<ul>
<li><b>docs</b> - EGL documentation
<li><b>drivers</b> - EGL drivers
<li><b>main</b> - main EGL library implementation. This is where all
the EGL API functions are implemented, like eglCreateContext().
</ul>
<li><b>mesa</b> - Main Mesa sources
<ul>
<li><b>glapi</b> - OpenGL API dispatch layer. This is where all the
GL entrypoints like glClear, glBegin, etc. are generated, as well as
the GL dispatch table. All GL function calls jump through the
dispatch table to functions found in main/.
<li><b>main</b> - The core Mesa code (mainly state management)
<li><b>drivers</b> - Mesa drivers (not used with Gallium)
<ul>
<li><b>common</b> - code which may be shared by all drivers
<li><b>dri</b> - Direct Rendering Infrastructure drivers
<ul>
<li><b>common</b> - code shared by all DRI drivers
<li><b>i915</b> - driver for Intel i915/i945
<li><b>i965</b> - driver for Intel i965
<li>XXX more
</ul>
<li><b>x11</b> - Xlib-based software driver
<li><b>osmesa</b> - off-screen software driver
<li><b>glslcompiler</b> - a stand-alone GLSL compiler driver
<li>XXX more
</ul>
<li><b>es</b> - OpenGL ES overlay, parallelly buildable with the core Mesa
<li><b>math</b> - vertex array translation and transformation code
(not used with Gallium)
<li><b>ppc</b> - Assembly code/optimizations for PPC systems
(not used with Gallium)
<li><b>shader</b> - Vertex/fragment shader and GLSL compiler code
<li><b>sparc</b> - Assembly code/optimizations for SPARC systems
(not used with Gallium)
<li><b>state_tracker</b> - State tracker / driver for Gallium. This
is basically a Mesa device driver that speaks to Gallium. This
directory may be moved to src/mesa/drivers/gallium at some point.
<li><b>swrast</b> - Software rasterization module. For drawing points,
lines, triangles, bitmaps, images, etc. in software.
(not used with Gallium)
<li><b>swrast_setup</b> - Software primitive setup. Does things like
polygon culling, glPolygonMode, polygon offset, etc.
(not used with Gallium)
<li><b>tnl</b> - Software vertex Transformation 'n Lighting.
(not used with Gallium)
<li><b>tnl_dd</b> - TNL code for device drivers.
(not used with Gallium)
<li><b>vbo</b> - Vertex Buffer Object code. All drawing with
glBegin/glEnd, glDrawArrays, display lists, etc. goes through this
module. The results is a well-defined set of vertex arrays which
are passed to the device driver (or tnl module) for rendering.
<li><b>vf</b> - vertex format conversion (currently unused)
<li><b>x86</b> - Assembly code/optimizations for 32-bit x86 systems
(not used with Gallium)
<li><b>x86-64</b> - Assembly code/optimizations for 64-bit x86 systems
(not used with Gallium)
</ul>
<li><b>gallium</b> - Gallium3D source code
<ul>
<li><b>include</b> - Gallium3D header files which define the Gallium3D
interfaces
<li><b>drivers</b> - Gallium3D device drivers
<ul>
<li><b>cell</b> - Driver for Cell processor.
<li><b>i915</b> - Driver for Intel i915/i945.
<li><b>i965</b> - Driver for Intel i965.
<li><b>llvmpipe</b> - Software driver using LLVM for runtime code generation.
<li><b>nv*</b> - Drivers for NVIDIA GPUs.
<li><b>r300</b> - Driver for ATI/AMD R300.
<li><b>softpipe</b> - Software reference driver.
<li><b>svga</b> - Driver for VMware's SVGA virtual GPU.
<li><b>trace</b> - Driver for tracing Gallium calls.
<li>XXX more
</ul>
<li><b>auxiliary</b> - Gallium support code
<ul>
<li><b>draw</b> - Software vertex processing and primitive assembly
module. This includes vertex program execution, clipping, culling
and optional stages for drawing wide lines, stippled lines,
polygon stippling, two-sided lighting, etc.
Intended for use by drivers for hardware that does not have
vertex shaders.
Geometry shaders will also be implemented in this module.
<li><b>cso_cache</b> - Constant State Objects Cache. Used to filter out
redundant state changes between state trackers and drivers.
<li><b>gallivm</b> - LLVM module for Gallium. For LLVM-based
compilation, optimization and code generation for TGSI shaders.
Incomplete.
<li><b>pipebuffer</b> - utility module for managing buffers
<li><b>rbug</b> - Gallium remote debug utility
<li><b>rtasm</b> - run-time assembly/machine code generation.
Currently there's run-time code generation for x86/SSE, PowerPC
and Cell SPU.
<li><b>tgsi</b> - TG Shader Infrastructure. Code for encoding,
manipulating and interpretting GPU programs.
<li><b>translate</b> - module for translating vertex data from one format
to another.
<li><b>util</b> - assorted utilities for arithmetic, hashing, surface
creation, memory management, 2D blitting, simple rendering, etc.
</ul>
<li><b>state_trackers</b> -
<ul>
<li><b>dri</b> - Meta state tracker for DRI drivers
<li><b>egl</b> - Meta state tracker for EGL drivers
<li><b>es</b> - OpenGL ES 1.x and 2.x state trackers
<li><b>g3dvl</b> -
<li><b>glx</b> - Meta state tracker for GLX
<li><b>python</b> -
<li><b>vega</b> - OpenVG 1.x state tracker
<li><b>wgl</b> -
<li><b>xorg</b> - Meta state tracker for Xorg video drivers
</ul>
<li><b>winsys</b> -
<ul>
<li><b>drm</b> -
<li><b>g3dvl</b> -
<li><b>gdi</b> -
<li><b>xlib</b> -
</ul>
</ul>
</ul>
<ul>
<li><b>glu</b> - The OpenGL Utility library
<ul>
<li><b>sgi</b> - GLU from SGI
<li><b>mesa</b> - Mesa version of GLU (deprecated)
</ul>
<li><b>glut</b> - Mark Kilgard's OpenGL OpenGL Utility Toolkit library
<li><b>glx</b> - The GLX library code for building libGL. This is used for
direct rendering drivers. It will dynamically load one of the
xxx_dri.so drivers.
<li><b>glw</b> - Widgets for Xt/Motif.
<li><b>glew</b> - OpenGL Extension Wrangler library (used by demo programs)
</ul>
<li><b>progs</b> - OpenGL test and demonstration programs
<li><b>lib</b> - where the GL libraries are placed
</ul>
</BODY>
</HTML>

View File

@@ -22,8 +22,7 @@ full: $(FULL:.doxy=.tag)
SUBSET = \
main.doxy \
math.doxy \
miniglx.doxy
math.doxy
subset: $(SUBSET:.doxy=.tag)
$(foreach FILE,$(SUBSET),doxygen $(FILE);)

View File

@@ -1,179 +0,0 @@
# Doxyfile 0.1
#---------------------------------------------------------------------------
# General configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = "MiniGLX"
PROJECT_NUMBER =
OUTPUT_DIRECTORY =
OUTPUT_LANGUAGE = English
EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = YES
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = NO
STRIP_FROM_PATH =
INTERNAL_DOCS = YES
STRIP_CODE_COMMENTS = YES
CASE_SENSE_NAMES = YES
SHORT_NAMES = NO
HIDE_SCOPE_NAMES = NO
VERBATIM_HEADERS = NO
SHOW_INCLUDE_FILES = NO
JAVADOC_AUTOBRIEF = NO
INHERIT_DOCS = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = NO
DISTRIBUTE_GROUP_DOC = NO
TAB_SIZE = 8
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
ALIASES =
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
OPTIMIZE_OUTPUT_FOR_C = NO
SHOW_USED_FILES = YES
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = YES
WARNINGS = YES
WARN_IF_UNDOCUMENTED = NO
WARN_FORMAT =
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = ../src/glx/mini/ ../include/GL/miniglx.h
FILE_PATTERNS = *.h *.c
RECURSIVE = NO
EXCLUDE = ../src/glx/mini/glapi.c
EXCLUDE_PATTERNS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = NO
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = miniglx
HTML_HEADER = header_subset.html
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT =
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT =
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT =
MAN_EXTENSION =
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH = ../include/
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to external references
#---------------------------------------------------------------------------
TAGFILES = \
core_subset.tag=../core_subset \
math_subset.tag=../math_subset
GENERATE_TAGFILE = miniglx.tag
ALLEXTERNALS = NO
PERL_PATH =
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = NO
HAVE_DOT = NO
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
TEMPLATE_RELATIONS = YES
HIDE_UNDOC_RELATIONS = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
GRAPHICAL_HIERARCHY = YES
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
CGI_NAME =
CGI_URL =
DOC_URL =
DOC_ABSPATH =
BIN_ABSPATH =
EXT_DOC_PATHS =

View File

@@ -1,9 +1,32 @@
/* -*- mode: c; tab-width: 8; -*- */
/* vi: set sw=4 ts=8: */
/* Reference version of egl.h for EGL 1.4.
* Last modified 2008/05/02
* $Revision: 9356 $ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $
*/
/*
** Copyright (c) 2007-2009 The Khronos Group Inc.
**
** 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:
**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Materials.
**
** 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.
*/
#ifndef __egl_h_
#define __egl_h_
@@ -17,7 +40,7 @@ extern "C" {
#endif
/* EGL Types */
typedef int32_t EGLint;
/* EGLint is defined in eglplatform.h */
typedef unsigned int EGLBoolean;
typedef unsigned int EGLenum;
typedef void *EGLConfig;
@@ -42,7 +65,7 @@ typedef void *EGLClientBuffer;
#define EGL_TRUE 1
/* Out-of-band handle values */
#define EGL_DEFAULT_DISPLAY ((void *)0)
#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0)
#define EGL_NO_CONTEXT ((EGLContext)0)
#define EGL_NO_DISPLAY ((EGLDisplay)0)
#define EGL_NO_SURFACE ((EGLSurface)0)
@@ -86,7 +109,6 @@ typedef void *EGLClientBuffer;
#define EGL_NATIVE_RENDERABLE 0x302D
#define EGL_NATIVE_VISUAL_ID 0x302E
#define EGL_NATIVE_VISUAL_TYPE 0x302F
#define EGL_PRESERVED_RESOURCES 0x3030
#define EGL_SAMPLES 0x3031
#define EGL_SAMPLE_BUFFERS 0x3032
#define EGL_SURFACE_TYPE 0x3033
@@ -291,7 +313,14 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface)
EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface,
EGLNativePixmapType target);
EGLAPI void (* EGLAPIENTRY eglGetProcAddress(const char *procname))(void);
/* This is a generic function pointer type, whose name indicates it must
* be cast to the proper type *and calling convention* before use.
*/
typedef void (*__eglMustCastToProperFunctionPointerType)(void);
/* Now, define eglGetProcAddress using the generic function ptr. type */
EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY
eglGetProcAddress(const char *procname);
#ifdef __cplusplus
}

View File

@@ -6,7 +6,7 @@ extern "C" {
#endif
/*
** Copyright (c) 2007 The Khronos Group Inc.
** Copyright (c) 2007-2009 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
@@ -33,9 +33,9 @@ extern "C" {
/*************************************************************/
/* Header file version number */
/* eglext.h last updated 2007/11/20 */
/* Current version at http://www.khronos.org/registry/egl/ */
#define EGL_EGLEXT_VERSION 1
/* $Revision: 10185 $ on $Date: 2010-01-22 11:38:01 -0800 (Fri, 22 Jan 2010) $ */
#define EGL_EGLEXT_VERSION 5
#ifndef EGL_KHR_config_attribs
#define EGL_KHR_config_attribs 1
@@ -79,12 +79,12 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay display
#define EGL_KHR_image 1
#define EGL_NATIVE_PIXMAP_KHR 0x30B0 /* eglCreateImageKHR target */
typedef void *EGLImageKHR;
extern const EGLImageKHR EGL_NO_IMAGE_KHR;
#define EGL_NO_IMAGE_KHR ((EGLImageKHR)0)
#ifdef EGL_EGLEXT_PROTOTYPES
EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, EGLint *attr_list);
EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image);
#endif /* EGL_EGLEXT_PROTOTYPES */
typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, EGLint *attr_list);
typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image);
#endif
@@ -120,6 +120,35 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGL
#define EGL_GL_RENDERBUFFER_KHR 0x30B9 /* eglCreateImageKHR target */
#endif
#ifndef EGL_KHR_reusable_sync
#define EGL_KHR_reusable_sync 1
typedef void* EGLSyncKHR;
typedef khronos_utime_nanoseconds_t EGLTimeKHR;
#define EGL_SYNC_STATUS_KHR 0x30F1
#define EGL_SIGNALED_KHR 0x30F2
#define EGL_UNSIGNALED_KHR 0x30F3
#define EGL_TIMEOUT_EXPIRED_KHR 0x30F5
#define EGL_CONDITION_SATISFIED_KHR 0x30F6
#define EGL_SYNC_TYPE_KHR 0x30F7
#define EGL_SYNC_REUSABLE_KHR 0x30FA
#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001 /* eglClientWaitSyncKHR <flags> bitfield */
#define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull
#define EGL_NO_SYNC_KHR ((EGLSyncKHR)0)
#ifdef EGL_EGLEXT_PROTOTYPES
EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync);
EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
#endif /* EGL_EGLEXT_PROTOTYPES */
typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync);
typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
#endif
/* EGL_MESA_screen extension >>> PRELIMINARY <<< */
#ifndef EGL_MESA_screen_surface
@@ -179,6 +208,25 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOPYCONTEXTMESA) (EGLDisplay dpy, EGLCont
#endif /* EGL_MESA_copy_context */
#ifndef EGL_KHR_image_base
#define EGL_KHR_image_base 1
/* Most interfaces defined by EGL_KHR_image_pixmap above */
#define EGL_IMAGE_PRESERVED_KHR 0x30D2 /* eglCreateImageKHR attribute */
#endif
#ifndef EGL_KHR_image_pixmap
#define EGL_KHR_image_pixmap 1
/* Interfaces defined by EGL_KHR_image above */
#endif
#ifndef EGL_IMG_context_priority
#define EGL_IMG_context_priority 1
#define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100
#define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101
#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102
#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103
#endif
#ifdef __cplusplus
}
#endif

View File

@@ -1,38 +1,59 @@
/* -*- mode: c; tab-width: 8; -*- */
/* vi: set sw=4 ts=8: */
/* Platform-specific types and definitions for egl.h */
#ifndef __eglplatform_h_
#define __eglplatform_h_
/* Windows calling convention boilerplate */
#if (defined(WIN32) || defined(_WIN32_WCE))
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN /* Exclude rarely-used stuff from Windows headers */
#endif
#include <windows.h>
#endif
/*
** Copyright (c) 2007-2009 The Khronos Group Inc.
**
** 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:
**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Materials.
**
** 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_WCE)
#include <sys/types.h>
#include <stdint.h>
#endif
/* Platform-specific types and definitions for egl.h
* $Revision: 9724 $ on $Date: 2009-12-02 02:05:33 -0800 (Wed, 02 Dec 2009) $
*
* Adopters may modify khrplatform.h and this file to suit their platform.
* You are encouraged to submit all modifications to the Khronos group so that
* they can be included in future versions of this file. Please submit changes
* by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
* by filing a bug against product "EGL" component "Registry".
*/
#include <KHR/khrplatform.h>
/* Macros used in EGL function prototype declarations.
*
* EGL functions should be prototyped as:
*
* EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
* typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
*
* On Windows, EGLAPIENTRY can be defined like APIENTRY.
* On most other platforms, it should be empty.
* KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
*/
#ifndef EGLAPI
#define EGLAPI KHRONOS_APICALL
#endif
#ifndef EGLAPIENTRY
#define EGLAPIENTRY
#endif
#ifndef EGLAPIENTRYP
#define EGLAPIENTRYP EGLAPIENTRY *
#define EGLAPIENTRY KHRONOS_APIENTRY
#endif
#define EGLAPIENTRYP EGLAPIENTRY*
/* The types NativeDisplayType, NativeWindowType, and NativePixmapType
* are aliases of window-system-dependent types, such as X Display * or
@@ -41,53 +62,49 @@
* types, renamed in EGL 1.3 so all types in the API start with "EGL".
*/
/* Unix (tentative)
#include <X headers>
typedef Display *NativeDisplayType;
- or maybe, if encoding "hostname:display.head"
typedef const char *NativeWindowType;
etc.
*/
#if (defined(WIN32) || defined(_WIN32_WCE))
/** BEGIN Added for Windows **/
#ifndef EGLAPI
#define EGLAPI __declspec(dllexport)
#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1
#endif
#include <windows.h>
typedef long int32_t;
typedef unsigned long uint32_t;
typedef unsigned char uint8_t;
#define snprintf _snprintf
#define strcasecmp _stricmp
#define vsnprintf _vsnprintf
typedef HDC EGLNativeDisplayType;
typedef HBITMAP EGLNativePixmapType;
typedef HWND EGLNativeWindowType;
typedef HDC NativeDisplayType;
typedef HWND NativeWindowType;
typedef HBITMAP NativePixmapType;
/** END Added for Windows **/
#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */
#elif defined(__gnu_linux__) || defined(__FreeBSD__) || defined(__sun) || defined(__APPLE__)
typedef int EGLNativeDisplayType;
typedef void *EGLNativeWindowType;
typedef void *EGLNativePixmapType;
#elif defined(__unix__) || defined(__unix)
/** BEGIN Added for X (Mesa) **/
#ifndef EGLAPI
#define EGLAPI extern
#endif
/* X11 (tentative) */
#include <X11/Xlib.h>
typedef Display *NativeDisplayType;
typedef Window NativeWindowType;
typedef Pixmap NativePixmapType;
/** END Added for X (Mesa) **/
#include <X11/Xutil.h>
typedef Display *EGLNativeDisplayType;
typedef Pixmap EGLNativePixmapType;
typedef Window EGLNativeWindowType;
#else
#error "Platform not recognized"
#endif
/* EGL 1.2 types, renamed for consistency in EGL 1.3 */
typedef NativeDisplayType EGLNativeDisplayType;
typedef NativePixmapType EGLNativePixmapType;
typedef NativeWindowType EGLNativeWindowType;
typedef EGLNativeDisplayType NativeDisplayType;
typedef EGLNativePixmapType NativePixmapType;
typedef EGLNativeWindowType NativeWindowType;
/* Define EGLint. This must be a signed integral type large enough to contain
* all legal attribute names and values passed into and out of EGL, whether
* their type is boolean, bitmask, enumerant (symbolic constant), integer,
* handle, or other. While in general a 32-bit integer will suffice, if
* handles are 64 bit types, then EGLint should be defined as a signed 64-bit
* integer type.
*/
typedef khronos_int32_t EGLint;
#endif /* __eglplatform_h */

View File

@@ -1,38 +0,0 @@
## Process this file with automake to produce Makefile.in
GLincludedir = $(includedir)/GL
INC_GGI = ggimesa.h
INC_OSMESA = osmesa.h
INC_SVGA = svgamesa.h
INC_X11 = glx.h glxext.h glx_mangle.h
INC_GLUT = glut.h glutf90.h
if HAVE_GGI
sel_inc_ggi = $(INC_GGI)
endif
if HAVE_OSMESA
sel_inc_osmesa = $(INC_OSMESA)
endif
if HAVE_SVGA
sel_inc_svga = $(INC_SVGA)
endif
if HAVE_X11
sel_inc_x11 = $(INC_X11)
endif
if NEED_GLUT
sel_inc_glut = $(INC_GLUT)
endif
EXTRA_HEADERS = amesa.h dosmesa.h foomesa.h glut_h.dja mesa_wgl.h mglmesa.h \
vms_x_fix.h wmesa.h \
$(INC_GGI) $(INC_OSMESA) $(INC_SVGA) $(INC_X11) $(INC_GLUT)
GLinclude_HEADERS = gl.h glext.h gl_mangle.h glu.h glu_mangle.h \
$(sel_inc_ggi) $(sel_inc_osmesa) $(sel_inc_svga) \
$(sel_inc_x11) $(sel_inc_glut)
include $(top_srcdir)/common_rules.make

View File

@@ -1,89 +0,0 @@
/*
(c) Copyright 2001 convergence integrated media GmbH.
All rights reserved.
Written by Denis Oliver Kropp <dok@convergence.de> and
Andreas Hundt <andi@convergence.de>.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef __DIRECTFBGL_H__
#define __DIRECTFBGL_H__
#include <directfb.h>
#ifdef __cplusplus
extern "C"
{
#endif
typedef struct {
int buffer_size;
int depth_size;
int stencil_size;
int aux_buffers;
int red_size;
int green_size;
int blue_size;
int alpha_size;
int accum_red_size;
int accum_green_size;
int accum_blue_size;
int accum_alpha_size;
DFBBoolean double_buffer;
DFBBoolean stereo;
} DFBGLAttributes;
DEFINE_INTERFACE( IDirectFBGL,
/** Context handling **/
/*
* Acquire the hardware lock.
*/
DFBResult (*Lock) (
IDirectFBGL *thiz
);
/*
* Release the lock.
*/
DFBResult (*Unlock) (
IDirectFBGL *thiz
);
/*
* Query the OpenGL attributes.
*/
DFBResult (*GetAttributes) (
IDirectFBGL *thiz,
DFBGLAttributes *attributes
);
)
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -1,160 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 6.1
*
* Copyright (C) 1999-2004 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.
*/
/*
* DOS/DJGPP device driver for Mesa
*
* Author: Daniel Borca
* Email : dborca@users.sourceforge.net
* Web : http://www.geocities.com/dborca
*/
#ifndef DMESA_H_included
#define DMESA_H_included
#define DMESA_MAJOR_VERSION 6
#define DMESA_MINOR_VERSION 5
/* Sample Usage:
*
* 1. Call DMesaCreateVisual() to initialize graphics.
* 2. Call DMesaCreateContext() to create a DMesa rendering context.
* 3. Call DMesaCreateBuffer() to define the window.
* 4. Call DMesaMakeCurrent() to bind the DMesaBuffer to a DMesaContext.
* 5. Make gl* calls to render your graphics.
* 6. Use DMesaSwapBuffers() when double buffering to swap front/back buffers.
* 7. Before exiting, destroy DMesaBuffer, DMesaContext and DMesaVisual.
*/
typedef struct dmesa_context *DMesaContext;
typedef struct dmesa_visual *DMesaVisual;
typedef struct dmesa_buffer *DMesaBuffer;
#ifdef __cplusplus
extern "C" {
#endif
/*
* Create a new Visual and set graphics mode.
*/
DMesaVisual DMesaCreateVisual (GLint width, /* X res */
GLint height, /* Y res */
GLint colDepth, /* BPP */
GLint refresh, /* refresh rate: 0=default */
GLboolean dbFlag, /* double-buffered */
GLboolean rgbFlag, /* RGB mode */
GLint alphaSize, /* requested bits/alpha */
GLint depthSize, /* requested bits/depth */
GLint stencilSize, /* requested bits/stencil */
GLint accumSize); /* requested bits/accum */
/*
* Destroy Visual and restore screen.
*/
void DMesaDestroyVisual (DMesaVisual v);
/*
* Create a new Context for rendering.
*/
DMesaContext DMesaCreateContext (DMesaVisual visual, DMesaContext share);
/*
* Destroy Context.
*/
void DMesaDestroyContext (DMesaContext c);
/*
* Return a handle to the current context.
*/
DMesaContext DMesaGetCurrentContext (void);
/*
* Create a new Buffer (window).
*/
DMesaBuffer DMesaCreateBuffer (DMesaVisual visual,
GLint xpos, GLint ypos,
GLint width, GLint height);
/*
* Destroy Buffer.
*/
void DMesaDestroyBuffer (DMesaBuffer b);
/*
* Return a handle to the current buffer.
*/
DMesaBuffer DMesaGetCurrentBuffer (void);
/*
* Swap the front and back buffers for the given Buffer.
* No action is taken if the buffer is not double buffered.
*/
void DMesaSwapBuffers (DMesaBuffer b);
/*
* Bind Buffer to Context and make the Context the current one.
*/
GLboolean DMesaMakeCurrent (DMesaContext c, DMesaBuffer b);
/*
* Move/Resize current Buffer.
*/
GLboolean DMesaMoveBuffer (GLint xpos, GLint ypos);
GLboolean DMesaResizeBuffer (GLint width, GLint height);
/*
* Set palette index, using normalized values.
*/
void DMesaSetCI (int ndx, GLfloat red, GLfloat green, GLfloat blue);
/*
* DMesa functions
*/
typedef void (*DMesaProc) ();
DMesaProc DMesaGetProcAddress (const char *name);
/*
* DMesa state retrieval.
*/
#define DMESA_GET_SCREEN_SIZE 0x0100
#define DMESA_GET_DRIVER_CAPS 0x0200
#define DMESA_GET_VIDEO_MODES 0x0300
#define DMESA_GET_BUFFER_ADDR 0x0400
#define DMESA_DRIVER_DBL_BIT 0x1 /* double-buffered */
#define DMESA_DRIVER_YUP_BIT 0x2 /* lower-left window origin */
int DMesaGetIntegerv (GLenum pname, GLint *params);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -1,85 +0,0 @@
/*
* Mesa 3-D graphics library GGI bindings (GGIGL [giggle])
* Version: 4.0
* Copyright (C) 1995-2000 Brian Paul
* Copyright (C) 1998 Uwe Maurer
* Copyrigth (C) 2001 Filip Spacek
*
* 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.
*/
#ifndef GGIMESA_H
#define GGIMESA_H
#define GGIMESA_MAJOR_VERSION 4
#define GGIMESA_MINOR_VERSION 0
#ifdef __cplusplus
extern "C" {
#endif
#include <ggi/ggi.h>
#include "GL/gl.h"
typedef struct ggi_mesa_context *ggi_mesa_context_t;
/*
* Initialize Mesa GGI extension
*/
int ggiMesaInit(void);
/*
* Clean up Mesa GGI exension
*/
int ggiMesaExit(void);
/*
* Attach Mesa GGI extension to the visual 'vis'
*/
int ggiMesaAttach(ggi_visual_t vis);
/*
* Detach Mesa GGI extension from the visual 'vis'
*/
int ggiMesaDetach(ggi_visual_t vis);
int ggiMesaExtendVisual(ggi_visual_t vis, GLboolean alpha_flag,
GLboolean stereo_flag, GLint depth_size,
GLint stencil_size, GLint accum_red_size,
GLint accum_green_size, GLint accum_blue_size,
GLint accum_alpha_size, GLint num_samples);
/*
* Create a new context capable of displaying on the visual vis.
*/
ggi_mesa_context_t ggiMesaCreateContext(ggi_visual_t vis);
/*
* Destroy the context 'ctx'
*/
void ggiMesaDestroyContext(ggi_mesa_context_t ctx);
/*
* Make context 'ctx' the current context and bind it to visual 'vis'.
* Note that the context must have been created with respect to that visual.
*/
void ggiMesaMakeCurrent(ggi_mesa_context_t ctx, ggi_visual_t vis);
void ggiMesaSwapBuffers(void);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -67,7 +67,7 @@
#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
# define GLAPI extern
# define GLAPIENTRY __stdcall
#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
#elif defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
# define GLAPI __attribute__((visibility("default")))
# define GLAPIENTRY
#endif /* WIN32 && !CYGWIN */
@@ -85,7 +85,9 @@
* glut.h or gl.h.
*/
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1
#endif
#include <windows.h>
#endif
@@ -2193,6 +2195,21 @@ typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLen
#endif /* GL_ATI_blend_equation_separate */
/* GL_OES_EGL_image */
#ifndef GL_OES_EGL_image
typedef void* GLeglImageOES;
#endif
#ifndef GL_OES_EGL_image
#define GL_OES_EGL_image 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
GLAPI void APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
#endif
typedef void (APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
typedef void (APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
#endif
/**
** NOTE!!!!! If you add new functions to this file, or update

View File

@@ -393,6 +393,8 @@
#define glEdgeFlagPointerListIBM MANGLE(EdgeFlagPointerListIBM)
#define glEdgeFlagPointer MANGLE(EdgeFlagPointer)
#define glEdgeFlagv MANGLE(EdgeFlagv)
#define glEGLImageTargetRenderbufferStorageOES MANGLE(EGLImageTargetRenderbufferStorageOES)
#define glEGLImageTargetTexture2DOES MANGLE(EGLImageTargetTexture2DOES)
#define glElementPointerAPPLE MANGLE(ElementPointerAPPLE)
#define glElementPointerATI MANGLE(ElementPointerATI)
#define glEnableClientStateIndexedEXT MANGLE(EnableClientStateIndexedEXT)

File diff suppressed because it is too large Load Diff

View File

@@ -103,7 +103,7 @@ extern "C" {
# define GLUTAPI extern
#endif
#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
#elif defined(__GNUC__)
# define GLUTAPIENTRY
# define GLUTAPIENTRYV
@@ -452,8 +452,7 @@ GLUTAPI void GLUTAPIENTRY glutInit(int *argcp, char **argv);
#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
GLUTAPI void GLUTAPIENTRY __glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int));
#ifndef GLUT_BUILDING_LIB
static void GLUTAPIENTRY glutInit_ATEXIT_HACK(int *argcp, char **argv) { __glutInitWithExit(argcp, argv, exit); }
#define glutInit glutInit_ATEXIT_HACK
#define glutInit(__argcp, __argv) __glutInitWithExit(__argcp, __argv, exit)
#endif
#endif
GLUTAPI void GLUTAPIENTRY glutInitDisplayMode(unsigned int mode);
@@ -469,8 +468,7 @@ GLUTAPI int GLUTAPIENTRY glutCreateWindow(const char *title);
#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
GLUTAPI int GLUTAPIENTRY __glutCreateWindowWithExit(const char *title, void (__cdecl *exitfunc)(int));
#ifndef GLUT_BUILDING_LIB
static int GLUTAPIENTRY glutCreateWindow_ATEXIT_HACK(const char *title) { return __glutCreateWindowWithExit(title, exit); }
#define glutCreateWindow glutCreateWindow_ATEXIT_HACK
#define glutCreateWindow(__title) __glutCreateWindowWithExit(__title, exit)
#endif
#endif
GLUTAPI int GLUTAPIENTRY glutCreateSubWindow(int win, int x, int y, int width, int height);
@@ -515,8 +513,7 @@ GLUTAPI int GLUTAPIENTRY glutCreateMenu(void (GLUTCALLBACK *func)(int));
#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
GLUTAPI int GLUTAPIENTRY __glutCreateMenuWithExit(void (GLUTCALLBACK *func)(int), void (__cdecl *exitfunc)(int));
#ifndef GLUT_BUILDING_LIB
static int GLUTAPIENTRY glutCreateMenu_ATEXIT_HACK(void (GLUTCALLBACK *func)(int)) { return __glutCreateMenuWithExit(func, exit); }
#define glutCreateMenu glutCreateMenu_ATEXIT_HACK
#define glutCreateMenu(__func) __glutCreateMenuWithExit(__func, exit)
#endif
#endif
GLUTAPI void GLUTAPIENTRY glutDestroyMenu(int menu);

View File

@@ -186,6 +186,16 @@ typedef XID GLXWindow;
typedef XID GLXPbuffer;
/*
** Events.
** __GLX_NUMBER_EVENTS is set to 17 to account for the BufferClobberSGIX
** event - this helps initialization if the server supports the pbuffer
** extension and the client doesn't.
*/
#define GLX_PbufferClobber 0
#define GLX_BufferSwapComplete 1
#define __GLX_NUMBER_EVENTS 17
extern XVisualInfo* glXChooseVisual( Display *dpy, int screen,
int *attribList );
@@ -507,8 +517,21 @@ typedef struct {
int count; /* if nonzero, at least this many more */
} GLXPbufferClobberEvent;
typedef struct {
int type;
unsigned long serial; /* # of last request processed by server */
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
GLXDrawable drawable; /* drawable on which event was requested in event mask */
int event_type;
int64_t ust;
int64_t msc;
int64_t sbc;
} GLXBufferSwapComplete;
typedef union __GLXEvent {
GLXPbufferClobberEvent glxpbufferclobber;
GLXBufferSwapComplete glxbufferswapcomplete;
long pad[24];
} GLXEvent;

View File

@@ -362,6 +362,19 @@ typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display* dpy, GLXFBCo
#endif /* GLX_ARB_create_context */
/* --------------------- GLX_ARB_create_context_profile -------------------- */
#ifndef GLX_ARB_create_context_profile
#define GLX_ARB_create_context_profile 1
#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
#define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
#define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126
#define GLXEW_ARB_create_context_profile GLXEW_GET_VAR(__GLXEW_ARB_create_context_profile)
#endif /* GLX_ARB_create_context_profile */
/* ------------------------- GLX_ARB_fbconfig_float ------------------------ */
#ifndef GLX_ARB_fbconfig_float
@@ -529,6 +542,22 @@ typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display* dpy, GLXContext context
#endif /* GLX_EXT_scene_marker */
/* -------------------------- GLX_EXT_swap_control ------------------------- */
#ifndef GLX_EXT_swap_control
#define GLX_EXT_swap_control 1
#define GLX_SWAP_INTERVAL_EXT 0x20F1
#define GLX_MAX_SWAP_INTERVAL_EXT 0x20F2
typedef void ( * PFNGLXSWAPINTERVALEXTPROC) (Display* dpy, GLXDrawable drawable, int interval);
#define glXSwapIntervalEXT GLXEW_GET_FUN(__glewXSwapIntervalEXT)
#define GLXEW_EXT_swap_control GLXEW_GET_VAR(__GLXEW_EXT_swap_control)
#endif /* GLX_EXT_swap_control */
/* ---------------------- GLX_EXT_texture_from_pixmap ---------------------- */
#ifndef GLX_EXT_texture_from_pixmap
@@ -683,6 +712,19 @@ typedef GLboolean ( * PFNGLXSET3DFXMODEMESAPROC) (GLint mode);
#endif /* GLX_MESA_set_3dfx_mode */
/* --------------------------- GLX_NV_copy_image --------------------------- */
#ifndef GLX_NV_copy_image
#define GLX_NV_copy_image 1
typedef void ( * PFNGLXCOPYIMAGESUBDATANVPROC) (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
#define glXCopyImageSubDataNV GLXEW_GET_FUN(__glewXCopyImageSubDataNV)
#define GLXEW_NV_copy_image GLXEW_GET_VAR(__GLXEW_NV_copy_image)
#endif /* GLX_NV_copy_image */
/* -------------------------- GLX_NV_float_buffer -------------------------- */
#ifndef GLX_NV_float_buffer
@@ -1217,6 +1259,8 @@ extern PFNGLXGETCONTEXTIDEXTPROC __glewXGetContextIDEXT;
extern PFNGLXIMPORTCONTEXTEXTPROC __glewXImportContextEXT;
extern PFNGLXQUERYCONTEXTINFOEXTPROC __glewXQueryContextInfoEXT;
extern PFNGLXSWAPINTERVALEXTPROC __glewXSwapIntervalEXT;
extern PFNGLXBINDTEXIMAGEEXTPROC __glewXBindTexImageEXT;
extern PFNGLXRELEASETEXIMAGEEXTPROC __glewXReleaseTexImageEXT;
@@ -1230,6 +1274,8 @@ extern PFNGLXRELEASEBUFFERSMESAPROC __glewXReleaseBuffersMESA;
extern PFNGLXSET3DFXMODEMESAPROC __glewXSet3DfxModeMESA;
extern PFNGLXCOPYIMAGESUBDATANVPROC __glewXCopyImageSubDataNV;
extern PFNGLXBINDVIDEODEVICENVPROC __glewXBindVideoDeviceNV;
extern PFNGLXENUMERATEVIDEODEVICESNVPROC __glewXEnumerateVideoDevicesNV;
@@ -1318,6 +1364,7 @@ GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_3;
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_4;
GLXEW_EXPORT GLboolean __GLXEW_3DFX_multisample;
GLXEW_EXPORT GLboolean __GLXEW_ARB_create_context;
GLXEW_EXPORT GLboolean __GLXEW_ARB_create_context_profile;
GLXEW_EXPORT GLboolean __GLXEW_ARB_fbconfig_float;
GLXEW_EXPORT GLboolean __GLXEW_ARB_framebuffer_sRGB;
GLXEW_EXPORT GLboolean __GLXEW_ARB_get_proc_address;
@@ -1328,6 +1375,7 @@ GLXEW_EXPORT GLboolean __GLXEW_EXT_fbconfig_packed_float;
GLXEW_EXPORT GLboolean __GLXEW_EXT_framebuffer_sRGB;
GLXEW_EXPORT GLboolean __GLXEW_EXT_import_context;
GLXEW_EXPORT GLboolean __GLXEW_EXT_scene_marker;
GLXEW_EXPORT GLboolean __GLXEW_EXT_swap_control;
GLXEW_EXPORT GLboolean __GLXEW_EXT_texture_from_pixmap;
GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_info;
GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_rating;
@@ -1336,6 +1384,7 @@ GLXEW_EXPORT GLboolean __GLXEW_MESA_copy_sub_buffer;
GLXEW_EXPORT GLboolean __GLXEW_MESA_pixmap_colormap;
GLXEW_EXPORT GLboolean __GLXEW_MESA_release_buffers;
GLXEW_EXPORT GLboolean __GLXEW_MESA_set_3dfx_mode;
GLXEW_EXPORT GLboolean __GLXEW_NV_copy_image;
GLXEW_EXPORT GLboolean __GLXEW_NV_float_buffer;
GLXEW_EXPORT GLboolean __GLXEW_NV_present_video;
GLXEW_EXPORT GLboolean __GLXEW_NV_swap_group;

View File

@@ -6,7 +6,7 @@ extern "C" {
#endif
/*
** Copyright (c) 2007-2009 The Khronos Group Inc.
** Copyright (c) 2007-2010 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
@@ -48,9 +48,9 @@ extern "C" {
/*************************************************************/
/* Header file version number, required by OpenGL ABI for Linux */
/* glxext.h last updated 2009/10/08 */
/* glxext.h last updated 2010/02/10 */
/* Current version at http://www.opengl.org/registry/ */
#define GLX_GLXEXT_VERSION 25
#define GLX_GLXEXT_VERSION 27
#ifndef GLX_VERSION_1_3
#define GLX_WINDOW_BIT 0x00000001
@@ -396,6 +396,13 @@ extern "C" {
#ifndef GLX_NV_copy_image
#endif
#ifndef GLX_INTEL_swap_event
#define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x04000000
#define GLX_EXCHANGE_COMPLETE_INTEL 0x8180
#define GLX_COPY_COMPLETE_INTEL 0x8181
#define GLX_FLIP_COMPLETE_INTEL 0x8182
#endif
/*************************************************************/
@@ -477,24 +484,24 @@ typedef unsigned __int64 uint64_t;
#ifndef GLX_VERSION_1_3
#define GLX_VERSION_1_3 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *);
extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *);
extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *);
extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig);
extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *);
extern void glXDestroyWindow (Display *, GLXWindow);
extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *);
extern void glXDestroyPixmap (Display *, GLXPixmap);
extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *);
extern void glXDestroyPbuffer (Display *, GLXPbuffer);
extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *);
extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool);
extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext);
extern GLXFBConfig * glXGetFBConfigs (Display *dpy, int screen, int *nelements);
extern GLXFBConfig * glXChooseFBConfig (Display *dpy, int screen, const int *attrib_list, int *nelements);
extern int glXGetFBConfigAttrib (Display *dpy, GLXFBConfig config, int attribute, int *value);
extern XVisualInfo * glXGetVisualFromFBConfig (Display *dpy, GLXFBConfig config);
extern GLXWindow glXCreateWindow (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
extern void glXDestroyWindow (Display *dpy, GLXWindow win);
extern GLXPixmap glXCreatePixmap (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
extern void glXDestroyPixmap (Display *dpy, GLXPixmap pixmap);
extern GLXPbuffer glXCreatePbuffer (Display *dpy, GLXFBConfig config, const int *attrib_list);
extern void glXDestroyPbuffer (Display *dpy, GLXPbuffer pbuf);
extern void glXQueryDrawable (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
extern GLXContext glXCreateNewContext (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
extern Bool glXMakeContextCurrent (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
extern GLXDrawable glXGetCurrentReadDrawable (void);
extern Display * glXGetCurrentDisplay (void);
extern int glXQueryContext (Display *, GLXContext, int, int *);
extern void glXSelectEvent (Display *, GLXDrawable, unsigned long);
extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *);
extern int glXQueryContext (Display *dpy, GLXContext ctx, int attribute, int *value);
extern void glXSelectEvent (Display *dpy, GLXDrawable draw, unsigned long event_mask);
extern void glXGetSelectedEvent (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
@@ -519,7 +526,7 @@ typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, un
#ifndef GLX_VERSION_1_4
#define GLX_VERSION_1_4 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *);
extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *procName);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
#endif
@@ -527,7 +534,7 @@ typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
#ifndef GLX_ARB_get_proc_address
#define GLX_ARB_get_proc_address 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *procName);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
#endif
@@ -543,7 +550,7 @@ typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procNam
#ifndef GLX_ARB_create_context
#define GLX_ARB_create_context 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern GLXContext glXCreateContextAttribsARB (Display *, GLXFBConfig, GLXContext, Bool, const int *);
extern GLXContext glXCreateContextAttribsARB (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list);
#endif
@@ -563,7 +570,7 @@ typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display *dpy, GLXFBCo
#ifndef GLX_SGI_swap_control
#define GLX_SGI_swap_control 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern int glXSwapIntervalSGI (int);
extern int glXSwapIntervalSGI (int interval);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
#endif
@@ -571,8 +578,8 @@ typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
#ifndef GLX_SGI_video_sync
#define GLX_SGI_video_sync 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern int glXGetVideoSyncSGI (unsigned int *);
extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
extern int glXGetVideoSyncSGI (unsigned int *count);
extern int glXWaitVideoSyncSGI (int divisor, int remainder, unsigned int *count);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
@@ -581,7 +588,7 @@ typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigne
#ifndef GLX_SGI_make_current_read
#define GLX_SGI_make_current_read 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext);
extern Bool glXMakeCurrentReadSGI (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
extern GLXDrawable glXGetCurrentReadDrawableSGI (void);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
@@ -592,8 +599,8 @@ typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
#define GLX_SGIX_video_source 1
#ifdef _VL_H
#ifdef GLX_GLXEXT_PROTOTYPES
extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode);
extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX);
extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
extern void glXDestroyGLXVideoSourceSGIX (Display *dpy, GLXVideoSourceSGIX glxvideosource);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
@@ -608,10 +615,10 @@ typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSou
#define GLX_EXT_import_context 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Display * glXGetCurrentDisplayEXT (void);
extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *);
extern GLXContextID glXGetContextIDEXT (const GLXContext);
extern GLXContext glXImportContextEXT (Display *, GLXContextID);
extern void glXFreeContextEXT (Display *, GLXContext);
extern int glXQueryContextInfoEXT (Display *dpy, GLXContext context, int attribute, int *value);
extern GLXContextID glXGetContextIDEXT (const GLXContext context);
extern GLXContext glXImportContextEXT (Display *dpy, GLXContextID contextID);
extern void glXFreeContextEXT (Display *dpy, GLXContext context);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
@@ -623,12 +630,12 @@ typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
#ifndef GLX_SGIX_fbconfig
#define GLX_SGIX_fbconfig 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *);
extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *);
extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap);
extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool);
extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX);
extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *);
extern int glXGetFBConfigAttribSGIX (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *dpy, int screen, int *attrib_list, int *nelements);
extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
extern GLXContext glXCreateContextWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *dpy, GLXFBConfigSGIX config);
extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *dpy, XVisualInfo *vis);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
@@ -641,11 +648,11 @@ typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy,
#ifndef GLX_SGIX_pbuffer
#define GLX_SGIX_pbuffer 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *);
extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX);
extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *);
extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long);
extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *);
extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
extern void glXDestroyGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf);
extern int glXQueryGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
extern void glXSelectEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long mask);
extern void glXGetSelectedEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long *mask);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
@@ -657,7 +664,7 @@ typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable draw
#ifndef GLX_SGI_cushion
#define GLX_SGI_cushion 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern void glXCushionSGI (Display *, Window, float);
extern void glXCushionSGI (Display *dpy, Window window, float cushion);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
#endif
@@ -665,11 +672,11 @@ typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushi
#ifndef GLX_SGIX_video_resize
#define GLX_SGIX_video_resize 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern int glXBindChannelToWindowSGIX (Display *, int, int, Window);
extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int);
extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *);
extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *);
extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum);
extern int glXBindChannelToWindowSGIX (Display *display, int screen, int channel, Window window);
extern int glXChannelRectSGIX (Display *display, int screen, int channel, int x, int y, int w, int h);
extern int glXQueryChannelRectSGIX (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
extern int glXQueryChannelDeltasSGIX (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
extern int glXChannelRectSyncSGIX (Display *display, int screen, int channel, GLenum synctype);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
@@ -682,7 +689,7 @@ typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, in
#define GLX_SGIX_dmbuffer 1
#ifdef _DM_BUFFER_H_
#ifdef GLX_GLXEXT_PROTOTYPES
extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer);
extern Bool glXAssociateDMPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
#endif /* _DM_BUFFER_H_ */
@@ -691,7 +698,7 @@ typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX
#ifndef GLX_SGIX_swap_group
#define GLX_SGIX_swap_group 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
extern void glXJoinSwapGroupSGIX (Display *dpy, GLXDrawable drawable, GLXDrawable member);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
#endif
@@ -699,8 +706,8 @@ typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawabl
#ifndef GLX_SGIX_swap_barrier
#define GLX_SGIX_swap_barrier 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int);
extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *);
extern void glXBindSwapBarrierSGIX (Display *dpy, GLXDrawable drawable, int barrier);
extern Bool glXQueryMaxSwapBarriersSGIX (Display *dpy, int screen, int *max);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
@@ -709,7 +716,7 @@ typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen,
#ifndef GLX_SUN_get_transparent_index
#define GLX_SUN_get_transparent_index 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *);
extern Status glXGetTransparentIndexSUN (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
#endif
@@ -717,7 +724,7 @@ typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overl
#ifndef GLX_MESA_copy_sub_buffer
#define GLX_MESA_copy_sub_buffer 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int);
extern void glXCopySubBufferMESA (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
#endif
@@ -725,7 +732,7 @@ typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawabl
#ifndef GLX_MESA_pixmap_colormap
#define GLX_MESA_pixmap_colormap 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap);
extern GLXPixmap glXCreateGLXPixmapMESA (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
#endif
@@ -733,7 +740,7 @@ typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo
#ifndef GLX_MESA_release_buffers
#define GLX_MESA_release_buffers 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable);
extern Bool glXReleaseBuffersMESA (Display *dpy, GLXDrawable drawable);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
#endif
@@ -741,7 +748,7 @@ typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawab
#ifndef GLX_MESA_set_3dfx_mode
#define GLX_MESA_set_3dfx_mode 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Bool glXSet3DfxModeMESA (int);
extern Bool glXSet3DfxModeMESA (int mode);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
#endif
@@ -757,11 +764,11 @@ typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
#ifndef GLX_OML_sync_control
#define GLX_OML_sync_control 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *);
extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *);
extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t);
extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *);
extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *);
extern Bool glXGetSyncValuesOML (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
extern Bool glXGetMscRateOML (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
extern int64_t glXSwapBuffersMscOML (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
extern Bool glXWaitForMscOML (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc);
extern Bool glXWaitForSbcOML (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
@@ -802,14 +809,14 @@ typedef struct {
} GLXPipeRectLimits;
#ifdef GLX_GLXEXT_PROTOTYPES
extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *, int *);
extern int glXHyperpipeConfigSGIX (Display *, int, int, GLXHyperpipeConfigSGIX *, int *);
extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *, int, int *);
extern int glXDestroyHyperpipeConfigSGIX (Display *, int);
extern int glXBindHyperpipeSGIX (Display *, int);
extern int glXQueryHyperpipeBestAttribSGIX (Display *, int, int, int, void *, void *);
extern int glXHyperpipeAttribSGIX (Display *, int, int, int, void *);
extern int glXQueryHyperpipeAttribSGIX (Display *, int, int, int, void *);
extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *dpy, int *npipes);
extern int glXHyperpipeConfigSGIX (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *dpy, int hpId, int *npipes);
extern int glXDestroyHyperpipeConfigSGIX (Display *dpy, int hpId);
extern int glXBindHyperpipeSGIX (Display *dpy, int hpId);
extern int glXQueryHyperpipeBestAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
extern int glXHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
extern int glXQueryHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
@@ -824,7 +831,7 @@ typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice
#ifndef GLX_MESA_agp_offset
#define GLX_MESA_agp_offset 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern unsigned int glXGetAGPOffsetMESA (const void *);
extern unsigned int glXGetAGPOffsetMESA (const void *pointer);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
#endif
@@ -840,8 +847,8 @@ typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
#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);
extern void glXBindTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
extern void glXReleaseTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer);
#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);
@@ -850,8 +857,8 @@ typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawab
#ifndef GLX_NV_present_video
#define GLX_NV_present_video 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern unsigned int * glXEnumerateVideoDevicesNV (Display *, int, int *);
extern int glXBindVideoDeviceNV (Display *, unsigned int, unsigned int, const int *);
extern unsigned int * glXEnumerateVideoDevicesNV (Display *dpy, int screen, int *nelements);
extern int glXBindVideoDeviceNV (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef unsigned int * ( * PFNGLXENUMERATEVIDEODEVICESNVPROC) (Display *dpy, int screen, int *nelements);
typedef int ( * PFNGLXBINDVIDEODEVICENVPROC) (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list);
@@ -860,12 +867,12 @@ typedef int ( * PFNGLXBINDVIDEODEVICENVPROC) (Display *dpy, unsigned int video_s
#ifndef GLX_NV_video_output
#define GLX_NV_video_output 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern int glXGetVideoDeviceNV (Display *, int, int, GLXVideoDeviceNV *);
extern int glXReleaseVideoDeviceNV (Display *, int, GLXVideoDeviceNV);
extern int glXBindVideoImageNV (Display *, GLXVideoDeviceNV, GLXPbuffer, int);
extern int glXReleaseVideoImageNV (Display *, GLXPbuffer);
extern int glXSendPbufferToVideoNV (Display *, GLXPbuffer, int, unsigned long *, GLboolean);
extern int glXGetVideoInfoNV (Display *, int, GLXVideoDeviceNV, unsigned long *, unsigned long *);
extern int glXGetVideoDeviceNV (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice);
extern int glXReleaseVideoDeviceNV (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice);
extern int glXBindVideoImageNV (Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer);
extern int glXReleaseVideoImageNV (Display *dpy, GLXPbuffer pbuf);
extern int glXSendPbufferToVideoNV (Display *dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock);
extern int glXGetVideoInfoNV (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef int ( * PFNGLXGETVIDEODEVICENVPROC) (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice);
typedef int ( * PFNGLXRELEASEVIDEODEVICENVPROC) (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice);
@@ -878,12 +885,12 @@ typedef int ( * PFNGLXGETVIDEOINFONVPROC) (Display *dpy, int screen, GLXVideoDev
#ifndef GLX_NV_swap_group
#define GLX_NV_swap_group 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Bool glXJoinSwapGroupNV (Display *, GLXDrawable, GLuint);
extern Bool glXBindSwapBarrierNV (Display *, GLuint, GLuint);
extern Bool glXQuerySwapGroupNV (Display *, GLXDrawable, GLuint *, GLuint *);
extern Bool glXQueryMaxSwapGroupsNV (Display *, int, GLuint *, GLuint *);
extern Bool glXQueryFrameCountNV (Display *, int, GLuint *);
extern Bool glXResetFrameCountNV (Display *, int);
extern Bool glXJoinSwapGroupNV (Display *dpy, GLXDrawable drawable, GLuint group);
extern Bool glXBindSwapBarrierNV (Display *dpy, GLuint group, GLuint barrier);
extern Bool glXQuerySwapGroupNV (Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier);
extern Bool glXQueryMaxSwapGroupsNV (Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers);
extern Bool glXQueryFrameCountNV (Display *dpy, int screen, GLuint *count);
extern Bool glXResetFrameCountNV (Display *dpy, int screen);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Bool ( * PFNGLXJOINSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint group);
typedef Bool ( * PFNGLXBINDSWAPBARRIERNVPROC) (Display *dpy, GLuint group, GLuint barrier);
@@ -896,11 +903,11 @@ typedef Bool ( * PFNGLXRESETFRAMECOUNTNVPROC) (Display *dpy, int screen);
#ifndef GLX_NV_video_capture
#define GLX_NV_video_capture 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern int glXBindVideoCaptureDeviceNV (Display *, unsigned int, GLXVideoCaptureDeviceNV);
extern GLXVideoCaptureDeviceNV * glXEnumerateVideoCaptureDevicesNV (Display *, int, int *);
extern void glXLockVideoCaptureDeviceNV (Display *, GLXVideoCaptureDeviceNV);
extern int glXQueryVideoCaptureDeviceNV (Display *, GLXVideoCaptureDeviceNV, int, int *);
extern void glXReleaseVideoCaptureDeviceNV (Display *, GLXVideoCaptureDeviceNV);
extern int glXBindVideoCaptureDeviceNV (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device);
extern GLXVideoCaptureDeviceNV * glXEnumerateVideoCaptureDevicesNV (Display *dpy, int screen, int *nelements);
extern void glXLockVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device);
extern int glXQueryVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value);
extern void glXReleaseVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef int ( * PFNGLXBINDVIDEOCAPTUREDEVICENVPROC) (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device);
typedef GLXVideoCaptureDeviceNV * ( * PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC) (Display *dpy, int screen, int *nelements);
@@ -912,7 +919,7 @@ typedef void ( * PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoC
#ifndef GLX_EXT_swap_control
#define GLX_EXT_swap_control 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern int glXSwapIntervalEXT (Display *, GLXDrawable, int);
extern int glXSwapIntervalEXT (Display *dpy, GLXDrawable drawable, int interval);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef int ( * PFNGLXSWAPINTERVALEXTPROC) (Display *dpy, GLXDrawable drawable, int interval);
#endif
@@ -920,11 +927,15 @@ typedef int ( * PFNGLXSWAPINTERVALEXTPROC) (Display *dpy, GLXDrawable drawable,
#ifndef GLX_NV_copy_image
#define GLX_NV_copy_image 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern void glXCopyImageSubDataNV (Display *, GLXContext, GLuint, GLenum, GLint, GLint, GLint, GLint, GLXContext, GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei);
extern void glXCopyImageSubDataNV (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef void ( * PFNGLXCOPYIMAGESUBDATANVPROC) (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
#endif
#ifndef GLX_INTEL_swap_event
#define GLX_INTEL_swap_event 1
#endif
#ifdef __cplusplus
}

View File

@@ -230,6 +230,13 @@ struct __DRItexOffsetExtensionRec {
};
/* Valid values for format in the setTexBuffer2 function below. These
* values match the GLX tokens for compatibility reasons, but we
* define them here since the DRI interface can't depend on GLX. */
#define __DRI_TEXTURE_FORMAT_NONE 0x20D8
#define __DRI_TEXTURE_FORMAT_RGB 0x20D9
#define __DRI_TEXTURE_FORMAT_RGBA 0x20DA
#define __DRI_TEX_BUFFER "DRI_TexBuffer"
#define __DRI_TEX_BUFFER_VERSION 2
struct __DRItexBufferExtensionRec {
@@ -262,10 +269,20 @@ struct __DRItexBufferExtensionRec {
* Used by drivers that implement DRI2
*/
#define __DRI2_FLUSH "DRI2_Flush"
#define __DRI2_FLUSH_VERSION 1
#define __DRI2_FLUSH_VERSION 3
struct __DRI2flushExtensionRec {
__DRIextension base;
void (*flush)(__DRIdrawable *drawable);
/**
* Ask the driver to call getBuffers/getBuffersWithFormat before
* it starts rendering again.
*
* \param drawable the drawable to invalidate
*
* \since 3
*/
void (*invalidate)(__DRIdrawable *drawable);
};
@@ -734,4 +751,59 @@ struct __DRIdri2ExtensionRec {
};
/**
* This extension provides functionality to enable various EGLImage
* extensions.
*/
#define __DRI_IMAGE "DRI_IMAGE"
#define __DRI_IMAGE_VERSION 1
/**
* These formats correspond to the similarly named MESA_FORMAT_*
* tokens, except in the native endian of the CPU. For example, on
* little endian __DRI_IMAGE_FORMAT_XRGB8888 corresponds to
* MESA_FORMAT_XRGB8888, but MESA_FORMAT_XRGB8888_REV on big endian.
*/
#define __DRI_IMAGE_FORMAT_RGB565 0x1001
#define __DRI_IMAGE_FORMAT_XRGB8888 0x1002
#define __DRI_IMAGE_FORMAT_ARGB8888 0x1003
typedef struct __DRIimageRec __DRIimage;
typedef struct __DRIimageExtensionRec __DRIimageExtension;
struct __DRIimageExtensionRec {
__DRIextension base;
__DRIimage *(*createImageFromName)(__DRIcontext *context,
int width, int height, int format,
int name, int pitch,
void *loaderPrivate);
__DRIimage *(*createImageFromRenderbuffer)(__DRIcontext *context,
int renderbuffer,
void *loaderPrivate);
void (*destroyImage)(__DRIimage *image);
};
/**
* This extension must be implemented by the loader and passed to the
* driver at screen creation time. The EGLImage entry points in the
* various client APIs take opaque EGLImage handles and use this
* extension to map them to a __DRIimage. At version 1, this
* extensions allows mapping EGLImage pointers to __DRIimage pointers,
* but future versions could support other EGLImage-like, opaque types
* with new lookup functions.
*/
#define __DRI_IMAGE_LOOKUP "DRI_IMAGE_LOOKUP"
#define __DRI_IMAGE_LOOKUP_VERSION 1
typedef struct __DRIimageLookupExtensionRec __DRIimageLookupExtension;
struct __DRIimageLookupExtensionRec {
__DRIextension base;
__DRIimage *(*lookupEGLImage)(__DRIcontext *context, void *image,
void *loaderPrivate);
};
#endif

View File

@@ -178,8 +178,4 @@ typedef struct __GLcontextModesRec {
#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
#endif /* __gl_core_h_ */

View File

@@ -1,482 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 6.1
*
* Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* \file miniglx.h
* \brief Mini GLX interface functions.
* \author Brian Paul
*
* See comments miniglx.c for more information.
*/
#ifndef MINIGLX_H
#define MINIGLX_H
#include <GL/gl.h>
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* \name Replacement Xlib/GLX types
*/
/*@{*/
/**
* \brief Boolean type.
*
* It can have the values #True or #False.
*/
#ifndef MINIGLX_NO_XTYPES
typedef int Bool;
#endif
typedef int MINI_Bool;
/**
* \brief Color map.
*
* Alias for private ::MiniGLXColormapRec structure.
*/
typedef struct MiniGLXColormapRec *MINI_Colormap;
#ifndef MINIGLX_NO_XTYPES
typedef struct MiniGLXColormapRec *Colormap;
#endif
/**
* \brief Window attributes.
*/
typedef struct MiniGLXSetWindowAttributesRec {
int background_pixel; /**< \brief background pixel */
int border_pixel; /**< \brief border pixel value */
MINI_Colormap colormap; /**< \brief color map to be associated with window */
int event_mask; /**< \brief set of events that should be saved */
} XSetWindowAttributes;
/**
* \brief Visual.
*
* Alias for the private ::MiniGLXVisualRec structure.
*
* \sa \ref datatypes.
*/
typedef struct MiniGLXVisualRec Visual;
/**
* \brief Visual information.
*
* \sa \ref datatypes.
*/
#ifndef MINIGLX_NO_XTYPES
typedef unsigned long VisualID;
#endif
typedef unsigned long MINI_VisualID;
typedef struct MiniGLXXVisualInfoRec {
Visual *visual; /**< \brief pointer to the GLX Visual */
MINI_VisualID visualid; /**< \brief visual ID */
int screen; /**< \brief screen number */
int depth; /**< \brief bit depth */
#if defined(__cplusplus) || defined(c_plusplus)
int c_class; /**< \brief class */
#else
int class; /**< \brief class */
#endif
int bits_per_rgb; /**< \brief total bits per pixel */
} XVisualInfo;
/**
* \brief GLX Frame Buffer Configuration (for pbuffers)
* \sa \ref datatypes.
*/
typedef struct MiniGLXFBConfigRec {
XVisualInfo *visInfo;
} GLXFBConfig;
/**
* \brief Display handle.
*
* Alias for the private ::MiniGLXDisplayRec structure.
*
* \sa \ref datatypes.
*/
#ifndef MINIGLX_NO_XTYPES
typedef struct MiniGLXDisplayRec Display;
#endif
typedef struct MiniGLXDisplayRec MINI_Display;
/**
* \brief Window handle.
*
* Alias for the private ::MiniGLXWindowRec structure.
*
* \sa \ref datatypes.
*/
#ifndef MINIGLX_NO_XTYPES
typedef struct MiniGLXWindowRec *Window;
#endif
typedef struct MiniGLXWindowRec *MINI_Window;
/**
* \brief Drawable.
*
* Alias for the private ::MiniGLXWindowRec structure.
*
* For Mini GLX only the full-screen window can be used as source and
* destination in graphics operations.
*
* \sa \ref datatypes.
*/
#ifndef MINIGLX_NO_XTYPES
typedef struct MiniGLXWindowRec *Drawable;
#endif
typedef struct MiniGLXWindowRec *MINI_Drawable;
/**
* \brief GLX drawable.
*
* Alias for the private ::MiniGLXWindowRec structure.
*
* Same as #Drawable.
*
* \sa \ref datatypes.
*/
typedef struct MiniGLXWindowRec *GLXDrawable;
/**
* \brief GLX pbuffer.
*
* Alias for the private ::MiniGLXWindowRec structure.
*
* Same as #Drawable.
*
* \sa \ref datatypes.
*/
typedef struct MiniGLXWindowRec *GLXPbuffer;
/**
* \brief GLX context.
*
* Alias for the private ::MiniGLXContext structure.
*
* \sa \ref datatypes.
*/
typedef struct MiniGLXContextRec *GLXContext;
/*@}*/
typedef struct {
int type;
unsigned long serial; /* # of last request processed by server */
MINI_Bool send_event; /* true if this came from a SendEvent request */
MINI_Display *display; /* Display the event was read from */
MINI_Window window;
int x, y;
int width, height;
int count; /* if non-zero, at least this many more */
} XExposeEvent;
typedef struct {
int type;
unsigned long serial; /* # of last request processed by server */
MINI_Bool send_event; /* true if this came from a SendEvent request */
MINI_Display *display; /* Display the event was read from */
MINI_Window parent; /* parent of the window */
MINI_Window window; /* window id of window created */
int x, y; /* window location */
int width, height; /* size of window */
int border_width; /* border width */
MINI_Bool override_redirect; /* creation should be overridden */
} XCreateWindowEvent;
typedef struct {
int type;
unsigned long serial; /* # of last request processed by server */
MINI_Bool send_event; /* true if this came from a SendEvent request */
MINI_Display *display; /* Display the event was read from */
MINI_Window event;
MINI_Window window;
} XDestroyWindowEvent;
typedef struct {
int type;
unsigned long serial; /* # of last request processed by server */
MINI_Bool send_event; /* true if this came from a SendEvent request */
MINI_Display *display; /* Display the event was read from */
MINI_Window event;
MINI_Window window;
MINI_Bool from_configure;
} XUnmapEvent;
typedef struct {
int type;
unsigned long serial; /* # of last request processed by server */
MINI_Bool send_event; /* true if this came from a SendEvent request */
MINI_Display *display; /* Display the event was read from */
MINI_Window event;
MINI_Window window;
MINI_Bool override_redirect; /* boolean, is override set... */
} XMapEvent;
typedef struct {
int type;
unsigned long serial; /* # of last request processed by server */
MINI_Bool send_event; /* true if this came from a SendEvent request */
MINI_Display *display; /* Display the event was read from */
MINI_Window parent;
MINI_Window window;
} XMapRequestEvent;
typedef union _XEvent {
int type; /* must not be changed; first element */
XExposeEvent xexpose;
XCreateWindowEvent xcreatewindow;
XDestroyWindowEvent xdestroywindow;
XUnmapEvent xunmap;
XMapEvent xmap;
XMapRequestEvent xmaprequest;
long pad[24];
} XEvent;
/**
* \name Xlib constants
*/
/*@{*/
#define False 0
#define True 1
#define None 0
#define AllocNone 0
#define InputOutput 1
#define ExposureMask (1L<<15)
#define StructureNotifyMask (1L<<17)
#define CWBackPixel (1L<<1)
#define CWBorderPixel (1L<<3)
#define CWEventMask (1L<<11)
#define CWColormap (1L<<13)
#define PseudoColor 3
#define TrueColor 4
#define VisualIDMask 0x1
#define VisualScreenMask 0x2
#define Expose 12
#define CreateNotify 16
#define DestroyNotify 17
#define UnmapNotify 18
#define MapNotify 19
#define MapRequest 20
/*@}*/
/**
* \name Standard GLX tokens
*/
/*@{*/
#define GLX_USE_GL 1
#define GLX_BUFFER_SIZE 2
#define GLX_LEVEL 3
#define GLX_RGBA 4
#define GLX_DOUBLEBUFFER 5
#define GLX_STEREO 6
#define GLX_AUX_BUFFERS 7
#define GLX_RED_SIZE 8
#define GLX_GREEN_SIZE 9
#define GLX_BLUE_SIZE 10
#define GLX_ALPHA_SIZE 11
#define GLX_DEPTH_SIZE 12
#define GLX_STENCIL_SIZE 13
#define GLX_ACCUM_RED_SIZE 14
#define GLX_ACCUM_GREEN_SIZE 15
#define GLX_ACCUM_BLUE_SIZE 16
#define GLX_ACCUM_ALPHA_SIZE 17
#define GLX_BAD_ATTRIBUTE 1
#define GLX_BAD_VISUAL 4
/*@}*/
/**
* \name Unique to Mini GLX
*
* At compile time, the Mini GLX interface version can be tested with the
* MINI_GLX_VERSION_1_x preprocessor tokens.
*
* \sa glXQueryVersion()
*/
/*@{*/
/** \brief Defined if version 1.0 of Mini GLX is supported. */
#define MINI_GLX_VERSION_1_0 1
/** \brief Defined if version 1.1 of Mini GLX is supported. */
#define MINI_GLX_VERSION_1_1 1
/*@}*/
/**
* \name Server-specific functions
*/
extern MINI_Display *
__miniglx_StartServer( const char *display_name );
extern int
__miniglx_Select( MINI_Display *dpy, int maxfd,
fd_set *rfds, fd_set *wfds, fd_set *xfds,
struct timeval *tv );
/**
* \name Simulated Xlib functions
*/
/*@{*/
extern MINI_Display *
XOpenDisplay( const char *dpy_name );
extern void
XCloseDisplay( MINI_Display *display );
extern MINI_Window
XCreateWindow( MINI_Display *display, MINI_Window parent, int x, int y,
unsigned int width, unsigned int height,
unsigned int border_width, int depth, unsigned int winclass,
Visual *visual, unsigned long valuemask,
XSetWindowAttributes *attributes );
extern int
XNextEvent(MINI_Display *display, XEvent *event_return);
extern MINI_Bool
XCheckMaskEvent( MINI_Display *dpy, long event_mask, XEvent *event_return );
/**
* \brief Return the root window.
*
* \param display the display handle. It is ignored by Mini GLX, but should be
* the value returned by XOpenDisplay().
* \param screen the screen number on the host server. It is ignored by Mini
* GLX but should be zero.
*
* \return the root window. Always zero on Mini GLX.
*/
#define RootWindow(display, screen) 0
#define DefaultScreen(dpy) 0
extern void
XDestroyWindow( MINI_Display *display, MINI_Window w );
extern void
XMapWindow( MINI_Display *display, MINI_Window w );
/* Should clients have access to this?
*/
extern void
XUnmapWindow( MINI_Display *display, MINI_Window w );
extern MINI_Colormap
XCreateColormap( MINI_Display *display, MINI_Window w, Visual *visual, int alloc );
extern void
XFreeColormap( MINI_Display *display, MINI_Colormap cmap );
extern void
XFree( void *data );
extern XVisualInfo *
XGetVisualInfo( MINI_Display *display, long vinfo_mask,
XVisualInfo *vinfo_template, int *nitems_return );
/*@}*/
/**
* \name GLX functions
*/
/*@{*/
extern XVisualInfo*
glXChooseVisual( MINI_Display *dpy, int screen, int *attribList );
extern int
glXGetConfig( MINI_Display *dpy, XVisualInfo *vis, int attrib, int *value );
extern GLXContext
glXCreateContext( MINI_Display *dpy, XVisualInfo *vis,
GLXContext shareList, MINI_Bool direct );
extern void
glXDestroyContext( MINI_Display *dpy, GLXContext ctx );
extern MINI_Bool
glXMakeCurrent( MINI_Display *dpy, GLXDrawable drawable, GLXContext ctx);
extern void
glXSwapBuffers( MINI_Display *dpy, GLXDrawable drawable );
extern GLXContext
glXGetCurrentContext( void );
extern GLXDrawable
glXGetCurrentDrawable( void );
extern void
(*glXGetProcAddress(const GLubyte *procname))( void );
extern MINI_Bool
glXQueryVersion( MINI_Display *dpy, int *major, int *minor );
/* Added in MiniGLX 1.1 */
extern GLXPbuffer
glXCreatePbuffer( MINI_Display *dpy, GLXFBConfig config, const int *attribList );
extern void
glXDestroyPbuffer( MINI_Display *dpy, GLXPbuffer pbuf );
extern GLXFBConfig *
glXChooseFBConfig( MINI_Display *dpy, int screen, const int *attribList,
int *nitems );
extern XVisualInfo *
glXGetVisualFromFBConfig( MINI_Display *dpy, GLXFBConfig config );
extern void *glXAllocateMemoryMESA(Display *dpy, int scrn,
size_t size, float readFreq,
float writeFreq, float priority);
extern void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer);
extern GLuint glXGetMemoryOffsetMESA( Display *dpy, int scrn,
const void *pointer );
/*@}*/
extern void
__glXScrEnableExtension( void *, const char * name );
/*@}*/
#ifdef __cplusplus
}
#endif
#endif /* MINIGLX_H */

View File

@@ -1,97 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 4.0
* Copyright (C) 1995-2001 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.
*/
/*
* SVGA/Mesa interface for Linux.
*/
/*
* Intro to using the VGA/Mesa interface
*
* 1. #include the <vga.h> file
* 2. Call vga_init() to initialize the SVGA library.
* 3. Call vga_setmode() to specify the screen size and color depth.
* 4. Call SVGAMesaCreateContext() to setup a Mesa context. If using 8-bit
* color Mesa assumes color index mode, if using 16-bit or deeper color
* Mesa assumes RGB mode.
* 5. Call SVGAMesaMakeCurrent() to activate the Mesa context.
* 6. You can now use the Mesa API functions.
* 7. Before exiting, call SVGAMesaDestroyContext() then vga_setmode(TEXT)
* to restore the original text screen.
*
* Notes
* 1. You must run your executable as root (or use the set UID-bit) because
* the SVGA library requires it.
* 2. The SVGA driver is not fully implemented yet. See svgamesa.c for what
* has to be done yet.
*/
#ifndef SVGAMESA_H
#define SVGAMESA_H
#define SVGAMESA_MAJOR_VERSION 4
#define SVGAMESA_MINOR_VERSION 0
#ifdef __cplusplus
extern "C" {
#endif
#include "GL/gl.h"
/*
* This is the SVGAMesa context 'handle':
*/
typedef struct svgamesa_context *SVGAMesaContext;
/*
* doubleBuffer flag new in version 2.4
*/
extern int SVGAMesaInit( int GraphMode );
extern int SVGAMesaClose( void );
extern SVGAMesaContext SVGAMesaCreateContext( GLboolean doubleBuffer );
extern void SVGAMesaDestroyContext( SVGAMesaContext ctx );
extern void SVGAMesaMakeCurrent( SVGAMesaContext ctx );
extern void SVGAMesaSwapBuffers( void );
extern void SVGAMesaSetCI(int ndx, GLubyte red, GLubyte green, GLubyte blue);
extern SVGAMesaContext SVGAMesaGetCurrentContext( void );
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -62,11 +62,12 @@
#define __wglext_h_
#if !defined(APIENTRY) && !defined(__CYGWIN__)
#if !defined(WINAPI)
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN 1
# endif
#include <windows.h>
# undef WIN32_LEAN_AND_MEAN
#endif
/*
@@ -117,6 +118,46 @@ typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState
#endif /* WGL_3DL_stereo_control */
/* ------------------------ WGL_AMD_gpu_association ------------------------ */
#ifndef WGL_AMD_gpu_association
#define WGL_AMD_gpu_association 1
#define WGL_GPU_VENDOR_AMD 0x1F00
#define WGL_GPU_RENDERER_STRING_AMD 0x1F01
#define WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02
#define WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2
#define WGL_GPU_RAM_AMD 0x21A3
#define WGL_GPU_CLOCK_AMD 0x21A4
#define WGL_GPU_NUM_PIPES_AMD 0x21A5
#define WGL_GPU_NUM_SIMD_AMD 0x21A6
#define WGL_GPU_NUM_RB_AMD 0x21A7
#define WGL_GPU_NUM_SPI_AMD 0x21A8
typedef VOID (WINAPI * PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC) (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC) (UINT id);
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (UINT id, HGLRC hShareContext, const int* attribList);
typedef BOOL (WINAPI * PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC) (HGLRC hglrc);
typedef UINT (WINAPI * PFNWGLGETCONTEXTGPUIDAMDPROC) (HGLRC hglrc);
typedef HGLRC (WINAPI * PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void);
typedef UINT (WINAPI * PFNWGLGETGPUIDSAMDPROC) (UINT maxCount, UINT* ids);
typedef INT (WINAPI * PFNWGLGETGPUINFOAMDPROC) (UINT id, INT property, GLenum dataType, UINT size, void* data);
typedef BOOL (WINAPI * PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (HGLRC hglrc);
#define wglBlitContextFramebufferAMD WGLEW_GET_FUN(__wglewBlitContextFramebufferAMD)
#define wglCreateAssociatedContextAMD WGLEW_GET_FUN(__wglewCreateAssociatedContextAMD)
#define wglCreateAssociatedContextAttribsAMD WGLEW_GET_FUN(__wglewCreateAssociatedContextAttribsAMD)
#define wglDeleteAssociatedContextAMD WGLEW_GET_FUN(__wglewDeleteAssociatedContextAMD)
#define wglGetContextGPUIDAMD WGLEW_GET_FUN(__wglewGetContextGPUIDAMD)
#define wglGetCurrentAssociatedContextAMD WGLEW_GET_FUN(__wglewGetCurrentAssociatedContextAMD)
#define wglGetGPUIDsAMD WGLEW_GET_FUN(__wglewGetGPUIDsAMD)
#define wglGetGPUInfoAMD WGLEW_GET_FUN(__wglewGetGPUInfoAMD)
#define wglMakeAssociatedContextCurrentAMD WGLEW_GET_FUN(__wglewMakeAssociatedContextCurrentAMD)
#define WGLEW_AMD_gpu_association WGLEW_GET_VAR(__WGLEW_AMD_gpu_association)
#endif /* WGL_AMD_gpu_association */
/* ------------------------- WGL_ARB_buffer_region ------------------------- */
#ifndef WGL_ARB_buffer_region
@@ -161,6 +202,19 @@ typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShar
#endif /* WGL_ARB_create_context */
/* --------------------- WGL_ARB_create_context_profile -------------------- */
#ifndef WGL_ARB_create_context_profile
#define WGL_ARB_create_context_profile 1
#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
#define WGLEW_ARB_create_context_profile WGLEW_GET_VAR(__WGLEW_ARB_create_context_profile)
#endif /* WGL_ARB_create_context_profile */
/* ----------------------- WGL_ARB_extensions_string ----------------------- */
#ifndef WGL_ARB_extensions_string
@@ -752,6 +806,19 @@ typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD* pFrameCount, DWO
#endif /* WGL_I3D_swap_frame_usage */
/* --------------------------- WGL_NV_copy_image --------------------------- */
#ifndef WGL_NV_copy_image
#define WGL_NV_copy_image 1
typedef BOOL (WINAPI * PFNWGLCOPYIMAGESUBDATANVPROC) (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
#define wglCopyImageSubDataNV WGLEW_GET_FUN(__wglewCopyImageSubDataNV)
#define WGLEW_NV_copy_image WGLEW_GET_VAR(__WGLEW_NV_copy_image)
#endif /* WGL_NV_copy_image */
/* -------------------------- WGL_NV_float_buffer -------------------------- */
#ifndef WGL_NV_float_buffer
@@ -863,7 +930,7 @@ typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrie
typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group);
typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint* count);
typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint* maxGroups, GLuint *maxBarriers);
typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint* group);
typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint* group, GLuint *barrier);
typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC);
#define wglBindSwapBarrierNV WGLEW_GET_FUN(__wglewBindSwapBarrierNV)
@@ -969,6 +1036,16 @@ struct WGLEWContextStruct
WGLEW_EXPORT PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL;
WGLEW_EXPORT PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC __wglewBlitContextFramebufferAMD;
WGLEW_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC __wglewCreateAssociatedContextAMD;
WGLEW_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC __wglewCreateAssociatedContextAttribsAMD;
WGLEW_EXPORT PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC __wglewDeleteAssociatedContextAMD;
WGLEW_EXPORT PFNWGLGETCONTEXTGPUIDAMDPROC __wglewGetContextGPUIDAMD;
WGLEW_EXPORT PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC __wglewGetCurrentAssociatedContextAMD;
WGLEW_EXPORT PFNWGLGETGPUIDSAMDPROC __wglewGetGPUIDsAMD;
WGLEW_EXPORT PFNWGLGETGPUINFOAMDPROC __wglewGetGPUInfoAMD;
WGLEW_EXPORT PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC __wglewMakeAssociatedContextCurrentAMD;
WGLEW_EXPORT PFNWGLCREATEBUFFERREGIONARBPROC __wglewCreateBufferRegionARB;
WGLEW_EXPORT PFNWGLDELETEBUFFERREGIONARBPROC __wglewDeleteBufferRegionARB;
WGLEW_EXPORT PFNWGLRESTOREBUFFERREGIONARBPROC __wglewRestoreBufferRegionARB;
@@ -1054,6 +1131,8 @@ WGLEW_EXPORT PFNWGLENDFRAMETRACKINGI3DPROC __wglewEndFrameTrackingI3D;
WGLEW_EXPORT PFNWGLGETFRAMEUSAGEI3DPROC __wglewGetFrameUsageI3D;
WGLEW_EXPORT PFNWGLQUERYFRAMETRACKINGI3DPROC __wglewQueryFrameTrackingI3D;
WGLEW_EXPORT PFNWGLCOPYIMAGESUBDATANVPROC __wglewCopyImageSubDataNV;
WGLEW_EXPORT PFNWGLCREATEAFFINITYDCNVPROC __wglewCreateAffinityDCNV;
WGLEW_EXPORT PFNWGLDELETEDCNVPROC __wglewDeleteDCNV;
WGLEW_EXPORT PFNWGLENUMGPUDEVICESNVPROC __wglewEnumGpuDevicesNV;
@@ -1089,8 +1168,10 @@ WGLEW_EXPORT PFNWGLWAITFORMSCOMLPROC __wglewWaitForMscOML;
WGLEW_EXPORT PFNWGLWAITFORSBCOMLPROC __wglewWaitForSbcOML;
WGLEW_EXPORT GLboolean __WGLEW_3DFX_multisample;
WGLEW_EXPORT GLboolean __WGLEW_3DL_stereo_control;
WGLEW_EXPORT GLboolean __WGLEW_AMD_gpu_association;
WGLEW_EXPORT GLboolean __WGLEW_ARB_buffer_region;
WGLEW_EXPORT GLboolean __WGLEW_ARB_create_context;
WGLEW_EXPORT GLboolean __WGLEW_ARB_create_context_profile;
WGLEW_EXPORT GLboolean __WGLEW_ARB_extensions_string;
WGLEW_EXPORT GLboolean __WGLEW_ARB_framebuffer_sRGB;
WGLEW_EXPORT GLboolean __WGLEW_ARB_make_current_read;
@@ -1117,6 +1198,7 @@ WGLEW_EXPORT GLboolean __WGLEW_I3D_genlock;
WGLEW_EXPORT GLboolean __WGLEW_I3D_image_buffer;
WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_lock;
WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_usage;
WGLEW_EXPORT GLboolean __WGLEW_NV_copy_image;
WGLEW_EXPORT GLboolean __WGLEW_NV_float_buffer;
WGLEW_EXPORT GLboolean __WGLEW_NV_gpu_affinity;
WGLEW_EXPORT GLboolean __WGLEW_NV_present_video;

273
include/KHR/khrplatform.h Normal file
View File

@@ -0,0 +1,273 @@
#ifndef __khrplatform_h_
#define __khrplatform_h_
/*
** Copyright (c) 2008-2009 The Khronos Group Inc.
**
** 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:
**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Materials.
**
** 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.
*/
/* Khronos platform-specific types and definitions.
*
* $Revision: 9356 $ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $
*
* Adopters may modify this file to suit their platform. Adopters are
* encouraged to submit platform specific modifications to the Khronos
* group so that they can be included in future versions of this file.
* Please submit changes by sending them to the public Khronos Bugzilla
* (http://khronos.org/bugzilla) by filing a bug against product
* "Khronos (general)" component "Registry".
*
* A predefined template which fills in some of the bug fields can be
* reached using http://tinyurl.com/khrplatform-h-bugreport, but you
* must create a Bugzilla login first.
*
*
* See the Implementer's Guidelines for information about where this file
* should be located on your system and for more details of its use:
* http://www.khronos.org/registry/implementers_guide.pdf
*
* This file should be included as
* #include <KHR/khrplatform.h>
* by Khronos client API header files that use its types and defines.
*
* The types in khrplatform.h should only be used to define API-specific types.
*
* Types defined in khrplatform.h:
* khronos_int8_t signed 8 bit
* khronos_uint8_t unsigned 8 bit
* khronos_int16_t signed 16 bit
* khronos_uint16_t unsigned 16 bit
* khronos_int32_t signed 32 bit
* khronos_uint32_t unsigned 32 bit
* khronos_int64_t signed 64 bit
* khronos_uint64_t unsigned 64 bit
* khronos_intptr_t signed same number of bits as a pointer
* khronos_uintptr_t unsigned same number of bits as a pointer
* khronos_ssize_t signed size
* khronos_usize_t unsigned size
* khronos_float_t signed 32 bit floating point
* khronos_time_ns_t unsigned 64 bit time in nanoseconds
* khronos_utime_nanoseconds_t unsigned time interval or absolute time in
* nanoseconds
* khronos_stime_nanoseconds_t signed time interval in nanoseconds
* khronos_boolean_enum_t enumerated boolean type. This should
* only be used as a base type when a client API's boolean type is
* an enum. Client APIs which use an integer or other type for
* booleans cannot use this as the base type for their boolean.
*
* Tokens defined in khrplatform.h:
*
* KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
*
* KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
* KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
*
* Calling convention macros defined in this file:
* KHRONOS_APICALL
* KHRONOS_APIENTRY
* KHRONOS_APIATTRIBUTES
*
* These may be used in function prototypes as:
*
* KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
* int arg1,
* int arg2) KHRONOS_APIATTRIBUTES;
*/
/*-------------------------------------------------------------------------
* Definition of KHRONOS_APICALL
*-------------------------------------------------------------------------
* This precedes the return type of the function in the function prototype.
*/
#if defined(_WIN32) && !defined(__SCITECH_SNAP__)
# define KHRONOS_APICALL __declspec(dllimport)
#elif defined (__SYMBIAN32__)
# define KHRONOS_APICALL IMPORT_C
#elif (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303) \
|| (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
/* KHRONOS_APIATTRIBUTES is not used by the client API headers yet */
# define KHRONOS_APICALL __attribute__((visibility("default")))
#else
# define KHRONOS_APICALL
#endif
/*-------------------------------------------------------------------------
* Definition of KHRONOS_APIENTRY
*-------------------------------------------------------------------------
* This follows the return type of the function and precedes the function
* name in the function prototype.
*/
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
/* Win32 but not WinCE */
# define KHRONOS_APIENTRY __stdcall
#else
# define KHRONOS_APIENTRY
#endif
/*-------------------------------------------------------------------------
* Definition of KHRONOS_APIATTRIBUTES
*-------------------------------------------------------------------------
* This follows the closing parenthesis of the function prototype arguments.
*/
#if defined (__ARMCC_2__)
#define KHRONOS_APIATTRIBUTES __softfp
#else
#define KHRONOS_APIATTRIBUTES
#endif
/*-------------------------------------------------------------------------
* basic type definitions
*-----------------------------------------------------------------------*/
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
/*
* Using <stdint.h>
*/
#include <stdint.h>
typedef int32_t khronos_int32_t;
typedef uint32_t khronos_uint32_t;
typedef int64_t khronos_int64_t;
typedef uint64_t khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#elif defined(__VMS ) || defined(__sgi)
/*
* Using <inttypes.h>
*/
#include <inttypes.h>
typedef int32_t khronos_int32_t;
typedef uint32_t khronos_uint32_t;
typedef int64_t khronos_int64_t;
typedef uint64_t khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
/*
* Win32
*/
typedef __int32 khronos_int32_t;
typedef unsigned __int32 khronos_uint32_t;
typedef __int64 khronos_int64_t;
typedef unsigned __int64 khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#elif defined(__sun__) || defined(__digital__)
/*
* Sun or Digital
*/
typedef int khronos_int32_t;
typedef unsigned int khronos_uint32_t;
#if defined(__arch64__) || defined(_LP64)
typedef long int khronos_int64_t;
typedef unsigned long int khronos_uint64_t;
#else
typedef long long int khronos_int64_t;
typedef unsigned long long int khronos_uint64_t;
#endif /* __arch64__ */
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#elif 0
/*
* Hypothetical platform with no float or int64 support
*/
typedef int khronos_int32_t;
typedef unsigned int khronos_uint32_t;
#define KHRONOS_SUPPORT_INT64 0
#define KHRONOS_SUPPORT_FLOAT 0
#else
/*
* Generic fallback
*/
#include <stdint.h>
typedef int32_t khronos_int32_t;
typedef uint32_t khronos_uint32_t;
typedef int64_t khronos_int64_t;
typedef uint64_t khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#endif
/*
* Types that are (so far) the same on all platforms
*/
typedef signed char khronos_int8_t;
typedef unsigned char khronos_uint8_t;
typedef signed short int khronos_int16_t;
typedef unsigned short int khronos_uint16_t;
typedef signed long int khronos_intptr_t;
typedef unsigned long int khronos_uintptr_t;
typedef signed long int khronos_ssize_t;
typedef unsigned long int khronos_usize_t;
#if KHRONOS_SUPPORT_FLOAT
/*
* Float type
*/
typedef float khronos_float_t;
#endif
#if KHRONOS_SUPPORT_INT64
/* Time types
*
* These types can be used to represent a time interval in nanoseconds or
* an absolute Unadjusted System Time. Unadjusted System Time is the number
* of nanoseconds since some arbitrary system event (e.g. since the last
* time the system booted). The Unadjusted System Time is an unsigned
* 64 bit value that wraps back to 0 every 584 years. Time intervals
* may be either signed or unsigned.
*/
typedef khronos_uint64_t khronos_utime_nanoseconds_t;
typedef khronos_int64_t khronos_stime_nanoseconds_t;
#endif
/*
* Dummy value used to pad enum types to 32 bits.
*/
#ifndef KHRONOS_MAX_ENUM
#define KHRONOS_MAX_ENUM 0x7FFFFFFF
#endif
/*
* Enumerated boolean type
*
* Values other than zero should be considered to be true. Therefore
* comparisons should not be made against KHRONOS_TRUE.
*/
typedef enum {
KHRONOS_FALSE = 0,
KHRONOS_TRUE = 1,
KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
} khronos_boolean_enum_t;
#endif /* __khrplatform_h_ */

View File

@@ -38,6 +38,11 @@
extern "C" {
#endif
#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
# define VG_API_CALL __attribute__((visibility("default")))
# define VGU_API_CALL __attribute__((visibility("default")))
#endif
#ifndef VG_API_CALL
#if defined(OPENVG_STATIC_LIBRARY)
# define VG_API_CALL

View File

@@ -1,8 +1,8 @@
/**************************************************************************
*
* Copyright 2006 Tungsten Graphics, Inc., Bismarck, ND., USA
*
* Copyright 2007-2010 VMware, Inc.
* 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
@@ -10,32 +10,37 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* 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.
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
*
*
**************************************************************************/
/*
* Authors: Keith Whitwell <keithw-at-tungstengraphics-dot-com>
*/
#include "radeon_winsys_softpipe.h"
#ifndef _STDBOOL_H_
#define _STDBOOL_H_
struct pipe_context *radeon_create_softpipe(struct pipe_winsys* winsys)
{
struct pipe_screen *pipe_screen;
#ifndef __cplusplus
pipe_screen = softpipe_create_screen(winsys);
#define false 0
#define true 1
#define bool _Bool
return softpipe_create(pipe_screen);
}
/* For compilers that don't have the builtin _Bool type. */
#if defined(_MSC_VER) || (__STDC_VERSION__ < 199901L && __GNUC__ < 3)
typedef unsigned char _Bool;
#endif
#endif /* !__cplusplus */
#define __bool_true_false_are_defined 1
#endif /* !_STDBOOL_H_ */

119
include/c99/stdint.h Normal file
View File

@@ -0,0 +1,119 @@
/**************************************************************************
*
* Copyright 2007-2010 VMware, Inc.
* 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, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
**************************************************************************/
/*
* stdint.h --
*
* Portable subset of C99's stdint.h.
*
* At the moment it only supports MSVC, given all other mainstream compilers
* already support C99. If this is necessary for other compilers then it
* might be worth to replace this with
* http://www.azillionmonkeys.com/qed/pstdint.h.
*/
#ifndef _STDINT_H_
#define _STDINT_H_
#ifndef INT8_MAX
#define INT8_MAX 127
#endif
#ifndef INT8_MIN
#define INT8_MIN -128
#endif
#ifndef UINT8_MAX
#define UINT8_MAX 255
#endif
#ifndef INT16_MAX
#define INT16_MAX 32767
#endif
#ifndef INT16_MIN
#define INT16_MIN -32768
#endif
#ifndef UINT16_MAX
#define UINT16_MAX 65535
#endif
#ifndef INT32_MAX
#define INT32_MAX 2147483647
#endif
#ifndef INT32_MIN
#define INT32_MIN -2147483648
#endif
#ifndef UINT32_MAX
#define UINT32_MAX 4294967295U
#endif
#ifndef INT8_C
#define INT8_C(__val) __val
#endif
#ifndef UINT8_C
#define UINT8_C(__val) __val
#endif
#ifndef INT16_C
#define INT16_C(__val) __val
#endif
#ifndef UINT16_C
#define UINT16_C(__val) __val
#endif
#ifndef INT32_C
#define INT32_C(__val) __val
#endif
#ifndef UINT32_C
#define UINT32_C(__val) __val##U
#endif
#if defined(_MSC_VER)
typedef __int8 int8_t;
typedef unsigned __int8 uint8_t;
typedef __int16 int16_t;
typedef unsigned __int16 uint16_t;
#ifndef __eglplatform_h_
typedef __int32 int32_t;
#endif
typedef unsigned __int32 uint32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
#if defined(_WIN64)
typedef __int64 intptr_t;
typedef unsigned __int64 uintptr_t;
#else
typedef __int32 intptr_t;
typedef unsigned __int32 uintptr_t;
#endif
#define INT64_C(__val) __val##i64
#define UINT64_C(__val) __val##ui64
#else
#error "Unsupported compiler"
#endif
#endif /* _STDINT_H_ */

View File

@@ -1,5 +1,49 @@
Import('*')
if env['platform'] == 'embedded':
Return()
SConscript([
'util/SConscript',
])
Import('util')
progs_env = env.Clone()
if progs_env['platform'] == 'windows':
progs_env.Append(CPPDEFINES = ['NOMINMAX'])
progs_env.Prepend(LIBS = [
'winmm',
'kernel32',
'user32',
'gdi32',
])
# OpenGL
if progs_env['platform'] == 'windows':
progs_env.Prepend(LIBS = ['glu32', 'opengl32'])
else:
progs_env.Prepend(LIBS = ['GLU', 'GL'])
# Glut
progs_env.Prepend(LIBPATH = [glut.dir])
progs_env.Prepend(LIBS = [glut.name])
# GLEW
progs_env.Prepend(LIBS = [glew])
progs_env.Prepend(CPPPATH = [
'#progs/util',
])
progs_env.Prepend(LIBS = [
util,
])
Export('progs_env')
SConscript([
'demos/SConscript',
'glsl/SConscript',
'redbook/SConscript',
@@ -11,4 +55,5 @@ SConscript([
'fp/SConscript',
'wgl/SConscript',
'perf/SConscript',
'gallium/unit/SConscript',
])

View File

@@ -1,65 +0,0 @@
import os
import os.path
import sys
env = Environment(
tools = ['generic'],
toolpath = ['../scons'],
ENV = os.environ,
)
# Use Mesa's headers and libs
if 1:
build_topdir = 'build'
build_subdir = env['platform']
if env['machine'] != 'generic':
build_subdir += '-' + env['machine']
if env['debug']:
build_subdir += "-debug"
if env['profile']:
build_subdir += "-profile"
build_dir = os.path.join(build_topdir, build_subdir)
env.Append(CPPDEFINES = ['GLEW_STATIC'])
env.Append(CPPPATH = ['#../include'])
env.Append(LIBPATH = [
'#../' + build_dir + '/glew/',
'#../' + build_dir + '/glut/glx',
])
conf = Configure(env)
# OpenGL
if env['platform'] == 'windows':
env.Prepend(LIBS = ['glu32', 'opengl32'])
else:
env.Prepend(LIBS = ['GLU', 'GL'])
# Glut
env['GLUT'] = False
if conf.CheckCHeader('GL/glut.h'):
if env['platform'] == 'windows':
env['GLUT_LIB'] = 'glut32'
else:
env['GLUT_LIB'] = 'glut'
env['GLUT'] = True
# GLEW
env['GLEW'] = False
if conf.CheckCHeader('GL/glew.h'):
env['GLEW_LIB'] = 'glew'
env['GLEW'] = True
env.Prepend(LIBS = ['glew'])
conf.Finish()
Export('env')
SConscript(
'SConscript',
build_dir = env['build'],
duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
)

View File

@@ -1,11 +1,13 @@
arbfplight
arbfslight
arbocclude
arbocclude2
bounce
clearspd
copypix
cubemap
dinoshade
dissolve
drawpix
engine
extfuncs.h

View File

@@ -15,11 +15,13 @@ PROGS = \
arbfplight \
arbfslight \
arbocclude \
arbocclude2 \
bounce \
clearspd \
copypix \
cubemap \
dinoshade \
dissolve \
drawpix \
engine \
fbo_firecube \
@@ -124,13 +126,6 @@ reflect.o: reflect.c showbuffer.h
$(APP_CC) -c -I$(INCDIR) $(CFLAGS) reflect.c
shadowtex: shadowtex.o showbuffer.o
$(APP_CC) $(CFLAGS) $(LDFLAGS) shadowtex.o showbuffer.o $(LIBS) -o $@
shadowtex.o: shadowtex.c showbuffer.h
$(APP_CC) -c -I$(INCDIR) $(CFLAGS) shadowtex.c
gloss: gloss.o trackball.o readtex.o
$(APP_CC) $(CFLAGS) $(LDFLAGS) gloss.o trackball.o readtex.o $(LIBS) -o $@

View File

@@ -1,84 +1,68 @@
Import('*')
if not env['GLUT']:
Return()
env = env.Clone()
env.Prepend(CPPPATH = [
'../util',
])
env.Prepend(LIBS = [
util,
'$GLUT_LIB'
])
if env['platform'] == 'windows':
env.Append(CPPDEFINES = ['NOMINMAX'])
env.Prepend(LIBS = ['winmm'])
progs = [
'arbfplight',
'arbfslight',
'arbocclude',
'bounce',
'clearspd',
'copypix',
'cubemap',
'drawpix',
'engine',
'fbo_firecube',
'fire',
'fogcoord',
'fplight',
'fslight',
'gamma',
'gearbox',
'gears',
'geartrain',
'glinfo',
'gloss',
'gltestperf',
'ipers',
'isosurf',
'lodbias',
'morph3d',
'multiarb',
'paltex',
'pointblast',
'ray',
'readpix',
'reflect',
'renormal',
'shadowtex',
'singlebuffer',
'spectex',
'spriteblast',
'stex3d',
'teapot',
'terrain',
'tessdemo',
'texcyl',
'texenv',
'textures',
'trispd',
'tunnel',
'tunnel2',
'vao_demo',
'winpos',
'dinoshade',
'fbotexture',
'projtex',
'arbfplight',
'arbfslight',
'arbocclude',
'arbocclude2',
'bounce',
'clearspd',
'copypix',
'cubemap',
'dinoshade',
'dissolve',
'drawpix',
'engine',
'fbo_firecube',
'fbotexture',
'fire',
'fogcoord',
'fplight',
'fslight',
'gamma',
'gearbox',
'gears',
'geartrain',
'glinfo',
'gloss',
'gltestperf',
'ipers',
'isosurf',
'lodbias',
'morph3d',
'multiarb',
'paltex',
'pointblast',
'projtex',
'ray',
'readpix',
'reflect',
'renormal',
'shadowtex',
'singlebuffer',
'spectex',
'spriteblast',
'stex3d',
'teapot',
'terrain',
'tessdemo',
'texcyl',
'texenv',
'textures',
'trispd',
'tunnel',
'tunnel2',
'vao_demo',
'winpos',
]
for prog in progs:
env.Program(
progs_env.Program(
target = prog,
source = prog + '.c',
)
env.Program(
progs_env.Program(
target = 'rain',
source = [
'rain.cxx',

View File

@@ -388,9 +388,8 @@ static void Init( void )
int main( int argc, char *argv[] )
{
glutInit( &argc, argv );
glutInitWindowPosition( 0, 0 );
glutInitWindowSize( 200, 200 );
glutInit( &argc, argv );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
Win = glutCreateWindow(argv[0]);
glutReshapeFunc( Reshape );

View File

@@ -311,9 +311,8 @@ static void Init (void)
int main (int argc, char *argv[])
{
glutInit (&argc, argv);
glutInitWindowPosition ( 0, 0);
glutInitWindowSize (200, 200);
glutInit (&argc, argv);
glutInitDisplayMode (GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
glutCreateWindow (argv[0]);
glutReshapeFunc (Reshape);

View File

@@ -32,11 +32,12 @@
#include <GL/glew.h>
#include <GL/glut.h>
#define TEST_DISPLAY_LISTS 0
#define NUM_OCC 10
static GLboolean Anim = GL_TRUE;
static GLfloat Xpos = 0;
static GLuint OccQuery;
static GLfloat Xpos[NUM_OCC], Ypos[NUM_OCC];
static GLfloat Sign[NUM_OCC];
static GLuint OccQuery[NUM_OCC];
static GLint Win = 0;
@@ -54,38 +55,43 @@ PrintString(const char *s)
static void Idle(void)
{
static int lastTime = 0;
static int sign = +1;
int time = glutGet(GLUT_ELAPSED_TIME);
float step;
int i;
if (lastTime == 0)
lastTime = time;
else if (time - lastTime < 20) /* 50Hz update */
return;
step = (time - lastTime) / 1000.0 * sign;
for (i = 0; i < NUM_OCC; i++) {
step = (time - lastTime) / 1000.0 * Sign[i];
Xpos[i] += step;
if (Xpos[i] > 2.5) {
Xpos[i] = 2.5;
Sign[i] = -1;
}
else if (Xpos[i] < -2.5) {
Xpos[i] = -2.5;
Sign[i] = +1;
}
}
lastTime = time;
Xpos += step;
if (Xpos > 2.5) {
Xpos = 2.5;
sign = -1;
}
else if (Xpos < -2.5) {
Xpos = -2.5;
sign = +1;
}
glutPostRedisplay();
}
static void Display( void )
{
GLuint passed;
GLint ready;
char s[100];
int i;
glClearColor(0.25, 0.25, 0.25, 0.0);
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
glMatrixMode( GL_PROJECTION );
@@ -96,97 +102,84 @@ static void Display( void )
glTranslatef( 0.0, 0.0, -15.0 );
/* draw the occluding polygons */
glColor3f(0, 0.6, 0.8);
glColor3f(0, 0.4, 0.6);
glBegin(GL_QUADS);
glVertex2f(-1.6, -1.5);
glVertex2f(-0.4, -1.5);
glVertex2f(-0.4, 1.5);
glVertex2f(-1.6, 1.5);
glVertex2f( 0.4, -1.5);
glVertex2f( 1.6, -1.5);
glVertex2f( 1.6, 1.5);
glVertex2f( 0.4, 1.5);
glVertex2f(-1.6, -2.5);
glVertex2f(-0.4, -2.5);
glVertex2f(-0.4, 2.5);
glVertex2f(-1.6, 2.5);
glVertex2f( 0.4, -2.5);
glVertex2f( 1.6, -2.5);
glVertex2f( 1.6, 2.5);
glVertex2f( 0.4, 2.5);
glEnd();
/* draw the test polygon with occlusion testing */
glPushMatrix();
glTranslatef(Xpos, 0, -0.5);
glScalef(0.3, 0.3, 1.0);
glRotatef(-90.0 * Xpos, 0, 0, 1);
#if defined(GL_ARB_occlusion_query)
#if TEST_DISPLAY_LISTS
glNewList(10, GL_COMPILE);
glBeginQueryARB(GL_SAMPLES_PASSED_ARB, OccQuery);
glEndList();
glCallList(10);
#else
glBeginQueryARB(GL_SAMPLES_PASSED_ARB, OccQuery);
#endif
glColorMask(0, 0, 0, 0);
glDepthMask(GL_FALSE);
glBegin(GL_POLYGON);
glVertex3f(-1, -1, 0);
glVertex3f( 1, -1, 0);
glVertex3f( 1, 1, 0);
glVertex3f(-1, 1, 0);
glEnd();
/* draw the test polygons with occlusion testing */
for (i = 0; i < NUM_OCC; i++) {
glPushMatrix();
glTranslatef(Xpos[i], Ypos[i], -0.5);
glScalef(0.2, 0.2, 1.0);
glRotatef(-90.0 * Xpos[i], 0, 0, 1);
#if TEST_DISPLAY_LISTS
glNewList(11, GL_COMPILE);
glEndQueryARB(GL_SAMPLES_PASSED_ARB);
glEndList();
glCallList(11);
#else
glEndQueryARB(GL_SAMPLES_PASSED_ARB);
#endif
glBeginQueryARB(GL_SAMPLES_PASSED_ARB, OccQuery[i]);
glBegin(GL_POLYGON);
glVertex3f(-1, -1, 0);
glVertex3f( 1, -1, 0);
glVertex3f( 1, 1, 0);
glVertex3f(-1, 1, 0);
glEnd();
glEndQueryARB(GL_SAMPLES_PASSED_ARB);
do {
/* do useful work here, if any */
glGetQueryObjectivARB(OccQuery, GL_QUERY_RESULT_AVAILABLE_ARB, &ready);
} while (!ready);
glGetQueryObjectuivARB(OccQuery, GL_QUERY_RESULT_ARB, &passed);
glPopMatrix();
}
/* turn off occlusion testing */
glColorMask(1, 1, 1, 1);
glDepthMask(GL_TRUE);
#endif /* GL_ARB_occlusion_query */
/* draw the orange rect, so we can see what's going on */
glColor3f(0.8, 0.5, 0);
glBegin(GL_POLYGON);
glVertex3f(-1, -1, 0);
glVertex3f( 1, -1, 0);
glVertex3f( 1, 1, 0);
glVertex3f(-1, 1, 0);
glEnd();
/* Draw the rectangles now.
* Draw orange if result was ready
* Draw red if result was not ready.
*/
for (i = 0; i < NUM_OCC; i++) {
GLuint passed;
GLint ready;
glPopMatrix();
glGetQueryObjectivARB(OccQuery[i], GL_QUERY_RESULT_AVAILABLE_ARB, &ready);
glGetQueryObjectuivARB(OccQuery[i], GL_QUERY_RESULT_ARB, &passed);
/* Print result message */
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glOrtho( -1.0, 1.0, -1.0, 1.0, -1.0, 1.0 );
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
if (!ready)
glColor3f(1, 0, 0);
else
glColor3f(0.8, 0.5, 0);
glColor3f(1, 1, 1);
#if defined(GL_ARB_occlusion_query)
sprintf(s, " %4d Fragments Visible", passed);
glRasterPos3f(-0.50, -0.7, 0);
PrintString(s);
if (!passed) {
glRasterPos3f(-0.25, -0.8, 0);
PrintString("Fully Occluded");
if (!ready || passed) {
glPushMatrix();
glTranslatef(Xpos[i], Ypos[i], -0.5);
glScalef(0.2, 0.2, 1.0);
glRotatef(-90.0 * Xpos[i], 0, 0, 1);
glBegin(GL_POLYGON);
glVertex3f(-1, -1, 0);
glVertex3f( 1, -1, 0);
glVertex3f( 1, 1, 0);
glVertex3f(-1, 1, 0);
glEnd();
glPopMatrix();
}
{
char s[10];
glRasterPos3f(0.45, Ypos[i], 1.0);
sprintf(s, "%4d", passed);
PrintString(s);
}
}
#else
glRasterPos3f(-0.25, -0.8, 0);
PrintString("GL_ARB_occlusion_query not available at compile time");
#endif /* GL_ARB_occlusion_query */
glutSwapBuffers();
}
@@ -222,14 +215,17 @@ static void Key( unsigned char key, int x, int y )
static void SpecialKey( int key, int x, int y )
{
const GLfloat step = 0.1;
int i;
(void) x;
(void) y;
switch (key) {
case GLUT_KEY_LEFT:
Xpos -= step;
for (i = 0; i < NUM_OCC; i++)
Xpos[i] -= step;
break;
case GLUT_KEY_RIGHT:
Xpos += step;
for (i = 0; i < NUM_OCC; i++)
Xpos[i] += step;
break;
}
glutPostRedisplay();
@@ -240,44 +236,50 @@ static void Init( void )
{
const char *ext = (const char *) glGetString(GL_EXTENSIONS);
GLint bits;
int i;
if (!strstr(ext, "GL_ARB_occlusion_query")) {
printf("Sorry, this demo requires the GL_ARB_occlusion_query extension\n");
exit(-1);
}
#if defined(GL_ARB_occlusion_query)
glGetQueryivARB(GL_SAMPLES_PASSED_ARB, GL_QUERY_COUNTER_BITS_ARB, &bits);
if (!bits) {
printf("Hmmm, GL_QUERY_COUNTER_BITS_ARB is zero!\n");
exit(-1);
}
#endif /* GL_ARB_occlusion_query */
glGetIntegerv(GL_DEPTH_BITS, &bits);
printf("Depthbits: %d\n", bits);
#if defined(GL_ARB_occlusion_query)
glGenQueriesARB(1, &OccQuery);
assert(OccQuery > 0);
#endif /* GL_ARB_occlusion_query */
glGenQueriesARB(NUM_OCC, OccQuery);
glEnable(GL_DEPTH_TEST);
for (i = 0; i < NUM_OCC; i++) {
float t = (float) i / (NUM_OCC - 1);
Xpos[i] = 2.5 * t;
Ypos[i] = 4.0 * (t - 0.5);
Sign[i] = 1.0;
}
}
int main( int argc, char *argv[] )
{
glutInit( &argc, argv );
glutInitWindowPosition( 0, 0 );
glutInitWindowSize( 400, 400 );
glutInit( &argc, argv );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
Win = glutCreateWindow(argv[0]);
glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
glutIdleFunc( Idle );
if (Anim)
glutIdleFunc(Idle);
else
glutIdleFunc(NULL);
glutDisplayFunc( Display );
Init();
glutMainLoop();

314
progs/demos/arbocclude2.c Normal file
View File

@@ -0,0 +1,314 @@
/*
* GL_ARB_occlusion_query demo
*
* Brian Paul
* 12 June 2003
*
* Copyright (C) 2003 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.
*/
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <GL/glew.h>
#include <GL/glut.h>
static GLboolean Anim = GL_TRUE;
static GLfloat Xpos = 0;
static GLuint OccQuery1;
static GLuint OccQuery2;
static GLint Win = 0;
static void
PrintString(const char *s)
{
while (*s) {
glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s);
s++;
}
}
static void Idle(void)
{
static int lastTime = 0;
static int sign = +1;
int time = glutGet(GLUT_ELAPSED_TIME);
float step;
if (lastTime == 0)
lastTime = time;
else if (time - lastTime < 20) /* 50Hz update */
return;
step = (time - lastTime) / 1000.0 * sign;
lastTime = time;
Xpos += step;
if (Xpos > 2.5) {
Xpos = 2.5;
sign = -1;
}
else if (Xpos < -2.5) {
Xpos = -2.5;
sign = +1;
}
glutPostRedisplay();
}
static void Display( void )
{
GLuint passed1, passed2;
GLint ready;
char s[100];
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 );
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
glTranslatef( 0.0, 0.0, -15.0 );
/* draw the occluding polygons */
glColor3f(0, 0.6, 0.8);
glBegin(GL_QUADS);
glVertex2f(-1.6, -1.5);
glVertex2f(-0.4, -1.5);
glVertex2f(-0.4, 1.5);
glVertex2f(-1.6, 1.5);
glVertex2f( 0.4, -1.5);
glVertex2f( 1.6, -1.5);
glVertex2f( 1.6, 1.5);
glVertex2f( 0.4, 1.5);
glEnd();
#if defined(GL_ARB_occlusion_query)
glColorMask(0, 0, 0, 0);
glDepthMask(GL_FALSE);
/* draw the first polygon with occlusion testing */
glPushMatrix();
glTranslatef(Xpos, 0.4, -0.5);
glScalef(0.3, 0.3, 1.0);
glRotatef(-90.0 * Xpos, 0, 0, 1);
glBeginQueryARB(GL_SAMPLES_PASSED_ARB, OccQuery1);
glBegin(GL_POLYGON);
glVertex3f(-1, -1, 0);
glVertex3f( 1, -1, 0);
glVertex3f( 1, 1, 0);
glVertex3f(-1, 1, 0);
glEnd();
glEndQueryARB(GL_SAMPLES_PASSED_ARB);
/* draw the second polygon with occlusion testing */
glPopMatrix();
glPushMatrix();
glTranslatef(Xpos, -0.4, -0.5);
glScalef(0.3, 0.3, 1.0);
glBeginQueryARB(GL_SAMPLES_PASSED_ARB, OccQuery2);
glBegin(GL_POLYGON);
glVertex3f(-1, -1, 0);
glVertex3f( 1, -1, 0);
glVertex3f( 1, 1, 0);
glVertex3f(-1, 1, 0);
glEnd();
glEndQueryARB(GL_SAMPLES_PASSED_ARB);
/* turn off occlusion testing */
glColorMask(1, 1, 1, 1);
glDepthMask(GL_TRUE);
do {
/* do useful work here, if any */
glGetQueryObjectivARB(OccQuery1, GL_QUERY_RESULT_AVAILABLE_ARB, &ready);
} while (!ready);
glGetQueryObjectuivARB(OccQuery1, GL_QUERY_RESULT_ARB, &passed1);
do {
/* do useful work here, if any */
glGetQueryObjectivARB(OccQuery2, GL_QUERY_RESULT_AVAILABLE_ARB, &ready);
} while (!ready);
glGetQueryObjectuivARB(OccQuery2, GL_QUERY_RESULT_ARB, &passed2);
#endif /* GL_ARB_occlusion_query */
/* draw the second rect, so we can see what's going on */
glColor3f(0.8, 0.5, 0);
glBegin(GL_POLYGON);
glVertex3f(-1, -1, 0);
glVertex3f( 1, -1, 0);
glVertex3f( 1, 1, 0);
glVertex3f(-1, 1, 0);
glEnd();
glPopMatrix();
glPushMatrix();
glTranslatef(Xpos, 0.4, -0.5);
glScalef(0.3, 0.3, 1.0);
glRotatef(-90.0 * Xpos, 0, 0, 1);
/* draw the first rect, so we can see what's going on */
glBegin(GL_POLYGON);
glVertex3f(-1, -1, 0);
glVertex3f( 1, -1, 0);
glVertex3f( 1, 1, 0);
glVertex3f(-1, 1, 0);
glEnd();
glPopMatrix();
/* Print result message */
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glOrtho( -1.0, 1.0, -1.0, 1.0, -1.0, 1.0 );
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
glColor3f(1, 1, 1);
#if defined(GL_ARB_occlusion_query)
sprintf(s, " %4d Fragments Visible", passed1);
glRasterPos3f(-0.50, -0.6, 0);
PrintString(s);
if (!passed1) {
glRasterPos3f(-0.25, -0.7, 0);
PrintString("Fully Occluded");
}
sprintf(s, " %4d Fragments Visible", passed2);
glRasterPos3f(-0.50, -0.8, 0);
PrintString(s);
if (!passed2) {
glRasterPos3f(-0.25, -0.9, 0);
PrintString("Fully Occluded");
}
#else
glRasterPos3f(-0.25, -0.8, 0);
PrintString("GL_ARB_occlusion_query not available at compile time");
#endif /* GL_ARB_occlusion_query */
glutSwapBuffers();
}
static void Reshape( int width, int height )
{
glViewport( 0, 0, width, height );
}
static void Key( unsigned char key, int x, int y )
{
(void) x;
(void) y;
switch (key) {
case 27:
glutDestroyWindow(Win);
exit(0);
break;
case ' ':
Anim = !Anim;
if (Anim)
glutIdleFunc(Idle);
else
glutIdleFunc(NULL);
break;
}
glutPostRedisplay();
}
static void SpecialKey( int key, int x, int y )
{
const GLfloat step = 0.1;
(void) x;
(void) y;
switch (key) {
case GLUT_KEY_LEFT:
Xpos -= step;
break;
case GLUT_KEY_RIGHT:
Xpos += step;
break;
}
glutPostRedisplay();
}
static void Init( void )
{
const char *ext = (const char *) glGetString(GL_EXTENSIONS);
GLint bits;
if (!strstr(ext, "GL_ARB_occlusion_query")) {
printf("Sorry, this demo requires the GL_ARB_occlusion_query extension\n");
exit(-1);
}
#if defined(GL_ARB_occlusion_query)
glGetQueryivARB(GL_SAMPLES_PASSED_ARB, GL_QUERY_COUNTER_BITS_ARB, &bits);
if (!bits) {
printf("Hmmm, GL_QUERY_COUNTER_BITS_ARB is zero!\n");
exit(-1);
}
#endif /* GL_ARB_occlusion_query */
glGetIntegerv(GL_DEPTH_BITS, &bits);
printf("Depthbits: %d\n", bits);
#if defined(GL_ARB_occlusion_query)
glGenQueriesARB(1, &OccQuery1);
assert(OccQuery1 > 0);
glGenQueriesARB(1, &OccQuery2);
assert(OccQuery2 > 0);
#endif /* GL_ARB_occlusion_query */
glEnable(GL_DEPTH_TEST);
}
int main( int argc, char *argv[] )
{
glutInitWindowSize( 400, 400 );
glutInit( &argc, argv );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
Win = glutCreateWindow(argv[0]);
glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
glutIdleFunc( Idle );
glutDisplayFunc( Display );
Init();
glutMainLoop();
return 0;
}

View File

@@ -192,10 +192,8 @@ visible(int vis)
int main(int argc, char *argv[])
{
glutInit(&argc, argv);
glutInitWindowPosition(0, 0);
glutInitWindowSize(600, 450);
glutInit(&argc, argv);
IndexMode = argc > 1 && strcmp(argv[1], "-ci") == 0;
if (IndexMode)

View File

@@ -187,9 +187,8 @@ int main( int argc, char *argv[] )
Init( argc, argv );
glutInit( &argc, argv );
glutInitWindowSize( (int) Width, (int) Height );
glutInitWindowPosition( 0, 0 );
glutInit( &argc, argv );
mode = ColorMode | GLUT_DOUBLE;
if (BufferMask & GL_STENCIL_BUFFER_BIT)

View File

@@ -237,6 +237,9 @@ int main( int argc, char *argv[] )
const char *filename = IMAGE_FILE;
int i = 1;
glutInitWindowSize( WinWidth, WinHeight );
glutInit( &argc, argv );
if (argc > i && strcmp(argv[i], "-ci")==0) {
ciMode = GL_TRUE;
i++;
@@ -245,10 +248,6 @@ int main( int argc, char *argv[] )
filename = argv[i];
}
glutInit( &argc, argv );
glutInitWindowPosition( 0, 0 );
glutInitWindowSize( WinWidth, WinHeight );
if (ciMode)
glutInitDisplayMode( GLUT_INDEX | GLUT_DOUBLE );
else

View File

@@ -613,9 +613,8 @@ static void parse_args(int argc, char *argv[])
int main( int argc, char *argv[] )
{
glutInit(&argc, argv);
glutInitWindowPosition(0, 0);
glutInitWindowSize(600, 500);
glutInit(&argc, argv);
glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
glutCreateWindow("Texture Cube Mapping");
glewInit();

158
progs/demos/dissolve.c Normal file
View File

@@ -0,0 +1,158 @@
/**
* Dissolve between two images using randomized stencil buffer
* and varying stencil ref.
*
* Brian Paul
* 29 Jan 2010
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <GL/glut.h>
#include "readtex.h"
#define FILE1 "../images/bw.rgb"
#define FILE2 "../images/arch.rgb"
static int Win;
static int WinWidth = 400, WinHeight = 400;
static GLboolean Anim = GL_TRUE;
static int ImgWidth[2], ImgHeight[2];
static GLenum ImgFormat[2];
static GLubyte *Image[2];
static GLfloat ScaleX[2], ScaleY[2];
static GLubyte StencilRef = 0;
static void
Idle(void)
{
StencilRef = (GLint) (glutGet(GLUT_ELAPSED_TIME) / 10);
glutPostRedisplay();
}
static void
RandomizeStencilBuffer(void)
{
GLubyte *b = malloc(WinWidth * WinHeight);
int i;
for (i = 0; i < WinWidth * WinHeight; i++) {
b[i] = rand() & 0xff;
}
glStencilFunc(GL_ALWAYS, 0, ~0);
glPixelZoom(1.0, 1.0);
glDrawPixels(WinWidth, WinHeight, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, b);
free(b);
}
static void
Draw(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glPixelZoom(ScaleX[0], ScaleY[0]);
glStencilFunc(GL_LESS, StencilRef, ~0);
glDrawPixels(ImgWidth[0], ImgHeight[0], ImgFormat[0], GL_UNSIGNED_BYTE, Image[0]);
glPixelZoom(ScaleX[1], ScaleY[1]);
glStencilFunc(GL_GEQUAL, StencilRef, ~0);
glDrawPixels(ImgWidth[1], ImgHeight[1], ImgFormat[1], GL_UNSIGNED_BYTE, Image[1]);
glutSwapBuffers();
}
static void
Reshape(int width, int height)
{
WinWidth = width;
WinHeight = 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.0, 0.0, -15.0);
RandomizeStencilBuffer();
ScaleX[0] = (float) width / ImgWidth[0];
ScaleY[0] = (float) height / ImgHeight[0];
ScaleX[1] = (float) width / ImgWidth[1];
ScaleY[1] = (float) height / ImgHeight[1];
}
static void
Key(unsigned char key, int x, int y)
{
(void) x;
(void) y;
switch (key) {
case 'a':
Anim = !Anim;
if (Anim)
glutIdleFunc(Idle);
else
glutIdleFunc(NULL);
break;
case 27:
glutDestroyWindow(Win);
exit(0);
break;
}
glutPostRedisplay();
}
static void
Init(void)
{
Image[0] = LoadRGBImage(FILE1, &ImgWidth[0], &ImgHeight[0], &ImgFormat[0]);
if (!Image[0]) {
printf("Couldn't read %s\n", FILE1);
exit(0);
}
Image[1] = LoadRGBImage(FILE2, &ImgWidth[1], &ImgHeight[1], &ImgFormat[1]);
if (!Image[1]) {
printf("Couldn't read %s\n", FILE2);
exit(0);
}
glEnable(GL_STENCIL_TEST);
glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
}
int
main(int argc, char *argv[])
{
glutInit(&argc, argv);
glutInitWindowSize(WinWidth, WinHeight);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL);
Win = glutCreateWindow(argv[0]);
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Draw);
if (Anim)
glutIdleFunc(Idle);
Init();
glutMainLoop();
return 0;
}

View File

@@ -328,6 +328,9 @@ int main( int argc, char *argv[] )
const char *filename = IMAGE_FILE;
int i = 1;
glutInitWindowSize( 500, 400 );
glutInit( &argc, argv );
if (argc > i && strcmp(argv[i], "-ci")==0) {
ciMode = GL_TRUE;
i++;
@@ -336,10 +339,6 @@ int main( int argc, char *argv[] )
filename = argv[i];
}
glutInit( &argc, argv );
glutInitWindowPosition( 0, 0 );
glutInitWindowSize( 500, 400 );
if (ciMode)
glutInitDisplayMode( GLUT_INDEX | GLUT_DOUBLE );
else

View File

@@ -26,6 +26,8 @@
/* Target engine speed: */
const int RPM = 100.0;
static int Win = 0;
/**
* Engine description.
@@ -1154,6 +1156,7 @@ OptRotate(void)
static void
OptExit(void)
{
glutDestroyWindow(Win);
exit(0);
}
@@ -1320,10 +1323,10 @@ Init(void)
int
main(int argc, char *argv[])
{
glutInit(&argc, argv);
glutInitWindowSize(WinWidth, WinHeight);
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
glutCreateWindow("OpenGL Engine Demo");
Win = glutCreateWindow("OpenGL Engine Demo");
glewInit();
glutReshapeFunc(Reshape);
glutMouseFunc(Mouse);

View File

@@ -1051,11 +1051,11 @@ visible(int vis)
int
main(int argc, char *argv[])
{
glutInitWindowSize(WinWidth, WinHeight);
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
glutInitWindowSize(WinWidth, WinHeight);
Win = glutCreateWindow("fbo_firecube");
glewInit();
init(argc, argv);

View File

@@ -739,7 +739,6 @@ main(int ac, char **av)
HEIGHT = atoi(av[3]);
}
glutInitWindowPosition(0, 0);
glutInitWindowSize(WIDTH, HEIGHT);
glutInit(&ac, av);

View File

@@ -404,8 +404,8 @@ Init(void)
int
main( int argc, char *argv[] )
{
glutInit( &argc, argv );
glutInitWindowSize( 600, 600 );
glutInit( &argc, argv );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
glewInit();

View File

@@ -268,9 +268,8 @@ static void Init( void )
int main( int argc, char *argv[] )
{
glutInit( &argc, argv );
glutInitWindowPosition( 0, 0 );
glutInitWindowSize( 200, 200 );
glutInit( &argc, argv );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
Win = glutCreateWindow(argv[0]);
glewInit();

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