Commit Graph

158013 Commits

Author SHA1 Message Date
Marek Olšák
dde0dab8b5 radeonsi/gfx11: fix compute scratch buffer - WAVES is always per SE
Fixes: ba02ed91a6 - ac/gfx11: fix the scratch buffer

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19477>
(cherry picked from commit bdfacd0a24e023515fb7b7fae4a279cff0fbac4e)
2022-11-08 15:11:32 -08:00
Alex Brachet
9005854510 nir: Fix qsort comparator function
`pred` is a pointer, for sufficiently large numbers these
being cast to int were both > 0 regardless of the order
of `data1` and `data2`.

Fixes: 523a28d3fe ("nir: add an instruction set API")

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19539>
(cherry picked from commit c987a727a76eda1feada07e2eca6a5597dbddd93)
2022-11-08 13:02:06 -08:00
Samuel Pitoiset
0971b56a90 radv: invalidate L2 instead of only writeback L2 when using DCC stores
It seems INV_L2 is the right thing to do, especially for RDNA2 chips
with non-coherent RBs (NAVI22 is one of these). This fixes DCC
corruption.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6476
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7507
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19516>
(cherry picked from commit 06adf6ad117e92a832c5073326bd83b638b3ca37)
2022-11-08 13:02:05 -08:00
Iago Toral Quiroga
9855c364a1 v3dv: do better cleanup on failure during pipeline cache operation
Fixes (with disk cache enabled):
dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.basic
dEQP-VK.api.object_management.alloc_callback_fail.device
dEQP-VK.api.object_management.alloc_callback_fail.device_group

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19458>
(cherry picked from commit 5e97150e21a75920c3521717f70f9f92702729b4)
2022-11-08 13:00:41 -08:00
Iago Toral Quiroga
7d5c727f57 v3dv: handle allocation failure during pipeline initialization
Fixes (with disk cache disabled):
dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.basic
dEQP-VK.api.object_management.alloc_callback_fail.device
dEQP-VK.api.object_management.alloc_callback_fail.device_group

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19458>
(cherry picked from commit 1f5966397aa208eb574394a4d0a592b66b776b44)
2022-11-08 13:00:40 -08:00
Iago Toral Quiroga
7f7586f87f v3dv: do a better job at cleaning up the device on init failure
These leaks on device creation failure have been there before, but
were only exposed as CTS failures after the recent event refactoring.

Partially fixes:
dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.basic
dEQP-VK.api.object_management.alloc_callback_fail.device
dEQP-VK.api.object_management.alloc_callback_fail.device_group

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19458>
(cherry picked from commit b78fd50e90c700466213e4b3b40ce10547b1e14e)
2022-11-08 13:00:39 -08:00
Dylan Baker
6c2e919156 .pick_status.json: Update to def56b531c86f529bc32d1834ccb479457717db7 2022-11-08 12:58:54 -08:00
Bas Nieuwenhuizen
79c1906231 radv: Do not try to run on GFX11 with mesa 22.2.
It isn't going to work.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19577>
2022-11-08 14:59:33 +00:00
Eric Engestrom
b2e9eaf7e7 vk/runtime: drop incorrect UNUSED annotation
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19458>
(cherry picked from commit c6c5949ff70a47c47795fe9161a7514173b5be24)
2022-11-07 10:39:29 -08:00
Bas Nieuwenhuizen
117ac5ca01 radv: Make the compute scratch waves per SE as well.
Fixes: 278e533ec9 ("radv: update scratch buffer registers on GFX11")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19488>
(cherry picked from commit d876ddc920f1aaf48219f2060de6cc99c003bc5d)
2022-11-07 10:32:50 -08:00
Bas Nieuwenhuizen
7ade4ab5d5 radv: Fix compute scratch buffer emission.
Copied wrong from radeonsi. The registers following the scratch
buffer address are the shader rsrc1/rsrc2. Not the user SGPR0
containing the ring resource word 1.

