summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_llvm.c
AgeCommit message (Collapse)Author
2011-02-14gallium: remove pipe_vertex_buffer::max_indexMarek Olšák
This is redundant to pipe_draw_info::max_index and doesn't really fit in the optimizations I plan.
2011-01-24draw: Do not use LLVM's opaque types.José Fonseca
Contrary what the name may suggest, LLVM's opaque types are used for recursive types -- types whose definition refers itself -- so opaque types correspond to pre-declaring a structure in C. E.g.: struct node; struct link { .... struct node *next; }; struct node { struct link link; } Void pointers are also disallowed by LLVM. So the suggested way of creating what's commonly referred as "opaque pointers" is using byte pointer (i.e., uint8_t * ).
2011-01-15draw: add missing LP_CHECK_MEMBER_OFFSET()Brian Paul
2011-01-15Merge branch 'draw-instanced'Brian Paul
Conflicts: src/gallium/auxiliary/draw/draw_llvm.c src/gallium/drivers/llvmpipe/lp_state_fs.c src/glsl/ir_set_program_inouts.cpp src/mesa/tnl/t_vb_program.c
2010-12-09draw/llvm: remove extraneous conditionalBrian Paul
2010-12-08gallivm/llvmpipe: implement system values and instanceIDBrian Paul
2010-11-30gallivm/llvmpipe: squash merge of the llvm-context branchBrian Paul
This branch defines a gallivm_state structure which contains the LLVMBuilderRef, LLVMContextRef, etc. All data structures built with this object can be periodically freed during a "garbage collection" operation. The gallivm_state object has to be passed to most of the builder functions where LLVMBuilderRef used to be used. Conflicts: src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c src/gallium/drivers/llvmpipe/lp_state_setup.c
2010-10-28gallivm: Remove the EMMS opcodes.José Fonseca
Unnecessary now that lp_set_target_options() successful disables MMX code emission.
2010-10-21draw: fix typo in commentBrian Paul
2010-10-21draw: Remove unnecessary header.Vinson Lee
2010-10-20draw: use float version of LLVM Mul/Add instructionsBrian Paul
LLVM 2.8 is pickier about int vs float instructions and operands.
2010-10-20llvmpipe/draw: always enable LLVMAddInstructionCombiningPass()Brian Paul
We were working around an LLVM 2.5 bug but we're using LLVM 2.6 or later now. This basically reverts commit baddcbc5225e12052b3bc8c07a8b65243d76574d. This fixes the piglit bug/tri-tex-crash.c failure.
2010-10-19draw: Move loop variable declaration outside for loop.Vinson Lee
Fixes MSVC build.
2010-10-19draw: make sure viewport gets updated in draw llvm shaderKeith Whitwell
The viewport state was being baked in at compile time (oops...)
2010-10-19Merge branch 'llvm-cliptest-viewport'Keith Whitwell
2010-10-19draw: corrections to allow for different cliptest casesHui Qi Tay
2010-10-17llvmpipe: clean up fields in draw_llvm_variant_keyKeith Whitwell
2010-10-17draw: corrections for w coordinateHui Qi Tay
2010-10-14draw: sanitize llvm variant keyHui Qi Tay
Fixes recompilation, but seems to be broken with llvm 2.8.
2010-10-12draw/llvmpipe: replace DRAW_MAX_TEXTURE_LEVELS with PIPE_MAX_TEXTURE_LEVELSBrian Paul
There's no apparent reason for the former to exist. And they didn't even have the same value.
2010-10-10draw: some changes to allow for runtime changes to userclip planesdelphi
2010-10-04draw: added userclip planes and updated variant_keydelphi
2010-09-30draw: check for null sampler pointersBrian Paul
http://bugs.freedesktop.org/show_bug.cgi?id=30516
2010-09-29draw: pass sampler state down to llvm jit stateBrian Paul
Fixes a regression caused from the change to make min/max lod dynamic state. https://bugs.freedesktop.org/show_bug.cgi?id=30437
2010-09-29draw: added viewport and cliptest flagsHui Qi Tay
Corrections in store_clip to store clip coordinates in AoS form. Viewport & cliptest flag options based on variant key. Put back draw_pt_post_vs and now 2 paths based on whether clipping occurs or not.
2010-09-29draw: cliptest and viewport done in a single loop in vertex shaderHui Qi Tay
Cliptesting now done at the end of vs in draw_llvm instead of draw_pt_post_vs. Added viewport mapping transformation and further cliptesting to vertex shader in draw_llvm.c Alternative path where vertex header setup, clip coordinates store, cliptesting and viewport mapping are done earlier in the vertex shader. Still need to hook this up properly according to the return value of "draw_llvm_shader" function.
2010-09-25draw: Fullfil the new min_lod/max_lod/lod_bias/border_color dynamic stateJosé Fonseca
2010-08-22draw: reduce the size of the llvm variant keyKeith Whitwell
2010-08-16draw_llvm: fix segfaults on non-SSE2 CPUs where it is disabled (v2)Luca Barbieri
Changes in v2: - Change function name Currently draw_llvm refuses to create itself on non-SSE2 CPUs due to an alleged LLVM bug. However, this is implemented improperly, because other parts of draw still attempt to access draw->llvm, resulting in segfaults. Instead, put the check in debug_get_option_draw_use_llvm, check that before calling draw_llvm_create, and then check whether draw->llvm is non-null everywhere else.
2010-08-08draw: Remove unused variable.José Fonseca
2010-08-08draw: Use the correct type for integersnobled
Two integers were being operated on as a vector of floats in draw_llvm_generate(). This bug got uncovered by fixing this bug: http://bugs.freedesktop.org/29407
2010-07-30llvmpipe: Fix implicit declaration of lp_func_delete_body warnings.Vinson Lee
2010-07-30llvmpipe: delete function bodies after generating machine codeZack Rusin
2010-07-29draw: Also emit EMMS on generated LLVM IR.José Fonseca
2010-07-22draw: re-order optimization passes depending on LLVM version, 32/64-bitBrian Paul
This is a work-around for an apparent bug in LLVM seen with piglit's glsl-vs-sqrt-zero test.
2010-07-19draw: fix incorrect instancing divisor in LLVM codeBrian Paul
2010-07-16draw/llvm: adjust the instance id at run timeZack Rusin
fixes instancing in draw llvm
2010-07-16draw: use the instance id when fetching vertex dataZack Rusin
2010-07-08draw: Fix off-by-one error in assert.Vinson Lee
textures is an array of size PIPE_MAX_VERTEX_SAMPLERS.
2010-07-06draw: make sure softpipe doesn't crash with vertex tex samplingZack Rusin
softpipe doesn't implement the draw's llvm tex sampling interface so make sure draw can handle the cases where the driver doesn't implement the interface
2010-07-06draw: implement vertex texture sampling using llvmZack Rusin
2010-06-25draw: limit the number of vertex shader variants kept aroundZack Rusin
we used to create and cache unltimited number of variant, this change limits the number of variants kept around to a fixed number. the change is based on a similar patch by Roland for llvmpipe fragment shaders.
2010-06-16draw: add alloc checkAlan Hourihane
2010-05-30draw: Use pointer_to_func() instead of custom wrappers.José Fonseca
2010-05-15draw: Use GALLIVM_DEBUG opt.José Fonseca
2010-05-13draw: silence casting warningsBrian Paul
2010-05-08gallivm: Add an alternative to LLVMDumpValue that works with Windows GUI apps.José Fonseca
2010-05-06gallivm: Require SSE2 for draw_llvm/llvmpipe due to LLVM PR6960.Török Edwin
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 <edwintorok@gmail.com> Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-05-03Reorder LLVM passes, running mem2reg earlier.Török Edwin
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 <edwintorok@gmail.com> Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-04-30draw: Fix memory leaks in llvm code.José Fonseca