Compare commits

...

597 Commits

Author SHA1 Message Date
Ian Romanick
0c88e34049 mesa: Add 7.7.1 release MD5 sums 2010-03-28 16:25:47 -07:00
Ian Romanick
663642b435 mesa: set version string to 7.7.1
Also set the correct release date.
2010-03-28 16:22:44 -07:00
Brian Paul
535742d75f mesa: move/update hash function comments 2010-03-27 08:58:02 -06:00
Török Edwin
8fe3b3f66a mesa: fix deadlock in _mesa_HashFindFreeKeyBlock()
Fixes fd.o bug 27340.
2010-03-27 08:55:47 -06:00
Michel Dänzer
4cf14fa80b dri/swrast: Fix frontbuffer rendering.
Was broken since the endianness fixes.
2010-03-26 18:29:18 +01:00
Michel Dänzer
6ec259eb17 dri/swrast: Fix missed conversion of one pixel pointer increment.
This probably broke the swrast DRI driver when running X in depth 16.
2010-03-26 16:29:59 +01:00
Brian Paul
ca1c8a183d docs: added news item for 7.7.1 release 2010-03-23 09:19:44 -06:00
Brian Paul
3f3b1094bf docs: insert expected 7.7.1 release date 2010-03-23 09:19:26 -06:00
Ian Romanick
e33121b2d8 mesa: set version string to 7.7.1-rc2 2010-03-22 18:15:53 -07:00
Pauli Nieminen
415d0326bb 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:32:14 +02:00
Pauli Nieminen
7e24ce2d9b 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:30:23 +02:00
Pauli Nieminen
2ae754b7b9 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:23:01 +02:00
Pauli Nieminen
501156b36b r200: Fix mixed indetion in r200TclFallback. 2010-03-21 20:22:56 +02:00
Pauli Nieminen
4ff3244457 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 12:42:10 +02:00
Michel Dänzer
3889556d70 Revert "Revert "mesa/st: Make ST_SURFACE_DEPTH index consistent with mesa's BUFFER_DEPTH.""
This reverts commit 52d83efdbc.

The fix it reverted should be fine with the two previous fixes.
2010-03-19 17:32:54 +01:00
Brian Paul
6412046f65 st/mesa: s/BUFFER_FRONT_LEFT/surfIndex/
(cherry picked from commit 5d5c524cbe)
2010-03-19 17:20:26 +01:00
Brian Paul
6e96cea6e2 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.
(cherry picked from commit c472ce5302)
2010-03-19 17:20:19 +01:00
Ian Romanick
3a3ef3d6c9 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.
(cherry picked from commit 062a208814)
2010-03-18 18:23:21 -07:00
Ian Romanick
98aed6dc69 intel: Correct value of S0_VB_OFFSET_MASK to match hardware docs.
(cherry picked from commit 689e4b5541)
2010-03-18 17:31:22 -07:00
Ian Romanick
d3a607f889 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.
(cherry picked from commit fda5078324)
2010-03-18 15:39:00 -07:00
Thomas Hellstrom
00e41e007e st/xorg: Fix Xv cliprect scaling.
Due to a quantization error, different cliprects of scaled video windows may
not have identical x / y scale.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-03-13 20:32:00 +01:00
Ian Romanick
6624845a5d mesa: set version string to 7.7.1-rc1 2010-03-16 10:26:52 -07:00
Matthew W. S. Bell
c9c54180e4 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:38:32 -04:00
José Fonseca
93e77b0028 mesa: List Quake3 extensions first.
Quake3 truncates the extension string, and GL_EXT_compiled_vertex_array
wasn't being detected, making it very slow.

This is a quick fix. The IMHO best way to address this in a more general
fashion is to sort by year.
2010-03-13 10:41:32 +00:00
Keith Whitwell
0c9e8e6c6e mesa: Fix memory leak in decompress-with-blit.
(cherry picked from commit f05a4ee6f2840590c90da4be2fe5c6295410a5af)
2010-03-13 10:40:56 +00:00
Michel Dänzer
c50477c255 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.
2010-03-12 18:24:34 +01:00
Jakob Bornecrantz
3bf13656d3 st/xorg: Include cursorstr.h 2010-02-06 16:58:32 +00:00
Brian Paul
fa4083d38b docs: updates to 7.7.1 release notes 2010-03-10 14:14:04 -07:00
Brian Paul
d311ded31d gallium/util: added surface dump code for unix 2010-03-10 10:39:46 -07:00
Brian Paul
34f0207161 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).
2010-03-10 10:39:45 -07:00
Brian Paul
8d3f629a13 st/mesa: fix incorrect glDrawPixels into FBO
We weren't inverting the textured quad when drawing into an fbo.
2010-03-10 10:39:45 -07:00
Thomas Hellstrom
b98ef495d4 st/xorg Avoid advertizing rotation / reflection support.
We don't support it yet since we don't implement the shadow allocate
functions.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-03-06 15:52:31 +01:00
Michel Dänzer
21c91b410a 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.
2010-03-10 13:16:00 +01:00
Thomas Hellstrom
a8f3b3f88a st/xorg, vmware: Make throttling configurable.
The xorg state tracker gets two new options to let the user choose
whether to enable / disable dirty throttling and swapbuffer throttling.
The default value of these options are enabled, unless the winsys
supplies a customizer with other values. The customizer record has been
extended to allow this, and also to set winsys-based throttling on a per-
context basis.

The vmware part of this patch disables the dirty throttling if the kernel
supports command submission throttling, and also in that case sets kernel
based throttling for everything but swapbuffers. The vmware winsys does not
set throttling per context, even if it theoretically could, but instead
sets throttling per screen. This should perhaps be changed, should the
xorg state tracker start to use multiple rendering contexts. Kernel throttling
is off by default for all new screens/contexts, so the dri state tracker
is not affected.

This significantly improves interactivity of the vmware xorg driver.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-03-06 11:03:55 +01:00
Thomas Hellstrom
e8a8c5e339 svga: Add a winsys callback to get the svga_winsys_context
The winsys may need to extract the svga_winsys_context from a
pipe_context. Add a function to enable that functionality.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-03-06 11:03:54 +01:00
Keith Whitwell
7941d31ee6 svga: Don't do culling while the software pipeline is active.
It does it for us, and additionally introduces potentially
back-facing triangles.
2010-03-09 19:19:56 +01:00
Brian Paul
842351dd76 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.

(cherry picked from commit e1762fb870)
2010-03-08 11:40:40 -07:00
Brian Paul
d74929702f 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.

(cherry picked from commit 80dc54e308)
2010-03-08 11:40:25 -07:00
Brian Paul
1e431f0454 mesa: s/GL_DEPTH_STENCIL/GL_DEPTH_COMPONENT/ for MESA_FORMAT_Z16 renderbuffer
MESA_FORMAT_Z16 has no stencil bits.

(cherry picked from commit 614f490ca9)
2010-03-08 10:00:17 -07:00
Alex Deucher
4cc8d1d79f r600: recalculate point size, if point min/max size changes 2010-03-08 11:31:06 -05:00
Alex Deucher
3d2bc6848a r600: no need to flush on context init 2010-03-08 11:30:54 -05:00
Maciej Cencora
d5327538e7 r300: recalculate point size, if point min/max size changes
Fixes two wine d3d9 unit tests
2010-03-08 11:29:12 -05:00
Maciej Cencora
86ac140937 r300: no need to flush on context init 2010-03-08 11:28:57 -05:00
Maciej Cencora
b584e780ab r300: remove unnecessary code
_tnl_UpdateFixedFunctionProgram is already called in r300_draw.c
2010-03-08 11:28:39 -05:00
Alex Deucher
981e8a2087 r600: add new rs880 pci id 2010-03-03 14:11:10 -05:00
Brian Paul
72d380b363 glx: replace assertion with conditional
See fd.o bug 26832.
2010-03-02 07:38:12 -07:00
Dave Airlie
cf8af9bcf1 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:14:47 +10:00
Alex Deucher
7123f3d77a r600: enable OQ on rv740 on drms with working pipe config 2010-02-26 15:39:40 -05:00
Klaus Schnass
2edb1b9534 r600: fail to validate unsupported texture formats 2010-02-26 15:39:17 -05:00
Markus Fleschutz
69334d6784 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:38:21 -07:00
Brian Paul
61482ddc1c 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.

(cherry picked from commit fe25476c04)
2010-02-26 09:14:12 -07:00
Brian Paul
b0e84e22d5 mesa: use simplified _BaseFormat value in render-to-texture code
Fixes fd.o bug 26762.

(cherry picked from commit c9e8ff1976)
2010-02-26 09:10:27 -07:00
Jakob Bornecrantz
c0e8d443fe st/xorg: Re-enable crtc on resize 2010-02-25 16:52:02 +01:00
Jakob Bornecrantz
b95d4cd680 st/xorg: Fix copy-topy 2010-02-25 16:52:02 +01:00
Brian Paul
293f4d51b4 dri: remove old assertion (see bug 26734) 2010-02-24 14:04:26 -07:00
Alex Deucher
f0e99179bc r600: update state count for CB_COLOR0_FRAG & CB_COLOR0_TILE relocs 2010-02-24 12:03:10 -05:00
Jerome Glisse
69a94e1452 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-02-24 12:03:00 -05:00
Dave Airlie
bc7e12e5e3 radeon/r200: 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.

cherry-pick + squash master commits.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-24 19:16:13 +10:00
Jakob Bornecrantz
7accf8ced6 vmware/xorg: Bump to match vmware driver 2010-02-22 20:07:06 +01:00
Jakob Bornecrantz
52d83efdbc Revert "mesa/st: Make ST_SURFACE_DEPTH index consistent with mesa's BUFFER_DEPTH."
This reverts commit 9d17ad2891.

Fun stuff so fixing exposes another bug which I'm having trouble
tracking down. So for now I'm just going to revert this untill
I can fix the real bug. Sorry about this.
2010-02-22 19:37:09 +01:00
Jakob Bornecrantz
1702db3a35 st/xorg: Make resize fail gracefully 2010-02-22 19:34:56 +01:00
Jakob Bornecrantz
fa6eee135e st/xorg: Obey max {width|height} from kernel and Gallium 2010-02-22 19:34:56 +01:00
José Fonseca
b5fa760972 svga: Upload user buffers only once. 2010-02-22 19:38:10 +00:00
José Fonseca
69cf45cdae 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 19:38:08 +00:00
José Fonseca
f5ffbe0bc3 svga: Emit a scalar rcp in shadow maps.
Small improvement in Lightsmark 2008.
2010-02-22 19:38:05 +00:00
José Fonseca
46d8ca023d 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 19:38:04 +00:00
José Fonseca
9bef69782d tgsi: Report an error when a destination has an empty writemask. 2010-02-22 19:38:01 +00:00
Xavier Chantry
b0e5dcb859 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>
2010-02-22 08:53:03 -07:00
Brian Paul
bcd561c667 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.
2010-02-22 08:01:28 -07:00
José Fonseca
c98eced9ae 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-22 11:28:55 +00:00
Brian Paul
13cbb5fff6 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.
2010-02-21 12:38:46 +01:00
Thomas Hellstrom
dd8d78c908 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-21 12:25:33 +01:00
Thomas Hellstrom
9d17ad2891 mesa/st: Make ST_SURFACE_DEPTH index consistent with mesa's BUFFER_DEPTH.
Some st functions assume that they are identical.
2010-02-21 10:39:38 +01:00
Brian Paul
d437d905e6 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.
2010-02-18 16:47:27 -07:00
Jon TURNEY
551c96979e 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>
2010-02-18 12:41:30 -07:00
Jon TURNEY
c1a4f249f1 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>
2010-02-18 12:41:08 -07:00
José Fonseca
18ff85e91d svga: Upload the dirty ranges instead of the whole buffer. 2010-02-18 18:22:31 +00:00
José Fonseca
12617c7e30 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-18 18:22:31 +00:00
José Fonseca
5dbf44953c 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-18 18:22:31 +00:00
José Fonseca
a51d638ff3 svga: Further cleanup/comment svga buffer code.
Just cosmetic changes -- no behavior change.
2010-02-18 18:22:30 +00:00
José Fonseca
770945cff4 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-18 18:22:30 +00:00
Jakob Bornecrantz
eaa4066bfc vmware/xorg: Export modinfo just as the other vmware X drivers does 2010-02-18 17:07:32 +01:00
Jakob Bornecrantz
46cf606cd3 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.

Not 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.
2010-02-18 17:07:32 +01:00
Jakob Bornecrantz
a69a7b9688 st/xorg: A bit more debugging info 2010-02-18 16:13:18 +01:00
Jakob Bornecrantz
eb7590a0d9 st/xorg: Make default of debugging fallbacks smart
Set it to the same as 2d acceleration
2010-02-18 16:13:18 +01:00
Jakob Bornecrantz
86870a691c 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-18 16:13:18 +01:00
Brian Paul
7c34c237a2 swrast: fix left side clipping
Fixes bug 26623.  Original patch was submitted by Mathias Frohlich
and modified by Brian.
2010-02-18 09:37:58 -07:00
José Fonseca
13cd4298fb mesa: Take back some assertions.
It seems there are still some places where draw can happen with mapped
buffers... Remove the assertions since there is not much more than can
be done at this moment.

This partially reverts commit af2023e31c.
2010-02-17 20:02:32 +00:00
José Fonseca
3b724f91c5 svga: Remove unused buffer download code.
Unnecessary now that we never destroy buffer storage.
2010-02-16 21:24:38 +00:00
José Fonseca
2077f375c7 pipebuffer: Don't synchronize when checking for buffer overflows.
To avoid masking synchronization issues in debug builds.
2010-02-16 21:00:15 +00:00
Michal Krol
055265b0a3 svga: Translate point_sprite rasterizer state. 2010-02-16 19:53:13 +01:00
Mike Stroyan
3094adb3ca 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>
2010-02-16 08:18:12 -07:00
Mike Stroyan
7c7247ddbf mesa: Test for failed malloc in _mesa_HashInsert.
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-02-16 08:17:06 -07:00
José Fonseca
af2023e31c vbo: Ensure vertices are always unmapped before the context is flushed.
Purpose is two fold:

- when doing user-space memory management mapping a buffer stored in the
  graphics aperture effectively pins it there, increasing the likelyhood
  of failure of validating other buffers when flushing

- certain hardware/platform combinations do not allow a buffer to be
  simultaneously mapped and validated

This fixes assertion failures in HL Uplink with the svga driver, where
vbo was holding a map to a buffer which was also referred in the command
stream.

Note: this a non-invasive fix and shouldn't be just cherry-picked into
master as-is -- a cleaner fix for this problem should be searched.
2010-02-16 13:24:01 +00:00
Michal Krol
2eedbc94c2 slang: Fix handling of if/elif/else cases.
Once if/elif evalutes to true, all subsequent conditions are always false.
2010-02-16 10:34:07 +01:00
José Fonseca
672f6bb545 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 19:34:38 +00:00
Brian Paul
ab6bcef99a docs: document glMultiDrawElements() fix 2010-02-15 08:56:39 -07:00
Brian Paul
c5a4cfb03f vbo: fix broken glMultiDrawElements()
Seems to be a regression from commit 60b08eb1fd.
2010-02-15 08:52:48 -07:00
Thomas Hellstrom
df944efdbf st/xorg, vmware/xorg: Fix xnfcalloc arguments.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-02-15 14:26:25 +01:00
Brian Paul
1ff9cd5079 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.
2010-02-13 17:45:05 -07:00
José Fonseca
4a2b54cbdb mesa: Export GL_EXT_texture_cube_map.
Still used by some applications.
2010-02-13 15:10:57 +00:00
José Fonseca
6bd6a15ab3 wgl: Implement wglSwapMultipleBuffers. 2010-02-13 15:10:57 +00:00
José Fonseca
c1a5c9bb4c svga: Fix texture border color.
Also opposite ordering.
2010-02-13 15:10:57 +00:00
Brian Paul
b3c7dc6ff2 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.
2010-02-12 17:18:21 -07:00
José Fonseca
a1025ec041 svga: A few more tweaks to blend color state emission. 2010-02-12 23:17:04 +00:00
José Fonseca
3a4068474c svga: Clamp max cube texture levels to supported max 2d levels. 2010-02-12 21:31:18 +00:00
José Fonseca
1ae976be4a svga: Report the 2d/3d texture sizes supported by the host. 2010-02-12 21:31:14 +00:00
Roland Scheidegger
b685927156 svga: emit blend color 2010-02-12 22:12:55 +01:00
Zack Rusin
df0c8d029d 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 15:49:03 -05:00
Zack Rusin
3477dc4c48 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 15:48:52 -05:00
Andre Maasikas
0426bccadd 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 10:21:44 -05:00
Andre Maasikas
841333cd21 r600: support GL_SHORT attributes
normalized seems to work with this setting.
2010-02-12 10:21:23 -05:00
José Fonseca
e541dceb67 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 13:59:16 +00:00
José Fonseca
fea7a70a1a scons: Target Windows7. 2010-02-12 13:22:59 +00:00
José Fonseca
426f607aaa 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:03:33 +00:00
Brian Paul
408f32dc16 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.
2010-02-11 16:47:34 -07:00
José Fonseca
94028edfc5 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-11 16:38:16 +00:00
José Fonseca
7fec5f88a5 wgl: Fail gracefully whenever 3D could not be enabled for some reason. 2010-02-11 16:38:13 +00:00
Michal Krol
67007670bb 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-10 14:12:11 +01:00
Michal Krol
e8865f199d mesa: Protect buffer objects reference counting with a mutex. 2010-02-10 14:12:10 +01:00
Zack Rusin
2d3262d47d st/xorg: fix a silly offset bug in xv
we were multiplying the difference in the wrong direction.
2010-02-09 21:15:22 -05:00
Thomas Hellstrom
3470d821ba vmware: Update vmwgfx_drm.h to kernel version.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-02-09 22:54:15 +01:00
Brian Paul
0371956d66 docs: fix typo: s/osdemo/osdemos/ 2010-02-09 11:21:15 -07:00
Jakob Bornecrantz
45c4addea7 vmware/core: Support drm interface version 1.0.0 2010-02-06 01:30:29 +01:00
Jakob Bornecrantz
1eba0eb37d vmware/core: Use correct flags in scanout code 2010-02-06 01:29:47 +01:00
Dave Airlie
d87fb5e003 radeon: fix UMS since stp addition.
UMS doesn't need the STP atom.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-08 12:07:04 +02:00
Pauli Nieminen
4be7922a8e 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-08 12:07:04 +02:00
Eric Anholt
a1cac0732b intel: Check aperture size when doing a blit glClear.
Fixes failure in cairo-gl firefox-planet-gnome.
(cherry picked from commit 67e5fd7397)

Conflicts:

	src/mesa/drivers/dri/intel/intel_blit.c
2010-02-06 17:45:34 +01:00
Eric Anholt
fb32e0fcc5 intel: Respect texture tiling when doing a PBO blit teximage upload.
Bug #26008.  Fixes piglit pbo-teximage-tiling-2.
(cherry picked from commit 22bbc97994)
2010-02-06 17:45:34 +01:00
Eric Anholt
9564a6fa13 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.
(cherry picked from commit f20e83210e)
2010-02-06 17:45:34 +01:00
Eric Anholt
0b9990b2fd intel: Fix PBO blit ReadPixels from an FBO.
Bug #25921 -- clutter PBO usage gave unreliable results.
(cherry picked from commit 63b10e8fe7)

Conflicts:

	src/mesa/drivers/dri/intel/intel_pixel_read.c
2010-02-06 17:16:51 +01:00
Eric Anholt
8ce99c85e7 i965: Fix loads of non-relative-addr constants after a reladdr load.
Fixes piglit vp-arl-constant-array-huge-overwritten.
(cherry picked from commit d5b964234c)
2010-02-06 17:08:53 +01:00
Jakob Bornecrantz
a2c402ba53 vmware/core: Handle new scanout field 2010-02-06 01:34:12 +01:00
Jakob Bornecrantz
1ceb906c12 vmware/core: Update header to latest version 2010-02-06 01:34:12 +01:00
Zack Rusin
fb1fe8e76f gallium/tgsi: fix soa dependencies in mul and cmp instructions
master has this done in a lot nicer way, this is a simple patch to
stop the bleeding in a minimally intrusive manner.
2010-02-05 19:32:01 -05:00
Zack Rusin
f8b05566aa gallium/python: support two more formats in retrace dumps
dump PIPE_FORMAT_R8G8B8A8_UNORM and PIPE_FORMAT_R16G16B16_SNORM formats.
2010-02-05 19:25:01 -05:00
Zack Rusin
a6148b8eba gallium/draw: fix overflowing element indices
we piggy back flags in the top four bits of the element indices, so if
the maximum index stored in any of the elements is greater than
sizeof(ushort) - sizeof(flags we piggy back) then we overflow. fix it by
simply falling back to the slow path if we notice the overflow.
2010-02-05 19:25:01 -05:00
Brian Paul
64be837b0b 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.
2010-02-05 14:54:00 -07:00
Brian Paul
e070c1d183 tgsi: disable inf/nan checking
Inf/NaN can happen normally.  Only check for those values
when we need to debug something.
2010-02-05 14:48:42 -07:00
Tom Fogal
e6ee4b49c4 docs: Fix a typo in mesa3d.org HTML.
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-02-05 13:17:37 -07:00
Tom Fogal
e65029e9b3 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>
2010-02-05 13:15:33 -07:00
Brian Paul
3ca6cb3440 softpipe: fix bug in perspective corrected interpolants for lines
Thanks to Michal for finding this.

