Commit Graph

43974 Commits

Author SHA1 Message Date
Benjamin Franzke b8033a5651 egl: Compile wayland-drm.a into libEGL independent of egl_dri2
Fixes egl_gallium when egl_dri2 is not enabled.
2011-05-16 10:36:36 +02:00
Dave Airlie c9aa3bbda4 st/mesa: overhaul vertex/fragment sampler and sampler views.
This fixes piglits fragment-and-vertex-texturing test on llvmpipe for me.

I've no idea if someone had another plan for this that is smarter than what
I've done here, but what I've basically done is

split fragment and vertex sampler and sampler_view setup function, factor
out the common chunks of both.

side-cleanups:
drop st->state.sampler_list - unused
don't update border color if we have no border color.

should fix https://bugs.freedesktop.org/show_bug.cgi?id=35849

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-05-16 06:40:26 +10:00
Dave Airlie bc16c73407 gallium: block signals for new thread when spawning threads
I'm hard pressed to think of any reason a gallium thread would want to
receive a signal, especially considering its probably loaded as a library
and you don't want the threads interfering with the main threads signal
handling.

This solves a problem loading llvmpipe into the X server for AIGLX,
where the X server relies on the SIGIO signal going to the main thread,
but once llvmpipe loads the SIGIO can end up in any of its threads.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-05-16 06:40:26 +10:00
Dave Airlie bd5b7a6f71 r600g: reduce flushes so only when texture and CB overlap.
We only need to do this when the texture and CB are using the
same memory area.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-05-15 18:09:15 +10:00
Tom Stellard 6d539579ad r300/compiler: Use ALU Result for IF conditionals
This saves one instruction per IF.
2011-05-14 22:35:28 -07:00
Marek Olšák 8a4136f624 r300g: HiZ fixes
Nothing special, just changing conditions for when HiZ can be enabled and
when HiZ memory becomes invalid.

I was thinking about it again and realized it had not been quite right.
2011-05-15 03:28:32 +02:00
Marek Olšák 19f59dd413 r300g: don't set other HyperZ states if depth and stencil tests are disabled
Such as HiZ.
2011-05-15 03:28:32 +02:00
Marek Olšák fdd37af3f7 r300g: dynamically ask for and release Hyper-Z access
We ask for Hyper-Z access when clearing a zbuffer.
We release it if no zbuffer clear has been done for 2 seconds.
2011-05-15 03:28:32 +02:00
Marek Olšák 904f43f190 r300g: fix conversion from int to boolean 2011-05-15 03:26:29 +02:00
Marek Olšák 51095f74cf u_vbuf_mgr: fix max_index computation once again
See how I compute and use the 'unused' variable in the code.
It's crucial for getting max_index right.

Fixed with the help of apitrace.
(bisecting the problematic draw call manually was not fun though)

This should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=36268
https://bugs.freedesktop.org/show_bug.cgi?id=36609
2011-05-14 20:03:03 +02:00
Marek Olšák ad2999d211 st/mesa: set correct baseInternalFormat for _mesa_texstore in DrawPixels
GL_RGBA was always used for baseInternalFormat regardless of the chosen
texture internal format.

https://bugs.freedesktop.org/show_bug.cgi?id=37154

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-05-14 01:53:30 +02:00
Kenneth Graunke 2bba244329 i965: Use BRW_DATAPORT_READ_TARGET_DATA_CACHE instead of 0.
Using the #define'd constant is better than 0 with a comment.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Chad Versace <chad.versace@intel.com>
2011-05-13 15:20:52 -07:00
Kenneth Graunke c77855d64e i965: Rename dp_render_target struct to gen6_dp.
This is actually just the message descriptor for Gen6+ dataport access;
it has nothing to do with the render cache.  Access to the sampler cache
and constant cache also would use this struct; rename for clarity.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-05-13 15:20:45 -07:00
Kenneth Graunke 17eaff77b0 i965: Attempt to un-muddle Gen6 data port message target defines.
These are documented on page 245 of IHD_OS_Vol4_Part2.pdf (the public
Sandybridge documentation/SEND instruction description).

Somebody had the bright idea to reuse gen4/5 defines labelled READ/WRITE
which just happened to be the same values as Render Cache/Sampler Cache.
It turns out that this field has nothing to do with READ/WRITE on
Sandybridge, but rather represents which data port to direct it to.

