Commit graph

38077 commits

Author SHA1 Message Date
Eric Anholt
001a7bfdfc mesa: Don't add 1 to GL_ACTIVE_UNIFORM_MAX_LENGTH.
Fixes: glsl-getactiveuniform-length.
2010-08-23 10:34:31 -07:00
Roland Scheidegger
c2f074d8a4 util: fix util_fill_rect to take util_color instead of u32 param
util_fill_rect could not handle formats with more than 32 bits,
since the fill color was a uint32_t value. Fix this by using
a util_color union instead, and also expand the union so it
works with formats which have up to 256 bits (the max of any
format currently defined).
2010-08-23 17:55:16 +02:00
Luca Barbieri
c907b94713 nvfx: emit bo relocations only when needed
Should improve performance, possibly significantly.
2010-08-23 17:12:31 +02:00
Eric Anholt
ea70969618 glsl2: Add missing sig_iter.next() to the no-constant-folding-to-outvals fix. 2010-08-23 07:22:16 -07:00
Luca Barbieri
2e215bc28f nvfx: match Gallium's gl_PointCoord brokenness
Gallium always puts gl_PointCoord in GENERIC[0] if
point_quad_rasterization is enabled.

This is silly, but for now it makes mesa-demos/glsl/pointcoord work.
2010-08-23 15:20:31 +02:00
Luca Barbieri
bfaa2577c6 nvfx: support clip planes sensibly and fix them on nv30
Before, we were discarding the compiled vertex program on each
vertex program change.

Now we compile the program as if there were 6 clip planes and
dynamically patch in an "end program" bit at the right place.

Also, nv30 should now work.
2010-08-23 15:09:22 +02:00
Dave Airlie
eb430b0e94 r300g: avoid stall in no-tcl drawing when mapping vbo
the current code reuses the same vbo over and over, however after a flush
we'd stall and wait for mapping on the vbo when we should just fire and forget.