This will get fixed on the gallium-cylindrical-wrap branch and
then merged to master.
2010-02-05 12:57:54 -07:00
Pauli Nieminen
34b36277b7 r100: Add the polygon stipple state to the state list.
This fixes glean paths test case.
2010-02-05 11:28:01 +02:00
Pauli Nieminen
c8ea0212fe r200: Add the polygon stipple state to the state list.
This fixes glean paths test case.
2010-02-04 23:56:37 +02:00
Pauli Nieminen
7d6cbcdd9a 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 9d9c1f17dc which is not even close
of correct fix for the bug.
2010-02-04 13:07:04 +02:00
Pauli Nieminen
9d9c1f17dc Revert "mesa: fix transform_points_3d_no_rot using undefined values in %xmm0"
This reverts commit 4c31632817.
2010-02-04 05:00:02 +02:00
Brian Paul
f1afb352da scons: add another prefix for mingw32 on Fedora 2010-02-03 11:46:36 -07:00
Brian Paul
e4c3abbf55 tgsi: fix XPD when dst reg is a src reg
Store XPD results in temporaries before writing to the dest register.
This issue has already been fixed in Mesa/master for XPD (and all
other instructions?).

Fixes progs/demos/bump.c when using TGSI interpreter (GALLIUM_NOSSE=1).

A new glean/glsl1 test has been added to test this case.
2010-02-03 08:17:37 -07:00
Keith Whitwell
141b5775c0 svga: fix TXD and TXL opcode translation 2010-02-02 18:01:52 +00:00
Keith Whitwell
c0d5f1d3ad svga: deriv insns not valid in dynamic flow control either 2010-02-02 17:45:32 +00:00
Keith Whitwell
70947e531e 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-02 15:34:01 +00:00
Pauli Nieminen
7b92cb45b2 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 06:09:36 +02:00
Brian Paul
43e4b58422 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.
2010-02-01 18:55:54 -07:00
Brian Paul
e0d01c9d7f 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.
2010-02-01 17:31:24 -07:00
José Fonseca
b90b3667a1 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-01 21:41:04 +00:00
José Fonseca
0123a2d042 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-01 21:41:04 +00:00
José Fonseca
51a2cc5499 mesa: Always do proper ref counting of shared state. 2010-02-01 21:41:04 +00:00
Jakob Bornecrantz
f5145a6ec3 vmware/core: Remove old ioctl structs not used
Leftover that was never used in this driver
2010-01-29 17:14:53 +01:00
José Fonseca
ddedfe12d4 svga: Actually call fence_reference in texture downloads. 2010-01-29 16:23:46 +00:00
Brian Paul
cb5447f79c glsl: fix preprocessor bug involving //-style comments in macro definitions
See comments for details.
2010-01-29 08:26:23 -07:00
Brian Paul
9fd3c74724 tnl: check that state is validated before drawing 2010-01-29 08:24:36 -07:00
Brian Paul
4d1234e222 st/mesa: check that state is validated before drawing 2010-01-29 08:24:36 -07:00
Brian Paul
3cba779e16 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.
2010-01-29 08:24:36 -07:00
Brian Paul
23eda89ec8 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...
2010-01-29 08:24:36 -07:00
José Fonseca
6e68898b05 softpipe: Flush draw module when fragment pipeline state changes. 2010-01-28 20:22:44 +00:00
José Fonseca
1befcd5a2a softpipe: Flush draw module before switching framebuffer.
Otherwise geometry might end up in the wrong rendertarget.
2010-01-28 20:22:44 +00:00
José Fonseca
12ba355978 llvmpipe: Use assert instead of abort. Only verify functions on debug builds. 2010-01-28 20:22:43 +00:00
José Fonseca
a0907a645f llvmpipe: Fix memory leak. 2010-01-28 20:22:43 +00:00
José Fonseca
1acf7a09e7 llvmpipe: Use the generic conversion routine for depths.
This allows for z32f depth format to work correctly.
2010-01-28 20:22:43 +00:00
José Fonseca
14dc02a1b2 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.
2010-01-28 20:22:43 +00:00
José Fonseca
88cf87bd56 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.
2010-01-28 20:22:43 +00:00
José Fonseca
31b3420688 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.
2010-01-28 20:22:43 +00:00
José Fonseca
4e95983fa8 llvmpipe: Flush draw module before switching framebuffer.
Otherwise geometry will end up in the wrong rendertarget.
2010-01-28 20:22:43 +00:00
José Fonseca
4e506eac8f llvmpipe: add LP_DEBUG env var
Cherry-picked from dec35d04ae.
2010-01-28 20:22:43 +00:00
Brian Paul
46167149ce llvmpipe: fix broken TGSI_OPCODE_FRC codegen 2010-01-28 20:22:42 +00:00
Brian Paul
96ec4eb755 llvmpipe: fix broken lp_build_abs() 2010-01-28 20:22:42 +00:00
José Fonseca
e20547042c llvmpipe: Fix yet another copynpaste typo in lp_build_log2_approx.
Now fslight looks perfect.
2010-01-28 20:22:42 +00:00
José Fonseca
0451d0fd01 llvmpipe: Fix lp_build_polynomial comment. 2010-01-28 20:22:42 +00:00
José Fonseca
aa8b23e077 llvmpipe: Fix typo in lp_build_log constant. 2010-01-28 20:22:42 +00:00
José Fonseca
4eb48a3af7 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.
2010-01-28 20:22:42 +00:00
Jakob Bornecrantz
8db8adfd01 st/xorg: Update to new libkms interface but be backwards compatible 2010-01-28 18:02:10 +01:00
Keith Whitwell
8e240d7e0e svga: remove sleep in DEBUG_FLUSH path 2010-01-28 17:13:50 +00:00
José Fonseca
40298bf272 python/retrace: Dump all vertices for verbosity level 3. 2010-01-28 17:13:49 +00:00
Brian Paul
a0518e66b2 docs: Fixed Windows build for 7.7.1 2010-01-27 17:08:03 -07:00
Brian Paul
82c76cd16f windows: assorted build fixes
These changes were originally submitted by Karl Schultz for Mesa 7.7-rc2
but weren't applied.
2010-01-27 17:04:49 -07:00
Rodolfo Ribeiro Gomes
50e890bc51 glx: fix possible memory leaks in dri2CreateScreen()
Original patch fixed up by Brian Paul.
2010-01-27 17:04:49 -07:00
Alex Deucher
bba9557019 r600: fix warning 2010-01-27 12:20:04 -05:00
Alex Deucher
2041d3e4b7 r600: rv670 support 8 tex instructions just like other r6xx
also clarify some other const values.
2010-01-27 12:19:54 -05:00
Andre Maasikas
77b7b3a1ab r600: increase max texture units to 16 2010-01-27 11:38:29 -05:00
Andre Maasikas
0dab80fbfb r600: fix XPD with writemask
same variable used for 2 different temp registers
fixes e.g. glsl/bump
2010-01-27 11:38:16 -05:00
José Fonseca
e3257912e0 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.
2010-01-27 16:25:31 +00:00
José Fonseca
15fe491822 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-01-27 15:41:25 +00:00
José Fonseca
ac597f5acc svga: Fix PIPE_LOGICOP_INVERT.
Actually the current XOR implementation is an INVERT.

This fixes rectangle selection in Maya.
2010-01-27 14:45:56 +00:00
Keith Whitwell
5cb255f0d7 svga: better path for generating white pixels for xor logicop workaround 2010-01-27 14:26:48 +00:00
Dave Airlie
2f28ca0a27 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:32:46 +10:00
Dave Airlie
0580e488da radeon: remove unused file 2010-01-27 12:32:44 +10:00
José Fonseca
5435f790fd python: Add missing library on debug builds. 2010-01-26 20:37:35 +00: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
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
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
1d8b308cbf docs: document Intel, R300 env vars 2010-01-26 09:12:32 -07:00
Jakob Bornecrantz
6749310d3f st/xorg: Fix crash on resize with libkms 2010-01-25 20:12:59 +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
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
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
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
Vinson Lee
d57ba16ae3 scons: Define _DARWIN_C_SOURCE on Darwin builds. 2010-01-23 21:05:58 -08: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
Vinson Lee
146a77af3f radeon: Remove unused variable. 2010-01-23 02:14:56 -08: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
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
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
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
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
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
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
Vinson Lee
8bc3c06d86 progs/trivial: Remove unnecessary header from tri-fbo-tex-mip.c. 2010-01-21 23:24:40 -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
Vinson Lee
dc544ad9c6 draw: Remove unnecessary headers. 2010-01-21 22:57:12 -08:00
Vinson Lee
e8b5203fbb svga: Remove unused variable. 2010-01-21 17:24:07 -08: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
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
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
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
Vinson Lee
0bc2cbf82a ffb: Remove unnecessary headers. 2010-01-20 16:27:44 -08:00
Brian Paul
a416123f5b xlib/softpipe: fix buffer memory leak
Fixes leak caused by window resize.
2010-01-20 10:34:45 -07: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
Jakob Bornecrantz
9f728ed1c9 st/xorg: Fic bug and close drm_api at proper place 2010-01-20 14:55:07 +00: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
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
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
Vinson Lee
2613fa815a mesa: Remove unnecessary header from blend.c. 2010-01-18 22:45:23 -08: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
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
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
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
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
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
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
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
Vinson Lee
831764fa75 swrast: Remove unnecessary header from s_fragprog.c. 2010-01-12 23:54:15 -08:00
Vinson Lee
d6588a9372 swrast: Remove unnecessary header in s_lines.c. 2010-01-12 21:59:58 -08:00
Vinson Lee
7debc532d5 swrast: Remove unnecessary header from s_points.c. 2010-01-12 21:51:19 -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
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
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
Vinson Lee
0d65a68f51 x86: Remove unnecessary header from x86_xform.c. 2010-01-11 21:04:16 -08: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
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
Vinson Lee
b4bc208529 progs/demos: Remove unnecessary header from isosurf.c. 2010-01-11 19:03:18 -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
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
Vinson Lee
6d6c9c6688 progs/demos: Remove unnecessary header from fbotexture.c. 2010-01-11 00:24:39 -08:00
Dave Airlie
efaba97eaa 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:27:20 +10:00
Dave Airlie
1294df9ca4 radeon: fix bug in realloc code.
This bug was fixed in libdrm ages ago, port to non-kms
2010-01-11 13:27:14 +10:00
Vinson Lee
4fe51c7447 glu/sgi: Initialize members of class Mesher. 2010-01-10 16:09:41 -08:00
Vinson Lee
1111b38a1b glu/sgi: Initialize members of class Slicer. 2010-01-10 15:55:52 -08:00
Vinson Lee
b9bd96608c glu/sgi: Include missing header file. 2010-01-10 03:03:14 -08:00
Vinson Lee
199dedd6dd progs/demos: Check upper bounds of input in manywin.c. 2010-01-10 01:57:13 -08:00
Vinson Lee
0c7814fe23 progs/demos: Bounds check input to fire.c. 2010-01-10 00:40:46 -08:00
Vinson Lee
9e98c1fbf6 glu/sgi: Initialize members of class Renderhints. 2010-01-10 00:14:33 -08:00
Vinson Lee
a5815c36f7 glu/sgi: Initialize members of class StoredVertex. 2010-01-09 23:55:05 -08:00
Vinson Lee
61afd1158f glu/sgi: Include missing header file. 2010-01-09 23:53:54 -08:00
Vinson Lee
f8737bda37 glu/sgi: Initialize member of class O_pwlcurve. 2010-01-09 23:25:49 -08:00
Vinson Lee
683e3cb8db progs/tests: Silence 'missing initializer' warnings. 2010-01-08 23:08:57 -08:00
Vinson Lee
223c8482ca progs/glsl: Silence uninitialized variable warning. 2010-01-08 22:10:52 -08:00
Vinson Lee
3b82de92a0 progs/demos: Add missing initializers in engine.c. 2010-01-08 22:02:49 -08:00
Vinson Lee
4775723d2f r300g: Silence unused variable warnings. 2010-01-08 21:43:54 -08:00
Vinson Lee
20d6360db7 tgsi: Silence uninitialized variable warnings. 2010-01-08 20:24:05 -08:00
Jakob Bornecrantz
de37a00d27 util: Add u_bitmask to make build 2010-01-06 15:32:42 +01:00
Dan Nicholson
674c76310f mesa: Ensure libmesagallium.a is finished building before descending
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
2010-01-08 06:09:19 -08:00
Vinson Lee
3c42e403de r300: Move initial declaration outside for loop. 2010-01-08 01:13:46 -08:00
Brian Paul
5dd9e23d62 docs: document Gallium SSE codegen for XPD bug fix 2010-01-07 14:55:27 -07:00
Brian Paul
8647aa1d8d tgsi: fix SSE code emit for XPD
Rearrange things so that the writes to the dest registers happen
after we've fetched/used all src registers.

The problematic instruction was:  XPD TEMP[2].xyz, TEMP[0], TEMP[2];
Note that the dst reg is also a src reg.

This fixes bad shading with progs/glsl/bump.c since Eric's changes to the
Mesa program optimizer in commit d6690ce15f.
The optimizer rearranges some registers so we occasionally wind up with
something like the above.
2010-01-07 14:49:14 -07:00
Brian Paul
2b7a4b2c0e progs/fp: remove invalid tri-inv.c test
INV is not a valid instruction.
2010-01-07 08:22:39 -07:00
Vinson Lee
d42467687e progs/demos: Assert that input to malloc is valid. 2010-01-06 21:39:44 -08:00
Vinson Lee
45ac10fe6a progs/xdemos: Check for string overflow. 2010-01-06 18:19:46 -08:00
Vinson Lee
25ffd76278 progs/xdemos: Check for string overflow. 2010-01-06 18:08:41 -08:00
Vinson Lee
468f270f3f svga: Silence uninitialized variable warning. 2010-01-06 17:51:08 -08:00
Brian Paul
ef7eb62423 meta: remove F suffix from _mesa_Ortho() params
_mesa_Ortho() takes GLdoubles.
2010-01-06 18:22:06 -07:00
Brian Paul
73bd400016 docs: document a mipmap generation bug fix 2010-01-06 18:20:17 -07:00
Brian Paul
cb3cb96fbd meta: move destination vertex/projection setup out of _mesa_meta_GenerateMipmap
Based on a patch submitted by Pierre Willenbrock <pierre@pirsoft.de>
2010-01-06 18:20:17 -07:00
Brian Paul
06970b2ccb meta: set viewport and projection matrix in _mesa_meta_GenerateMipmap
This fixes mipmap levels being clipped to the last viewport.

Based on a patch submitted by Pierre Willenbrock <pierre@pirsoft.de>
2010-01-06 18:20:17 -07:00
Andre Maasikas
49653c01e8 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-06 19:52:24 -05:00
Brian Paul
8485811f10 tnl: set FOGC result to (f,0,0,1)
Fixed FDO bug 23397.
2010-01-06 17:43:56 -07:00
Vinson Lee
4c45810d57 progs/xdemos: Remove comma at end of enumerator list. 2010-01-06 15:35:18 -08:00
Vinson Lee
96a4e4552d progs/xdemos: Use temporary variables.
This was missed from the previous commit to glxheads.c.
2010-01-06 15:33:13 -08:00
Vinson Lee
c1dad22d71 progs/glsl: Prevent possible string overflow. 2010-01-06 15:25:42 -08:00
Vinson Lee
f4952f040b progs/xdemos: Prevent possible string overflow. 2010-01-06 14:56:43 -08:00
Pierre Ossman
c9befda13a r600: float texture component ordering
The ordering of texture components was
backwards for the floating point textures.

Signed-off-by: Pierre Ossman <pierre@ossman.eu>
2010-01-06 12:42:49 -05:00
Roel Kluin
324568f79d mesa: test index bounds before array element
Check whether the index is within bounds before accessing the array.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-06 09:47:37 -07:00
Roel Kluin
5db710a823 win32_menu: add missing parentheses in mapMenu()
`|' has higher precedence than `?'.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-06 09:46:55 -07:00
Roel Kluin
2b4acd26b1 nv50: add missing parentheses in nv50_query_result()
NOUVEAU_BO_RD is defined (1 << 2), and `|' has higher precedence than `?'
so the second argument of nouveau_bo_map was always 0.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-06 09:46:53 -07:00
Brian Paul
e4b7d9ea35 i965: fix invalid assertion in emit_xpd(), again 2010-01-06 07:18:09 -07:00
José Fonseca
5b64d94390 pipebuffer: Multi-threading fixes for fencing.
I had this patch on my hard drive for long time. It doesn't fully
address SVGA multi-threading issues, but causes no regressions, so decided
to commit while it still applies cleanly.

Attention: merging this into master will cause issues due to recent
changes in reference counting to fix strict aliasing rules violation.
2010-01-06 12:18:16 +00:00
Brian Paul
e555146fa3 i965: fix invalid assertion in emit_xpd()
Invalid assertion found by Roel Kluin <roel.kluin@gmail.com>
2010-01-05 15:53:05 -07:00
Roel Kluin
766f3ccbda tdfx: condition always evaluates to false in SetupDoubleTexEnvVoodoo3()
This can never be true.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
2010-01-05 14:42:28 -07:00
Brian Paul
9f544394c1 st/mesa: fix broken translation of negative register indexes
A src register's index can be negative if we're doing indirect
addressing into the constant buffer.  Ex: MOV OUT[1], CONST[ADDR[0].x-3]

This fixes the piglit vp-arl-neg-array.vpfp test.

Before this change we were going out of bounds of the t->constants[]
array and getting garbage that later triggered an assertion.
2010-01-05 11:44:19 -07:00
Brian Paul
487a14b476 ARB prog parser: regenerated parser file 2010-01-05 11:44:19 -07:00
Brian Paul
f0f68b1e4c ARB prog parser: fix parameter binding type
References to program local and enviroment parameters are put into the
unified program parameters list as PROGRAM_STATE_VAR entries which point
into the local or environment arrays.  So the param_binding_type field
should be PROGRAM_STATE_VAR.

This fixes the piglit vpfp-generic vp-arl-env-array.vpfp and
vp-arl-local-array.vpfp test failures.
2010-01-05 11:44:19 -07:00
Brian Paul
e3514b7338 ARB prog parser: regenerated parser files 2010-01-05 11:44:19 -07:00
Brian Paul
7c6ae4c6c8 ARB prog parser: add allowSwizzle param to initialize_symbol_from_const()
We need to disable constant consolidation when building an array of
constants which might be indexed indirectly.

Fixes regression in piglit vpfp-generic vp-arl-constant-array.vpfp
test caused by earlier constant consolidation patch.
2010-01-05 11:44:19 -07:00
Brian Paul
37f6929d29 mesa: whitespace changes and comments 2010-01-05 11:44:19 -07:00
Brian Paul
f27e39aa4e mesa: change constant search behaviour in _mesa_add_unnamed_constant()
Only search for an existing, matching constant if swizzleOut is non-null.
We need to be able to disable constant consolidation when building an
array of constants which will be indexed indirectly.
2010-01-05 11:44:19 -07:00
José Fonseca
38d8b18003 svga: Remove stale references to delete shader results.
To ensure that a new result that happens to have the same address
of the old one will be detected as a change.
2010-01-05 17:56:26 +00:00
José Fonseca
8ebef37c7b svga: Rebind shaders when tokens change.
Even shader ID doesn't change. Otherwise the token change is not
effective.

