Commit Graph

1077 Commits

Author SHA1 Message Date
José Fonseca 4fbffb7d90 llvmpipe: Use lp_build_select_bitwise() where appropriate.
Fixes fdo 29269.
2010-07-27 13:09:47 +01:00
Jakob Bornecrantz 2299ff4c6b llvmpipe: Partially fix resource texture from_handle 2010-07-22 20:26:35 -07:00
Jakob Bornecrantz dc544d87a2 llvmpipe: Don't align values already aligned 2010-07-22 20:26:35 -07:00
Marek Olšák 1a3fa3e910 llvmpipe: say no to depth clamp
The other drivers just return 0 without the assert.
2010-07-21 22:54:34 +02:00
Vinson Lee f3a2f458a3 llvmpipe: Remove dead initialization. 2010-07-18 01:14:36 -07:00
Vinson Lee 184abe8e26 llvmpipe: Remove unused variable in lp_test_sincos. 2010-07-17 00:35:10 -07:00
Keith Whitwell 2f6d47a7c8 llvmpipe: use single swizzled tile
Use a single swizzled tile per colorbuf (and per thread) to avoid
accumulating large amounts of cached swizzled data.

Now that the SSE3 code has been merged to master, the performance delta
of this change is minimal, the main benefit is reduced memory usage
due to no longer keeping swizzled copies of render targets.

It's clear from the performance of the in-place version of this code
that there is still quite a bit of time being spent swizzling &
unswizzling, but it's not clear exactly how to reduce that.
2010-07-16 17:24:21 +01:00
José Fonseca b7fff13d58 llvmpipe: Describe _mm_shuffle_epi8() with gcc extended inline assembly when -mssse3 is not supported/enabled. 2010-07-16 17:24:21 +01:00
José Fonseca 0a36a064a1 llvmpipe: Only use -mssse3 on gcc 4.3+ 2010-07-16 17:24:21 +01:00
Brian Paul 5824fbf674 llvmpipe: implement instanced drawing functions
And express all the other drawing functions in terms of
llvmpipe_draw_range_elements_instanced().
2010-07-15 15:56:09 -06:00
José Fonseca 0eaccb30de llvmpipe: Remove redundant statement.
Thanks to Vinson for spotting this.
2010-07-15 10:59:03 +01:00
Brian Paul 871feeb165 llvmpipe: delete lp_test_*.o files with make clean 2010-07-14 15:13:54 -06:00
José Fonseca d023fb3928 llvmpipe: Remove redundant alignments.
The lp_rast_shader_inputs' alignment is irrelevant now that it contains
pointers instead of actual data.

Likewise, lp_rast_triangle's size alignment is meaningless.
2010-07-14 14:53:35 +01:00
Chris Li bed78862d4 llvmpipe: Addi ssse3 swizzling for B8G8R8A8_UNORM. 2010-07-14 14:38:02 +01:00
Roland Scheidegger 217926f350 llvmpipe: fix comment typo 2010-07-13 19:59:38 +02:00
Roland Scheidegger edac740095 llvmpipe: move rasterizer to screen instead of setup context
there's no point of having this per context, so move to screen
(and protect with a mutex).
2010-07-13 19:58:58 +02:00
José Fonseca 962da13ba3 llvmpipe: Align texture data to the cache line. 2010-07-13 17:32:44 +01:00
Keith Whitwell e21e7ab4da llvmpipe: eliminate the set_state rasterizer command
Just put a pointer to the state in the tri->inputs struct.  Remove
some complex logic for eliminating unused statechanges in bins at the
expense of a slightly larger triangle struct.
2010-07-13 17:28:54 +01:00
Keith Whitwell d4b64167b5 llvmpipe: pass mask into fragment shader
Move this code back out to C for now, will generate separately.

Shader now takes a mask parameter instead of C0/C1/C2/etc.

Shader does not currently use that parameter and rasterizes whole
pixel stamps always.
2010-07-13 17:23:49 +01:00
Keith Whitwell 3bd9aedbac llvmpipe: move fences from per-bin to per-thread
Rather than inserting an lp_rast_fence command at the end of each
bin, have each rasterizer thread call this function directly once
it has run out of work to do on a particular scene.

This results in fewer calls to the mutex & related functions, but more
importantly makes it easier to recognize empty bins.
2010-07-13 17:23:48 +01:00
José Fonseca 6d17f00600 llvmpipe: Always swizzle/unswizzle whole tiles.
This was already the case, but the generated (un)swizzling code was not
benefiting of that knowledge.
2010-07-13 17:23:48 +01:00
Jakob Bornecrantz 654009f7f8 llvmpipe: Ignores! 2010-07-13 07:49:00 -07:00
José Fonseca cd629c28d7 llvmpipe: Re-enable threading on windows. 2010-07-12 15:40:33 +01:00
Vinson Lee c89ea8f213 llvmpipe: Don't build lp_test_round when using MSVC.
lp_test_round uses the math functions round and trunc, which aren't
available with MSVC.