Fixes: 278e533ec9 ("radv: update scratch buffer registers on GFX11")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19488>
(cherry picked from commit b8865ad04643cd7e8faa8a863d81fedbc1e29231)
2022-11-07 10:32:49 -08:00
Karol Herbst
842759cf77 iris: invalidate sysvals if grid dimension changes
Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18581>
(cherry picked from commit 9ccdd86b9040b265893712f4125d30552e0fe1cd)
2022-11-07 10:32:48 -08:00
Alyssa Rosenzweig
9a92cd91c2 panfrost: Replace resource shadowing flush
The entire point of resource shadowing is to avoid unnecessary flushing.
Flushing readers after shadowing is counterproductive. A refresher on
how resource shadowing is supposed to work:

First, we determine if it's beneficial to shadow resources. If so, we
create a new backing buffer object. We flush the current writer of the
resource, if there is one, so the current contents become known to the
CPU. If we are not discarding the original resource, we then copy the
existing contents of the buffer to the new shadow buffer on the CPU.
Finally, we swap the resource's backing buffer for our shadow. Any batch
that reads the resource will continue to read the old copy of the
resource, and any future draw calls will see the new copy with the
change implemented.

Where did we go wrong?

In 988d5aae74 ("panfrost: Flush resources when shadowing"), we started
flushing all readers. We didn't actually need to flush, we just needed
to avoid dangling references on the batches reading the old copy of the
resource. But that's easily enough avoided: just remove the references.
The batches still hold a reference to the underlying BO, which will be
freed at the right time regardless.

Originally motivated by glmark2 -bbuffer:update-method=subdata, which
has some pathological access paterns.

Firefox is a lot faster anecdotally (now scrolling at 60fps in firefox).

But what actually motivated this is an apitrace from Duckstation's GLES
renderer. With this patch, the in-game portion is improved 3fps to 21fps.

Closes: #4028
Fixes: 988d5aae74 ("panfrost: Flush resources when shadowing")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19361>
(cherry picked from commit 2d8f28df731638e1270b0ae273c7bfd2b29b7993)
2022-11-07 10:32:48 -08:00
Alyssa Rosenzweig
7dee5d7dec panfrost: Don't copy resources if replaced
If a synchronized transfer_map is going to overwrite an entire resource,
there's no need to memcpy in the original contents ahead-of-time. This
memcpy is particularly bad for large buffers where it's copying WC->WC,
although that could be mitigated with threaded_context's cpu_storage in
the future if needed.

Prevents a performance regression in glmark2's buffer scenes from the
next patch, hence the Cc.

Cc: mesa-stable
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19361>
(cherry picked from commit 0b26a9f773956fc00a77b0d4a7aafee5795ce935)
2022-11-07 10:32:47 -08:00
Dylan Baker
6bba416efa .pick_status.json: Update to fd8ec189e575d5220d8b4c30647fa6de57928e07 2022-11-07 10:32:30 -08:00
Dylan Baker
ce33e68fe0 docs: Add sha256 sum for 22.2.3 2022-11-07 10:16:36 -08:00
Dylan Baker
57acd29429
VERSION: update to 22.2.3 2022-11-07 10:01:13 -08:00
Dylan Baker
7c2e62b9b8 docs: add release notes for 22.2.3 2022-11-07 10:01:13 -08:00
Alyssa Rosenzweig
f1f856c2fd panfrost: Lower MAX_BLOCK_SIZE on Midgard
To match PIPE_COMPUTE_CAP_MAX_THREADS_PER_BLOCK, having it be higher in any
dimension is nonsensical and can confuse apps. Fixes tests in
KHR-GLES31.core.texture_buffer.* on Mali-T860.

Fixes: 9b19104a30b ("pan/mdg: Lower PIPE_COMPUTE_CAP_MAX_THREADS_PER_BLOCK on Midgard")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19238>
(cherry picked from commit 027ee6c9e9c20033d0afb3c65684573f286072c7)
2022-11-04 15:49:56 -07:00
Alyssa Rosenzweig
0add4f1f1a panfrost: Use compute-based XFB on Midgard
Now we're back to a single XFB implementation for all gens. Fixes:

   KHR-GLES31.core.draw_indirect.advanced-twoPasses-transformFeedback-arrays
   KHR-GLES31.core.draw_indirect.advanced-twoPasses-transformFeedback-elements

