aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: add support for GL_NV_viewport_array2Ilia Mirkin2020-04-151-0/+4
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4529>
* gallium: add TGSI_PROPERTY_LAYER_VIEWPORT_RELATIVEIlia Mirkin2020-04-151-0/+1
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4529>
* gallium: add TGSI_SEMANTIC_VIEWPORT_MASKIlia Mirkin2020-04-151-0/+1
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4529>
* util: don't include p_defines.h and u_pointer.h from galliumMarek Olšák2020-03-271-0/+1
| | | | | | | It's a mess, but this is what I arrived at. Reviewed-by: Timothy Arceri <[email protected] Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4324>
* tgsi/util: Change boolean for boolMark Menzynski2020-03-202-3/+4
| | | | | | | | | | | I was getting errors with "boolean" when compiling. This patch changes boolean to bool from <stdbool.h>. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Signed-off-by: Mark Menzynski <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3903> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3903>
* gallium/cso_hash: make cso_hash declared within structures instead of alloc'dMarek Olšák2020-02-141-19/+19
| | | | | | | This removes one level of indirection. Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>
* mesa/st: Move the SYSTEM_VALUE -> TGSI_SEMANTIC map to tgsi_from_mesa.Eric Anholt2020-02-052-0/+85
| | | | | | | | | This will let us reuse the table from nir-to-tgsi. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3506>
* gallium: tgsi_from_mesa - handle VARYING_SLOT_FACEGert Wollny2020-01-041-0/+4
| | | | | | Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3286>
* gallium/tgsi_from_mesa: Add 'extern "C"' to be able to include from C++Gert Wollny2020-01-041-0/+9
| | | | | | | | The r600/nir backend is in C++ and needs to include this file. Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3286>
* tgsi/mesa: handle KERNEL caseDave Airlie2019-12-271-0/+1
| | | | | | Translate to compute for now. Acked-by: Roland Scheidegger <[email protected]>
* radeonsi/nir: implement subgroup system values for SPIR-VMarek Olšák2019-11-271-0/+1
| | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* util: Move gallium's PIPE_FORMAT utils to /util/format/Eric Anholt2019-11-141-1/+1
| | | | | | | | | | | | | | | To make PIPE_FORMATs usable from non-gallium parts of Mesa, I want to move their helpers out of gallium. Since u_format used util_copy_rect(), I moved that in there, too. I've put it in a separate directory in util/ because it's a big chunk of related code, and it's not clear to me whether we might want it as a separate library from libmesa_util at some point. Closes: #1905 Acked-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* gallium: remove PIPE_SHADER_CAP_SCALAR_ISAMarek Olšák2019-10-101-2/+0
| | | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* tgsi/scan: add tgsi_shader_info::msaa_images_declaredMarek Olšák2019-10-092-0/+19
| | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* gallium/tgsi: add support for DEMOTE and READ_HELPER opcodesIlia Mirkin2019-10-071-2/+2
| | | | | | | | | | This mirrors the intrinsics in the GLSL IR. One could imagine an alternate definition where reading the semantic would account for the READ_HELPER functionality, but that feels potentially dodgy and could be subject to CSE unpleasantness. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* tgsi: Remove unused localCaio Marcelo de Oliveira Filho2019-08-231-1/+0
| | | | | | | | Code that used it was removed in 4ebe6b2e72e ("tgsi: Drop the SSE2 constants setup that's been dead code since 2011.") Acked-by: Eric Engestrom <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* tgsi: Remove unused tgsi_check_soa_dependencies().Eric Anholt2019-08-202-59/+0
| | | | | Acked-by: Eric Engestrom <[email protected]> Reviewed-By: Gert Wollny <[email protected]>
* tgsi: Drop the SSE2 constants setup that's been dead code since 2011.Eric Anholt2019-08-202-53/+9
| | | | | | | The SSE2 executor was removed in 4eb3225b38ce ("Remove tgsi_sse2.") Acked-by: Eric Engestrom <[email protected]> Reviewed-By: Gert Wollny <[email protected]>
* tgsi: drop a stale commentEric Anholt2019-08-201-3/+0
| | | | | | | | This was fixed in 912ed84f8338 ("tgsi: move to using vector for system values.") Acked-by: Eric Engestrom <[email protected]> Reviewed-By: Gert Wollny <[email protected]>
* softpipe: Add support for ARB_derivative_controlGert Wollny2019-08-141-0/+29
| | | | | | | | | | | | | | Enables and passes piglits: spec/ARB_drivative_control/ dfdx-coarse dfdx-dfdy dfdx-fine dfdy-coarse dfdy-fine Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* tgsi/scan: don't set GS_INVOCATIONS for all shader stagesMarek Olšák2019-08-121-1/+3
| | | | Reviewed-by: Connor Abbott <[email protected]>
* gallium: add AMD-specific compute TGSI enumsMarek Olšák2019-08-121-0/+2
| | | | for tgsi_to_nir
* gallium: add TGSI_PROPERTY_VS_BLIT_SGPRS_AMD for tgsi_to_nirMarek Olšák2019-08-121-0/+1
| | | | needed by radeonsi NIR support
* tgsi: add ATOMICINC_WRAP/ATOMICDEC_WRAP opcodePierre-Eric Pelloux-Prayer2019-08-063-1/+6
| | | | Reviewed-by: Marek Olšák <[email protected]>
* tgsi/scan: add uses_fbfetchMarek Olšák2019-07-232-0/+4
| | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* tgsi: fix warning: ‘interp’ may be used uninitializedMarek Olšák2019-07-221-0/+1
| | | | Reviewed-by: Dave Airlie <[email protected]>
* util: use standard name for vsnprintf()Eric Engestrom2019-07-191-1/+1
| | | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* tgsi: denote which load/store/atomic channels are unsignedDave Airlie2019-07-071-0/+12
| | | | | | llvmpipe will need this info. Reviewed-by: Roland Scheidegger <[email protected]>
* gallium/u_blitter: implement copying from ZS to color and vice versaMarek Olšák2019-07-031-0/+6
| | | | | | | | | This is for drivers that can't map depth and stencil and need to blit them to a color texture for CPU access. This also useful for drivers using separate depth and stencil. Tested-by: Dieter Nützel <[email protected]>
* Change a few frequented uses of DEBUG to !NDEBUGMarek Olšák2019-05-291-1/+1
| | | | | | | | debugoptimized builds don't define NDEBUG, but they also don't define DEBUG. We want to enable cheap debug code for these builds. I only chose those occurences that I care about. Reviewed-by: Mathias Fröhlich <[email protected]>
* softpipe: Add support for TGSI_OPCODE_INTERP_CENTROIDGert Wollny2019-05-011-0/+42
| | | | | | | | | | | | Like with interpolatAtSample this is also not really implementing the according sampling and will only work correctly for pixels that are fully covered, but since softpipe only supports one sample this is good enough for now. v2: Correct spelling (Roland Scheidegger) Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* softpipe: Add support for TGSI_OPCODE_INTERP_OFFSETGert Wollny2019-05-011-0/+32
| | | | | | | | | | Since for this opcode the offsets are given manually the function should actually also work for non-zero offsets, but the related piglits only ever test with offset 0. Accordingly the patch satisfies "fs-interpolateatoffset-*". Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* softpipe: Add (fake) support for TGSI_OPCODE_INTERP_SAMPLEGert Wollny2019-05-011-1/+40
| | | | | | | | | | | | Softpipe doesn't support more than one sample, so this function implements the interpolation at sample 0 and adds a stub to make it possible to interpolate at other samples. As it is this makes the piglits "fs-interpolateatsample-*" pass, but they only ever test sample 0 anyway. Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* softpipe: Add an per-input array for interpolator correctors to machineGert Wollny2019-05-012-4/+79
| | | | | | | | This adds entry points for correcting the interpolation values if the interpolation is done by using one of the interpolateAt* functions. Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* softpipe: Factor out evaluation of the source indicesGert Wollny2019-05-011-28/+41
| | | | | | | We will need these for per sample interpolation as well Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* tgsi/scan: add uses_drawidMarek Olšák2019-04-232-0/+4
| | | | | Tested-by: Dieter Nützel <[email protected]> Acked-by: Nicolai Hähnle <[email protected]>
* tgsi: Mark tgsi_strings_check() unusedKristian H. Kristensen2019-04-191-1/+1
| | | | | | | It's there to hold the static asserts, don't warning about it being unused. Signed-off-by: Kristian H. Kristensen <[email protected]>
* tgsi: add support for geometry shader streams.Dave Airlie2019-04-092-15/+59
| | | | | | | | | | | | This adds support to retrieve the primitive counts for each stream, along with the offset for each primitive into the output array. It also adds support for parsing the stream argument to the emit and end instructions. Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* softpipe: add indirect store buffer/image unitDave Airlie2019-03-281-2/+34
| | | | | | | | The code to handle image unit indirect was missing Fixes piglit tests/spec/arb_arrays_of_arrays/execution/image_store/basic-imageStore-mixed-const-non-const-uniform-index.shader_test Reviewed-by: Roland Scheidegger <[email protected]>
* softpipe: remove shadow_ref assert.Dave Airlie2019-03-221-1/+0
| | | | | | | | | | | | I don't think this really buys us anything and TG4 with cubemap arrays falls over because sampler == 2, but otherwise works fine. Fixes: ./bin/textureGather fs shadow r CubeArray repeat on softpipe with ARB_gpu_shader5 enabled. Reviewed-by: Brian Paul <[email protected]>
* softpipe: handle 32-bit bitfield insertsDave Airlie2019-03-221-3/+7
| | | | | | Fixes piglits if ARB_gpu_shader5 is enabled Reviewed-by: Brian Paul <[email protected]>
* softpipe: fix 32-bit bitfield extractDave Airlie2019-03-221-2/+12
| | | | | | | | These didn't deal with the width == 32 case that TGSI is defined with. Fixes piglit tests if ARB_gpu_shader5 is enabled. Reviewed-by: Brian Paul <[email protected]>
* tgsi: don't set tgsi_info::uses_bindless_images for constbufs and hw atomicsMarek Olšák2019-02-221-1/+3
| | | | | | | | This might have decreased performance for radeonsi/tgsi, because most most shaders claimed they used bindless. Cc: 18.3 19.0 <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* tgsi/scan: correctly walk instructions in tgsi_scan_tess_ctrl()Timothy Arceri2019-01-021-29/+43
| | | | | | | | | | | | The previous code used a do while loop and continues after walking a nested loop/if-statement. This means we end up evaluating the last instruction from the nested block against the while condition and potentially exit early if it matches the exit condition of the outer block. Fixes: 386d165d8d09 ("tgsi/scan: add a new pass that analyzes tess factor writes") Reviewed-by: Marek Olšák <[email protected]>
* tgsi/scan: fix loop exit point in tgsi_scan_tess_ctrl()Timothy Arceri2019-01-021-1/+1
| | | | | | | | | | | | | This just happened not to crash/assert because all loops have at least 1 if-statement and due to a second bug we end up matching the same ENDIF to exit both the iteration over the if-statment and the loop. The second bug is fixed in the following patch. Fixes: 386d165d8d09 ("tgsi/scan: add a new pass that analyzes tess factor writes") Reviewed-by: Marek Olšák <[email protected]>
* tgsi: add ATOMFADD operationIlia Mirkin2018-12-264-1/+7
| | | | | | | | This is supported by at least NVIDIA hardware, and exposeable via GL extensions. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* tgsi/scan: add more information about bindless usageMarek Olšák2018-11-282-2/+33
| | | | radeonsi will use this.
* gallium/util: remove p_format.h from u_debug.hDylan Baker2018-10-301-0/+1
| | | | | Tested-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* softpipe: dynamically allocate space for immediate constantsGert Wollny2018-10-182-5/+15
| | | | | | | | | | | | | | | The number of immediate constants was fixed and the size check was only done by means of an assertion. Given this a shader that emits more immediate constants would result in a memory corruption when mesa is build in release mode. Instead of using this fixed limit allocate the space dynamically, let it grow as needed, and also remove the unused ImmArray. Fixes: dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.1 Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* gallium: add TGSI_MEMORY_STREAM_CACHE_POLICYMarek Olšák2018-08-292-2/+3
| | | | For internal radeonsi shaders.