Commit Graph

42639 Commits

Author SHA1 Message Date
Christoph Bumiller 1a82971393 nvc0: set local memory usage info in shader header
Before this, l[] access was a no-op.
2011-02-24 17:35:36 +01:00
Christoph Bumiller b5f04b2008 nvc0: don't fold loads from local memory 2011-02-24 17:35:36 +01:00
Christoph Bumiller 9612139907 nvc0: presin and preex2 can load from const space 2011-02-24 17:35:36 +01:00
Christoph Bumiller f017483553 nvc0: kick out empty live ranges
They affect overlap tests even though they're actually empty.
2011-02-24 17:35:35 +01:00
Christoph Bumiller cd47f10c90 nvc0: preemptively insert branch at ENDIF
Might be necessary if a block sneaks in somewhere, like a common
block for moves of phi sources after a loop break.

This is harmless and normally will be removed before emission.
2011-02-24 17:35:35 +01:00
Christoph Bumiller 4377657f8e nvc0: correct allocation of constrained registers
In linear scan we can't allocate multiple values with different
live ranges at the same time to assign them consecutive regs.

Maybe we should just switch to graph coloring for all values ...
2011-02-24 17:35:35 +01:00
Christoph Bumiller 67c7aefea3 nvc0: sync textures with render targets ourselves
Fixes for example piglit/fbo-flushing and nexuiz' bloom effect.
2011-02-24 17:35:35 +01:00
Christoph Bumiller a6ea37da4b nvc0: improve userspace fencing
Before, there were situations in which we never checked the fences
for completion (some loading screens for example) and thus never
released memory.
2011-02-24 17:35:35 +01:00
Christoph Bumiller 410a13c5ce nvc0: values for undefined outputs must have file GPR 2011-02-24 17:35:35 +01:00
Christoph Bumiller 1579017b08 nvc0: multiply polygon offset units by 2
Wasn't sure if this still was necessary because the piglit test
started to fail at some point on nv50 where we already do this.
2011-02-24 17:35:35 +01:00
Christoph Bumiller 7d8ff54feb nvc0: fix SSG 2011-02-24 17:35:35 +01:00
Christoph Bumiller 88066d62ae nvc0: don't visit target blocks of a loop break multiple times 2011-02-24 17:35:35 +01:00
Christoph Bumiller 3d190e44de nvc0: don't overwrite phi sources at the end of a loop
Except the reference to its own result.
2011-02-24 17:35:35 +01:00
Fabian Bieler 728695b435 gallium/utils: Fix vertex element setup
Check if element was translated per element instead of per buffer.
2011-02-24 15:05:10 +01:00
José Fonseca 369ece1702 svga: Ensure rendertargets and textures are always rebound at every command buffer start.
The svga_update_state() mechanism is inadequate as it will always end up
flushing the primitives before processing the SVGA_NEW_COMMAND_BUFFER
dirty state flag.
2011-02-24 14:00:13 +00:00
Chris Wilson f19439940c i965: Remember to pack the constant blend color as floats into the batch
Fixes regression from aac120977d.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34597
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-24 12:59:52 +00:00
Chris Wilson 5ce0f7f109 intel: Reset the buffer offset after releasing reference to packed upload
Fixes oglc/vbo(basic.bufferdata)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34603
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-24 12:29:51 +00:00
Chris Wilson 135ccb2dae i965: Unmap the correct pointer after discontiguous upload
Fixes piglit/fbo-depth-sample-compare:

