platform/upstream/mesa.git
17 months agozink: preserve present resources during async presentation
Mike Blumenkrantz [Thu, 19 Jan 2023 18:33:04 +0000 (13:33 -0500)]
zink: preserve present resources during async presentation

ensure that these have a lifetime great enough to be presented

fixes #7781

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20793>
(cherry picked from commit 020db79340a1932c5229574a9e5d1ccec4e5c9da)

17 months agozink: correct sparse bo mem_type_idx placement
Julia Tatz [Mon, 16 Jan 2023 20:34:47 +0000 (15:34 -0500)]
zink: correct sparse bo mem_type_idx placement

VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x01 has been incidently the
correct memory type index, but isn't guaranteed to be, which is why it
hasn't caused issues yet

Fixes: f9515d93 ("zink: allocate/place memory using memoryTypeIndex directly")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20264>
(cherry picked from commit c71287e70c2bf4aac96b24635e48ec13cd31fddf)

17 months agozink: trival renames heap_idx -> memoryTypeIndex
Julia Tatz [Mon, 16 Jan 2023 18:18:40 +0000 (13:18 -0500)]
zink: trival renames heap_idx -> memoryTypeIndex

Trival renames to correctly identify vulkan memory type indices aren't
the same as zink heaps

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20264>
(cherry picked from commit e20e8f22438b619e1700753ab37e8ae9170b931e)

17 months agozink: zink_heap isn't 1-to-1 with memoryTypeIndex
Julia Tatz [Mon, 16 Jan 2023 18:09:02 +0000 (13:09 -0500)]
zink: zink_heap isn't 1-to-1 with memoryTypeIndex

Clarify the relationship between zink heaps and vulkan memory type
indices, and resolve the issues from mixing the two up.

Closes: #7588, #7813
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20264>
(cherry picked from commit f6d3a5755f63c81881ff5647fe783038c955e8e3)

17 months agozink: handle modifier nplanes queries correctly for planar formats
Mike Blumenkrantz [Tue, 17 Jan 2023 19:45:48 +0000 (14:45 -0500)]
zink: handle modifier nplanes queries correctly for planar formats

this just returns the number of planes in the base format as a default, which
matches the behavior of other drivers

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20753>
(cherry picked from commit 6ff334e54a2d3455a9c532b146b2fb77a757af02)

17 months agozink: store drm format as internal_format for imported resources
Mike Blumenkrantz [Tue, 17 Jan 2023 19:43:51 +0000 (14:43 -0500)]
zink: store drm format as internal_format for imported resources

internal_format is the "real" format of a resource, and the "real" format
of imported resources is the external-facing format, not the pipe format

this ensures the correct format is available for internal ops, such as nplanes queries

Fixes: 2e2775c11b0 ("zink: fix PIPE_RESOURCE_PARAM_NPLANES with format modifier")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20753>
(cherry picked from commit 072e29a22e2cd3c738a3bee463f6aebd40159966)

17 months agoradv: fix creating BC image views when the base layer is > 0
Samuel Pitoiset [Tue, 17 Jan 2023 15:18:24 +0000 (16:18 +0100)]
radv: fix creating BC image views when the base layer is > 0

When the base array layer of the image view is > 0, addrlib computes
the offset (in HwlComputeSubResourceOffsetForSwizzlePattern) which is
then added to the base VA in RADV. But if the driver doesn't reset
the base array layer, the hw will compute incorrect addressing
(ie. base array will be added twice). This also matches AMDVLK.

This fixes a VM fault followed by a GPU hang on RDNA2 when trying
to join a multiplayer game with medium settings in Halo Infinite.

Fixes: 98ba1e0d817 ("radv: Fix mipmap views on GFX10+")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20761>
(cherry picked from commit 8d191b2cfb5fbc66321369857c7189c1dbd431fa)

17 months agoradv: fix buffer to image copies with BC views on the graphics queue
Samuel Pitoiset [Tue, 17 Jan 2023 16:53:13 +0000 (17:53 +0100)]
radv: fix buffer to image copies with BC views on the graphics queue

The color surface descriptor needs to be adjusted, otherwise addressing
is wrong.

Fixes tests performed on the graphics queue from
dEQP-VK.api.copy_and_blit.*.image_to_buffer.2d_images.mip_copies_*.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7900
Fixes: 98ba1e0d817 ("radv: Fix mipmap views on GFX10+")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20761>
(cherry picked from commit 18aaa373b701c98ea85058deeaeadac44f120bab)

17 months agoradv: fix setting MAX_MIP for BC views
Samuel Pitoiset [Tue, 17 Jan 2023 16:33:12 +0000 (17:33 +0100)]
radv: fix setting MAX_MIP for BC views

MAX_MIP should always be the number of levels minus one from the hw
perspective.

This doesn't fix anything known.

Fixes: 98ba1e0d817 ("radv: Fix mipmap views on GFX10+")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20761>
(cherry picked from commit aff5fe3f9437ad9339d33d150eefc367875e2329)

17 months agoglthread: fix glArrayElement handling
Pierre-Eric Pelloux-Prayer [Tue, 17 Jan 2023 15:06:00 +0000 (16:06 +0100)]
glthread: fix glArrayElement handling

This must be marshalled synchronously or the attrib pointers' content
might change by the time we use them.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8068
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20748>
(cherry picked from commit ddc721e15c6260e5a505f7e5fab2115e4cbd7c72)

17 months agovbo: lower VBO_SAVE_BUFFER_SIZE to avoid large VRAM usage
Pierre-Eric Pelloux-Prayer [Tue, 17 Jan 2023 09:14:52 +0000 (10:14 +0100)]
vbo: lower VBO_SAVE_BUFFER_SIZE to avoid large VRAM usage

The ideal case for performance is to have a single buffer for
all display list. The caveat is that large buffers are less
likely to be freed because they're refcounted: it only takes
1 user (diplay list) to keep it in VRAM.

This lowers VRAM usage when replaying the trace attached
of the trace attached to !6140 from 5.5 GB to about 1.8 GB.

Viewperf snx performance isn't affected.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6140
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20748>
(cherry picked from commit 0f5c8c3dc35561f23a5383cb05075898942ce0c5)

17 months agovbo: remove bogus assert
Pierre-Eric Pelloux-Prayer [Tue, 17 Jan 2023 09:13:00 +0000 (10:13 +0100)]
vbo: remove bogus assert

grow_vertex_storage may call wrap_filled_vertex, which will
trigger the assert incorrectly because the new size will be
smaller than 'new_size' but it's correct because
'vertex_store->used' has been reset to 0.

Fixes: a08baaff976 ("vbo/dlist: fix indentation in vbo_save_api.c")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20748>
(cherry picked from commit 491f6b138ecbe938471f7ee1bc339b32c61eed07)

17 months agonir/lower_io: fix bounds checking for 64bit_bounded_global
Lionel Landwerlin [Tue, 17 Jan 2023 21:42:03 +0000 (23:42 +0200)]
nir/lower_io: fix bounds checking for 64bit_bounded_global

If the offset is negative like it's the case in

dEQP-VK.robustness.robustness2.bind.notemplate.r32i.unroll.volatile.storage_buffer_dynamic.readwrite.no_fmt_qual.len_256.samples_1.1d.comp

we end up passing the bounds checking condition because it's using
signed integers.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Suggested-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20762>
(cherry picked from commit ff34e96701ef8f6e52755685a5ef9425c0229cfd)

