summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_scan.h
Commit message (Collapse)AuthorAgeFilesLines
* tgsi/scan: remember sampler view typesMarek Olšák2016-08-291-0/+1
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* tgsi/scan: add tgsi_scan_arraysNicolai Hähnle2016-08-171-0/+17
| | | | Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* tgsi/scan: add uses_derivatives (v2)Nicolai Hähnle2016-06-071-0/+1
| | | | | | | | | | | | v2: - TG4 does not calculate derivatives (Ilia) - also handle SAMPLE* instructions (Roland) Cc: 12.0 <mesa-stable@lists.freedesktop.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v1) Reviewed-by: Brian Paul <brianp@vmware.com> (v1) Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* tgsi: collect texture sampler target info in tgsi_scan_shader()Brian Paul2016-03-291-0/+1
| | | | | | | | | | | | | | | Texture sample instructions specify a sampler unit and texture target such as "1D", "2D", "CUBE", etc. Sampler view declarations also specify the sampler unit and texture target. This patch checks that the texture instructions agree with the declarations and collects the texture target type for each sampler unit. v2: only compare instruction's texture target to the sampler view declaration target if the instruction is a TEX instruction, not a SAMPLE instruction. Reviewed-by: José Fonseca <jfonseca@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* tgsi/scan: add writes_memory to flag presence of stores or atomicsNicolai Hähnle2016-03-211-0/+1
| | | | Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* tgsi/scan: track which shader images are really buffersNicolai Hähnle2016-03-211-0/+4
| | | | | Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* tgsi/scan: add images_writemaskNicolai Hähnle2016-03-211-0/+5
| | | | | Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* tgsi/scan: count memory instructionsMarek Olšák2016-03-011-0/+1
| | | | | | for radeonsi Reviewed-by: Brian Paul <brianp@vmware.com>
* tgsi/scan: add tgsi_shader_info::reads_samplemaskMarek Olšák2016-02-021-0/+1
|
* tgsi/scan: set which color components are read by a fragment shaderMarek Olšák2016-01-071-0/+1
| | | | | | This will be used by radeonsi. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
* tgsi/scan: set if a fragment shader writes sample maskMarek Olšák2016-01-071-0/+1
| | | | | | This will be used by radeonsi. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
* tgsi/scan: add flag colors_writtenMarek Olšák2015-12-111-0/+1
| | | | | | | This is a prerequisite for the following r600g fix. Cc: 11.0 11.1 <mesa-stable@lists.freedesktop.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* tgsi/scan: add info about declared samplers (v2)Marek Olšák2015-10-091-0/+1
| | | | v2: get it from declarations, not instructions
* tgsi/scan: add interpolation info into tgsi_shader_infoMarek Olšák2015-10-031-1/+12
| | | | Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* tgsi/scan: add support to figure out max nesting depthRob Clark2015-09-131-0/+5
| | | | | | | | | Sometimes a useful thing for compilers (or, for example, tgsi_to_nir) to know. And pretty trivial for scan to figure this out for us. Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Brian Paul <brianp@vmware.com>
* tgsi/scan: add uses_doubles to tgsi scannerDave Airlie2015-09-021-1/+1
| | | | | | | This allows drivers to work out if a shader contains any double opcodes easily. Signed-off-by: Dave Airlie <airlied@redhat.com>
* draw/tgsi: implement geom shader invocation support.Dave Airlie2015-06-231-0/+1
| | | | | | | | This is just for softpipe, llvmpipe won't work without some changes. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* tgsi/scan: get more information about arrays and handle arrays correctly (v2)Marek Olšák2015-06-051-0/+4
| | | | v2: use less memory for the information
* 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 <imirkin@alum.mit.edu> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* tgsi: track max array per fileRob Clark2015-01-071-0/+2
| | | | | | | | | | | | 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 <robclark@freedesktop.org>
* tgsi: keep track of read vs written indirectsRob Clark2015-01-071-0/+6
| | | | | | | | | | 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 <robclark@freedesktop.org> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* tgsi: add uses_centroid into tgsi_shader_infoMarek Olšák2015-01-071-0/+1
|
* gallium: add TGSI_SEMANTIC_VERTEXID_NOBASE and TGSI_SEMANTIC_BASEVERTEXRoland Scheidegger2014-12-161-0/+2
| | | | | | | | | | | | | | | | | | | 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 <brianp@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* tgsi: add tgsi_shader_info::writes_clipvertexMarek Olšák2014-12-101-0/+1
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* tgsi: add clip and cull distance writemasks into tgsi_shader_infoMarek Olšák2014-12-101-0/+2
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* tgsi: add tgsi_shader_info::writes_psizeMarek Olšák2014-12-101-0/+1
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* tgsi: change tgsi_shader_info::properties to a one-dimensional arrayMarek Olšák2014-10-041-1/+1
| | | | | | Reviewed-by: Roland Scheidegger <sroland@vmware.com> v2: fix svga too
* tgsi: remove some not so useful variables from tgsi_shader_infoMarek Olšák2014-10-041-3/+0
|
* tgsi: simplify shader properties in tgsi_shader_infoMarek Olšák2014-10-041-5/+1
| | | | Use an array of properties indexed by TGSI_PROPERTY_* definitions.
* 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 <imirkin@alum.mit.edu> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* s/Tungsten Graphics/VMware/José Fonseca2014-01-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* tgsi/scan: set maximum index for each constant bufferMarek Olšák2013-11-041-0/+1
|
* tgsi: add info about MSAA samplers to tgsi_shader_infoMarek Olšák2013-08-151-0/+1
| | | | Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* tgsi: detect prim id and front face usage in fsZack Rusin2013-08-021-0/+1
| | | | | | | | | Adding code to detect the usage of prim id and front face semantics in fragment shaders. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* tgsi: rename the TGSI fragment kill opcodesBrian Paul2013-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | | TGSI_OPCODE_KIL and KILP had confusing names. The former was conditional kill (if any src component < 0). The later was unconditional kill. At one time KILP was supposed to work with NV-style condition codes/predicates but we never had that in TGSI. This patch renames both opcodes: TGSI_OPCODE_KIL -> KILL_IF (kill if src.xyzw < 0) TGSI_OPCODE_KILP -> KILL (unconditional kill) Note: I didn't just transpose the opcode names to help ensure that I didn't miss updating any code anywhere. I believe I've updated all the relevant code and comments but I'm not 100% sure that some drivers had this right in the first place. For example, the radeon driver might have llvm.AMDGPU.kill and llvm.AMDGPU.kilp mixed up. Driver authors should review their code. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* gallivm: do per-pixel lod calculations for explicit lodRoland Scheidegger2013-07-041-0/+2
| | | | | | | | | | | | | | | | | | | | | d3d10 requires per-pixel lod calculations for explicit lod, lod bias and explicit derivatives, and we should probably do it for OpenGL too - at least if they are used from vertex or geometry shaders (so doesn't apply to lod bias) this doesn't just affect neighboring pixels. Some code was already there to handle this so fix it up and enable it. There will no doubt be a performance hit unfortunately, we could do better if we'd knew we had a real vector shift instruction (with variable shift count) but this requires AVX2 on x86 (or a AMD Bulldozer family cpu). Don't do anything for lod bias and explicit derivatives yet, though no special magic should be needed for them neither. Likewise, the size query is still broken just the same. v2: Use information if lod is a (broadcast) scalar or not. The idea would be to base this on the actual value, for now just pretend it's a scalar in fs and not a scalar otherwise (so, per-pixel lod is only used in gs/vs but same code is generated for fs as before). Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* gallium: add a cull distance semanticZack Rusin2013-06-101-0/+1
| | | | | | | | | | | | | cull distance is analogous to clip distance. If a register is given this semantic, then the values in it are assumed to be a float32 distance to a plane. Primitives will be completely discarded if the plane distance for all of the vertices in the primitive are < 0. 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>
* gallium/tgsi: add missing string for layer semanticRoland Scheidegger2013-06-061-0/+1
| | | | | | Also report if a shader writes the layer semantic Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium: Add support for multiple viewportsZack Rusin2013-05-251-0/+1
| | | | | | | | | | | | Gallium supported only a single viewport/scissor combination. This commit changes the interface to allow us to add support for multiple viewports/scissors. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Reviewed-by: José Fonseca<jfonseca@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* draw: Implement support for primitive idZack Rusin2013-04-031-0/+1
| | | | | | | We were largely ignoring primitive id. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: José Fonseca <jfonseca@vmware.com>
* tgsi_scan: add support to count number of output clip distancesDave Airlie2012-01-111-0/+1
| | | | | | Just add support to the scanner to count the number of clip distances. Signed-off-by: Dave Airlie <airlied@redhat.com>
* gallium: add TGSI_SEMANTIC_VERTEXIDChristoph Bumiller2011-11-141-0/+1
|
* tgsi: Check in scan for fs position and depth readsJakob Bornecrantz2011-09-221-0/+2
|
* tgsi: add info fields for fragcoord origin, center, etcBrian Paul2011-07-211-0/+3
|
* tgsi: new tgsi_shader_info fields for system valuesBrian Paul2010-12-081-0/+4
|
* tgsi: add scanner support for centroid inputsDave Airlie2010-10-151-0/+1
|
* gallium/tgsi: add support for stencil writes.Dave Airlie2010-10-131-0/+1
| | | | | | this adds the capability + a stencil semantic id, + tgsi scan support. Signed-off-by: Dave Airlie <airlied@redhat.com>
* tgsi: added tgsi_shader_info::indirect_files fieldBrian Paul2010-07-211-0/+6
| | | | Indicates which register files are accessed with indirect addressing.
* tgsi: Drop uses_fogcoord and uses_frontfacing from tgsi_scan.José Fonseca2010-06-011-2/+0
| | | | | | | It was not used anywhere; the code was buggy (it didn't take care of indirect registers and could potential cause buffer underflows) and the same effect can now be easily achieved by just by looking at input_semantic_name[] and input_usage_mask[].
* tgsi: Determine which shader input channels are effectively.José Fonseca2010-06-011-0/+1
| | | | | | TGSI's UsageMask flag is never set. We can move this logic into tgsi_ureg, but there there are still cases where's not used, so this seems a better place for now.