summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_scan.h
Commit message (Collapse)AuthorAgeFilesLines
* tgsi/scan: record load/store/atomic image usageMarek Olšák2017-03-031-5/+3
| | | | Reviewed-by: Dave Airlie <[email protected]>
* tgsi/scan: add basic info about tessellation OUT and IN usesMarek Olšák2017-02-211-0/+8
| | | | | | not all of them will be used immediately Reviewed-by: Nicolai Hähnle <[email protected]>
* tgsi/scan: collect information about output usagemasksNicolai Hähnle2016-12-121-0/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* tgsi/scan: collect information about output vertex streamsNicolai Hähnle2016-12-121-0/+2
| | | | Reviewed-by: Marek Olšák <[email protected]>
* tgsi: store writes_primid when scanning tgsiTim Rowley2016-12-011-0/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* tgsi/scan: record if a shader writes the position outputMarek Olšák2016-11-211-0/+1
| | | | | Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* tgsi/scan: get information about shader buffer usageMarek Olšák2016-10-241-0/+4
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* tgsi/scan: handle indirect image indexing correctlyMarek Olšák2016-10-241-0/+2
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* tgsi/scan: get information about indirect 2D file accessMarek Olšák2016-10-241-0/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* tgsi/scan: get information about indirect CONST accessMarek Olšák2016-10-241-0/+2
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* tgsi/scan: remember sampler view typesMarek Olšák2016-08-291-0/+1
| | | | Reviewed-by: Brian Paul <[email protected]>
* tgsi/scan: add tgsi_scan_arraysNicolai Hähnle2016-08-171-0/+17
| | | | Reviewed-by: Marek Olšák <[email protected]>
* 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 <[email protected]> Reviewed-by: Marek Olšák <[email protected]> (v1) Reviewed-by: Brian Paul <[email protected]> (v1) Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* 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 <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* tgsi/scan: add writes_memory to flag presence of stores or atomicsNicolai Hähnle2016-03-211-0/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* tgsi/scan: track which shader images are really buffersNicolai Hähnle2016-03-211-0/+4
| | | | | Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* tgsi/scan: add images_writemaskNicolai Hähnle2016-03-211-0/+5
| | | | | Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* tgsi/scan: count memory instructionsMarek Olšák2016-03-011-0/+1
| | | | | | for radeonsi Reviewed-by: Brian Paul <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* 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 <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* 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 <[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-101-0/+1
| | | | Reviewed-by: Brian Paul <[email protected]>
* tgsi: add clip and cull distance writemasks into tgsi_shader_infoMarek Olšák2014-12-101-0/+2
| | | | Reviewed-by: Brian Paul <[email protected]>
* tgsi: add tgsi_shader_info::writes_psizeMarek Olšák2014-12-101-0/+1
| | | | Reviewed-by: Brian Paul <[email protected]>
* tgsi: change tgsi_shader_info::properties to a one-dimensional arrayMarek Olšák2014-10-041-1/+1
| | | | | | Reviewed-by: Roland Scheidegger <[email protected]> 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 <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* 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/[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]>
* 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 <[email protected]>
* 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 <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: José Fonseca<[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* draw: Implement support for primitive idZack Rusin2013-04-031-0/+1
| | | | | | | We were largely ignoring primitive id. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: José Fonseca <[email protected]>