Commit Graph

95 Commits

Author SHA1 Message Date
José Fonseca e1c1911435 llvmpipe: Disable threads by default on embedded. 2010-03-31 18:38:12 +01:00
Brian Paul 67e377bda6 llvmpipe: disable an assertion
We shouldn't try to clear a non-existant z/stencil buffer, so there's
probably a bug elsewhere.  Disable the assertion for now to allow things
to at least run.
2010-03-25 16:10:25 -06:00
Brian Paul d7ddb589f4 llvmpipe: call lp_fence_signal() 2010-03-24 19:30:32 -06:00
Brian Paul 22e6dc3870 gallivm/llvmpipe: added lp_rast_shader_inputs::facing and pass through
The triangle rasterizer sets this field to indicate front/back-facing.
It gets passed into the generated fragment code as another parameter.
Used now for stencil front/back selection but will also be used for
fragment shaders in general (see TGSI_SEMANTIC_FACE).

With this commit two-sided stenciling mostly works but there's
still a bug or two...
2010-03-18 13:06:32 -06:00
Brian Paul d219b8a022 llvmpipe: defines for RAST_WHOLE, RAST_EDGE_TEST 2010-03-18 13:06:32 -06:00
José Fonseca 3abc7b985c llvmpipe: Don't use texture transfer internally.
Now that transfers are context objects their sideeffects must happen in
order when used by the state tracker, but that synchronization must be
bypassed when used inside the driver, or it would cause infinite
recursion.
2010-03-13 16:04:06 +00:00
Brian Paul b704a4e8f3 llvmpipe: add pipe_thread_wait() calls
Wait for threads to exit before cleaning up per-thread data.
Fixes hang on context destruction with glean makeCurrent test.
See fd.o bug 26536.
2010-03-05 14:24:04 -07:00
Keith Whitwell 0c616da241 llvmpipe: remove some ifdefs
No longer any need to protect expensive asserts with #ifdef DEBUG.
2010-03-02 15:03:09 +00:00
Keith Whitwell 5fe2ce28b6 llvmpipe: reorganize transfer usage
Move transfer creation and mapping to the "scene" object, and out of
the rasterizer.  The rasterizer operates on already-mapped
framebuffers only, and no longer needs a screen or context pointer.

The scene object has access to a pipe_context, and this reorg prepares
for moving transfer functionality from the screen to the context.
2010-03-02 15:03:09 +00:00
Brian Paul bc04ae21c1 llvmpipe: clean up rasterization threads upon context destruction
Fixes glean hang, bug 26536.
2010-02-24 17:30:43 -07:00
Brian Paul 5046f2c195 llvmpipe: more lp_rasterizer_task parameter passing 2010-02-24 13:54:25 -07:00
Brian Paul 1c9db3c57f llvmpipe: pass fewer parameters to rasterization functions 2010-02-24 13:54:25 -07:00
Brian Paul 049b4c3405 llvmpipe: added assertions to verify that scene is empty 2010-02-23 18:57:18 -07:00
José Fonseca 5e6a900510 llvmpipe: Leave depth buffer in swizzled format.
This fixes several assertion failures due to only Z32 being supported.
2010-02-10 11:01:26 +00:00
Brian Paul 4aeacdf853 llvmpipe: added counters for color tile clear, load, store 2010-02-08 16:57:23 -07:00
Zack Rusin c61bf36393 llvmpipe: export the tgsi translation code to a common layer
the llvmpipe tgsi translation is a lot more complete than what was in
gallivm so replacing the latter with the former. this is needed since
the draw llvm paths will use the same code. effectively the proven
llvmpipe code becomes gallivm.
2010-02-08 18:22:11 -05:00
José Fonseca ad60552ca1 llvmpipe: Disable multithreading on windows. 2010-02-05 13:56:01 +00:00
José Fonseca a1af8eec66 Merge remote branch 'origin/lp-binning'
Conflicts:
	src/gallium/auxiliary/util/u_dl.c
	src/gallium/auxiliary/util/u_time.h
	src/gallium/drivers/llvmpipe/lp_state_derived.c
	src/gallium/drivers/llvmpipe/lp_state_surface.c
	src/gallium/drivers/llvmpipe/lp_tex_cache.c
	src/gallium/drivers/llvmpipe/lp_tile_cache.c