17 months agointel/compiler: Drop redundant 32-bit expansion for shared float atomics
Kenneth Graunke [Mon, 9 Jan 2023 23:57:14 +0000 (15:57 -0800)]
intel/compiler: Drop redundant 32-bit expansion for shared float atomics

We already expanded data to 32-bit a few lines earlier, so this is just
redundantly doing it a second time.

Fixes: 43169dbbe5f ("intel/compiler: Support 16 bit float ops")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20604>
(cherry picked from commit f7b29d792464b0224ae5155d15d48ab8e55840cb)

17 months agointel/fs/gfx12: Ensure that prior reads have executed before barrier with acquire...
Francisco Jerez [Mon, 9 Jan 2023 23:31:33 +0000 (15:31 -0800)]
intel/fs/gfx12: Ensure that prior reads have executed before barrier with acquire semantics.

This avoids a violation of the Vulkan memory model that was leading to
intermittent failures of at least 8k test-cases of the Vulkan CTS
(within the group dEQP-VK.memory_model.*) on TGL and DG2 platforms.
In theory the issue may be reproducible on earlier platforms like IVB
and ICL, but the SYNC.ALLWR instruction is not available on those
platforms so a different (likely costlier) fix will be needed.

The issue occurs within the sequence we emit for a NIR memory barrier
with acquire semantics requiring the synchronization of multiple
caches, e.g. in pseudocode for a barrier involving the TGM and UGM
caches on DG2:

 x <- load.ugm // Atomic read sequenced-before the barrier
 y <- fence.ugm
 z <- fence.tgm
 wait(y, z)
 w <- load.tgm // Read sequenced-after the barrier

In the example we must provide the guarantee that the memory load for
x is completed before the one for w, however this ordering can be
reversed with the intervention of a concurrent thread, since the UGM
fence will block on the prior UGM load and potentially take a long
time, while the TGM fence may complete and invalidate the TGM cache
immediately, so a concurrent thread could pollute the TGM cache with
stale contents for the w location *before* the UGM load has completed,
leading to an inversion of the expected memory ordering.

v2: Apply the workaround regardless of whether the NIR barrier
    intrinsic specifies multiple storage classes or a single one,
    since an acquire barrier is required to order subsequent requests
    relative to previous atomic requests of unknown storage class not
    necessarily specified by the memory scope information of the
    intrinsic.

Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20690>
(cherry picked from commit 4a2e7306dd007a9564f9194c52d181ef24271c4e)

17 months agoanv: check the return value of anv_execbuf_add_bo_bitset()
Paulo Zanoni [Sat, 14 Jan 2023 00:51:59 +0000 (16:51 -0800)]
anv: check the return value of anv_execbuf_add_bo_bitset()

Because anv_execbuf_add_bo_bitset() calls anv_execbuf_add_bo(), which
can fail if its memory allocations fail.

I have seen dEQP tests exercising memory allocation failures during
anv_execbuf_add_bo(), but I don't think the path coming from
add_bo_biset() was specifically exercised. Anyway, add the error check
just in case.

v2: Rebase.

Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20703>
(cherry picked from commit 3d37950fd9ddc7b43f06b4a5fa710fb7333978ce)

17 months agoanv: don't leave undefined values in exec->syncobj_values
Paulo Zanoni [Thu, 12 Jan 2023 18:23:15 +0000 (10:23 -0800)]
anv: don't leave undefined values in exec->syncobj_values

In anv_execbuf_add_syncobj(), we try to not create or use
exec->syncobj_values if we don't need to. But when we figure we're
going to need it (i.e., when timeline_value is not zero), then we
create exec->syncobj_values with vk_zalloc, which means every previous
value is set to zero, as it should be. This is all correct.

The problem starts when we add a 16th element. In this case we double
exec->syncobj_array_length and realloc the buffer by using vk_alloc
and copying the old array to the new one. After that, we write the
timeline_value to the array only if it's not zero, and that's the
problem: since we just used vkalloc and memcpy, we don't have any
guarantees that the new array will be zero after the 16th element, and
if timeline_value is zero we write nothing to that position.

Once we start using exec->syncobj_values we have to commit to using
it, so the "if (timeline_value)" check near the end of the function
has to be changed to "if (exec->syncobj_values)", so we actually set
elements after the 16th to zero when they need to be zero.  Another
approach to fix this would be to memset the new elements once we
double syncobj_array_length.

In practice, I couldn't find any application or deqp test that used
more than 3 elements in exec->syncobj_array_length, and we need more
than 16 elements in order to be able to reproduce the bug, so I'm not
aware of any real-world bug that goes away with this patch. This issue
was found while reading code.

If we craft a little Vulkan program that submits a ton of timeline and
binary semaphores on vkQueueSubmit, then waits for them, we get the
following error without this patch:

MESA: error: ../../src/intel/vulkan/anv_batch_chain.c:1910: execbuf2 failed: Invalid argument (VK_ERROR_DEVICE_LOST)

v2: Rebase.

Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20703>
(cherry picked from commit ad6a036a6815f973355c2500023ddaf780593394)

17 months agov3dv: remove unused clamp_to_transparent_black_border property
Maíra Canal [Tue, 17 Jan 2023 13:20:45 +0000 (10:20 -0300)]
v3dv: remove unused clamp_to_transparent_black_border property

Commit e07c5467 ("v3dv/format: use XYZ1 swizzle for three-component formats")
removes the only code that handled the clamp_to_transparent_black_border
variable. Therefore, the variable can be deleted, as it is not currently
being used.

Fixes: e07c5467 ("v3dv/format: use XYZ1 swizzle for three-component formats")
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20746>
(cherry picked from commit 86c9bdcd9adc952654f58329d4d482b7a509f5c7)

17 months agonir/divergence: add missing RT intrinsinc handling
Lionel Landwerlin [Wed, 18 Jan 2023 08:37:45 +0000 (10:37 +0200)]
nir/divergence: add missing RT intrinsinc handling

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20763>
(cherry picked from commit b82d9b1a3d0f74fc73acc5ae77a6f51ce9ed8fc1)

17 months agomesa: Set info.separate_shader for ARB programs
Alyssa Rosenzweig [Fri, 13 Jan 2023 02:43:29 +0000 (21:43 -0500)]
mesa: Set info.separate_shader for ARB programs

ARB programs are logically separate, and Mesa will happily mix and match them.
We need to alert backends of this fact, by setting nir->info.separate_shader.
Otherwise, backends may link shaders invalidly.