Cc: mesa-stable
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19238>
(cherry picked from commit 0955fe8fe20d2ffb416394be80a12897d7a6d61c)
2022-11-04 14:50:05 -07:00
Alyssa Rosenzweig
ca852a09af pan/mdg: Fix 64-bit address arithmetic
Cc: mesa-stable
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19238>
(cherry picked from commit 9e2ce225e682eb7880c70733dcdd51054ad7529b)
2022-11-03 11:02:01 -07:00
Pavel Ondračka
6a2d462191 r300: fix generation of invalid swizzles in regalloc
rc_adjust_channels is inteded for moving the swizzles to a new channels
when rewriting the writemask of an instruction. However for readers one
needs to keep the swizzles in the old channels but rather convert to the
new values, so use the proper helper rc_rewrite_swizzle.

With the new swizzle fixed, we should properly detect that it would be
invalid and thus we can select the proper register class to prevent the
writemask rewrite in the regalloc.

Documentation was added to rc_adjust_channels to make it more clear what
it actually does.

Fixes a bunch of dEQP tests.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7521
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19158>
(cherry picked from commit 1e9e5618110542550b9f92dca8392f213bfd46b7)

Conflicts:
	src/gallium/drivers/r300/ci/r300-r480-fails.txt
2022-11-02 12:56:02 -07:00
Dylan Baker
ddd9bba400 .pick_status.json: Mark 1a06dbcaed9ed4095ec8878d947935f0f7558cfd as denominated 2022-11-02 12:56:01 -07:00
Rob Clark
0284e61c58 freedreno/a6xx: Fix occlusion queries
WFI is not a strong enough barrier, which shows up in piglit qbo tests
which do a single draw.

Fixes: 13fc03f4c0 ("freedreno/a6xx: Avoid stalling for occlusion queries")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19400>
(cherry picked from commit 5c5e4238ff8f9dfb92b13071582af13c985483ef)
2022-11-02 12:56:01 -07:00
Erik Faye-Lund
e0d84e84f7 zink: do not read is_generated unless in tcs shader
It's undefined behavior in C to read a union member if another member
has been written to more recently. Let's be more careful here!

Fixes: a9d2b86c2c ("zink: store the spirv_shader to the zink_shader struct for generated tcs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19457>
(cherry picked from commit 090a111c5dcd2c6764e7b990a55f3bddca771499)
2022-11-02 12:56:01 -07:00
Rhys Perry
46f2002521 radv/llvm: fix GS shaders on GFX8/9
6698753cdb switched our GS output stores to use MUBUF.

The stride doesn't matter for the ESGS descriptor (because idxen=false and
the index stride is 64), but this fixes it anyway.

This also changes ACO to use MUBUF store too, since MTBUF doesn't seem to
work correctly with an invalid data format in the descriptor.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: 6698753cdb ("ac/llvm: don't use tbuffer_store as a fallback for swizzled stores")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18885>
(cherry picked from commit a71d068fd07f5d34561b28f2f57267031077033a)
2022-11-02 12:56:01 -07:00
Joan Bruguera
df8d107ab0 nv50/ir/nir: ignore sampler for TXF/TXQ ops.
Recently, a regression was reported where videos in Firefox had shifted/
glitched colors on certain Kepler hardware. This was bisected to
bf02bffe15, however, the issue already
existed but didn't hit users until TGSI was switched to NIR as default.

The issue was traced to a YUV-to-RGB fragment shader used by Firefox,
which uses three samplers for the Y/U/V components. The Y component was
handled correctly, but the U/V components were bogus, causing the issue.