Fixes the MSVC build for now.
2010-07-06 17:25:39 -07:00
Vinson Lee 2e423ac074 llvmpipe: Add lp_test_round to SCons build. 2010-07-06 16:18:32 -07:00
Brian Paul 7743791da0 llvmpipe: add test program for round(), trunc(), floor(), ceil() 2010-07-06 11:36:37 -06:00
Zack Rusin 99c8d9b6da llvmpipe: disconnect vertex texture sampling from the setup
it was wrong to put this in the fs paths, but it was easier to just
stuff it along the fragment texture sampling paths. the patch
disconnects vertex texture sampling and just maps the textures
before the draw itself and unmaps them after.
2010-07-06 13:29:04 -04:00
Zack Rusin 01eebfe1b6 draw: implement vertex texture sampling using llvm 2010-07-06 13:29:04 -04:00
Alan Hourihane 5a723afabb llvmpipe: ensure all bins are reset avoids memory corruption. 2010-07-06 11:42:18 +01:00
Roland Scheidegger 3ed0a099c7 llvmpipe: wait for queries being finished when asked for it or before deletion
This fixes bug #28757, though does not yet address the issue that fences aren't
always emitted.
2010-07-05 17:17:50 +02:00
José Fonseca 7071eefdb2 gallivm: Support multiple pixels in lp_build_fetch_rgba_aos().
This allows to do the unpacking of formats that fit in 4 x unorm8 in
parallel, 4 pixels at a time.
2010-07-02 18:45:49 +01:00
José Fonseca 37f4c2f906 gallivm: Fix 4 x unorm8 -> 4 x float conversion.
Also fix the test.
2010-07-02 11:50:00 +01:00
Brian Paul 17c176eb73 llvmpipe: silence pointer type warnings 2010-07-01 09:15:31 -06:00
José Fonseca 8d93f360c5 gallivm: Support 4 x unorm8 in lp_build_fetch_rgba_aos().
Uses code and ideas from Brian Paul.
2010-07-01 15:02:17 +01:00
José Fonseca b919bb7f61 gallivm: Allow to conversions to/from registers of different sizes.
Allow for example to convert from 4 x float32 to 4 x unorm8 and vice versa.

Uses code and ideas from Brian Paul.
2010-07-01 15:02:15 +01:00
José Fonseca 83ced5a918 llvmpipe: Remove lp_build_swizzle2_aos().
Unnecessary special case.
2010-07-01 15:02:04 +01:00
Brian Paul fb06b543a5 llvmpipe: another null pointer check 2010-06-30 14:05:45 -06:00
Brian Paul 2b3e1ad731 llvmpipe: use dummy tile when out of memory 2010-06-30 14:05:45 -06:00
Brian Paul effd33071e llvmpipe: added new lp_memory.[ch] files
Functions for using dummy tiles when we detect OOM conditions.
2010-06-30 12:00:22 -06:00
José Fonseca a2311400fe llvmpipe: Add a new scene state to describe scenes which only have state changes.
It's a rare condition, but it may happen if all primitives are
clipped/culled.

For now we just do a no-op rasterization, but we could bypass it.
2010-06-30 11:10:33 +01:00
José Fonseca 4ca3e0d84b llvmpipe: Don't reset the bin when there's a zsbuf bound.
The previous rendering may have secondary effects on the zsbuf.

Fixes the missing tiles on gearbox.
2010-06-30 10:19:50 +01:00
Brian Paul 3d6101245b llvmpipe: don't crash/assert on out of memory
Check for null pointers and return early, etc.
2010-06-29 15:40:19 -06:00
Brian Paul 249c6735dd llvmpipe: restore call to lp_setup_update_state()
This undoes part of commit 8be645d53a
and fixes fd.o bug 28822 as well as other regressions.

The 'draw' module may issue additional state-change commands while
we're inside the draw_arrays/elements() call so it's important to
check for updated state at this point.
2010-06-29 15:19:01 -06:00
Zack Rusin da7bd6a90e mesa: initial support for ARB_geometry_shader4
laying down the foundation for everything and implementing most of the
stuff.
linking, gl_VerticesIn and multidimensional inputs are left.
2010-06-28 22:53:21 -04:00
José Fonseca 250b92f3bb llvmpipe: set WRITE_ALL only a per-tile basis in lp_resource_copy(). 2010-06-28 16:33:52 +01:00
José Fonseca a9e0fda070 llvmpipe: Actually flush in lp_resource_copy()
The cpu_access is redundant in a software rasterizer.
2010-06-28 16:33:21 +01:00
José Fonseca 8be645d53a llvmpipe: Ensure outdated framebuffer state is not reused in lp_setup_bind_framebuffer().
We were starting a scene whenever lp_setup_get_vertex_info() was called by
the draw module. So when when all primitives were culled/clipped, not only
did we create a new scene for nothing, but we end up using the old scene
with the old framebuffer state instead of a new one.

Fix consists in:
- don't call lp_setup_update_state() in lp_setup_get_vertex_info() -- no
  longer necessary
- always setting the scene state before binning a command -- query
  commands were bypassing it
- assert no old scene is reused in lp_setup_bind_framebuffer()
2010-06-28 16:33:05 +01:00
Brian Paul cc8c142e2a llvmpipe: fix comment typo 2010-06-25 08:47:22 -06:00
Vinson Lee fddd5834ff llvmpipe: Remove unnecessary header. 2010-06-23 15:17:00 -07:00
Jakob Bornecrantz 3a3e80ff96 llvmpipe: Ignores 2010-06-22 20:04:32 +02:00