==14722== Invalid free() / delete / delete[]
==14722==    at 0x4C240FD: free (vg_replace_malloc.c:366)
==14722==    by 0x84FBBFD: intel_upload_unmap (intel_buffer_objects.c:695)
==14722==    by 0x85205BC: brw_prepare_vertices (brw_draw_upload.c:457)
==14722==    by 0x852F975: brw_validate_state (brw_state_upload.c:394)
==14722==    by 0x851FA24: brw_draw_prims (brw_draw.c:365)
==14722==    by 0x85F2221: vbo_exec_vtx_flush (vbo_exec_draw.c:389)
==14722==    by 0x85EF443: vbo_exec_FlushVertices_internal (vbo_exec_api.c:543)
==14722==    by 0x85EF49B: vbo_exec_FlushVertices (vbo_exec_api.c:973)
==14722==    by 0x86D6A16: _mesa_set_enable (enable.c:351)
==14722==    by 0x42CAD1: render_to_fbo (in /home/ickle/git/piglit/bin/fbo-depth-sample-compare)
==14722==    by 0x42CEE3: piglit_display (in /home/ickle/git/piglit/bin/fbo-depth-sample-compare)
==14722==    by 0x42F508: display (in /home/ickle/git/piglit/bin/fbo-depth-sample-compare)
==14722==  Address 0xc606310 is 0 bytes after a block of size 18,720 alloc'd
==14722==    at 0x4C244E8: malloc (vg_replace_malloc.c:236)
==14722==    by 0x85202AB: copy_array_to_vbo_array (brw_draw_upload.c:256)
==14722==    by 0x85205BC: brw_prepare_vertices (brw_draw_upload.c:457)
==14722==    by 0x852F975: brw_validate_state (brw_state_upload.c:394)
==14722==    by 0x851FA24: brw_draw_prims (brw_draw.c:365)
==14722==    by 0x85F2221: vbo_exec_vtx_flush (vbo_exec_draw.c:389)
==14722==    by 0x85EF443: vbo_exec_FlushVertices_internal (vbo_exec_api.c:543)
==14722==    by 0x85EF49B: vbo_exec_FlushVertices (vbo_exec_api.c:973)
==14722==    by 0x86D6A16: _mesa_set_enable (enable.c:351)
==14722==    by 0x42CAD1: render_to_fbo (in /home/ickle/git/piglit/bin/fbo-depth-sample-compare)
==14722==    by 0x42CEE3: piglit_display (in /home/ickle/git/piglit/bin/fbo-depth-sample-compare)
==14722==    by 0x42F508: display (in /home/ickle/git/piglit/bin/fbo-depth-sample-compare)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34604
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-24 10:58:22 +00:00
Chris Wilson a2029a78c3 intel: Protect against waiting on a NULL render target bo
If we fall back to software rendering due to the render target being
absent (GPU hang or other error in creating the named target), then we
do not need to nor should we wait upon the results.

Reported-by: Magnus Kessler <Magnus.Kessler@gmx.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34656
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-24 10:12:37 +00:00
Dave Airlie 69d969e8fa r600g: EXT_texture_array support.
This adds EXT_texture_array support to r600g, it passes the piglit
array-texture test but I suspect may not be complete.

It currently requires a kernel patch to fix the CS checker to allow
these, so you need to use R600_ARRAY_TEXTURE=true for now
to enable them.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-24 13:26:28 +10:00
Dave Airlie 13f5a4d316 st/mesa: treat 1D ARRAY upload like a depth or 2D array upload.
This is because the HW doesn't always store a 1D array like a
2D texture, it more likely stores it like 2D texture (i.e.
alignments etc).

This means we upload each slice separately and let the driver
work out where to put it.

this might break nvc0 as I can't test it, I have only nv50 here.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-24 13:26:16 +10:00
Vinson Lee 100cd214e3 scons: Fix Cygwin platform names.
Fixes immediate Python exceptions with SCons on Cygwin.
2011-02-23 18:21:14 -08:00
Jakob Bornecrantz 8fb0ecd0cf i915g: Lazy emit dynamic state 2011-02-24 00:26:02 +00:00
Jakob Bornecrantz b9baad2aff i915g: Lazy emit immediate state 2011-02-24 00:26:02 +00:00
Jakob Bornecrantz 69cfc16cb6 i915g: Disable LIS7 state updates for now 2011-02-24 00:26:02 +00:00
Jakob Bornecrantz 42b8b2be85 i915g: Clean up in i915_state_immediate 2011-02-24 00:26:02 +00:00
Jakob Bornecrantz 481fad1552 i915g: Remove outdated comment 2011-02-24 00:26:02 +00:00
Jakob Bornecrantz fbd681f1a0 i915g: Use dump function in sw winsys 2011-02-24 00:26:02 +00:00
Jakob Bornecrantz fc77dee0bd i915g: Enable mirror repeat wrap mode 2011-02-24 00:26:02 +00:00
Jakob Bornecrantz 4407e5078f i915g: Always set vbo to flush on flushes
Reported-by Chris Wilson <chris@chris-wilson.co.uk>
2011-02-24 00:26:02 +00:00
Chris Wilson 671018aa99 intel: gen3 is particular sensitive to batch size
... and prefers a small batch whereas gen4+ prefer a large batch to
carry more state.

Tuning using openarena/padman indicate that a batch size of just 4096 is
best for those cases.

