Timur Kristóf [Sun, 2 Apr 2023 22:05:09 +0000 (00:05 +0200)]
aco: Pop branch operands when targets are same in SSA elimination.
The branch instruction is no longer conditional when the targets are the
same, so the operand is not necessary and can be removed.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21493>
Timur Kristóf [Sun, 2 Apr 2023 22:03:37 +0000 (00:03 +0200)]
aco: Don't verify branch exec read when eliminating exec writes.
Verifying that the branch instruction reads exec is not actually
necessary because the pattern that we look for already implies that.
This prepares for the next commit which will remove the exec operand
from branches that have the same target. These branches will no
longer read exec, but they should still get the same optimization.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21493>
Timur Kristóf [Sun, 19 Feb 2023 13:07:10 +0000 (14:07 +0100)]
aco: Simplify get_phi_operand using Operand::c32_or_c64.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21493>
Timur Kristóf [Sun, 2 Apr 2023 20:11:25 +0000 (22:11 +0200)]
aco: Don't remove exec writes that also write other registers.
Don't eliminate an instruction that writes registers other than exec and scc.
It is possible that this is eg. an s_and_saveexec and the saved value is
used by a later branch.
Fixes:
bc130497472cb4ec4ec60695ed99b169d6681118
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21493>
Timur Kristóf [Sun, 2 Apr 2023 20:08:51 +0000 (22:08 +0200)]
aco: Consider p_cbranch_nz as divergent branch too.
A p_cbranch_nz instruction that reads exec is divergent too.
Fixes:
f030b75b7d2c359b90c18ee4ed83fa05265c12e0
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21493>
David Heidelberg [Mon, 3 Apr 2023 12:41:15 +0000 (14:41 +0200)]
ci: disable lima farm, currently out-of-space, needs to be fixed
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22265>
Tatsuyuki Ishi [Sun, 2 Apr 2023 06:41:25 +0000 (15:41 +0900)]
radv: Pre-compute descriptor set layout hash.
While analyzing cache loading performance, hashing the pipeline layout was
surprisingly consuming around 4% of time, sometimes close to the cost of
hashing shader modules.
Turns out we were hashing the pipeline layout on every pipeline creation.
Considering that pipeline layouts are usually deduplicated by the
application, this was amplifying the hashing cost by a big margin.
With Graphics Pipeline Library, we do need to rebuild the pipeline layout
by combining those from each library, but we can memoize the hash of the
descriptor set layout. The cost of re-hashing hashes is negligible since
each descriptor set layout can amount to 1–2KB in size.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22254>
Nataraj Deshpande [Tue, 14 Mar 2023 23:39:34 +0000 (16:39 -0700)]
anv: Bump VkDeviceMemory objects limit to 4GB
Android CTS 13_r4 tests dEQP-VK.memory.allocation.random* fail
with VK_ERROR_OUT_OF_DEVICE_MEMORY on ADL boards with 32GB memory
as memory allocation requests from DEQP are much larger(~2.9GB+)
based on device heap size/8.
Increase the limit to unsigned 32bit max(~4GB) which helps to
fix the dEQP-VK.memory.allocation.random* tests.
v1: Bound allocation by the largest memory heap size (Lionel Landwerlin)
v2: Clean up comments to reflect the code change (Ivan Briano)
Update the value of MAX_MEMORY_ALLOCATION_SIZE (Lionel Landwerlin)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22066>
Lionel Landwerlin [Wed, 22 Mar 2023 10:11:22 +0000 (12:11 +0200)]
isl: update max buffer size for SKL+
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22066>
Lionel Landwerlin [Wed, 22 Mar 2023 11:39:42 +0000 (13:39 +0200)]
anv: take care of maxStorageBufferRange being uint32_t
Not fixing anything, but required for another fix.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22066>
Qiang Yu [Mon, 20 Mar 2023 04:37:22 +0000 (12:37 +0800)]
ac/llvm: remove ac_build_opencoded_load_format
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/22045>
Qiang Yu [Mon, 20 Mar 2023 04:33:26 +0000 (12:33 +0800)]
ac/llvm,radeonsi: remove abi->load_inputs implementation
No nir_load_input in VS now.
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/22045>
Qiang Yu [Mon, 20 Mar 2023 04:26:57 +0000 (12:26 +0800)]
radeonsi: monolithic VS emit prolog in nir directly
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/22045>
Qiang Yu [Mon, 20 Mar 2023 04:15:02 +0000 (12:15 +0800)]
ac/llvm: move ac_fixup_ls_hs_input_vgprs to amd common
To be shared with radeonsi.
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/22045>
Qiang Yu [Mon, 20 Mar 2023 03:49:20 +0000 (11:49 +0800)]
ac/llvm: vs_rel_patch_id can also be fixed up
It's currently used when LS store output to LDS.
The LS/HS bug fix seems does not affect this case.
But we'd better treat it as other fixed args.
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/22045>
Qiang Yu [Sat, 18 Mar 2023 13:35:45 +0000 (21:35 +0800)]
radeonsi: add si_nir_lower_vs_inputs
Ported from llvm:
* si_load_vs_input
* ac_build_opencoded_load_format
* ac_ufN_to_float
* get_vertex_index
* ac_build_fast_udiv_nuw
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/22045>
Qiang Yu [Sat, 18 Mar 2023 13:32:16 +0000 (21:32 +0800)]
ac/nir: add ac_nir_load_arg_at_offset
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/22045>
Qiang Yu [Fri, 3 Mar 2023 03:36:20 +0000 (11:36 +0800)]
radeonsi: expose si_nir_load_internal_binding
PS polygon stippling is going to use it too.
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/22045>
Mauro Rossi [Sat, 1 Apr 2023 11:24:19 +0000 (13:24 +0200)]
hasvk: include "vk_android.h" header in anv_android.c
Fixes the following building errors:
../src/intel/vulkan_hasvk/anv_android.c:387:34: error: implicit declaration of function 'vk_alloc_ahardware_buffer' is invalid in C99 [-Werror,-
Wimplicit-function-declaration]
struct AHardwareBuffer *ahw = vk_alloc_ahardware_buffer(pAllocateInfo);
^
../src/intel/vulkan_hasvk/anv_android.c:387:28: error: incompatible integer to pointer conversion initializing 'struct AHardwareBuffer *' with an expression of type 'int' [-Werror,-Wint-conversion]
struct AHardwareBuffer *ahw = vk_alloc_ahardware_buffer(pAllocateInfo);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
Fixes:
b16cfe23 ("vulkan,anv,hasvk,radv: Unify Android hardware buffer creation")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22251>
Timur Kristóf [Thu, 30 Mar 2023 20:41:45 +0000 (22:41 +0200)]
ac/nir: When task->mesh dispatch Y or Z are 0, also set X to 0.
AMD recommends doing this to speed up the CP when it processes
the draw ring entries. LLPC also does this.
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/22211>
Timur Kristóf [Wed, 29 Mar 2023 22:33:17 +0000 (00:33 +0200)]
ac/nir: Store only lowest 8 bits for task draw ring DWORD3.
When writing the draw ready bit, don't write the high 24 bits
of DWORD3, because that is used by the HW for something else
according to LLPC.
Cc: mesa-stable
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/22211>
Rhys Perry [Fri, 31 Mar 2023 12:59:59 +0000 (13:59 +0100)]
aco: fix nir_var_shader_out barriers for task shaders
These will be used in a future commit.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22211>
Rob Clark [Wed, 29 Mar 2023 21:33:57 +0000 (14:33 -0700)]
freedreno: Support the disable_throttling=true driconf option
At this point, mostly just to make it easier to disable throttling for
performance debugging.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224>
Rob Clark [Wed, 29 Mar 2023 21:22:30 +0000 (14:22 -0700)]
freedreno: Move driconf settings into sub-struct
Organize all one of them in a single place before adding more.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224>
Rob Clark [Mon, 27 Mar 2023 18:00:45 +0000 (11:00 -0700)]
freedreno: Avoid looping shader stages if nothing dirty
We have corresponding global dirty bits for each of the per-stage dirty
bits. We can use this to skip iterating over shader stages when there
is no per-stage dirty state to handle.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224>
Rob Clark [Sun, 26 Mar 2023 20:00:25 +0000 (13:00 -0700)]
freedreno: Re-work dirty-resource tracking
If a resource is dirty but already tracked by the current batch, no need
to process it at draw time.
Note that the batch could change (ie. new fb state bound, etc) after the
check if we need resource dirty tracking, but in these cases all the
dirty-resource state is marked dirty.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224>
Rob Clark [Sun, 26 Mar 2023 19:27:22 +0000 (12:27 -0700)]
freedreno: Inline single-use helpers
bind_sampler_states() / set_sampler_views() have just a single caller.
So inline them. Needed for next commit.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224>
Rob Clark [Sun, 26 Mar 2023 19:16:50 +0000 (12:16 -0700)]
freedreno: Extract out a helper
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224>
Rob Clark [Sun, 26 Mar 2023 18:53:15 +0000 (11:53 -0700)]
freedreno: Hoist dirty vars
Prep to re-work how we track dirty-resource.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224>
Rob Clark [Mon, 27 Mar 2023 22:06:37 +0000 (15:06 -0700)]
freedreno: Stop being too clever by half
This wasn't taking into account a change in corresponding bit in
writeable_bitmask, causing problem if an SSBO was first bound for
read, and then rebound for write, we wouldn't update the buffers
valid range. Instead just drop the premature optimization.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224>
Connor Abbott [Fri, 17 Mar 2023 14:11:53 +0000 (15:11 +0100)]
freedreno: Fix or/and'ing two BitmaskEnums
Previously when there was an & or | with two BitmaskEnums, the compiler
would try to cast the RHS and find a matching overload, but there were
many different casts (to the enum itself, to an integer, to a boolean,
etc.) each with a matching overload which meant that it couldn't pick
one and errored out due to an ambiguous overload. Fix this by
explicitly providing an overload that takes a BitmaskEnum on the RHS.
It has to also provide a BitmaskEnum output, so that subsequent
operators with the result on the LHS (e.g. when or'ing together three
BitmaskEnums without any parentheses tricks) also get the right
overload.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224>
Pavel Ondračka [Thu, 9 Feb 2023 19:49:54 +0000 (20:49 +0100)]
nine: use separate register for aL emulation
NIR loop unrolling is only working if the loop counter is a scalar.
So keep the loop counter separate and move the aL emulation and
the aL increment to a new register.
This allows loop unrolling with vec4 backends where unconditional
scalarizing of phi nodes is undesirable, like for example r300.
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Axel Davy <davyaxel0@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7222
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21243>
Karol Herbst [Fri, 18 Nov 2022 14:51:18 +0000 (15:51 +0100)]
rusticl/kernel: make use of cso info
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>
Karol Herbst [Wed, 30 Nov 2022 16:53:43 +0000 (17:53 +0100)]
panfrost: implement get_compute_state_info
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>
Karol Herbst [Wed, 30 Nov 2022 16:53:12 +0000 (17:53 +0100)]
panfrost: move max_thread_count and take reg_count into account
We'll need it to report proper thread counts for OpenCL.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>
Karol Herbst [Wed, 30 Nov 2022 13:55:30 +0000 (14:55 +0100)]
nvc0: implement get_compute_state_info
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>
Karol Herbst [Wed, 30 Nov 2022 16:17:48 +0000 (17:17 +0100)]
nv50: implement get_compute_state_info
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>
Karol Herbst [Fri, 18 Nov 2022 20:20:05 +0000 (21:20 +0100)]
iris: implement get_compute_state_info
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>
Karol Herbst [Wed, 30 Nov 2022 11:53:57 +0000 (12:53 +0100)]
lp: implement get_compute_state_info
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>
Karol Herbst [Wed, 16 Nov 2022 22:22:13 +0000 (23:22 +0100)]
gallium: add get_compute_state_info
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>
Karol Herbst [Tue, 22 Nov 2022 22:00:46 +0000 (23:00 +0100)]
rusticl/kernel: set has_variable_shared_mem on the nir
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>
Karol Herbst [Tue, 22 Nov 2022 21:47:29 +0000 (22:47 +0100)]
nir: track existence of variable shared memory
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>
Sil Vilerino [Fri, 31 Mar 2023 15:12:28 +0000 (11:12 -0400)]
Revert "d3d12: Honor suggested driver profile/level for H264/HEVC encode"
This reverts commit
37652da61612aadfedc23ba484b33781654d5d56.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22239>
Rhys Perry [Thu, 30 Mar 2023 14:33:57 +0000 (15:33 +0100)]
aco: don't optimize s_or_b64(v_cmp_u_f32(a, b), cmp(a, a))
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22214>
Charlie Birks [Thu, 17 Jun 2021 11:23:29 +0000 (11:23 +0000)]
docs: add a few vulkan extensions supported by multiple drivers
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11445>
Konstantin Seurer [Thu, 2 Mar 2023 12:57:03 +0000 (13:57 +0100)]
radv/ci: Update ray tracing pipeline fail/skip lists
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22018>
Samuel Pitoiset [Fri, 31 Mar 2023 11:32:59 +0000 (13:32 +0200)]
radv: fix binding raytracing/compute pipelines
If a compute pipeline is bound after a raytracing pipeline, the
computes shader slot (aka RT prolog) will be overwritten.
To fix this, move the RT prolog outside of the compute shader slot.
Fixes:
d109362a3da ("radv: copy bound shaders to the cmdbuf state")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22235>
Samuel Pitoiset [Fri, 31 Mar 2023 11:55:38 +0000 (13:55 +0200)]
radv: add the raygen shader BO to the cmdbuf list
Found by inspection.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22235>
Timur Kristóf [Thu, 30 Mar 2023 21:44:18 +0000 (23:44 +0200)]
ac/nir/ngg: Slightly improve attribute ring offset calculation.
Inspired by Nicolai Hähnle's commit in LLPC.
Instead of using a SALU instruction to add to the scalar
offset, rely on the buffer swizzling and use constant offset.
Fossil DB stats on GFX1100:
Totals from 47910 (35.51% of 134913) affected shaders:
CodeSize:
87927612 ->
86968136 (-1.09%)
Instrs:
17584007 ->
17440094 (-0.82%)
Latency:
97232173 ->
97126311 (-0.11%)
InvThroughput: 9904586 -> 9905288 (+0.01%); split: -0.02%, +0.02%
VClause: 544430 -> 542566 (-0.34%)
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22227>
Timur Kristóf [Fri, 31 Mar 2023 03:05:36 +0000 (05:05 +0200)]
radv: Use radv_get_shader to get vertex shader when binding pipeline.
The shaders[MESA_SHADER_VERTEX] can be NULL for merged shaders.
Fixes:
b2ac40e734194fcb571a72396b5644b1d351e48a
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8749
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22229>
Samuel Pitoiset [Thu, 30 Mar 2023 15:08:27 +0000 (17:08 +0200)]
radv: configure PA_SC_MODE_CNTL_1 during cmdbuf recording
Two graphics pipeline parameters need to be copied to the cmdbuf
state.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22218>
Samuel Pitoiset [Thu, 30 Mar 2023 15:40:28 +0000 (17:40 +0200)]
radv: set PS_ITER_SAMPLE(1) for sample shading during cmdbuf recording
This shouldn't be configured in the pipeline.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22218>
Samuel Pitoiset [Thu, 30 Mar 2023 12:06:14 +0000 (14:06 +0200)]
radv: copy db_render_control to the cmdbuf state
This register is only used for meta operations.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22218>
José Roberto de Souza [Tue, 14 Feb 2023 19:54:16 +0000 (11:54 -0800)]
iris: Implement Xe version of bo_madvise() and bo_set_caching()
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22060>
Maarten Lankhorst [Thu, 15 Dec 2022 17:48:13 +0000 (18:48 +0100)]
iris: Place scanout buffers only into lmem for discrete GPUs
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22060>
José Roberto de Souza [Tue, 14 Feb 2023 19:58:34 +0000 (11:58 -0800)]
iris: Handle allocation of scanout buffers in Xe
Bos that will be scanout in display need to be allocated with
flags = XE_GEM_CREATE_FLAG_SCANOUT in Xe and that implies to different
caching rules for this buffer.
So here not allowing to get scanout buffer from cache or allow it
to be placed in a cache bucket for reuse.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22060>
José Roberto de Souza [Tue, 14 Feb 2023 19:49:17 +0000 (11:49 -0800)]
iris: Handle allocation of exported buffers in Xe kmd
Bos that will be exported need to be allocated with vm_id = 0 in Xe,
so don't try to get a bo from cache that was allocated with a
valid vm_id.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22060>
José Roberto de Souza [Thu, 17 Nov 2022 20:47:59 +0000 (12:47 -0800)]
iris: Add BO_ALLOC_SHARED
Xe KMD requires special handling for exported buffers during creation.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22060>
Faith Ekstrand [Mon, 20 Mar 2023 23:00:38 +0000 (18:00 -0500)]
anv: Use the new vk_device_memory base struct
Reviewed-by: Lina Versace <lina@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22038>
Faith Ekstrand [Mon, 20 Mar 2023 19:49:00 +0000 (14:49 -0500)]
vulkan: Add a vk_device_memory base struct
This lets us provide a vk_device_memory_range helper similar to what's
provided for buffers for dealing with VK_WHOLE_SIZE. We can also handle
flags and some annoyance around Android hardware buffer import.
Reviewed-by: Lina Versace <lina@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22038>
Faith Ekstrand [Mon, 20 Mar 2023 23:41:31 +0000 (18:41 -0500)]
vulkan,anv,hasvk,radv: Unify Android hardware buffer creation
Reviewed-by: Lina Versace <lina@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22038>
Faith Ekstrand [Tue, 21 Mar 2023 16:09:48 +0000 (11:09 -0500)]
radv: Set vk_image.ahardware_buffer_format
Reviewed-by: Lina Versace <lina@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22038>
Faith Ekstrand [Tue, 21 Mar 2023 15:42:54 +0000 (10:42 -0500)]
anv,hasvk: Set vk_image.ahardware_buffer_format
This effectively just modifies it for YCbCr images where the common code
doesn't have a useable format mapping.
Reviewed-by: Lina Versace <lina@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22038>
Faith Ekstrand [Tue, 21 Mar 2023 15:24:40 +0000 (10:24 -0500)]
vulkan: Add an ahardware_buffer_format field to vk_image
Reviewed-by: Lina Versace <lina@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22038>
Faith Ekstrand [Tue, 21 Mar 2023 23:25:37 +0000 (18:25 -0500)]
vulkan/android: Fix hardware buffer usage flags
We now add the correct usage flags for input attachments, storage
images, and depth/stencil attachments.
Reviewed-by: Lina Versace <lina@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22038>
Faith Ekstrand [Mon, 20 Mar 2023 23:29:37 +0000 (18:29 -0500)]
vulkan,anv,hasvk,radv: Add a common vk_image_usage_to_ahb_usage helper
Reviewed-by: Lina Versace <lina@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22038>
Felix DeGrood [Wed, 29 Mar 2023 19:35:44 +0000 (19:35 +0000)]
anv: set CFE_STATE.OverDispatchControl to default
BSpec specifies default value for CFE_STATE.OverDispatchControl
is 2, or 50% overdispatch. No observed performance impact.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22179>
Felix DeGrood [Tue, 28 Mar 2023 17:04:32 +0000 (17:04 +0000)]
anv: only emit CFE_STATE when scratch space increases
On Gen12.5+, we only need to emit CFE_STATE when scratch space
has changed, not on every pipeline binding. Also, only grow the
scratch space, never shrink it. Need to reset after secondary buf.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22179>
Lionel Landwerlin [Thu, 30 Mar 2023 12:16:09 +0000 (15:16 +0300)]
anv: move queue check helpers to anv_private
Also fix missing trace point stuff in command buffer begin/end
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22179>
Lionel Landwerlin [Thu, 30 Mar 2023 10:22:53 +0000 (13:22 +0300)]
anv: compute the largest GRL kernel scratch size
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22179>
Felix DeGrood [Tue, 28 Mar 2023 16:10:12 +0000 (16:10 +0000)]
anv: cs_stall during compute state flush on < gen12.5
The CS Stall in cmd_buffer_flush_compute_state is only required
on HW that uses MEDIA_VFE_STATE, gen12 and previous.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22179>
Lucas Fryzek [Thu, 2 Mar 2023 12:38:50 +0000 (07:38 -0500)]
gallium: Modify default path for DMABUF to use DRM
Modify the code path taken in `u_pipe_screen_get_param_defaults`
to call DRM to check if `PIPE_CAP_DMABUF` is supported. This is
required for overriding the behavior in `dri2_init_screen_extensions`
to support importing DMA bufs on drivers that don't support DRM, by
simply changing how `PIPE_CAP_DMABUF` is handled in their driver.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654>
Lucas Fryzek [Thu, 2 Mar 2023 19:52:02 +0000 (14:52 -0500)]
d3d12/llvmpipe/softpipe: Add support for `get_screen_fd`
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654>
Lucas Fryzek [Thu, 2 Mar 2023 19:51:08 +0000 (14:51 -0500)]
r300/r600/radeon_si: Add support for `get_screen_fd`
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654>
Lucas Fryzek [Thu, 2 Mar 2023 19:49:31 +0000 (14:49 -0500)]
virgl: Add support for `get_screen_fd`
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654>
Lucas Fryzek [Thu, 2 Mar 2023 19:48:56 +0000 (14:48 -0500)]
svga: Add support for `get_screen_fd`
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654>
Lucas Fryzek [Thu, 2 Mar 2023 19:48:14 +0000 (14:48 -0500)]
i915: Add support for `get_screen_fd`
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654>
Lucas Fryzek [Thu, 2 Mar 2023 19:47:32 +0000 (14:47 -0500)]
iris: Add support for `get_screen_fd`
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654>
Lucas Fryzek [Thu, 2 Mar 2023 19:47:02 +0000 (14:47 -0500)]
zink: Add support for `get_screen_fd`
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654>
Lucas Fryzek [Thu, 2 Mar 2023 19:46:29 +0000 (14:46 -0500)]
nouveau: Add support for `get_screen_fd`
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654>
Lucas Fryzek [Thu, 2 Mar 2023 19:45:46 +0000 (14:45 -0500)]
tegra: Add support for `get_screen_fd`
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654>
Lucas Fryzek [Thu, 2 Mar 2023 19:45:11 +0000 (14:45 -0500)]
crocus: Add support for `get_screen_fd`
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654>
Mike Blumenkrantz [Fri, 31 Mar 2023 11:22:03 +0000 (07:22 -0400)]
lavapipe: advertise EXT_shader_object
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22233>
Mike Blumenkrantz [Tue, 7 Mar 2023 17:44:53 +0000 (12:44 -0500)]
lavapipe: implement EXT_shader_object
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22233>
Mike Blumenkrantz [Mon, 6 Mar 2023 20:21:54 +0000 (15:21 -0500)]
lavapipe: break out pipeline layout creation for reuse
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22233>
Corentin Noël [Fri, 3 Mar 2023 18:38:34 +0000 (19:38 +0100)]
venus/ci: Only run one crosvm instance
As venus now has separate render server processes it is better to use a single
crosvm instance to run all the tests.
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21693>
Corentin Noël [Fri, 17 Mar 2023 09:53:48 +0000 (10:53 +0100)]
ci: Uprev crosvm and virglrenderer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21693>
Samuel Pitoiset [Fri, 31 Mar 2023 08:33:12 +0000 (10:33 +0200)]
vulkan: Update XML and headers to 1.3.246
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22231>
antonino [Thu, 30 Mar 2023 15:55:38 +0000 (17:55 +0200)]
zink: update requirements now that pv mode can be emulated
Zink can now emulate provoking vertex mode when the extention is
missing, update requirements to reflect this.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22162>
antonino [Thu, 23 Mar 2023 12:58:04 +0000 (13:58 +0100)]
zink: always advertize provoking vertex mode support
Require VK_EXT_provoking_vertex for optimal_keys and always advertize
PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION since it can now be
emulated
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22162>
antonino [Fri, 24 Mar 2023 15:03:02 +0000 (16:03 +0100)]
zink: add provoking vertex mode lowering
Can be used as fallback for when VK_EXT_provoking_vertex is missing
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22162>
antonino [Wed, 29 Mar 2023 09:43:33 +0000 (11:43 +0200)]
zink: add field to 'zink_gs_key' and enum
Add enum for pv emulation primitives and `lower_pv_mode`
to `zink_gs_key`
The enum contains the possible values of the lower_pv_mode key
This key will be non 0 whenever provoking vertex mode needs to be
emulated and it's exact value encodes relevant information about the
primitive that needs to be emulated
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22162>
antonino [Thu, 23 Mar 2023 12:34:45 +0000 (13:34 +0100)]
zink: simplify logic to call `zink_set_primitive_emulation_keys`
The logic had grown to check every primitive indivdually, instead just
check wehether `rast_prim` has changed
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22162>
antonino [Thu, 30 Mar 2023 15:45:15 +0000 (17:45 +0200)]
nir: only handle flat interpolation when needed in `nir_create_passthrough_gs`
When turning primitives into line strips this function needs to move
attributes around, but this is not needed in other cases.
Fixes:
1a5bdca2dda ("zink: implement flat shading using inlined uniforms")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22162>
xurui [Thu, 30 Mar 2023 03:25:05 +0000 (11:25 +0800)]
panfrost: Check the return value of drmGetVersion
Signed-off-by: xurui <xurui@kylinos.cn>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22203>
Erik Faye-Lund [Tue, 15 Nov 2022 10:56:28 +0000 (11:56 +0100)]
docs: make code-block indents consistent
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22052>
Erik Faye-Lund [Tue, 15 Nov 2022 10:54:30 +0000 (11:54 +0100)]
docs: format code-block as toml
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22052>
Erik Faye-Lund [Tue, 15 Nov 2022 10:52:49 +0000 (11:52 +0100)]
docs: format code-block as ini
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22052>
Friedrich Vock [Fri, 17 Mar 2023 07:22:42 +0000 (08:22 +0100)]
radv: Work around use-after-free compiler errors
Fixes:
4dafb69d ("radv/rt: defer library_pipeline allocation")
Tested-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21981>
Samuel Pitoiset [Wed, 25 Jan 2023 15:22:16 +0000 (16:22 +0100)]
radv: add dynamic support for rectangles enable/mode
This is in VK_EXT_discard_rectangles version 2.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21360>