This reverts regression from commit
cdb445f3a9. Regression could be seen in
Quake3's loading screen -- the upper right corner of the screen would
be black.
2010-01-05 17:32:53 +00:00
Brian Paul
ef1b942691 st/mesa: added PROGRAM_LOCAL_PARAM case in src_register()
Fixes piglit vpfp-generic arl.vpfp failure when using gallium.
2010-01-05 09:14:50 -07:00
Brian Paul
bd96b51303 mesa: bump version to 7.7.1-DEVEL 2010-01-05 07:59:29 -07:00
Brian Paul
6d84580858 mesa: add missing _mesa_lock_texture() call 2010-01-04 19:05:31 -07:00
Eric Anholt
b434a816d7 i915: Use _MaxLevel on principle in texture setup.
It was OK before because we proceed to clamp the value to hardware
limits, but given that other use of MaxLevel has been a trap, let's
avoid it.
2010-01-04 14:15:12 -08:00
Eric Anholt
19a26dfc47 intel: Fix CopyTexImage from tiled mipmap levels > 0.
Fixes piglit fbo-copyteximage.
2010-01-04 14:15:12 -08:00
Eric Anholt
63610fae4f i965: Fix the surface offset calculation for tiled buffers.
If we ever had a non-tile-aligned tiled renderbuffer, the math was all
off.  Use the existing x,y coordinates instead of trying to
reconstruct them from an incorrectly-calculated offset value.
2010-01-04 14:15:12 -08:00
Andre Maasikas
a160d1c27d r600: support vertex_array_bgra
Use vertex program key mechanism and swizzle during vertex fetch - is there
a better way?
2010-01-04 16:16:43 -05:00
Brian Paul
82421c549f mesa: added GL_DU8DV8_ATI in extract_float_rgba()
Fixes warning seen with Shadowgrounds.  See bug 24016.
2010-01-04 14:01:19 -07:00
Brian Paul
01bf004d8b docs: initial release notes for 7.7.1 2010-01-04 14:01:18 -07:00
Vinson Lee
6130bb1391 mesa: Prevent possible array out-of-bounds access by _mesa_light. 2010-01-04 12:06:04 -08:00
Brian Paul
e661bf5018 mesa: regenerated enums.c file 2010-01-04 11:30:03 -07:00
Brian Paul
707faf65c8 glapi: comment-out TIMEOUT_IGNORED
This is not really a GLenum value.
2010-01-04 11:30:03 -07:00
Brian Paul
f52dd2ab33 glsl: use varName variable in _slang_gen_assignment() 2010-01-04 11:30:03 -07:00
Michel Dänzer
1e414df894 st/mesa: Only call st_texture_image_unmap() if texImage->Data is non-NULL.
This was already done in st_TexImage() but was missed between incremental
changes to st_TexSubimage().
2010-01-04 16:54:29 +01:00
Michel Dänzer
acd1451393 svga: Fix debug build crash when rendering to depth/stencil renderbuffer only. 2010-01-04 13:05:43 +01:00
Michel Dänzer
c114f000df st/xorg: Proper calculation of screen pitch. 2010-01-04 13:04:05 +01:00
Michel Dänzer
8282185752 vmware/xorg: Fix SCons build. 2010-01-04 13:02:40 +01:00
Vinson Lee
d1e2fc19cc r300: Use C-style comments. 2010-01-03 23:33:32 -08:00
Vinson Lee
8a29e3f8e8 progs/egl: Silence uninitialized variable warnings. 2010-01-03 21:39:20 -08:00
Vinson Lee
3ea5a95078 progs/samples: Silence compiler warnings. 2010-01-03 21:29:33 -08:00
Vinson Lee
b14cbfaebc r300: Silence 'mixed declarations and code' warnings. 2010-01-03 20:51:23 -08:00
Vinson Lee
0214b7b3c1 r300: Silence 'mixed declarations and code' warning. 2010-01-03 20:16:59 -08:00
Vinson Lee
58531029e6 r300: Silence 'mixed declarations and code' warning. 2010-01-03 18:32:07 -08:00
Vinson Lee
3e196f433d r300g: Silence 'mixed declarations and code' warning. 2010-01-03 18:05:12 -08:00
Vinson Lee
fe3ea299bf r300g: Remove comma at end of enumerator list. 2010-01-03 15:07:35 -08:00
Vinson Lee
0bfc579bd4 llvmpipe: Remove comma at end of enumerator list. 2010-01-03 14:42:36 -08:00
José Fonseca
eb5d9e6f70 mesa: Cope with the degenerate case of zero length ranges.
Fixes assertion failures on glean's bufferObject test.
2010-01-03 20:00:19 +00:00
José Fonseca
f3739bdb60 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-03 20:00:19 +00:00
Jeremy Huddleston
287cbba9b7 apple: Purge existing (not working) GLX_USE_APPLEGL from dated libGL on OSX
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2010-01-03 08:58:13 -05:00
Jeremy Huddleston
32305e3a9f glxcmds: Fix comment about __DRI_ALLOCATE
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2010-01-03 08:58:13 -05:00
Vinson Lee
1d95544446 trace: Remove comma at end of enumerator list. 2010-01-03 03:08:40 -08:00
José Fonseca
66c1de77ed rtasm: Play nicely with Windows's Data Execution Prevention. 2010-01-03 11:03:13 +00:00
Vinson Lee
1da47ac20e progs/vp: Ensure null-terminated byte string. 2010-01-03 02:38:22 -08:00
Vinson Lee
c9c6e9a39e progs/tests: Silence uninitialized variable warning. 2010-01-02 21:58:40 -08:00
Vinson Lee
32d18924df progs/tests: Silence warn_unused_result warning. 2010-01-02 21:52:51 -08:00
Vinson Lee
d27effbfd8 i810: Fix include recursion. 2010-01-02 21:05:06 -08:00
Vinson Lee
94c5faad26 sis: ifdef out unused variable.
Silences GCC warning.
2010-01-02 20:47:15 -08:00
Vinson Lee
d2758f3b74 st/xorg: Ensure null-terminated byte string. 2010-01-02 20:39:04 -08:00
Vinson Lee
be6fb5c083 r300g: Use C-style comments. 2010-01-02 20:17:43 -08:00
Vinson Lee
fe27b07b0f glu/sgi: Initialize members of struct O_curve. 2010-01-02 20:04:00 -08:00
José Fonseca
cdb445f3a9 svga: Use a shader id as low as possible. 2010-01-03 00:50:13 +00:00
José Fonseca
904917dcc6 util: Minor enhancements/corrections to the bitmask logic. 2010-01-03 00:50:13 +00:00
José Fonseca
da6a80301b svga: Rename error labels.
Make it easier to insert/remove error branches.
2010-01-03 00:50:12 +00:00
Vinson Lee
386f91eec3 glu/sgi: Initialize members of struct O_surface. 2010-01-02 15:46:11 -08:00
Vinson Lee
ba9dc26eec glu/sgi: Initialize member of struct O_trim. 2010-01-02 15:29:25 -08:00
Vinson Lee
37e5626111 glu/sgi: Initialize member of struct Property. 2010-01-01 23:01:03 -08:00
Vinson Lee
646c8ce032 progs/samples: 'Silence no previous prototype' warnings. 2010-01-01 17:54:11 -08:00
Vinson Lee
2c64e4c50e glu/sgi: Initialize member of struct Dlnode. 2010-01-01 17:25:16 -08:00
Vinson Lee
64a1961011 glu/sgi: Initialize members of struct O_nurbscurve. 2010-01-01 17:19:27 -08:00
Vinson Lee
fab161f287 x86: Silence printf format warnings. 2010-01-01 17:06:16 -08:00
Vinson Lee
ad9defdd9c progs/rbug: s/wait/rbug_wait/
wait conflicts with wait in /usr/include/sys/wait.h.
2010-01-01 16:25:37 -08:00
Vinson Lee
3ae37da611 llvmpipe: Silence uninitialized variable warning. 2010-01-01 16:03:53 -08:00
Vinson Lee
fd237a879f llvmpipe: Use C-style comment. 2010-01-01 15:38:19 -08:00
Vinson Lee
dac82c378a gallium/util: Silence format warnings. 2010-01-01 15:32:52 -08:00
Vinson Lee
88bd32383a ARB prog parser: Silence unused variable warnings. 2010-01-01 15:12:58 -08:00
Vinson Lee
7df06e7e9d gallium/util: Replace h_addr with h_addr_list[0].
Fixes compilation error on Mac OS.
2010-01-01 15:01:22 -08:00
Vinson Lee
a349687d49 glu/sgi: Initialize members of class Knotvector. 2010-01-01 14:46:30 -08:00
Vinson Lee
5d3d202ac9 glu/sgi: Initialize member of struct Property. 2010-01-01 14:39:16 -08:00
Brian Paul
195e7657e2 swrast: use different temp array in _swrast_get_dest_rgba()
When using multiple color drawbuffers with blending/logicop/masking we
were overwriting color values which we still needed.
2009-12-31 08:44:27 -07:00
Vinson Lee
6e0584932b mesa: Silence unused variable warning. 2009-12-31 00:07:47 -08:00
Vinson Lee
5b2713c92a progs/glsl: Provide a better fix for fgets warning. 2009-12-30 12:38:21 -08:00
Brian Paul
f00bf0598c st/mesa: add PIPE_FORMAT_Z24S8_UNORM in st_get_format_info()
Fixes progs/demos/fbotexture on Nouveau.
Patch submitted by Luca Barbieri <luca@luca-barbieri.com>.
2009-12-29 23:31:43 -07:00
Vinson Lee
de95e5768b glu/sgi: Initialize members of struct O_nurbssurface. 2009-12-29 22:29:53 -08:00
Vinson Lee
ac21edff1c tdfx: Silence uninitialized variable warning. 2009-12-29 21:34:06 -08:00
Vinson Lee
0ab29d2b35 progs/glsl: Silence compiler warnings. 2009-12-29 21:11:37 -08:00
Vinson Lee
70bbe22366 glu/sgi: Silence warn_unused_result warnings. 2009-12-29 21:03:23 -08:00
Vinson Lee
31263f41a0 st/xorg: Use C-style comments. 2009-12-29 20:56:47 -08:00
Vinson Lee
97b899374c glu/sgi: Initialize member of struct GridVertex. 2009-12-29 20:45:24 -08:00
Jakob Bornecrantz
5169775345 st/xorg: Fix warning and add a TODO comment 2009-12-30 05:08:41 +01:00
Jakob Bornecrantz
d34fdf149d st/xorg: On close wait on fences and then destroy the screen 2009-12-30 05:01:09 +01:00
Jakob Bornecrantz
5fdc4f732f st/xorg: Be proper with pipe pointers on close in exa 2009-12-30 05:00:30 +01:00
Jakob Bornecrantz
53e314cb80 st/xorg: Make sure we don't overrun the fence array in block handler 2009-12-30 04:22:12 +01:00
Vinson Lee
3bcf7d7d7b glu/sgi: Initialize member variables in class Varray. 2009-12-29 17:46:42 -08:00
Vinson Lee
a7db305c2f glu/sgi: Initialize member of class monoChain. 2009-12-29 17:35:22 -08:00
Vinson Lee
5060fb428d glu/sgi: Initialize members of class sampledLine. 2009-12-29 17:22:11 -08:00
Vinson Lee
495b8f8f7a glu/sgi: Initialize members of class directedLine. 2009-12-29 14:28:33 -08:00
Vinson Lee
62a0d4ef7f mesa: Initialize variable in get_tex_color_index. 2009-12-29 13:38:02 -08:00
Brian Paul
4f481cb87a glsl: added uniform initializer check
GLSL 1.10 disallows initializers for uniforms but GLSL 1.20 and later
allows them.  This patch uses the #version directive to allow/disallow
uniform initializers.

This addresses bug 25807, but piglit also needs to be fixed to specify
the GLSL version in the shader.
2009-12-29 10:11:29 -07:00
Brian Paul
639e7a140e ARB prog parser: use _mesa_add_unnamed_constant() to use fewer constant slots
This function will search the constant parameters in an effort to re-use
constant slots.  For example, {1,2,3,4} and {4,1,1,2} can be stored in
one constant slot and accessed with different swizzles.  The swizzle info
must be propogated though the parsing code in a few places.

Fixes Piglit "vpfp-generic tests/shaders/generic/big-param.vpfp" failure.
2009-12-29 09:08:02 -07:00
Vinson Lee
b4658dbf04 st/egl: Move declaration before code. 2009-12-28 19:09:33 -08:00
Vinson Lee
c67bb15d4e intel: Silence compiler warnings. 2009-12-28 18:46:15 -08:00
Vinson Lee
46c2196de3 llvmpipe: Fix assert. 2009-12-28 18:07:09 -08:00
Vinson Lee
e049ddb754 llvmpipe: Silence compiler warnings. 2009-12-28 18:05:30 -08:00
Keith Whitwell
f0ba7d897d util: better fix for unused variable warnings with asserts
Modify the non-debug (ie disabled) version of assert to expose the
value in the expression to the compiler (avoiding the unused variable
messages) while still expanding to a noop.
2009-12-28 11:06:11 +00:00
Vinson Lee
31d1822473 llvmpipe: Silence compiler warnings. 2009-12-28 00:44:30 -08:00
Vinson Lee
c441386b0c st/xorg: Silence unused variable warnings. 2009-12-27 23:02:55 -08:00
Vinson Lee
aa0437532e g3dvl: Silence compiler warnings. 2009-12-27 22:49:49 -08:00
Vinson Lee
bf63b9d7a9 st/vega: Silence compiler warnings. 2009-12-27 22:39:31 -08:00
Vinson Lee
9d3092d134 gallium/xlib: Silence unused variable warning. 2009-12-27 22:18:18 -08:00
Vinson Lee
d1f64fa72f trace: Silence unused variable warnings. 2009-12-27 18:12:58 -08:00
Vinson Lee
f31f9cf485 i915g: Silence unused variable warning. 2009-12-27 18:09:58 -08:00
Vinson Lee
3a2f96f18a softpipe: Silence unintialized variable warnings. 2009-12-27 18:06:02 -08:00
Vinson Lee
180ccffe55 softpipe: Silence unused variable warning. 2009-12-27 17:52:47 -08:00
Vinson Lee
0463ee64e3 tgsi/ureg: Silence uninitialized variable warnings. 2009-12-27 17:40:48 -08:00
Brian Paul
b0d5e44f24 docs: insert 7.7 release date 2009-12-27 15:33:25 -07:00
Brian Paul
d0b7ff551a Merge branch 'mesa_7_6_branch' into mesa_7_7_branch
Conflicts:
	src/gallium/auxiliary/util/u_network.c
	src/gallium/auxiliary/util/u_network.h
	src/gallium/drivers/i915/i915_state.c
	src/gallium/drivers/trace/tr_rbug.c
	src/gallium/state_trackers/vega/bezier.c
	src/gallium/state_trackers/vega/vg_context.c
	src/gallium/state_trackers/xorg/xorg_crtc.c
	src/gallium/state_trackers/xorg/xorg_driver.c
	src/gallium/winsys/xlib/xlib_brw_context.c
	src/mesa/main/mtypes.h
2009-12-27 15:31:08 -07:00
Brian Paul
da876fa3a5 docs: insert 7.6.1 release date 2009-12-27 15:14:25 -07:00
Brian Paul
7831515e69 st/mesa: add missing case for PIPE_FORMAT_B8G8R8A8_UNORM 2009-12-27 10:09:24 -07:00
Vinson Lee
331e910b5c gallium/util: Remove comma at end of enumerator list. 2009-12-26 16:22:25 -08:00
Vinson Lee
3c2fd1bae0 rbug: Remove comma at end of enumerator list. 2009-12-26 16:18:47 -08:00
Vinson Lee
f8ca25e02f rbug: Remove comma at end of enumerator list. 2009-12-26 16:14:39 -08:00
Vinson Lee
fc11424bcd mesa: Remove comma at end of enumerator list. 2009-12-26 16:09:41 -08:00
Vinson Lee
309c156bae i915: Fix assert. 2009-12-26 15:55:38 -08:00
Vinson Lee
e81fe088f4 progs/demos: Silence warn_unused_result warnings. 2009-12-26 01:08:26 -08:00
Vinson Lee
cdc69e3469 progs/util: Silence warn_unused_result warnings. 2009-12-25 23:13:50 -08:00
Vinson Lee
cd59e6f553 intel: Silence implicit function declaration warning. 2009-12-25 22:34:35 -08:00
Vinson Lee
67a4abcc3b glu/sgi: Fix include recursion.
arcsorter.h should not include itself.
2009-12-25 14:23:10 -08:00
Vinson Lee
2447786ed0 i965: Fix assert. 2009-12-24 22:58:05 -08:00
Vinson Lee
f5ad1d0d02 i965: Add missing va_end. 2009-12-24 16:26:09 -08:00
Vinson Lee
098f10c270 glsl: Initialize member a_obj of struct slang_operation. 2009-12-23 18:00:06 -08:00
Vinson Lee
261c3cd530 glu/sgi: Initialize variable in directedLine. 2009-12-23 17:50:02 -08:00
Vinson Lee
520955a0cd gallium/util: Initialize variable in util_clear. 2009-12-23 16:22:03 -08:00
Vinson Lee
6138145b35 glu/sgi: Silence compiler warnings. 2009-12-23 16:11:10 -08:00
Vinson Lee
51dcea2aac util: Ensure debug_dump_flags generates a null-terminated string. 2009-12-23 15:19:45 -08:00
Vinson Lee
2ea061509d st/xorg: Use C-style comments. 2009-12-23 14:52:06 -08:00
Vinson Lee
15ecd0337e st/vega: Move declaration outside for loop. 2009-12-23 14:43:53 -08:00
Vinson Lee
1b0ab3e3c9 st/egl: Use C-style comments. 2009-12-23 14:18:11 -08:00
Vinson Lee
6c8c1ce78b glx: Add XF86DRI[Open|Close]FullScreen prototypes to xf86dri.h. 2009-12-23 14:09:36 -08:00
Vinson Lee
cf3bb0cf31 glx: Move declaration outside for loop. 2009-12-23 12:42:38 -08:00
Tom Fogal
f42c861f02 Regenerate gl_mangle.h.
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-12-23 11:38:14 -07:00
Maarten Maathuis
8e8502bc63 gallium: only create pipe buffer when size is nonzero
- This fixes a crash upon starting spring (a rts engine/game).

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
2009-12-23 16:33:54 +00:00
Vinson Lee
57b5ca5d11 glu/sgi: Silence uninitialized variable warnings. 2009-12-22 23:07:00 -08:00
Vinson Lee
19a40524d3 Add gallium to darwin config. 2009-12-22 18:21:41 -08:00
Vinson Lee
aae32df718 xlib: Use C-style comments. 2009-12-22 17:51:58 -08:00
Vinson Lee
b20382d477 trace: Silence uninitialized variable warnings. 2009-12-22 17:34:39 -08:00
Vinson Lee
f6ca26e5a7 trace: Add PIPE_OS_APPLE. 2009-12-22 17:17:28 -08:00
Vinson Lee
6ce28a755c gallium/util: Add PIPE_OS_APPLE to u_stream_stdc.c. 2009-12-22 16:23:00 -08:00
Vinson Lee
5e73bcb396 gallium/util: Add PIPE_OS_APPLE to u_network. 2009-12-22 15:59:50 -08:00
Vinson Lee
fb8bff341e i915g: Use C-style comment. 2009-12-22 15:19:48 -08:00
Vinson Lee
cf02484fb6 glx: Compile dri2.c only if GLX_DIRECT_RENDERING is defined. 2009-12-22 14:51:12 -08:00
Vinson Lee
c1033299e8 ffb: Silence compiler warnings. 2009-12-22 14:28:40 -08:00
Brian Paul
b5ddc7821a mesa: fix binary() function, printf format string
Need to use the constant 1ULL and 0xllx format string.  This fixes incorrect
results and a NULL pointer/parameter bug.
2009-12-22 13:33:40 -07:00
Vinson Lee
1bf2d78b11 progs/tests: Fix build. 2009-12-22 00:54:34 -08:00
Ian Romanick
82184970d3 Add MD5 checksums for 7.6.1 release 2009-12-21 18:43:09 -08:00
Ian Romanick
e9b5ed1c13 Add MD5 checksums for 7.6.1 release 2009-12-21 18:32:32 -08:00
Ian Romanick
6ffed19993 Add MD5 checksums for 7.7 release 2009-12-21 18:30:35 -08:00
611 changed files with 6501 additions and 4643 deletions

View File

@@ -182,7 +182,7 @@ ultrix-gcc:
# Rules for making release tarballs
VERSION=7.7
VERSION=7.7.1
DIRECTORY = Mesa-$(VERSION)
LIB_NAME = MesaLib-$(VERSION)
DEMO_NAME = MesaDemos-$(VERSION)

View File

