Brian Paul [Thu, 31 Dec 2009 21:47:21 +0000 (14:47 -0700)]
st/mesa: implement conditional rendering
Brian Paul [Thu, 31 Dec 2009 21:46:57 +0000 (14:46 -0700)]
st/mesa: move st_query_object type to header to make it public
Brian Paul [Thu, 31 Dec 2009 21:46:15 +0000 (14:46 -0700)]
softpipe: implement conditional rendering
Brian Paul [Thu, 31 Dec 2009 21:44:40 +0000 (14:44 -0700)]
gallium: pipe_context::render_condition() and mode flags
For conditional rendering predicated on results of an occlusion query.
If this driver function is NULL, conditional rendering is not supported by
the driver.
Brian Paul [Thu, 31 Dec 2009 16:02:27 +0000 (09:02 -0700)]
Merge branch 'mesa_7_7_branch'
Conflicts:
configs/darwin
src/gallium/auxiliary/util/u_clear.h
src/gallium/state_trackers/xorg/xorg_exa_tgsi.c
src/mesa/drivers/dri/i965/brw_draw_upload.c
Brian Paul [Thu, 31 Dec 2009 15:50:26 +0000 (08:50 -0700)]
mesa: remove a line of dead code
Brian Paul [Thu, 31 Dec 2009 15:48:52 +0000 (08:48 -0700)]
docs: 7.8 relnotes: GL_NV_conditional_render and GL_EXT_draw_buffers2
Brian Paul [Thu, 31 Dec 2009 15:48:27 +0000 (08:48 -0700)]
mesa: enable ColorMaskIndexed in display lists
Brian Paul [Thu, 31 Dec 2009 15:46:36 +0000 (08:46 -0700)]
progs/tests: added test for GL_EXT_draw_buffers2
Render into two color buffers (render targets). Display half of each
buffer in the window. Use different color masks for each render target.
Only enable blending for the second render target.
Brian Paul [Thu, 31 Dec 2009 15:46:09 +0000 (08:46 -0700)]
mesa: enable GL_EXT_draw_buffers2 for sw drivers
Brian Paul [Thu, 31 Dec 2009 04:42:12 +0000 (21:42 -0700)]
docs: update status for conditional rendering
Brian Paul [Thu, 31 Dec 2009 04:41:37 +0000 (21:41 -0700)]
progs/tests: added conditional rendering test program
Brian Paul [Thu, 31 Dec 2009 04:40:54 +0000 (21:40 -0700)]
mesa: turn on NV_conditional_render for software drivers
Brian Paul [Thu, 31 Dec 2009 04:40:12 +0000 (21:40 -0700)]
swrast: add check for conditional rendering
Brian Paul [Thu, 31 Dec 2009 04:40:03 +0000 (21:40 -0700)]
tnl: add check for conditional rendering
Brian Paul [Thu, 31 Dec 2009 04:39:46 +0000 (21:39 -0700)]
mesa: plug in API functions for conditional rendering
Brian Paul [Thu, 31 Dec 2009 04:38:58 +0000 (21:38 -0700)]
mesa: added dispatch for GL_NV_conditional_render extension
Brian Paul [Thu, 31 Dec 2009 04:37:54 +0000 (21:37 -0700)]
mesa: added FLUSH_VERTICES(), more comments
Brian Paul [Wed, 30 Dec 2009 21:49:49 +0000 (14:49 -0700)]
mesa: add flag for GL_NV_conditional_render extension
Brian Paul [Wed, 30 Dec 2009 21:47:06 +0000 (14:47 -0700)]
mesa: _mesa_Begin/EndConditionalRender() functions
For GL_NV_conditional_render and GL3.
The drawing functions don't check the query object yet.
No API dispatch yet.
Brian Paul [Wed, 30 Dec 2009 21:42:14 +0000 (14:42 -0700)]
mesa: make _mesa_lookup_query_object() an non-private inline function
Brian Paul [Thu, 31 Dec 2009 15:44:24 +0000 (08:44 -0700)]
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.
Christoph Bumiller [Thu, 31 Dec 2009 12:38:53 +0000 (13:38 +0100)]
nv50: fix TEXLOD sequence and use it only in FPs
Christoph Bumiller [Wed, 30 Dec 2009 20:25:13 +0000 (21:25 +0100)]
nv50: cannot kill branch if immediate is used
The immediate's bits eat the condition bits.
Christoph Bumiller [Wed, 30 Dec 2009 20:17:31 +0000 (21:17 +0100)]
nv50: make assimilate_temp safe
Cannot change hw reg assigned to a TGSI TEMP on the fly if
we are in a loop, conditional, or can jump around wildly.
Christoph Bumiller [Wed, 30 Dec 2009 19:54:58 +0000 (20:54 +0100)]
nv50: handle TGSI_OPCODE_EXP,LOG
Not that they make much sense on nv50, but we also do LIT ...
Christoph Bumiller [Thu, 31 Dec 2009 11:26:14 +0000 (12:26 +0100)]
nv50: add support for subroutines
Christoph Bumiller [Wed, 30 Dec 2009 23:37:47 +0000 (00:37 +0100)]
nv50: alloc_reg on reg_instance
If we create multiple instances of an nv50_reg referencing
them same resource, register allocation from alloc_reg has
to be done with the original nv50_reg.
Christoph Bumiller [Tue, 29 Dec 2009 11:04:34 +0000 (12:04 +0100)]
nv50: multiply polygon offset units by 2
Christoph Bumiller [Mon, 28 Dec 2009 23:02:45 +0000 (00:02 +0100)]
nv50: neg and abs modifiers for flops
Also fixes RSQ of negative sources.
Christoph Bumiller [Mon, 28 Dec 2009 22:17:26 +0000 (23:17 +0100)]
nv50: don't negate immediates in set_immd
This negation would only be triggered in situations
where it's incorrect.
The caller of set_immd should negate the immediate value
in the instruction itself if desired, and will also know
if it's a float or an int.
ADD TEMP[0], CONST[0], -IMMD[0] would load the immediate
into extra TEMP, negated, and set the negate flag in add
as well - double negation.
Vinson Lee [Thu, 31 Dec 2009 08:07:47 +0000 (00:07 -0800)]
mesa: Silence unused variable warning.
Vinson Lee [Wed, 30 Dec 2009 20:38:21 +0000 (12:38 -0800)]
progs/glsl: Provide a better fix for fgets warning.
Brian Paul [Wed, 30 Dec 2009 17:39:20 +0000 (10:39 -0700)]
docs: added GL 3.x feature checklist to track what's done in Mesa
Brian Paul [Wed, 30 Dec 2009 17:30:16 +0000 (10:30 -0700)]
mesa: implement _mesa_GetStringi() for GL3
Note: not plugged into the dispatch table yet.
Brian Paul [Wed, 30 Dec 2009 17:29:53 +0000 (10:29 -0700)]
mesa: _mesa_get_enabled_extension() function
Brian Paul [Wed, 30 Dec 2009 17:16:01 +0000 (10:16 -0700)]
mesa: implement GL3 GL_NUM_EXTENSIONS query
Brian Paul [Wed, 30 Dec 2009 17:13:31 +0000 (10:13 -0700)]
mesa: simplify some extension testing code
Brian Paul [Wed, 30 Dec 2009 16:45:58 +0000 (09:45 -0700)]
mesa: display list support for glClearBuffer functions
Note: some code disabled until dispatch table supports GL3 entrypoints.
Brian Paul [Wed, 30 Dec 2009 16:25:24 +0000 (09:25 -0700)]
mesa: implement GL3 glClearBuffer() functions
These functions clear color/depth/stencil buffers with a value that's
passed to the function, rather than the context clear values.
For now these functions are implemented in terms of the existing
ctx->Driver.Clear() hook. In the future when we have non-normalized
integer and unsigned integer color buffer formats we'll need new
driver hook(s) to pass int and uint clear values to the driver.
Note: these functions are not hooked into the dispatch table at this time.
Brian Paul [Mon, 28 Dec 2009 22:12:14 +0000 (15:12 -0700)]
mklib: use a wrapper for ar
Luca Barbieri [Wed, 30 Dec 2009 01:54:39 +0000 (02:54 +0100)]
nouveau: Fix glTexSubImage on swizzled surfaces on <=NV40
Currently in nvXX_transfer_new a temporary as large as the surface is created.
If the subrectangle is not the whole texture we would need to read
back the whole texture, but we aren't.
Thus, everything but the subrectangle specified is loaded as garbage.
This can be seen in progs/demos/ray.
This patch fixes the problem by creating a temporary that covers only
the desired subrectangle.
That makes us hit an alignment assert in nv04_surface_2d.c. Fix it
using the point registers instead of manipulating the swizzled surface
offset to account for the destination coordinates (which do not seem
to have a 1024 limit).
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Brian Paul [Wed, 30 Dec 2009 06:24:04 +0000 (23:24 -0700)]
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>.
Vinson Lee [Wed, 30 Dec 2009 06:29:53 +0000 (22:29 -0800)]
glu/sgi: Initialize members of struct O_nurbssurface.
Brian Paul [Wed, 30 Dec 2009 06:04:27 +0000 (23:04 -0700)]
mesa: fix-up blend enable/disable code in _mesa_PopAttrib()
Brian Paul [Wed, 30 Dec 2009 05:58:44 +0000 (22:58 -0700)]
mesa: finish-up indexed color mask code in _mesa_PopAttrib()
Brian Paul [Wed, 30 Dec 2009 05:56:32 +0000 (22:56 -0700)]
mesa: plug in GL_EXT_draw_buffers2 functions
Brian Paul [Wed, 30 Dec 2009 05:55:57 +0000 (22:55 -0700)]
mesa: regenerate API files related to GL_EXT_draw_buffers2
Brian Paul [Wed, 30 Dec 2009 05:54:30 +0000 (22:54 -0700)]
glapi: extension info for GL_EXT_draw_buffers2
Vinson Lee [Wed, 30 Dec 2009 05:34:06 +0000 (21:34 -0800)]
tdfx: Silence uninitialized variable warning.
Vinson Lee [Wed, 30 Dec 2009 05:11:37 +0000 (21:11 -0800)]
progs/glsl: Silence compiler warnings.
Vinson Lee [Wed, 30 Dec 2009 05:03:23 +0000 (21:03 -0800)]
glu/sgi: Silence warn_unused_result warnings.
Vinson Lee [Wed, 30 Dec 2009 04:56:47 +0000 (20:56 -0800)]
st/xorg: Use C-style comments.
Vinson Lee [Wed, 30 Dec 2009 04:45:24 +0000 (20:45 -0800)]
glu/sgi: Initialize member of struct GridVertex.
Jakob Bornecrantz [Wed, 30 Dec 2009 04:08:09 +0000 (05:08 +0100)]
st/xorg: Fix warning and add a TODO comment
Jakob Bornecrantz [Wed, 30 Dec 2009 03:46:12 +0000 (04:46 +0100)]
st/xorg: On close wait on fences and then destroy the screen
Jakob Bornecrantz [Wed, 30 Dec 2009 03:58:25 +0000 (04:58 +0100)]
st/xorg: Be proper with pipe pointers on close in exa
Brian Paul [Tue, 29 Dec 2009 23:30:54 +0000 (16:30 -0700)]
mesa: added infrastructure for GL_EXT_draw_buffers2
Jakob Bornecrantz [Wed, 30 Dec 2009 03:22:12 +0000 (04:22 +0100)]
st/xorg: Make sure we don't overrun the fence array in block handler
Vinson Lee [Wed, 30 Dec 2009 01:46:42 +0000 (17:46 -0800)]
glu/sgi: Initialize member variables in class Varray.
Vinson Lee [Wed, 30 Dec 2009 01:35:22 +0000 (17:35 -0800)]
glu/sgi: Initialize member of class monoChain.
Vinson Lee [Wed, 30 Dec 2009 01:22:11 +0000 (17:22 -0800)]
glu/sgi: Initialize members of class sampledLine.
Brian Paul [Tue, 29 Dec 2009 23:30:04 +0000 (16:30 -0700)]
mesa: add dlist support for indexed colormask and indexed enables/disables
Not plugged into dispatch table yet...
Brian Paul [Tue, 29 Dec 2009 23:17:14 +0000 (16:17 -0700)]
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().
Vinson Lee [Tue, 29 Dec 2009 22:28:33 +0000 (14:28 -0800)]
glu/sgi: Initialize members of class directedLine.
Brian Paul [Tue, 29 Dec 2009 22:09:16 +0000 (15:09 -0700)]
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.
Brian Paul [Tue, 29 Dec 2009 22:04:03 +0000 (15:04 -0700)]
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.
Vinson Lee [Tue, 29 Dec 2009 21:38:02 +0000 (13:38 -0800)]
mesa: Initialize variable in get_tex_color_index.
Brian Paul [Tue, 29 Dec 2009 17:11:26 +0000 (10:11 -0700)]
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.
Brian Paul [Tue, 29 Dec 2009 16:06:00 +0000 (09:06 -0700)]
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.
Brian Paul [Tue, 29 Dec 2009 15:47:40 +0000 (08:47 -0700)]
glsl: added default case in _fetch_token() to silence warnings
Eric Anholt [Tue, 29 Dec 2009 03:09:01 +0000 (19:09 -0800)]
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.
Vinson Lee [Tue, 29 Dec 2009 03:09:33 +0000 (19:09 -0800)]
st/egl: Move declaration before code.
Eric Anholt [Tue, 29 Dec 2009 02:15:06 +0000 (18:15 -0800)]
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.
Eric Anholt [Mon, 28 Dec 2009 22:38:43 +0000 (14:38 -0800)]
intel: Improve INTEL_DEBUG=fbo output.
Eric Anholt [Sun, 27 Dec 2009 02:43:20 +0000 (18:43 -0800)]
intel: Remove dead fthrottle_mode option. We only do IRQ waits.
Noticed by clang.
Eric Anholt [Tue, 22 Dec 2009 22:43:11 +0000 (14:43 -0800)]
mesa: remove gratuitous stores I added in remove_instructions.
Vinson Lee [Tue, 29 Dec 2009 02:46:15 +0000 (18:46 -0800)]
intel: Silence compiler warnings.
Vinson Lee [Tue, 29 Dec 2009 02:07:09 +0000 (18:07 -0800)]
llvmpipe: Fix assert.
Vinson Lee [Tue, 29 Dec 2009 02:05:30 +0000 (18:05 -0800)]
llvmpipe: Silence compiler warnings.
Younes Manton [Mon, 28 Dec 2009 22:33:34 +0000 (17:33 -0500)]
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.
Luca Barbieri [Sat, 26 Dec 2009 06:35:17 +0000 (07:35 +0100)]
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.
Luca Barbieri [Sun, 27 Dec 2009 03:04:46 +0000 (04:04 +0100)]
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).
Luca Barbieri [Sat, 26 Dec 2009 07:12:15 +0000 (08:12 +0100)]
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.
José Fonseca [Mon, 28 Dec 2009 22:52:41 +0000 (22:52 +0000)]
llvmpipe: Unmapping vertex/index buffers does NOT flush draw module anymore.
Not since
6094e79f4e3350d123c7532b1c73faa60834a62d.
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.
José Fonseca [Mon, 28 Dec 2009 16:39:30 +0000 (16:39 +0000)]
python/retrace: Dump only the specified image rectangles.
José Fonseca [Mon, 28 Dec 2009 16:25:48 +0000 (16:25 +0000)]
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.
José Fonseca [Mon, 28 Dec 2009 15:22:17 +0000 (15:22 +0000)]
scons: Fix xlib build.
After glsl rework merge.
Francisco Jerez [Sat, 26 Dec 2009 16:26:49 +0000 (17:26 +0100)]
nv04: Fix build after the latest nouveau_class.h changes.
Marcin Kościelnicki [Mon, 28 Dec 2009 16:23:40 +0000 (16:23 +0000)]
nv50: Dehexify and bring up to date with new method defines.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Keith Whitwell [Mon, 28 Dec 2009 11:05:06 +0000 (11:05 +0000)]
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.
Vinson Lee [Mon, 28 Dec 2009 08:44:30 +0000 (00:44 -0800)]
llvmpipe: Silence compiler warnings.
Vinson Lee [Mon, 28 Dec 2009 07:02:55 +0000 (23:02 -0800)]
st/xorg: Silence unused variable warnings.
Vinson Lee [Mon, 28 Dec 2009 06:49:49 +0000 (22:49 -0800)]
g3dvl: Silence compiler warnings.
Vinson Lee [Mon, 28 Dec 2009 06:39:31 +0000 (22:39 -0800)]
st/vega: Silence compiler warnings.
Vinson Lee [Mon, 28 Dec 2009 06:18:18 +0000 (22:18 -0800)]
gallium/xlib: Silence unused variable warning.
Vinson Lee [Mon, 28 Dec 2009 02:12:58 +0000 (18:12 -0800)]
trace: Silence unused variable warnings.
Vinson Lee [Mon, 28 Dec 2009 02:09:58 +0000 (18:09 -0800)]
i915g: Silence unused variable warning.
Vinson Lee [Mon, 28 Dec 2009 02:06:02 +0000 (18:06 -0800)]
softpipe: Silence unintialized variable warnings.
Vinson Lee [Mon, 28 Dec 2009 01:52:47 +0000 (17:52 -0800)]
softpipe: Silence unused variable warning.