summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi
Commit message (Collapse)AuthorAgeFilesLines
* gallivm: Fix TGSI_OPCODE_ARR's translation.José Fonseca2012-02-211-0/+1
| | | | | | | | | | | | | Like TGSI_OPCODE_ARL, destination should be an integer. This fixes invalid LLVM IR on an internal state tracker (currently Mesa never emits this opcode). In the future consider making ADDR register also a integer-as-float array, like all other register kinds, or simply replace ADDR & ARR/ARL with integer temp and instructions. Reviewed-by: Dave Airlie <[email protected]>
* tgsi: add source/destination type from opcodes. (v2)Dave Airlie2012-02-172-0/+112
| | | | | | | | | | | These two functions produce the src/dst types for an opcode. MOV is special since it can be used to mov float->float and int->int, so just return VOID. v2: use a new enum for the opcode type as per Jose's suggestion. Signed-off-by: Dave Airlie <[email protected]>
* gallium: Move duplicated helper macros to tgsi_exec.hTom Stellard2012-01-302-46/+45
|
* gallium: Prefix #defines in tgsi_exec.h with TGSI_Tom Stellard2012-01-302-68/+68
|
* gallium: Unify defines of CHAN_[XYZW] in tgsi_exec.hTom Stellard2012-01-303-248/+241
|
* tgsi: Add output_mode to struct tgsi_opcode_info v2Tom Stellard2012-01-302-162/+201
| | | | | | v2: - Rename output_type to output_mode - Add shorthand definitions for TGSI_OUTPUT_*
* tgsi: add TGSI_TEXTURE_SHADOWCUBEMAPDave Airlie2012-01-113-0/+4
| | | | | | | | 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-112-0/+15
| | | | | | | 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_scan: add support to count number of output clip distancesDave Airlie2012-01-112-0/+5
| | | | | | Just add support to the scanner to count the number of clip distances. Signed-off-by: Dave Airlie <[email protected]>
* tgsi/softpipe: add VertexID support.Dave Airlie2012-01-112-5/+11
| | | | | | | | | | 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-103-2/+7
| | | | | | | | | | | | 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]>
* Squash-merge branch 'gallium-clip-state'Marek Olšák2012-01-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/tgsi/tgsi_strings.c src/mesa/state_tracker/st_atom_clip.c commit d919791f2742e913173d6b335128e7d4c63c0840 Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 17:59:22 2012 +0100 d3d1x: adapt to new clip state commit cfec82bca3fefcdefafca3f4555285ec1d1ae421 Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 14:16:51 2012 +0100 gallium/docs: update for clip state changes commit c02bfeb81ad9f62041a2285ea6373bbbd602912a Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 14:21:43 2012 +0100 tgsi: add TGSI_PROPERTY_PROHIBIT_UCPS commit d4e0a785a6a23ad2f6819fd72e236acb9750028d Author: Brian Paul <[email protected]> Date: Thu Jan 5 08:30:00 2012 -0700 tgsi: consolidate TGSI string arrays in new tgsi_strings.h There was some duplication between the tgsi_dump.c and tgsi_text.c files. Also use some static assertions to help catch errors when adding new TGSI values. v2: put strings in tgsi_strings.c file instead of the .h file. Reviewed-by: Dave Airlie <[email protected]> commit c28584ce0d8c62bd92c8f140729d344f88a0b3cd Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 12:48:09 2012 +0100 gallium: extend user_clip_plane_enable to apply to clip distances commit f1d5016c07f786229ed057effbe55fbfd160b019 Author: Marek Olšák <[email protected]> Date: Fri Jan 6 02:39:09 2012 +0100 nvfx: adapt to new clip state commit 6f6fa1c26bd19f797c1996731708e3569c9bfe24 Author: Marek Olšák <[email protected]> Date: Fri Jan 6 01:41:39 2012 +0100 st/mesa: fix DrawPixels with GL_DEPTH_CLAMP commit c86ad730aa1c017788ae88a55f54071bf222be12 Author: Christoph Bumiller <[email protected]> Date: Tue Jan 3 23:51:30 2012 +0100 nv50: adapt to new clip state commit 3a8ae6ac243bae5970729dc4057fe02d992543dc Author: Christoph Bumiller <[email protected]> Date: Tue Jan 3 23:32:36 2012 +0100 nvc0: adapt to new clip state commit 6243a8246997f8d2fcc69ab741a2c2dea080ff11 Author: Marek Olšák <[email protected]> Date: Thu Dec 29 01:32:51 2011 +0100 draw: initalize pt.user.planes in draw_init This fixes a crash in glean/fpexceptions. commit e3056524b19b56d473f4faff84ffa0eb41497408 Author: Marek Olšák <[email protected]> Date: Mon Dec 26 06:26:55 2011 +0100 svga: adapt to new clip state commit c5bfa8b37d6d489271df457229081d6bbb51b4b7 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 14:11:51 2011 +0100 r600g: adapt to new clip state commit f11890905362f62627c4a28a8255b76eb7de7df2 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 14:10:26 2011 +0100 r300g: adapt to new clip state commit e37465327c79a01112f15f6278d9accc5bf3103f Author: Marek Olšák <[email protected]> Date: Sun Dec 25 12:39:16 2011 +0100 draw: adapt to new clip state This adds a regression in the LLVM clipping path. Can anybody see anything wrong with the code? It works for every other case, just glean/fpexceptions crashes when doing the "Infinite clip plane test". commit b474d2b18c72d965eefae4e427c269cba5ce6ba2 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 13:14:59 2011 +0100 u_blitter: don't save/set/restore clip state commit 9dd240ea91f523a677af45e8d0adb9e661e28602 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 13:11:56 2011 +0100 gallium: don't cso_save/set/restore clip state The enable bits are in the rasterizer state. commit a4f7031179f5f4ad524b34b394214b984ac950f6 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 12:58:55 2011 +0100 gallium: default depth_clip to 1 depth_clip = !depth_clamp commit fe21147a00ab90e549d63fe12ee4625c9c2ffcc3 Author: Marek Olšák <[email protected]> Date: Mon Dec 26 06:14:19 2011 +0100 trace,util: update state logging to new clip state Also dump the other missing flags. commit 2a3b96e84ac872dcc5bc1de049fe76bb58d64b23 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 10:43:43 2011 +0100 st/mesa: adapt to new clip state commit b7b656a42fca19d7c85267f42649a206a85a2c72 Author: Marek Olšák <[email protected]> Date: Sat Dec 17 15:45:19 2011 +0100 gallium: move state enable bits from clip_state to rasterizer_state
* gallium: add an IABS opcode to TGSIBryan Cain2012-01-072-0/+5
| | | | | | This is a necessary operation that is missing from TGSI. Reviewed-by: Brian Paul <[email protected]>
* gallium: add new semantic for clip vertex.Dave Airlie2012-01-071-1/+2
| | | | | | This is to match the gl_ClipVertex output from GLSL 1.20. Signed-off-by: Dave Airlie <[email protected]>
* gallium: add support for clip distancesBryan Cain2012-01-053-10/+37
|
* tgsi: consolidate TGSI string arrays in new tgsi_strings.hBrian Paul2012-01-055-232/+253
| | | | | | | | | | There was some duplication between the tgsi_dump.c and tgsi_text.c files. Also use some static assertions to help catch errors when adding new TGSI values. v2: put strings in tgsi_strings.c file instead of the .h file. Reviewed-by: Dave Airlie <[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]>
* gallium: utility helper functions for stream outputMarek Olšák2011-12-152-6/+21
|
* gallium: interface changes necessary to implement transform feedback (v5)Marek Olšák2011-12-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Namely: - EXT_transform_feedback - ARB_transform_feedback2 - ARB_transform_feedback_instanced The old interface was not useful for OpenGL and had to be reworked. This interface was originally designed for OpenGL, but additional changes have been made in order to make st/d3d1x support easier. The most notable change is the stream-out info must be linked with a vertex or geometry shader and cannot be set independently. This is due to limitations of existing hardware (special shader instructions must be used to write into stream-out buffers), and it's also how OpenGL works (stream outputs must be specified prior to linking shaders). Other than that, each stream output buffer has a "view" into it that internally maintains the number of bytes which have been written into it. (one buffer can be bound in several different transform feedback objects in OpenGL, so we must be able to have several views around) The set_stream_output_targets function contains a parameter saying whether new data should be appended or not. Also, the view can optionally be used to provide the vertex count for draw_vbo. Note that the count is supposed to be stored in device memory and the CPU never gets to know its value. OpenGL way | Gallium way ------------------------------------ BeginTF = set_so_targets(append_bitmask = 0) PauseTF = set_so_targets(num_targets = 0) ResumeTF = set_so_targets(append_bitmask = ~0) EndTF = set_so_targets(num_targets = 0) DrawTF = use pipe_draw_info::count_from_stream_output v2: * removed the reset_stream_output_targets function * added a parameter append_bitmask to set_stream_output_targets, each bit specifies whether new data should be appended to each buffer or not. v3: * added PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME for ARB_tfb2, note that the draw-auto subset is always required (for d3d10), only the pause/resume functionality is limited if the CAP is not advertised v4: * update gallium/docs v5: * compactified struct pipe_stream_output_info, updated dump/trace
* gallium: implement ARB_conservative_depthMarek Olšák2011-12-103-0/+22
| | | | This adds a new TGSI property to represent the GLSL layout qualifier in TGSI.
* gallium: add PIPE_SHADER_CAP_OUTPUT_READVadim Girlin2011-11-211-1/+0
| | | | | | | It's intended to indicate whether the driver/hardware supports reading of the values written into shader outputs. Signed-off-by: Vadim Girlin <[email protected]>
* gallium: add TGSI_SEMANTIC_VERTEXIDChristoph Bumiller2011-11-144-0/+6
|
* Remove tgsi_sse2.José Fonseca2011-11-082-3186/+0
| | | | tgsi_exec is simple. llvm is fast. tgsi_sse2 ends up being neither.
* 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]>
* gallium: add and use PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERSMarek Olšák2011-09-301-0/+2
| | | | | | | | | This removes: - PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS - PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS in favor of the that new per-shader cap. Reviewed-by: Brian Paul <[email protected]>
* tgsi: Check in scan for fs position and depth readsJakob Bornecrantz2011-09-222-0/+17
|
* 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-102-0/+33
| | | | | | | 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-105-7/+54
| | | | 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-028-9/+132
| | | | | | | | | | | | | 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-252-1/+59
| | | | | | | | | | | 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-252-1/+31
| | | | | | | | | | 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-042-1/+14
|\ | | | | | | | | | | 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
| |
| * gallium: add PIPE_SHADER_CAP_INTEGERSBryan Cain2011-08-011-0/+2
| |
* | Merge branch 'gallium-polygon-stipple'Brian Paul2011-07-212-10/+31
|\ \
| * | tgsi: add info fields for fragcoord origin, center, etcBrian Paul2011-07-212-10/+31
| |/
* / tgsi: add some debug/print code in exec_tex(), disabledBrian Paul2011-07-061-0/+11
|/
* tgsi: s/varient/variant/Brian Paul2011-06-071-2/+2
|
* tgsi/ureg: bump the limit of immediatesMarek Olšák2011-05-301-1/+1
| | | | | | | | | | Lowered indirect addressing can create lots of immediates. Fixes piglit/glsl-fs-uniform-array-7 on r300g. NOTE: This is a candidate for the 7.10 branch. Reviewed-by: Brian Paul <[email protected]>
* tgsi: remove set-but-unused variablesMarek Olšák2011-05-011-4/+0
|
* tgsi: Fix parsing of properties with digits in the nameJakob Bornecrantz2011-03-131-1/+1
|
* tgsi: Disable SSE2 code generation.José Fonseca2011-03-041-3/+20
| | | | | | It's broken now that tgsi_exec_machine::Inputs/Ouputs are pointers. Temporary if anybody still cares about tgsi_sse2.c. Permanent otherwise.
* 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-022-6/+45
|
* gallium/tgsi: shuffle ureg_src structure to work around gcc4.6.0 issueJerome Glisse2011-02-251-14/+14
| | | | | | | | | | | | There is an issue with gcc 4.6.0 that leads to segfault/assert with mesa due to ureg_src size, reshuffling the structure member to better better alignment work around the issue. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47893 7.9 + 7.10 candidate Signed-off-by: Jerome Glisse <[email protected]>