After analysis, it appears the TXF/TXQ ops. should only handle the texture
(r) but not the sampler (s), see 63b850403c
and 346ce0b988.
Similarly, handleTXQ/handleTXF on nv50_ir_from_tgsi always sets s=0.
Only Kepler was affected because other hardware ignores s at codegen.

Always set s=0 on NIR for TXF/TXQ, to keep TGSI behavior and fix the
regression.

Thanks: Karol Herbst and M Henning for help diagnosing the issue.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7416
Cc: mesa-stable
Suggested-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19453>
(cherry picked from commit 6014a642ae24e37c287adbf41d615efa18d0da3d)
2022-11-02 12:56:01 -07:00
Pierre-Eric Pelloux-Prayer
7e7d1bd6ee radeonsi: update db_eqaa even if msaa is disabled
This seems to fix rendering in application toggling MSAA on and
off between draw calls.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7537
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19326>
(cherry picked from commit 4147add280e408c68d7910c6cadd860cf92bf5f3)
2022-11-02 12:56:01 -07:00
Marcin Ślusarz
a2aa3198e0 anv: program 3DSTATE_MESH_DISTRIB with the recommended values
It improves performance of vk_meshlet_cadscene on A770.

Fixes: f083df8710 ("anv: update task/mesh distribution with the recommended values")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19412>
(cherry picked from commit dcaaeb56ef2951282225cc598fcd8781ed09f796)
2022-11-02 12:56:01 -07:00
Marcin Ślusarz
79b70f3978 anv: set 3DSTATE_[MESH|TASK]_CONTROL.MaximumNumberofThreadGroups
Documentation is worded in a confusing way, which may be understood that
we don't have to set this field to get good results.

MESH part of this commit improves performance of vk_meshlet_cadscene
by a factor of 2 on A380.

Fixes: ef04caea9b ("anv: Implement Mesh Shading pipeline")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19412>
(cherry picked from commit d1d2dee9708b5a3624696460d27969bc03940395)
2022-11-02 12:56:01 -07:00
Danylo Piliaiev
2a7c308d5d freedreno/fdl: Increase alignment for UBWC images
From empirical tests (on a660) R8G8 with UBWC enabled requires 256b
alignment, otherwise there would be a GPU fault during blits.

Set alignment to 4096 for all UBWC images since that's what blob does
and this area is heavily undertested.

Fixes GPU fault in Borderlands 3 running through DXVK.

cc: mesa-stable

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19298>
(cherry picked from commit 5eaca461a774f6f8466402b5facfc426cee9f1fd)
2022-11-02 12:56:01 -07:00
Nanley Chery
ca30a3df24 iris: Enable INTEL_MEASURE for compute dispatches on XeHP
Cc: mesa-stable
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19324>
(cherry picked from commit 48844910a3ac395c44b2732c1ebaa98d03245a2d)
2022-11-02 12:56:01 -07:00
Lionel Landwerlin
e3a5a7683d intel/compiler: don't allocate compaction arrays on the stack
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7569
Cc: mesa-stable
Reviewed-by: Luis Felipe Strano Moraes <luis.strano@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19339>
(cherry picked from commit 920aed2121162adfecf205cdc0134c99e0bd4277)
2022-11-02 12:56:01 -07:00
Matt Turner
633ebd0c22 intel/dev: Set display_ver = 13 on all ADL/RPL/DG2
display_ver doesn't seem to be used anywhere, but if that were to
change, we'd want this to be consistent.

Fixes: c746bf4c5c ("intel/dev: Add display_ver and set adl-p to 13")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19354>
(cherry picked from commit 3ef88cd0a2de26e56def43db969f98c80235f065)
2022-11-02 12:56:01 -07:00
Iago Toral Quiroga
511013d313 v3dv: drop layout refs for all allocated sets from a pool on destroy / reset
In 7f6ecb8667 we added reference counting for descriptor set layouts,
however, we didn't realize that pools created without the flag
VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT don't free individual
descriptors and can only be reset or destroyed. Since we only drop
references when individual descriptor sets were destroyed, we would
leak set layouts referenced from descriptor sets allocated from these
pools.

