Commit Graph

38347 Commits

Author SHA1 Message Date
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
Vinson Lee
928830606f nvfx: Silence unused variable warning.
The variable is used but only in the body of an assert.
2010-08-22 00:16:54 -07:00
Vinson Lee
48c289fb55 mesa: Initialize member variables in ir_to_mesa_src_reg constructor.
The default constructor did not initialize some member variables.
2010-08-22 00:09:43 -07:00
Vinson Lee
405546882a mesa: Initialize variables in mesa_src_reg_from_ir_src_reg. 2010-08-21 23:56:24 -07:00
Vinson Lee
3bdbccef2a util: Use #ifdef instead of #if.
This is a typo fix of earlier commit 0f3b3751b8.
2010-08-21 23:36:30 -07:00
Vinson Lee
0f3b3751b8 util: Define dump_cpu only for DEBUG builds.
dump_cpu is used only when DEBUG is defined.

Fixes the following GCC warning on builds without DEBUG defined.
util/u_cpu_detect.c:76: warning: 'debug_get_option_dump_cpu' defined but not used
2010-08-21 23:28:52 -07:00
Vinson Lee
2a7493ada4 translate_sse: Silence uninitialized variable warnings.
Initialize variables on error paths.
2010-08-21 23:24:28 -07:00
Vinson Lee
172953ef3a nvfx: Silence uninitialized variable warnings.
Variables weren't initialized on the error paths.
2010-08-21 22:59:46 -07:00
Vinson Lee
fdedff2dba i965g: Silence printf format warnings on 64-bit builds. 2010-08-21 22:45:09 -07:00
Vinson Lee
68d34f2979 nvfx: Silence uninitialized variable warnings.
Silence the following i686-apple-darwin10-gcc-4.2.1 warnings.
nv04_2d.c: In function 'nv04_region_copy_cpu':
nv04_2d.c:560: warning: 'dswy' may be used uninitialized in this function
nv04_2d.c:559: warning: 'dswx' may be used uninitialized in this function
nv04_2d.c:562: warning: 'sswy' may be used uninitialized in this function
nv04_2d.c:561: warning: 'sswx' may be used uninitialized in this function
2010-08-21 22:15:22 -07:00
Vinson Lee
4a06525737 nv50: Silence incompatible pointer type initialization warning.
Silence the following GCC warning.
warning: initialization from incompatible pointer type
2010-08-21 22:01:04 -07:00
Vinson Lee
2506b32eec nv50: Disable unused code.
Disable release_hw and emit_mov_from_pred functions as they are
currently not being used.
2010-08-21 21:42:17 -07:00
Vinson Lee
973c065abe i965g: Fix printf format warning on 32-bit platforms.
Fixes the following GCC warning on 32-bit platforms.
warning: format '%li' expects type 'long int', but argument 4 has type 'int'
2010-08-21 21:27:43 -07:00
Vinson Lee
56176f00f5 glsl: Silence uninitialized variable warning.
i686-apple-darwin10-gcc-4.2.1 generated the following warning.
warning: 'score' may be used uninitialized in this function

GCC 4.4.3 on Linux didn't generate the above warning.
2010-08-21 20:42:47 -07:00
Jerome Glisse
36efb86c05 r600g: partialy fix texturing from depth buffer + initial support for untiling
Partialy fix texturing from depth buffer, depth buffer is tiled
following different tile organisation that color buffer. This
properly set the tile type & array mode field of texture sampler
when sampling from db resource.

Add initial support to untiling buffer when transfering them,
it's kind of broken by corruption the vertex buffer of previous
draw.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-21 22:52:38 -04:00
José Fonseca
ae34a6393e draw: Don't assert if indices point outside vertex buffer.
This is valid input, and asserting here does causes the test suites that
verify this to crash.

Also, the assert was wrongly accepting the case

  max_index == vert_info->count

which, IIUC, is the first vertex outside the buffer. Assuming the
vert_info->count is precise (which often is not the case).
2010-08-22 02:26:44 +01:00
José Fonseca
ce9a6e6a7d mesa: Removed another unused variable. 2010-08-22 02:26:44 +01:00
Vinson Lee
13b3d4c23d glsl: Silence unused variable warning.
The variable is actually used but only in the body of an assert.
2010-08-21 16:22:18 -07:00
Vinson Lee
be99100ee7 util: Silence uninitialized variable warnings. 2010-08-21 15:49:17 -07:00
Kenneth Graunke
e511a35fc5 glsl: Handle array declarations in function parameters.
The 'vec4[12] foo' style already worked, but the 'vec4 foo[12]' style
did not.  Also, 'vec4[] foo' was wrongly accepted.

Fixes piglit test cases array-19.vert and array-21.vert.

May fix fd.o bug #29684 (or at least part of it).
2010-08-21 15:42:27 -07:00
Luca Barbieri
4edeeaf715 nvfx: actually fix it properly 2010-08-21 23:53:39 +02:00
Luca Barbieri
251e48c64a nvfx: fix incorrect assert 2010-08-21 23:45:32 +02:00
Vinson Lee
4a6eb492e8 util: Move loop variable declaration outside for loop.
Fixes build error with MSVC.
2010-08-21 14:36:29 -07:00
Vinson Lee
489c787b80 nvfx: Fix SCons build.
Move declarations before code.
Fix void pointer arithmetic.
2010-08-21 14:29:50 -07:00
Luca Barbieri
11d27871a7 nvfx: fix warnings 2010-08-21 23:09:43 +02:00
José Fonseca
0d96cbe4a5 gallivm: Emit DIVPS instead of RCPPS.
See comments for detailed rationale.

Thanks to Michal Krol and Zack Rusin for detecting and investigating this
in detail.
2010-08-21 21:58:22 +01:00
Luca Barbieri
42210f4464 nvfx: enable translate_sse 2010-08-21 21:56:29 +02:00
Vinson Lee
15d558c306 auxiliary: Add missing files to SCons build.
Add u_linear.c and u_linkages.c to SCons build.
Reorder list of files to be more alphabetical.
2010-08-21 12:32:17 -07:00
Vinson Lee
683118ccf2 auxiliary: Reorder list of files in Makefile.
This patch reorders the list of files so that the order is more alphabetic.
2010-08-21 12:21:59 -07:00
Vinson Lee
1badd3c43f scons: Fix nvfx build. 2010-08-21 12:00:57 -07:00
Luca Barbieri
d8e210eb11 nvfx: slightly improve handling of overlong vps 2010-08-21 20:42:15 +02:00