2010-02-05 13:48:35 +00:00
Brian Paul 7319ae0954 llvmpipe: remove tile clipping code
The surface is always a multiple of the tile size now.
2010-01-20 17:47:26 -07:00
Brian Paul ec459f2aec llvmpipe: asst. task-related clean-ups 2010-01-19 16:58:25 -07:00
Brian Paul 0fccfc9cc0 llvmpipe: remove unneeded DEBUG checks, use step var 2010-01-19 09:30:44 -07:00
Brian Paul 62623c4dc5 llvmpipe: added show_tiles and show_subtiles debug options
These options draw lines over the tiles to show the 64x64 tile
bounds and 16x16 sub-tile bounds.  For debugging/visualization.
2010-01-18 13:10:14 -07:00
Keith Whitwell 591401ff05 llvmpipe: use new u_ringbuffer for scene queue 2010-01-17 00:30:23 +00:00
Brian Paul 2797f2bf57 llvmpipe: generate two shader varients, one omits triangle in/out testing
When we know that a 4x4 pixel block is entirely inside of a triangle
use the jit function which omits the in/out test code.

Results in a few percent speedup in many tests.
2010-01-15 11:21:16 -07:00
Brian Paul 2ba1c8189a llvmpipe: use one loop in lp_rast_clear_zstencil()
This is just a tiny bit faster.
2010-01-13 18:58:42 -07:00
Brian Paul f94a99170e llvmpipe: optimize lp_rast_clear_color() for non-gray colors
This makes a big difference in progs that clear to a non-gray color.
Some demos are 30-50% faster.
2010-01-13 18:54:50 -07:00
Keith Whitwell 4231006e29 llvmpipe: add bin debugger
Adjust definition of empty_bin according to what's actually in empty
bins.  We often have a state packet before/after load commands.

Still need to do something about the fence packets.
2010-01-13 20:14:04 +00:00
Keith Whitwell 95ee14f147 llvmpipe: implement lp_rast_load_zstencil
Load zbuffer contents for binned scenes that don't start with a clear
and which have a bound zbuffer.
2010-01-13 16:52:44 +00:00
Keith Whitwell db83ad4b43 llvmpipe: improve empty-bin test further
Remove unused param, add comments.  Thanks to Brian for review.
2010-01-13 16:29:39 +00:00
Keith Whitwell f4b29e6ad3 llvmpipe: improve empty-bin test
We emit at most two clear packets (color and z respectively).
2010-01-13 15:49:24 +00:00
Keith Whitwell da45f49cc6 llvmpipe: quick hack to short-circuit empty bins 2010-01-13 15:18:32 +00:00
Keith Whitwell c1a0441602 llvmpipe: initial mrt support
Non-mrt apps work, and the code looks correct, but not many mrt test apps
handy atm...
2010-01-10 17:22:09 +00:00
José Fonseca 080c40ab32 Merge remote branch 'origin/master' into lp-binning
Conflicts:
	src/gallium/auxiliary/util/u_surface.c
	src/gallium/drivers/llvmpipe/Makefile
	src/gallium/drivers/llvmpipe/SConscript
	src/gallium/drivers/llvmpipe/lp_bld_arit.c
	src/gallium/drivers/llvmpipe/lp_bld_flow.c
	src/gallium/drivers/llvmpipe/lp_bld_interp.c
	src/gallium/drivers/llvmpipe/lp_clear.c
	src/gallium/drivers/llvmpipe/lp_context.c
	src/gallium/drivers/llvmpipe/lp_context.h
	src/gallium/drivers/llvmpipe/lp_draw_arrays.c
	src/gallium/drivers/llvmpipe/lp_jit.c
	src/gallium/drivers/llvmpipe/lp_jit.h
	src/gallium/drivers/llvmpipe/lp_prim_vbuf.c
	src/gallium/drivers/llvmpipe/lp_setup.c
	src/gallium/drivers/llvmpipe/lp_setup_point.c
	src/gallium/drivers/llvmpipe/lp_state.h
	src/gallium/drivers/llvmpipe/lp_state_blend.c
	src/gallium/drivers/llvmpipe/lp_state_derived.c
	src/gallium/drivers/llvmpipe/lp_state_fs.c
	src/gallium/drivers/llvmpipe/lp_state_sampler.c
	src/gallium/drivers/llvmpipe/lp_state_surface.c
	src/gallium/drivers/llvmpipe/lp_tex_cache.c
	src/gallium/drivers/llvmpipe/lp_tex_cache.h
	src/gallium/drivers/llvmpipe/lp_tex_sample.h
	src/gallium/drivers/llvmpipe/lp_tile_cache.c
