summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw
Commit message (Collapse)AuthorAgeFilesLines
* gallivm: Require SSE2 for draw_llvm/llvmpipe due to LLVM PR6960.Török Edwin2010-05-061-1/+8
| | | | | | | | Note that this also requires X86 for llvm, if llvmpipe/draw_llvm works on PPC then the condition should be extended to include && x86. Signed-off-by: Török Edwin <[email protected]> Signed-off-by: José Fonseca <[email protected]>
* gallium: still more provoking vertex fixesBrian Paul2010-05-052-11/+22
| | | | | This fixes edge flags for polygons and provoking vertex for filled quads.
* gallium: added edge flag print/debug code (disabled)Brian Paul2010-05-051-0/+20
|
* gallium: rename draw() to draw_elements() in vbuf codeBrian Paul2010-05-055-24/+24
| | | | | Now we have draw_elements() and draw_arrays() to be consistent with the pipe_context drawing functions.
* gallium: rework provoking vertex codeBrian Paul2010-05-055-49/+123
| | | | | | | | | | | | | | Builds on commit ddb0e18f6c5582d4d2cc59ffd16ad9c4639ed059 and fixes regressions in glean clipFlat test. We assume that Gallium drivers observe flatshade_first for all triangles and that all the assorted per-triangle calls in the 'draw' module also follow flatshade_first. Everything else builds on those rules. Gallium does not use follow flatshade_first for GL quads, quad strips and polygons; the "last" vertex is always the provoking vertex for those prims. So now there are separate QUAD_FIRST_PV and QUAD_LAST_PV macros in the draw primitive decomposition code instead of one QUAD macro.
* draw: Remove unnecessary header.Vinson Lee2010-05-041-1/+0
|
* draw: Preserve the provoking vertex both when decomposing and clipping.José Fonseca2010-05-052-23/+31
| | | | Based on John Lawless' feedback.
* draw: Adjust wideline vertex coords for D3D.Brian Paul2010-05-051-27/+34
|
* Reorder LLVM passes, running mem2reg earlier.Török Edwin2010-05-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This gives a ~30% shader optimization time improvement on blender. Tested by comparing the dumped LLVM modules. Current ordering: time ~/llvm-git/obj/Release-Asserts/bin/opt l.bc -constprop -instcombine -mem2reg -gvn -simplifycfg real 0m1.126s user 0m1.108s sys 0m0.012s With this patch: time ~/llvm-git/obj/Release-Asserts/bin/opt l.bc -mem2reg -constprop -instcombine -gvn -simplifycfg real 0m0.885s user 0m0.880s sys 0m0.000s The overall improvement in blender is ~15%. Blender without the patch takes 1m13s: edwin 5934 87.6 11.5 729440 458296 pts/5 SLl+ 17:35 1:13 blender Blender with the patch takes 1m3s: edwin 5726 94.2 11.2 716424 446168 pts/5 SLl+ 17:32 1:03 blender It is still slow with the patch, but better (most of the optimization time is taken up by GVN, see LLVM PR7023). Signed-off-by: Török Edwin <[email protected]> Signed-off-by: José Fonseca <[email protected]>
* draw: Remove draw_pt_fetch_prepare call from llvm middle end.José Fonseca2010-05-031-12/+0
| | | | Unneeded since we code generate the vertex fecthes.
* draw: Disable rtasm compilation when using LLVM.José Fonseca2010-05-031-6/+10
| | | | Saves time and trouble.
* draw: Fix memory leaks in llvm code.José Fonseca2010-04-302-0/+26
|
* draw llvm: stay in bounds even if fetch_count % 4 != 0Zack Rusin2010-04-291-2/+16
| | | | | if fetch_count % 4 != 0 then on the last iteration we fetch garbage. this patch makes sure we stay within bounds
* gallium/draw: Fix PPC compiler warning.Michel Dänzer2010-04-291-1/+1
|
* gallium/draw: Fix PPC build failure.Michel Dänzer2010-04-291-1/+1
|
* draw: remove extra semicolonsBrian Paul2010-04-282-4/+4
|
* draw: use a cast wrapperBrian Paul2010-04-281-4/+11
|
* draw: put 'create' in the vs varient create function namesBrian Paul2010-04-285-12/+16
|
* draw: add missing function parameterBrian Paul2010-04-281-1/+2
|
* draw/llvm: implement fetch elts pathsZack Rusin2010-04-263-31/+160
| | | | | | | we were only running the llvm paths when the input elts were linear, now we can handle abritrary fetch elts arrays. we do this by generating two paths - linear and fetch_elts one and just selecting the right one at run time.
* draw: Always use the llvm middle end when available & enabled.José Fonseca2010-04-262-17/+23
|
* draw: Pass-through pipe_buffer::max_index to translate.José Fonseca2010-04-267-19/+34
| | | | | | | | | | max_index must be observed to prevent crashes due to bad index data. I've been using this patch for some time without regressions. Some places, where we use internal vertex buffer, it is not entirely clear what max_index should be, so passing just ~0 to avoid regressions for now.
* draw: Respect pipe_vertex_buffer::max_index in llvm generated code.José Fonseca2010-04-252-4/+13
| | | | | | Everybody should respect max_index, specially llvm generated code, which likes to eat vertices 4 at a time, so it may end up chew a bit a bit more than actually exists.
* gallium/draw: remove old commentBrian Paul2010-04-231-1/+0
|
* gallium: Convert some uses of get option to staticJakob Bornecrantz2010-04-232-5/+12
|
* draw: use FREE() instead of free()Stephen Johnson2010-04-231-1/+1
|
* gallivm: implement indirect addressing over temporariesZack Rusin2010-04-221-1/+2
| | | | | | a bit more involved than indirect addressing over consts, but still fairly reasonable. we allocate an array instead of individual alloca's, and we do it only if the shader does indirect addressing.
* draw: Make LLVM integration work without llvmpipe too (e.g. sofptipe).José Fonseca2010-04-211-0/+1
| | | | Prevents the assertion failure.
* gallium/draw: fix point sprite handlingBrian Paul2010-04-216-4/+25
| | | | | | | | New draw API function to indicate whether or not to convert points to quads for sprite rasterization. Fix point-to-quad conversion regression in the wide-point stage. We need to check the pipe_rasterizer_state::point_quad_rasterization flag.
* gallium/draw: use local var to simplify codeBrian Paul2010-04-211-17/+18
|
* gallivm: Universal format support on lp_build_fetch_rgba_aos via ↵José Fonseca2010-04-201-1/+3
| | | | | | util_format_description::fetch_rgba_float This therefore adds support to half float vertex buffers.
* draw: Fallback to gallivm for translation of ↵José Fonseca2010-04-201-4/+20
| | | | | | A8R8G8B8/B8G8R8A8/R10G10B10X2/R10G10B10X2 and other formats. These need swizzles, and bitshifts.
* draw: Remove draw_vs_llvm.c.José Fonseca2010-04-203-140/+3
| | | | | | To silence some warnings. Super-seeded by Zack's new llvm middle end.
* Merge branch 'gallium-index-bias'José Fonseca2010-04-208-43/+63
|\
| * draw: No need to rebase for elt_bias.José Fonseca2010-04-201-7/+5
| | | | | | | | | | | | | | As we are rebasing to min_index + elt_bias, and the vertex buffer has no elt_bias. I still don't know how to exercise this code. I hope this is now right.
| * draw: Fix cache elt_bias implementation.José Fonseca2010-04-201-5/+8
| |
| * draw: Fix typo resulting from bad regular expression in index bias addition.José Fonseca2010-04-201-4/+4
| |
| * draw: Implement index bias.José Fonseca2010-04-198-46/+65
| |
* | draw llvm: Move dereference of pointer after NULL check.Vinson Lee2010-04-201-1/+3
| |
* | draw llvm: Remove unnecessary header.Vinson Lee2010-04-191-1/+0
| |
* | draw llvm: make sure use_llvm isn't used when not definedZack Rusin2010-04-191-1/+1
| |
* | draw llvm: fix typo (boolean, not bool)Zack Rusin2010-04-191-1/+1
| |
* | draw llvm: allow runtime switching of pipelines (yes/no to llvm)Zack Rusin2010-04-192-1/+4
| | | | | | | | use DRAW_USE_LLVM to disable or enable (default) llvm
* | draw llvm: fix constructor messZack Rusin2010-04-193-28/+9
| | | | | | | | use just one constructor to figure out whether to use llvm.
* | gallium/draw: use a local var to simplify some codeBrian Paul2010-04-191-8/+8
| |
* | Merge branch '7.8'Brian Paul2010-04-197-41/+187
|\ \ | |/ |/| | | | | | | | | | | Conflicts: src/gallium/auxiliary/draw/draw_context.c src/gallium/auxiliary/draw/draw_pipe_aaline.c src/gallium/drivers/llvmpipe/lp_context.c
| * gallium/draw: use correct rasterization state for wide/AA points/linesBrian Paul2010-04-197-41/+186
| | | | | | | | | | | | | | | | | | | | | | When points or lines are decomposed into triangles, we need to be sure to disable polygon culling, stippling, "un-filled" modes, etc. This patch sets the rasterization state to disable those things prior to drawing points/lines with triangles, then restores the previous state afterward. The new piglit point-no-line-cull test checks this problem & solution.
* | draw: Cosmetic cleanups and comments.José Fonseca2010-04-184-4/+10
| |
* | draw llvm: Remove unnecessary header.Vinson Lee2010-04-161-1/+0
| |
* | gallium/draw: fix breakage from moving lp_bld_* filesBrian Paul2010-04-162-2/+2
| |