aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe
Commit message (Collapse)AuthorAgeFilesLines
* llvmpipe: Use uintptr_t for pointer valuesMichel Dänzer2020-03-171-2/+2
| | | | | | | | | | | | | | | | | | | | Instead of uint64_t. Fixes potentially writing beyond the end of the handles pointer array on 32-bit architectures (and copying all 0s instead of the computed pointer values to the array on big endian ones). Corresponding compiler warning: ../src/gallium/drivers/llvmpipe/lp_state_cs.c: In function ‘llvmpipe_set_global_binding’: ../src/gallium/drivers/llvmpipe/lp_state_cs.c:1312:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 1312 | va = (uint64_t)((char *)lp_res->data + offset); | ^ Fixes: 264663d55d32 "gallivm/llvmpipe: add support for global operations." Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4166>
* Revert "gallium: make handles of set_global_binding 64 bit"Karol Herbst2020-03-101-2/+2
| | | This reverts commit e1ffb72a05f9b50ee47767aaadbab3e47896ee14
* gallium: make handles of set_global_binding 64 bitKarol Herbst2020-03-101-2/+2
| | | | | | | | | | needed by CL Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4072> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4072>
* llvmpipe: add support for tessellation shadersDave Airlie2020-02-2812-8/+324
| | | | | | | | | | This adds the hooks between llvmpipe and draw to enable tessellation shaders. It also updates the CI results and docs. Reviewed-by: Roland Scheidegger <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3841> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3841>
* llvmpipe: Silence uninitialized variable warning about "scissor"Eric Anholt2020-02-181-1/+1
| | | | | | | nr_planes is only > 3 when scissor is enabled, but gcc doesn't see it. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3867>
* llvmpipe: advertise 4 vertex streamsDave Airlie2020-02-071-2/+4
| | | | | | Reviewed-by: Roland Scheidegger <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3530> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3530>
* llvmpipe/query: add support for indexed queriesDave Airlie2020-02-074-15/+17
| | | | | | | This adds support for the queries needed for gpu_shader5 vertex streams Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3530>
* llvmpipe: Bump test timeout to 180 secondsMichel Dänzer2020-02-061-1/+1
| | | | | | | | | 120 still wasn't always enough for the s390x cross-build job, see e.g. https://gitlab.freedesktop.org/mesa/mesa/-/jobs/1551685 Reviewed-by: Daniel Stone <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3715> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3715>
* gitlab-ci: Add ppc64el and s390x cross-build jobsMichel Dänzer2020-02-051-0/+2
| | | | | | | | | | | | | Using LLVM 8 for ppc64el and 7 for s390x (which hits some coroutine related issues with LLVM 8). There are some test failures we need to ignore for now. Also, the timeout needs to be bumped from the default 30s for some tests, because they can take longer under emulation. Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3643>
* gallium: Add and use a helper for packing uc from a color_union.Eric Anholt2020-02-041-17/+1
| | | | | | | | The same pattern kept coming up, and we don't need to hit util_format_write_4* to do it when we have util_format_pack_rgba(). Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2744>
* llvmpipe: fix some integer instruction lowering.Dave Airlie2020-01-231-2/+3
| | | | | | | | | We want to lower to shifts for bitfields, and lower ifind_msb. Fixes a bunch of gpu shader5 tests. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3528>
* llvmpipe: drop LLVM < 3.4 supportEric Engestrom2020-01-221-4/+0
| | | | | | | | | We don't support < 3.9 anymore, so this code is dead. Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2760> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2760>
* llvmpipe: add ARB_derivative_control supportDave Airlie2020-01-101-1/+1
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* llvmpipe: add support for ARB_indirect_parameters.Dave Airlie2020-01-091-1/+1
| | | | | | | | | This just adds support for getting the draw count from the indirect buffer. Reviewed-by: Roland Scheidegger <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3234> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3234>
* llvmpipe: enable driver side multi draw indirectDave Airlie2020-01-091-1/+2
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3234>
* llvmpipe: enable ARB_shader_group_vote.Dave Airlie2019-12-301-1/+1
| | | | | | | | | | This just adds the NIR paths for shader group vote. v2: drop feq for now. (Roland) Reviewed-by: Roland Scheidegger <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3213> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3213>
* llvmpipe: add debug option to enable OpenCL support.Dave Airlie2019-12-272-2/+5
| | | | | | LP_DEBUG=cl will enable CL support for now. Acked-by: Roland Scheidegger <[email protected]>
* llvmpipe: lower hadd/add_satDave Airlie2019-12-271-0/+2
| | | | | | Fixes some CL piglits. Acked-by: Roland Scheidegger <[email protected]>
* llvmpipe: add support for compute shader paramsDave Airlie2019-12-271-5/+55
| | | | Acked-by: Roland Scheidegger <[email protected]>
* llvmpipe: handle serialized nir as a shader type.Dave Airlie2019-12-272-4/+19
| | | | Acked-by: Roland Scheidegger <[email protected]>
* gallivm/llvmpipe: add support for global operations.Dave Airlie2019-12-273-0/+63
| | | | Acked-by: Roland Scheidegger <[email protected]>
* gallivm/llvmpipe: add support for block size intrinsicDave Airlie2019-12-271-3/+18
| | | | | | | We have to pass the main block size into the coroutine and into the shader. Acked-by: Roland Scheidegger <[email protected]>
* gallivm/llvmpipe: add support for work dimension intrinsic.Dave Airlie2019-12-272-16/+26
| | | | | | We have to pass the work_dim given by the user into the shader. Acked-by: Roland Scheidegger <[email protected]>
* llvmpipe/gallivm: add kernel inputsDave Airlie2019-12-274-2/+25
| | | | | | compute shaders need kernel input support Acked-by: Roland Scheidegger <[email protected]>
* llvmpipe: switch to NIR by defaultDave Airlie2019-12-213-8/+24
| | | | | | | | | | Add LP_DEBUG=tgsi_ir (tgsi already taken) to fallback to TGSI paths. Disable NIR_VALIDATE in CI (Michel/Eric acked) Reviewed-by: Roland Scheidegger <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2303> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2303>
* llvmpipe: enable ARB_shader_draw_parameters.Dave Airlie2019-12-121-1/+2
| | | | | | All the bits should be in place for this now. Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm: fix perspective enable if usage_mask doesn't have 0 bit setDave Airlie2019-12-121-2/+2
| | | | | | | | | | The current code looks like a typo, and fails if the usage_mask is for a y/z enabled input. Fixes piglit ext_transform_feedback-immediate-reuse-index-buffer with llvmpipe/nir Reviewed-by: Roland Scheidegger <[email protected]>
* llvmpipe/nir: handle texcoord requirementsDave Airlie2019-12-121-1/+1
| | | | | | Switch to using texcoord intrinsic support. Reviewed-by: Roland Scheidegger <[email protected]>
* llvmpipe: implement TEX_LZ and TXF_LZ opcodesMarek Olšák2019-12-091-1/+1
| | | | | | | gallivm receives these opcodes anyway because st_draw_feedback.c uses shaders that were assembled for drivers, not llvmpipe. Reviewed-by: Roland Scheidegger <[email protected]>
* llvmpipe: enable support for primitives generated outside streamoutDave Airlie2019-12-063-0/+9
| | | | | | This enables the draw support when the queries are enabled. Reviewed-by: Roland Scheidegger <[email protected]>
* llvmpipe: disable occlusion queries when requested by state trackerDave Airlie2019-12-062-1/+3
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* llvmpipe: add queries disabled flagDave Airlie2019-12-062-0/+5
| | | | | | | This flag is set when the state tracker request queries be disabled for meta operations. Reviewed-by: Roland Scheidegger <[email protected]>
* llvmpipe: enable texcoord semanticsDave Airlie2019-12-042-10/+18
| | | | | | | To make NIR transitioning easier, move the driver to using texcoord semantics. Reviewed-by: Eric Anholt <[email protected]>
* gallivm/llvmpipe: add support for front facing in sysval.Dave Airlie2019-12-032-1/+5
| | | | | | | | This wires up the front facing value as a sysval, I'd like to remove the other facing code but I'd need to confirm VMware don't use it first. Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: Add GL_TDFX_texture_compression_FXT1 supportKenneth Graunke2019-12-011-1/+2
| | | | | | | | | | | | | Eric recently added PIPE_FORMAT_FXT1_RGB[A] as part of his format unification work. This was really most of the work of implementing the extension. We just need to handle it in a couple of places and expose the extension. v2: Reject the new formats in llvmpipe_is_format_supported to prevent crashes because it doesn't know how to handle the new formats. Reviewed-by: Marek Olšák <[email protected]> [v1] Reviewed-by: Eric Anholt <[email protected]> [v1]
* llvmpipe: add initial nir supportDave Airlie2019-11-287-19/+110
| | | | | | | | | | This adds the hooks between llvmpipe and the gallivm NIR code, for compute and fragment shaders. NIR support is hidden behind LP_DEBUG=nir for now until all the intergration issues are solved Reviewed-by: Roland Scheidegger <[email protected]>
* llvmpipe: initial query buffer object support. (v2)Dave Airlie2019-11-252-1/+153
| | | | | | | This fails a couple of piglits due to other bugs in llvmpipe, but it adds support for the feature properly. v2: don't reset pipestats, just recalc, fix CI expectation
* llvmpipe: Check thread creation errorsNathan Kidd2019-11-151-0/+4
| | | | | | | | | | | | | | | | | | In the case of glibc, pthread_t is internally a pointer. If lp_rast_destroy() passes a 0-value pthread_t to pthread_join(), the latter will SEGV dereferencing it. pthread_create() can fail if either the user's ulimit -u or Linux kernel's /proc/sys/kernel/threads-max is reached. Choosing to continue, rather than fail, on theory that it is better to run with the one main thread, than not run at all. Keeping as many threads as we got, since lack of threads severely degrades llvmpipe performance. Signed-off-by: Nathan Kidd <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* util: Move gallium's PIPE_FORMAT utils to /util/format/Eric Anholt2019-11-1411-14/+14
| | | | | | | | | | | | | | | 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]>
* st/mesa: remove unused TGSI-only debug printing functionsMarek Olšák2019-11-111-4/+0
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* gallium: Add defines for FXT1 texture compression.Eric Anholt2019-11-071-1/+2
| | | | | | | | | | This texture compression is exposed by 830 and 915, and to make MESA_FORMAT match PIPE_FORMAT defines I need a corresponding PIPE_FORMAT. v2: Set is_hand_written so we don't try to generate pack/unpack code. Reviewed-by: Marek Olšák <[email protected]>
* util: rename PIPE_ARCH_*_ENDIAN to UTIL_ARCH_*_ENDIANDylan Baker2019-11-053-9/+9
| | | | | | | | | | | As requested by Tim. This was generated with: grep 'PIPE_ARCH_.*_ENDIAN' -rIl | xargs sed -ie 's@PIPE_ARCH_\(.*\)_ENDIAN@UTIL_ARCH_\1_ENDIAN@'g v2: - add this patch Reviewed-by: Eric Engestrom <[email protected]>
* util/u_endian: set PIPE_ARCH_*_ENDIAN to 1Dylan Baker2019-11-053-8/+8
| | | | | | | | | | | | This will allow it to be used as a drop in replacement for _mesa_little_endian in a number of cases. v2: - Always define PIPE_ARCH_LITTLE_ENDIAN and PIPE_ARCH_BIG_ENDIAN, define the one that reflects the host system to 1 and the other to 0 - replace all uses of #ifdef, #ifndef, and #if defined() with #if and #if ! with PIPE_ARCH_*_ENDIAN Reviewed-by: Eric Engestrom <[email protected]>
* util: rename list_empty() to list_is_empty()Timothy Arceri2019-10-281-1/+1
| | | | | | | This makes it clear that it's a boolean test and not an action (eg. "empty the list"). Reviewed-by: Eric Engestrom <[email protected]>
* llvmpipe: avoid generating empty-body blocksEric Engestrom2019-10-241-1/+1
| | | | | | Suggested-by: Erik Faye-Lund <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* llvmpipe: avoid compiling no-op block on release buildsEric Engestrom2019-10-241-1/+2
| | | | | | Suggested-by: Adam Jackson <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* llvmpipe: handle compute shader launch with 0 threadsDave Airlie2019-10-211-0/+9
| | | | | | | | | If you set LP_NUM_THREADS=0 compute shaders would hang, just execute the workloads in sequence if we have no threads in the pool. Fixes: 1b24e3ba75 ("llvmpipe: add compute threadpool + mutex") Reviewed-by: Roland Scheidegger <[email protected]>
* meson/llvmpipe: Add dep_llvm to driver_swrastDylan Baker2019-10-181-1/+1
| | | | | | This fixes build errors in gl-gdi on windows when using llvmpipe Reviewed-by: Adam Jackson <[email protected]>
* llvmpipe: add support for tg4 component selection.Dave Airlie2019-10-111-0/+1
| | | | | | | This is needed as part of GLES3.1 and helps for ARB_gpu_shader5. Fixes: KHR-GLES31.core.texture_gather.* cases Reviewed-by: Roland Scheidegger <[email protected]>
* llvmpipe: increase max texture size to 2GBRoland Scheidegger2019-10-111-1/+5
| | | | | | | The 1GB limit was arbitrary, increase this to 2GB (which is the max possible without code changes). Reviewed-by: Jose Fonseca <[email protected]>