Fix that by keeping a list of all allocated descriptor sets (no matter
whether VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT is present or
not) and then traversing the list dropping the references on pool resets
and destroys.

Fixes: 7f6ecb8667 ('v3dv: add reference counting for descriptor set layouts')
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19337>
(cherry picked from commit 07c7d846e5fa6867ce20dd959b4609fd1a0f1646)
2022-11-02 12:56:01 -07:00
Lionel Landwerlin
81c02465a4 nir/divergence_analysis: add missing desc_set_address_intel
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19320>
(cherry picked from commit 117b32a5944890a535700937f1ebf4840ea3c0db)
2022-11-02 12:56:00 -07:00
Dylan Baker
2d2de06121 .pick_status.json: Update to 4087374deb53b79d6ac23c6ae87aadf9595d8d00 2022-11-02 12:56:00 -07:00
Lucas Stach
19b5417727 etnaviv: properly reference flush_resources
The flush_resources recorded in the context need to stay alive until
the context is flushed, at which point additional resolve operations
are done to those resources. While the backing BO is alive due to being
referenced in the cmdstream, the resource might already be destroyed
at this point.

Keep a reference to the resource to make sure it is still available at
context flush time.

Fixes: 7b9d8d1936 ("etnaviv: flush used render buffers on context flush when neccessary")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19280>
(cherry picked from commit 16e0702ec7103c06f2f33654b6e41498e2eabf8e)
2022-11-02 12:56:00 -07:00
Gert Wollny
8cf878c4d0 r600/sfn: evaluate LDS location for color and clip-vertex too
This is required to support compatibility contexts

Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6926

Fixes: 3340c7ce35
   r600/sfn: lower CLIPVERTEX to clip planes

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19300>
(cherry picked from commit 1fe408e82fce04d8e2c86d5fd7321a4ca6afc8a8)
2022-11-02 12:56:00 -07:00
Gert Wollny
564410045d r600: Account for color and clipvertex when evaluating LDS space
Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6926

Fixes: 3340c7ce35
   r600/sfn: lower CLIPVERTEX to clip planes

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19300>
(cherry picked from commit 7b4bf219cc9dfa6320366e03d6055cdcbf5add5e)
2022-11-02 12:56:00 -07:00
Dylan Baker
a784fe2937 .pick_status.json: Update to 16e0702ec7103c06f2f33654b6e41498e2eabf8e 2022-10-26 10:22:54 -07:00
Ruijing Dong
29bb4b3211 frontends/va: fix av1 decoding image distortion issue
problem:
when not using qmatrix, the qm_y, qm_u and qm_v value is set to 0,
which signals av1 decoder to use qmatix and causes confussion.

solution:
when not using qmatrix, set these values to 0xf.

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

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19174>
2022-10-25 18:11:34 +00:00
Fabian Vogt
b6c47ce365 gallivm: Fix LLVM optimization with the new pass manager
The previous list of passes contained several errors: "constprop" does not
exist anymore and a trailing ',' is not allowed. This made LLVMRunPasses
fail, but the error is silently ignored. Thus none of the listed passes
ran at all.

https://reviews.llvm.org/D85159 suggests "InstSimplify really should be
used anywhere ConstProp is being used" so replace constprop with
instsimplify and remove the trailing comma.

By enabling pass logging with
LLVMPassBuilderOptionsSetDebugLogging(opts, true),
the difference is visible. Before:

Running pass: AlwaysInlinerPass on [module]
Running analysis: InnerAnalysisManagerProxy<llvm::FunctionAnalysisManager, llvm::Module> on [module]
Running analysis: ProfileSummaryAnalysis on [module]
Running pass: CoroConditionalWrapper on [module]
Running pass: AnnotationRemarksPass on fs_variant_partial (1162 instructions)
Running analysis: TargetLibraryAnalysis on fs_variant_partial
Running pass: AnnotationRemarksPass on fs_variant_whole (1110 instructions)
Running analysis: TargetLibraryAnalysis on fs_variant_whole

After:

