Timur Kristóf [Thu, 6 Apr 2023 11:15:10 +0000 (13:15 +0200)]
radv/amdgpu: Use correct alignment when creating CS BOs.
Shouldn't matter in practice because the kernel will likely
give us a page-aligned BO, but better to specify it just
in case.
Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22354>
Timur Kristóf [Thu, 6 Apr 2023 11:08:27 +0000 (13:08 +0200)]
radv/amdgpu: Only allow IB BOs on graphics and compute queues.
This disallows IB BOs on eg. SDMA queues which was previously
mistakenly left out.
Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22354>
Timur Kristóf [Sat, 8 Apr 2023 12:28:50 +0000 (14:28 +0200)]
radv/amdgpu: Fix mismatching return type of radv_amdgpu_cs_submit.
Fixes a warning that is reported by GCC 13.
Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22354>
Timur Kristóf [Sun, 9 Apr 2023 01:06:07 +0000 (03:06 +0200)]
ac: Add maximum number of submitted IBs.
The number of IBs per submit isn't infinite, it depends on the IP type
(ie. some initial setup needed for a submit) and the packet size.
It can be calculated according to the kernel source code as:
(ring->max_dw - emit_frame_size) / emit_ib_size
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22354>
Timur Kristóf [Mon, 3 Apr 2023 15:47:10 +0000 (17:47 +0200)]
radv: Create continue preamble on GFX6 even when no shader rings are used.
Skipping the continue preamble can allow other processes to mess
up some registers set by the current process.
Originally, we could omit generating the continue preamble when
no shader rings were used, because the register initialization
happened at the beginning of every main cmdbuf. However, this
isn't the case anymore.
Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22354>
xurui [Mon, 10 Apr 2023 08:28:28 +0000 (16:28 +0800)]
zink: bs->dd.push_pool[1].pool should be freed
cc: mesa-stable
Signed-off-by: xurui <xurui@kylinos.cn>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22389>
Patrick Lerda [Fri, 7 Apr 2023 16:03:58 +0000 (18:03 +0200)]
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:
e39d72aec203 ("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>
David Heidelberg [Tue, 11 Apr 2023 12:36:00 +0000 (14:36 +0200)]
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>
Eric Engestrom [Tue, 11 Apr 2023 11:52:27 +0000 (12:52 +0100)]
v3dv/ci: mark known dEQP-VK.wsi.xlib.surface.query_formats failure
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22410>
Bas Nieuwenhuizen [Sat, 25 Mar 2023 23:42:10 +0000 (00:42 +0100)]
radv: Align atomic values.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22121>
Bas Nieuwenhuizen [Sat, 25 Mar 2023 23:06:24 +0000 (00:06 +0100)]
util/disk_cache: Align atomic size.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22121>
Bas Nieuwenhuizen [Sat, 25 Mar 2023 23:03:30 +0000 (00:03 +0100)]
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>
Samuel Pitoiset [Mon, 10 Apr 2023 07:38:09 +0000 (09:38 +0200)]
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>
Daniel Schürmann [Tue, 11 Apr 2023 10:16:47 +0000 (12:16 +0200)]
radv/ci: add 2 more Flakes for Navi21
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22030>
Daniel Schürmann [Tue, 21 Mar 2023 17:56:22 +0000 (18:56 +0100)]
radv: clean up pipeline-cache interface
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22030>
Daniel Schürmann [Sun, 19 Mar 2023 09:26:05 +0000 (10:26 +0100)]
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>
Daniel Schürmann [Mon, 20 Mar 2023 13:34:35 +0000 (14:34 +0100)]
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>
Daniel Schürmann [Mon, 20 Mar 2023 00:02:53 +0000 (01:02 +0100)]
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>
Daniel Schürmann [Sat, 18 Mar 2023 15:16:08 +0000 (16:16 +0100)]
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>
Daniel Schürmann [Fri, 31 Mar 2023 14:08:59 +0000 (16:08 +0200)]
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>
Daniel Schürmann [Fri, 17 Mar 2023 10:35:33 +0000 (11:35 +0100)]
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>
Lionel Landwerlin [Wed, 5 Apr 2023 12:38:34 +0000 (15:38 +0300)]
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>
Corentin Noël [Tue, 28 Mar 2023 14:56:17 +0000 (16:56 +0200)]
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>
Corentin Noël [Wed, 5 Apr 2023 14:42:40 +0000 (16:42 +0200)]
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>
Corentin Noël [Wed, 5 Apr 2023 10:04:27 +0000 (12:04 +0200)]
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>
Lionel Landwerlin [Thu, 6 Apr 2023 14:13:32 +0000 (17:13 +0300)]
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>
Konstantin Seurer [Mon, 10 Apr 2023 11:14:33 +0000 (13:14 +0200)]
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>
Konstantin Seurer [Mon, 10 Apr 2023 11:02:56 +0000 (13:02 +0200)]
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>
Konstantin Seurer [Mon, 10 Apr 2023 10:50:49 +0000 (12:50 +0200)]
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>
Konstantin Seurer [Sun, 9 Apr 2023 09:46:50 +0000 (11:46 +0200)]
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>
Konstantin Seurer [Sun, 9 Apr 2023 09:33:54 +0000 (11:33 +0200)]
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>
Konstantin Seurer [Sun, 9 Apr 2023 08:56:45 +0000 (10:56 +0200)]
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>
Konstantin Seurer [Sun, 9 Apr 2023 09:26:52 +0000 (11:26 +0200)]
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>
Alyssa Rosenzweig [Sun, 9 Apr 2023 14:21:32 +0000 (10:21 -0400)]
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>
Alyssa Rosenzweig [Sun, 9 Apr 2023 14:14:29 +0000 (10:14 -0400)]
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>
Alyssa Rosenzweig [Sun, 9 Apr 2023 01:09:06 +0000 (21:09 -0400)]
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>
Jesse Natalie [Mon, 10 Apr 2023 16:59:51 +0000 (09:59 -0700)]
d3d12: Support creating PSOs with no attachments with MSAA without TIR
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22402>
Yiwei Zhang [Fri, 31 Mar 2023 07:34:49 +0000 (07:34 +0000)]
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>
David Heidelberg [Mon, 10 Apr 2023 19:08:23 +0000 (21:08 +0200)]
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>
David Heidelberg [Mon, 10 Apr 2023 19:05:12 +0000 (21:05 +0200)]
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>
David Heidelberg [Mon, 10 Apr 2023 18:02:33 +0000 (20:02 +0200)]
Revert "mesa: Enable NV_texture_barrier in GLES2+"
Fixes failing skqp GLES test:
- gles_lcdblendmodes
This reverts commit
c7da969f8fe1b78d2479623e2510e52827c3035a.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22403>
Friedrich Vock [Fri, 7 Apr 2023 17:40:03 +0000 (19:40 +0200)]
radv: Add RT stages to radv_mesa_to_rgp_shader_stages
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22367>
Mike Blumenkrantz [Fri, 7 Apr 2023 15:24:36 +0000 (11:24 -0400)]
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>
Mike Blumenkrantz [Fri, 7 Apr 2023 15:23:26 +0000 (11:23 -0400)]
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>
Alyssa Rosenzweig [Sat, 8 Apr 2023 00:15:38 +0000 (20:15 -0400)]
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>
Alyssa Rosenzweig [Sat, 8 Apr 2023 00:08:45 +0000 (20:08 -0400)]
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>
Alyssa Rosenzweig [Sat, 8 Apr 2023 00:11:58 +0000 (20:11 -0400)]
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>
Alyssa Rosenzweig [Sat, 8 Apr 2023 00:11:16 +0000 (20:11 -0400)]
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>
Alyssa Rosenzweig [Sat, 8 Apr 2023 00:13:43 +0000 (20:13 -0400)]
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>
Alyssa Rosenzweig [Sat, 8 Apr 2023 00:05:19 +0000 (20:05 -0400)]
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>
Alyssa Rosenzweig [Sat, 8 Apr 2023 00:07:22 +0000 (20:07 -0400)]
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>
Alyssa Rosenzweig [Mon, 10 Apr 2023 15:31:54 +0000 (11:31 -0400)]
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>
Mike Blumenkrantz [Fri, 7 Apr 2023 18:43:40 +0000 (14:43 -0400)]
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>
Mike Blumenkrantz [Thu, 6 Apr 2023 23:08:06 +0000 (19:08 -0400)]
lavapipe: copy fragment shader when merging GPL pipelines
this otherwise loses access data and causes flakiness with atomic ops
Fixes:
6e5fe71599b ("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>
Timur Kristóf [Fri, 31 Mar 2023 20:01:33 +0000 (22:01 +0200)]
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>
Timur Kristóf [Fri, 31 Mar 2023 19:59:33 +0000 (21:59 +0200)]
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>
Timur Kristóf [Fri, 31 Mar 2023 19:31:13 +0000 (21:31 +0200)]
aco: Don't use nir_selection_control in aco_ir.
We don't want to rely on any NIR structures in ACO, because
we would like to avoid the need to include nir.h in aco_ir.
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>
Timur Kristóf [Mon, 10 Apr 2023 11:14:02 +0000 (13:14 +0200)]
aco: Fix optimization of v_cmp with subgroup invocation.
There was a typo in this optimization which went unnoticed.
Fixes:
2c40215ab9d20890efb88e7b3e26ca909d7fd74b
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22393>
Yiwei Zhang [Wed, 5 Apr 2023 20:51:52 +0000 (13:51 -0700)]
venus: move exp feature init back to ring and remove unused function
This mostly undos
476c771e34fefaf2aab12ca3417d04a5be4ce46d and removes
the unused vn_renderer_submit_simple_sync.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22323>
Yiwei Zhang [Wed, 5 Apr 2023 20:57:41 +0000 (13:57 -0700)]
venus: requires ringMonitoring
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22323>
Yiwei Zhang [Wed, 5 Apr 2023 21:42:26 +0000 (14:42 -0700)]
venus: requires asyncRoundtrip
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22323>
Jesse Natalie [Fri, 7 Apr 2023 23:54:03 +0000 (16:54 -0700)]
dzn: Don't enable bindless by default
There's bad interactions with dynamic buffers at this point:
* Perf issues due to allocating and freeing the buffer to store indices/offsets
* Large dynamic uniform buffer offsets (above 65K) cause out-of-bounds reads
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22371>
Jesse Natalie [Fri, 7 Apr 2023 23:50:39 +0000 (16:50 -0700)]
dzn: Never set STATE_RENDER_TARGET on a compute command list
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22371>
Jesse Natalie [Fri, 7 Apr 2023 23:50:12 +0000 (16:50 -0700)]
dzn: Ignore unnormalized sampling flag if driver doesn't support it
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22371>
Jesse Natalie [Fri, 7 Apr 2023 23:48:48 +0000 (16:48 -0700)]
dzn: Use a linear allocator for upload data on command buffers
Significantly improves performance for apps that heavily use
dynamic descriptors.
Still needs caching so they can be re-used after command buffer reset.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22371>
Jesse Natalie [Fri, 7 Apr 2023 23:44:53 +0000 (16:44 -0700)]
dzn: Changes to descriptor set dirty flag handling
The scenario of:
* App binds multiple descriptor sets
* App binds a pipeline that uses a subset of them
* App binds a pipeline that uses more of them
was broken. We were only copying the descriptors for the accessible
subset before, but then clearing all dirty bits, so simply changing
the pipeline wouldn't result in more descriptors being copied.
When running not-bindless, the right thing to do is to copy *all*
descriptors if we're copying any. When running bindless, each parameter
is set separately, and more importantly, *can't* be set on the command
list if the root signature can't access them.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22371>
Jesse Natalie [Fri, 7 Apr 2023 23:39:23 +0000 (16:39 -0700)]
microsoft/compiler: Don't split loads/stores that will be split by lower_explicit_io
Otherwise we can end up splitting push constant loads, which currently require
an unbroken (no-cast) deref chain up to the variable.
Fixes:
4c527f4f ("spirv2dxil: Lower unaligned loads and stores")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22371>
Samuel Pitoiset [Mon, 10 Apr 2023 09:19:22 +0000 (11:19 +0200)]
docs: add more release notes for RADV
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22390>
Rhys Perry [Thu, 30 Mar 2023 12:38:06 +0000 (13:38 +0100)]
nir: make nir_fisnan helper exact
Floating point ALU assume no NaNs unless
FLOAT_CONTROLS_SIGNED_ZERO_INF_NAN_PRESERVE_FPn or (for some opcodes)
exact=true.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes:
bf9c1699cd7 ("nir: add nir_fisnan helper function")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22206>
Vitaliy Triang3l Kuzmin [Sun, 2 Apr 2023 18:05:53 +0000 (21:05 +0300)]
radv: Set DB_Z_INFO.NUM_SAMPLES to MSAA_EXPOSED_SAMPLES without Z/S
This case is a new addition in GFX11, and according to PAL, when no
depth/stencil attachment is bound, it must be set to the number of coverage
samples (the number of SampleMask bits - which is MSAA_EXPOSED_SAMPLES):
https://github.com/GPUOpen-Drivers/pal/blob/
4640888b579bc9b0951c586b08a4552f71780d0d/src/core/hw/gfxip/gfx9/gfx9UniversalCmdBuffer.cpp#L6978
Without this change, the maximum of depth/stencil and color sample counts
is used, and if there are no depth/stencil or color attachments (target-
independent rasterization), the Depth Block assumes 1 coverage sample, and
thus Primitive Ordered Pixel Shading doesn't work correctly (and fails 4xAA
fragment shader interlock CTS tests), and occlusion queries don't count the
correct number of samples (according to the "Sample Counting" section of
the Vulkan specification, "the occlusion query sample counter increments by
one for each sample with a coverage value of 1...")
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22375>
Mike Blumenkrantz [Fri, 7 Apr 2023 21:06:45 +0000 (17:06 -0400)]
zink: try to prune resources from barrier jit on fb unbind
if a resource has no binds remaining then it should not remain in
the queue for barrier updates on the next draw
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22398>
André Almeida [Wed, 5 Apr 2023 02:45:23 +0000 (23:45 -0300)]
winsys/amdgpu: Fix amdgpu_cs_query_reset_state2 error log
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: André Almeida <andrealmeid@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22253>
André Almeida [Sat, 1 Apr 2023 22:57:52 +0000 (19:57 -0300)]
radv: Implement vk.check_status
Implement check_status function so the driver can check if the GPU has
been reset by the application, and thus if it's still available.
AMDGPU_CTX_QUERY ioctls work by asking amdgpu if this context was the
cause of a previous GPU reset.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: André Almeida <andrealmeid@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22253>
Samuel Pitoiset [Mon, 10 Apr 2023 09:37:21 +0000 (11:37 +0200)]
radv/ci: update expected failures with BONAIRE
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22391>
Samuel Pitoiset [Fri, 7 Apr 2023 16:14:02 +0000 (18:14 +0200)]
radv/ci: remove no longer existing tests for PITCAIRN
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22366>
Samuel Pitoiset [Fri, 7 Apr 2023 16:12:30 +0000 (18:12 +0200)]
radv/ci: update expected failures for PITCAIRN
These have been recently fixed.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22366>
Samuel Pitoiset [Fri, 31 Mar 2023 15:48:04 +0000 (17:48 +0200)]
radv: enable VK_EXT_graphics_pipeline_library by default
You won't get your money back!
It's been a very long time but everything should be working great now.
This replaces RADV_PERFTEST=gpl by RADV_DEBUG=nogpl to disable the
extension for debugging purposes.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22362>
Daniel Schürmann [Fri, 31 Mar 2023 14:35:59 +0000 (16:35 +0200)]
vulkan/pipeline_cache: move vk_log on failed deserialization to vk_pipeline_cache_load()
Partially evicted or corrupted disk cache entries should not create
application cache log entries.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21967>
Daniel Schürmann [Sun, 19 Mar 2023 22:56:07 +0000 (23:56 +0100)]
vulkan/pipeline_cache: add cache parameter to deserialize() function
This allows for secondary cache lookups during deserialization.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21967>
Daniel Schürmann [Thu, 16 Mar 2023 19:24:31 +0000 (20:24 +0100)]
vulkan/pipeline_cache: use vk_pipeline_cache_create_and_insert_object() during vk_pipeline_cache_load()
This avoids an extra serialize() step for disk-cache insertion.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21967>
Daniel Schürmann [Thu, 16 Mar 2023 19:05:36 +0000 (20:05 +0100)]
vulkan/pipeline_cache: implement vk_pipeline_cache_create_and_insert_object()
This function directly inserts the serialized data into the disk cache
before calling deserialize() and inserting into the pipeline cache.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21967>
Daniel Schürmann [Thu, 16 Mar 2023 18:27:11 +0000 (19:27 +0100)]
vulkan/pipeline_cache: Don't re-insert disk-cache hits into disk-cache
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21967>
Daniel Schürmann [Thu, 16 Mar 2023 14:35:48 +0000 (15:35 +0100)]
vulkan/pipeline_cache: remove vk_device from vk_pipeline_cache_object
It is not necessary to store the extra pointer.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21967>
David Heidelberg [Sat, 8 Apr 2023 20:24:47 +0000 (22:24 +0200)]
ci/v3d: add flaking spec@ext_framebuffer_blit@fbo-sys-blit
Flakes on both RPI 3 and RPI 4.
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22377>
Timur Kristóf [Fri, 7 Apr 2023 22:22:18 +0000 (00:22 +0200)]
ac/llvm: Cover runtime 0 in GFX10 gs_alloc_req workaround.
Previously, the workaround only covered compile-time zero, but
this is insufficient and can cause GPU hangs in RadeonSI when
NGG culling is enabled.
Fix this by handling runtime zero in the workaround.
Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22370>
Adam Jackson [Mon, 17 Oct 2022 21:35:25 +0000 (17:35 -0400)]
mesa: Enable NV_texture_barrier in GLES2+
The spec text is written against 3.2 but only requires framebuffer
objects and ES2.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19234>
Kenneth Graunke [Sat, 8 Apr 2023 02:19:31 +0000 (19:19 -0700)]
intel/compiler: Use nir_dest_bit_size() for ballot bit size check
There's no guarantee that this is a SSA value. Use the helper to handle
both SSA values and register correctly. Otherwise we read trash when we
encounter a register and make bad decisions on types, possibly leading
to our destination being UQ typed when the VGRF is only 32-bit.
Fixes compilation with -Dintel-clc=enabled since
7f6491b76d51f35e7671
(nir: Combine if_uses with instruction uses) but the bug is much older
than that, circa 2017. We were just getting lucky before.
Fixes:
069bf7c9078a ("i965/fs: Match destination type to size for ballot")
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22374>
Alyssa Rosenzweig [Fri, 7 Apr 2023 21:50:09 +0000 (17:50 -0400)]
nir/validate: Only walk uses once
Ostensibly faster.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22343>
Alyssa Rosenzweig [Fri, 7 Apr 2023 21:44:17 +0000 (17:44 -0400)]
nir/repair_ssa: Refactor some use handling
We can mostly unify the instr-use and if-use handling, which is a lot more
concise.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22343>
Alyssa Rosenzweig [Thu, 6 Apr 2023 21:16:36 +0000 (17:16 -0400)]
nir: Remove nir_if_rewrite_condition_ssa
Now unused.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22343>
Alyssa Rosenzweig [Thu, 6 Apr 2023 21:13:57 +0000 (17:13 -0400)]
dxil: Use nir_src_rewrite_ssa
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22343>
Alyssa Rosenzweig [Thu, 6 Apr 2023 21:13:45 +0000 (17:13 -0400)]
nir: Use nir_src_rewrite_ssa
Where sensible.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22343>
Alyssa Rosenzweig [Thu, 6 Apr 2023 19:54:18 +0000 (15:54 -0400)]
nir: Factor out nir_src_rewrite_ssa helper
Like nir_instr_rewrite_ssa but without the asserted extra argument. Works on ifs
too, now that we have a unified use list.
We do need to assert that the source has actually been inserted and has valid
use/def chains. Previously, asserting on the parent instruction accomplished
that indirectly. For the more general helper, we instead directly assert that
there exists a non-null parent, whatever it is.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22343>
Alyssa Rosenzweig [Thu, 6 Apr 2023 21:14:44 +0000 (17:14 -0400)]
nir: Reduce indirection
A source used by an if is necessarily the condition of that if.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22343>
Alyssa Rosenzweig [Thu, 6 Apr 2023 19:50:29 +0000 (15:50 -0400)]
dxil: Avoid list_length
Do O(1) check instead.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22343>
Alyssa Rosenzweig [Thu, 6 Apr 2023 19:37:54 +0000 (15:37 -0400)]
nir/validate: Don't treat if-uses specially
We don't use the tag anywhere, so don't bother with it.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Suggested-by: Faith Ekstrand <faith@gfxstrand.net>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22343>
Alyssa Rosenzweig [Thu, 6 Apr 2023 19:35:15 +0000 (15:35 -0400)]
nir: Remove 2nd argument from nir_before_src
We can now determine whether a nir_src is for an if without a sideband, so
simplify the function signature.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Suggested-by: Faith Ekstrand <faith@gfxstrand.net>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22343>
Alyssa Rosenzweig [Thu, 6 Apr 2023 19:31:59 +0000 (15:31 -0400)]
nir/opt_loop_unroll: Avoid list_length
It is O(N) but can often be replaced with something O(1).
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22343>
Alyssa Rosenzweig [Thu, 6 Apr 2023 19:31:43 +0000 (15:31 -0400)]
nir/opt_ray_queries: Don't use list_length
Expensive.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22343>
Alyssa Rosenzweig [Thu, 6 Apr 2023 17:19:31 +0000 (13:19 -0400)]
nir: Combine if_uses with instruction uses
Every nir_ssa_def is part of a chain of uses, implemented with doubly linked
lists. That means each requires 2 * 64-bit = 16 bytes per def, which is
memory intensive. Together they require 32 bytes per def. Not cool.
To cut that memory use in half, we can combine the two linked lists into a
single use list that contains both regular instruction uses and if-uses. To do
this, we augment the nir_src with a boolean "is_if", and reimplement the
abstract if-uses operations on top of that list. That boolean should fit into
the padding already in nir_src so should not actually affect memory use, and in
the future we sneak it into the bottom bit of a pointer.
However, this creates a new inefficiency: now iterating over regular uses
separate from if-uses is (nominally) more expensive. It turns out virtually
every caller of nir_foreach_if_use(_safe) also calls nir_foreach_use(_safe)
immediately before, so we rewrite most of the callers to instead call a new
single `nir_foreach_use_including_if(_safe)` which predicates the logic based on
`src->is_if`. This should mitigate the performance difference.
There's a bit of churn, but this is largely a mechanical set of changes.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22343>