Commit graph

27233 commits

Author SHA1 Message Date
Francisco Jerez
61d26bc82e dri2: Event driven buffer validation.
When a buffer invalidation event is received from the X server, the
"invalidate" hook of the DRI2 flush extension is executed: A generic
implementation (dri2InvalidateDrawable) is provided that just bumps
the "pStamp" sequence number in __DRIdrawableRec.

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

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

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2010-02-16 10:38:50 -05:00
Kristian Høgsberg
925b901ba3 dri2: Allocate cliprect as part of the __DRIdrawableRec 2010-02-16 10:38:50 -05:00
Kristian Høgsberg
97ec6076f5 glx: Move GetGLXDRIDrawable() prototype to glxclient.h 2010-02-16 10:38:49 -05:00
Brian Paul
107a2ec9ee mesa: Lock mutex around _mesa_HashLookup linked list chase.
Remove const qualifier from _mesa_HashLookup() table parameter to
avoid LOCK/UNLOCK warnings in the function body.

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

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

(cherry picked from commit 7c7247ddbf)
2010-02-16 08:21:28 -07:00
Michal Krol
fa8acb0528 glsl/pp: Do not try to enable extension `all'. 2010-02-16 10:04:58 +01:00
Ben Skeggs
828f545274 nv50: use hw idx buffers where we can 2010-02-16 15:57:59 +10:00
Ben Skeggs
bd3829b5f5 nouveau: fix for latest libdrm 2010-02-16 10:21:05 +10:00
José Fonseca
33cf477c37 wgl: Be lenient when sharing contexts.
My first reading of MS docs was wrong. It says:

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

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

Adobe Premiere Pro tries to do that: share lists between a rgbx8 and a
rgba8 pixel format.
2010-02-15 21:48:13 +00:00
Michal Krol
ee67167358 glsl/pp: Fix handling of if/elif/else cases.
Once if/elif evalutes to true, all subsequent conditions are always false.
2010-02-15 21:33:22 +01:00
Brian Paul
36a54885a4 vbo: fix broken glMultiDrawElements()
Seems to be a regression from commit 60b08eb1fd.

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

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

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

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

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

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

Note that this is still disabled by default (rework of texture transfers
is next).
2010-02-14 18:47:09 +01:00