About Social Code
aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2025-11-06llvmpipe: Remove unnecessary includesHEADmainspencer-lunarg
Signed-off-by: spencer-lunarg <spencer@lunarg.com> Acked-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38202>
2025-11-06llvmpipe: Remove trailing whitespacespencer-lunarg
Signed-off-by: spencer-lunarg <spencer@lunarg.com> Acked-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38202>
2025-11-06agx: use sparse live-setsAlyssa Rosenzweig
fixes O(N^2) memory usage and runtime around liveness/scheduling/spilling/RA, and proves out the design for the common code sparse bitsets (I did need to make an adjustment for this - worth the effort). Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37908>
2025-11-06nir: Use sparse bitset for liveness informationNatalie Vock
Some shaders, especially RTPSO shaders that have parts of the PSO inlined, can become absolutely huge. Using a sparse bitset avoids quadratic complexity in memory consumption for the liveness information. This reduces peak memory usage in worst-case tests (hammering compilation of many huge RTPSOs on 32 threads concurrently) by ~60%, from 43GB to 18GB. CPU time (seconds) differences for a workload with mostly small shaders: Difference at 95.0% confidence -5.27 +/- 1.08963 -0.88811% +/- 0.183626% (Student's t, pooled s = 0.629735) Peak resident set usage for the mostly-small workload: Difference at 95.0% confidence 30809 +/- 13394.3 1.59276% +/- 0.69246% (Student's t, pooled s = 7741.09) CPU time for the heavy workload did not show any difference. Co-authored-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37908>
2025-11-06util: Add sparse bitset data structureNatalie Vock
Useful for potentially huge bitsets that are expected to be mostly filled with zeroes, reducing memory consumption by assuming bits being zero by default (without wasting memory to store zeroes). Co-authored-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37908>
2025-11-06util/bitset: Wrap __size in bracesNatalie Vock
Otherwise funny things can happen with the < operator because of precedence rules. Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37908>
2025-11-06anv: prevent potential, but unlikely, overflowDylan Baker
The code in question multiplies `uint32_t`s together and assigns them to a `uint64_t`. It seems rather unlikely at there would be an overflow, but we might as well do the cast. CID: 1649587 Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38289>
2025-11-06anv: assert that we don't overflowDylan Baker
Our exposed limits say we shouldn't be able to, but let's add an assert in case something changes, and to help Coverity out. CID: 1662103 Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37583>
2025-11-06tu: Fix renderpass-level tracepoints not showing up in binningDanylo Piliaiev
They should be cloned not only per-tile but also for binning IB. Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38240>
2025-11-06tu: Use cmd->rp_trace u_trace for draw callsDanylo Piliaiev
Fixes: 707c97f6340 ("tu: Add tracepoints around draws, with shader sha1s.") Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38240>
2025-11-06panvk: fix mem alloc size for VkBuffer backed by imported blob AHBYiwei Zhang
For AHB VkBuffer import, the allocationSize comes from the raw external AHB props query and it can be larger than the underlying buffer memory requirement. So we must respect the allocationSize for the actual mem import to support mapping the whole AHB size, and the dedicated buffer info has to be stripped to obey the spec. Test: CtsNativeHardwareTestCases no longer crashes on debug build panvk Fixes: 66bbd9eec83 ("panvk: implement AHB image deferred init and memory alloc") Tested-by: Valentine Burley <valentine.burley@collabora.com> Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38274>
2025-11-06brw,elk: drop unused spirv->nir routinesAlyssa Rosenzweig
Unused since switching to vtn_bindgen2. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38246>
2025-11-06panvk: Advertise VK_KHR_pipeline_binaryFaith Ekstrand
Closes: https://gitlab.freedesktop.org/panfrost/mesa/-/issues/216 Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38284>
2025-11-06panvk: Initialize the disk cache earlierFaith Ekstrand
We want to know whether or not we successfully initialized before filling out physical device properties. Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38284>
2025-11-06panvk: include cmd stages for semaphores on submitAksel Hjerpbakk
CTS regressed due to c2a6fb64193 not considering cmd stages for signaling and waiting. Before this patch panvk did consider cmd stages, but not semaphore stage masks. With this fix we consider both which is what the spec requires Fixes: c2a6fb64193 ("panvk: cull semaphores in unrelated subqueues") Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38138>
2025-11-06nvk: Advertise VK_KHR_pipeline_binaryFaith Ekstrand
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06anv: enable KHR_pipeline_binary supportLionel Landwerlin
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12802 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06vulkan/runtime: Add an environment variable to validate shader binariesFaith Ekstrand
Setting MESA_VK_VALIDATE_SHADER_BINARIES will cause the shader code to round-trip every shader through [de]serialize and only ever use the deserialized version. This catches bugs where the driver may drop things in the [de]serialization process. It also deserializes the new shader again and compares it against the original to ensure that deserialize -> serialize is idempotent. Acked-by: Eric R. Smith <eric.smith@collabora.com> Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06vulkan/runtime: Add a vk_compile_shaders() helperFaith Ekstrand
This is just a wrapper around ops->compile() for now but we'll extend it in the next commit to add some validation. Acked-by: Eric R. Smith <eric.smith@collabora.com> Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06vulkan/runtime: implement VK_KHR_pipeline_binaryLionel Landwerlin
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Co-Authored-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06vulkan/runtime: track imported stagesLionel Landwerlin
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06vulkan/runtime: switch precomp shaders to blake3 hashesLionel Landwerlin
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06vulkan/runtime: use only blake3_hash to shader keyLionel Landwerlin
To match the VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR of only 32B. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06vulkan/runtime: split rt shaders hashing from compileLionel Landwerlin
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06vulkan/runtime: split graphics shaders hashing from compileLionel Landwerlin
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06vulkan/runtime: split compute shader hashing from compileLionel Landwerlin
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06vulkan/runtime: Add a get_push_range_for_stage() helperFaith Ekstrand
This is already duplicated a few times and we're about to duplicate it more. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06vulkan/runtime: use stage flags to track valid stagesLionel Landwerlin
We'll want to have only hashes in vk_pipeline_stage so the vk_pipeline_stage_is_null() helper won't work. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06vulkan/runtime: keep the set layouts on the stack until pipeline creationLionel Landwerlin
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06vulkan/runtime: split precomp shader hashing from precomp loadingLionel Landwerlin
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06vulkan/runtime: drop blake3 hash on precomp shadersLionel Landwerlin
In order to implement VK_KHR_pipeline_binary, we need to be able to build hash from pipeline creation structures without looking at the cache. The blake3 hash on precomp shaders prevents that as its loading from cache and potentially apply transformation to NIR. Let's stick to the hash generated by vk_pipeline_hash_shader_stage(), it does not look at NIR (except for internal shaders) and already hash the same information : * shader code (SPIR-V, identifier, hash) * robustness state * specialization constants * pipeline flags * entry point name * subgroup information Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06vulkan/runtime: drop some geometry shader hashingLionel Landwerlin
Following bc64ea2815 ("vulkan: fix shader linking with common pipelines") we're always linking pre-rasterization shaders together and the shader hashes are hashed together, so there is no point hashing : - a bitfield of active shaders - merged tesselation information Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06vulkan/runtime: simplify robustness state hashingLionel Landwerlin
We're doing the same in vk_pipeline_precomp_shader_create(). Also fixes valgrind warning due to uninitialized fields Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: mesa-stable Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06vulkan/runtime: split out partitioning logicLionel Landwerlin
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36647>
2025-11-06pan: Move point size and viewport lowering to postprocessFaith Ekstrand
Panvk calls pan_preprocess_nir() from its preprocess hook that it hands off to the Vulkan pipeline code. That hook gets called before we have the opportunity to lower geometry shaders. This means that we get our viewports lowered for the VS and then the geometry shader is trying to work on lowered viewports, which is wrong. Instead, we want to lower later and only apply the viewport transform in the shader that runs as the hardware VS. Reviewed-by: Olivia Lee <olivia.lee@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38265>
2025-11-06pan/bi: Move lower_noperspective*() to postprocess()Faith Ekstrand
Reviewed-by: Olivia Lee <olivia.lee@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38265>
2025-11-06nir: Check the deref mode in lower_point_size()Faith Ekstrand
This is more robust because it ensures that we only ever check the location on something that we know is an outupt. Also, if it's an output then we know (thanks, validation!) that it's a variable. Reviewed-by: Olivia Lee <olivia.lee@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38265>
2025-11-06nir: Handle lowered I/O in lower_viewport_transform()Faith Ekstrand
While we're here, make the variable handling a little more robust by checking the deref mode before assuming there's a reachable variable. Reviewed-by: Olivia Lee <olivia.lee@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38265>
2025-11-06pan/bi: Call constant folding in postprocess()Faith Ekstrand
The comment explicitly calls out pan_nir_lower_store_component(), which is in a different function call so it's a bit weird to have it in the caller. Also, we already do this in postprocess() on midgard so it makes more sense to just move it into bifrost. Reviewed-by: Olivia Lee <olivia.lee@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38265>
2025-11-06pan: roll lower_texture() into postprocess()Faith Ekstrand
Every caller of pan_shader_lower_texture() immediatly called pan_shader_postprocess() and every caller of pan_shader_postprocess() lowered textures except blend shaders and those don't texture anyway. Reviewed-by: Olivia Lee <olivia.lee@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38265>
2025-11-06radv/ci: remove RADV_PERFTEST=video_encode,video_code for GFX6-7Samuel Pitoiset
It's not supported at all, so no need to force enable all video extensions. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38280>
2025-11-06amd/common: rename ac_fake_hw_db.h -> ac_surface_test.hDaniel Schürmann
As the surface tests are the only user now. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37525>
2025-11-06radeonsi: use ac_null_device_create() when AMD_FORCE_FAMILY is setDaniel Schürmann
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37525>
2025-11-06radv: delete winsys/null/*Daniel Schürmann
The null device works without winsys, and now can be found in amd/common/ac_null_device.c. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37525>
2025-11-06amd, radv: create null device without winsysDaniel Schürmann
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37525>
2025-11-06radv: remove radeon_winsys::get_chip_name() and use info->marketing_name ↵Daniel Schürmann
directly Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37525>
2025-11-06radv/device: return early in radv_CreateDevice() if creating a null deviceDaniel Schürmann
Also reorder initialization, so that everything required for compilation is done first. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37525>
2025-11-06radv/null_device: set more options which affect compilationDaniel Schürmann
Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37525>
2025-11-06radv/null_device: don't attempt to upload shadersDaniel Schürmann
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37525>
2025-11-06radv: hash keep_executable_info into shader key rather than device cache keyDaniel Schürmann
for consistency. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37525>