aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
Commit message (Collapse)AuthorAgeFilesLines
* llmvpipe: No-op implement more barriersJason Ekstrand2020-01-131-0/+3
| | | | | Acked-by: Dave Airlie <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3307>
* llvmpipe: add ARB_derivative_control supportDave Airlie2020-01-101-0/+4
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* spirv,nir: add new lod parameter to image_{load,store} intrinsicsSamuel Pitoiset2020-01-091-0/+5
| | | | | | | | | | | | SPV_AMD_shader_image_load_store_lod allows to use a lod parameter with OpImageRead, OpImageWrite and OpImageSparseRead. According to the specification, this parameter should be a 32-bit integer. It is initialized to 0 when no lod parameter is found during SPIR-V->NIR translation. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* llvmpipe: add support for ARB_indirect_parameters.Dave Airlie2020-01-091-1/+18
| | | | | | | | | 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>
* gallium/util: add multi_draw_indirect to util_draw_indirect.Dave Airlie2020-01-091-9/+13
| | | | | | | | ARB_indirect_parameters needs drivers to deal with mutli_draw_indirect themselves. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3234>
* gallium: bypass u_vbuf if it's not needed (no fallbacks and no user VBOs)Marek Olšák2020-01-084-7/+89
| | | | | | | This decreases CPU overhead, because u_vbuf is completely bypassed in those cases. Acked-by: Alyssa Rosenzweig <[email protected]>
* gallium/cso_context: move non-vbuf vertex buffer and element code into helpersMarek Olšák2020-01-081-24/+43
| | | | | | These will be reused. Acked-by: Alyssa Rosenzweig <[email protected]>
* gallium: put u_vbuf_get_caps return values into u_vbuf_capsMarek Olšák2020-01-084-19/+25
| | | | Acked-by: Alyssa Rosenzweig <[email protected]>
* 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>
* gallium: Add PIPE_FORMAT_P010 supportThong Thai2020-01-031-0/+1
| | | | | | Signed-off-by: Thong Thai <[email protected]> Reviewed-by: Leo Liu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3153>
* u_vbuf: don't try to delete NULL driver CSOIago Toral Quiroga2020-01-031-1/+2
| | | | | | | | | | | | | Since 18a8c3f7f11 we don't create a driver CSO if there are any incompatible elements, so only ask backends to delete it if it exists. Fixes multiple CTS crashes in V3D. Fixes: 18a8c3f7f11 ("u_vbuf: Only create driver CSO if no incompatible elements") Reviewed-by: Alejandro Piñeiro <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* Revert "u_vbuf: Regard non-constant vbufs with non-instance elements as free"Marek Olšák2019-12-301-13/+4
| | | | | | This reverts commit c6ef79c488bb5fffde31e7065fd3e575f3c25fb5. It broke torcs.
* gallium/gallivm/tgsi: enable tessellation shadersJan Zielinski2019-12-303-97/+552
| | | | | | | | | | | | | | | | | | | | Tessellation Control and Evaluation shaders are implementing tessellation and require special handling of their inputs and outputs. TCS can write out not only per-vertex, but also per-patch (per-primitive) attributes and tessellation factor values that control the tessellator. TES can read TCS outputs, plus must be feeded with new system values (tessellation coordinates) that are outputs of the tessellator fixed function. TCS can also contain calls to barrier() function (similar to compute shaders). Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Alok Hota <[email protected]>
* llvmpipe: enable ARB_shader_group_vote.Dave Airlie2019-12-303-0/+64
| | | | | | | | | | 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>
* gallivm: fixup const int64 builder.Dave Airlie2019-12-281-1/+1
| | | | | | | | Pointed out by Ilia. Fixes: 84ba00877496 (gallivm: add 64-bit const int creator.) Reviewed-by: Ilia Mirkin <[email protected]> Acked-by: Alyssa Rosenzweig <[email protected]>
* gallivm/nir: add vec8/16 supportDave Airlie2019-12-271-2/+4
| | | | Acked-by: Roland Scheidegger <[email protected]>
* gallivm/nir: lower packingDave Airlie2019-12-271-0/+1
| | | | | | | This fixes some CL upsample tests, which lower into packing that needs lowering. Acked-by: Roland Scheidegger <[email protected]>
* gallivm: handle non-32 bit undefinedDave Airlie2019-12-271-1/+2
| | | | | | other sized undefs caused llvm asserts Acked-by: Roland Scheidegger <[email protected]>
* llvmpipe/nir: use nir_max_vec_components in more placesDave Airlie2019-12-273-46/+46
| | | | | | This is prep work for when vec8/16 have landed. Acked-by: Roland Scheidegger <[email protected]>
* gallivm/llvmpipe: add support for global operations.Dave Airlie2019-12-273-0/+269
| | | | Acked-by: Roland Scheidegger <[email protected]>
* gallivm/llvmpipe: add support for block size intrinsicDave Airlie2019-12-273-0/+6
| | | | | | | 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-273-0/+5
| | | | | | We have to pass the work_dim given by the user into the shader. Acked-by: Roland Scheidegger <[email protected]>
* tgsi/mesa: handle KERNEL caseDave Airlie2019-12-271-0/+1
| | | | | | Translate to compute for now. Acked-by: Roland Scheidegger <[email protected]>
* gallivm/nir: allow 8/16-bit conversion and comparison.Dave Airlie2019-12-271-3/+29
| | | | | | This adds the convert to 8/16 and support for 8/16 comparsions Acked-by: Roland Scheidegger <[email protected]>
* gallivm: pick integer builders for alu instructions.Dave Airlie2019-12-271-17/+46
| | | | | | This allows these to be used with non 32-bit types. Acked-by: Roland Scheidegger <[email protected]>
* gallivm: add support for 8-bit/16-bit integer buildersDave Airlie2019-12-273-14/+68
| | | | Acked-by: Roland Scheidegger <[email protected]>
* llvmpipe/gallivm: add kernel inputsDave Airlie2019-12-274-1/+65
| | | | | | compute shaders need kernel input support Acked-by: Roland Scheidegger <[email protected]>
* gallivm: add 64-bit const int creator.Dave Airlie2019-12-271-0/+5
| | | | Acked-by: Roland Scheidegger <[email protected]>
* Android: Fix build issue without LLVMRoman Stratiienko2019-12-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Some of the latest changes are causing the following build error on Android: ``` external/mesa3d/src/gallium/auxiliary/nir/nir_to_tgsi_info.c:403:6: error: redefinition of 'nir_tgsi_scan_shader' void nir_tgsi_scan_shader(const struct nir_shader *nir, ^ external/mesa3d/src/gallium/auxiliary/nir/nir_to_tgsi_info.h:37:20: note: previous definition is here static inline void nir_tgsi_scan_shader(const struct nir_shader *nir, ^ ``` Include nir_to_tgsi_info.c and nir_to_tgsi_info.h into the build only if LLVM is enabled. Signed-off-by: Roman Stratiienko <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2978> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2978>
* u_vbuf: Return true in u_vbuf_get_caps if nb of vbufs is below minimumPaul Cercueil2019-12-211-0/+5
| | | | | | | | | | Return true in u_vbuf_get_caps if the number of vertex buffers is below the minimum required for proper OpenGL 2.0. Signed-off-by: Paul Cercueil <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2807> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2807>
* u_vbuf: Regard non-constant vbufs with non-instance elements as freePaul Cercueil2019-12-211-4/+13
| | | | | | | | | | In the case of unroll_indices, we can regard all non-constant vertex buffers with only non-instance vertex elements as incompatible and thus free. Signed-off-by: Paul Cercueil <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2807>
* u_vbuf: use single vertex buffer if it's not possible to have multipleWladimir J. van der Laan2019-12-211-1/+20
| | | | | | | | | | Put CONST, VERTEX and INSTANCE attributes into one vertex buffer if necessary due to hardware constraints. Signed-off-by: Wladimir J. van der Laan <[email protected]> Signed-off-by: Paul Cercueil <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2807>
* u_vbuf: Only create driver CSO if no incompatible elementsPaul Cercueil2019-12-211-2/+6
| | | | | | Signed-off-by: Paul Cercueil <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2807>
* u_vbuf: Mark vbufs incompatible if more were requested than HW supportsPaul Cercueil2019-12-211-0/+11
| | | | | | | | | | | More vertex buffers are used than the hardware supports. In principle, we only need to make sure that less vertex buffers are used, and mark some of the latter vertex buffers as incompatible. For now, mark all vertex buffers as incompatible. Signed-off-by: Paul Cercueil <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2807>
* u_vbuf: add logic to use a limited number of vbufsWladimir J. van der Laan2019-12-212-0/+8
| | | | | | | | | | Make it possible to limit the number of vertex buffers as there exist GPUs with less then 32 supported vertex buffers. Signed-off-by: Wladimir J. van der Laan <[email protected]> Signed-off-by: Paul Cercueil <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2807>
* gallium: add PIPE_CAP_MAX_VERTEX_BUFFERSChristian Gmeiner2019-12-211-0/+3
| | | | | | | | | Add PIPE_CAP_MAX_VERTEX_BUFFERS param, which defaults to 16. Signed-off-by: Christian Gmeiner <[email protected]> Signed-off-by: Paul Cercueil <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2807>
* gallivm/nir: wrap idiv to avoid divide by 0 (v2)Dave Airlie2019-12-211-4/+21
| | | | | | | | | | This code is taken from the TGSI paths, and should fix the regression seens with GLES2 v2: use the udiv path which has d3d10 defined return. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2303>
* gallium/auxiliary: Handle count == 0 in u_vbuf_get_minmax_index_mappedIcecream952019-12-161-0/+6
| | | | | | | | | | | | | This makes u_vbuf_get_minmax_index_mapped return min = 0 / max = 0 when info->count == 0. That should never happen anyway, but this commit makes it at least return a sane value that callers expect, and also allows us - and GCC - to assume count != 0 for optimization purposes. Reviewed-by: Alyssa Rosenzweig <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3050> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3050>
* gallium/auxiliary: Reduce conversions in u_vbuf_get_minmax_index_mappedIcecream952019-12-161-6/+12
| | | | | | | | | | | | | | | With this patch, GCC generates vectorized code that does the comparisons without converting the indices to 32-bit first. This optimization makes the aforementioned function almost twice as fast for ARM NEON, and should speed up vectorised code on other platforms. Without vectorisation, the function is still a percent or two faster, but slightly larger. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3050>
* vc4: move the draw splitting routine to shared codeErico Nunes2019-12-144-0/+119
| | | | | | | | | | This can also be useful for other hardware which has similar limitations on vertex count per single draw. The Mali400 has a similar limitation and can reuse this. Signed-off-by: Erico Nunes <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2445>
* gallium/util: add alignment parameter to util_upload_index_bufferErico Nunes2019-12-142-3/+3
| | | | | | | | | | At least on Mali Utgard, index buffers need to be aligned on 0x40. To avoid duplicating this, add an alignment parameter. Keep the previous default for the other existing users. Signed-off-by: Erico Nunes <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2445>
* util: Don't access members of NULL pointersTomeu Vizoso2019-12-121-5/+10
| | | | | | | | | | | | | | | | | | | | | | Should be harmless, but UBSAN complains about it and fills the logs with noise. ../src/gallium/auxiliary/util/u_inlines.h:110:8: runtime error: member access within null pointer of type 'struct pipe_surface'"} #0 0xaaccf186 in pipe_surface_reference ../src/gallium/auxiliary/util/u_inlines.h:110"} #1 0xaaccf186 in util_copy_framebuffer_state ../src/gallium/auxiliary/util/u_framebuffer.c:105"} #2 0xaabfb60e in cso_set_framebuffer ../src/gallium/auxiliary/cso_cache/cso_context.c:723"} #3 0xaae195ce in st_update_framebuffer_state ../src/mesa/state_tracker/st_atom_framebuffer.c:207"} #4 0xaae12316 in st_validate_state ../src/mesa/state_tracker/st_atom.c:261"} #5 0xaae31302 in st_Clear ../src/mesa/state_tracker/st_cb_clear.c:438"} #6 0x4c3d0e in deqp::gles2::TestCaseWrapper::iterate(tcu::TestCase*) (/deqp/modules/gles2/deqp-gles2+0x2ad0e)"} #7 0x828cf2 in tcu::TestSessionExecutor::iterateTestCase(tcu::TestCase*) (/deqp/modules/gles2/deqp-gles2+0x38fcf2)"} #8 0x8295f0 in tcu::TestSessionExecutor::iterate() (/deqp/modules/gles2/deqp-gles2+0x3905f0)"} #9 0x810aac in tcu::App::iterate() (/deqp/modules/gles2/deqp-gles2+0x377aac)"} #10 0x4c1d4c in main (/deqp/modules/gles2/deqp-gles2+0x28d4c)"} #11 0xb64b6aa8 in __libc_start_main (/lib/arm-linux-gnueabihf/libc.so.6+0x1aaa8)"} Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* gallivm: fixup base_vertex supportDave Airlie2019-12-123-3/+8
| | | | | | | base vertex should be 0 for non-indexed draws according to the piglit tests. Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm/draw: add support for draw_id system value.Dave Airlie2019-12-129-3/+19
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm: add base instance sysval supportDave Airlie2019-12-125-4/+14
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm/nir: copy compare ordering code from tgsiDave Airlie2019-12-121-1/+6
| | | | | | | This fixes some isinf/isnan tests copying what the tgsi code paths do for float compares Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm/nir: cleanup code and call cmp wrapperDave Airlie2019-12-121-12/+14
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm: fix transpose for when first channel isn't createdDave Airlie2019-12-121-6/+12
| | | | | | | | | | | The previous fix worked when the second channel wasn't exposed, but a couple of piglit tests have inputs with just the y/z chans, no x/w. Partly Fixes piglit ext_transform_feedback-immediate-reuse-index-buffer with llvmpipe/nir Fixes: 5363cda52b84 ("gallivm: add swizzle support where one channel isn't defined.") Reviewed-by: Roland Scheidegger <[email protected]>
* llvmpipe/nir: handle texcoord requirementsDave Airlie2019-12-124-5/+5
| | | | | | Switch to using texcoord intrinsic support. Reviewed-by: Roland Scheidegger <[email protected]>