aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_ureg.h
Commit message (Collapse)AuthorAgeFilesLines
* tgsi: remove ureg_label_insnMarc-André Lureau2017-02-101-7/+0
| | | | | | | Unused since commit 2897cb3dba9287011f9c43cd2f214100952370c0. Signed-off-by: Marc-André Lureau <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* st/glsl_to_tgsi: plumb the GS output stream qualifier through to TGSINicolai Hähnle2016-12-121-0/+1
| | | | | | Allow drivers to emit GS outputs in a smarter way. Reviewed-by: Marek Olšák <[email protected]>
* tgsi/ureg: add ureg_DECL_output_layoutNicolai Hähnle2016-10-121-0/+9
| | | | | | | | | For specifying an exact location/component. v2: change the order of parameters (Dave) Reviewed-by: Edward O'Callaghan <[email protected]> (v1) Reviewed-by: Dave Airlie <[email protected]> (v1)
* tgsi/ureg: add layout/component input declarationsNicolai Hähnle2016-10-121-0/+21
| | | | | | | v2: change the order of parameters (Dave) Reviewed-by: Edward O'Callaghan <[email protected]> (v1) Reviewed-by: Dave Airlie <[email protected]> (v1)
* gallium/tgsi: add support for 64-bit integer immediates.Dave Airlie2016-09-211-0/+10
| | | | | | | | | | This adds support to TGSI for 64-bit integer immediates. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* tgsi: Add support for global / private / input MEMORYHans de Goede2016-03-211-1/+1
| | | | | | | | | | | | | | | | Extend the MEMORY file support to differentiate between global, private and shared memory, as well as "input" memory. "MEMORY[x], INPUT" is intended to access OpenCL kernel parameters, a special memory type is added for this, since the actual storage of these (e.g. UBO-s) may differ per implementation. The uploading of kernel parameters is handled by launch_grid, "MEMORY[x], INPUT" allows drivers to use an access mechanism for parameter reads which matches with the upload method. Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> (v1) Reviewed-by: Samuel Pitoiset <[email protected]> (v2)
* gallium: add TGSI property NEXT_SHADERMarek Olšák2016-03-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Radeonsi needs to know which shader stage will execute after a shader in order to make the best decision about which shader variant to compile first. This is only set for VS and TES, because we don't need it elsewhere. VS has 3 variants: - next shader is FS - next shader is GS - next shader is TCS TES has 2 variants: - next shader is FS - next shader is GS Currently, radeonsi always assumes the next shader is FS, which is suboptimal, since st/mesa always knows which shader is next if the GLSL program is not a "separate shader". By default, ureg always sets "next shader is FS". Reviewed-by: Nicolai Hähnle <[email protected]>
* st/glsl_to_tgsi: provide Texture and Format information for image opsNicolai Hähnle2016-03-141-2/+6
| | | | | Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* tgsi/ureg: add shared variables support for compute shadersSamuel Pitoiset2016-02-131-0/+3
| | | | | | | | | | | This introduces TGSI_FILE_MEMORY for shared, global and local memory. Only shared memory is currently supported. Changes from v2: - introduce TGSI_FILE_MEMORY Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* tgsi: provide a way to encode memory qualifiers for SSBOIlia Mirkin2016-01-081-0/+13
| | | | | | | | | | Each load/store on most hardware can specify what caching to do. Since SSBO allows individual variables to also have separate caching modes, allow loads/stores to have the qualifiers instead of attempting to encode them in declarations. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* ureg: add buffer support to uregIlia Mirkin2016-01-081-0/+3
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* tgsi: add ureg support for image declsIlia Mirkin2016-01-081-0/+7
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* tgsi/ureg: remove index parameter from ureg_DECL_system_valueMarek Olšák2016-01-081-1/+0
| | | | | | | | It can be trivially derived from the number of already declared system values. This allows ureg users not to worry about which index to choose. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
* gallium: replace INLINE with inlineIlia Mirkin2015-07-211-58/+58
| | | | | | | | | | | | | | | | Generated by running: git grep -l INLINE src/gallium/ | xargs sed -i 's/\bINLINE\b/inline/g' git grep -l INLINE src/mesa/state_tracker/ | xargs sed -i 's/\bINLINE\b/inline/g' git checkout src/gallium/state_trackers/clover/Doxyfile and manual edits to src/gallium/include/pipe/p_compiler.h src/gallium/README.portability to remove mentions of the inline define. Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Marek Olšák <[email protected]>
* tgsi/ureg: don't emit in/out arrays if drivers don't support ranged declarationsMarek Olšák2015-06-051-1/+5
| | | | | | Softpipe, llvmpipe, r300g, and radeonsi pass tests. Other drivers need testing. Freedreno and nv30 are definitely broken. Other drivers seem to be alright.
* tgsi/ureg: add support for output array declarationsMarek Olšák2015-06-051-11/+27
|
* tgsi/ureg: add support for GS input array declarationsMarek Olšák2015-06-051-1/+3
|
* tgsi/ureg: rename and simplify ureg_DECL_gs_inputMarek Olšák2015-06-051-4/+3
| | | | | There is nothing special about it and it's used for tessellation shaders too.
* tgsi/ureg: add support for FS input array declarationsMarek Olšák2015-06-051-6/+23
|
* tgsi/ureg: allow ureg_dst to have dimension indicesIlia Mirkin2015-05-161-6/+53
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* tgsi: add support for flt64 constantsDave Airlie2015-02-201-0/+5
| | | | | | | | | | | | | | 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]>
* tgsi/ureg: Move ureg_dst_register() to the header.Eric Anholt2015-02-061-0/+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/ureg: simplify code for declaring propertiesMarek Olšák2014-11-161-34/+1
| | | | Tested-by: Nick Sarnie <[email protected]>
* gallium: Fix compiler warning.Jan Vesely2014-08-041-1/+1
| | | | | | | warning: type qualifiers ignored on function return type Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: switch dedicated centroid field to interpolation locationIlia Mirkin2014-07-091-1/+1
| | | | | | | | The new location field can be either center, centroid, or sample, which indicates the location that the shader should interpolate at. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* gallium: create TGSI_PROPERTY to disable viewport and clippingChristoph Bumiller2014-06-021-0/+4
| | | | | | Marek v2: add a cap Signed-off-by: Marek Olšák <[email protected]>
* tgsi_ureg: add property_gs_invocationsJordan Justen2014-02-201-0/+4
| | | | | | | | Fixes a build break in state_tracker/st_program.c Signed-off-by: Jordan Justen <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75278 Reviewed-by: Dave Airlie <[email protected]>
* tgsi: Prevent emission of instructions with empty writemask.José Fonseca2013-11-221-0/+34
| | | | | | | These degenerate instructions can often be emitted by state trackers when the semantics of instructions don't match precisely. Reviewed-by: Brian Paul <[email protected]>
* tgsi: Rework calls to ureg_emit_insn().José Fonseca2013-11-221-96/+104
| | | | | | Mere syntactical change. Reviewed-by: Brian Paul <[email protected]>
* tgsi/ureg: make the dst register match the src indirectionZack Rusin2013-05-031-3/+9
| | | | | | | | | | | In ureg src registers could have an indirect register that was either a temp or an addr register, while dst registers allowed only addr. That made moving between them a little difficult so make them behave the same way and allow temp's and addr registers as indirect files for both (tgsi supports it, just ureg didn't). Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* tgsi/ureg: Add a function to return the number of outputsZack Rusin2013-04-261-0/+6
| | | | | | | | We already hold the variable, just weren't providing access to it. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* tgsi: use separate structure for indirect address v2Christian König2013-03-191-0/+7
| | | | | | | | | | | | | | To further improve the optimization of source and destination indirect addressing we need the ability to store a reference to the declaration of the addressed operands. Since most of the fields in tgsi_src_register doesn't apply for an indirect addressing operand replace it with a separate tgsi_ind_register structure and so make room for extra information. v2: rename Declaration to ArrayID, put the ArrayID into () instead of [] Signed-off-by: Christian König <[email protected]>
* tgsi/ureg: implement support for array temporariesChristian König2013-03-191-11/+27
| | | | | | | Don't bother with free temporaries, just allocate them at the end and also emit them in their own declaration. Signed-off-by: Christian König <[email protected]>
* gallivm/tgsi: fix issues with sample opcodesRoland Scheidegger2013-02-161-0/+119
| | | | | | | | We need to encode them as Texture instructions since the NumOffsets field is encoded there. However, we don't encode the actual target in there, this is derived from the sampler view src later. Reviewed-by: Jose Fonseca <[email protected]>
* gallium/tgsi/ureg: Support local temporary emission.Francisco Jerez2012-05-111-0/+8
|
* gallium/tgsi: Split sampler views from shader resources.Francisco Jerez2012-05-111-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit splits the current concept of resource into "sampler views" and "shader resources": "Sampler views" are textures or buffers that are bound to a given shader stage and can be read from in conjunction with a sampler object. They are analogous to OpenGL texture objects or Direct3D SRVs. "Shader resources" are textures or buffers that can be read and written from a shader. There's no support for floating point coordinates, address wrap modes or filtering, and, unlike sampler views, shader resources are global for the whole graphics pipeline. They are analogous to OpenGL image objects (as in ARB_shader_image_load_store) or Direct3D UAVs. Most hardware is likely to implement shader resources and sampler views as separate objects, so, having the distinction at the API level simplifies things slightly for the driver. This patch introduces the SVIEW register file with a declaration token and syntax analogous to the already existing RES register file. After this change, the SAMPLE_* opcodes no longer accept a resource as input, but rather a SVIEW object. To preserve the functionality of reading from a sampler view with integer coordinates, the SAMPLE_I(_MS) opcodes are introduced which are similar to LOAD(_MS) but take a SVIEW register instead of a RES register as argument.
* gallium: add support for clip distancesBryan Cain2012-01-051-0/+6
|
* gallium: utility helper functions for stream outputMarek Olšák2011-12-151-4/+14
|
* gallium: implement ARB_conservative_depthMarek Olšák2011-12-101-0/+5
| | | | This adds a new TGSI property to represent the GLSL layout qualifier in TGSI.
* tgsi: add support for texture offsets to the TGSI IR. (v2)Dave Airlie2011-09-021-3/+9
| | | | | | | | | | | | | This adds tokens for texture offsets, to store 4 * swizzled vec 3 for use in TXF and other opcodes. It also contains TGSI exec changes for softpipe to use this code, along with GLSL->TGSI support for TXF. v2: add some more comments, add back padding I removed. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* tgsi: s/varient/variant/Brian Paul2011-06-071-2/+2
|
* gallium/tgsi: shuffle ureg_src structure to work around gcc4.6.0 issueJerome Glisse2011-02-251-14/+14
| | | | | | | | | | | | There is an issue with gcc 4.6.0 that leads to segfault/assert with mesa due to ureg_src size, reshuffling the structure member to better better alignment work around the issue. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47893 7.9 + 7.10 candidate Signed-off-by: Jerome Glisse <[email protected]>
* gallium: implement modern sampling schemeZack Rusin2011-01-241-0/+69
| | | | | | | | | | | largely a merge of the previously discussed origin/gallium-resource-sampling but updated. the idea is to allow arbitrary binding of resources, the way opencl, new gl versions and dx10+ require, i.e. DCL RES[0], 2D, FLOAT LOAD DST[0], SRC[0], RES[0] SAMPLE DST[0], SRC[0], RES[0], SAMP[0]
* gallium: add fragment shader property for color writes to all buffers. (v2)Dave Airlie2010-12-241-0/+4
| | | | | | | | | | For GL fragColor semantics we need to tell the pipe drivers that the fragment shader color result is to be replicated to all bound color buffers, this adds the basic TGSI + documentation. v2: fix missing comma pointed out by Tilman on mesa-dev. Signed-off-by: Dave Airlie <[email protected]>
* ureg: support centroid interpolationLuca Barbieri2010-09-271-4/+20
|
* tgsi: support 2d indirect addressingZack Rusin2010-06-111-6/+38
|
* mesa/st+tgsi: Provide a free callback to match with ureg_get_tokens().José Fonseca2010-05-111-0/+4
| | | | | | This fixes crashes with the memory debugging routines on Windows. NOTE: This is a candidate for the 7.8 stable branch
* gallium: Remove loop register file.José Fonseca2010-05-031-3/+0
| | | | | It was only used for D3D's REP/END/BGNFOR/ENDFOR. D3D's aL register is just like another address register now.
* tgsi: Add ureg_DECL_fs_input_cyl().Michal Krol2010-02-091-4/+18
| | | | Allows one to declare fragment shader inputs with cylindrical wrap info.
* Merge branch 'gallium-embedded'José Fonseca2010-02-031-0/+1
|\