On a gears test this brings me from ~620 to ~750 on my rv530 in swtcl mode.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-08-23 20:31:21 +10:00
Chia-I Wu
e607b67ebc glapi: Clean up header inclusions.
Do not rely on PUBLIC being defined in glapi.h.  Do not include core
mesa headers.
2010-08-23 18:28:14 +08:00
Chia-I Wu
0c87828050 mesa: Assorted fixes for es_generator.py on win32.
Fix mixed use of GL_APIENTRY and GLAPIENTRY.  Parameter list of a function
prototype should never be empty.
2010-08-23 18:28:14 +08:00
Zhenyu Wang
8a537b2fb8 i965: Add sandybridge D0 pci ids
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2010-08-23 10:16:45 +08:00
Eric Anholt
27e931f679 mesa: Fix typo in autoconf.in that made talloc cflags still detect at runtime. 2010-08-22 18:54:30 -07:00
Marek Olšák
cfc4d86656 st/mesa: implement depth-only blit for BlitFramebuffer
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-08-22 19:40:26 -06:00
Marek Olšák
7945e143e0 util: implement depth blitting in u_blit
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-08-22 19:40:26 -06:00
Marek Olšák
36e523f4a3 st/mesa: fix BlitFramebuffer for D24S8 textures
This is the same issue as in the previous patch, but here the Blit is not
implemented for separate depth and stencil buffers at all (such
a configuration is not supported in Gallium) and the code incorrectly treated
a D24S8 texture as two separate buffers, making this Blit a no-op.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-08-22 19:40:26 -06:00
Brian Paul
24bd9780bc st/mesa: added st_is_depth_stencil_combined() function
This code is part of a patch by Marek Olšák.
2010-08-22 19:40:26 -06:00
Eric Anholt
428a3cd2d5 glsl: Don't constant-fold in a constant in place of a function outval. 2010-08-22 18:34:46 -07:00
Eric Anholt
6606fde3ec glsl: Convert constant folding to the rvalue visitor.
This should be mostly a noop, except that a plain dereference of a
variable that is not part of a constant expression could now get
"constant folded".  I expect that for all current backends this will
be either a noop, or possibly a win when it provokes more
ir_algebraic.  It'll also ensure that when new features are added,
tree walking will work normally.  Before this, constants weren't
getting folded inside of loops.
2010-08-22 18:34:46 -07:00
Eric Anholt
137b8397fa glsl: Don't tree-graft in an expression in place of a function outval.
Fixes: glsl-constant-folding-call-1 (bug #29737)
2010-08-22 18:34:45 -07:00
Brian Paul
6b90d1b1ac st/mesa: fix ReadPixels crashes when reading depth/stencil from a FBO
This is based on a patch from Marek Olšák.

NOTE: This is a candidate for the Mesa 7.8 branch.
2010-08-22 19:04:49 -06:00
Brian Paul
c94256e83b mesa: use driver hook for creating new renderbuffers 2010-08-22 18:54:55 -06:00
Brian Paul
ed57286b75 st/mesa: clean-up pipe_get_transfer() calls 2010-08-22 18:54:55 -06:00
Eric Anholt
639cdd3782 mesa: AC_SUBST the talloc libs/cflags so the ./configure results are saved.
I had used pkg-config from the Makefile because I didn't want to screw
around with the non-autoconf build, but that doesn't work because the
PKG_CONFIG_PATH or TALLOC_LIBS/TALLOC_CFLAGS that people set at
configure time needs to be respected and may not be present at build
time.

Bug #29585
2010-08-22 17:36:51 -07:00
Luca Barbieri
8ffc357228 nvfx: fix minor memory leak 2010-08-23 00:16:59 +02:00
Luca Barbieri
d507c0812d nvfx: support both sprite coord origins
Now we lie less when claiming OpenGL 2 support.

Also, first piglit result group is now all green, except for
fdo25614-genmipmap, which seems mesa/st's fault.
2010-08-23 00:15:03 +02:00
Luca Barbieri
d21be6ee2c nvfx: use 64-bit bitmasks for temps 2010-08-23 00:15:03 +02:00
Jerome Glisse
d843bbfd3f r600g: fix DB decompression
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-22 17:14:48 -04:00
Vinson Lee
d324fcea67 nvfx: Include missing header in nvfx_vertprog.c.
Include draw_context.h for draw_*_vertex_shader symbols.

Fixes the following GCC warning.
nvfx_vertprog.c: In function 'nvfx_vp_state_create':
nvfx_vertprog.c:1276: warning: implicit declaration of function 'draw_create_vertex_shader'
nvfx_vertprog.c:1276: warning: assignment makes pointer from integer without a cast
nvfx_vertprog.c: In function 'nvfx_vp_state_delete':
nvfx_vertprog.c:1298: warning: implicit declaration of function 'draw_delete_vertex_shader'
2010-08-22 12:45:04 -07:00
Jakob Bornecrantz
8e632666af translate_sse: add R32G32B32A32_FLOAT -> X8X8X8X8_UNORM for EMIT_4UB
Changed by me to use movd instead of movss to avoid penalties.
2010-08-22 20:30:16 +02:00
Luca Barbieri
4f3fedcef7 translate_sse: refactor constant management 2010-08-22 20:28:27 +02:00
Luca Barbieri
df86f1e7d5 nvfx: refactor to support multiple fragment program versions 2010-08-22 20:28:27 +02:00
Luca Barbieri
47537a4557 nvfx: move stuff around 2010-08-22 20:28:27 +02:00
Jerome Glisse
ed99c28d12 r600g: depth buffer likely needs decompression when used as texture
Before using depth buffer as texture, it needs to be decompressed
(tile pattern of db are different from one used for colorbuffer
like texture)

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-22 14:26:05 -04:00
Keith Whitwell
42719df0b8 glx/xlib: configurable strict/non-strict buffer size invalidate
Introduce a new configuration option XMESA_STRICT_INVALIDATE to switch
between swapbuffers-based and glViewport-based buffer invalidation.

Default strict invalidate to false, ie glViewport-based invalidation,
aka ST_MANAGER_BROKEN_INVALIDATE.

This means we will not call XGetGeometry after every swapbuffers,
which allows swapbuffers to remain asynchronous.  For apps running at
100fps with synchronous swapping, a 10% boost is typical.  For gears,
I see closer to 20% speedup.

Note that the work of copying data on swapbuffers doesn't disappear -
this change just allows the X server to execute the PutImage
asynchronously without us effectively blocked until its completion.

This applies even to llvmpipe's threaded rasterization as the
swapbuffers operation was a large part of the serial component of an
llvmpipe frame.

The downside of this is correctness - applications which don't call
glViewport on window resizes will get incorrect rendering, unless
XMESA_STRICT_INVALIDATE is set.

The ultimate solution would be to have per-frame but asynchronous
invalidation.  Xcb almost looks as if it could provide this, but the
API doesn't seem to quite be there.
2010-08-22 14:49:17 +01:00
Keith Whitwell
3d4b60f1f7 llvmpipe: reduce size of fragment shader variant key
Don't spend as much time comparing them.
2010-08-22 14:49:17 +01:00
Keith Whitwell
49a2ea082b llvmpipe: remove unused member from lp_fragment_shader_variant_key 2010-08-22 14:49:17 +01:00
Keith Whitwell
0ad82b8d28 llvmpipe: don't clear unused bins
If bins outside the current scene bounds are being corrupted, we'll
need to fix that separately.  Currently seems ok though.
2010-08-22 14:49:17 +01:00
Keith Whitwell
a1de6f48c3 draw: reduce the size of the llvm variant key 2010-08-22 14:49:16 +01:00
Keith Whitwell
8b15de2736 glx/xlib: remove another XSync
With this change, xmesa_get_window_size still does one round trip, but
that's better than doing two.
2010-08-22 14:48:24 +01:00
Keith Whitwell
8570232b3b glx/xlib: no need to call XSync from XMesaFlush
Try to eliminate some unnecessary X server round trips.
2010-08-22 14:48:24 +01:00
Luca Barbieri
7de1f86c49 nvfx: simplify and correct fragment program update logic
This version should hopefully be much clearer and thus less likely
to be subtly broken.

Also fixes point sprites on nv40 and possibly some other bugs too.
2010-08-22 15:42:17 +02:00
Luca Barbieri
9fefab340f nvfx: make stipple setting independent of enable 2010-08-22 15:42:16 +02:00
Luca Barbieri
793e398681 nvfx: fix vertex programs 2010-08-22 15:42:16 +02:00
Luca Barbieri
a0c45eabf9 nvfx: use relocations array for vp constants 2010-08-22 15:42:16 +02:00
Henri Verbeet
8a878c266a r600g: Don't blindly unmap NULL->size.
There may actually be something mapped in that range, especially for large
buffers like e.g. the GL Drawable.
2010-08-22 12:43:11 +02:00
José Fonseca
04094b2da2 svga: Do not shortcut NULL surface relocations with SVGA3D_INVALID_ID.
How to cope with NULL surface relocations should be entirely at winsys'
discretion.
2010-08-22 11:37:28 +01:00
Eric Anholt
52e9520274 i965: Fix 8-wide FB writes on gen6.
My merge of Zhenyu's patch on top of my previous patches broke it by
my code expecting simd16 single write and Zhenyu's simd8 path being
disabled by mine.  Merge the two for success.
2010-08-22 00:52:18 -07:00
Eric Anholt
250fccecc8 i965: Fix brw_math1 with scalar argument in gen6 FS.
The docs claim two conflicting things: One, that a scalar source is
supported.  Two, source hstride must be 1 and width must be exec size.
So splat a constant argument out into a full reg to operate on, since
violating the second set of constraints is clearly failing.

The alternative here might be to do a 1-wide exec on a constant
argument for math1.  It would probably save cycles too.  But I'll
leave that for the glsl2-965 branch.

Fixes glsl-algebraic-div-one-2.shader_test.
2010-08-22 00:52:18 -07:00
Eric Anholt
556f19415a i965: Fix up WM push constant setup on gen6.
Fixes glsl-algebraic-add-add-1.
2010-08-22 00:52:18 -07:00
Eric Anholt
527a9a4de2 i965: Use intel->gen >= 6 instead of IS_GEN6. 2010-08-22 00:52:18 -07:00
Vinson Lee
df604834d3 libgl-xlib: Include missing header in xlib.c.
Include st_api.h for st_api_create_OpenGL symbol.
2010-08-22 00:30:47 -07:00