@@ -110,6 +110,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 = [

View File

@@ -920,6 +920,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

View File

@@ -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 glu glut/glx glew
SRC_DIRS = glx/x11 mesa gallium glu glut/glx glew
GLU_DIRS = sgi
DRIVER_DIRS = osmesa
#DRIVER_DIRS = dri

View File

@@ -10,7 +10,7 @@ CONFIG_NAME = default
# Version info
MESA_MAJOR=7
MESA_MINOR=7
MESA_TINY=0
MESA_TINY=1
MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
# external projects. This should be useless now that we use libdrm.

View File

@@ -20,6 +20,8 @@ AC_CANONICAL_HOST
dnl Versions for external dependencies
LIBDRM_REQUIRED=2.4.15
LIBDRM_RADEON_REQUIRED=2.4.17
LIBDRM_XORG_REQUIRED=2.4.17
LIBKMS_XORG_REQUIRED=1.0.0
DRI2PROTO_REQUIRED=1.99.3
dnl Check for progs
@@ -91,6 +93,9 @@ linux*|*-gnu*|gnu*)
solaris*)
DEFINES="$DEFINES -DPTHREADS -DSVR4"
;;
cygwin*)
DEFINES="$DEFINES -DPTHREADS"
;;
esac
dnl Add flags for gcc and g++
@@ -1149,7 +1154,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")
;;
@@ -1166,15 +1171,21 @@ yes)
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")
PKG_CHECK_MODULES([LIBDRM_XORG], [libdrm >= $LIBDRM_XORG_REQUIRED])
PKG_CHECK_MODULES([LIBKMS_XORG], [libkms >= $LIBKMS_XORG_REQUIRED])
HAVE_XORG="yes"
fi
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([xorg-driver-dir],
[AS_HELP_STRING([--with-xorg-driver-dir=DIR],
[Default xorg driver directory[[default=${libdir}/xorg/modules/drivers]]])],

View File

@@ -51,5 +51,24 @@ 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>
</BODY>
</HTML>

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,11 +10,24 @@
<H1>News</H1>
<h2>November XX, 2009</h2>
<h2>March 26, 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>
<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
release fixing issues found in the 7.6 release.
</p>
<p>
Also, <a href="relnotes-7.7.html">Mesa 7.7</a> is released. This is a new
development release.
</p>
<h2>September 28, 2009</h2>

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

@@ -8,7 +8,7 @@
<body bgcolor="#eeeeee">
<H1>Mesa 7.6.1 Release Notes, (date tbd)</H1>
<H1>Mesa 7.6.1 Release Notes, 21 December 2009</H1>
<p>
Mesa 7.6.1 is a bug-fix release fixing issues since version 7.6.
@@ -26,7 +26,15 @@ for DRI hardware acceleration.
<h2>MD5 checksums</h2>
<pre>
tbd
e80fabad2e3eb7990adae773d6aeacba MesaLib-7.6.1.tar.gz
7db4617e9e10ad3aca1b64339fd71b7d MesaLib-7.6.1.tar.bz2
dd3275dbf9833480d2e92d0c69b22abd MesaLib-7.6.1.zip
f7fdcfe3c0f363e571c60f02f74368fb MesaDemos-7.6.1.tar.gz
a4226f06732a02556fcf6be290b86dff MesaDemos-7.6.1.tar.bz2
849425f356bd940726cebedfa79de176 MesaDemos-7.6.1.zip
d40cc7c5e337a85b674e27a8e494f52f MesaGLUT-7.6.1.tar.gz
ca9aecb91f05b1da9fd7d5eeb19d47d7 MesaGLUT-7.6.1.tar.bz2
23fad8398004c977a1d8953079b72ca6 MesaGLUT-7.6.1.zip
</pre>

60
docs/relnotes-7.7.1.html Normal file
View File

@@ -0,0 +1,60 @@
<HTML>
<TITLE>Mesa Release Notes</TITLE>
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<body bgcolor="#eeeeee">
<H1>Mesa 7.7.1 Release Notes / March 28, 2010</H1>
<p>
Mesa 7.7.1 is a bug-fix release.
</p>
<p>
Mesa 7.7.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>
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>Bug fixes</h2>
<ul>
<li>Assorted fixes to VMware SVGA gallium driver.
<li>Fixed broken blending to multiple color buffers in swrast driver.
<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>
</body>
</html>

View File

@@ -8,7 +8,7 @@
<body bgcolor="#eeeeee">
<H1>Mesa 7.7 Release Notes / date TBD</H1>
<H1>Mesa 7.7 Release Notes / 21 December 2009</H1>
<p>
Mesa 7.7 is a new development release.
@@ -28,7 +28,15 @@ for DRI hardware acceleration.
<h2>MD5 checksums</h2>
<pre>
tbd
395c9516edf1ad54b0934d8db15557bf MesaLib-7.7.tar.gz
e3fa64a1508bc23dd9de9dd2cea7cfb1 MesaLib-7.7.tar.bz2
e54903eb5e49c3969821fa16b32da245 MesaLib-7.7.zip
53b5b6f78e55de170d43c98cb6aaab7e MesaDemos-7.7.tar.gz
6fd616b27b9826d0faa23e08e05d9435 MesaDemos-7.7.tar.bz2
240fe06159ad73d5e22c27033b66c80a MesaDemos-7.7.zip
9fe11a904b2a9d8cd06cc52bc330b716 MesaGLUT-7.7.tar.gz
e8dceed05a59a2d3c2619d7d734587e3 MesaGLUT-7.7.tar.bz2
96af041d435349ee23ead4667ec36363 MesaGLUT-7.7.zip
</pre>

View File

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

View File

@@ -30,6 +30,7 @@
/*REGENERATE_TO_END-----------ALL LINES BELOW HERE GET REPLACED ON REGENERATION */
#define glAccum MANGLE(Accum)
#define glActiveProgramEXT MANGLE(ActiveProgramEXT)
#define glActiveStencilFaceEXT MANGLE(ActiveStencilFaceEXT)
#define glActiveTextureARB MANGLE(ActiveTextureARB)
#define glActiveTexture MANGLE(ActiveTexture)
@@ -60,6 +61,7 @@
#define glBeginTransformFeedback MANGLE(BeginTransformFeedback)
#define glBeginTransformFeedbackNV MANGLE(BeginTransformFeedbackNV)
#define glBeginVertexShaderEXT MANGLE(BeginVertexShaderEXT)
#define glBeginVideoCaptureNV MANGLE(BeginVideoCaptureNV)
#define glBindAttribLocationARB MANGLE(BindAttribLocationARB)
#define glBindAttribLocation MANGLE(BindAttribLocation)
#define glBindBufferARB MANGLE(BindBufferARB)
@@ -93,6 +95,8 @@
#define glBindVertexArrayAPPLE MANGLE(BindVertexArrayAPPLE)
#define glBindVertexArray MANGLE(BindVertexArray)
#define glBindVertexShaderEXT MANGLE(BindVertexShaderEXT)
#define glBindVideoCaptureStreamBufferNV MANGLE(BindVideoCaptureStreamBufferNV)
#define glBindVideoCaptureStreamTextureNV MANGLE(BindVideoCaptureStreamTextureNV)
#define glBinormal3bEXT MANGLE(Binormal3bEXT)
#define glBinormal3bvEXT MANGLE(Binormal3bvEXT)
#define glBinormal3dEXT MANGLE(Binormal3dEXT)
@@ -126,6 +130,7 @@
#define glBlendFuncSeparate MANGLE(BlendFuncSeparate)
#define glBlitFramebufferEXT MANGLE(BlitFramebufferEXT)
#define glBlitFramebuffer MANGLE(BlitFramebuffer)
#define glBufferAddressRangeNV MANGLE(BufferAddressRangeNV)
#define glBufferDataARB MANGLE(BufferDataARB)
#define glBufferData MANGLE(BufferData)
#define glBufferParameteriAPPLE MANGLE(BufferParameteriAPPLE)
@@ -202,6 +207,7 @@
#define glColor4uiv MANGLE(Color4uiv)
#define glColor4us MANGLE(Color4us)
#define glColor4usv MANGLE(Color4usv)
#define glColorFormatNV MANGLE(ColorFormatNV)
#define glColorFragmentOp1ATI MANGLE(ColorFragmentOp1ATI)
#define glColorFragmentOp2ATI MANGLE(ColorFragmentOp2ATI)
#define glColorFragmentOp3ATI MANGLE(ColorFragmentOp3ATI)
@@ -276,6 +282,7 @@
#define glCopyConvolutionFilter1D MANGLE(CopyConvolutionFilter1D)
#define glCopyConvolutionFilter2DEXT MANGLE(CopyConvolutionFilter2DEXT)
#define glCopyConvolutionFilter2D MANGLE(CopyConvolutionFilter2D)
#define glCopyImageSubDataNV MANGLE(CopyImageSubDataNV)
#define glCopyMultiTexImage1DEXT MANGLE(CopyMultiTexImage1DEXT)
#define glCopyMultiTexImage2DEXT MANGLE(CopyMultiTexImage2DEXT)
#define glCopyMultiTexSubImage1DEXT MANGLE(CopyMultiTexSubImage1DEXT)
@@ -302,6 +309,7 @@
#define glCreateProgramObjectARB MANGLE(CreateProgramObjectARB)
#define glCreateShader MANGLE(CreateShader)
#define glCreateShaderObjectARB MANGLE(CreateShaderObjectARB)
#define glCreateShaderProgramEXT MANGLE(CreateShaderProgramEXT)
#define glCullFace MANGLE(CullFace)
#define glCullParameterdvEXT MANGLE(CullParameterdvEXT)
#define glCullParameterfvEXT MANGLE(CullParameterfvEXT)
@@ -379,6 +387,7 @@
#define glDrawRangeElementsEXT MANGLE(DrawRangeElementsEXT)
#define glDrawRangeElements MANGLE(DrawRangeElements)
#define glDrawTransformFeedbackNV MANGLE(DrawTransformFeedbackNV)
#define glEdgeFlagFormatNV MANGLE(EdgeFlagFormatNV)
#define glEdgeFlag MANGLE(EdgeFlag)
#define glEdgeFlagPointerEXT MANGLE(EdgeFlagPointerEXT)
#define glEdgeFlagPointerListIBM MANGLE(EdgeFlagPointerListIBM)
@@ -408,6 +417,7 @@
#define glEndTransformFeedback MANGLE(EndTransformFeedback)
#define glEndTransformFeedbackNV MANGLE(EndTransformFeedbackNV)
#define glEndVertexShaderEXT MANGLE(EndVertexShaderEXT)
#define glEndVideoCaptureNV MANGLE(EndVideoCaptureNV)
#define glEvalCoord1d MANGLE(EvalCoord1d)
#define glEvalCoord1dv MANGLE(EvalCoord1dv)
#define glEvalCoord1f MANGLE(EvalCoord1f)
@@ -445,6 +455,7 @@
#define glFogCoorddv MANGLE(FogCoorddv)
#define glFogCoordfEXT MANGLE(FogCoordfEXT)
#define glFogCoordf MANGLE(FogCoordf)
#define glFogCoordFormatNV MANGLE(FogCoordFormatNV)
#define glFogCoordfvEXT MANGLE(FogCoordfvEXT)
#define glFogCoordfv MANGLE(FogCoordfv)
#define glFogCoordhNV MANGLE(FogCoordhNV)
@@ -544,6 +555,7 @@
#define glGetBufferParameteri64v MANGLE(GetBufferParameteri64v)
#define glGetBufferParameterivARB MANGLE(GetBufferParameterivARB)
#define glGetBufferParameteriv MANGLE(GetBufferParameteriv)
#define glGetBufferParameterui64vNV MANGLE(GetBufferParameterui64vNV)
#define glGetBufferPointervARB MANGLE(GetBufferPointervARB)
#define glGetBufferPointerv MANGLE(GetBufferPointerv)
#define glGetBufferSubDataARB MANGLE(GetBufferSubDataARB)
@@ -609,6 +621,8 @@
#define glGetInteger64v MANGLE(GetInteger64v)
#define glGetIntegerIndexedvEXT MANGLE(GetIntegerIndexedvEXT)
#define glGetIntegeri_v MANGLE(GetIntegeri_v)
#define glGetIntegerui64i_vNV MANGLE(GetIntegerui64i_vNV)
#define glGetIntegerui64vNV MANGLE(GetIntegerui64vNV)
#define glGetIntegerv MANGLE(GetIntegerv)
#define glGetInvariantBooleanvEXT MANGLE(GetInvariantBooleanvEXT)
#define glGetInvariantFloatvEXT MANGLE(GetInvariantFloatvEXT)
@@ -651,6 +665,7 @@
#define glGetMultiTexParameterIuivEXT MANGLE(GetMultiTexParameterIuivEXT)
#define glGetMultiTexParameterivEXT MANGLE(GetMultiTexParameterivEXT)
#define glGetNamedBufferParameterivEXT MANGLE(GetNamedBufferParameterivEXT)
#define glGetNamedBufferParameterui64vNV MANGLE(GetNamedBufferParameterui64vNV)
#define glGetNamedBufferPointervEXT MANGLE(GetNamedBufferPointervEXT)
#define glGetNamedBufferSubDataEXT MANGLE(GetNamedBufferSubDataEXT)
#define glGetNamedFramebufferAttachmentParameterivEXT MANGLE(GetNamedFramebufferAttachmentParameterivEXT)
@@ -761,6 +776,7 @@
#define glGetUniformLocationARB MANGLE(GetUniformLocationARB)
#define glGetUniformLocation MANGLE(GetUniformLocation)
#define glGetUniformOffsetEXT MANGLE(GetUniformOffsetEXT)
#define glGetUniformui64vNV MANGLE(GetUniformui64vNV)
#define glGetUniformuivEXT MANGLE(GetUniformuivEXT)
#define glGetUniformuiv MANGLE(GetUniformuiv)
#define glGetVariantArrayObjectfvATI MANGLE(GetVariantArrayObjectfvATI)
@@ -788,6 +804,10 @@
#define glGetVertexAttribPointervARB MANGLE(GetVertexAttribPointervARB)
#define glGetVertexAttribPointerv MANGLE(GetVertexAttribPointerv)
#define glGetVertexAttribPointervNV MANGLE(GetVertexAttribPointervNV)
#define glGetVideoCaptureivNV MANGLE(GetVideoCaptureivNV)
#define glGetVideoCaptureStreamdvNV MANGLE(GetVideoCaptureStreamdvNV)
#define glGetVideoCaptureStreamfvNV MANGLE(GetVideoCaptureStreamfvNV)
#define glGetVideoCaptureStreamivNV MANGLE(GetVideoCaptureStreamivNV)
#define glGetVideoi64vNV MANGLE(GetVideoi64vNV)
#define glGetVideoivNV MANGLE(GetVideoivNV)
#define glGetVideoui64vNV MANGLE(GetVideoui64vNV)
@@ -812,6 +832,7 @@
#define glIndexd MANGLE(Indexd)
#define glIndexdv MANGLE(Indexdv)
#define glIndexf MANGLE(Indexf)
#define glIndexFormatNV MANGLE(IndexFormatNV)
#define glIndexFuncEXT MANGLE(IndexFuncEXT)
#define glIndexfv MANGLE(Indexfv)
#define glIndexi MANGLE(Indexi)
@@ -832,6 +853,7 @@
#define glIsAsyncMarkerSGIX MANGLE(IsAsyncMarkerSGIX)
#define glIsBufferARB MANGLE(IsBufferARB)
#define glIsBuffer MANGLE(IsBuffer)
#define glIsBufferResidentNV MANGLE(IsBufferResidentNV)
#define glIsEnabledi MANGLE(IsEnabledi)
#define glIsEnabledIndexedEXT MANGLE(IsEnabledIndexedEXT)
#define glIsEnabled MANGLE(IsEnabled)
@@ -840,6 +862,7 @@
#define glIsFramebufferEXT MANGLE(IsFramebufferEXT)
#define glIsFramebuffer MANGLE(IsFramebuffer)
#define glIsList MANGLE(IsList)
#define glIsNamedBufferResidentNV MANGLE(IsNamedBufferResidentNV)
#define glIsObjectBufferATI MANGLE(IsObjectBufferATI)
#define glIsOcclusionQueryNV MANGLE(IsOcclusionQueryNV)
#define glIsProgramARB MANGLE(IsProgramARB)
@@ -888,6 +911,8 @@
#define glLoadTransposeMatrixf MANGLE(LoadTransposeMatrixf)
#define glLockArraysEXT MANGLE(LockArraysEXT)
#define glLogicOp MANGLE(LogicOp)
#define glMakeBufferNonResidentNV MANGLE(MakeBufferNonResidentNV)
#define glMakeBufferResidentNV MANGLE(MakeBufferResidentNV)
#define glMap1d MANGLE(Map1d)
#define glMap1f MANGLE(Map1f)
#define glMap2d MANGLE(Map2d)
@@ -1060,6 +1085,8 @@
#define glNamedFramebufferTextureEXT MANGLE(NamedFramebufferTextureEXT)
#define glNamedFramebufferTextureFaceEXT MANGLE(NamedFramebufferTextureFaceEXT)
#define glNamedFramebufferTextureLayerEXT MANGLE(NamedFramebufferTextureLayerEXT)
#define glNamedMakeBufferNonResidentNV MANGLE(NamedMakeBufferNonResidentNV)
#define glNamedMakeBufferResidentNV MANGLE(NamedMakeBufferResidentNV)
#define glNamedProgramLocalParameter4dEXT MANGLE(NamedProgramLocalParameter4dEXT)
#define glNamedProgramLocalParameter4dvEXT MANGLE(NamedProgramLocalParameter4dvEXT)
#define glNamedProgramLocalParameter4fEXT MANGLE(NamedProgramLocalParameter4fEXT)
@@ -1091,6 +1118,7 @@
#define glNormal3iv MANGLE(Normal3iv)
#define glNormal3s MANGLE(Normal3s)
#define glNormal3sv MANGLE(Normal3sv)
#define glNormalFormatNV MANGLE(NormalFormatNV)
#define glNormalPointerEXT MANGLE(NormalPointerEXT)
#define glNormalPointerListIBM MANGLE(NormalPointerListIBM)
#define glNormalPointer MANGLE(NormalPointer)
@@ -1234,6 +1262,8 @@
#define glProgramUniformMatrix4fvEXT MANGLE(ProgramUniformMatrix4fvEXT)
#define glProgramUniformMatrix4x2fvEXT MANGLE(ProgramUniformMatrix4x2fvEXT)
#define glProgramUniformMatrix4x3fvEXT MANGLE(ProgramUniformMatrix4x3fvEXT)
#define glProgramUniformui64NV MANGLE(ProgramUniformui64NV)
#define glProgramUniformui64vNV MANGLE(ProgramUniformui64vNV)
#define glProgramVertexLimitNV MANGLE(ProgramVertexLimitNV)
#define glProvokingVertexEXT MANGLE(ProvokingVertexEXT)
#define glProvokingVertex MANGLE(ProvokingVertex)
@@ -1362,6 +1392,7 @@
#define glSecondaryColor3us MANGLE(SecondaryColor3us)
#define glSecondaryColor3usvEXT MANGLE(SecondaryColor3usvEXT)
#define glSecondaryColor3usv MANGLE(SecondaryColor3usv)
#define glSecondaryColorFormatNV MANGLE(SecondaryColorFormatNV)
#define glSecondaryColorPointerEXT MANGLE(SecondaryColorPointerEXT)
#define glSecondaryColorPointerListIBM MANGLE(SecondaryColorPointerListIBM)
#define glSecondaryColorPointer MANGLE(SecondaryColorPointer)
@@ -1475,6 +1506,7 @@
#define glTexCoord4iv MANGLE(TexCoord4iv)
#define glTexCoord4s MANGLE(TexCoord4s)
#define glTexCoord4sv MANGLE(TexCoord4sv)
#define glTexCoordFormatNV MANGLE(TexCoordFormatNV)
#define glTexCoordPointerEXT MANGLE(TexCoordPointerEXT)
#define glTexCoordPointerListIBM MANGLE(TexCoordPointerListIBM)
#define glTexCoordPointer MANGLE(TexCoordPointer)
@@ -1513,6 +1545,7 @@
#define glTexSubImage3DEXT MANGLE(TexSubImage3DEXT)
#define glTexSubImage3D MANGLE(TexSubImage3D)
#define glTexSubImage4DSGIS MANGLE(TexSubImage4DSGIS)
#define glTextureBarrierNV MANGLE(TextureBarrierNV)
#define glTextureBufferEXT MANGLE(TextureBufferEXT)
#define glTextureColorMaskSGIS MANGLE(TextureColorMaskSGIS)
#define glTextureImage1DEXT MANGLE(TextureImage1DEXT)
@@ -1601,6 +1634,8 @@
#define glUniformMatrix4fv MANGLE(UniformMatrix4fv)
#define glUniformMatrix4x2fv MANGLE(UniformMatrix4x2fv)
#define glUniformMatrix4x3fv MANGLE(UniformMatrix4x3fv)
#define glUniformui64NV MANGLE(Uniformui64NV)
#define glUniformui64vNV MANGLE(Uniformui64vNV)
#define glUnlockArraysEXT MANGLE(UnlockArraysEXT)
#define glUnmapBufferARB MANGLE(UnmapBufferARB)
#define glUnmapBuffer MANGLE(UnmapBuffer)
@@ -1609,6 +1644,7 @@
#define glUpdateObjectBufferATI MANGLE(UpdateObjectBufferATI)
#define glUseProgram MANGLE(UseProgram)
#define glUseProgramObjectARB MANGLE(UseProgramObjectARB)
#define glUseShaderProgramEXT MANGLE(UseShaderProgramEXT)
#define glValidateProgramARB MANGLE(ValidateProgramARB)
#define glValidateProgram MANGLE(ValidateProgram)
#define glVariantArrayObjectATI MANGLE(VariantArrayObjectATI)
@@ -1762,6 +1798,7 @@
#define glVertexAttrib4usv MANGLE(VertexAttrib4usv)
#define glVertexAttribArrayObjectATI MANGLE(VertexAttribArrayObjectATI)
#define glVertexAttribDivisorARB MANGLE(VertexAttribDivisorARB)
#define glVertexAttribFormatNV MANGLE(VertexAttribFormatNV)
#define glVertexAttribI1iEXT MANGLE(VertexAttribI1iEXT)
#define glVertexAttribI1i MANGLE(VertexAttribI1i)
#define glVertexAttribI1ivEXT MANGLE(VertexAttribI1ivEXT)
@@ -1802,6 +1839,7 @@
#define glVertexAttribI4uiv MANGLE(VertexAttribI4uiv)
#define glVertexAttribI4usvEXT MANGLE(VertexAttribI4usvEXT)
#define glVertexAttribI4usv MANGLE(VertexAttribI4usv)
#define glVertexAttribIFormatNV MANGLE(VertexAttribIFormatNV)
#define glVertexAttribIPointerEXT MANGLE(VertexAttribIPointerEXT)
#define glVertexAttribIPointer MANGLE(VertexAttribIPointer)
#define glVertexAttribPointerARB MANGLE(VertexAttribPointerARB)
@@ -1827,6 +1865,7 @@
#define glVertexBlendARB MANGLE(VertexBlendARB)
#define glVertexBlendEnvfATI MANGLE(VertexBlendEnvfATI)
#define glVertexBlendEnviATI MANGLE(VertexBlendEnviATI)
#define glVertexFormatNV MANGLE(VertexFormatNV)
#define glVertexPointerEXT MANGLE(VertexPointerEXT)
#define glVertexPointerListIBM MANGLE(VertexPointerListIBM)
#define glVertexPointer MANGLE(VertexPointer)
@@ -1868,6 +1907,10 @@
#define glVertexWeighthNV MANGLE(VertexWeighthNV)
#define glVertexWeighthvNV MANGLE(VertexWeighthvNV)
#define glVertexWeightPointerEXT MANGLE(VertexWeightPointerEXT)
#define glVideoCaptureNV MANGLE(VideoCaptureNV)
#define glVideoCaptureStreamParameterdvNV MANGLE(VideoCaptureStreamParameterdvNV)
#define glVideoCaptureStreamParameterfvNV MANGLE(VideoCaptureStreamParameterfvNV)
#define glVideoCaptureStreamParameterivNV MANGLE(VideoCaptureStreamParameterivNV)
#define glViewport MANGLE(Viewport)
#define glWaitSync MANGLE(WaitSync)
#define glWeightbvARB MANGLE(WeightbvARB)

View File

@@ -124,13 +124,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

@@ -120,7 +120,11 @@ static Engine Engines[NUM_ENGINES] =
0.3, /* CrankJournalRadius */
0.4, /* CrankJournalLength */
1.5, /* ConnectingRodLength */
0.1 /* ConnectingRodThickness */
0.1, /* ConnectingRodThickness */
0, /* CrankList */
0, /* ConnRodList */
0, /* PistonList */
0 /* BlockList */
},
{
"Inline-4",
@@ -136,7 +140,11 @@ static Engine Engines[NUM_ENGINES] =
0.3, /* CrankJournalRadius */
0.4, /* CrankJournalLength */
1.5, /* ConnectingRodLength */
0.1 /* ConnectingRodThickness */
0.1, /* ConnectingRodThickness */
0, /* CrankList */
0, /* ConnRodList */
0, /* PistonList */
0 /* BlockList */
},
{
"Boxer-6",
@@ -152,7 +160,11 @@ static Engine Engines[NUM_ENGINES] =
0.3, /* CrankJournalRadius */
0.4, /* CrankJournalLength */
1.5, /* ConnectingRodLength */
0.1 /* ConnectingRodThickness */
0.1, /* ConnectingRodThickness */
0, /* CrankList */
0, /* ConnRodList */
0, /* PistonList */
0 /* BlockList */
}
};

