summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi
Commit message (Collapse)AuthorAgeFilesLines
* tgsi: add a TXQS opcode to retrieve the number of texture samplesIlia Mirkin2015-09-131-1/+2
| | | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
* tgsi/scan: add support to figure out max nesting depthRob Clark2015-09-132-0/+21
| | | | | | | | | 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, softpipe: Constify tgsi_sampler in query_lod vfuncKrzesimir Nowak2015-09-111-1/+1
| | | | | | | | | | A followup from previous commit - since all functions called by query_lod take pointers to const sp_sampler_view and const sp_sampler, which are taken from tgsi_sampler subclass, we can the tgsi_sampler as const itself now. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* tgsi,softpipe: capitalize the tgsi_sampler_control enum valuesBrian Paul2015-09-112-24/+25
| | | | | | | We use capitalized enum values everywhere else. This improves understanding a bit too. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* tgsi: Add code for handling lodq opcodeKrzesimir Nowak2015-09-102-0/+56
| | | | | | | | | | | | This introduces new vfunc in tgsi_sampler just for this opcode. I decided against extending get_samples vfunc to return the mipmap level and LOD - the function's prototype is already too scary and doing the sampling for textureQueryLod would be a waste of time. v2: - splitted too long lines Reviewed-by: Brian Paul <brianp@vmware.com>
* tgsi: Remove trailing backslash in commentKrzesimir Nowak2015-09-101-1/+1
| | | | | | It clearly is here by accident. Reviewed-by: Brian Paul <brianp@vmware.com>
* tgsi/scan: add uses_doubles to tgsi scannerDave Airlie2015-09-022-1/+5
| | | | | | | This allows drivers to work out if a shader contains any double opcodes easily. Signed-off-by: Dave Airlie <airlied@redhat.com>
* tgsi: add tgsi utility to transform a fragment shader to support aa pointCharmaine Lee2015-09-012-0/+344
| | | | | | | | | | This adds a tgsi utility tgsi_add_aa_point to transform a fragment shader to support anti-aliased wide point by computing the fragment distance from the point center. This utility assumes the geometry shader is emitting an extra generic output with point coord data. The semantic index of this generic output is passed to the tgsi_add_aa_point utility. Reviewed-by: Brian Paul <brianp@vmware.com>
* tgsi: adds tgsi utility to transform a shader to support point spriteCharmaine Lee2015-09-012-0/+620
| | | | | | | | | | This adds a tgsi utility tgsi_add_point_sprite to transform a geometry shader to emulate wide points by drawing quads. This utility adds an extra output for the original point position if the point position is to be written to a stream output buffer. It also assumes the driver will add a constant for inverse viewport scale after the user defined constants. Reviewed-by: Brian Paul <brianp@vmware.com>
* tgsi: add new tgsi_two_side.c utility codeBrian Paul2015-09-012-0/+262
| | | | | | | This could be used by any driver where the device doesn't directly support two-sided lighting. This code modifies a fragment shader to accecpt back-face colors and choose between the front/back colors depending on the triangle's front-face sign.
* tgsi: add some more helper functionsCharmaine Lee2015-09-011-4/+65
| | | | | | | | | | This patch adds some more helper functions such as . tgsi_transform_temps_decl . tgsi_transform_output_decl . tgsi_transform_dst_reg . tgsi_transform_src_reg Reviewed-by: Brian Paul <brianp@vmware.com>
* tgsi: added tgsi_is_shadow_target() helperBrian Paul2015-09-012-0/+21
|
* tgsi: add negate parameter to tgsi_transform_kill_inst()Brian Paul2015-09-011-2/+3
| | | | Reviewed-by: Charmaine Lee <charmainel@vmware.com>
* tgsi: fix parsing of tessellation shader inputs/outputsMarcos Paulo de Souza2015-08-171-1/+16
| | | | | | | | | | Tessellation control shaders write to outputs as OUT[ADDR[0].x][0], make sure to parse the indirect dimension on outputs. Also tess control inputs/outputs and tess eval input declarations need to receive the same treatment as geometry shader inputs. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* tgsi: set implicit array size for tess stagesMarcos Paulo de Souza2015-08-171-1/+5
| | | | Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* tgsi: allow dumping to a file directlyMarek Olšák2015-07-222-4/+20
|
* gallium: replace INLINE with inlineIlia Mirkin2015-07-2110-80/+80
| | | | | | | | | | | | | | | | 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 <imirkin@alum.mit.edu> Acked-by: Marek Olšák <marek.olsak@amd.com>
* tgsi: add DFMA to the opcode infer functions.Dave Airlie2015-07-111-0/+1
| | | | Signed-off-by: Dave Airlie <airlied@redhat.com>
* tgsi: whitespace fixes in tgsi_parse.cBrian Paul2015-07-091-13/+13
| | | | Trivial.
* tgsi: add infer support for double opcodes.Dave Airlie2015-07-011-0/+37
| | | | | Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* softpipe,llvmpipe: fix PIPE_SHADER_CAP_MAX_INPUTS valueMarek Olšák2015-06-251-1/+1
| | | | | | | | | | PIPE_MAX_SHADER_INPUTS was recently bumped to 80 because of tessellation. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91099 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91101 Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* draw,tgsi: Assume TGSI_PROPERTY_GS_INVOCATIONS default of 1.Jose Fonseca2015-06-231-0/+1
| | | | | | | | | If the shader doesn't specify number of invocations, assume one. This fixes geometry shaders on state trackers other than Mesa (and probably graw tests too.) Trivial.
* draw/tgsi: implement geom shader invocation support.Dave Airlie2015-06-232-0/+3
| | | | | | | | 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: handle indirect sampler arrays. (v2)Dave Airlie2015-06-231-4/+38
| | | | | | | | | This is required for ARB_gpu_shader5 support in softpipe. v2: add support to txd/txf/txq paths. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* tgsi/transform: add support for SVIEW declsRob Clark2015-06-211-0/+21
| | | | | | | | | | TODO single return_type (use enum) v2: single return_type arg, and use enum Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* tgsi: add comments for ureg_emit_label()Brian Paul2015-06-191-0/+6
|
* tgsi: new comments, assertion for executing TGSI_OPCODE_CALBrian Paul2015-06-191-1/+5
|
* tgsi/ureg: fix a coverity defect in emit_declsMarek Olšák2015-06-051-3/+4
| | | | Reported by Ilia Mirkin.
* tgsi/ureg: don't emit in/out arrays if drivers don't support ranged declarationsMarek Olšák2015-06-053-36/+141
| | | | | | 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-052-24/+66
|
* tgsi/ureg: add support for GS input array declarationsMarek Olšák2015-06-052-13/+28
|
* tgsi/ureg: merge input and fs_input arraysMarek Olšák2015-06-051-51/+33
|
* tgsi/ureg: rename and simplify ureg_DECL_gs_inputMarek Olšák2015-06-052-19/+19
| | | | | 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-052-16/+59
|
* tgsi/scan: get more information about arrays and handle arrays correctly (v2)Marek Olšák2015-06-052-3/+25
| | | | v2: use less memory for the information
* tgsi/ureg: enable creating tessellation shaders with ureg_create_shaderMarek Olšák2015-05-261-4/+14
| | | | Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* tgsi/text: enable parsing tessellation shadersMarek Olšák2015-05-261-0/+4
| | | | Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* gallium: rename TGSI tessellation processor types to match pipe shader namesMarek Olšák2015-05-264-15/+15
| | | | | | I forgot to do this when pushing the interface changes. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* gallium: remove TGSI_SAT_MINUS_PLUS_ONEMarek Olšák2015-05-205-68/+13
| | | | | | | | It's a remnant of some old NV extension. Unused. I also have a patch that removes predicates if anyone is interested. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* tgsi: handle TG4 opcode in tgsi execDave Airlie2015-05-202-2/+12
| | | | | | | This just adds a new modifier interface for drivers to implement. Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* tgsi/dump: fix declaration printing of tessellation inputs/outputsIlia Mirkin2015-05-161-2/+18
| | | | | | | | mareko: only output second dimension for non-patch semantics Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
* tgsi/ureg: allow ureg_dst to have dimension indicesIlia Mirkin2015-05-162-8/+75
| | | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
* tgsi/ureg: use correct limit for max input countMarek Olšák2015-05-161-1/+1
| | | | | Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
* tgsi/sanity: set implicit in/out array sizes based on patch sizesIlia Mirkin2015-05-161-4/+32
| | | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
* tgsi/scan: allow scanning tessellation shadersIlia Mirkin2015-05-161-1/+5
| | | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
* gallium: add tessellation shader propertiesIlia Mirkin2015-05-161-1/+6
| | | | | | | | v2: Marek: rename tess spacing definitions Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
* gallium: add new semantics for tessellationIlia Mirkin2015-05-161-0/+5
| | | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
* gallium: add new PATCHES primitive typeIlia Mirkin2015-05-161-1/+2
| | | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
* gallium: add tessellation shader typesIlia Mirkin2015-05-163-2/+8
| | | | | | | | v2: Marek: rename shader types Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
* 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 <jfonseca@vmware.com>