Commit Graph

169756 Commits

Author SHA1 Message Date
Patrick Lerda f9401a515a egl: fix memory leak related to _eglRefreshDeviceList()
Indeed, the unnecessary drmDevice objects were not freed.

For instance, this issue could be triggered with: "piglit/bin/egl_ext_platform_device -auto -fbo":
SUMMARY: AddressSanitizer: 2796 byte(s) leaked in 12 allocation(s).

Fixes: e39d72aec2 ("egl: only take render nodes into account when listing DRM devices")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22408>
2023-04-11 15:48:26 +00:00
David Heidelberg 1fa1c285fc ci/amd: add draw.dynamic_rendering flake
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22411>
2023-04-11 15:10:37 +00:00
Eric Engestrom 4b182dbcf2 v3dv/ci: mark known dEQP-VK.wsi.xlib.surface.query_formats failure
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22410>
2023-04-11 13:39:31 +00:00
Bas Nieuwenhuizen a8cb837703 radv: Align atomic values.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22121>
2023-04-11 12:57:15 +00:00
Bas Nieuwenhuizen 02c46fa1e8 util/disk_cache: Align atomic size.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22121>
2023-04-11 12:57:15 +00:00
Bas Nieuwenhuizen 1c2d90f17a util: Add aligned int64_t types for x86(non 64).
To avoid split locks.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22121>
2023-04-11 12:57:15 +00:00
Samuel Pitoiset 9ccaf5583f radv: fix re-emitting vertex user SGPRs when binding a graphics pipeline
The base SGPR and the number of SGPRs can be equal but it was incorrect
because one VS can have draw_id and one can have base_instance. Fix
this by invalidating the vertex user SGPRs unconditionally.

Though they should also be invalidated after executing secondaries,
otherwise nothing is invalidated if the same pipeline is bind to the
primary again.

This fixes dEQP-VK.dynamic_rendering.primary_cmd_buff.random.seed*.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21652>
2023-04-11 12:12:05 +00:00
Daniel Schürmann 35805d172a radv/ci: add 2 more Flakes for Navi21
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22030>
2023-04-11 11:38:15 +00:00
Daniel Schürmann dcfca69e67 radv: clean up pipeline-cache interface
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22030>
2023-04-11 11:38:15 +00:00
Daniel Schürmann c2b9279227 radv: use vk_pipeline_cache
Replaces the RADV pipeline cache with an implementation
based on the common vk_pipeline_cache.

We use a dual-layer approach with two types of cache entries.

  1. radv_shader:
    - serialized as radv_shader_binary
    - uses SHA1 of the binary as key
  2. radv_pipeline_cache_object:
    - contains pointers to associated radv_shaders
    - serialized as list of SHA1
    - uses the pipeline hash as key

In combination with single-file disk-cache, this reduces the cache size by ~60%.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22030>
2023-04-11 11:38:15 +00:00
Daniel Schürmann 9b3679aff2 radv: implement radv_shader_create_cached()
This function takes a radv_shader_binary and writes it to the
disk cache before creating and returning a radv_shader cache entry.
The key of the cache entry is the full SHA1 hash of the binary.
This way, we will be able to deduplicate identical shaders.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22030>
2023-04-11 11:38:15 +00:00
Daniel Schürmann 55cc2fb088 radv: add struct radv_pipeline_cache_object
This patch implements a per pipeline cache-entry which contains
pointers to the associated shaders.
The serialized format contains the binary hashes of the shaders.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22030>
2023-04-11 11:38:15 +00:00
Daniel Schürmann 577d76f60f radv: add radv_shader_serialize() and radv_shader_deserialize() functions
These functions convert between radv_shader and radv_shader_binary.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22030>
2023-04-11 11:38:15 +00:00
Daniel Schürmann efbf0e70eb radv: unconditionally store the binary code in radv_shader
We will (temporarily) use it to serialize shader binaries
with the common vk_pipeline_cache.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22030>
2023-04-11 11:38:15 +00:00
Daniel Schürmann 5303a57964 radv: derive struct radv_shader from vk_pipeline_cache_object
We will use radv_shader directly as cache entries.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22030>
2023-04-11 11:38:15 +00:00
Lionel Landwerlin daa8003e45 intel/fs: use nomask for setting cr0 for float controls
The instructions manipulation cr0 use the default mask on lane0. So if
for some reason that lane is disabled in some of the dispatchs, we can
end up not executing the instructions.

