aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi
Commit message (Collapse)AuthorAgeFilesLines
...
* gallium: add TGSI_PROPERTY_MUL_ZERO_WINSIlia Mirkin2017-01-231-1/+2
| | | | | | | | | This will be useful for proper D3D9 emulation, where this behavior is expected by some shaders. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* gallium: add FBFETCH opcode to retrieve the current sample valueIlia Mirkin2017-01-161-1/+1
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* tgsi: add DDIV instructionNicolai Hähnle2017-01-161-0/+2
| | | | | | | | | Double-precision division, to allow more precision than a DRCP + DMUL sequence. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/tgsi: fix overflow in parse propertyLi Qiang2017-01-111-3/+6
| | | | | | | | | | | In parse_identifier, it doesn't stop copying '*pcur' untill encounter the NULL. As the 'ret' has a fixed-size buffer, if the '*pcur' has a long string, there will be a buffer overflow. This patch avoid this. Signed-off-by: Li Qiang <[email protected]> Signed-off-by: Marek Olšák <[email protected]> Reviewed-by: Marc-André Lureau <[email protected]>
* gallium: remove TGSI_OPCODE_SUBMarek Olšák2017-01-058-34/+36
| | | | | | It's redundant with the source modifier. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: remove TGSI_OPCODE_ABSMarek Olšák2017-01-054-7/+1
| | | | | | It's redundant with the source modifier. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/glsl_to_tgsi: plumb the GS output stream qualifier through to TGSINicolai Hähnle2016-12-122-1/+21
| | | | | | Allow drivers to emit GS outputs in a smarter way. Reviewed-by: Marek Olšák <[email protected]>
* tgsi/scan: collect information about output usagemasksNicolai Hähnle2016-12-122-0/+2
| | | | Reviewed-by: Marek Olšák <[email protected]>
* tgsi/scan: collect information about output vertex streamsNicolai Hähnle2016-12-122-0/+19
| | | | Reviewed-by: Marek Olšák <[email protected]>
* tgsi: add Stream{X,Y,Z,W} fields to tgsi_declaration_semanticNicolai Hähnle2016-12-123-2/+77
| | | | | | | | | | | This is for geometry shader outputs. Without it, drivers have no way of knowing which stream each output is intended for, and have to conservatively write all outputs to all streams. Separate stream numbers for each component are required due to output packing. Reviewed-by: Marek Olšák <[email protected]>
* tgsi: fix the src type of TGSI_OPCODE_MEMBARMarek Olšák2016-12-071-0/+1
| | | | | | | It's a literal integer. The next commit will need this. Cc: 13.0 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* tgsi: store writes_primid when scanning tgsiTim Rowley2016-12-012-0/+4
| | | | Reviewed-by: Marek Olšák <[email protected]>
* tgsi/scan: record if a shader writes the position outputMarek Olšák2016-11-212-0/+3
| | | | | Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* tgsi/scan: use a big switch for scanning outputsMarek Olšák2016-11-211-40/+28
| | | | | Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: add PIPE_SHADER_CAP_LOWER_IF_THRESHOLDMarek Olšák2016-11-151-0/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* tgsi/scan: turn a huge if-else-if.. chain into a switch statementMarek Olšák2016-11-081-14/+30
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* tgsi/scan: fix images_buffers regressionMarek Olšák2016-11-081-3/+2
| | | | | | | | | The first IF statement disabled the second one. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98599 Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* tgsi: trivial build fix for MSVCBrian Paul2016-10-241-1/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* tgsi/scan: scan texture offset operandsMarek Olšák2016-10-241-0/+16
| | | | | | This seems important considering how much we depend on some of the flags. Reviewed-by: Nicolai Hähnle <[email protected]>
* tgsi/scan: move src operand processing into a separate functionMarek Olšák2016-10-241-171/+183
| | | | | | the next commit will need this Reviewed-by: Nicolai Hähnle <[email protected]>
* tgsi/scan: get information about shader buffer usageMarek Olšák2016-10-242-0/+23
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* tgsi/scan: handle indirect image indexing correctlyMarek Olšák2016-10-242-8/+17
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* tgsi/scan: don't treat RESQ etc. as memory instructionsMarek Olšák2016-10-241-5/+13
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* tgsi/scan: get information about indirect 2D file accessMarek Olšák2016-10-242-0/+7
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* tgsi/scan: get information about indirect CONST accessMarek Olšák2016-10-242-0/+15
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/tgsi: add missing #includeMarek Olšák2016-10-181-0/+2
| | | | | Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* tgsi: fix comment typo in tgsi_ureg.cBrian Paul2016-10-131-1/+1
| | | | Trivial.
* tgsi/ureg: add ureg_DECL_output_layoutNicolai Hähnle2016-10-122-13/+38
| | | | | | | | | 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-122-12/+76
| | | | | | | v2: change the order of parameters (Dave) Reviewed-by: Edward O'Callaghan <[email protected]> (v1) Reviewed-by: Dave Airlie <[email protected]> (v1)
* tgsi/scan: fix num_inputs/num_outputs for shaders with overlapping arraysNicolai Hähnle2016-10-121-8/+2
| | | | | | | v2: remove a tautological left-over assert (Marek) Reviewed-by: Edward O'Callaghan <[email protected]> (v1) Reviewed-by: Dave Airlie <[email protected]> (v1)
* tgsi/scan: don't set interp flags for inputs only used by INTERP (v2)Marek Olšák2016-10-051-48/+57
| | | | | | | | | | | | (v1 pushed, then reverted) This fixes 9 randomly failing tests on radeonsi: GL45-CTS.shader_multisample_interpolation.render.interpolate_at_centroid.* v2: use input_interpolate[input] (correct) instead of input_interpolate[index] (incorrect) Reviewed-by: Nicolai Hähnle <[email protected]>
* gallivm/llvmpipe: prepare support for ARB_gpu_shader_int64.Dave Airlie2016-09-211-1/+2
| | | | | | | | | | | | | | | | This enables 64-bit integer support in gallivm and llvmpipe. v2: add conversion opcodes. v3: - PIPE_CAP_INT64 is not there yet - restrict DIV/MOD defaults to the CPU, as for 32 bits - TGSI_OPCODE_I2U64 becomes TGSI_OPCODE_U2I64 Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]> Signed-off-by: Nicolai Hähnle <[email protected]>
* tgsi/softpipe: prepare ARB_gpu_shader_int64 support. (v3)Dave Airlie2016-09-211-132/+541
| | | | | | | | | | | | | | This adds all the opcodes to tgsi_exec for softpipe to use. v2: add conversion opcodes. v3: - no PIPE_CAP_INT64 yet - change TGSI_OPCODE_I2U64 to TGSI_OPCODE_U2I64 Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]> Signed-off-by: Nicolai Hähnle <[email protected]>
* gallium/tgsi: add support for 64-bit integer immediates.Dave Airlie2016-09-216-2/+115
| | | | | | | | | | 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]>
* gallium: add opcode and types for 64-bit integers. (v3)Dave Airlie2016-09-212-11/+85
| | | | | | | | | | | | | | | | | This just adds the basic support for 64-bit opcodes, and the new types. v2: add conversion opcodes. add documentation. v3: - make docs more consistent - change TGSI_OPCODE_I2U64 to TGSI_OPCODE_U2I64 Reviewed-by: Marek Olšák <[email protected]> (v2) Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]> Signed-off-by: Nicolai Hähnle <[email protected]>
* tgsi: Enable returns from within loopsLars Hamre2016-09-171-0/+4
| | | | | | | | Fixes the following piglit test (for softpipe): /spec/glsl-1.10/execution/fs-loop-return Signed-off-by: Lars Hamre <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* Revert "tgsi/scan: don't set interp flags for inputs only used by INTERP ↵Marek Olšák2016-09-151-57/+48
| | | | | | | | instructions" This reverts commit 524fd55d2d973f50a5d8bc2255684610f5faae32. Reason: https://bugs.freedesktop.org/show_bug.cgi?id=97808
* tgsi/scan: don't set interp flags for inputs only used by INTERP instructionsMarek Olšák2016-09-131-48/+57
| | | | | | | | | radeonsi depends on the interp flags a little bit too much. This fixes 9 randomly failing tests: GL45-CTS.shader_multisample_interpolation.render.interpolate_at_centroid.* Reviewed-by: Nicolai Hähnle <[email protected]>
* tgsi/scan: remember sampler view typesMarek Olšák2016-08-292-0/+5
| | | | Reviewed-by: Brian Paul <[email protected]>
* tgsi/scan: add tgsi_scan_arraysNicolai Hähnle2016-08-172-0/+93
| | | | Reviewed-by: Marek Olšák <[email protected]>
* tgsi: Add WORK_DIM System ValueHans de Goede2016-07-021-0/+1
| | | | | | | | | | | Add a new WORK_DIM SV type, this is will return the grid dimensions (1-4) for compute (opencl) kernels. This is necessary to implement the opencl get_work_dim() function. Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* gallium/tgsi: add 64-bitness type check function.Dave Airlie2016-06-111-0/+7
| | | | | | | | | Currently this just doubles, but we'll convert users to this so making adding 64-bit integers easier. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* tgsi/scan: add uses_derivatives (v2)Nicolai Hähnle2016-06-072-0/+31
| | | | | | | | | | | | 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]>
* gallium: add VOTE_* opcodes to implement GL_ARB_shader_group_voteIlia Mirkin2016-06-061-0/+3
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* tgsi: fix mixed data type comparison in tgsi_point_sprite.cCharmaine Lee2016-06-061-3/+3
| | | | | | | | | | | | | | | | Cast the unsigned semantic index to integer datatype before comparing to max_generic, otherwise, max_generic which is initialized to -1 will be converted to unsigned int before the comparison, causing a wrong semantic index to be assigned to a shader output. Fixes the assert running TurboCAD_gl.trace. (VMware bug 1667265) Also tested with glretrace, mesa demos pointblast, spriteblast and pointcoord. v2: use the original max_generic variable but add the (int) cast to the semantic index, as suggested by Brian. Reviewed-by: Brian Paul <[email protected]>
* tgsi: use truncf in micro_truncLars Hamre2016-06-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Switches to using truncf in micro_trunc. Fixes the following piglit tests (for softpipe): /spec/glsl-1.30/execution/built-in-functions/... fs-trunc-float fs-trunc-vec2 fs-trunc-vec3 fs-trunc-vec4 vs-trunc-float vs-trunc-vec2 vs-trunc-vec3 vs-trunc-vec4 /spec/glsl-1.50/execution/built-in-functions/... gs-trunc-float gs-trunc-vec2 gs-trunc-vec3 gs-trunc-vec4 Signed-off-by: Lars Hamre <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* tgsi: fix coverity out-of-bounds warningRob Clark2016-05-261-0/+3
| | | | | | | | | CID 1271532 (#1 of 1): Out-of-bounds read (OVERRUN)34. overrun-local: Overrunning array of 2 16-byte elements at element index 2 (byte offset 32) by dereferencing pointer &inst.Dst[i]. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* tgsi: fix out of bounds accessRob Clark2016-05-261-1/+1
| | | | | | | | | | | | Not sure why coverity calls this an out-of-bounds read vs out-of-bounds write. CID 1358920 (#1 of 1): Out-of-bounds read (OVERRUN)9. overrun-local: Overrunning array r of 3 16-byte elements at element index 3 (byte offset 48) using index chan (which evaluates to 3). Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/tgsi: use _mesa_roundevenf in micro_rndLars Hamre2016-05-261-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | Fixes the following piglit tests (for softpipe): /spec/glsl-1.30/execution/built-in-functions/... fs-roundeven-float fs-roundeven-vec2 fs-roundeven-vec3 fs-roundeven-vec4 vs-roundeven-float vs-roundeven-vec2 vs-roundeven-vec3 vs-roundeven-vec4 /spec/glsl-1.50/execution/built-in-functions/... gs-roundeven-float gs-roundeven-vec2 gs-roundeven-vec3 gs-roundeven-vec4 Signed-off-by: Lars Hamre <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* tgsi: print TGSI_PROPERTY_NEXT_SHADER value as string, not an integerBrian Paul2016-05-252-0/+25
| | | | | | | | | Print "GEOM" instead of "2", for example. v2: also update the text parsing code, per Ilia. Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>