Commit graph

25310 commits

Author SHA1 Message Date
Brian Paul
81c72a1dab mesa: plug in GL_EXT_draw_buffers2 functions 2009-12-29 22:56:32 -07:00
Brian Paul
285d3f9ed8 mesa: regenerate API files related to GL_EXT_draw_buffers2 2009-12-29 22:55:57 -07:00
Brian Paul
ca3a8538b6 glapi: extension info for GL_EXT_draw_buffers2 2009-12-29 22:54:30 -07:00
Brian Paul
8f6f112463 mesa: added infrastructure for GL_EXT_draw_buffers2 2009-12-29 20:51:20 -07:00
Brian Paul
a856d635d3 mesa: add dlist support for indexed colormask and indexed enables/disables
Not plugged into dispatch table yet...
2009-12-29 16:30:04 -07:00
Brian Paul
fd5511d27f mesa: implement per-buffer color masking
This is part of the GL_EXT_draw_buffers2 extension and part of GL 3.0.

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

The new _mesa_ColorMaskIndexed() function will be called by
glColorMaskIndexedEXT() or glColorMaski().
2009-12-29 16:17:14 -07:00
Brian Paul
126b35bd3a mesa: implement indexed glGet functions
The functions are _mesa_GetBooleanIndexedv(), _mesa_GetIntegerIndexedv(), and
_mesa_GetInteger64Indexedv().  These will be called from API functions such as
glGetBooleanIndexedvEXT() and glGetBooleani_v().

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

This is infrastructure for GL_EXT_draw_buffers2 and OpenGL 3.x

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

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

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

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

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

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

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

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

In particular flushing the draw module is important since it may contain
unflushed primitives which would otherwise be draw with wrong state.
2009-12-26 21:06:46 +00:00
Eric Anholt
c4ac1f8299 i965: Extra asserts on flow control instructions to clarify for clang. 2009-12-26 11:18:02 -08:00
Eric Anholt
c196a3592a i965: Clean up double initialization of dst_flags from a rebase resolve.
Caught by clang.
2009-12-26 11:18:02 -08:00
Eric Anholt
070bbd4fcd i965: Fix setup of immediate types for gen4 disasm.
Caught by clang.
2009-12-26 11:18:02 -08:00
José Fonseca
d01c7bef29 llvmpipe: Use comments and more code from softpipe's is_texture_referenced implementation. 2009-12-26 11:02:02 +00:00
José Fonseca
7a15642f41 softpipe: Flush draw module before switching framebuffer.
Otherwise geometry might end up in the wrong rendertarget.
2009-12-26 11:01:05 +00:00
José Fonseca
491a184943 llvmpipe: Flush draw module before switching framebuffer.
Otherwise geometry will end up in the wrong rendertarget.
2009-12-26 11:00:42 +00:00
José Fonseca
399190d136 tgsi: Don't dump parenthesis for negation.
It doesn't seem necessary, and more importantly, tgsi_parse doesn't know
how to read them.
2009-12-26 10:59:46 +00:00
José Fonseca
230a5b5f1c python: Update python state tracker and samples for recent interface changes. 2009-12-26 01:14:59 +00:00
José Fonseca
3f176bf08c trace: Fix transfer size computation. 2009-12-26 01:14:08 +00:00
José Fonseca
8353c87cce svga: Allow to dump an individual command. 2009-12-26 01:14:08 +00:00
Dave Airlie
5676082d28 r300g: fixup for GS additions
draw_set_mapped_constant_buffer changed API
2009-12-26 07:28:21 +10:00
Zack Rusin
fb0a9aa5e0 gallium: remove TGSI_SEMANTIC_VERTICES
it's a leftover from an early version of geometry shading support.
geometry shaders now encode the primitive size in the PROPERTY token
and don't need special input with their size.
2009-12-25 05:52:20 -05:00
Zack Rusin
b0bc582db7 draw: disable some debugging output coming from the geometry shaders 2009-12-25 05:52:20 -05:00
Zack Rusin
519a6d308d gallium: geometry shader can be always enabled and we don't need a cap for that
using the draw module allows us to enable geometry shading even on hardware
that doesn't support it.
2009-12-25 05:52:20 -05:00
Zack Rusin
a00da63e66 util: put vertices_per_primitive function in its proper location 2009-12-25 05:52:19 -05:00
Zack Rusin
49155c3264 draw/tgsi: fix geometry shader input/output swizzling 2009-12-25 05:52:19 -05:00
Zack Rusin
afd01366b0 tgsi: dump the indices correctly when dealing with 2d arrays 2009-12-25 05:52:19 -05:00
Zack Rusin
960be012a9 tgsi: fix property parsing/building 2009-12-25 05:52:19 -05:00
Zack Rusin
e9c6f01a52 python: fix python state tracker after some latest changes 2009-12-25 05:52:18 -05:00
Zack Rusin
ac96ee1c16 softpipe: make it possible to dump geometry shader from the softpipe 2009-12-25 05:52:18 -05:00