Fixes flakyness in dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.uniform_float_32_to_16.uniform_matrix_float_rtz_frag

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22314>
2023-04-11 11:01:31 +00:00
Corentin Noël 45a682650c mesa: Add EXT_instanced_arrays support
The support for ARB_instanced_arrays already exists for big GL, reuse the same
PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR for this extension.

The OES_draw_elements_base_vertex and EXT_draw_elements_base_vertex both define
the DrawElementsInstancedBaseVertex method when EXT_instanced_arrays is defined.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22167>
2023-04-11 10:22:35 +00:00
Corentin Noël 8aa4d37b83 glapi: Make EXT_draw_instanced functions available for GLES 2.0
The EXT suffixed functions should be available in the GLES 2.0 context.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22167>
2023-04-11 10:22:35 +00:00
Corentin Noël b3793dc442 mesa: OpenGL ES 3.0 requires EXT_instanced_arrays
Add it to the list of the required extensions.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22167>
2023-04-11 10:22:35 +00:00
Lionel Landwerlin cff71ae8ff anv: fixup streamout write barriers
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8796
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22336>
2023-04-11 09:53:10 +00:00
Konstantin Seurer 2bf9ae78c5 radv: Remove radv_bvh_aabb_node::aabb
It was only read by RRA which can infer it from the parenbt internal
node.

Change in average build time (Control):
84.69471 ms -> 84.25319 ms

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22400>
2023-04-11 07:57:34 +00:00
Konstantin Seurer 1ce50f0774 radv/bvh: Remove calculate_node_bounds
It is unused and will prevent removing the aabb field from
radv_bvh_aabb_node.

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22400>
2023-04-11 07:57:34 +00:00
Konstantin Seurer f791cd9e43 radv: Pack and encode geometry id and flags on the CPU
There is no need to do it on the GPU.

Change in average build time (Control):
84.80691 ms -> 84.69471 ms

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22400>
2023-04-11 07:57:34 +00:00
Konstantin Seurer 8391639b5f radv: Remove has_previous_stage
MESA_SHADER_NONE implies that has_previous_stage is false.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22382>
2023-04-11 06:24:17 +00:00
Konstantin Seurer b4bae8a2c0 aco: Remove is_gs_copy_shader
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22382>
2023-04-11 06:24:17 +00:00
Konstantin Seurer 58ab783153 radv: Remove some dead radv_shader_args setup
radv_declare_shader_args already sets them up.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22382>
2023-04-11 06:24:17 +00:00
Konstantin Seurer 6f9bb453ef radv: Add radv_shader_type to fix gs_copy and trap handler handling
is_gs_copy_shader and is_trap_handler_shader were cleared in
radv_init_shader_args. This restores the original behaviour.

Fixes: 67635bb ("radv: zero-initialize radv_shader_args right before declaring them")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22382>
2023-04-11 06:24:17 +00:00
Alyssa Rosenzweig c66be7521f nir/lower_blend: Enable per-sample shading
Loading output require per-sample blending, so enable per-sample execution of
the shader as a whole so the right sample values are blended. Affects:

dEQP-GLES31.functional.multisample.default_framebuffer.sample_mask_sum_of_inverses

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22385>
2023-04-11 04:16:32 +00:00
Alyssa Rosenzweig a74c2ac403 nir/lower_blend: Set uses_fbfetch_output conservatively
Only insert a load_output if we're going to use it, don't rely on it getting
DCE'd since that will mess up the shader info. This does require a bit of logic
to figure out whether we do need it.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22385>
2023-04-11 04:16:32 +00:00
Alyssa Rosenzweig d998217e17 mesa/st: Set uses_sample_shading when forcing per-sample
In addition to requiring per-sample interpolation, sample shading
changes the behaviour of gl_SampleMaskIn, so we need per-sample shading
even if there are no shader-in variables at all. In that case,
uses_sample_shading won't be set by glsl_to_nir. We need to do so here.

