summaryrefslogtreecommitdiff
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* nir: Drop unused name from nir_ssa_dest_initAlyssa Rosenzweig2023-05-1719-55/+53
| | | | | | | | | | | | | | | | | | | Since 624e799cc34 ("nir: Drop nir_ssa_def::name and nir_register::name"), SSA defs don't have names, making the name argument unused. Drop it from the signature and fix the call sites. This was done with the help of the following Coccinelle semantic patch: @@ expression A, B, C, D, E; @@ -nir_ssa_dest_init(A, B, C, D, E); +nir_ssa_dest_init(A, B, C, D); Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23078>
* iris: Set CS stall bit during HIZ_CCS_WT surface fast clearSagar Ghuge2023-05-171-0/+4
| | | | | | | | | It make sense to enable CS stall so that it guarantees that the fast clear will start after tile cache flush has completed. Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com> Reviewed-by: Nanley Chery <nanley.g.chery@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23063>
* Uprev Piglit to d8c08d123fadb986e9a8a7887b922ff63fcff52eCollabora's Gfx CI Team2023-05-172-0/+2
| | | | | | https://gitlab.freedesktop.org/mesa/piglit/-/compare/536975d94a40cf76a69fcfa786c2513eccd0c989...d8c08d123fadb986e9a8a7887b922ff63fcff52e Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23017>
* Add checks for NULL dxil_validatorLuca Bacci2023-05-171-2/+1
| | | | | | Fixes https://gitlab.freedesktop.org/mesa/mesa/-/issues/8718 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22141>
* zink: add feedback loop usage for swapchainsMike Blumenkrantz2023-05-171-0/+2
| | | | | | | | | | affects: GTF-GL46.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_functionality_linear_filter_color_blit cc: mesa-stable Reviewed-by: Joshua Ashton <joshua@froggi.es> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22959>
* llvmpipe: only include old Transform includes when neededPierre-Eric Pelloux-Prayer2023-05-171-4/+4
| | | | | | | | | This fixes building with recent LLVM where these 2 .h files were removed. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8671 Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22980>
* llvmpipe/cs: refactor cs generator args to use an enumDave Airlie2023-05-171-80/+104
| | | | | | | | This was horror I should have cleaned up before, clean it up before mesh shaders make it worse. Reviewed-by: Brian Paul <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22788>
* draw: move to use common sampler/image binding codeDave Airlie2023-05-174-335/+64
| | | | | Reviewed-by: Brian Paul <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22788>
* llvmpipe: move to common sampler/image binding codeDave Airlie2023-05-175-245/+14
| | | | | | | | This leaves the cache stuff in place, but we should consider trying to consolidate that. Reviewed-by: Brian Paul <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22788>
* gallivm: add common code for sample/image tracking.Dave Airlie2023-05-173-0/+297
| | | | | | | | Now that the other code is consoldiated it makes sense to just consolidate this binding code between the drivers and core Reviewed-by: Brian Paul <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22788>
* gallivm/draw/llvmpipe: consolidate the sampler/image dynamic state fnsDave Airlie2023-05-174-602/+331
| | | | | | | | These can all be the same now. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22788>
* gallivm: refactor common resources out of contextsDave Airlie2023-05-1735-1007/+721
| | | | | | Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22788>
* llvmpipe: refactor fs/cs jit structure members.Dave Airlie2023-05-172-50/+41
| | | | | | | | This lines them up just like the draw ones. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22788>
* draw: align common members in jit context structs.Dave Airlie2023-05-172-114/+124
| | | | | | | | | this makes all the structs have the same baseline members for resources and aniso_filter_table. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22788>
* freedreno: implement GL_ARB_indirect_parametersAmber2023-05-172-1/+33
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21593>
* ir3, freedreno: implement GL_ARB_shader_draw_parametersAmber2023-05-177-18/+62
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21593>
* ntt: Stop handling legacy atomicsAlyssa Rosenzweig2023-05-161-40/+0
| | | | | | | | | Not seen. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Emma Anholt <emma@anholt.net> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23036>
* treewide: Stop lowering legacy atomicsAlyssa Rosenzweig2023-05-166-11/+0
| | | | | | | | | There are no more producers of legacy atomics so these calls are inert. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Emma Anholt <emma@anholt.net> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23036>
* lavapipe: Lower legacy atomics soonerAlyssa Rosenzweig2023-05-162-51/+9
| | | | | | | | Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Emma Anholt <emma@anholt.net> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23036>
* frontends/va/context: return error if context_id == 0Thong Thai2023-05-161-0/+3
| | | | | | | | | | | | | | When destroying a context, check the context_id, preventing the handle_table_get function from producing the following error: handle_table_get: Assertion `handle' failed. Cc: stable Signed-off-by: Thong Thai <thong.thai@amd.com> Tested-by: David Heidelberg <david.heidelberg@collabora.com> Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22970>
* rusticl/platform: generate extension constants via macroKarol Herbst2023-05-161-6/+20
| | | | | | Signed-off-by: Karol Herbst <git@karolherbst.de> Reviewed-by: Nora Allen <blackcatgames@protonmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23031>
* rusticl: explicitly state supported SPIR-V extensionsKarol Herbst2023-05-163-1/+15
| | | | | | | We'll need to be explicit about supported extensions. Signed-off-by: Karol Herbst <git@karolherbst.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23031>
* rusticl/device: split add_ext in fill_extensionsKarol Herbst2023-05-161-28/+23
| | | | | | | | | The initial hope was that we'd get extension and feature pairs more often. Reality isn't as nice so just split it up. Signed-off-by: Karol Herbst <git@karolherbst.de> Reviewed-by: Nora Allen <blackcatgames@protonmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23031>
* rusticl/platform: advertise byte_addressable_storeKarol Herbst2023-05-162-4/+4
| | | | | | | | | | | | From the list of extensions we support on all devices it's the only one we rely on for all devices. There might be some devices not supporting atomics so keep them out there for now. Signed-off-by: Karol Herbst <git@karolherbst.de> Reviewed-by: Nora Allen <blackcatgames@protonmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23031>
* rusticl/device: use PLATFORM_EXTENSIONS as a template for filling extensionsKarol Herbst2023-05-163-4/+4
| | | | | | Signed-off-by: Karol Herbst <git@karolherbst.de> Reviewed-by: Nora Allen <blackcatgames@protonmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23031>
* Reviewed-by: Nora Allen <blackcatgames@protonmail.com>rusticl/platform: make ↵Karol Herbst2023-05-162-7/+6
| | | | | | | | | | the extension array a static This way we can use it inside `Device::fill_extensions` Signed-off-by: Karol Herbst <git@karolherbst.de> Reviewed-by: Nora Allen <blackcatgames@protonmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23031>
* v3d: delay offset/counter values with primitive restartJuan A. Suarez Romero2023-05-163-7/+28
| | | | | | | | | | | | | | | | | | | | | | | | Some values like the transform feedback offset or the number of output vertices in VS can be obtained knowing how many vertices and primitive type are used in the drawcall. But when the primitive restart is enabled, doing this is quite more complex, as we should parse the vertex buffer to know where is the restart values, and so on. In this case, delay this computation after the drawcall is executed, by querying the GPU to know these values. Similarly, this delay is also applied to compute the transform feedback buffer offsets when there is a geometry shader, as we don't know beforehand how many vertices it is going to output. This fixes `spec@!opengl 3.1@primitive-restart-xfb flush` and `spec@!opengl 3.1@primitive-restart-xfb generated`. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22716>
* nir: Add helpers for lazy var creation.Emma Anholt2023-05-162-21/+5
| | | | | | | | | | | | | | | This should make writing some lowering/meta code easier. It also keeps the num_inputs/outputs updated, when sometimes passes forgot to do so (for example, nir_lower_input_attachments updated for one of the two vars it creates). The names of the variables change in many cases, but it's probably nicer to see "VERT_ATTRIB_POS" than "in_0" or whatever. I've only converted mesa core (compiler and GL), not all the driver meta code. Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22809>
* lvp: Use common GetPhysicalDeviceFeatures2Alyssa Rosenzweig2023-05-161-540/+313
| | | | | | | | | | This is a big delete-the-code win. Tested by diff'ing vulkaninfo output before/after the patch and confirming no changes (other than the driverInfo git sha and the pipelineCacheUUID). Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23000>
* zink: Move the workaround before the EDS setting.MrRobbin2023-05-161-3/+3
| | | | | | | | Then we can guarantee the settings correct, otherwise the 'screen->info.have_EXT_extended_dynamic_state3 = false' and 'screen->info.have_EXT_vertex_input_dynamic_state = false' will be enable, but actually we should disable it when 'have_EXT_extended_dynamic_state2 = false'. Fixes: d5cf6f7d2f9 ("zink: disable dynamic state exts if the previous ones aren't present") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23046>
* crocus: fix scratch_bos memory leakPatrick Lerda2023-05-161-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change is inspired from iris_destroy_context(). For instance, this issue is triggered with "piglit/bin/glsl-1.50-gs-max-output -scan 1 20 -auto -fbo": Direct leak of 320 byte(s) in 2 object(s) allocated from: #0 0x7f34fc769987 in calloc (/usr/lib64/libasan.so.6+0xb1987) #1 0x7f34f4fa168a in bo_calloc ../src/gallium/drivers/crocus/crocus_bufmgr.c:288 #2 0x7f34f4fa168a in alloc_fresh_bo ../src/gallium/drivers/crocus/crocus_bufmgr.c:350 #3 0x7f34f4fa168a in bo_alloc_internal ../src/gallium/drivers/crocus/crocus_bufmgr.c:419 #4 0x7f34f4fe50a9 in crocus_get_scratch_space ../src/gallium/drivers/crocus/crocus_program.c:2678 #5 0x7f34f55e8954 in crocus_upload_dirty_render_state ../src/gallium/drivers/crocus/crocus_state.c:6871 #6 0x7f34f55e8954 in crocus_upload_render_state ../src/gallium/drivers/crocus/crocus_state.c:7812 #7 0x7f34f5d9f680 in crocus_simple_draw_vbo ../src/gallium/drivers/crocus/crocus_draw.c:332 #8 0x7f34f5d9f680 in crocus_draw_vbo ../src/gallium/drivers/crocus/crocus_draw.c:438 #9 0x7f34f1d2eeba in tc_call_draw_single ../src/gallium/auxiliary/util/u_threaded_context.c:3735 #10 0x7f34f1d12e03 in batch_execute ../src/gallium/auxiliary/util/u_threaded_context.c:394 #11 0x7f34f1d12e03 in tc_batch_execute ../src/gallium/auxiliary/util/u_threaded_context.c:445 #12 0x7f34f1d22c9a in _tc_sync ../src/gallium/auxiliary/util/u_threaded_context.c:680 #13 0x7f34f1d238f8 in tc_texture_map ../src/gallium/auxiliary/util/u_threaded_context.c:2754 #14 0x7f34f120b9d9 in pipe_texture_map_3d ../src/gallium/auxiliary/util/u_inlines.h:579 #15 0x7f34f120b9d9 in st_ReadPixels ../src/mesa/state_tracker/st_cb_readpixels.c:530 #16 0x7f34f10d7355 in read_pixels ../src/mesa/main/readpix.c:1178 #17 0x7f34f10d7355 in _mesa_ReadnPixelsARB ../src/mesa/main/readpix.c:1195 #18 0x7f34f10d7e10 in _mesa_ReadPixels ../src/mesa/main/readpix.c:1210 Fixes: f3630548f1da ("f3630548f1da crocus: initial gallium driver for Intel gfx 4-7") Signed-off-by: Patrick Lerda <patrick9876@free.fr> Reviewed-by: Filip Gawin <filip.gawin@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23019>
* radeonsi: fix aco compile for atomic opsQiang Yu2023-05-162-42/+9
| | | | | | | | | | | LLVM path will do this in ac_nir_translate(), ACO path need driver to handle it. Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Qiang Yu <yuq825@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23018>
* zink: flag batch usage on swapchain imagesMike Blumenkrantz2023-05-163-1/+36
| | | | | | | | | | | | | | while swapchains themselves are protected against early deletion during presentation, there is nothing protecting them from deletion while they are rendering if a swapchain updates while rendering but before presentation to address this, add batch usage to swapchains which can be checked during pruning to ensure a rendering swapchain isn't pruned Fixes: dc8c9d20568 ("zink: prune old swapchains on present") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22962>
* zink: set higher prio on dedicated memory allocationsMike Blumenkrantz2023-05-161-0/+8
| | | | | | | this should guarantee that e.g., swapchain type images aren't paged out Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22855>
* zink: hook up some memory extensionsMike Blumenkrantz2023-05-161-0/+2
| | | | | | | | enabling VK_EXT_pageable_device_local_memory guarantees that host memory allocations will not consume device-local memory and enables overallocation of device memory when paging can be done Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22855>
* zink: slightly simplify bda allocation chainingMike Blumenkrantz2023-05-161-4/+3
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22855>
* lavapipe: EXT_attachment_feedback_loop_layout_dynamic_stateMike Blumenkrantz2023-05-152-0/+10
| | | | | | Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22964>
* zink: only add feedback loop usage bit if extension is supportedMike Blumenkrantz2023-05-151-2/+3
| | | | | | cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22960>
* zink: ignore no-op image copiesMike Blumenkrantz2023-05-151-1/+9
| | | | | | | | | rare, but it happens and is illegal affects: GTF-GL46.gtf30.GLCoverage.CoverageGL30 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22960>
* zink: reorder some image copy codeMike Blumenkrantz2023-05-151-2/+3
| | | | | | no functional changes, just making other fixes easier to see Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22960>
* zink: reject blits where src/dst is 3D and dst/src z!=0Mike Blumenkrantz2023-05-151-0/+6
| | | | | | | | | this is technically illegal even though it works everywhere, though future spec changes may make it legal affects KHR-GLES3.copy_tex_image_conversions.required.texture3d_cubemap_negz Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22960>
* zink: reorder some native blit codeMike Blumenkrantz2023-05-151-19/+20
| | | | | | | no functional changes, but this will make it more convenient to reject certain blits Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22960>
* zink: destroy current batch state after all other batch statesMike Blumenkrantz2023-05-151-4/+4
| | | | | | | | | | | some resources may not be destroyed immediately and may instead be queued for deletion onto the current batch state, so ensure that the current state is the last one to be destroyed so that all deferred resources are also destroyed cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23033>
* zink: don't leak swapchain readback semaphoresMike Blumenkrantz2023-05-151-0/+3
| | | | | | | | these are considered usable after the queue goes idle, so add them back into the cache Fixes: e9f18f64b9e ("zink: also cache swapchain semaphores") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23033>
* r600: Use unified atomicsAlyssa Rosenzweig2023-05-154-134/+61
| | | | | | Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23026>
* iris: Init CCS_E to COMPRESSED_NO_CLEAR for XeHPNanley Chery2023-05-151-7/+20
| | | | | | | | | | | | | | | Use COMPRESSED_NO_CLEAR for the initial CCS aux state instead of COMPRESSED_CLEAR. This removes a dependency on the initial clear color, meaning that some resolves related to clear color management are now avoided. In the Car Chase benchmark, this avoids all 50 CCS resolves. These only happen during the warm-up phase of the benchmark, so I'm not sure there is an impact on FPS. This was tested on a DG2 in small-BAR mode. Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com> Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22857>
* rusticl: implement cl_khr_pci_bus_infonorablackcat2023-05-153-0/+26
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23022>
* intel: switch over to unified atomicsLionel Landwerlin2023-05-152-132/+24
| | | | | | | Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Reviewed-by: Rohan Garg <rohan.garg@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23004>
* zink: do not open-code memcpyErik Faye-Lund2023-05-151-2/+3
| | | | | | | There's a lot of optimized memcpy implementations out there, let's use them instead of manually copying. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23027>
* zink: clean up tcs_vertices_out_word handlingErik Faye-Lund2023-05-151-7/+5
| | | | | | | | At this point, we already have the index of the declaration itself in the tcs_vertices_out_word variable, so we only need to add the offset from the start of the exec_modes buffer. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23027>