Fixes fp-abs-01 on Bifrost. (We don't use separate_shader for anything on
Valhall, so the issue doesn't appear there.)

Compare 151aa19c215 ("ttn: Set nir->info.separate_shader"), which fixed a
similar issue with TGSI.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20688>
(cherry picked from commit 7e68cf91d74e6bd9a88c2b52417451d9afec4782)

17 months agovirgl: drop the separable flag for cases that can't be handled
Gert Wollny [Tue, 17 Jan 2023 11:27:57 +0000 (12:27 +0100)]
virgl: drop the separable flag for cases that can't be handled

The host can't assign more than 32 locations explicitly, and we
exhaust this already when we handle patches and generics. So
drop the separable flag in cases when we have other IO that
uses generated names that will have to be matched by name.

v2: skip tests for VS input and FS outputs

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20738>
(cherry picked from commit 8084b412ca97c048b43043c80946498b346c3016)

17 months agozink: fix depth-clip disable cap
Erik Faye-Lund [Tue, 17 Jan 2023 11:03:26 +0000 (12:03 +0100)]
zink: fix depth-clip disable cap

We use EXT_depth_clip_enable for this, not EXT_depth_clip_control, which
is what depth_clip_control_missing is a proxy for.

Fixes: 721f33cd0fc ("zink: fix return for PIPE_CAP_DEPTH_CLIP_DISABLE")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20740>
(cherry picked from commit c12fed18049f3c93f2a7e25f929aeb1742467a3b)

17 months agogallium,util: Pull u_indices and u_primconvert back into gallium
Jason Ekstrand [Mon, 16 Jan 2023 22:03:11 +0000 (16:03 -0600)]
gallium,util: Pull u_indices and u_primconvert back into gallium

This was moved in !13741 but doing so created a link-time dependency
between util and gallium which causes problems for Vulkan drivers.
Meanwhile, having mesa/main depend on gallium is fine now that we don't
have any classic drivers.  It's a bit circular but should be harmless.

Fixes: 97ba2f2fd486 ("move util/indices to core util")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8098
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20734>
(cherry picked from commit d292cb82b8ef1311eb4b78af2c90b1840ba5a6bf)

17 months agofreedreno: Fix tracking of enabled SSBOs
Rob Clark [Tue, 3 Jan 2023 22:23:28 +0000 (14:23 -0800)]
freedreno: Fix tracking of enabled SSBOs

Clearing all of the modified bits an relying on OR'ing the needed bits
back in the loop below doesn't quite work out, Because of early continue
if the SSBO has not changed.

Fixes: 0ed053f03d9 ("freedreno: simplify fd_set_shader_buffers(..)")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20575>
(cherry picked from commit e41d19a7119f2ad92d1765842e066cb84b90014b)

17 months agor600/sfn: Fix readport check
Gert Wollny [Tue, 17 Jan 2023 08:03:26 +0000 (09:03 +0100)]
r600/sfn: Fix readport check

We have to take multi-slot instructions into account, and we don't fail
when there are still possible bank swizzle values to be checked.

For clarity also rename the bank swizzle iterator iterator.

Fixes: 79ca456b4837b3bc21cf9ef3c03c505c4b4909f6
   r600/sfn: rewrite NIR backend

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20739>
(cherry picked from commit ca5bbff558d1de7af3410e659dc0ac6c042cdee3)

17 months agopanfrost: Fix clears with conditional rendering
Alyssa Rosenzweig [Fri, 13 Jan 2023 01:56:23 +0000 (20:56 -0500)]
panfrost: Fix clears with conditional rendering

batch can be invalidated by the render condition check.

Fixes nv_conditional_render-clear.

Fixes: 638b22354e7 ("panfrost: Clear with a quad to avoid flushing")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20689>
(cherry picked from commit 02f9cddb6174f50bb01a12bf926da3fca1fa7b17)

17 months agopanfrost: Fix logic ops on Bifrost
Alyssa Rosenzweig [Thu, 12 Jan 2023 22:34:44 +0000 (17:34 -0500)]
panfrost: Fix logic ops on Bifrost

opaque should not be set when logicops are enabled, that needs blending
even on Bifrost. Fixes is for when I believe the bug became possible to hit.
The logical error is older.

Fixes Piglit logicop tests again.

Fixes: d849d9779a7 ("panfrost: Avoid blend shader when not blending")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20685>
(cherry picked from commit 41d99c10d1f2dff160b732e5311da398eb1ed90a)

17 months agopanfrost: Enable NV_primitive_restart on Valhall
Alyssa Rosenzweig [Fri, 13 Jan 2023 21:35:48 +0000 (16:35 -0500)]
panfrost: Enable NV_primitive_restart on Valhall

Unlike literally every other mesa/st emulation, for some inexplicable reason we
need to pretend to support the CAP and then set a different EMULATE cap instead
of the emulation keying off the lack of support for the CAP. Set the CAPs
accordingly so we get NV_primitive_restart (with emulation of non-fixed
indices).

This gets Mesa to advertise GL 3.1 on Mali-G57 as intended.

Fixes: 30c14f54cf2 ("panfrost: Disable PIPE_CAP_PRIMITIVE_RESTART on v9")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20702>
(cherry picked from commit fe4dc59e99dd745b6b42613d199cf61e7b2da995)

17 months agopan/bi: Fix incorrect compilation of fsat(reg.yx)
Alyssa Rosenzweig [Thu, 12 Jan 2023 21:50:31 +0000 (16:50 -0500)]
pan/bi: Fix incorrect compilation of fsat(reg.yx)

Future changes to nir_lower_blend cause fsat(reg.yx) instructions to be
generated, which correspond to "FCLAMP.v2f16 x.h10" pseudoinstructions. These
get their swizzles lowered, but we forgot to clear the swizzle out, so we end up
with extra swap (cancelling out the intended swizzle).

Fix the lowering logic.

Fixes: ac636f5adb5 ("pan/bi: Use FCLAMP pseudo op for clamp prop")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20683>
(cherry picked from commit ed46c617b074c8e36670907ecf57f00bcf7bbc99)

17 months agovulkan/wsi: check if image info was already freed
Alejandro Piñeiro [Fri, 13 Jan 2023 12:42:26 +0000 (13:42 +0100)]
vulkan/wsi: check if image info was already freed

We set the different data being freed to NULL after freeing it, and
checks for NULL before freeing it.

This fixes several double free crash with v3dv, when running OOM wsi
tests, like for example:
dEQP-VK.wsi.xlib.swapchain.simulate_oom.composite_alpha

Although note that only one person got those on a new fresh install of
the Raspbian OS, so this problem was rare.

Fixes: 5b13d74583513ddd029e ("vulkan/wsi/drm: Break create_native_image in pieces")
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20695>
(cherry picked from commit b27e42dcb5f995ef0b7f8d07d5868eed60896b59)

17 months agoradv/rt: Divide by the correct workgroup size
Friedrich Vock [Sun, 15 Jan 2023 20:54:50 +0000 (21:54 +0100)]
radv/rt: Divide by the correct workgroup size

Improves build performance by around 25%.

Fixes: 9369b407 ("radv: Use PLOC for BVH building")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20717>
(cherry picked from commit eab2c3995132f8cd1e3e9ee56eedaf17448aa157)

17 months agoaco: Pass correct number of coords to Vega 1D LOD instruction.
Bas Nieuwenhuizen [Fri, 13 Jan 2023 15:32:41 +0000 (16:32 +0100)]
aco: Pass correct number of coords to Vega 1D LOD instruction.

If we pass a physical 2D texture descriptor we should also pass 2
coords. Otherwise it just uses the random content in the second
register which ends up funny sometimes.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20696>
(cherry picked from commit edca10e9c907a21f44698121e97d0eef92c7961a)

17 months agonir/nir_opt_move: fix ALWAYS_INLINE compiler error
t0b3 [Sat, 10 Dec 2022 13:32:53 +0000 (14:32 +0100)]
nir/nir_opt_move: fix ALWAYS_INLINE compiler error

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Closes: #6825
Fixes: f1d20ec6 ("nir/nir_opt_move: handle non-SSA defs ")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17439>
(cherry picked from commit 267dd1f4d571ee606141aa66f1665aa152b4e911)

17 months agoradv: fix missing implementation of creating images from swapchains
Samuel Pitoiset [Wed, 11 Jan 2023 08:14:08 +0000 (09:14 +0100)]
radv: fix missing implementation of creating images from swapchains

These pNext structs are part of VK_KHR_swapchain which is core Vulkan
1.1 but they were missing. Loosely based on ANV.

Passed WSI CTS.

Cc: 22.3 mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7797
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20641>
(cherry picked from commit 2a5d7f4926c8b3dc702d3ee0e216c563ba7e94db)

17 months agodocs/perfetto: Fix the name of the i915 render stages data sources.
Emma Anholt [Tue, 10 Jan 2023 18:36:46 +0000 (10:36 -0800)]
docs/perfetto: Fix the name of the i915 render stages data sources.

Fixes: ef27399bca95 ("docs: update perfetto with the latest status")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20658>
(cherry picked from commit dbd6031c067a91a7024b84c34687bb8f33f64055)

17 months agozink: fix PIPE_RESOURCE_PARAM_NPLANES with format modifier
Simon Ser [Tue, 20 Dec 2022 14:38:57 +0000 (15:38 +0100)]
zink: fix PIPE_RESOURCE_PARAM_NPLANES with format modifier

Some format modifiers change the number of planes used by an image.
For instance AMD DCC modifiers uses 2 or 3 planes. However the
format modifier was ignored in the PIPE_RESOURCE_PARAM_NPLANES
get_param hook.

Fix this by using get_dmabuf_modifier_planes() instead of
util_format_get_num_planes().

This fixes wlroots-based compositors under zink.

Signed-off-by: Simon Ser <contact@emersion.fr>
Fixes: c025cb9ee9d7 ("zink: fix dmabuf plane returns")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20395>
(cherry picked from commit 2e2775c11b0d17472afd53b1398a3af7d9086a75)

17 months agogen_release_notes: include links in relnotes.rst when generating the new release...
Eric Engestrom [Thu, 29 Dec 2022 23:46:51 +0000 (23:46 +0000)]
gen_release_notes: include links in relnotes.rst when generating the new release note

This is required to allow the docs to build, which in turn is required
if we want to allow merge requests against release (staging) branches.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20460>
(cherry picked from commit b3f517b9889c11367f2b73bdf3033d0e85680871)

17 months agoradv/gfx11: increase radeon_check_space for occlusion query begin
Rhys Perry [Wed, 11 Jan 2023 20:03:08 +0000 (20:03 +0000)]
radv/gfx11: increase radeon_check_space for occlusion query begin

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20652>
(cherry picked from commit 9112fe3c76db55ce73ce89e736bd8bc4f8977218)

17 months agolavapipe: fix one more descriptor set reference issue
Dave Airlie [Thu, 12 Jan 2023 03:12:17 +0000 (13:12 +1000)]
lavapipe: fix one more descriptor set reference issue

I thought I'd fixed this already, must have gotten lost in a rebase.

fixes
dEQP-VK.pipeline.pipeline_library.graphics_library.misc.bind_null_descriptor_set.1010

Fixes: 20902d1ed685 ("lavapipe: fix descriptor set layout reference counting in layout merge")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20662>
(cherry picked from commit 417c51a511b23492b74d17b4d387bd814e850c15)

17 months agovk_cmd_queue: add a callback to free push descriptors set khr
Dave Airlie [Wed, 11 Jan 2023 06:19:04 +0000 (16:19 +1000)]
vk_cmd_queue: add a callback to free push descriptors set khr

This should clean this up properly.

Fixes: eb7eccc76f0a ("lavapipe: Use generated command queue code")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20630>
(cherry picked from commit 3ec428bb325e79d888ada8eb7e96add0f240eced)

17 months agollvmpipe: unref images correctly in the fragment shader path
Dave Airlie [Wed, 11 Jan 2023 05:51:08 +0000 (15:51 +1000)]
llvmpipe: unref images correctly in the fragment shader path

fixes a memory leak seen in lavapipe asan tests
dEQP-VK.robustness.robustness2.bind.template.rg32f.unroll.nonvolatile.storage_buffer.readwrite.no_fmt_qual.null_descriptor.samples_1.1d.frag

Fixes: 2909c654b014 ("llvmpipe: add fragment shader image support")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20630>
(cherry picked from commit ff0433b8cb6df9161605dcd17b027475a9cdc796)

17 months agolavapipe: fix merged layout ref counting
Dave Airlie [Wed, 11 Jan 2023 04:10:11 +0000 (14:10 +1000)]
lavapipe: fix merged layout ref counting

When creating a merged layout, don't use ralloc, just use the
correct reference counting, also only reference a layout if the
pipeline uses it.

Fixes: d4d5a7abba7a ("lavapipe: implement EXT_graphics_pipeline_library")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20630>
(cherry picked from commit 474965adb349f0faf78ec8da5a34681d5514ddaa)

17 months agolavapipe: fix descriptor set layout reference counting in layout merge
Dave Airlie [Wed, 11 Jan 2023 20:44:19 +0000 (06:44 +1000)]
lavapipe: fix descriptor set layout reference counting in layout merge

When taking the descriptor set layouts from the pipeline layout, make
sure to take references

Fixes: d4d5a7abba7a ("lavapipe: implement EXT_graphics_pipeline_library")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20630>
(cherry picked from commit 20902d1ed685e97e135f4a16531793ddb7b4db69)

17 months ago.pick_status.json: Mark e527f686caaf688f0a185e2641fc96413dd502be as denominated
Eric Engestrom [Wed, 25 Jan 2023 10:28:33 +0000 (10:28 +0000)]
.pick_status.json: Mark e527f686caaf688f0a185e2641fc96413dd502be as denominated

17 months ago.pick_status.json: Update to 9f51340b99a39be80bf1bc6d4be15a87161c7a6b
Eric Engestrom [Fri, 13 Jan 2023 18:47:55 +0000 (18:47 +0000)]
.pick_status.json: Update to 9f51340b99a39be80bf1bc6d4be15a87161c7a6b

18 months agodocs/relnotes: add sha256sum for 22.3.3
Eric Engestrom [Wed, 11 Jan 2023 18:08:20 +0000 (18:08 +0000)]
docs/relnotes: add sha256sum for 22.3.3

18 months agoVERSION: bump for 22.3.3
Eric Engestrom [Wed, 11 Jan 2023 17:46:41 +0000 (17:46 +0000)]
VERSION: bump for 22.3.3

18 months agodocs: add release notes for 22.3.3
Eric Engestrom [Wed, 11 Jan 2023 17:44:47 +0000 (17:44 +0000)]
docs: add release notes for 22.3.3

18 months agov3dv: fix alpha-to-one for single sample setup
Iago Toral Quiroga [Wed, 11 Jan 2023 08:08:11 +0000 (09:08 +0100)]
v3dv: fix alpha-to-one for single sample setup

In Vulkan this is expected to work with single sample scenarios too.

Fixes new test in CTS main:
dEQP-VK.pipeline.monolithic.multisample.alpha_to_one.samples_1

cc: mesa-stable

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20634>
(cherry picked from commit 09782e5e6d5cc0a44b907544f55bdaebbb4feb84)

18 months agozink: set surface->dt when updating swapchain
Mike Blumenkrantz [Tue, 10 Jan 2023 15:51:06 +0000 (10:51 -0500)]
zink: set surface->dt when updating swapchain

this otherwise re-creates swapchain surfaces on every frame and has
a significant perf hit for no reason

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20613>
(cherry picked from commit b2739c9f00557347008dfc500dcc584abb81378b)

18 months agomesa: add missing count_scale attributes
Pierre-Eric Pelloux-Prayer [Tue, 10 Jan 2023 09:04:40 +0000 (10:04 +0100)]
mesa: add missing count_scale attributes

The EXT_gpu_program_parameters spec says:

   <params> points to an array of 4*<count> values

for both functions.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20603>
(cherry picked from commit 1ab80eb061b872ae3707c347ea52d7b57cfe4c18)

18 months agomesa: add missing count_scale attribute
Pierre-Eric Pelloux-Prayer [Tue, 10 Jan 2023 09:01:06 +0000 (10:01 +0100)]
mesa: add missing count_scale attribute

The EXT_gpu_program_parameters spec says:

   <params> points to an array of 4*<count> values

Fixes: a4e935f2d70 ("mesa: add EXT_dsa + EXT_gpu_program_parameters functions")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7943
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8025
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20603>
(cherry picked from commit 37dcd183310b45283f9096ca350edb7f53d7b243)

18 months agoradeonsi: rewrite si_update_ps_colorbuf0_slot to fix crashes and recursions
Marek Olšák [Tue, 13 Dec 2022 19:10:29 +0000 (14:10 -0500)]
radeonsi: rewrite si_update_ps_colorbuf0_slot to fix crashes and recursions

I'm convinced that u_blitter interactions with fbfetch can't be handled
in si_update_ps_colorbuf0_slot alone, so it has to be force-disabled
by si_blitter_begin. Another reason why it has to be disabled for u_blitter
and not ignored is because FBFETCH with MSAA enables sample shading
regardless of context states, and we don't want that for u_blitter.

Also, si_update_ps_colorbuf0_slot now disables FBFETCH explicitly before
its own DCC and CMASK decompression because even though u_blitter can't do
anything (due to blitter_running), si_blitter_end calls it too.

The result is that no recursion can occur thanks to the blitter_running
and suppress_update_ps_colorbuf0_slot flags, and FBFETCH is always
force-disabled before those flags are set, which is the state we want
to be in.

Fixes: bc6d22b9200 ("radeonsi: fix ps_uses_fbfetch value")

Acked-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20318>
(cherry picked from commit 3632d398359cce1fb666b8cf6299ba624d3ccda7)

18 months agoetnaviv: blt: properly use upper half of clear value
Lucas Stach [Mon, 9 Jan 2023 15:27:50 +0000 (16:27 +0100)]
etnaviv: blt: properly use upper half of clear value

Instead of replicating the lower half of the clear value, properly
use the upper half to program the second clear value BLT state.

CC: mesa-stable
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20586>
(cherry picked from commit 03fdcbba19bd541bde9bc65f4705c369d5339d67)

18 months agotu: Fix varyings interpolation reading stale values
Danylo Piliaiev [Thu, 5 Jan 2023 12:36:46 +0000 (13:36 +0100)]
tu: Fix varyings interpolation reading stale values

tu6_vpc_varying_mode returned how many bits are consumed IF they are
non-zero, for SMOOTH mode nothing is written and it was treated like
no bits were consumed.

When input with smooth interpolation was the last one and straddled
the VPC_VARYING_INTERP_MODE regs, the last interp mode were not written.

Fixes misrendering in "Psychonauts 2".

Cc: mesa-stable
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20533>
(cherry picked from commit a45d32b10b317f69187392c2d165071248a91f49)

18 months agozink: stop using VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT
Mike Blumenkrantz [Wed, 4 Jan 2023 15:15:17 +0000 (10:15 -0500)]
zink: stop using VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT

this used to be fine back when there was only one thread doing cache management,
but now the cache is used by precompile threads too, so let the driver do sync

fixes #7660

Fixes: 41ffb15de56 ("zink: implement async gfx precompile")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20519>
(cherry picked from commit f18827e0153c555d2f3897b57f8ea0349b5bb41f)

18 months agoutil/driconf: add Dune: Spice Wars workaround
Timothy Arceri [Mon, 9 Jan 2023 03:12:52 +0000 (14:12 +1100)]
util/driconf: add Dune: Spice Wars workaround

As per the bug report the game does not correctly handle a uniform
index of -1 being returned for the unused array element, which
results in rendering issues. So here we skip the uniform array
resizing optimisation.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6397
Cc: mesa-stable
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20579>
(cherry picked from commit ac5af6c06d867507284121f31ddbabf07f7e29f4)

18 months agolavapipe: add some safety asserts when beginning rendering
Mike Blumenkrantz [Fri, 6 Jan 2023 20:19:38 +0000 (15:19 -0500)]
lavapipe: add some safety asserts when beginning rendering

if the render area exceeds the attachment size, this is not only illegal,
it will crash later

cc: mesa-stable

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20583>
(cherry picked from commit 847d198c1fffe018f4c3557db239168100400319)

18 months agoanv: use the null surface with unused push descriptor binding table entries
Lionel Landwerlin [Sat, 7 Jan 2023 00:54:44 +0000 (02:54 +0200)]
anv: use the null surface with unused push descriptor binding table entries

Some binding table entries have been identify as unused in the shaders
by the push constant analysis pass. We can just put the null entry in
there.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: b49b18f0b7 ("anv: reduce BT emissions & surface state writes with push descriptors")
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20555>
(cherry picked from commit 2d627f28c8fb55336d001846cfe70877b446d978)

18 months agoanv: return properly typed value for no ubo promoted
Lionel Landwerlin [Sat, 7 Jan 2023 00:55:33 +0000 (02:55 +0200)]
anv: return properly typed value for no ubo promoted

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ff91c5ca42 ("anv: add analysis for push descriptor uses and store it in shader cache")
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20555>
(cherry picked from commit bbfca4eb92a75802d6555202d95d6b20af5d7c90)

18 months agoanv: check that push range actually match binding considered
Lionel Landwerlin [Sat, 7 Jan 2023 00:58:09 +0000 (02:58 +0200)]
anv: check that push range actually match binding considered

We can't just check the load_ubo range is contained in the push entry,
we also need to check that the push entry set/binding matches the
load_ubo set/binding.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ff91c5ca42 ("anv: add analysis for push descriptor uses and store it in shader cache")
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20555>
(cherry picked from commit e2b0086b786fc46193c2c4c0313922d64bbe2653)

18 months agoanv: don't nullify entries
Lionel Landwerlin [Fri, 6 Jan 2023 23:55:55 +0000 (01:55 +0200)]
anv: don't nullify entries

We'll use those to fill the push constant addresses, so we can't have
them turned to null.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ff91c5ca42 ("anv: add analysis for push descriptor uses and store it in shader cache")
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20555>
(cherry picked from commit 48bb3df95158ca14e7c291d03be45becb097263f)

18 months agoiris: let isl set tiling mode for external resources
Tapani Pälli [Mon, 2 Jan 2023 09:00:26 +0000 (11:00 +0200)]
iris: let isl set tiling mode for external resources

Patch sets memory object external format (which is otherwise
PIPE_FORMAT_NONE for memory objects) before main surface gets
configured. With this we can add a check that when dealing
with external resource that has no modifier set, we let isl
figure out the tiling mode.

Fixes memobj tests on DG2:
   piglit.spec.ext_external_objects.vk-image-display-muliple-textures
   piglit.spec.ext_external_objects.vk-image-display-overwrite
   piglit.spec.ext_external_objects.vk-depth-display
   piglit.spec.ext_external_objects.vk-image-display
   piglit.spec.ext_external_objects.vk-stencil-display

v2: add assert and comment on tiling decision (Ken)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7684
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Simon Zeni <simon@bl4ckb0ne.ca>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20473>
(cherry picked from commit 319d485679848f9c48e1fc7b34ecf97fc39ac1d0)

18 months agovc4: Fix running process_mux_deps on irrelevant type of instructions
Qiu Wenbo [Mon, 9 Jan 2023 09:19:00 +0000 (17:19 +0800)]
vc4: Fix running process_mux_deps on irrelevant type of instructions

Only ALU and ALU Small Imm instructions have input mux.

Signed-off-by: Qiu Wenbo <qiuwenbo@kylinos.com.cn>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20581>
(cherry picked from commit ee32f3873c544bffdc63c733e9be966258e9b4a5)

18 months agovc4: Fix RADDR_A field extraction of branch instruction
Qiu Wenbo [Mon, 9 Jan 2023 09:11:59 +0000 (17:11 +0800)]
vc4: Fix RADDR_A field extraction of branch instruction

Signed-off-by: Qiu Wenbo <qiuwenbo@kylinos.com.cn>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20581>
(cherry picked from commit 7489c29abee0e7db46b63bd18662a6d73cb3c6a7)

18 months agozink: protect against invalid scissored renderpass clears
Mike Blumenkrantz [Fri, 6 Jan 2023 19:36:45 +0000 (14:36 -0500)]
zink: protect against invalid scissored renderpass clears

if the clear region is oob, this is illegal and may crash some drivers

fixes (lavapipe):
dEQP-EGL.functional.swap_buffers_with_damage.resize_before_swap.buffer_age_clear_render
dEQP-EGL.functional.swap_buffers_with_damage.resize_before_swap.buffer_age_render_clear

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20584>
(cherry picked from commit 6f02fe8842f9fc6e0cecad533451a6402539c027)

18 months agozink: only update framebuffer object during swapchain update if framebuffer exists
Mike Blumenkrantz [Fri, 6 Jan 2023 18:46:37 +0000 (13:46 -0500)]
zink: only update framebuffer object during swapchain update if framebuffer exists

otherwise this might be randomly creating an unused framebuffer for dynamic render

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20584>
(cherry picked from commit 79a4d22928e2b1b3e4a4246384b33c42a14cdb57)

18 months agoradv: fix re-emitting tessellation domain origin when it's dynamic
Samuel Pitoiset [Tue, 3 Jan 2023 09:02:04 +0000 (10:02 +0100)]
radv: fix re-emitting tessellation domain origin when it's dynamic

The winding order can be different between pipelines.

Fixes new dEQP-VK.pipeline.pipeline_library.dynamic_control_points.change_*_winding.

Fixes: f22290949d3 ("radv: add support for dynamic tessellation domain origin")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20486>
(cherry picked from commit f1b3e6aefd42eae8ce8b551f67d1f8650353407e)

18 months agoutil/00-mesa-defaults: add Limbo workaround
Pierre-Eric Pelloux-Prayer [Fri, 6 Jan 2023 15:14:55 +0000 (16:14 +0100)]
util/00-mesa-defaults: add Limbo workaround

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7976
Cc: mesa-stable
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Tested-by: Diego Viola <diego.viola@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20548>
(cherry picked from commit 6e24b76c105eed183edbc95c404c8ee39c2bf077)

18 months agodriconf: add a workaround for plasmashell freezing
Xaver Hugl [Sun, 1 Jan 2023 16:01:24 +0000 (17:01 +0100)]
driconf: add a workaround for plasmashell freezing

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7624

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Dan Johansen <strit@manjaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20472>
(cherry picked from commit 41eb491fb6460f401a4c845fc28a53de92e9075b)

18 months agovirgl: Use virgl host side shader stage IDs when reading caps
Gert Wollny [Fri, 6 Jan 2023 08:45:11 +0000 (09:45 +0100)]
virgl: Use virgl host side shader stage IDs when reading caps

The ordering of enum pipe_shader_type changed, but not all locations where
the host uses the original ordering were changed to translate to the new
ordering, namely reading the shader caps was not fixed up so do this now.

v2: - inline virgl_shader_stage_convert (Corentin)
    - encapuslate use of host shader stage when reading array elements
      of host caps

Fixes: a26543f6368fed1604cfde7fffce2024e9d8abab
   gallium: reorder the shader stage enum to match Mesa

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8023

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20544>
(cherry picked from commit c91a78c03a67afa5f0792669a58a7d19f87c5ba0)

18 months agoaco/gfx11: update s_code_end padding
Rhys Perry [Thu, 5 Jan 2023 15:44:09 +0000 (15:44 +0000)]
aco/gfx11: update s_code_end padding

Match ac_rtld_open().

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Cc: 22.3 <mesa-stable>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20536>
(cherry picked from commit 9e55b3b790997573d7e4110332024d1052d0ccc3)

18 months agomeson: add missing dependency
Eric Engestrom [Thu, 5 Jan 2023 10:56:24 +0000 (10:56 +0000)]
meson: add missing dependency

Now that renderonly.h includes util/simple_mtx.h, which itself includes
valgrind.h, dep_valgrind is required by any module that includes
renderonly.h.

    In file included from ../src/gallium/auxiliary/renderonly/renderonly.h:33,
                     from ../src/gallium/winsys/kmsro/drm/kmsro_drm_winsys.c:39:
    ../src/util/simple_mtx.h:34:12: fatal error: valgrind.h: No such file or directory
       34 | #  include <valgrind.h>
          |            ^~~~~~~~~~~~
    compilation terminated.

dep_valgrind is part of idep_mesautil, which should be used instead of
copying the list of deps for each util header included (which would
have to be updated every time a util header changes its own includes),
so let's add idep_mesautil everywhere that includes renderonly.h.

Fixes: ad4d7ca8332488be8a75 ("kmsro: Fix renderonly_scanout BO aliasing")
Tested-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20530>
(cherry picked from commit aab4a260db6563d676a8e43fcdf7c653e61bf698)

18 months agoradv: fix returning VK_PIPELINE_COMPILE_REQUIRED from library
Samuel Pitoiset [Thu, 5 Jan 2023 11:42:50 +0000 (12:42 +0100)]
radv: fix returning VK_PIPELINE_COMPILE_REQUIRED from library

When VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED is set by
the application, the driver should return VK_COMPILE_REQUIRED but this
was broken for GPL (it returned VK_SUCCESS instead). Also, objects
shouldn't be destroyed when creating the library failed because it's
already handled in radv_graphics_lib_pipeline_create().

Cc: 22.3 mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7512
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20532>
(cherry picked from commit 5757dbe1ee994c6c5afdaa691ebcfeb72e0cd04f)

18 months agokmsro: Fix renderonly_scanout BO aliasing
Asahi Lina [Tue, 20 Dec 2022 15:37:31 +0000 (00:37 +0900)]
kmsro: Fix renderonly_scanout BO aliasing

BOs can only have one handle. If renderonly_create_gpu_import_for_resource
ends up importing a BO that was already mapped for scanout, it will get
the same handle. This leaves us with two renderonly_scanout objects for
one handle, and the first one to be destroyed will free it.

Import the BO map tracking logic from asahi, to avoid aliasing
renderonly_scanout objects. Each actual BO now is only represented by a
single object instance, which is reference counted.

Fixes KWin full-screen PipeWire capture breaking scanout entirely.

Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20397>
(cherry picked from commit ad4d7ca8332488be8a75aff001f00306a9f6402e)

18 months agoegl: handle NULL loaderPrivate in dri_is_thread_safe
Pierre-Eric Pelloux-Prayer [Mon, 2 Jan 2023 16:27:41 +0000 (17:27 +0100)]
egl: handle NULL loaderPrivate in dri_is_thread_safe

This can happen when a context is created from
loader_dri3_blit_context_get and glthread is enabled.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7949
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7960
Cc: mesa-stable
Acked-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20479>
(cherry picked from commit b111e8aa4940e8b155f38b5ef238c295ded8a6b4)

18 months agov3dv: initialize fd variable for proper error handling
Maíra Canal [Sat, 31 Dec 2022 13:44:18 +0000 (10:44 -0300)]
v3dv: initialize fd variable for proper error handling

Currently, process_singlesync_signals() checks if fd == -1 to handle
possible errors in the drmSyncobjExportSyncFile function. But, fd is not
initialized, which means that drmSyncobjExportSyncFile might fail and
the error will not be handled as fd might not be equal to -1.

Therefore, initialize the fd variable with value -1 to ensure proper
error handling.

cc: mesa-stable

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20475>
(cherry picked from commit a2252adde8235d5c4d78d9347527cd7914bb905a)

18 months agozink: Only expose PIPE_CAP_SHADER_ATOMIC_INT64 if we can do shared and ssbos.
Emma Anholt [Tue, 3 Jan 2023 22:33:44 +0000 (14:33 -0800)]
zink: Only expose PIPE_CAP_SHADER_ATOMIC_INT64 if we can do shared and ssbos.

Fixes: 3ac0706aa83b ("zink: export PIPE_CAP_SHADER_ATOMIC_INT64")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20506>
(cherry picked from commit b8d9f860a02daa253213b216488941807e8ea79a)

18 months agozink: Only expose PIPE_CAP_IMAGE_ATOMIC_FLOAT_ADD if we can actually add.
Emma Anholt [Tue, 3 Jan 2023 22:17:48 +0000 (14:17 -0800)]
zink: Only expose PIPE_CAP_IMAGE_ATOMIC_FLOAT_ADD if we can actually add.

Drivers may expose the ext without the add capability, if they can
load/store/exchange.

Fixes: c32f046ab669 ("zink: export PIPE_CAP_IMAGE_ATOMIC_FLOAT_ADD")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20506>
(cherry picked from commit 426cb025e7fd09d94713c84bc02ef7b9aaad3fa8)

18 months agoutil/00-mesa-defaults: add Metal Slug XX workaround
Timothy Arceri [Wed, 4 Jan 2023 03:34:48 +0000 (14:34 +1100)]
util/00-mesa-defaults: add Metal Slug XX workaround

The game uses texture2D() in glsl 4.40 shaders, but texture2D()
was moved to compat in 4.20.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20511>
(cherry picked from commit a4a1f95431ae8a8194758436edf64b415efe7e29)

18 months agohasvk: Emit CS stall on INTEL_MEASURE timestamp
Felix DeGrood [Wed, 4 Jan 2023 01:31:37 +0000 (01:31 +0000)]
hasvk: Emit CS stall on INTEL_MEASURE timestamp

For INTEL_MEASURE, ensure all prior instructions completed before
timestamp taken. Continue to support no CS flush case for Perfetto.
CS stall was dropped from pipecontrol when adding u_trace support.

Fixes: cc5843a573b ("anv: implement u_trace support")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20502>
(cherry picked from commit c1c81137d9ce0dda1c0cec374bf4912f7663b2ef)

18 months agoanv: Emit CS stall on INTEL_MEASURE timestamp
Felix DeGrood [Tue, 3 Jan 2023 19:22:30 +0000 (19:22 +0000)]
anv: Emit CS stall on INTEL_MEASURE timestamp

For INTEL_MEASURE, ensure all prior instructions completed before
timestamp taken. Continue to support no CS flush case for Perfetto.
CS stall was dropped from pipecontrol when adding u_trace support.

Fixes: cc5843a573b ("anv: implement u_trace support")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20502>
(cherry picked from commit 7f6beb8537bef69a9b14ec24aa4c817742d219df)

18 months agoradv: fix multiple resolves in the same subpass
Samuel Pitoiset [Thu, 24 Nov 2022 14:07:32 +0000 (15:07 +0100)]
radv: fix multiple resolves in the same subpass

If there is multiple resolves, the driver shouldn't always select the
fragment path because it doesn't work for all images.

Fixes dEQP-VK.pipeline.monolithic.multisample.misc.*

Cc: 22.3 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19986>
(cherry picked from commit 22543653d5b20817d576180060005963c05bca3d)

18 months agonv30: Fix an offset for vbos being applied to a buffer twice
Adam Stylinski [Sat, 31 Dec 2022 21:14:38 +0000 (16:14 -0500)]
nv30: Fix an offset for vbos being applied to a buffer twice

Similar to 1387d1d4, this offset was being applied twice (once in
translate_generic, and once when the buffer is mapped).

This fixes 7972, which was initially thought to be an endianness
specific issue.

CC: mesa-stable
Tested-by: Filip Gawin <filip@gawin.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20468>
(cherry picked from commit 50972297f4c0355a137d7b32c51704e0a05028c3)

18 months agovenus: properly ignore the sampler for immutable sampler
Yiwei Zhang [Sun, 1 Jan 2023 01:21:53 +0000 (17:21 -0800)]
venus: properly ignore the sampler for immutable sampler

This was found while debugging venus-lavapipe ci failure. It's a real
bug though no tests have caught this yet, but fixing this would regress
venus-lavapipe non-templated push tests if without the dependent lvp
fix. The sampler in the descriptor write can be garbled if the binding
has immutable samplers.

cc: mesa-stable

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20471>
(cherry picked from commit 33b778cc36158568e308564313effb219b3adb5b)

18 months agolvp: properly ignore sampler write for immutable sampler
Yiwei Zhang [Sun, 1 Jan 2023 01:07:19 +0000 (17:07 -0800)]
lvp: properly ignore sampler write for immutable sampler

The issue is hidden due to a overly relaxed cts:
dEQP-VK.binding_model.shader_access.primary_cmd_buf.with_push*
that doesn't scrub the sampler from descriptor writes for immutable
samplers. The issue is exposed via venus-lavapipe ci because venus must
ignore the potentially garbled sampler. This change aligns the
VK_DESCRIPTOR_TYPE_SAMPLER path with the
VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER path by removing a false check
against the provided sampler from push since the sampler can be null. An
alternative is to also check against !binding->immutable_samplers there.

Test: venus-lavapipe with venus push descriptor support

cc: mesa-stable

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20471>
(cherry picked from commit 9a104f6348d9f86825f0d9ace1886b7f26277845)

18 months agofrontends/va: Update state var frame_num disregarding cap check
Sil Vilerino [Tue, 3 Jan 2023 15:16:29 +0000 (10:16 -0500)]
frontends/va: Update state var frame_num disregarding cap check

The frame_num variable must be updated for encode entrypoint disregarding
the outcome of the PIPE_VIDEO_CAP_REQUIRES_FLUSH_ON_END_FRAME cap check

fixes: 229c6f79a660e5c7999ffc94e1fb514692df3b6a ("frontends/va: Implement vaSyncBuffer")

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20490>
(cherry picked from commit fb0038f489f9878d5ee448ece1c8df3d1816c649)

18 months agoradv: fix missing initialization of radv_resolve_barrier::dst_stage_mask
Samuel Pitoiset [Fri, 16 Dec 2022 07:12:50 +0000 (08:12 +0100)]
radv: fix missing initialization of radv_resolve_barrier::dst_stage_mask

Otherwise, this value is unitialized when read in
radv_ace_internal_barrier().

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7909
Fixes: 4c6f83006d4 ("radv: Synchronization for task shaders.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20351>
(cherry picked from commit 050c39c92fb544e11af6f013c04494a0b554081b)

18 months agoaco: fix reset_block_regs() in postRA-optimizer
Daniel Schürmann [Mon, 14 Nov 2022 15:17:25 +0000 (16:17 +0100)]
aco: fix reset_block_regs() in postRA-optimizer

Accidentally, we picked the index of the predecessors instead of the predecessors.

Totals from 8496 (6.30% of 134913) affected shaders: (GFX10.3)
CodeSize: 64070724 -> 64022516 (-0.08%); split: -0.08%, +0.00%
Instrs: 11932750 -> 11920698 (-0.10%); split: -0.10%, +0.00%
Latency: 144040266 -> 144017062 (-0.02%); split: -0.02%, +0.00%
InvThroughput: 29327735 -> 29326421 (-0.00%); split: -0.00%, +0.00%

Fossil DB stats on Rembrandt (RDNA2):
Totals from 4488 (3.33% of 134906) affected shaders:
CodeSize: 42759736 -> 42735392 (-0.06%); split: -0.06%, +0.00%
Instrs: 7960522 -> 7954436 (-0.08%); split: -0.08%, +0.00%
Latency: 96192647 -> 96172571 (-0.02%); split: -0.02%, +0.00%
InvThroughput: 19313576 -> 19312575 (-0.01%); split: -0.01%, +0.00%

Fixes: 75967a4814be7988afc20e59bac4b48bafacab00 ('aco/optimizer_postRA: Speed up reset_block() with predecessors.')
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16161>
(cherry picked from commit 8f4eccb13854d16aa604d6130fdb892e1cde9250)

18 months agobin/gen_release_notes.py: read Closes/Fixes tags case-insensitively
Konstantin Kharlamov [Mon, 12 Dec 2022 22:50:02 +0000 (01:50 +0300)]
bin/gen_release_notes.py: read Closes/Fixes tags case-insensitively

Cc: mesa-stable
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20241>
(cherry picked from commit 05ca7d114eabfb3e2a2b82ba06ccb7b152e0e2a5)

18 months agobin/gen_release_notes.py: parse "Fixes" tags as well as "Closes"
Konstantin Kharlamov [Fri, 9 Dec 2022 16:16:22 +0000 (19:16 +0300)]
bin/gen_release_notes.py: parse "Fixes" tags as well as "Closes"

Some commits refer to bugs being fixed with "Fixes" tag. Example of one:

    e13d53e1fdb 'Revert "glx/dri: Fix DRI drawable release at MakeCurrent time"'

Parse this tag as well.

Cc: mesa-stable
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20241>
(cherry picked from commit e67578a264bc730491cf26d6a268e61809d31fba)

18 months agobin/gen_release_notes.py: don't fail if "Closes" refers to an MR
Konstantin Kharlamov [Thu, 8 Dec 2022 20:09:26 +0000 (23:09 +0300)]
bin/gen_release_notes.py: don't fail if "Closes" refers to an MR

Sometimes a tag "Closes:" in a commit may refer to a merge request
instead of an issue. Examples of such commits:

    34319c7d84 "ci/freedreno: disable antichambers trace"
    998122d9c2 "mesa: fix GL_INVALID_OPERATION in glEGLImageTargetTexStorageEXT"

Avoid failing on these by explicitly checking that the URL refers to an
issue

Cc: mesa-stable
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20241>
(cherry picked from commit 52cd87ea16f05fc3cc87be9315cd2d2e6dc9850d)

18 months agobin/gen_release_notes.py: do not fail on confidential features
Konstantin Kharlamov [Thu, 8 Dec 2022 19:53:51 +0000 (22:53 +0300)]
bin/gen_release_notes.py: do not fail on confidential features

A commit may refer to an issue marked as confidential. That will look
like a 404 page for outside users. One example of such commit is:

    369c12e5be "anv: clear descriptorsets if AllocateDescriptorSets fails"

Let's handle that case.

Cc: mesa-stable
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20241>
(cherry picked from commit 334123a908cfac282297ba5240aecac79e9babd2)

18 months agobin/gen_release_notes.py: do not end "features" with "None"
Konstantin Kharlamov [Thu, 8 Dec 2022 19:05:03 +0000 (22:05 +0300)]
bin/gen_release_notes.py: do not end "features" with "None"

Currently, the "New features" list unconditionally ends with a "None"
point, which makes no sense. The original author probably meant to check
whether the file is empty, so remove the else clause, and add the check
for emptiness.

Cc: mesa-stable
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20241>
(cherry picked from commit bd807eecd16eb308e121ff6d51210edee8635083)

18 months agogen_release_notes: strip second newline in new features
Eric Engestrom [Fri, 2 Dec 2022 11:58:17 +0000 (11:58 +0000)]
gen_release_notes: strip second newline in new features

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20132>
(cherry picked from commit 980d6a91eecb58acf5cdc356ec5a422304145af5)

18 months ago.pick_status.json: Update to 38d6185432d1f19a5653b3892069cd350187f5b8
Eric Engestrom [Tue, 3 Jan 2023 09:04:25 +0000 (09:04 +0000)]
.pick_status.json: Update to 38d6185432d1f19a5653b3892069cd350187f5b8

18 months agoradeonsi/vcn: av1 film_grain output fix
Ruijing Dong [Fri, 2 Dec 2022 21:11:52 +0000 (16:11 -0500)]
radeonsi/vcn: av1 film_grain output fix

use film grain surface as the output instead of target,
which should be kept for DPB process.

fixed: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6903

CC: 22.3
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20139>
(cherry picked from commit a7b3a279fb544431043908d12d5503916e18942e)

18 months agofrontends/va: pass in film_grain_target as new output
Ruijing Dong [Fri, 2 Dec 2022 21:09:42 +0000 (16:09 -0500)]
frontends/va: pass in film_grain_target as new output

In av1 film grain case, to use the film_grain_target
as the output, instead of target buffer, which is kept
as the input for DPB processing in film_grain output
scenario.

CC: 22.3
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20139>
(cherry picked from commit af695149e96bf276b52ff3715076ddc847c6b959)

18 months agofrontneds/va: use current_display_picture from VA for film grain
Ruijing Dong [Fri, 2 Dec 2022 21:04:18 +0000 (16:04 -0500)]
frontneds/va: use current_display_picture from VA for film grain

use the interface defined in vaapi for av1 film grain's output
https://github.com/intel/libva/blob/master/va/va_dec_av1.h#L296-L304

CC: 22.3
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20139>
(cherry picked from commit 7e91f9486418ad69aaef9ca5ce539ae47995e1d9)

18 months agofrontends/omx: initialize film_grain_target
Ruijing Dong [Fri, 2 Dec 2022 21:02:12 +0000 (16:02 -0500)]
frontends/omx: initialize film_grain_target

set film_grain_target to NULL, and not using it
in omx path.

CC: 22.3
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20139>
(cherry picked from commit 7f71f732ea76e0376e58069200d19beb74b2cb62)