Running pass: AlwaysInlinerPass on [module]
Running analysis: InnerAnalysisManagerProxy<llvm::FunctionAnalysisManager, llvm::Module> on [module]
Running analysis: ProfileSummaryAnalysis on [module]
Running pass: CoroConditionalWrapper on [module]
Running pass: AnnotationRemarksPass on fs_variant_partial (1162 instructions)
Running analysis: TargetLibraryAnalysis on fs_variant_partial
Running pass: AnnotationRemarksPass on fs_variant_whole (1110 instructions)
Running analysis: TargetLibraryAnalysis on fs_variant_whole
Running analysis: InnerAnalysisManagerProxy<llvm::FunctionAnalysisManager, llvm::Module> on [module]
Running pass: SROAPass on fs_variant_partial (1162 instructions)
Running analysis: DominatorTreeAnalysis on fs_variant_partial
Running analysis: AssumptionAnalysis on fs_variant_partial
Running analysis: TargetIRAnalysis on fs_variant_partial
Running pass: EarlyCSEPass on fs_variant_partial (1111 instructions)
Running analysis: TargetLibraryAnalysis on fs_variant_partial
Running pass: SimplifyCFGPass on fs_variant_partial (961 instructions)
Running pass: ReassociatePass on fs_variant_partial (961 instructions)
Running pass: PromotePass on fs_variant_partial (897 instructions)
Running pass: InstCombinePass on fs_variant_partial (897 instructions)
Running analysis: OptimizationRemarkEmitterAnalysis on fs_variant_partial
Running analysis: AAManager on fs_variant_partial
Running analysis: BasicAA on fs_variant_partial
Running analysis: ScopedNoAliasAA on fs_variant_partial
Running analysis: TypeBasedAA on fs_variant_partial
Running analysis: OuterAnalysisManagerProxy<llvm::ModuleAnalysisManager, llvm::Function> on fs_variant_partial
Running pass: SROAPass on fs_variant_whole (1110 instructions)
Running analysis: DominatorTreeAnalysis on fs_variant_whole
Running analysis: AssumptionAnalysis on fs_variant_whole
Running analysis: TargetIRAnalysis on fs_variant_whole
Running pass: EarlyCSEPass on fs_variant_whole (1059 instructions)
Running analysis: TargetLibraryAnalysis on fs_variant_whole
Running pass: SimplifyCFGPass on fs_variant_whole (912 instructions)
Running pass: ReassociatePass on fs_variant_whole (912 instructions)
Running pass: PromotePass on fs_variant_whole (844 instructions)
Running pass: InstCombinePass on fs_variant_whole (844 instructions)
Running analysis: OptimizationRemarkEmitterAnalysis on fs_variant_whole
Running analysis: AAManager on fs_variant_whole
Running analysis: BasicAA on fs_variant_whole
Running analysis: ScopedNoAliasAA on fs_variant_whole
Running analysis: TypeBasedAA on fs_variant_whole
Running analysis: OuterAnalysisManagerProxy<llvm::ModuleAnalysisManager, llvm::Function> on fs_variant_whole

Fixes: 2037c34f24 ("gallivm: move to new pass manager to handle coroutines change.")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19217>
(cherry picked from commit 28f4fcaa4f213314a72b8907464852e6fb7a6c2f)
2022-10-25 09:49:23 -07:00
Mike Blumenkrantz
9bda61ae91 zink: don't flag ubo0 as used in shaders with indirect ubo access
ubo0 is not a regular ubo, so avoid setting the hint here

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19281>
(cherry picked from commit 71ee1dd597e7a5ca6c7847e1110cfc49a4974201)
2022-10-25 09:49:23 -07:00
Pavel Ondračka
677721202e r300: respect buffer offset in r300_set_constant_buffer
Fixes constants upload with nine.
Thanks to Marek Olšák for pointing this out.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7481
Cc: mesa-stable
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19277>
(cherry picked from commit 8a0c1dcbd6c484dcf36ab3f35e33c95a69c0c2af)
2022-10-25 09:25:48 -07:00
Georg Lehmann
80f296268e aco: Don't use opsel for p_insert.
This doesn't make sense, opsel preserves the not selected half of the register,
p_insert zeros it.