Bugzilla: https://bugs.freedesktop.org/process_bug.cgi
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-23 23:11:26 +00:00
Chris Wilson 19ac5fa50d i915: And remember assign the new value to the state reg...
Fixes regression from 298ebb78de.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34589
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-23 22:10:43 +00:00
Tom Fogal 4484297505 Fix GLX_USE_TLS define.
It was only getting set in the case of DRI drivers.
2011-02-23 10:40:26 -07:00
Fabian Bieler 0ed5bf668d r600g: Request DWORD aligned vertex buffers.
The spec says that the offsets in the vertex-fetch instructions need to be byte-aligned and makes no specification with regard to the required alignment of the offset and stride in the vertex resource constant register.

However, testing indicates that all three values need to be DWORD aligned.
2011-02-23 11:42:32 -05:00
Wiktor Janas b65e2195c4 st/mesa: fix computing the lowest address for interleaved attribs
Ptr can be very well NULL, so when there are two arrays, with one having
offset 0 (and thus NULL Ptr), and the other having a non-zero offset,
the non-zero value is taken as minimum (because of !low_addr ? start ...).
On 32-bit systems, this somehow works. On 64-bit systems, it leads to crashes.

Signed-off-by: Marek Olšák <maraeo@gmail.com>
2011-02-23 15:19:37 +01:00
Brian Paul 6d1f28d6c0 vbo: added vbo_check_buffers_are_unmapped() debug function 2011-02-22 14:32:37 -07:00
Brian Paul bcd017f16f vbo: removed unused #defines, add comments 2011-02-22 14:23:50 -07:00
Brian Paul eb24a5a9be mesa: move comment, change debug code 2011-02-22 13:37:30 -07:00
Brian Paul d7fcb2ac81 vbo: simplify NeedFlush flag clearing 2011-02-22 13:31:09 -07:00
Brian Paul d8aebc4e4b vbo: use ctx intstead of exec->ctx 2011-02-22 13:24:56 -07:00
Brian Paul cbe47a2459 r300g: fix missing initializers warning 2011-02-22 12:47:18 -07:00
Brian Paul 7898d2ae16 i915g: remove extra semicolons 2011-02-22 12:47:18 -07:00
Andy Skinner 90e227f079 xlib: pass Display pointer to XMesaGarbageCollect()
Fixes an issue when different displays are used on different threads.

Signed-off-by: Brian Paul <brianp@vmware.com>
2011-02-22 12:47:17 -07:00
Kenneth Graunke 2bfc23fb86 i965: Increase Sandybridge point size clamp.
255.875 matches the hardware documentation.  Presumably this was a typo.

Found by inspection.  Not known to fix any issues.

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-02-22 10:52:45 -08:00
Kenneth Graunke 4a3b28113c i965/fs: Correctly set up gl_FragCoord.w on Sandybridge.
pixel_w is the final result; wpos_w is used on gen4 to compute it.

NOTE: This is a candidate for the 7.10 branch.

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-02-22 10:52:44 -08:00
Kenneth Graunke df2aef0e19 i965/fs: Refactor control flow stack handling.
We can't safely use fixed size arrays since Gen6+ supports unlimited
nesting of control flow.

NOTE: This is a candidate for the 7.10 branch.

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-02-22 10:52:44 -08:00
Kenneth Graunke 2c2686b912 i965/fs: Avoid register coalescing away gen6 MATH workarounds.
The code that generates MATH instructions attempts to work around
the hardware ignoring source modifiers (abs and negate) by emitting
moves into temporaries.  Unfortunately, this pass coalesced those
registers, restoring the original problem.  Avoid doing that.

Fixes several OpenGL ES2 conformance failures on Sandybridge.

NOTE: This is a candidate for the 7.10 branch.

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-02-22 10:52:44 -08:00
Kenneth Graunke 72cd7e87d3 i965/fs: Apply source modifier workarounds to POW as well.
Single-operand math already had these workarounds, but POW (the only two
operand function) did not.  It needs them too - otherwise we can hit
assertion failures in brw_eu_emit.c when code is actually generated.

NOTE: This is a candidate for the 7.10 branch.

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-02-22 10:52:44 -08:00
Kenneth Graunke 3e91070ea8 i965: Fix shaders that write to gl_PointSize on Sandybridge.
gl_PointSize (VERT_RESULT_PSIZ) doesn't take up a message register,
as it's part of the header.  Without this fix, writing to gl_PointSize
would cause the SF to read and use the wrong attributes, leading to all
kinds of random looking failure.

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-02-22 10:52:44 -08:00
José Fonseca c6cedd43fe mesa: Avoid undeclared ffs function warning on mingw. 2011-02-22 14:59:09 +00:00