This was especially confusing in brw_set_dp_read_message, which
used "BRW_MESSAGE_TARGET_DATAPORT_WRITE."  In a read function.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-05-13 15:19:31 -07:00
Christoph Bumiller 5f5d486717 nvc0: prevent overlap between load address and destination regs
For example, an indirect load like "ld b128 $r0q c0[$r0]" seems to
overwrite the address register before finishing the load, but only
if there are a lot of threads running.

Visible as displaced geoemtry in Unigine Heaven.
2011-05-13 18:47:54 +02:00
Marek Olšák dd445ae120 docs: update relnotes-7.11 2011-05-13 18:10:30 +02:00
Marek Olšák e28e3a774c st/mesa: expose ARB_shader_texture_lod if SM3 is supported
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-05-13 17:57:56 +02:00
Matt Turner fae77579ad util_logbase2 takes and returns unsigned, not int
Signed-off-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-05-12 16:37:50 -06:00
Matt Turner c5ac8a8aa2 Remove redundant util_unsigned_logbase2
util_logbase2 is exactly the same function.

Signed-off-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-05-12 16:37:34 -06:00
Matt Turner 48a0a096f8 u_math.h: Remove redundant mingw32 ffs definition
Signed-off-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-05-12 16:37:20 -06:00
Benjamin Franzke 184bb09ff5 st/egl: Implement EGL_WL_bind_wayland_display for x11,drm,wayland 2011-05-13 09:31:10 -04:00
Benjamin Franzke 83c68758be egl_dri2: Discard similar configs 2011-05-13 09:31:09 -04:00
Kristian Høgsberg 93aea63a33 egl_dri2: Make it possible to not compile in the X11 platform 2011-05-13 09:31:09 -04:00
Francesco Marella 64e3cd0c42 nvfx: fill some PIPE_CAPs
Signed-off-by: Francesco Marella <francesco.marella@gmail.com>
2011-05-13 14:56:40 +02:00
Kenneth Graunke f247b2d633 i965: Fix incorrectly named data port define.
According to my documentation this is actually "Media Block Write" on
Gen4-5; there has never been a "DWord Block Write."

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2011-05-13 08:36:07 -07:00
Kenneth Graunke ceaec24149 i965: Fix typo in Gen6 "DWord Scattered Write" message define.
It's DWORD, not DWORLD.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2011-05-13 08:35:13 -07:00
Vinson Lee ac85ab066b i915g: Fix typos in print messages. 2011-05-12 23:21:58 -07:00
Dave Airlie c7b1497f4e r600g: don't unmap if we haven't mapped
should fix https://bugs.freedesktop.org/show_bug.cgi?id=37157

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-05-13 14:03:47 +10:00
Marek Olšák 8a50637453 mesa: EXT_texture_sRGB_decode little fixup
It doesn't fix bug 37150 though.
2011-05-13 01:43:28 +02:00
Dave Airlie 1ca3efe548 r600g: use a local var to store pointer to which register we are working on
this just makes the code a little bit cleaner.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-05-13 09:26:17 +10:00
Dave Airlie 240049adfa r600g: make range/block act more like a page table
only allocate the blocks ptr in the range if we ever have one,
otherwise don't bother wasting the memory.

valgrind glxinfo
before:
==967==     in use at exit: 419,754 bytes in 706 blocks
==967==   total heap usage: 3,552 allocs, 2,846 frees, 3,550,131 bytes allocated

after:
==5227==     in use at exit: 419,754 bytes in 706 blocks
==5227==   total heap usage: 3,452 allocs, 2,746 frees, 3,140,531 bytes allocate

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-05-13 09:26:16 +10:00
Dave Airlie d79a4a612b r600g: reduce r600_reg footprint
This drops 6k of the text segment, a minor drop in the ocean, however
it also makes the code a lot cleaner and removes a lot of duplicated
information, hopefully making it more maintainable.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-05-13 09:22:41 +10:00
Dave Airlie d015d2f391 r600g: reduce memory usage from range/block hash table.
This table covered a large range unnecessarily, reduce the address
range covered, use the fact that the bottom two bits aren't significant,
and remove unused fields from the range struct. It also drops the hash_size/shift in context in favour of a define, which should make doing the math
a bit less CPU intensive.