View File

@@ -14,7 +14,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "extfuncs.h"
/* For debug */

View File

@@ -6,6 +6,7 @@
* Humanware s.r.l.
*/
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
@@ -725,8 +726,13 @@ main(int ac, char **av)
maxage = 1.0 / dt;
if (ac == 2)
if (ac == 2) {
np = atoi(av[1]);
if (np <= 0 || np > 1000000) {
fprintf(stderr, "Invalid input.\n");
exit(-1);
}
}
if (ac == 4) {
WIDTH = atoi(av[2]);
@@ -759,7 +765,9 @@ main(int ac, char **av)
glFogfv(GL_FOG_COLOR, fogcolor);
glFogf(GL_FOG_DENSITY, 0.1);
assert(np > 0);
p = (part *) malloc(sizeof(part) * np);
assert(p);
for (i = 0; i < np; i++)
setnewpart(&p[i]);

View File

@@ -25,6 +25,7 @@
*/
#include <assert.h>
#include <math.h>
#include <stdlib.h>
#include <GL/glut.h>
@@ -129,8 +130,10 @@ Clear_Buffers ()
static void
LoadTriplet (TDA A)
{
int result;
Clear_Buffers ();
fscanf (mainfile, "%s %s %s %s", Buf1, Buf2, Buf3, Buf4);
result = fscanf (mainfile, "%s %s %s %s", Buf1, Buf2, Buf3, Buf4);
assert(result != EOF);
A[0] = atof (Buf2);
A[1] = atof (Buf3);
A[2] = atof (Buf4);
@@ -140,8 +143,10 @@ LoadTriplet (TDA A)
static void
LoadReal (float *a)
{
int result;
Clear_Buffers ();
fscanf (mainfile, "%s %s", Buf1, Buf2);
result = fscanf (mainfile, "%s %s", Buf1, Buf2);
assert(result != EOF);
*a = atof (Buf2);
}
@@ -149,8 +154,10 @@ LoadReal (float *a)
static void
LoadInteger (int *a)
{
int result;
Clear_Buffers ();
fscanf (mainfile, "%s %s", Buf1, Buf2);
result = fscanf (mainfile, "%s %s", Buf1, Buf2);
assert(result != EOF);
*a = atoi (Buf2);
}
@@ -158,8 +165,10 @@ LoadInteger (int *a)
static void
LoadText (char *a)
{
int result;
Clear_Buffers ();
fscanf (mainfile, "%s %s", Buf1, Buf2);
result = fscanf (mainfile, "%s %s", Buf1, Buf2);
assert(result != EOF);
strcpy (a, Buf2);
}
@@ -177,8 +186,10 @@ getdata (char filename[])
do
{
int result;
Clear_Buffers ();
fscanf (mainfile, "%s", Buf1);
result = fscanf (mainfile, "%s", Buf1);
(void) result;
if (ferror (mainfile))
{
printf ("\nError opening file !\n");

View File

@@ -27,7 +27,6 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#ifdef _WIN32
#include <windows.h>
@@ -132,9 +131,11 @@ static void read_surface( char *filename )
numverts = 0;
while (!feof(f) && numverts<maxverts) {
fscanf( f, "%f %f %f %f %f %f",
&data[numverts][0], &data[numverts][1], &data[numverts][2],
&data[numverts][3], &data[numverts][4], &data[numverts][5] );
int result;
result = fscanf( f, "%f %f %f %f %f %f",
&data[numverts][0], &data[numverts][1], &data[numverts][2],
&data[numverts][3], &data[numverts][4], &data[numverts][5] );
(void) result;
numverts++;
}
numverts--;

View File

@@ -137,7 +137,6 @@ So the angle is:
#endif
#include <GL/glut.h>
#include <math.h>
#include <string.h>
#define Scale 0.3

View File

@@ -38,7 +38,6 @@
#include <math.h>
#include <GL/glew.h>
#include <GL/glut.h>
#include "showbuffer.h"
#define DEG_TO_RAD (3.14159 / 180.0)

View File

@@ -8,6 +8,7 @@
* based on a Mikael SkiZoWalker's (MoDEL) / France (Skizo@Hol.Fr) demo
*/
#include <assert.h>
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
@@ -559,12 +560,14 @@ loadpic(void)
FILE *FilePic;
int i, tmp;
GLenum gluerr;
size_t result;
if ((FilePic = fopen("terrain.dat", "r")) == NULL) {
fprintf(stderr, "Error loading terrain.dat\n");
exit(-1);
}
fread(bufferter, 256 * 256, 1, FilePic);
result = fread(bufferter, 256 * 256, 1, FilePic);
assert(result == 1);
fclose(FilePic);
for (i = 0; i < (256 * 256); i++) {

View File

@@ -374,7 +374,8 @@ main(int argc, char *argv[])
EGLint screenAttribs[10];
EGLModeMESA mode[MAX_MODES];
EGLScreenMESA screen;
EGLint count, chosenMode;
EGLint count;
EGLint chosenMode = 0;
GLboolean printInfo = GL_FALSE;
EGLint width = 0, height = 0;

View File

@@ -52,7 +52,8 @@ main(int argc, char *argv[])
EGLint screenAttribs[10];
EGLModeMESA mode[MAX_MODES];
EGLScreenMESA screen;
EGLint count, chosenMode;
EGLint count;
EGLint chosenMode = 0;
EGLint width = 0, height = 0;
d = eglGetDisplay(EGL_DEFAULT_DISPLAY);

View File

@@ -17,7 +17,6 @@ SOURCES = \
tri-depth2.c \
tri-depthwrite.c \
tri-depthwrite2.c \
tri-inv.c \
tri-param.c \
fp-tri.c

View File

@@ -17,7 +17,6 @@ progs = [
'tri-depth2',
'tri-depthwrite',
'tri-depthwrite2',
'tri-inv',
'tri-param',
'tri-tex',
'point-position',

View File

@@ -1,111 +0,0 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <GL/glew.h>
#include <GL/glut.h>
static void Init( void )
{
static const char *modulate2D =
"!!ARBfp1.0\n"
"TEMP R0;\n"
"INV result.color, fragment.color; \n"
"END"
;
GLuint modulateProg;
if (!GLEW_ARB_fragment_program) {
printf("Error: GL_ARB_fragment_program not supported!\n");
exit(1);
}
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
/* Setup the fragment program */
glGenProgramsARB(1, &modulateProg);
glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
strlen(modulate2D), (const GLubyte *)modulate2D);
printf("glGetError = 0x%x\n", (int) glGetError());
printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
(char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
glEnable(GL_FRAGMENT_PROGRAM_ARB);
glClearColor(.3, .3, .3, 0);
}
static void Reshape(int width, int height)
{
glViewport(0, 0, (GLint)width, (GLint)height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
glMatrixMode(GL_MODELVIEW);
}
static void Key(unsigned char key, int x, int y)
{
switch (key) {
case 27:
exit(1);
default:
break;
}
glutPostRedisplay();
}
static void Draw(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_TRIANGLES);
glColor3f(0,0,1);
glVertex3f( 0.9, -0.9, -30.0);
glColor3f(1,0,0);
glVertex3f( 0.9, 0.9, -30.0);
glColor3f(0,1,0);
glVertex3f(-0.9, 0.0, -30.0);
glEnd();
glFlush();
}
int main(int argc, char **argv)
{
GLenum type;
glutInit(&argc, argv);
glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
type = GLUT_RGB;
type |= GLUT_SINGLE;
glutInitDisplayMode(type);
if (glutCreateWindow("First Tri") == GL_FALSE) {
exit(1);
}
glewInit();
Init();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Draw);
glutMainLoop();
return 0;
}

View File

@@ -182,7 +182,7 @@ static void fillConvolution(GLint *k,
static void setupConvolution()
{
GLint *kernel = (GLint*)malloc(sizeof(GLint) * 9);
GLfloat scale;
GLfloat scale = 0.0;
GLfloat *vecKer = (GLfloat*)malloc(sizeof(GLfloat) * 9 * 4);
GLuint loc;
GLuint i;

View File

@@ -29,7 +29,6 @@
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -492,9 +491,8 @@ ReadConfigFile(const char *filename, struct config_file *conf)
conf->num_uniforms = 0;
/* ugly but functional parser */
while (!feof(f)) {
fgets(line, sizeof(line), f);
if (!feof(f) && line[0]) {
while (fgets(line, sizeof(line), f) != NULL) {
if (line[0]) {
if (strncmp(line, "vs ", 3) == 0) {
VertShaderFile = strdup(line + 3);
VertShaderFile[strlen(VertShaderFile) - 1] = 0;
@@ -550,6 +548,10 @@ ReadConfigFile(const char *filename, struct config_file *conf)
type = TypeFromName(typeName);
if (strlen(name) + 1 > sizeof(conf->uniforms[conf->num_uniforms].name)) {
fprintf(stderr, "string overflow\n");
exit(1);
}
strcpy(conf->uniforms[conf->num_uniforms].name, name);
conf->uniforms[conf->num_uniforms].value[0] = v1;
conf->uniforms[conf->num_uniforms].value[1] = v2;

View File

@@ -40,15 +40,6 @@ static GLboolean Anim = GL_TRUE;
static GLboolean WireFrame = GL_TRUE;
static GLfloat xRot = -70.0f, yRot = 0.0f, zRot = 0.0f;
/* value[0] = tex unit */
static struct uniform_info Uniforms[] = {
{ "tex1", 1, GL_SAMPLER_2D, { 0, 0, 0, 0 }, -1 },
END_OF_UNIFORMS
};
static void
Idle(void)
{

View File

@@ -29,7 +29,7 @@
#include "rbug/rbug.h"
static void wait()
static void rbug_wait()
{
int s = u_socket_listen_on_port(13370);
int c = u_socket_accept(s);
@@ -57,6 +57,6 @@ static void wait()
int main(int argc, char** argv)
{
wait();
rbug_wait();
return 0;
}

View File

@@ -45,7 +45,6 @@
#include <GL/glut.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
GLboolean polySmooth = GL_TRUE;

View File

@@ -74,7 +74,7 @@ int iters[RINGS];
GLuint theTorus;
void FillTorus(float rc, int numc, float rt, int numt)
static void FillTorus(float rc, int numc, float rt, int numt)
{
int i, j, k;
double s, t;
@@ -106,7 +106,7 @@ void FillTorus(float rc, int numc, float rt, int numt)
}
}
float Clamp(int iters_left, float t)
static float Clamp(int iters_left, float t)
{
if (iters_left < 3) {
return 0.0;
@@ -114,7 +114,7 @@ float Clamp(int iters_left, float t)
return (iters_left-2)*t/iters_left;
}
void DrawScene(void)
static void DrawScene(void)
{
int i, j;
GLboolean goIdle;
@@ -172,7 +172,7 @@ void DrawScene(void)
}
}
float MyRand(void)
static float MyRand(void)
{
return 10.0 * ( (float) rand() / (float) RAND_MAX - 0.5 );
}
@@ -181,12 +181,12 @@ float MyRand(void)
#define GLUTCALLBACK
#endif
void GLUTCALLBACK glut_post_redisplay_p(void)
static void GLUTCALLBACK glut_post_redisplay_p(void)
{
glutPostRedisplay();
}
void ReInit(void)
static void ReInit(void)
{
int i;
float deviation;
@@ -206,7 +206,7 @@ void ReInit(void)
glutIdleFunc(glut_post_redisplay_p);
}
void Init(void)
static void Init(void)
{
float base, height;
float aspect, x, y;
@@ -312,13 +312,13 @@ void Init(void)
glMatrixMode(GL_MODELVIEW);
}
void Reshape(int width, int height)
static void Reshape(int width, int height)
{
glViewport(0, 0, width, height);
}
void Key(unsigned char key, int x, int y)
static void Key(unsigned char key, int x, int y)
{
switch (key) {
@@ -330,7 +330,7 @@ void Key(unsigned char key, int x, int y)
}
}
GLenum Args(int argc, char **argv)
static GLenum Args(int argc, char **argv)
{
GLint i;

View File

@@ -69,19 +69,19 @@ starRec stars[MAXSTARS];
float sinTable[MAXANGLES];
float Sin(float angle)
static float Sin(float angle)
{
return (sinTable[(GLint)angle]);
}
float Cos(float angle)
static float Cos(float angle)
{
return (sinTable[((GLint)angle+(MAXANGLES/4))%MAXANGLES]);
}
void NewStar(GLint n, GLint d)
static void NewStar(GLint n, GLint d)
{
if (rand()%4 == 0) {
@@ -103,7 +103,7 @@ void NewStar(GLint n, GLint d)
}
}
void RotatePoint(float *x, float *y, float rotation)
static void RotatePoint(float *x, float *y, float rotation)
{
float tmpX, tmpY;
@@ -113,7 +113,7 @@ void RotatePoint(float *x, float *y, float rotation)
*y = tmpY;
}
void MoveStars(void)
static void MoveStars(void)
{
float offset;
GLint n;
@@ -134,7 +134,7 @@ void MoveStars(void)
}
}
GLenum StarPoint(GLint n)
static GLenum StarPoint(GLint n)
{
float x0, y0, x1, y1, width;
GLint i;
@@ -182,7 +182,7 @@ GLenum StarPoint(GLint n)
}
}
void ShowStars(void)
static void ShowStars(void)
{
GLint n;
@@ -221,7 +221,7 @@ static void Init(void)
glDisable(GL_DITHER);
}
void Reshape(int width, int height)
static void Reshape(int width, int height)
{
windW = (GLint)width;
@@ -262,7 +262,7 @@ static void Key(unsigned char key, int x, int y)
}
}
void Idle(void)
static void Idle(void)
{
if (overlayInit == GL_FALSE) {

View File

@@ -3,6 +3,7 @@
/* texload is a simplistic routine for reading an SGI .rgb image file. */
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -25,7 +26,7 @@ typedef struct _ImageRec {
int *rowSize;
} ImageRec;
void
static void
rgbtorgb(unsigned char *r,unsigned char *g,unsigned char *b,unsigned char *l,int n) {
while(n--) {
l[0] = r[0];
@@ -72,6 +73,7 @@ static ImageRec *ImageOpen(char *fileName)
ImageRec *image;
int swapFlag;
int x;
int result;
endianTest.testWord = 1;
if (endianTest.testByte[0] == 1) {
@@ -90,7 +92,8 @@ static ImageRec *ImageOpen(char *fileName)
return NULL;
}
fread(image, 1, 12, image->file);
result = fread(image, 1, 12, image->file);
assert(result == 12);
if (swapFlag) {
ConvertShort(&image->imagic, 1);
@@ -117,8 +120,10 @@ static ImageRec *ImageOpen(char *fileName)
}
image->rleEnd = 512 + (2 * x);
fseek(image->file, 512, SEEK_SET);
fread(image->rowStart, 1, x, image->file);
fread(image->rowSize, 1, x, image->file);
result = fread(image->rowStart, 1, x, image->file);
assert(result == x);
result = fread(image->rowSize, 1, x, image->file);
assert(result == x);
if (swapFlag) {
ConvertUint(image->rowStart, x/(int) sizeof(unsigned));
ConvertUint((unsigned *)image->rowSize, x/(int) sizeof(int));
@@ -138,11 +143,13 @@ static void
ImageGetRow(ImageRec *image, unsigned char *buf, int y, int z) {
unsigned char *iPtr, *oPtr, pixel;
int count;
int result;
if ((image->type & 0xFF00) == 0x0100) {
fseek(image->file, (long) image->rowStart[y+z*image->ysize], SEEK_SET);
fread(image->tmp, 1, (unsigned int)image->rowSize[y+z*image->ysize],
image->file);
result = fread(image->tmp, 1, (unsigned int)image->rowSize[y+z*image->ysize],
image->file);
assert(result == (unsigned int)image->rowSize[y+z*image->ysize]);
iPtr = image->tmp;
oPtr = buf;
@@ -166,11 +173,13 @@ ImageGetRow(ImageRec *image, unsigned char *buf, int y, int z) {
} else {
fseek(image->file, 512+(y*image->xsize)+(z*image->xsize*image->ysize),
SEEK_SET);
fread(buf, 1, image->xsize, image->file);
result = fread(buf, 1, image->xsize, image->file);
assert(result == image->xsize);
}
}
GLubyte *
#if 0
static GLubyte *
read_alpha_texture(char *name, int *width, int *height)
{
unsigned char *base, *lptr;
@@ -199,8 +208,9 @@ read_alpha_texture(char *name, int *width, int *height)
return (unsigned char *) base;
}
#endif
GLubyte *
static GLubyte *
read_rgb_texture(char *name, int *width, int *height)
{
unsigned char *base, *ptr;
@@ -261,7 +271,8 @@ read_rgb_texture(char *name, int *width, int *height)
int main(int argc, char **argv)
{
int width, height;
int width = 0;
int height = 0;
GLubyte *data;
char buff[32];
int n;

View File

@@ -445,7 +445,7 @@ GLfloat identity[16] = {
};
void BuildCylinder(int numEdges)
static void BuildCylinder(int numEdges)
{
int i, top = 1.0, bottom = -1.0;
float x[100], y[100], angle;
@@ -481,7 +481,7 @@ void BuildCylinder(int numEdges)
glEndList();
}
void BuildTorus(float rc, int numc, float rt, int numt)
static void BuildTorus(float rc, int numc, float rt, int numt)
{
int i, j, k;
double s, t;
@@ -515,7 +515,7 @@ void BuildTorus(float rc, int numc, float rt, int numt)
glEndList();
}
void BuildCage(void)
static void BuildCage(void)
{
int i;
float inc;
@@ -609,7 +609,7 @@ void BuildCage(void)
glEndList();
}
void BuildCube(void)
static void BuildCube(void)
{
int i, j;
@@ -628,7 +628,7 @@ void BuildCube(void)
glEndList();
}
void BuildLists(void)
static void BuildLists(void)
{
cube = glGenLists(1);
@@ -646,7 +646,7 @@ void BuildLists(void)
genericObject = torus;
}
void SetDefaultSettings(void)
static void SetDefaultSettings(void)
{
magFilter = nnearest;
@@ -657,7 +657,7 @@ void SetDefaultSettings(void)
autoRotate = GL_TRUE;
}
unsigned char *AlphaPadImage(int bufSize, unsigned char *inData, int alpha)
static unsigned char *AlphaPadImage(int bufSize, unsigned char *inData, int alpha)
{
unsigned char *outData, *out_ptr, *in_ptr;
int i;
@@ -677,7 +677,7 @@ unsigned char *AlphaPadImage(int bufSize, unsigned char *inData, int alpha)
return outData;
}
void Init(void)
static void Init(void)
{
float ambient[] = {0.0, 0.0, 0.0, 1.0};
float diffuse[] = {1.0, 1.0, 1.0, 1.0};
@@ -753,7 +753,7 @@ void Init(void)
BuildLists();
}
void ReInit(void)
static void ReInit(void)
{
if (genericObject == torus) {
glEnable(GL_DEPTH_TEST);
@@ -773,7 +773,7 @@ void ReInit(void)
glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, textureEnvironment);
}
void Draw(void)
static void Draw(void)
{
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
@@ -806,7 +806,7 @@ void Draw(void)
glutSwapBuffers();
}
void Reshape(int width, int height)
static void Reshape(int width, int height)
{
W = width;
H = height;
@@ -818,7 +818,7 @@ void Reshape(int width, int height)
glMatrixMode(GL_MODELVIEW);
}
void Idle(void)
static void Idle(void)
{
static double t0 = -1.;
double t, dt;
@@ -833,7 +833,7 @@ void Idle(void)
glutPostRedisplay();
}
void Key2(int key, int x, int y)
static void Key2(int key, int x, int y)
{
switch (key) {
@@ -863,7 +863,7 @@ void Key2(int key, int x, int y)
glutPostRedisplay();
}
void Key(unsigned char key, int x, int y)
static void Key(unsigned char key, int x, int y)
{
switch (key) {
@@ -950,7 +950,7 @@ void Key(unsigned char key, int x, int y)
glutPostRedisplay();
}
GLenum Args(int argc, char **argv)
static GLenum Args(int argc, char **argv)
{
GLint i;

View File

@@ -67,19 +67,19 @@ starRec stars[MAXSTARS];
float sinTable[MAXANGLES];
float Sin(float angle)
static float Sin(float angle)
{
return (sinTable[(GLint)angle]);
}
float Cos(float angle)
static float Cos(float angle)
{
return (sinTable[((GLint)angle+(MAXANGLES/4))%MAXANGLES]);
}
void NewStar(GLint n, GLint d)
static void NewStar(GLint n, GLint d)
{
if (rand()%4 == 0) {
@@ -101,7 +101,7 @@ void NewStar(GLint n, GLint d)
}
}
void RotatePoint(float *x, float *y, float rotation)
static void RotatePoint(float *x, float *y, float rotation)
{
float tmpX, tmpY;
@@ -111,7 +111,7 @@ void RotatePoint(float *x, float *y, float rotation)
*y = tmpY;
}
void MoveStars(void)
static void MoveStars(void)
{
float offset;
GLint n;
@@ -142,7 +142,7 @@ void MoveStars(void)
}
}
GLenum StarPoint(GLint n)
static GLenum StarPoint(GLint n)
{
float x0, y0, x1, y1, width;
GLint i;
@@ -190,7 +190,7 @@ GLenum StarPoint(GLint n)
}
}
void ShowStars(void)
static void ShowStars(void)
{
GLint n;
@@ -229,7 +229,7 @@ static void Init(void)
glDisable(GL_DITHER);
}
void Reshape(int width, int height)
static void Reshape(int width, int height)
{
windW = (GLint)width;
@@ -260,7 +260,7 @@ static void Key(unsigned char key, int x, int y)
}
}
void Draw(void)
static void Draw(void)
{
MoveStars();
@@ -307,7 +307,7 @@ static GLenum Args(int argc, char **argv)
#define GLUTCALLBACK
#endif
void GLUTCALLBACK glut_post_redisplay_p(void)
static void GLUTCALLBACK glut_post_redisplay_p(void)
{
glutPostRedisplay();
}

View File

@@ -67,7 +67,7 @@ int cCount, cIndex[2], cStep;
GLenum op = OP_NOOP;
void DrawImage(void)
static void DrawImage(void)
{
glRasterPos2i(0, 0);
@@ -84,7 +84,7 @@ void DrawImage(void)
image->data);
}
void DrawPoint(void)
static void DrawPoint(void)
{
int i;
@@ -102,7 +102,7 @@ void DrawPoint(void)
}
}
void InitVList(void)
static void InitVList(void)
{
vList[0].x = 0.0;
@@ -141,7 +141,7 @@ void InitVList(void)
vList[4].tY = cList[0].y / (float)imageSizeY;
}
void ScaleImage(int sizeX, int sizeY)
static void ScaleImage(int sizeX, int sizeY)
{
GLubyte *buf;
@@ -154,7 +154,7 @@ void ScaleImage(int sizeX, int sizeY)
image->sizeY = sizeY;
}
void SetPoint(int x, int y)
static void SetPoint(int x, int y)
{
cList[cCount].x = (float)x;
@@ -162,7 +162,7 @@ void SetPoint(int x, int y)
cCount++;
}
void Stretch(void)
static void Stretch(void)
{
glBegin(GL_TRIANGLES);
@@ -221,7 +221,7 @@ void Stretch(void)
}
}
void Key(unsigned char key, int x, int y)
static void Key(unsigned char key, int x, int y)
{
switch (key) {
@@ -245,7 +245,7 @@ void Key(unsigned char key, int x, int y)
glutPostRedisplay();
}
void Mouse(int button, int state, int mouseX, int mouseY)
static void Mouse(int button, int state, int mouseX, int mouseY)
{
if (state != GLUT_DOWN)
@@ -263,7 +263,7 @@ void Mouse(int button, int state, int mouseX, int mouseY)
glutPostRedisplay();
}
void Animate(void)
static void Animate(void)
{
static double t0 = -1.;
double t, dt;
@@ -322,7 +322,7 @@ static GLenum Args(int argc, char **argv)
#define GLUTCALLBACK
#endif
void GLUTCALLBACK glut_post_redisplay_p(void)
static void GLUTCALLBACK glut_post_redisplay_p(void)
{
glutPostRedisplay();
}

View File

@@ -92,7 +92,7 @@ GLubyte contourTexture2[] = {
#endif
void GLUTCALLBACK glut_post_redisplay_p(void)
static void GLUTCALLBACK glut_post_redisplay_p(void)
{
static double t0 = -1.;
double t, dt;

View File

@@ -660,8 +660,8 @@ exercise_CompressedTextures(GLenum dimension)
glGetTexLevelParameteriv(dimension, 0, GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB,
&queryCompressedSize);
if (queryCompressedSize != sizeof(compressedTexture)) {
fprintf(stderr, "%s: compressed 3D texture changed size: expected %d, actual %d\n",
__FUNCTION__, sizeof(compressedTexture), queryCompressedSize);
fprintf(stderr, "%s: compressed 3D texture changed size: expected %lu, actual %d\n",
__FUNCTION__, (unsigned long) sizeof(compressedTexture), queryCompressedSize);
return GL_FALSE;
}
(*GetCompressedTexImageARB)(dimension, 0, queryCompressedData);
@@ -1188,7 +1188,7 @@ exercise_buffer_objects(enum Map_Buffer_Usage usage)
GLuint bufferID;
GLint bufferMapped;
static GLubyte data[BUFFER_DATA_SIZE] = {0};
float *dataPtr;
float *dataPtr = NULL;
/* Get the function pointers we need. These are from
* GL_ARB_vertex_buffer_object and are required in all

View File

@@ -105,7 +105,7 @@ static const unsigned indicies[12] = {
1, 4, 2
};
#define NONE { NULL, 0, 0, 0 }
#define NONE { NULL, 0, 0, 0, sizeof( NULL ) }
#define V2F { v, 2, 2 * sizeof( GLfloat ), GL_FLOAT, sizeof( v[0] ) }
#define V3F { v, 3, 3 * sizeof( GLfloat ), GL_FLOAT, sizeof( v[0] ) }
#define V4F { v, 4, 4 * sizeof( GLfloat ), GL_FLOAT, sizeof( v[0] ) }

View File

@@ -273,7 +273,6 @@ Draw(void)
glTranslatef(2, (i + 1) * (h + 2), 0);
glRasterPos2i(8, 6);
sprintf(s, "Internal Texture Format [f/F]: %s (%d of %lu)",
IntFormats[CurFormat].name, CurFormat + 1, NUM_INT_FORMATS);
IntFormats[CurFormat].name, CurFormat + 1, (unsigned long) NUM_INT_FORMATS);
PrintString(s);
glPopMatrix();

View File

@@ -71,7 +71,7 @@ static struct wrap_mode modes[] = {
WRAP_EXT ( GL_MIRROR_CLAMP_TO_EDGE_EXT, "GL_ATI_texture_mirror_once",
"GL_EXT_texture_mirror_clamp",
999.0 ),
{ 0 }
{ 0, NULL, GL_FALSE, 0.0, { NULL, NULL } }
};
static void

View File

@@ -8,7 +8,6 @@
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
@@ -37,13 +36,16 @@ static void read_surface( char *filename )
}
numverts = 0;
while (!feof(f) && numverts < MAXVERTS) {
fscanf( f, "%f %f %f %f %f %f",
&data[numverts][0], &data[numverts][1], &data[numverts][2],
&data[numverts][3], &data[numverts][4], &data[numverts][5] );
while (numverts < MAXVERTS) {
int result;
result = fscanf( f, "%f %f %f %f %f %f",
&data[numverts][0], &data[numverts][1], &data[numverts][2],
&data[numverts][3], &data[numverts][4], &data[numverts][5] );
if (result == EOF) {
break;
}
numverts++;
}
numverts--;
printf("%d vertices, %d triangles\n", numverts, numverts-2);
printf("data = %p\n", (void *) data);
@@ -180,7 +182,7 @@ static void init_program(void)
static const GLfloat bias[4] = {1.0, 1.0, 1.0, 0.0};
if (!glutExtensionSupported("GL_NV_vertex_program")) {
printf("Sorry, this program requires GL_NV_vertex_program");
printf("Sorry, this program requires GL_NV_vertex_program\n");
exit(1);
}

View File

@@ -6,8 +6,6 @@
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
/* For debug */

View File

@@ -6,8 +6,6 @@
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
/* For debug */

View File

@@ -9,6 +9,7 @@
#include <GL/gl.h>
#include <GL/glu.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -89,6 +90,7 @@ static rawImageRec *RawImageOpen(const char *fileName)
rawImageRec *raw;
GLenum swapFlag;
int x;
size_t result;
endianTest.testWord = 1;
if (endianTest.testByte[0] == 1) {
@@ -114,7 +116,8 @@ static rawImageRec *RawImageOpen(const char *fileName)
}
}
fread(raw, 1, 12, raw->file);
result = fread(raw, 1, 12, raw->file);
assert(result == 12);
if (swapFlag) {
ConvertShort(&raw->imagic, 1);
@@ -162,8 +165,10 @@ static rawImageRec *RawImageOpen(const char *fileName)
}
raw->rleEnd = 512 + (2 * x);
fseek(raw->file, 512, SEEK_SET);
fread(raw->rowStart, 1, x, raw->file);
fread(raw->rowSize, 1, x, raw->file);
result = fread(raw->rowStart, 1, x, raw->file);
assert(result == x);
result = fread(raw->rowSize, 1, x, raw->file);
assert(result == x);
if (swapFlag) {
ConvertLong(raw->rowStart, (long) (x/sizeof(GLuint)));
ConvertLong((GLuint *)raw->rowSize, (long) (x/sizeof(GLint)));
@@ -193,11 +198,13 @@ static void RawImageGetRow(rawImageRec *raw, unsigned char *buf, int y, int z)
{
unsigned char *iPtr, *oPtr, pixel;
int count, done = 0;
size_t result;
if ((raw->type & 0xFF00) == 0x0100) {
fseek(raw->file, (long) raw->rowStart[y+z*raw->sizeY], SEEK_SET);
fread(raw->tmp, 1, (unsigned int)raw->rowSize[y+z*raw->sizeY],
raw->file);
result = fread(raw->tmp, 1, (unsigned int)raw->rowSize[y+z*raw->sizeY],
raw->file);
assert(result == (unsigned int)raw->rowSize[y+z*raw->sizeY]);
iPtr = raw->tmp;
oPtr = buf;
@@ -222,7 +229,8 @@ static void RawImageGetRow(rawImageRec *raw, unsigned char *buf, int y, int z)
} else {
fseek(raw->file, 512+(y*raw->sizeX)+(z*raw->sizeX*raw->sizeY),
SEEK_SET);
fread(buf, 1, raw->sizeX, raw->file);
result = fread(buf, 1, raw->sizeX, raw->file);
assert(result == raw->sizeX);
}
}

View File

@@ -96,7 +96,8 @@ static void Init( void )
exit(1);
}
sz = (GLuint) fread(buf, 1, sizeof(buf), f);
sz = (GLuint) fread(buf, 1, sizeof(buf) - 1, f);
buf[sizeof(buf) - 1] = '\0';
if (!feof(f)) {
fprintf(stderr, "file too long\n");
fclose(f);

View File

@@ -20,7 +20,6 @@
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <X11/keysym.h>
#include <unistd.h>
#include "ipc.h"

View File

@@ -89,7 +89,7 @@ static char optstr[] = "w:h:s:v";
enum sync_type {
none = 0,
sgi_video_sync,
buffer_swap,
buffer_swap
};
static void usage(char *name)

View File

@@ -771,6 +771,7 @@ main(int argc, char *argv[])
glDeleteLists(gear1, 1);
glDeleteLists(gear2, 1);
glDeleteLists(gear3, 1);
glXMakeCurrent(dpy, None, NULL);
glXDestroyContext(dpy, ctx);
XDestroyWindow(dpy, win);
XCloseDisplay(dpy);

View File

@@ -145,14 +145,40 @@ AddHead(const char *displayName)
/* save the info for this head */
{
struct head *h = &Heads[NumHeads];
const char * tmp;
if (strlen(displayName) + 1 > sizeof(h->DisplayName)) {
Error(displayName, "displayName string length overflow");
return NULL;
}
strcpy(h->DisplayName, displayName);
h->Dpy = dpy;
h->Win = win;
h->Context = ctx;
h->Angle = 0.0;
strcpy(h->Version, (char *) glGetString(GL_VERSION));
strcpy(h->Vendor, (char *) glGetString(GL_VENDOR));
strcpy(h->Renderer, (char *) glGetString(GL_RENDERER));
tmp = (char *) glGetString(GL_VERSION);
if (strlen(tmp) + 1 > sizeof(h->Version)) {
Error(displayName, "GL_VERSION string length overflow");
return NULL;
}
strcpy(h->Version, tmp);
tmp = (char *) glGetString(GL_VENDOR);
if (strlen(tmp) + 1 > sizeof(h->Vendor)) {
Error(displayName, "GL_VENDOR string length overflow");
return NULL;
}
strcpy(h->Vendor, tmp);
tmp = (char *) glGetString(GL_RENDERER);
if (strlen(tmp) + 1 > sizeof(h->Renderer)) {
Error(displayName, "GL_RENDERER string length overflow");
return NULL;
}
strcpy(h->Renderer, tmp);
NumHeads++;
return &Heads[NumHeads-1];
}

View File

@@ -171,7 +171,7 @@ print_program_limits(GLenum target)
GLenum token;
const char *name;
};
static const struct token_name limits[] = {
static const struct token_name common_limits[] = {
{ GL_MAX_PROGRAM_INSTRUCTIONS_ARB, "GL_MAX_PROGRAM_INSTRUCTIONS_ARB" },
{ GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB, "GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB" },
{ GL_MAX_PROGRAM_TEMPORARIES_ARB, "GL_MAX_PROGRAM_TEMPORARIES_ARB" },
@@ -184,6 +184,9 @@ print_program_limits(GLenum target)
{ GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB, "GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB" },
{ GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB, "GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB" },
{ GL_MAX_PROGRAM_ENV_PARAMETERS_ARB, "GL_MAX_PROGRAM_ENV_PARAMETERS_ARB" },
{ (GLenum) 0, NULL }
};
static const struct token_name fragment_limits[] = {
{ GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB, "GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB" },
{ GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB, "GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB" },
{ GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB, "GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB" },
@@ -192,8 +195,10 @@ print_program_limits(GLenum target)
{ GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB, "GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB" },
{ (GLenum) 0, NULL }
};
PFNGLGETPROGRAMIVARBPROC GetProgramivARB_func = (PFNGLGETPROGRAMIVARBPROC)
glXGetProcAddressARB((GLubyte *) "glGetProgramivARB");
GLint max[1];
int i;
@@ -207,10 +212,18 @@ print_program_limits(GLenum target)
return; /* something's wrong */
}
for (i = 0; limits[i].token; i++) {
GetProgramivARB_func(target, limits[i].token, max);
for (i = 0; common_limits[i].token; i++) {
GetProgramivARB_func(target, common_limits[i].token, max);
if (glGetError() == GL_NO_ERROR) {
printf(" %s = %d\n", limits[i].name, max[0]);
printf(" %s = %d\n", common_limits[i].name, max[0]);
}
}
if (target == GL_FRAGMENT_PROGRAM_ARB) {
for (i = 0; fragment_limits[i].token; i++) {
GetProgramivARB_func(target, fragment_limits[i].token, max);
if (glGetError() == GL_NO_ERROR) {
printf(" %s = %d\n", fragment_limits[i].name, max[0]);
}
}
}
#endif /* GL_ARB_vertex_program / GL_ARB_fragment_program */

View File

@@ -177,14 +177,40 @@ AddHead(const char *displayName, const char *name)
/* save the info for this head */
{
struct head *h = &Heads[NumHeads];
const char * tmp;
if (strlen(name) + 1 > sizeof(h->DisplayName)) {
Error(displayName, "name string overflow");
return NULL;
}
strcpy(h->DisplayName, name);
h->Dpy = dpy;
h->Win = win;
h->Context = ctx;
h->Angle = 0.0;
strcpy(h->Version, (char *) glGetString(GL_VERSION));
strcpy(h->Vendor, (char *) glGetString(GL_VENDOR));
strcpy(h->Renderer, (char *) glGetString(GL_RENDERER));
tmp = (char *) glGetString(GL_VERSION);
if (strlen(tmp) + 1 > sizeof(h->Version)) {
Error(displayName, "GL_VERSION string overflow");
return NULL;
}
strcpy(h->Version, tmp);
tmp = (char *) glGetString(GL_VENDOR);
if (strlen(tmp) + 1 > sizeof(h->Vendor)) {
Error(displayName, "GL_VENDOR string overflow");
return NULL;
}
strcpy(h->Vendor, tmp);
tmp = (char *) glGetString(GL_RENDERER);
if (strlen(tmp) + 1 > sizeof(h->Renderer)) {
Error(displayName, "GL_RENDERER string overflow");
return NULL;
}
strcpy(h->Renderer, tmp);
NumHeads++;
return &Heads[NumHeads-1];
}
@@ -374,6 +400,8 @@ main(int argc, char *argv[])
}
if (n < 1)
n = 1;
if (n > MAX_HEADS)
n = MAX_HEADS;
printf("%d windows\n", n);
for (i = 0; i < n; i++) {

View File

@@ -174,6 +174,10 @@ AddWindow(Display *dpy, const char *displayName, int xpos, int ypos,
{
static int id = 0;
struct window *h = &Windows[NumWindows];
if (strlen(displayName) + 1 > sizeof(h->DisplayName)) {
Error(displayName, "string overflow");
return NULL;
}
strcpy(h->DisplayName, displayName);
h->Dpy = dpy;
h->Win = win;

View File

@@ -53,6 +53,7 @@ prefixes = SCons.Util.Split("""
i486-mingw32msvc-
i586-mingw32msvc-
i686-mingw32msvc-
i686-pc-mingw32-
""")
def find(env):

View File

@@ -235,7 +235,9 @@ def generate(env):
# different scons versions building the same source file
env['build'] = build_dir
env.SConsignFile(os.path.join(build_dir, '.sconsign'))
env.CacheDir('build/cache')
if 'SCONS_CACHE_DIR' in os.environ:
print 'scons: Using build cache in %s.' % (os.environ['SCONS_CACHE_DIR'],)
env.CacheDir(os.environ['SCONS_CACHE_DIR'])
# Parallel build
if env.GetOption('num_jobs') <= 1:
@@ -255,8 +257,9 @@ def generate(env):
'_WINDOWS',
#'_UNICODE',
#'UNICODE',
('_WIN32_WINNT', '0x0501'), # minimum required OS version
('WINVER', '0x0501'),
# http://msdn.microsoft.com/en-us/library/aa383745.aspx
('_WIN32_WINNT', '0x0601'),
('WINVER', '0x0601'),
# http://msdn2.microsoft.com/en-us/library/6dwk3a1z.aspx,
'WIN32_LEAN_AND_MEAN',
]
@@ -476,7 +479,10 @@ def generate(env):
'-Wl,-Bsymbolic',
]
# Handle circular dependencies in the libraries
env['_LIBFLAGS'] = '-Wl,--start-group ' + env['_LIBFLAGS'] + ' -Wl,--end-group'
if env['platform'] in ('darwin'):
pass
else:
env['_LIBFLAGS'] = '-Wl,--start-group ' + env['_LIBFLAGS'] + ' -Wl,--end-group'
if msvc:
if not env['debug']:
# enable Link-time Code Generation

View File

@@ -34,10 +34,7 @@
#include "util/u_memory.h"
#include "util/u_math.h"
#include "draw_context.h"
#include "draw_vbuf.h"
#include "draw_vs.h"
#include "draw_pt.h"
#include "draw_pipe.h"
struct draw_context *draw_create( void )

View File

@@ -106,10 +106,9 @@ void draw_pipeline_destroy( struct draw_context *draw )
/**
* Build primitive to render a point with vertex at v0.
*/
static void do_point( struct draw_context *draw,
const char *v0 )
{
@@ -123,6 +122,10 @@ static void do_point( struct draw_context *draw,
}
/**
* Build primitive to render a line with vertices at v0, v1.
* \param flags bitmask of DRAW_PIPE_EDGE_x, DRAW_PIPE_RESET_STIPPLE
*/
static void do_line( struct draw_context *draw,
ushort flags,
const char *v0,
@@ -139,6 +142,10 @@ static void do_line( struct draw_context *draw,
}
/**
* Build primitive to render a triangle with vertices at v0, v1, v2.
* \param flags bitmask of DRAW_PIPE_EDGE_x, DRAW_PIPE_RESET_STIPPLE
*/
static void do_triangle( struct draw_context *draw,
ushort flags,
char *v0,
@@ -157,7 +164,10 @@ static void do_triangle( struct draw_context *draw,
}
/*
* Set up macros for draw_pt_decompose.h template code.
* This code uses vertex indexes / elements.
*/
#define QUAD(i0,i1,i2,i3) \
do_triangle( draw, \
( DRAW_PIPE_RESET_STIPPLE | \
@@ -175,16 +185,16 @@ static void do_triangle( struct draw_context *draw,
#define TRIANGLE(flags,i0,i1,i2) \
do_triangle( draw, \
elts[i0], /* flags */ \
elts[i0], /* flags */ \
verts + stride * (elts[i0] & ~DRAW_PIPE_FLAG_MASK), \
verts + stride * elts[i1], \
verts + stride * elts[i2])
verts + stride * (elts[i1] & ~DRAW_PIPE_FLAG_MASK), \
verts + stride * (elts[i2] & ~DRAW_PIPE_FLAG_MASK) );
#define LINE(flags,i0,i1) \
do_line( draw, \
elts[i0], \
elts[i0], \
verts + stride * (elts[i0] & ~DRAW_PIPE_FLAG_MASK), \
verts + stride * elts[i1])
verts + stride * (elts[i1] & ~DRAW_PIPE_FLAG_MASK) );
#define POINT(i0) \
do_point( draw, \
@@ -213,7 +223,9 @@ static void do_triangle( struct draw_context *draw,
/* Code to run the pipeline on a fairly arbitary collection of vertices.
/**
* Code to run the pipeline on a fairly arbitary collection of vertices.
* For drawing indexed primitives.
*
* Vertex headers must be pre-initialized with the
* UNDEFINED_VERTEX_ID, this code will cause that id to become
@@ -243,6 +255,12 @@ void draw_pipeline_run( struct draw_context *draw,
draw->pipeline.vertex_count = 0;
}
/*
* Set up macros for draw_pt_decompose.h template code.
* This code is for non-indexed rendering (no elts).
*/
#define QUAD(i0,i1,i2,i3) \
do_triangle( draw, \
( DRAW_PIPE_RESET_STIPPLE | \
@@ -293,6 +311,10 @@ void draw_pipeline_run( struct draw_context *draw,
#include "draw_pt_decompose.h"
/*
* For drawing non-indexed primitives.
*/
void draw_pipeline_run_linear( struct draw_context *draw,
unsigned prim,
struct vertex_header *vertices,

View File

@@ -33,7 +33,6 @@
#include "draw/draw_context.h"
#include "draw/draw_private.h"
#include "draw/draw_pt.h"
#include "draw/draw_vs.h"
#include "tgsi/tgsi_dump.h"
#include "util/u_math.h"
#include "util/u_prim.h"

View File

@@ -30,7 +30,6 @@
#include "draw/draw_context.h"
#include "draw/draw_private.h"
#include "draw/draw_vbuf.h"
#include "draw/draw_vertex.h"
#include "draw/draw_pt.h"
#include "translate/translate.h"
#include "translate/translate_cache.h"

View File

@@ -40,7 +40,6 @@
#include "draw/draw_pt.h"
#include "draw/draw_vs.h"
#include "translate/translate.h"
struct fetch_shade_emit;

View File

@@ -32,7 +32,6 @@
#include "draw/draw_vertex.h"
#include "draw/draw_pt.h"
#include "draw/draw_vs.h"
#include "translate/translate.h"
struct fetch_pipeline_middle_end {

View File

@@ -30,7 +30,6 @@
#include "draw/draw_context.h"
#include "draw/draw_private.h"
#include "draw/draw_vbuf.h"
#include "draw/draw_vertex.h"
#include "draw/draw_pt.h"
struct pt_post_vs {

View File

@@ -347,7 +347,8 @@ vcache_check_run( struct draw_pt_front_end *frontend,
draw_count);
if (max_index == 0xffffffff ||
fetch_count > draw_count) {
fetch_count > draw_count ||
max_index != (max_index & ~DRAW_PIPE_FLAG_MASK)) {
if (0) debug_printf("fail\n");
goto fail;
}

View File

@@ -38,7 +38,6 @@
#include "draw/draw_vertex.h"
#include "draw/draw_vs.h"
#include "translate/translate.h"
#include "translate/translate_cache.h"
/* A first pass at incorporating vertex fetch/emit functionality into
*/

View File

@@ -9,7 +9,6 @@ C_SOURCES = \
pb_bufmgr_alt.c \
pb_bufmgr_cache.c \
pb_bufmgr_debug.c \
pb_bufmgr_fenced.c \
pb_bufmgr_mm.c \
pb_bufmgr_ondemand.c \
pb_bufmgr_pool.c \

View File

@@ -8,7 +8,6 @@ pipebuffer = env.ConvenienceLibrary(
'pb_bufmgr_alt.c',
'pb_bufmgr_cache.c',
'pb_bufmgr_debug.c',
'pb_bufmgr_fenced.c',
'pb_bufmgr_mm.c',
'pb_bufmgr_ondemand.c',
'pb_bufmgr_pool.c',

File diff suppressed because it is too large Load Diff

View File

@@ -98,43 +98,6 @@ struct pb_fence_ops
};
/**
* Create a fenced buffer list.
*
* See also fenced_bufmgr_create for a more convenient way to use this.
*/
struct fenced_buffer_list *
fenced_buffer_list_create(struct pb_fence_ops *ops);
/**
* Walk the fenced buffer list to check and free signalled buffers.
*/
void
fenced_buffer_list_check_free(struct fenced_buffer_list *fenced_list,
int wait);
#ifdef DEBUG
void
fenced_buffer_list_dump(struct fenced_buffer_list *fenced_list);
#endif
void
fenced_buffer_list_destroy(struct fenced_buffer_list *fenced_list);
/**
* Wrap a buffer in a fenced buffer.
*
* NOTE: this will not increase the buffer reference count.
*/
struct pb_buffer *
fenced_buffer_create(struct fenced_buffer_list *fenced,
struct pb_buffer *buffer);
#ifdef __cplusplus
}
#endif

View File

@@ -175,7 +175,9 @@ struct pb_fence_ops;
*/
struct pb_manager *
fenced_bufmgr_create(struct pb_manager *provider,
struct pb_fence_ops *ops);
struct pb_fence_ops *ops,
pb_size max_buffer_size,
pb_size max_cpu_total_size);
struct pb_manager *

View File

@@ -179,7 +179,9 @@ pb_debug_buffer_check(struct pb_debug_buffer *buf)
{
uint8_t *map;
map = pb_map(buf->buffer, PIPE_BUFFER_USAGE_CPU_READ);
map = pb_map(buf->buffer,
PIPE_BUFFER_USAGE_CPU_READ |
PIPE_BUFFER_USAGE_UNSYNCHRONIZED);
assert(map);
if(map) {
boolean underflow, overflow;
@@ -371,6 +373,9 @@ pb_debug_manager_create_buffer(struct pb_manager *_mgr,
struct pb_desc real_desc;
pb_size real_size;
assert(size);
assert(desc->alignment);
buf = CALLOC_STRUCT(pb_debug_buffer);
if(!buf)
return NULL;

View File

@@ -1,152 +0,0 @@
/**************************************************************************
*
* Copyright 2006 Tungsten Graphics, Inc., Bismarck, ND., USA
* 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.
*
*
**************************************************************************/
/**
* \file
* A buffer manager that wraps buffers in fenced buffers.
*
* \author Jose Fonseca <jrfonseca@tungstengraphics.dot.com>
*/
#include "util/u_debug.h"
#include "util/u_memory.h"
#include "pb_buffer.h"
#include "pb_buffer_fenced.h"
#include "pb_bufmgr.h"
struct fenced_pb_manager
{
struct pb_manager base;
struct pb_manager *provider;
struct fenced_buffer_list *fenced_list;
};
static INLINE struct fenced_pb_manager *
fenced_pb_manager(struct pb_manager *mgr)
{
assert(mgr);
return (struct fenced_pb_manager *)mgr;
}
static struct pb_buffer *
fenced_bufmgr_create_buffer(struct pb_manager *mgr,
pb_size size,
const struct pb_desc *desc)
{
struct fenced_pb_manager *fenced_mgr = fenced_pb_manager(mgr);
struct pb_buffer *buf;
struct pb_buffer *fenced_buf;
/* check for free buffers before allocating new ones */
fenced_buffer_list_check_free(fenced_mgr->fenced_list, 0);
buf = fenced_mgr->provider->create_buffer(fenced_mgr->provider, size, desc);
if(!buf) {
/* try harder to get a buffer */
fenced_buffer_list_check_free(fenced_mgr->fenced_list, 1);
buf = fenced_mgr->provider->create_buffer(fenced_mgr->provider, size, desc);
if(!buf) {
#if 0
fenced_buffer_list_dump(fenced_mgr->fenced_list);
#endif
/* give up */
return NULL;
}
}
fenced_buf = fenced_buffer_create(fenced_mgr->fenced_list, buf);
if(!fenced_buf) {
pb_reference(&buf, NULL);
}
return fenced_buf;
}
static void
fenced_bufmgr_flush(struct pb_manager *mgr)
{
struct fenced_pb_manager *fenced_mgr = fenced_pb_manager(mgr);
fenced_buffer_list_check_free(fenced_mgr->fenced_list, TRUE);
assert(fenced_mgr->provider->flush);
if(fenced_mgr->provider->flush)
fenced_mgr->provider->flush(fenced_mgr->provider);
}
static void
fenced_bufmgr_destroy(struct pb_manager *mgr)
{
struct fenced_pb_manager *fenced_mgr = fenced_pb_manager(mgr);
fenced_buffer_list_destroy(fenced_mgr->fenced_list);
if(fenced_mgr->provider)
fenced_mgr->provider->destroy(fenced_mgr->provider);
FREE(fenced_mgr);
}
struct pb_manager *
fenced_bufmgr_create(struct pb_manager *provider,
struct pb_fence_ops *ops)
{
struct fenced_pb_manager *fenced_mgr;
if(!provider)
return NULL;
fenced_mgr = CALLOC_STRUCT(fenced_pb_manager);
if (!fenced_mgr)
return NULL;
fenced_mgr->base.destroy = fenced_bufmgr_destroy;
fenced_mgr->base.create_buffer = fenced_bufmgr_create_buffer;
fenced_mgr->base.flush = fenced_bufmgr_flush;
fenced_mgr->provider = provider;
fenced_mgr->fenced_list = fenced_buffer_list_create(ops);
if(!fenced_mgr->fenced_list) {
FREE(fenced_mgr);
return NULL;
}
return &fenced_mgr->base;
}

View File

@@ -39,7 +39,6 @@
#include "util/u_debug.h"
#include "pb_buffer.h"
#include "pb_buffer_fenced.h"
#include "pb_validate.h"

View File

@@ -46,7 +46,7 @@ typedef enum
RBUG_BLOCK_BEFORE = 1,
RBUG_BLOCK_AFTER = 2,
RBUG_BLOCK_RULE = 4,
RBUG_BLOCK_MASK = 7,
RBUG_BLOCK_MASK = 7
} rbug_block_t;
struct rbug_proto_context_list

View File

@@ -65,7 +65,7 @@ enum rbug_opcode
RBUG_OP_SHADER_DISABLE = 770,
RBUG_OP_SHADER_REPLACE = 771,
RBUG_OP_SHADER_LIST_REPLY = -768,
RBUG_OP_SHADER_INFO_REPLY = -769,
RBUG_OP_SHADER_INFO_REPLY = -769
};
/**

View File

@@ -41,6 +41,12 @@
#define MAP_ANONYMOUS MAP_ANON
#endif
#if defined(PIPE_OS_WINDOWS)
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1
#endif
#include <windows.h>
#endif
#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS)
@@ -118,7 +124,29 @@ rtasm_exec_free(void *addr)
}
#else /* PIPE_OS_LINUX || PIPE_OS_BSD || PIPE_OS_SOLARIS */
#elif defined(PIPE_OS_WINDOWS)
/*
* Avoid Data Execution Prevention.
*/
void *
rtasm_exec_malloc(size_t size)
{
return VirtualAlloc(NULL, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
}
void
rtasm_exec_free(void *addr)
{
VirtualFree(addr, 0, MEM_RELEASE);
}
#else
/*
* Just use regular memory.
@@ -138,4 +166,4 @@ rtasm_exec_free(void *addr)
}
#endif /* PIPE_OS_LINUX || PIPE_OS_BSD || PIPE_OS_SOLARIS */
#endif

View File

@@ -133,8 +133,7 @@ static const union tgsi_exec_channel ZeroVec =
{ { 0.0, 0.0, 0.0, 0.0 } };
#ifdef DEBUG
static void
static INLINE void
check_inf_or_nan(const union tgsi_exec_channel *chan)
{
assert(!util_is_inf_or_nan(chan->f[0]));
@@ -142,7 +141,6 @@ check_inf_or_nan(const union tgsi_exec_channel *chan)
assert(!util_is_inf_or_nan(chan->f[2]));
assert(!util_is_inf_or_nan(chan->f[3]));
}
#endif
#ifdef DEBUG
@@ -338,7 +336,9 @@ tgsi_exec_machine_bind_shader(
/* XXX we only handle SOA dependencies properly for MOV/SWZ
* at this time!
*/
if (opcode != TGSI_OPCODE_MOV) {
if (opcode != TGSI_OPCODE_MOV &&
opcode != TGSI_OPCODE_MUL &&
opcode != TGSI_OPCODE_CMP) {
debug_printf("Warning: SOA dependency in instruction"
" is not handled:\n");
tgsi_dump_instruction(&parse.FullToken.FullInstruction,
@@ -1209,11 +1209,19 @@ fetch_src_file_channel(
default:
assert( 0 );
chan->u[0] = 0;
chan->u[1] = 0;
chan->u[2] = 0;
chan->u[3] = 0;
}
break;
default:
assert( 0 );
chan->u[0] = 0;
chan->u[1] = 0;
chan->u[2] = 0;
chan->u[3] = 0;
}
}
@@ -1416,9 +1424,9 @@ store_dest(
int offset = 0; /* indirection offset */
int index;
#ifdef DEBUG
check_inf_or_nan(chan);
#endif
if (0) {
check_inf_or_nan(chan);
}
/* There is an extra source register that indirectly subscripts
* a register file. The direct index now becomes an offset
@@ -1846,7 +1854,8 @@ exec_instruction(
int *pc )
{
uint chan_index;
union tgsi_exec_channel r[10];
union tgsi_exec_channel r[3 * NUM_CHANNELS];
union tgsi_exec_channel d[8];
(*pc)++;
@@ -1973,14 +1982,27 @@ exec_instruction(
break;
case TGSI_OPCODE_MUL:
FOR_EACH_ENABLED_CHANNEL( *inst, chan_index )
{
FETCH(&r[0], 0, chan_index);
FETCH(&r[1], 1, chan_index);
if (inst->Flags & SOA_DEPENDENCY_FLAG) {
FOR_EACH_ENABLED_CHANNEL( *inst, chan_index )
{
FETCH(&r[chan_index], 0, chan_index);
FETCH(&r[chan_index + NUM_CHANNELS], 1, chan_index);
}
FOR_EACH_ENABLED_CHANNEL( *inst, chan_index )
{
micro_mul( &r[chan_index], &r[chan_index], &r[chan_index + NUM_CHANNELS] );
STORE(&r[chan_index], 0, chan_index);
}
} else {
FOR_EACH_ENABLED_CHANNEL( *inst, chan_index )
{
FETCH(&r[0], 0, chan_index);
FETCH(&r[1], 1, chan_index);
micro_mul( &r[0], &r[0], &r[1] );
micro_mul( &r[0], &r[0], &r[1] );
STORE(&r[0], 0, chan_index);
STORE(&r[0], 0, chan_index);
}
}
break;
@@ -2247,11 +2269,7 @@ exec_instruction(
FETCH(&r[4], 1, CHAN_Y);
micro_mul( &r[5], &r[3], &r[4] );
micro_sub( &r[2], &r[2], &r[5] );
if (IS_CHANNEL_ENABLED( *inst, CHAN_X )) {
STORE( &r[2], 0, CHAN_X );
}
micro_sub(&d[CHAN_X], &r[2], &r[5]);
FETCH(&r[2], 1, CHAN_X);
@@ -2260,26 +2278,27 @@ exec_instruction(
FETCH(&r[5], 0, CHAN_X);
micro_mul( &r[1], &r[1], &r[5] );
micro_sub( &r[3], &r[3], &r[1] );
if (IS_CHANNEL_ENABLED( *inst, CHAN_Y )) {
STORE( &r[3], 0, CHAN_Y );
}
micro_sub(&d[CHAN_Y], &r[3], &r[1]);
micro_mul( &r[5], &r[5], &r[4] );
micro_mul( &r[0], &r[0], &r[2] );
micro_sub( &r[5], &r[5], &r[0] );
micro_sub(&d[CHAN_Z], &r[5], &r[0]);
if (IS_CHANNEL_ENABLED( *inst, CHAN_Z )) {
STORE( &r[5], 0, CHAN_Z );
if (IS_CHANNEL_ENABLED(*inst, CHAN_X)) {
STORE(&d[CHAN_X], 0, CHAN_X);
}
if (IS_CHANNEL_ENABLED(*inst, CHAN_Y)) {
STORE(&d[CHAN_Y], 0, CHAN_Y);
}
if (IS_CHANNEL_ENABLED(*inst, CHAN_Z)) {
STORE(&d[CHAN_Z], 0, CHAN_Z);
}
if (IS_CHANNEL_ENABLED( *inst, CHAN_W )) {
STORE( &mach->Temps[TEMP_1_I].xyzw[TEMP_1_C], 0, CHAN_W );
}
break;
case TGSI_OPCODE_ABS:
case TGSI_OPCODE_ABS:
FOR_EACH_ENABLED_CHANNEL( *inst, chan_index ) {
FETCH(&r[0], 0, chan_index);
@@ -2659,14 +2678,28 @@ exec_instruction(
break;
case TGSI_OPCODE_CMP:
FOR_EACH_ENABLED_CHANNEL( *inst, chan_index ) {
FETCH(&r[0], 0, chan_index);
FETCH(&r[1], 1, chan_index);
FETCH(&r[2], 2, chan_index);
if (inst->Flags & SOA_DEPENDENCY_FLAG) {
FOR_EACH_ENABLED_CHANNEL( *inst, chan_index ) {
FETCH(&r[chan_index], 0, chan_index);
FETCH(&r[chan_index + NUM_CHANNELS], 1, chan_index);
FETCH(&r[chan_index + 2 * NUM_CHANNELS], 2, chan_index);
}
FOR_EACH_ENABLED_CHANNEL( *inst, chan_index ) {
micro_lt( &r[chan_index], &r[chan_index],
&mach->Temps[TEMP_0_I].xyzw[TEMP_0_C], &r[chan_index + NUM_CHANNELS],
&r[chan_index + 2*NUM_CHANNELS] );
STORE(&r[chan_index], 0, chan_index);
}
} else {
FOR_EACH_ENABLED_CHANNEL( *inst, chan_index ) {
FETCH(&r[0], 0, chan_index);
FETCH(&r[1], 1, chan_index);
FETCH(&r[2], 2, chan_index);
micro_lt( &r[0], &r[0], &mach->Temps[TEMP_0_I].xyzw[TEMP_0_C], &r[1], &r[2] );
micro_lt( &r[0], &r[0], &mach->Temps[TEMP_0_I].xyzw[TEMP_0_C], &r[1], &r[2] );
STORE(&r[0], 0, chan_index);
STORE(&r[0], 0, chan_index);
}
}
break;

View File

@@ -216,6 +216,9 @@ iter_instruction(
inst->FullDstRegisters[i].DstRegister.Index,
"destination",
FALSE );
if (!inst->FullDstRegisters[i].DstRegister.WriteMask) {
report_error(ctx, "Destination register has empty writemask");
}
}
for (i = 0; i < inst->Instruction.NumSrcRegs; i++) {
check_register_usage(

View File

@@ -101,12 +101,10 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
if (src->SrcRegister.File == TGSI_FILE_INPUT) {
const int ind = src->SrcRegister.Index;
if (info->input_semantic_name[ind] == TGSI_SEMANTIC_FOG) {
if (src->SrcRegister.SwizzleX == TGSI_SWIZZLE_X) {
info->uses_fogcoord = TRUE;
}
else if (src->SrcRegister.SwizzleX == TGSI_SWIZZLE_Y) {
info->uses_frontfacing = TRUE;
}
info->uses_fogcoord = TRUE;
}
else if (info->input_semantic_name[ind] == TGSI_SEMANTIC_FACE) {
info->uses_frontfacing = TRUE;
}
}
}

View File

@@ -2142,40 +2142,50 @@ emit_instruction(
break;
case TGSI_OPCODE_XPD:
/* Note: we do all stores after all operands have been fetched
* to avoid src/dst register aliasing issues for an instruction
* such as: XPD TEMP[2].xyz, TEMP[0], TEMP[2];
*/
if( IS_DST0_CHANNEL_ENABLED( *inst, CHAN_X ) ||
IS_DST0_CHANNEL_ENABLED( *inst, CHAN_Y ) ) {
FETCH( func, *inst, 1, 1, CHAN_Z );
FETCH( func, *inst, 3, 0, CHAN_Z );
FETCH( func, *inst, 1, 1, CHAN_Z ); /* xmm[1] = src[1].z */
FETCH( func, *inst, 3, 0, CHAN_Z ); /* xmm[3] = src[0].z */
}
if( IS_DST0_CHANNEL_ENABLED( *inst, CHAN_X ) ||
IS_DST0_CHANNEL_ENABLED( *inst, CHAN_Z ) ) {
FETCH( func, *inst, 0, 0, CHAN_Y );
FETCH( func, *inst, 4, 1, CHAN_Y );
FETCH( func, *inst, 0, 0, CHAN_Y ); /* xmm[0] = src[0].y */
FETCH( func, *inst, 4, 1, CHAN_Y ); /* xmm[4] = src[1].y */
}
IF_IS_DST0_CHANNEL_ENABLED( *inst, CHAN_X ) {
emit_MOV( func, 2, 0 );
emit_mul( func, 2, 1 );
emit_MOV( func, 5, 3 );
emit_mul( func, 5, 4 );
emit_sub( func, 2, 5 );
STORE( func, *inst, 2, 0, CHAN_X );
emit_MOV( func, 7, 0 ); /* xmm[7] = xmm[0] */
emit_mul( func, 7, 1 ); /* xmm[7] = xmm[2] * xmm[1] */
emit_MOV( func, 5, 3 ); /* xmm[5] = xmm[3] */
emit_mul( func, 5, 4 ); /* xmm[5] = xmm[5] * xmm[4] */
emit_sub( func, 7, 5 ); /* xmm[7] = xmm[2] - xmm[5] */
/* store xmm[7] in dst.x below */
}
if( IS_DST0_CHANNEL_ENABLED( *inst, CHAN_Y ) ||
IS_DST0_CHANNEL_ENABLED( *inst, CHAN_Z ) ) {
FETCH( func, *inst, 2, 1, CHAN_X );
FETCH( func, *inst, 5, 0, CHAN_X );
FETCH( func, *inst, 2, 1, CHAN_X ); /* xmm[2] = src[1].x */
FETCH( func, *inst, 5, 0, CHAN_X ); /* xmm[5] = src[0].x */
}
IF_IS_DST0_CHANNEL_ENABLED( *inst, CHAN_Y ) {
emit_mul( func, 3, 2 );
emit_mul( func, 1, 5 );
emit_sub( func, 3, 1 );
STORE( func, *inst, 3, 0, CHAN_Y );
emit_mul( func, 3, 2 ); /* xmm[3] = xmm[3] * xmm[2] */
emit_mul( func, 1, 5 ); /* xmm[1] = xmm[1] * xmm[5] */
emit_sub( func, 3, 1 ); /* xmm[3] = xmm[3] - xmm[1] */
/* store xmm[3] in dst.y below */
}
IF_IS_DST0_CHANNEL_ENABLED( *inst, CHAN_Z ) {
emit_mul( func, 5, 4 );
emit_mul( func, 0, 2 );
emit_sub( func, 5, 0 );
STORE( func, *inst, 5, 0, CHAN_Z );
emit_mul( func, 5, 4 ); /* xmm[5] = xmm[5] * xmm[4] */
emit_mul( func, 0, 2 ); /* xmm[0] = xmm[0] * xmm[2] */
emit_sub( func, 5, 0 ); /* xmm[5] = xmm[5] - xmm[0] */
STORE( func, *inst, 5, 0, CHAN_Z ); /* dst.z = xmm[5] */
}
IF_IS_DST0_CHANNEL_ENABLED( *inst, CHAN_X ) {
STORE( func, *inst, 7, 0, CHAN_X ); /* dst.x = xmm[7] */
}
IF_IS_DST0_CHANNEL_ENABLED( *inst, CHAN_Y ) {
STORE( func, *inst, 3, 0, CHAN_Y ); /* dst.y = xmm[3] */
}
IF_IS_DST0_CHANNEL_ENABLED( *inst, CHAN_W ) {
emit_tempf(

View File

@@ -780,8 +780,8 @@ ureg_insn(struct ureg_program *ureg,
unsigned i;
boolean saturate;
boolean predicate;
boolean negate;
unsigned swizzle[4];
boolean negate = FALSE;
unsigned swizzle[4] = { 0 };
saturate = nr_dst ? dst[0].Saturate : FALSE;
predicate = nr_dst ? dst[0].Predicate : FALSE;
@@ -827,8 +827,8 @@ ureg_tex_insn(struct ureg_program *ureg,
unsigned i;
boolean saturate;
boolean predicate;
boolean negate;
unsigned swizzle[4];
boolean negate = FALSE;
unsigned swizzle[4] = { 0 };
saturate = nr_dst ? dst[0].Saturate : FALSE;
predicate = nr_dst ? dst[0].Predicate : FALSE;

View File

@@ -9,6 +9,7 @@ C_SOURCES = \
u_debug_symbol.c \
u_debug_stack.c \
u_blit.c \
u_bitmask.c \
u_cache.c \
u_cpu_detect.c \
u_draw_quad.c \

View File

@@ -97,12 +97,12 @@ util_bitmask_resize(struct util_bitmask *bm,
if(!minimum_size)
return FALSE;
if(bm->size > minimum_size)
if(bm->size >= minimum_size)
return TRUE;
assert(bm->size % UTIL_BITMASK_BITS_PER_WORD == 0);
new_size = bm->size;
while(!(new_size > minimum_size)) {
while(new_size < minimum_size) {
new_size *= 2;
/* Check integer overflow */
if(new_size < bm->size)
@@ -136,7 +136,7 @@ util_bitmask_filled_set(struct util_bitmask *bm,
unsigned index)
{
assert(bm->filled <= bm->size);
assert(index <= bm->size);
assert(index < bm->size);
if(index == bm->filled) {
++bm->filled;
@@ -149,7 +149,7 @@ util_bitmask_filled_unset(struct util_bitmask *bm,
unsigned index)
{
assert(bm->filled <= bm->size);
assert(index <= bm->size);
assert(index < bm->size);
if(index < bm->filled)
bm->filled = index;
@@ -182,7 +182,7 @@ util_bitmask_add(struct util_bitmask *bm)
mask = 1;
}
found:
/* grow the bitmask if necessary */
if(!util_bitmask_resize(bm, bm->filled))
return UTIL_BITMASK_INVALID_INDEX;
@@ -198,9 +198,9 @@ unsigned
util_bitmask_set(struct util_bitmask *bm,
unsigned index)
{
unsigned word = index / UTIL_BITMASK_BITS_PER_WORD;
unsigned bit = index % UTIL_BITMASK_BITS_PER_WORD;
util_bitmask_word mask = 1 << bit;
unsigned word;
unsigned bit;
util_bitmask_word mask;
assert(bm);
@@ -208,6 +208,10 @@ util_bitmask_set(struct util_bitmask *bm,
if(!util_bitmask_resize(bm, index))
return UTIL_BITMASK_INVALID_INDEX;
word = index / UTIL_BITMASK_BITS_PER_WORD;
bit = index % UTIL_BITMASK_BITS_PER_WORD;
mask = 1 << bit;
bm->words[word] |= mask;
util_bitmask_filled_set(bm, index);
@@ -220,15 +224,19 @@ void
util_bitmask_clear(struct util_bitmask *bm,
unsigned index)
{
unsigned word = index / UTIL_BITMASK_BITS_PER_WORD;
unsigned bit = index % UTIL_BITMASK_BITS_PER_WORD;
util_bitmask_word mask = 1 << bit;
unsigned word;
unsigned bit;
util_bitmask_word mask;
assert(bm);
if(index >= bm->size)
return;
word = index / UTIL_BITMASK_BITS_PER_WORD;
bit = index % UTIL_BITMASK_BITS_PER_WORD;
mask = 1 << bit;
bm->words[word] &= ~mask;
util_bitmask_filled_unset(bm, index);
@@ -250,7 +258,7 @@ util_bitmask_get(struct util_bitmask *bm,
return TRUE;
}
if(index > bm->size)
if(index >= bm->size)
return FALSE;
if(bm->words[word] & mask) {

View File

@@ -224,8 +224,8 @@ setup_vertex_data_tex(struct blit_state *ctx,
offset = get_next_slot( ctx );
pipe_buffer_write(ctx->pipe->screen, ctx->vbuf,
offset, sizeof(ctx->vertices), ctx->vertices);
pipe_buffer_write_nooverlap(ctx->pipe->screen, ctx->vbuf,
offset, sizeof(ctx->vertices), ctx->vertices);
return offset;
}

View File

@@ -46,7 +46,7 @@ util_clear(struct pipe_context *pipe,
{
if (buffers & PIPE_CLEAR_COLOR) {
struct pipe_surface *ps = framebuffer->cbufs[0];
unsigned color;
unsigned color = 0;
util_pack_color(rgba, ps->format, &color);
if (pipe->surface_fill) {

View File

@@ -452,7 +452,8 @@ debug_dump_flags(const struct debug_named_value *names,
util_strncat(output, "|", sizeof(output));
else
first = 0;
util_strncat(output, names->name, sizeof(output));
util_strncat(output, names->name, sizeof(output) - 1);
output[sizeof(output) - 1] = '\0';
value &= ~names->value;
}
++names;
@@ -465,7 +466,8 @@ debug_dump_flags(const struct debug_named_value *names,
first = 0;
util_snprintf(rest, sizeof(rest), "0x%08lx", value);
util_strncat(output, rest, sizeof(output));
util_strncat(output, rest, sizeof(output) - 1);
output[sizeof(output) - 1] = '\0';
}
if(first)
@@ -642,6 +644,57 @@ void debug_dump_image(const char *prefix,
}
EngUnmapFile(iFile);
#elif defined(PIPE_OS_UNIX)
/* write a ppm file */
char filename[256];
FILE *f;
util_snprintf(filename, sizeof(filename), "%s.ppm", prefix);
f = fopen(filename, "w");
if (f) {
int i, x, y;
int r, g, b;
const uint8_t *ptr = (uint8_t *) data;
/* XXX this is a hack */
switch (format) {
case PIPE_FORMAT_B8G8R8A8_UNORM:
r = 2;
g = 1;
b = 0;
break;
case PIPE_FORMAT_A8R8G8B8_UNORM:
b = 0;
g = 1;
r = 2;
break;
default:
r = 0;
g = 1;
b = 2;
}
fprintf(f, "P6\n");
fprintf(f, "# ppm-file created by osdemo.c\n");
fprintf(f, "%i %i\n", width, height);
fprintf(f, "255\n");
fclose(f);
f = fopen(filename, "ab"); /* reopen in binary append mode */
for (y = 0; y < height; y++) {
for (x = 0; x < width; x++) {
i = y * stride + x * cpp;
fputc(ptr[i + r], f); /* write red */
fputc(ptr[i + g], f); /* write green */
fputc(ptr[i + b], f); /* write blue */
}
}
fclose(f);
}
else {
fprintf(stderr, "Can't open %s for writing\n", filename);
}
#endif
}

View File

@@ -188,7 +188,7 @@ void _debug_assert_fail(const char *expr,
#ifdef DEBUG
#define debug_assert(expr) ((expr) ? (void)0 : _debug_assert_fail(#expr, __FILE__, __LINE__, __FUNCTION__))
#else
#define debug_assert(expr) ((void)0)
#define debug_assert(expr) do { } while (0 && (expr))
#endif

View File

@@ -297,9 +297,9 @@ debug_memory_end(unsigned long start_no)
if((start_no <= hdr->no && hdr->no < last_no) ||
(last_no < start_no && (hdr->no < last_no || start_no <= hdr->no))) {
debug_printf("%s:%u:%s: %u bytes at %p not freed\n",
debug_printf("%s:%u:%s: %lu bytes at %p not freed\n",
hdr->file, hdr->line, hdr->function,
hdr->size, ptr);
(unsigned long) hdr->size, ptr);
#if DEBUG_MEMORY_STACK
debug_backtrace_dump(hdr->backtrace, DEBUG_MEMORY_STACK);
#endif
@@ -315,8 +315,8 @@ debug_memory_end(unsigned long start_no)
}
if(total_size) {
debug_printf("Total of %u KB of system memory apparently leaked\n",
(total_size + 1023)/1024);
debug_printf("Total of %lu KB of system memory apparently leaked\n",
(unsigned long) (total_size + 1023)/1024);
}
else {
debug_printf("No memory leaks detected.\n");

View File

@@ -79,7 +79,7 @@ enum util_format_colorspace {
UTIL_FORMAT_COLORSPACE_RGB = 0,
UTIL_FORMAT_COLORSPACE_SRGB = 1,
UTIL_FORMAT_COLORSPACE_YUV = 2,
UTIL_FORMAT_COLORSPACE_ZS = 3,
UTIL_FORMAT_COLORSPACE_ZS = 3
};

View File

@@ -1457,8 +1457,8 @@ set_vertex_data(struct gen_mipmap_state *ctx,
offset = get_next_slot( ctx );
pipe_buffer_write(ctx->pipe->screen, ctx->vbuf,
offset, sizeof(ctx->vertices), ctx->vertices);
pipe_buffer_write_nooverlap(ctx->pipe->screen, ctx->vbuf,
offset, sizeof(ctx->vertices), ctx->vertices);
return offset;
}

View File

@@ -6,7 +6,7 @@
#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
# include <winsock2.h>
# include <windows.h>
#elif defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_BSD)
#elif defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_APPLE)
# include <sys/socket.h>
# include <netinet/in.h>
# include <unistd.h>
@@ -54,7 +54,7 @@ u_socket_close(int s)
if (s < 0)
return;
#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_BSD)
#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_APPLE)
shutdown(s, SHUT_RDWR);
close(s);
#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
@@ -117,7 +117,7 @@ u_socket_connect(const char *hostname, uint16_t port)
if (!host)
return -1;
memcpy((char *)&sa.sin_addr,host->h_addr,host->h_length);
memcpy((char *)&sa.sin_addr,host->h_addr_list[0],host->h_length);
sa.sin_family= host->h_addrtype;
sa.sin_port = htons(port);
@@ -169,7 +169,7 @@ u_socket_listen_on_port(uint16_t portnum)
void
u_socket_block(int s, boolean block)
{
#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_BSD)
#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_APPLE)
int old = fcntl(s, F_GETFL, 0);
if (old == -1)
return;

View File

@@ -6,7 +6,7 @@
#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
# define PIPE_HAVE_SOCKETS
#elif defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_BSD)
#elif defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_APPLE)
# define PIPE_HAVE_SOCKETS
#endif

View File

@@ -32,7 +32,7 @@
#include "pipe/p_config.h"
#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_SUBSYSTEM_WINDOWS_USER) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_HAIKU)
#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_SUBSYSTEM_WINDOWS_USER) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_APPLE)
#include <stdio.h>

View File

@@ -341,7 +341,7 @@ a4r4g4b4_put_tile_rgba(ushort *dst,
g >>= 4;
b >>= 4;
a >>= 4;
*dst++ = (a << 12) | (r << 16) | (g << 4) | b;
*dst++ = (a << 12) | (r << 8) | (g << 4) | b;
}
p += src_stride;
}

View File

@@ -85,7 +85,9 @@ my_buffer_write(struct pipe_screen *screen,
map = pipe_buffer_map_range(screen, buf, offset, size,
PIPE_BUFFER_USAGE_CPU_WRITE |
PIPE_BUFFER_USAGE_FLUSH_EXPLICIT);
PIPE_BUFFER_USAGE_FLUSH_EXPLICIT |
PIPE_BUFFER_USAGE_DISCARD |
PIPE_BUFFER_USAGE_UNSYNCHRONIZED);
if (map == NULL)
return PIPE_ERROR_OUT_OF_MEMORY;

View File

@@ -336,11 +336,13 @@ create_frame_pred_vert_shader(struct vl_mpeg12_mc_renderer *r)
free(tokens);
}
#if 0
static void
create_field_pred_vert_shader(struct vl_mpeg12_mc_renderer *r)
{
assert(false);
}
#endif
static void
create_frame_pred_frag_shader(struct vl_mpeg12_mc_renderer *r)
@@ -445,11 +447,13 @@ create_frame_pred_frag_shader(struct vl_mpeg12_mc_renderer *r)
free(tokens);
}
#if 0
static void
create_field_pred_frag_shader(struct vl_mpeg12_mc_renderer *r)
{
assert(false);
}
#endif
static void
create_frame_bi_pred_vert_shader(struct vl_mpeg12_mc_renderer *r)
@@ -536,11 +540,13 @@ create_frame_bi_pred_vert_shader(struct vl_mpeg12_mc_renderer *r)
free(tokens);
}
#if 0
static void
create_field_bi_pred_vert_shader(struct vl_mpeg12_mc_renderer *r)
{
assert(false);
}
#endif
static void
create_frame_bi_pred_frag_shader(struct vl_mpeg12_mc_renderer *r)
@@ -663,11 +669,13 @@ create_frame_bi_pred_frag_shader(struct vl_mpeg12_mc_renderer *r)
free(tokens);
}
#if 0
static void
create_field_bi_pred_frag_shader(struct vl_mpeg12_mc_renderer *r)
{
assert(false);
}
#endif
static void
xfer_buffers_map(struct vl_mpeg12_mc_renderer *r)
@@ -1087,6 +1095,9 @@ gen_macroblock_verts(struct vl_mpeg12_mc_renderer *r,
assert(ycbcr_vb);
assert(pos < r->macroblocks_per_batch);
mo_vec[1].x = 0;
mo_vec[1].y = 0;
switch (mb->mb_type) {
case PIPE_MPEG12_MACROBLOCK_TYPE_BI:
{

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