aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_vs_exec.c
Commit message (Collapse)AuthorAgeFilesLines
* draw: whitespace, formatting fixes in draw_vs_exec.cBrian Paul2017-07-121-47/+43
| | | | Trivial.
* draw: s/unsigned/enum tgsi_semantic/Brian Paul2017-07-121-1/+1
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* draw: s/Elements/ARRAY_SIZE/Brian Paul2016-04-271-4/+4
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* tgsi: accept a starting PC value for exec machine.Dave Airlie2016-04-271-1/+1
| | | | | | | | This will be used later to restart barriered execution threads in compute, for now we just want to change the API. Acked-by: Roland Scheidegger <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* tgsi: move to using vector for system values.Dave Airlie2016-04-271-4/+4
| | | | | | | | | | For compute support some of the system values are .xyz types, so move to using a vector instead of a single channel. [airlied: squash swizzle fix from compute series]. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* draw: add support for passing buffers to vs/gs shaders.Dave Airlie2016-04-121-1/+3
| | | | | | | | Like the image code, but for shader buffers this time. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* tgsi: add support for buffer/atomic operations to tgsi_exec.Dave Airlie2016-04-121-1/+1
| | | | | | | | | This adds support for doing load/store/atomic operations on buffer objects. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* tgsi: set nonhelpermask for vertex shadersDave Airlie2016-04-121-0/+1
| | | | | | | | | | | For atomic operations we really need to avoid executing unnecessary shaders, so for some tests that just draw a single point we only want one vertex to get processed not 4, this fixes a number of the atomic counters tests. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* draw: add support for passing images to vs/gs shaders.Dave Airlie2016-03-311-1/+1
| | | | | | | | This just adds support for passing through images to the tgsi execution stage. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* tgsi: add support for image operations to tgsi_exec. (v2.1)Dave Airlie2016-03-311-1/+1
| | | | | | | | | | | | This adds support for load/store/atomic operations on images along with image tracking support. v2: add RESQ support. (Ilia) v2.1: constify interface (Brian) split get_image_coord_dim (Brian) Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* tgsi: drop unused set_exec/kill_mask interfaces.Dave Airlie2016-03-221-6/+0
| | | | | | | | | These don't get used and haven't been in git history from what I can see, so drop them. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallium/auxiliary: Sanitize NULL checks into canonical formEdward O'Callaghan2015-12-061-1/+1
| | | | | | | | | | Use NULL tests of the form `if (ptr)' or `if (!ptr)'. They do not depend on the definition of the symbol NULL. Further, they provide the opportunity for the accidental assignment, are clear and succinct. Signed-off-by: Edward O'Callaghan <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* draw: implement support for the VERTEXID_NOBASE and BASEVERTEX semantics.Roland Scheidegger2014-12-161-1/+13
| | | | | | This fixes 4 vertexid related piglit tests with llvmpipe due to switching behavior of vertexid to the one gl expects. (Won't fix non-llvm draw path since we don't get the basevertex currently.)
* 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" <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* draw/llvm: reduce memory usageZack Rusin2014-04-241-0/+2
| | | | | | | | | | 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 <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* 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/[email protected]/[email protected]/ s/[email protected]/[email protected]/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\[email protected]/[email protected]/g s/keithw\[email protected]/[email protected]/g s/[email protected]/[email protected]/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/[email protected]/[email protected]/ # 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 <[email protected]>
* gallium: Make TGSI_SEMANTIC_FOG register four-component wide.José Fonseca2013-11-211-6/+1
| | | | | | | | | | | | | | | | | | | | | | | D3D9 Shader Model 2 restricted the fog register to one component, http://msdn.microsoft.com/en-us/library/windows/desktop/bb172945.aspx , but that restriction no longer exists in Shader Model 3, and several WHCK tests enforce that. So this change: - lifts the single-component restriction TGSI_SEMANTIC_FOG from Gallium interface - updates the Mesa state tracker to enforce output fog has (f, 0, 0, 1) - draw module was updated to leave TGSI_SEMANTIC_FOG output registers alone Several gallium drivers that are going out of their way to clear TGSI_SEMANTIC_FOG components could be simplified in the future. Thanks to Si Chen and Michal Krol for identifying the problem. Testing done: piglit fogcoord-*.vpfp tests Reviewed-by: Roland Scheidegger <[email protected]>
* softpipe/draw/tgsi: simplify driver/tgsi sampler interfaceRoland Scheidegger2013-02-281-2/+1
| | | | | | | | | | | | | | | Use a single sampler adapter instead of per-sampler-unit samplers, and just pass along texture unit and sampler unit in the calls. The reason is that for dx10-style sample opcodes pre-wired samplers including all the texture state aren't really feasible (and for sample_i/sviewinfo we don't even have samplers). Of course right now softpipe doesn't actually do anything more than just look up all its pre-wired per-texunit/per-samplerunit sampler as it did before so this doesn't really achieve much except one more function call, however this is now all softpipe's fault (fixing that in a way which doesn't suck is still an unsolved problem). Reviewed-by: Jose Fonseca <[email protected]>
* draw: move tgsi-related state into a tgsi sub-structBrian Paul2012-08-161-3/+3
| | | | To better organize things a bit.
* draw: fix fog coord export.Dave Airlie2012-02-041-1/+6
| | | | | | | | This does what we do in the hw drivers, and only export the X. fixes the fogcoord.dp* tests. Signed-off-by: Dave Airlie <[email protected]>
* gallium: Prefix #defines in tgsi_exec.h with TGSI_Tom Stellard2012-01-301-1/+1
|
* tgsi/softpipe: add VertexID support.Dave Airlie2012-01-111-1/+8
| | | | | | | | | | This required changing the system value semantics, so we stored a system value per vertex, instance id is the only other system value we currently support, so I span it across the channels. This passes the 3 vertexid-* piglit tests + lots of instanceid tests. Signed-off-by: Dave Airlie <[email protected]>
* draw/softpipe: EXT_transform_feedback support (v2)Dave Airlie2012-01-101-0/+1
| | | | | | | | | | | This replaces the current code with an implementation compatible with the new gallium interface. I've left some of the remains of the interface intact so llvmpipe keeps building correctly, and I'll take a look at fixing llvmpipe up later. v2: fixup as per Brian's review Signed-off-by: Dave Airlie <[email protected]>
* draw: implement vertex color clamping, and disable SSE and PPC pathsLuca Barbieri2011-03-311-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (some little changes by Marek Olšák) Squashed commit of the following: commit 737c0c6b7d591ac0fc969a7590e1691eeef0ce5e Author: Luca Barbieri <[email protected]> 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 <[email protected]> Date: Thu Aug 26 18:27:38 2010 +0200 draw_llvm: respect vertex color clamp commit ef0efe9f3d1d0f9b40ebab78940491d2154277a9 Author: Luca Barbieri <[email protected]> Date: Thu Aug 26 18:26:43 2010 +0200 draw: respect vertex clamping in interpreter path
* Merge branch 'draw-instanced'Brian Paul2011-01-151-0/+6
|\ | | | | | | | | | | | | | | 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
| * draw: setup instance ID for VS interpreterBrian Paul2010-12-081-0/+6
| |
* | draw: s/varient/variant/Brian Paul2010-12-161-1/+1
|/
* gallium: implement bounds checking for constant buffersBrian Paul2010-07-291-4/+4
| | | | | | 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: put 'create' in the vs varient create function namesBrian Paul2010-04-281-1/+1
|
* gallium: Rename PIPE_MAX_CONSTANT to PIPE_MAX_CONSTANT_BUFFERS.Michal Krol2010-01-281-2/+2
|
* gallium: Enable multiple constant buffers for vertex and geometry shaders.Michal Krol2010-01-281-2/+4
|
* gallium: Implement 2D constant buffers for fragment shader in softpipe.Michal Krol2010-01-281-1/+1
|
* gallium: reduce recursive include of tgsi_exec.hKeith Whitwell2009-07-161-0/+1
| | | | A lot of draw code no longer needs to see this header.
* gallium: proper constructor and destructor for tgsi_exec_machineKeith Whitwell2009-07-161-1/+1
| | | | | Centralize the creation, initialization and destruction of this struct. Use align_malloc instead of home-brew alternatives.
* draw: added some inf/nan debug code (disabled)Brian Paul2009-05-011-0/+6
|
* draw: added Nan/Inf assertion in debug codeBrian Paul2009-03-311-0/+1
|
* gallium: added draw_texture_samplers() to support texture fetches from ↵Brian2008-12-041-2/+2
| | | | | | vertex shaders This may only be practical for the softpipe driver at this time.
* Merge commit 'origin/gallium-0.1' into gallium-0.2Brian Paul2008-11-051-0/+6
|\ | | | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/rtasm/rtasm_execmem.c src/mesa/shader/slang/slang_emit.c src/mesa/shader/slang/slang_log.c src/mesa/state_tracker/st_atom_framebuffer.c
| * gallium: call tgsi_set_exec_mask() and use exec mask in SSE ARL codeBrian Paul2008-11-051-0/+6
| | | | | | | | | | This prevents vertex shaders from referencing invalid memory locations when the shader is operating on less than four vertices or fragments.
* | gallium: fix the test in vs_exec_prepare() to avoid redundant bindingsBrian Paul2008-10-151-3/+1
| | | | | | | | Fixes regressions seen in progs/samples/prim.c, progs/demos/ray.c
* | draw: Silence compiler warnings on Windows.Michal Krol2008-09-141-1/+1
| |
* | gallium: avoid redundant tgsi_exec_machine_bind_shader() calls on draw exec pathBrian Paul2008-09-121-6/+11
|/ | | | | | | tgsi_exec_machine_bind_shader() isn't cheap so avoiding unecessary calls is a big win. A similar change should be done for softpipe's fragment exec path but extra care needs to be taken with the texture sampler state/params.
* gallium: refactor/replace p_util.h with util/u_memory.h and util/u_math.hBrian Paul2008-08-241-1/+2
| | | | Also, rename p_tile.[ch] to u_tile.[ch]
* Merge tgsi/exec and tgsi/util directories.José Fonseca2008-07-281-2/+2
|
* draw: create specialized vs varients incorporating fetch & emitKeith Whitwell2008-05-231-0/+2
|
* draw: move some state into a new 'vs' areaKeith Whitwell2008-05-231-1/+1
|
* gallium: in drivers, make copy of tokens passed to pipe->create_vs/fs_state()Brian Paul2008-05-171-4/+7
| | | | The caller can then free the token array immediately.
* draw: remove old vertex_shader->run() functionsKeith Whitwell2008-04-181-137/+0
|
* draw: split off all the extra functionality in the vertex shaderKeith Whitwell2008-04-181-21/+61
| | | | | | | | | | This will at least allow us to make the initial gains to get decent vertex performance much more quickly & with higher confidence of getting it right. At some later point can look again at code-generating all the fetch/cliptest/viewport extras in the same block as the vertex shader. For now, just need to get some decent baseline performance.
* draw: add vertex shader run_linear functionKeith Whitwell2008-04-171-10/+85
|