valgrind glxinfo
Before:
==320==     in use at exit: 419,754 bytes in 706 blocks
==320==   total heap usage: 3,691 allocs, 2,985 frees, 7,272,467 bytes allocated

After:
==967==     in use at exit: 419,754 bytes in 706 blocks
==967==   total heap usage: 3,552 allocs, 2,846 frees, 3,550,131 bytes allocated

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-05-13 09:22:40 +10:00
Dave Airlie 5e15497452 r600g: delay mapping until first map request. (v2)
Currently r600g always maps every bo, this is quite pointless as it wastes
VM and on 32-bit with wine running VM space is quite useful.

So with this patch we don't create the mappings until first use, without
tiling enabled this probably won't make a major difference on its own,
but with tiled staged uploads it should avoid keeping maps for most of the
textures unnecessarily.

v2: add bo data ptr check

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-05-13 09:22:39 +10:00
José Fonseca 5de2c67ba7 egl/dri2: Avoid unused static functions. 2011-05-12 15:24:26 +01:00
José Fonseca 4a47d6d46b egl/dri2: Prevent uninitialized variable dereference. 2011-05-12 15:23:48 +01:00
José Fonseca 6c26072bd1 egl/dri2: Fix const pointer duplication, prevent unitialized variable dereference.
Based on zhigang gong <zhigang.gong@gmail.com>'s patch.
2011-05-12 15:23:02 +01:00
José Fonseca 6a661895e9 egl: Fix int <-> ptr casts.
Based on zhigang gong <zhigang.gong@gmail.com>'s patch.
2011-05-12 15:12:16 +01:00
zhigang gong 6699cd4e8d glu: Fix _GLUfuncptr typedef.
typedef void (GLAPIENTRYP _GLUfuncptr)(); causes the following warning:
function declaration isn't a prototype.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
2011-05-12 11:45:30 +01:00
José Fonseca 32a95cb70c mesa: Fix GetVertexAttrib* inside display lists.
GetVertexAttrib*{,ARB} is no longer aliased to the NV calls.

This fixes tracing yofrankie with apitrace, given it requires accurate
results from GetVertexAttribiv*.

NOTE: This is a candidate for the stable branches.
2011-05-12 01:09:55 +01:00
Tom Stellard 95c93651b4 r300/compiler: Fix bug in rc_get_variables()
Variables that share readers were not always being linked together.

https://bugs.freedesktop.org/show_bug.cgi?id=36939
2011-05-11 16:16:29 -07:00
Tom Stellard 4612554dce r300/compiler: Limit instructions to 3 source selects
Some presubtract conversions were generating more than 3 source
selects.

https://bugs.freedesktop.org/show_bug.cgi?id=36527

Note: This is a candidate for the 7.10 branch.
2011-05-11 16:16:29 -07:00
Tom Stellard d1e8195c07 r300/compiler: Add simple unit test framework
Plus three tests for rc_inst_can_use_presub()
2011-05-11 16:16:29 -07:00
Alex Deucher b9f2750900 r600g: fix flushes on rs780/rs880
They need the same hack as rv670.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=35312

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-05-11 12:10:01 -04:00
José Fonseca 7a271151a5 mesa: Don't append fog code for programs that don't output color.
Fixes fdo 36919.

NOTE: This is a candidate for the stable branches.

It should be cherry-picked to the sames branches that
3aa21f93dc was.
2011-05-11 14:04:08 +01:00
José Fonseca 2812b60a84 svga/drm: Implement svga_winsys_screen::get_hw_version. 2011-05-10 16:36:35 +01:00
José Fonseca a67ecfeebc st/wgl: Remove buggy assertion.
The assertion is wrong, now that state tracker can cope with a window with
zero width or height.
2011-05-10 16:13:05 +01:00
Maxim Levitsky d6b248652a nv50: fix mistake in pipe caps for pre-NVA0 cards
Introduced by 531b12af35.
2011-05-10 10:16:54 +02:00
Kenneth Graunke 68074387a4 ir_to_mesa: Emit TXD instruction.
Mesa already supports this because of NV_fragment_program.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Marek Olšák <maraeo@gmail.com>
2011-05-09 11:23:54 -07:00
Kenneth Graunke 5a3a242a8f glsl: Add compiler support for ARB_shader_texture_lod.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Marek Olšák <maraeo@gmail.com>
2011-05-09 11:23:54 -07:00