summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_vs.c
Commit message (Collapse)AuthorAgeFilesLines
* draw: implement TGSI_PROPERTY_VS_WINDOW_SPACE_POSITIONMarek Olšák2014-12-091-0/+2
| | | | | | | Required by Nine. Tested with util_run_tests. It's added to softpipe, llvmpipe, and r300g/swtcl. Tested-by: David Heidelberg <david@ixit.cz>
* draw: fixes for vertex shaders outputting layer or viewport indexRoland Scheidegger2014-11-191-1/+3
| | | | | | | | | | Mostly add a couple cases so we don't just check gs for this. There's only one gotcha, the built-in vp transform in the llvm vs can't handle it (this would be fixable though non-trivial due to vp index being non-constant for the SoA outputs, but we don't use it if there's a gs neither - the whole clip/vp transform integration there is suboptimal). Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* draw: do not use draw_get_option_use_llvm() inside draw execution pathsRoland Scheidegger2014-05-081-2/+2
| | | | | | | | | | | | | | 1c73e919a4b4dd79166d0633075990056f27fd28 made it possible to not allocate the tgsi machine if llvm was used. However, draw_get_option_use_llvm() is not reliable after draw context creation, since drivers can explicitly request a non-llvm draw context even if draw_get_option_use_llvm() would return true (and softpipe does just that) which leads to crashes. Thus use draw->llvm to determine if we're using llvm or not instead (and make draw->llvm available even if HAVE_LLVM is false so we don't have to put even more ifdefs). Cc: "10.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
* draw/llvm: reduce memory usageZack Rusin2014-04-241-4/+7
| | | | | | | | | | Lets make draw_get_option_use_llvm function available unconditionally and use it to avoid useless allocations when LLVM paths are active. TGSI machine is never used when we're using LLVM. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: José Fonseca <jfonseca@vmware.com>
* s/Tungsten Graphics/VMware/José Fonseca2014-01-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the old copyright name is creating unnecessary confusion, hence this change. This was the sed script I used: $ cat tg2vmw.sed # Run as: # # git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed # # Rename copyrights s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g /Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./ s/TUNGSTEN GRAPHICS/VMWARE/g # Rename emails s/alanh@tungstengraphics.com/alanh@vmware.com/ s/jens@tungstengraphics.com/jowen@vmware.com/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\?@tungstengraphics.com/jfonseca@vmware.com/g s/keithw\?@tungstengraphics.com/keithw@vmware.com/g s/michel@tungstengraphics.com/daenzer@vmware.com/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/zack@tungstengraphics.com/zackr@vmware.com/ # Remove dead links s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g # C string src/gallium/state_trackers/vega/api_misc.c s/"Tungsten Graphics, Inc"/"VMware, Inc"/ Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium/draw: add limits to the clip and cull distancesZack Rusin2013-06-131-5/+5
| | | | | | | | | | | There are strict limits on those registers. Define the maximums and use them instead of magic numbers. Also allows us to add some extra sanity checks. Suggested by Brian. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* draw: implement distance cullingZack Rusin2013-06-101-0/+3
| | | | | | | | | | | Works similarly to clip distance. If the cull distance is negative for all vertices against a specific plane then the primitive is culled. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* draw: implement support for multiple viewportsZack Rusin2013-05-251-7/+0
| | | | | | | | | | | This adds support for multiple viewports to the draw module. Multiple viewports depend on the presence of geometry shaders which can write the viewport index. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: José Fonseca<jfonseca@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* draw/llvmpipe: allow independent so attachments to the vsZack Rusin2013-04-031-0/+13
| | | | | | | | | | | | | | When geometry shaders are present, one needs to be able to create an empty geometry shader with stream output that needs to be resolved later and attached to the currently bound vertex shader. Lets add support for it to llvmpipe and draw. draw allows attaching independent stream output info to any vertex shader and llvmpipe resolves at draw time which vertex shader the given empty geometry shader should be linked to. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: José Fonseca <jfonseca@vmware.com>
* draw/llvmpipe: fix transform feedback position + enable other extensionsDave Airlie2012-12-141-0/+1
| | | | | | | | | | | | | | | | This builds on the previous draw/softpipe patch. So llvmpipe does streamout calls after clip/viewport stages, but we have the pre-clip position stored for later use, so when we are doing transform feedback, and its the position vertex grab the vertex from the stored pre clip position. The perfect fix is too probably add a codegen transform feedback stage in between shader and clip stages, but this is good enough for now. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* draw: remove some dead constant buffer codeBrian Paul2012-12-061-49/+0
| | | | | | | | | Remove the draw_vs_set_constants() and draw_gs_set_constants() functions and the draw->vs.aligned_constants, draw->vs.aligned_constant_storage and draw->vs.const_storage_size fields. None of it was used. Reviewed-by: José Fonseca <jfonseca@vmware.com>
* draw: move tgsi-related state into a tgsi sub-structBrian Paul2012-08-161-3/+3
| | | | To better organize things a bit.
* draw: clipdistance support (v2)Dave Airlie2012-01-111-0/+7
| | | | | | | | | | Add support for using the clipdistance instead of clip plane. Passes all piglit clipdistance tests. v2: fixup some comments from Brian in review. Signed-off-by: Dave Airlie <airlied@redhat.com>
* draw/softpipe: add clip vertex support. (v2)Dave Airlie2012-01-111-0/+9
| | | | | | | | | | | | | | | | softpipe always clipped using the position vector, however for unclipped vertices it stored the position in window coordinates, however when position and clipping are separated, we need to store the clip-space position and the clip-space vertex clip, so we can interpolate both separately. This means we have to take the clip space position and store it to use later. This allows softpipe to pass all the clip-vertex piglit tests. v2: fix llvm draw regression, the structure being passed into llvm needed updating, remove some hardcoded ints that should have been enums while there. Signed-off-by: Dave Airlie <airlied@redhat.com>
* draw: Handle failure to allocate aligned_constant_storage.José Fonseca2011-11-141-3/+9
| | | | | | | | Also, actually update const_storage_size, therefore avoiding to unnecessarily reallocate aligned_constant_storage every single time draw_vs_set_constants() is called. Reviewed-by: Brian Paul <brianp@vmware.com>
* Remove tgsi_sse2.José Fonseca2011-11-081-26/+1
| | | | tgsi_exec is simple. llvm is fast. tgsi_sse2 ends up being neither.
* draw: implement vertex color clamping, and disable SSE and PPC pathsLuca Barbieri2011-03-311-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (some little changes by Marek Olšák) Squashed commit of the following: commit 737c0c6b7d591ac0fc969a7590e1691eeef0ce5e Author: Luca Barbieri <luca@luca-barbieri.com> Date: Fri Aug 27 02:13:57 2010 +0200 draw: disable SSE and PPC paths (use LLVM instead) These paths don't support vertex clamping, and are anyway obsoleted by LLVM. If you want to re-enable them, add vertex clamping and test that it works with the ARB_color_buffer_float piglit tests. commit fed3486a7ca0683b403913604a26ee49a3ef48c7 Author: Luca Barbieri <luca@luca-barbieri.com> Date: Thu Aug 26 18:27:38 2010 +0200 draw_llvm: respect vertex color clamp commit ef0efe9f3d1d0f9b40ebab78940491d2154277a9 Author: Luca Barbieri <luca@luca-barbieri.com> Date: Thu Aug 26 18:26:43 2010 +0200 draw: respect vertex clamping in interpreter path
* draw: s/varient/variant/Brian Paul2010-12-161-20/+20
|
* gallium: implement bounds checking for constant buffersBrian Paul2010-07-291-2/+14
| | | | | | Plumb the constant buffer sizes down into the tgsi interpreter where we can do bounds checking. Optional debug code warns upon out-of-bounds reading. Plus add a few other assertions in the TGSI interpreter.
* draw: limit the number of vertex shader variants kept aroundZack Rusin2010-06-251-0/+5
| | | | | | | 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.
* draw: Disable rtasm compilation when using LLVM.José Fonseca2010-05-031-6/+10
| | | | Saves time and trouble.
* draw: remove extra semicolonsBrian Paul2010-04-281-1/+1
|
* gallium: Convert some uses of get option to staticJakob Bornecrantz2010-04-231-2/+2
|
* draw: Remove draw_vs_llvm.c.José Fonseca2010-04-201-6/+3
| | | | | | To silence some warnings. Super-seeded by Zack's new llvm middle end.
* draw: Add assert to check input of memcpy.Vinson Lee2010-02-141-0/+1
|
* gallium: Rename PIPE_MAX_CONSTANT to PIPE_MAX_CONSTANT_BUFFERS.Michal Krol2010-01-281-1/+1
|
* gallium: Enable multiple constant buffers for vertex and geometry shaders.Michal Krol2010-01-281-16/+24
|
* draw: Add missing header include.Michal Krol2010-01-151-1/+1
|
* draw: Add GALLIUM_DUMP_VS environment variable.Luca Barbieri2010-01-151-0/+6
| | | | | Add GALLIUM_DUMP_VS to dump the vertex shader to the console like GALLIUM_DUMP_FS in softpipe.
* gallium: more work for edgeflags changesRoland Scheidegger2009-12-141-0/+4
| | | | | fixes, cleanups, etc. not working yet
* gallium: reduce recursive include of tgsi_exec.hKeith Whitwell2009-07-161-0/+2
| | | | A lot of draw code no longer needs to see this header.
* gallium: proper constructor and destructor for tgsi_exec_machineKeith Whitwell2009-07-161-18/+3
| | | | | Centralize the creation, initialization and destruction of this struct. Use align_malloc instead of home-brew alternatives.
* draw: Avoid integer overflow converting pointers on 64bit archs.José Fonseca2008-12-311-1/+1
| | | | Not really an error, as we only care for the lower 4 bits.
* gallium: PPC vertex shader supportBrian Paul2008-10-221-1/+4
| | | | Works, but dead code lingering, debug code present, etc.
* gallium: refactor/replace p_util.h with util/u_memory.h and util/u_math.hBrian Paul2008-08-241-1/+5
| | | | Also, rename p_tile.[ch] to u_tile.[ch]
* gallium: Allow draw module to work on non-x86 platforms again.Michel Dänzer2008-07-021-0/+2
|
* draw: don't assume vertex position is in data[0]Keith Whitwell2008-06-111-0/+11
|
* draw: Fix MSVC warnings.José Fonseca2008-06-021-3/+3
|
* draw: make sure constant buffer data is aligned before passing to aos.cKeith Whitwell2008-05-291-1/+18
|
* draw: share machineKeith Whitwell2008-05-291-3/+40
|
* draw: create specialized vs varients incorporating fetch & emitKeith Whitwell2008-05-231-1/+82
|
* draw: move some state into a new 'vs' areaKeith Whitwell2008-05-231-4/+31
|
* draw: rename draw_vertex_shader.c -> draw_vs.cKeith Whitwell2008-04-191-0/+85