2010-01-08 15:42:57 +00:00
Keith Whitwell c9240c4c8f llvmpipe: remove dead code 2010-01-06 17:00:26 +00:00
Brian Paul 808170a0ff llvmpipe: replace INT_MIN/2 with INT_MIN
Since changing the in/out test we can just use INT_MIN to be sure the
comparison against the step values always passes.
2009-12-17 09:01:01 -07:00
Brian Paul b9d33db0a4 llvmpipe: improve the in/out test a little
Instead of:
  s = c + step
  m = s > 0
Do:
  m = step > c  (with negated c)
2009-12-17 08:17:04 -07:00
Brian Paul ab94381930 llvmpipe: do final the pixel in/out triangle test in the fragment shader
The test to determine which of the pixels in a 2x2 quad is now done in
the fragment shader rather than in the calling C code.  This is a little
faster but there's a few more things to do.

Note that the step[] array elements are in a different order now.  Rather
than being in row-major order for the 4x4 grid, they're in "quad-major"
order.  The setup of the step arrays is a little more complicated now.
So is the course/intermediate tile test code, but some lookup tables
help with that.

Next steps:
 - early-cull 2x2 quads which are totally outside the triangle.
 - skip the in/out test for fully contained quads
 - make the in/out comparison code tighter/faster.
2009-12-16 16:10:05 -07:00
Brian Paul cdbcd96fdf llvmpipe: tighten up an assertion 2009-12-15 15:39:48 -07:00
Keith Whitwell 663750d556 llvmpipe: rename bins to scene
It was pretty confusing having an entity named "bin" and another named
"bins", not least because sometimes there was a need to talk about >1
of the "bins" objects, which couldn't be pluralized any further...

Scene is a term used in a bunch of places to talk about what a binner
operates on, so it's a decent choice here.
2009-12-13 18:17:25 +00:00
Brian Paul 4b70af918d llvmpipe: added lp_rast_fence() bin function 2009-12-11 17:57:45 -07:00
Brian Paul 9323740738 llvmpipe: added lp_rast_get_num_threads() 2009-12-11 17:45:52 -07:00
Brian Paul 92dc0f92b0 llvmpipe: implement lp_rast_load_color() 2009-12-11 15:00:28 -07:00
Brian Paul 2bce5c195f llvmpipe: checkpoint: more thread/queuing changes
Now mapping/unmapping the framebuffer is done by a rasteizer thread
rather than the main calling thread.
2009-12-11 14:52:46 -07:00
Brian Paul de31b0e60c llvmpipe: remove unused lp_rasterizer::fb field 2009-12-11 11:56:22 -07:00
Brian Paul 156eabbaf9 llvmpipe: improve framebuffer/surface code 2009-12-11 11:46:23 -07:00
Brian Paul 205da96fc6 llvmpipe: remove unused fb parameter 2009-12-11 11:25:22 -07:00
Brian Paul 4e67f10331 llvmpipe: minor comment fix 2009-12-11 11:16:48 -07:00
Brian Paul 9509f73c21 llvmpipe: checkpoint: use empty/full bin queues 2009-12-10 14:56:30 -07:00
Brian Paul 96689d451a llvmpipe: added some debug/info code 2009-12-09 16:32:32 -07:00
Brian Paul 3bee8c2e7c llvmpipe: use the empty_bins queue now 2009-12-09 16:06:04 -07:00