aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi
Commit message (Collapse)AuthorAgeFilesLines
* tgsi: also dump label for TGSI_OPCODE_BGNSUB opcodeBrian Paul2015-04-151-0/+1
| | | | | | So we can see the label associated with subroutines. Reviewed-by: José Fonseca <[email protected]>
* tgsi: fix out-of-bounds access for cube arraysIlia Mirkin2015-03-261-1/+1
| | | | | | | | | | The CUBE_ARRAY case uses r[4]. Make sure that the stack variable is there. Noticed by Coverity. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* tgsi: handle bitwise opcodes in tgsi_opcode_infer_type (v2)Marek Olšák2015-03-161-0/+8
| | | | | | v2: set the same types as the destination type in tgsi_exec Reviewed-by: Ilia Mirkin <[email protected]>
* gallium: add FMA and DFMA opcodes (v3)Marek Olšák2015-03-163-2/+4
| | | | | | | | | Needed by ARB_gpu_shader5. v2: select DMAD for FMA with double precision v3: add and select DFMA Reviewed-by: Ilia Mirkin <[email protected]>
* nouveau: Fix build, invalid extern "C" around header inclusion.Mark Janes2015-03-061-0/+7
| | | | | | | | | | | | A previous patch to fix header inclusion within extern "C" neglected to fix the occurences of this pattern in nouveau files. When the helper to detect this issue was pushed to master, it broke the build for the nouveau driver. This patch fixes the nouveau build. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89477 Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* tgsi/lowering: don't forget interp for BCOLOR inputsRob Clark2015-03-031-3/+7
| | | | | | | | To lower two sided color, tgsi_lowering creates additional BCOLOR inputs (matching up to the BCOLOR outputs on the vert shader). These inputs should copy the interpolation state of their matching COLOR input. Signed-off-by: Rob Clark <[email protected]>
* tgsi: avoid returning pointer to local var, make it staticIlia Mirkin2015-02-211-1/+1
| | | | | | | | Spotted by Coverity. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* tgsi: fix type-mismatch warningMarek Olšák2015-02-211-1/+1
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium: add shader cap for dldexp/dfracexp supportIlia Mirkin2015-02-191-0/+1
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* gallium: add a cap to enable double rounding opcodesIlia Mirkin2015-02-191-0/+2
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* gallium: add some more double opcodes to avoid unnecessary loweringIlia Mirkin2015-02-191-0/+5
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* softpipe/tgsi: expose doubles for softpipe.Dave Airlie2015-02-201-1/+1
| | | | | Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* tgsi: add support for flt64 constantsDave Airlie2015-02-207-6/+112
| | | | | | | | | | | | | | These act like flt32 except they take up two slots, and you can only add 2 x flt64 constants in one slot. The main reason they are different is we don't want to match half a flt64 constants against a flt32 constant in the matching code, we need to make sure we treat both parts of the flt64 as an single structure. Cleaned up printing/parsing by Ilia Mirkin <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallium: add double opcodes and TGSI execution (v4.2)Dave Airlie2015-02-202-16/+772
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for a set of double opcodes to TGSI. It is an update of work done originally by Michal Krol on the gallium-double-opcodes branch. The opcodes have a hint where they came from in the header file. v2: add unsigned/int <-> double v2.1: update docs. v3: add DRSQ (Glenn), fix review comments (Glenn). v4: drop DDIV v4.1: cleanups, fix some docs bugs, (Ilia) rework store_dest and fetch_source fns. (Ilia) 4.2: fixup float comparisons (Ilia) This is based on code by Michael Krol <[email protected]> Roland and Glenn also reviewed earlier versions. Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* tgsi/ureg: Add missing some missing opcodes opcode_tmp.hEric Anholt2015-02-061-0/+4
| | | | | | I wanted all of these for NIR-to-TGSI. Reviewed-by: Roland Scheidegger <[email protected]>
* tgsi/ureg: Move ureg_dst_register() to the header.Eric Anholt2015-02-062-28/+25
| | | | | | | I wanted to use it for nir-to-tgsi. The equivalent ureg_src_register() is also located here. Reviewed-by: Roland Scheidegger <[email protected]>
* tgsi: add tgsi_get_processor_type helper from radeonMarek Olšák2015-02-042-0/+14
| | | | | Reviewed-by: Glenn Kennard <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* tgsi: track max array per fileRob Clark2015-01-072-0/+4
| | | | | | | | | | | | NOTE IN[] and OUT[] don't need (have?) ArrayID's.. and TEMP[] can optionally have them. So we implicitly assume that ArrayID==0 always exists for each file. This is why array_max[file] is never less than zero. You can tell from indirect_files(_read/written) if the legacy array- id zero was actually used. Signed-off-by: Rob Clark <[email protected]>
* tgsi: keep track of read vs written indirectsRob Clark2015-01-072-0/+8
| | | | | | | | | | At least temporarily, I need to fallback to old compiler still for relative dest (for freedreno), but I can do relative src temp. Only a temporary situation, but seems easy/reasonable for tgsi-scan to track this. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* tgsi: add uses_centroid into tgsi_shader_infoMarek Olšák2015-01-072-0/+4
|
* gallium: add TGSI_SEMANTIC_VERTEXID_NOBASE and TGSI_SEMANTIC_BASEVERTEXRoland Scheidegger2014-12-163-0/+10
| | | | | | | | | | | | | | | | | | | Plus a new PIPE_CAP_VERTEXID_NOBASE query. The idea is that drivers not supporting vertex ids with base vertex offset applied (so, only support d3d10-style vertex ids) will get such a d3d10-style vertex id instead - with the caveat they'll also need to handle the basevertex system value too (this follows what core mesa already does). Additionally, this is also useful for other state trackers (for instance llvmpipe / draw right now implement the d3d10 behavior on purpose, but with different semantics it can just do both). Doesn't do anything yet. And fix up the docs wrt similar values. v2: incorporate feedback from Brian and others, better names, better docs. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* tgsi: add tgsi_shader_info::writes_clipvertexMarek Olšák2014-12-102-0/+4
| | | | Reviewed-by: Brian Paul <[email protected]>
* tgsi: add clip and cull distance writemasks into tgsi_shader_infoMarek Olšák2014-12-102-0/+6
| | | | Reviewed-by: Brian Paul <[email protected]>
* tgsi: add tgsi_shader_info::writes_psizeMarek Olšák2014-12-102-0/+4
| | | | Reviewed-by: Brian Paul <[email protected]>
* tgsi/lowering: add support to lower TXP (v2)Rob Clark2014-12-092-15/+34
| | | | | | | v2: actually do perspective divide for RECT/SHADOWRECT Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* gallium: Drop the unused CND opcode.Eric Anholt2014-11-244-19/+1
| | | | | | Nothing in the tree generates it. Reviewed-by: Jose Fonseca <[email protected]>
* gallium: Drop unused BRA opcode.Eric Anholt2014-11-243-6/+1
| | | | | | Never generated, and implemented in only nvfx vertprog. Reviewed-by: Jose Fonseca <[email protected]>
* gallium: Drop the unused SFL/STR opcodes.Eric Anholt2014-11-243-51/+2
| | | | | | Nothing generated them. Reviewed-by: Jose Fonseca <[email protected]>
* gallium: Drop the unused RFL opcode.Eric Anholt2014-11-243-58/+1
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* gallium: Drop unused X2D opcode.Eric Anholt2014-11-243-47/+1
| | | | | | Nothing in the tree generates it. Reviewed-by: Jose Fonseca <[email protected]>
* gallium: Drop the unused ARA opcode.Eric Anholt2014-11-243-6/+1
| | | | | | | | Nothing in the tree generated it. v2: Only drop ARA, not ARR as well. Reviewed-by: Jose Fonseca <[email protected]> (v2)
* gallium: Drop the unused RCC opcode.Eric Anholt2014-11-244-23/+1
| | | | | | Nothing in the tree generated it. Reviewed-by: Jose Fonseca <[email protected]>
* gallium: Drop the NRM and NRM4 opcodes.Eric Anholt2014-11-243-76/+2
| | | | | | | They weren't generated in tree, and as far as I know all hardware had to lower it to a DP, RSQ, MUL. Reviewed-by: Jose Fonseca <[email protected]>
* draw: fixes for vertex shaders outputting layer or viewport indexRoland Scheidegger2014-11-191-9/+6
| | | | | | | | | | 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 <[email protected]>
* tgsi/ureg: add ureg_UARL shortcut (v2)Christoph Bumiller2014-11-181-0/+1
| | | | | | | | v2: moved in in same order as in p_shader_tokens (thanks Brian) Acked-by: Jose Fonseca <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: David Heidelberg <[email protected]>
* tgsi/ureg: simplify code for declaring propertiesMarek Olšák2014-11-162-176/+12
| | | | Tested-by: Nick Sarnie <[email protected]>
* tgsi: fixup the string of VS_WINDOW_SPACE_POSITIONMarek Olšák2014-11-161-1/+1
| | | | Tested-by: Nick Sarnie <[email protected]>
* tgsi: add a tgsi_free_tokens() functionBrian Paul2014-10-312-0/+13
| | | | | | To match tgsi_alloc_tokens(). Reviewed-by: Charmaine Lee <[email protected]>
* gallium: add PIPE_SHADER_CAP_MAX_OUTPUTS and use it in st/mesaMarek Olšák2014-10-211-0/+2
| | | | | | | | With 5 shader stages and various combinations of enabled and disabled shaders, the maximum number of outputs in one shader doesn't have to be equal to the maximum number of inputs in the following shader. v2: return 32 for softpipe and llvmpipe
* gallium: Rename freedreno parts of tgsi_lowering.[ch].Eric Anholt2014-10-082-31/+31
| | | | Acked-by: Rob Clark <[email protected]>
* gallium: Reformat tgsi_lowering.c for the normal style.Eric Anholt2014-10-082-1204/+1201
| | | | Acked-by: Rob Clark <[email protected]>
* gallium: Copy fd_lowering.[ch] to tgsi_lowering.[ch] for code sharing.Eric Anholt2014-10-082-0/+1662
| | | | | | | | Lots of drivers need to transform the weird instructions in TGSI into reasonable scalar ops, and this code can make those translations canonical. Acked-by: Rob Clark <[email protected]>
* tgsi: change tgsi_shader_info::properties to a one-dimensional arrayMarek Olšák2014-10-042-4/+3
| | | | | | Reviewed-by: Roland Scheidegger <[email protected]> v2: fix svga too
* tgsi: remove some not so useful variables from tgsi_shader_infoMarek Olšák2014-10-042-11/+0
|
* tgsi: simplify shader properties in tgsi_shader_infoMarek Olšák2014-10-042-40/+25
| | | | Use an array of properties indexed by TGSI_PROPERTY_* definitions.
* tgsi: fix Semantic.Name assignment in tgsi_transform_input_decl()Brian Paul2014-09-301-1/+1
| | | | | | | Assign the sem_name parameter, not TGSI_SEMANTIC_GENERIC. Fixes polygon stipple regression. Reviewed-by: Charmaine Lee <[email protected]>
* gallium: replace pipe_type enum with tgsi_return_type enumBrian Paul2014-09-225-15/+16
| | | | | | | | | | | The only place the enum pipe_type was used is for the TGSI sampler view return type. So make it a TGSI type. Note: it appears this part of TGSI isn't used by anyone so it may be removed in the future. v2: the new name is tgsi_return_type, not tgsi_type. This means we can drop the previously posted tgsi_type -> tgsi_opcode_type patch. Reviewed-by: Roland Scheidegger <[email protected]>
* tgsi: add inst/decl helpers for tgsi_transform utilityBrian Paul2014-09-221-0/+333
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* tgsi: fix tgsi transform's epilog callbackBrian Paul2014-09-221-7/+15
| | | | | | | We want to call the caller's epilog callback when we find the TGSI END instruction, not after it. Reviewed-by: Charmaine Lee <[email protected]>
* tgsi: add prolog() method to tgsi_transform_contextBrian Paul2014-09-222-0/+13
| | | | | | | Called when the user can insert new decls, instructions. This could be used in a few places in the 'draw' module. Reviewed-by: Charmaine Lee <[email protected]>