Affected dEQP test on asahi:

   dEQP-GLES31.functional.shaders.sample_variables.sample_mask_in.bits_unique_per_two_samples.multisample_texture_4

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22402>
2023-04-11 03:32:41 +00:00
Jesse Natalie 52ba7e967b d3d12: Support creating PSOs with no attachments with MSAA without TIR
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22402>
2023-04-11 03:32:41 +00:00
Yiwei Zhang 1fda55ba09 venus: forward ARM driverVersion for ANGLE workarounds
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22242>
2023-04-11 03:17:56 +00:00
David Heidelberg 590959057c ci/amd: raven is currently downgraded to 2 machines only, adapt
Revert when all 5 machines are back online.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22403>
2023-04-11 02:33:52 +00:00
David Heidelberg d9ba47e8d4 ci/amd: update device status
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22403>
2023-04-11 02:33:52 +00:00
David Heidelberg fe96bb8dcc Revert "mesa: Enable NV_texture_barrier in GLES2+"
Fixes failing skqp GLES test:
 - gles_lcdblendmodes

This reverts commit c7da969f8f.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22403>
2023-04-11 02:33:52 +00:00
Friedrich Vock 900d622d8e radv: Add RT stages to radv_mesa_to_rgp_shader_stages
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22367>
2023-04-11 02:00:15 +00:00
Mike Blumenkrantz de70c0cf88 lavapipe: implement inline variant caching
inlining is great, but it's less great if a new variant must be created
for every draw

to avoid this, cache inlined variants for reuse

Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22363>
2023-04-11 01:37:05 +00:00
Mike Blumenkrantz 9f5bb8992f lavapipe: don't double-inline ubo0
this was already handled above and causes negative indexing

cc: mesa-stable

Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22363>
2023-04-11 01:37:05 +00:00
Alyssa Rosenzweig 7582752233 ci: Run clang-format on panfrost
So we don't regress formatting in the future. This should never really trigger
if people configure their editors correctly, but it can help avoid regressing
the formatting from drive-by patches.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22372>
2023-04-10 21:56:04 +00:00
Alyssa Rosenzweig c7bf3b69eb panvk: Clang-format
We're going to enforce clang-format in CI, so get with the program! This doesn't
change a *ton* all considered, because panvk was already aiming for the style we
have in the panfrost clang-format file.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22372>
2023-04-10 21:56:04 +00:00
Alyssa Rosenzweig 4ccf174009 panfrost: Re-run clang-format
We've regressed the clang-formatting in a few places, since we're not enforcing
formatting in CI yet and I think at one point my editor wasn't quite right.
Reapply so we can get to clang-format-clean.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22372>
2023-04-10 21:56:04 +00:00
Alyssa Rosenzweig 0a67386b40 pan/decode: Move comment out of designated initializer
clang-format chokes on this.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22372>
2023-04-10 21:56:04 +00:00
Alyssa Rosenzweig c90f036516 panfrost/winsys: Clang-format
This was missed in the original clang-format commit because I touch this code so
infrequently, lol.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22372>
2023-04-10 21:56:04 +00:00
Alyssa Rosenzweig edb5b03cde panfrost/winsys: Add .clang-format for winsys folder
Last place where Panfrost code hides.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22372>
2023-04-10 21:56:04 +00:00
Alyssa Rosenzweig 74a31491ed panfrost: Symlink gallium .clang-format to common
So we only have one .clang-format file to worry about.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22372>
2023-04-10 21:56:04 +00:00
Alyssa Rosenzweig e3105f93bd mailmap: Update my e-mail
https://rosenzweig.io/blog/passing-reins-panfrost.html

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22399>
2023-04-10 21:54:05 +00:00
Mike Blumenkrantz d87756923d lavapipe: refactor/consolidate GPL shader copying
this is easier to read/modify

also add asserts for members that should be null

Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22352>
2023-04-10 21:35:57 +00:00
Mike Blumenkrantz e33fda3732 lavapipe: copy fragment shader when merging GPL pipelines
this otherwise loses access data and causes flakiness with atomic ops

Fixes: 6e5fe71599 ("lavapipe: split out shader struct members into their own struct")

Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22352>
2023-04-10 21:35:57 +00:00
Timur Kristóf 14be6b084e radv: Don't include nir.h in radv_shader.h
Avoid recompiling some RADV files when something changes in NIR.
Also clean up a few other includes.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22241>
2023-04-10 20:01:28 +00:00
Timur Kristóf 2ff1267959 aco: Only include nir.h in instruction selection.
Don't recompile entire ACO when something changes in NIR.
Instead, only use some headers which are actually needed,
include these in ACO files instead of relying on nir.h to
include them.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22241>
2023-04-10 20:01:28 +00:00