No Foz-DB changes.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>

Fixes: 54292e99c7 ("aco: optimize 32-bit extracts and inserts using SDWA")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19253>
(cherry picked from commit 616d3908dc179c7319380111fd1cd5b047caeb75)
2022-10-25 09:25:46 -07:00
Rhys Perry
2572a61af1 aco: swap v_perm_b32 operands
I misread the ISA doc and got the order wrong.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: dae1629778 ("aco: disable sdwa on gfx11")
Fixes: e68e6c75ca ("aco: use v_perm_b32 to copy 0xff00/0x00ff/0xff/0x00")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19223>
(cherry picked from commit f32dde29028a529c42431c387edade0886239aad)
2022-10-25 09:25:45 -07:00
Pierre-Eric Pelloux-Prayer
5a11a0f99c radeonsi: zero init using the correct components count
This fixes the replay of the trace attached to
https://gitlab.freedesktop.org/mesa/mesa/-/issues/7530 which
would otherwise fail with an LLVM error:
  "All operands to PHI node must be the same type as the PHI node!"

Fixes: ae4379d81e ("ac/nir: export some undef as zero")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19189>
(cherry picked from commit 434e74e658786446033c981d9de5627a4fbcdd23)
2022-10-25 09:25:44 -07:00
Georg Lehmann
b2e3963fd9 nir: Fix ifind_msb_rev constant folding.
For example if src0 is 0x80000000 we should return 1, not 0.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>

Fixes: a5747f8ab3 ("nir: add opcodes for *find_msb_rev and lowering")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18951>
(cherry picked from commit 741dbadae09ef376c1b6176f195b73930d1294db)
2022-10-25 09:25:44 -07:00
Emma Anholt
8771aff787 nir/opt_phi_precision: Fix missing swizzles when narrowing phi srcs.
This NIR:

	vec4 32 ssa_169 = phi block_1: ssa_168, block_2: ssa_138
	vec1 16 ssa_209 = f2fmp ssa_169.x
	vec1 16 ssa_210 = f2fmp ssa_169.y
	vec1 16 ssa_211 = f2fmp ssa_169.z
	vec1 16 ssa_212 = f2fmp ssa_169.w
	vec4 16 ssa_213 = vec4 ssa_209, ssa_210, ssa_211, ssa_212
	intrinsic store_output (ssa_213, ssa_171) (base=0, wrmask=xyzw /*15*/, component=0, src_type=float16 /*144*/, io location=4 slots=1 mediump /*8388740*/, xfb() /*0*/, xfb2() /*0*/)

would turn into:

	vec4 32 ssa_169 = phi block_1: ssa_168, block_2: ssa_138
	vec4 16 ssa_216 = phi block_1: ssa_214, block_2: ssa_215
	vec1 16 ssa_209 = f2fmp ssa_169.x
	vec1 16 ssa_210 = f2fmp ssa_169.y
	vec1 16 ssa_211 = f2fmp ssa_169.z
	vec1 16 ssa_212 = f2fmp ssa_169.w
	vec4 16 ssa_213 = vec4 ssa_216.x, ssa_216.x, ssa_216.x, ssa_216.x
	intrinsic store_output (ssa_213, ssa_171) (base=0, wrmask=xyzw /*15*/, component=0, src_type=float16 /*144*/, io location=4 slots=1 mediump /*8388740*/, xfb() /*0*/, xfb2() /*0*/)

ignoring the swizzles from the f2fmp srcs.  Fixes failures in
dEQP-GLES2.functional.shaders.random.all_features.fragment.20 on
turnip+ANGLE.

Fixes: c7b935962b ("nir: Add pass to lower phi precision")
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19179>
(cherry picked from commit 22f7f167cdafe0facbab2ba2a89f5aadccc39dc5)
2022-10-25 09:25:41 -07:00