aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_exec.c
Commit message (Collapse)AuthorAgeFilesLines
* gallium/tgsi: Move interpolation info from tgsi_declaration to a separate token.Francisco Jerez2012-05-111-1/+1
| | | | | | Move Interpolate, Centroid and CylindricalWrap from tgsi_declaration to a separate token -- they only make sense for FS inputs and we need room for other flags in the top-level declaration token.
* 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: Prefix #defines in tgsi_exec.h with TGSI_Tom Stellard2012-01-301-50/+50
|
* gallium: Unify defines of CHAN_[XYZW] in tgsi_exec.hTom Stellard2012-01-301-175/+170
|
* tgsi: add TGSI_TEXTURE_SHADOWCUBEMAPDave Airlie2012-01-111-0/+2
| | | | | | | | This adds support for shadow cubemap texture sampling instructions. This is required for GL 3.0. Signed-off-by: Dave Airlie <[email protected]>
* tgsi: add ISSG supportDave Airlie2012-01-111-0/+14
| | | | | | | This adds integer version of SSG that GLSL 1.30 can produce. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* tgsi/softpipe: add VertexID support.Dave Airlie2012-01-111-4/+10
| | | | | | | | | | This required changing the system value semantics, so we stored a system value per vertex, instance id is the only other system value we currently support, so I span it across the channels. This passes the 3 vertexid-* piglit tests + lots of instanceid tests. Signed-off-by: Dave Airlie <[email protected]>
* gallium: introduce GLSL based interpolation rules. (v2)Dave Airlie2012-01-101-0/+4
| | | | | | | | | | | | This introduces an unspecified interpolation paramter that is only allowed for color semantics, so a specified GLSL interpolation will override the ShadeModel specified interpolation, but not vice-versa. This fixes a lot of the interpolation tests in piglit. v2: rename from unspecified to color Signed-off-by: Dave Airlie <[email protected]>
* gallium: add an IABS opcode to TGSIBryan Cain2012-01-071-0/+4
| | | | | | This is a necessary operation that is missing from TGSI. Reviewed-by: Brian Paul <[email protected]>
* tgsi/softpipe: disable FAST_MATHDave Airlie2012-01-031-1/+1
| | | | | | | In the interest of softpipe preferring correctness over speed and passing more piglit tests, set this to off by default. For speed you really want llvmpipe. Signed-off-by: Dave Airlie <[email protected]>
* softpipe: reorder LIT to fix fp-lit-src-equals-dstDave Airlie2011-12-311-8/+8
| | | | | | | This reorders the LIT operation like the r600 one to fix the fp-lit-src-equals-dst piglit test. Signed-off-by: Dave Airlie <[email protected]>
* softpipe: fix shadow1d tests.Dave Airlie2011-12-191-1/+13
| | | | | | | This fixes the piglit glsl-1.10 shadow1D related tests. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* softpipe: fix shadow 2d texture array samplingDave Airlie2011-12-191-1/+10
| | | | | | | | | The 4th texcoord is used in this case for the comparison. This fixes piglit glsl-fs-shadow2DArray* on softpipe. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* softpipe: fix texture sampling from 1D texture arrayDave Airlie2011-12-191-0/+13
| | | | | | | | | This is the first part of a fix to piglit glsl-fs-shadow1DArray also fix the passing of unused r[2] in the normal 1D case. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* tgsi: Fix memory leak in out-of-memory path.Vinson Lee2011-10-251-7/+10
| | | | | | Fixes Coverity resource leak defect. Reviewed-by: Brian Paul <[email protected]>
* tgsi: fix typo in commit 324ac982d8e7Emil Velikov2011-09-101-1/+1
| | | | Reviewed-by: Bryan Cain <[email protected]>
* gallium: add TGSI opcodes UARL and UCMPBryan Cain2011-09-101-0/+30
| | | | | | | They are needed by glsl_to_tgsi for an efficient implementation using native integers. Reviewed-by: Brian Paul <[email protected]>
* gallium: add shadow 1D and 2D array samplers to TGSIMarek Olšák2011-09-101-0/+37
| | | | And filling in all the switch statements in auxiliary. Mostly untested.
* tgsi: add support for texture offsets to the TGSI IR. (v2)Dave Airlie2011-09-021-2/+20
| | | | | | | | | | | | | 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: add TXF support.Dave Airlie2011-08-251-1/+56
| | | | | | | | | | | This is a straight texel fetch with no filtering or clamping. It uses integers to specify the i/j/k (from EXT_gpu_shader4). To enable this I had to add another hook into the tgsi sampler so that we could easily bypass all the filtering sample does. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* tgsi: add TXQ support. (v2)Dave Airlie2011-08-251-1/+29
| | | | | | | | | | this adds another callback in the sampler struct containing get_dims entry point. This is used to query the driver for the texture resource dimensions for the resource bound to the current sampler. v2: remove unusued variable, fix indent Signed-off-by: Dave Airlie <[email protected]>
* Merge branch 'glsl-to-tgsi'Bryan Cain2011-08-041-1/+12
|\ | | | | | | | | | | Conflicts: src/mesa/state_tracker/st_atom_pixeltransfer.c src/mesa/state_tracker/st_program.c
| * tgsi: add support for TGSI_OPCODE_MOD in tgsi_execBryan Cain2011-08-011-1/+12
| |
* | tgsi: add some debug/print code in exec_tex(), disabledBrian Paul2011-07-061-0/+11
|/
* tgsi: Update assert.José Fonseca2011-03-031-1/+1
| | | | | Elements(mach->Inputs) is wrong now that mach->Inputs is dynamically allocated.
* tgsi: defer allocation of huge inputs/outputs until we have a gsZack Rusin2011-03-021-4/+41
|
* tgsi: add support for 1D/2D texture arraysBrian Paul2011-01-251-0/+30
|
* gallium: implement modern sampling schemeZack Rusin2011-01-241-0/+211
| | | | | | | | | | | 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]
* tgsi: add support for system values to TGSI interpreterBrian Paul2010-12-081-3/+16
|
* tgsi/exec: Get rid of obsolete condition codes.Michal Krol2010-11-041-10/+0
|
* tgsi/exec: Cleanup the remaining arithmetic instructions.Michal Krol2010-11-041-378/+413
| | | | As a result remove some nasty macros.
* tgsi: Don't ignore indirect registers in tgsi_check_soa_dependenciesJosé Fonseca2010-09-211-2/+4
| | | | NOTE: This is a candidate for the 7.9 branch.
* tgsi: fix false CondStackTop==0 assertionBrian Paul2010-08-231-0/+5
|
* tgsi: remove incorrect assertionBrian Paul2010-07-301-1/+0
|
* gallium: implement bounds checking for constant buffersBrian Paul2010-07-291-7/+46
| | | | | | Plumb the constant buffer sizes down into the tgsi interpreter where we can do bounds checking. Optional debug code warns upon out-of-bounds reading. Plus add a few other assertions in the TGSI interpreter.
* gallium: add a temporary array register fileZack Rusin2010-06-181-1/+95
| | | | | | | | | | | | | | like normal temporaries, but allows to define a number of distinct arrays, all of which make it explicit that they contain /indexable/ registers. as a side-effect we're adding support for multi-dimensional destination registers. The whole thing looks like this: DCL TEMPX[0][0..128] # 0 array with 128 registers ADD TEMPX[0][0], IN[0], IMM[0] ADD TEMPX[0][1], IN[0], IMM[0] ABS OUT[0], TEMPX[0][TEMP[0]]
* gallium: add a new register file - immediate arrayZack Rusin2010-06-181-0/+21
| | | | | | allows one to specify a safe (bound checked) array filled with immediates. it works just like a const array and declares much like our current immediates.
* gs: make sure we end primitives when finishing executing shadersZack Rusin2010-06-151-0/+16
|
* tgsi: support 2d indirect addressingZack Rusin2010-06-111-1/+6
|
* tgsi: Implement OPCODE_DIV.Michal Krol2010-05-191-1/+1
|
* tgsi: fix tgsi_exec_machine_bind_shader() to handle NULL tokens, samplersBrian Paul2010-05-061-1/+20
| | | | | | This lets us unbind a shader from the tgsi_exec_machine. Since shaders aren't ref counted we need this to properly clean up when deleting shaders elsewhere.
* gallium/tgsi: remove unused tgsi_exec_labels codeBrian Paul2010-05-061-9/+0
|
* gallium: Remove loop register file.José Fonseca2010-05-031-7/+0
| | | | | It was only used for D3D's REP/END/BGNFOR/ENDFOR. D3D's aL register is just like another address register now.
* tgsi: Drop BGNFOR, ENDFOR, REP, and ENDREP opcodes.José Fonseca2010-04-271-81/+0
|
* tgsi: add comment about potential code removalBrian Paul2010-04-181-0/+6
|
* tgsi: Cleanup exec code for CLAMP, CMP and CND.Michal Krol2010-03-011-28/+39
|
* tgsi: Remove dead code.Michal Krol2010-02-251-12/+0
|
* tgsi: ifdef out unused function micro_sqrt.Vinson Lee2010-02-201-0/+2
|
* tgsi: Make more exec opcodes look pretty.Michal Krol2010-02-191-64/+20
|
* tgsi: Change prototypes of micro opcodes to explicitly indicates number of args.Michal Krol2010-02-191-164/+206
|