platform/upstream/mesa.git
17 months agoradv: Clean up variables in si_get_ia_multi_vgt_param
Turo Lamminen [Tue, 24 Jan 2023 12:25:21 +0000 (14:25 +0200)]
radv: Clean up variables in si_get_ia_multi_vgt_param

8% gain in drawcall throughput on i5-2500. This can significantly change
how compiler allocates registers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20877>

17 months agoradv: Change radeon_cmdbuf counters to uint64_t to make alias analysis optimize radeo...
Turo Lamminen [Tue, 24 Jan 2023 12:25:23 +0000 (14:25 +0200)]
radv: Change radeon_cmdbuf counters to uint64_t to make alias analysis optimize radeon_emit better

1% gain in drawcall throughput on i5-2500. Depends quite heavily on
compiler and CPU.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20877>

17 months agoci/debian/x86_test-vk: drop an outdated dependency
Martin Roukala (né Peres) [Fri, 27 Jan 2023 12:29:32 +0000 (14:29 +0200)]
ci/debian/x86_test-vk: drop an outdated dependency

This was used by the tracing jobs, which we are not running on Mesa
anymore.

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20956>

17 months agotrace: Don't use italic escape code.
Jose Fonseca [Tue, 15 Nov 2022 10:18:47 +0000 (10:18 +0000)]
trace: Don't use italic escape code.

It's not widely supported, and often emulated with invert highlight,
which is very distracting.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20934>

17 months agollvmpipe: Honor zero sample_mask when multisample is disabled.
Jose Fonseca [Wed, 25 Jan 2023 13:54:41 +0000 (13:54 +0000)]
llvmpipe: Honor zero sample_mask when multisample is disabled.

The JIT generated FS shader has logic to obey sample mask when:
multisample is enabled, or multisample is disabled but FS writes sample
mask and pipe_rasterizer_state::no_ms_sample_mask_out.

However it did not handle the case where multisample was disabled, FS
did not write sample_mask, and sample mask was zero.  Instead it relied
upon the setup to discard the primitives, but that went away with commit
da5840f3.

We could restore the discard on zero mask behavior, but we would again
blurring the semantics of rasterization discard.  Instead this change
adds logic to primitive setup to cull the primitives when sample mask is
zero.

Fixes: da5840f3 ("llvmpipe: Faithfully honour pipe_rasterizer_state::rasterizer_discard flag")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20934>

17 months agomeson: do not reconstruct ICD paths
Erik Faye-Lund [Wed, 25 Jan 2023 15:55:32 +0000 (16:55 +0100)]
meson: do not reconstruct ICD paths

Meson will already construct these paths for us, so let's reuse them
instead of throwing away the result and recontstructing them.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20907>

17 months agofreedreno/meson: simplify script-path logic
Erik Faye-Lund [Wed, 25 Jan 2023 15:31:04 +0000 (16:31 +0100)]
freedreno/meson: simplify script-path logic

When passing this to files(), there's no point in prepending
current_source_dir. Let's simplify this a bit.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20907>

17 months agomeson: use files() instead of joining paths
Erik Faye-Lund [Wed, 25 Jan 2023 15:10:38 +0000 (16:10 +0100)]
meson: use files() instead of joining paths

The Meson docs points out that it's better to use the files() function
when referring to files in the source tree than manually constructing
paths like this. Let's follow that advice, and get some neat cleanups.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20907>

17 months agomeson: avoid using deprecated build_root() method
Erik Faye-Lund [Wed, 25 Jan 2023 14:53:18 +0000 (15:53 +0100)]
meson: avoid using deprecated build_root() method

The meson.build_root() method has been deprecated, so let's switch to
meson.project_build_root(), which usually means the same thing. The case
where it doesn't do the same thing is if Mesa is a subproject to some
other project, but in that case I believe we want the build root of Mesa,
not of the parent project anyway.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20907>

17 months agopvr: small cleanups
Frank Binns [Wed, 18 Jan 2023 12:32:26 +0000 (12:32 +0000)]
pvr: small cleanups

- remove unused PVR_IDF_WDF_IN_REGISTER_CONST_COUNT define
- remove unneeded pvr_compute_ctx forward declaration
- add render context section header to match compute and transfer

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Matt Coster <matt.coster@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20931>

17 months agointel/compiler: fine-grained control of dispatch widths
Marcin Ślusarz [Sat, 21 Jan 2023 11:49:44 +0000 (12:49 +0100)]
intel/compiler: fine-grained control of dispatch widths

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> [v2]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20854>

17 months agomeson: remove deprecated dri-drivers option
Erik Faye-Lund [Wed, 25 Jan 2023 14:26:54 +0000 (15:26 +0100)]
meson: remove deprecated dri-drivers option

This was deprecated in cdde031ac2c ("classic/i965: Remove driver"),
which is almost two years ago, and many major releases ago. Nobody
should be using this any more. Let's remove it.

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20905>

17 months agomeson: remove deprecated osmesa-bits option
Erik Faye-Lund [Wed, 25 Jan 2023 14:16:30 +0000 (15:16 +0100)]
meson: remove deprecated osmesa-bits option

We've released several new major versions since this was deprecated in
202cab3d308 ("meson: deprecate specifying osmesa-bits"), so it's
probably about time to remove it.

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20905>

17 months agomeson: remove dupliace add_devenv call
Erik Faye-Lund [Wed, 25 Jan 2023 15:39:41 +0000 (16:39 +0100)]
meson: remove dupliace add_devenv call

Looks like a bad merge-conflict resolution.

Fixes: 7bed7d94756 ("meson: use sections in summary()")
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Thomas Andersen <phomes@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20908>

17 months agoegl/dri2: Use primary device in EGL device platform for kms_swrast
Lepton Wu [Mon, 9 Jan 2023 20:50:58 +0000 (12:50 -0800)]
egl/dri2: Use primary device in EGL device platform for kms_swrast

For KMS only devices, there is no render node available. Also remove
unused _eglGetDRMDeviceRenderNode function.

Signed-off-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20592>

17 months agoci: uprev virglrenderer
Corentin Noël [Thu, 26 Jan 2023 15:32:15 +0000 (16:32 +0100)]
ci: uprev virglrenderer

This change contains a memory unmap fix and makes the render server mandatory.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20938>

17 months agoegl: Rewrite eglGetMscRateANGLE to avoid probes and handle multi-monitor
Kenneth Graunke [Wed, 11 Jan 2023 23:37:22 +0000 (15:37 -0800)]
egl: Rewrite eglGetMscRateANGLE to avoid probes and handle multi-monitor

RRGetScreenInfo re-probes connector status, which may result in an EDID
transfer for every output, which according to Adam Jackson can be on the
order of 100ms for a single EDID block.  So our previous implementation
of this eglGetMscRateANGLE was blocking for excessive periods of time
instead of being a quick query of the refresh rate like users expect.

This changes our eglGetMscRateANGLE implementation from using
RRGetScreenInfo to RRGetScreenResourcesCurrent and RRGetCrtcInfo.
This obtains the same monitor info without re-probing connectors.

Fixes a severe performance regression in Chromium WebGL performance.

While we're re-implementing the extension, we also implement proper
multi-monitor support: if there are multiple active CRTCs, we determine
which contains the largest portion of the surface, as specified in the
EGL_ANGLE_sync_control_rate extension.

We also now report fractional refresh rates correctly rather than
rounding to the nearest Hz.

Fixes: 47526556494 ("egl/x11: implement ANGLE_sync_control_rate")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6996
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7038
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20665>

17 months agoloader: Add infrastructure for tracking active CRTC resources
Kenneth Graunke [Tue, 17 Jan 2023 23:48:20 +0000 (15:48 -0800)]
loader: Add infrastructure for tracking active CRTC resources

This provides a cached view of the current screen resources, with the
coordinates and refresh rate for every active CRTC.  It's currently only
implemented for X11/XCB.

Fixes: 47526556494 ("egl/x11: implement ANGLE_sync_control_rate")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20665>

17 months agozink: reorder commands more aggressively
Mike Blumenkrantz [Tue, 24 Jan 2023 20:52:58 +0000 (15:52 -0500)]
zink: reorder commands more aggressively

by starting resources in the unordered state in a given batch, they
gain more opportunities to be promoted to the barrier cmdbuf and avoid
breaking renderpasses

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20890>

17 months agoCI/windows: Apply CI_FDO_CONCURRENT to piglit too
Jesse Natalie [Thu, 26 Jan 2023 21:52:08 +0000 (13:52 -0800)]
CI/windows: Apply CI_FDO_CONCURRENT to piglit too

Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20924>

17 months agoCI/windows: Don't limit deqp-runner to 4 jobs
Jesse Natalie [Thu, 26 Jan 2023 01:08:26 +0000 (17:08 -0800)]
CI/windows: Don't limit deqp-runner to 4 jobs

If FDO_CI_CONCURRENT is set, use that, otherwise let deqp-runner
choose concurrency based on system CPU cores.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20924>

17 months agoac/llvm: remove llvm:: now that we use "using namespace llvm"
Marek Olšák [Tue, 13 Dec 2022 16:30:21 +0000 (11:30 -0500)]
ac/llvm: remove llvm:: now that we use "using namespace llvm"

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20297>

17 months agoac/llvm: run the IPSCCP pass
Marek Olšák [Tue, 13 Dec 2022 16:28:24 +0000 (11:28 -0500)]
ac/llvm: run the IPSCCP pass

AMDVLK runs it and it seems useful.

https://en.wikipedia.org/wiki/Sparse_conditional_constant_propagation

58380 shaders in 35438 tests
Totals:
SGPRS: 2709080 -> 2709224 (0.01 %)
VGPRS: 1592972 -> 1592808 (-0.01 %)
Spilled SGPRs: 2420 -> 2420 (0.00 %)
Spilled VGPRs: 1077 -> 1077 (0.00 %)
Private memory VGPRs: 253 -> 253 (0.00 %)
Scratch size: 1232 -> 1232 (0.00 %) dwords per thread
Code Size: 61382088 -> 61356504 (-0.04 %) bytes
Max Waves: 849293 -> 849308 (0.00 %)
Outputs: 127090 -> 127090 (0.00 %)
Patch Outputs: 579 -> 579 (0.00 %)

Totals from affected shaders:
SGPRS: 5400 -> 5544 (2.67 %)
VGPRS: 6200 -> 6036 (-2.65 %)
Spilled SGPRs: 0 -> 0 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Private memory VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 975824 -> 950240 (-2.62 %) bytes
Max Waves: 1214 -> 1229 (1.24 %)
Outputs: 232 -> 232 (0.00 %)
Patch Outputs: 0 -> 0 (0.00 %)

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20297>

17 months agoac/llvm: run the LLVM sinking pass because LLVM will stop running it
Marek Olšák [Tue, 13 Dec 2022 16:03:21 +0000 (11:03 -0500)]
ac/llvm: run the LLVM sinking pass because LLVM will stop running it

shader-db was run with the sinking pass disabled in LLVM.

58380 shaders in 35438 tests
Totals:
SGPRS: 2730768 -> 2730768 (0.00 %)
VGPRS: 1592932 -> 1592928 (-0.00 %)
Spilled SGPRs: 2687 -> 2687 (0.00 %)
Spilled VGPRs: 551 -> 551 (0.00 %)
Private memory VGPRs: 253 -> 253 (0.00 %)
Scratch size: 700 -> 700 (0.00 %) dwords per thread
Code Size: 61238872 -> 61238868 (-0.00 %) bytes
Max Waves: 849209 -> 849209 (0.00 %)
Outputs: 127090 -> 127090 (0.00 %)
Patch Outputs: 579 -> 579 (0.00 %)

Totals from affected shaders:
SGPRS: 440 -> 440 (0.00 %)
VGPRS: 396 -> 392 (-1.01 %)
Spilled SGPRs: 0 -> 0 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Private memory VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 49880 -> 49876 (-0.01 %) bytes
Max Waves: 105 -> 105 (0.00 %)
Outputs: 14 -> 14 (0.00 %)
Patch Outputs: 0 -> 0 (0.00 %)

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20297>

17 months agoanv: add a third memory type for LLC configuration
Brian Paul [Wed, 18 Jan 2023 16:01:15 +0000 (09:01 -0700)]
anv: add a third memory type for LLC configuration

Commit 582bf4d9 turned on write-combining for most (all?) memory
allocations.  This caused a fairly large performance drop in some of
our VMware tests (application traces, such as Windows Metro Paint).

This patch adds a third memory type configuration: DEVICE_LOCAL,
HOST_VISIBLE, HOST_COHERENT.  This is uncached.  Then, in
anv_AllocateMemory() we only use write-combining for this uncached
type.  This memory type is found in the Intel Windows Vulkan driver.
And according to
https://asawicki.info/news_1740_vulkan_memory_types_on_pc_and_how_to_use_them
uncached memory correlates to write-combined memory.

This fixes our performance regression (and actually produced the
fastest ever results for our test suite).

Signed-off-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20770>

17 months agofreedreno/drm: Synchronize handle close and lookup
Rob Clark [Thu, 26 Jan 2023 22:05:33 +0000 (14:05 -0800)]
freedreno/drm: Synchronize handle close and lookup

Handle lookup (for example PRIME_FD_TO_HANDLE) must be synchronized with
GEM_CLOSE, otherwise re-import can race with bo_del path, resulting in
the handle of the newly (re)imported BO getting closed.  Now that the
finalize step has been decoupled, fixing this is mostly just deleting
code.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20918>

17 months agofreedreno/drm: Split out bo->finalize()
Rob Clark [Thu, 26 Jan 2023 21:57:13 +0000 (13:57 -0800)]
freedreno/drm: Split out bo->finalize()

The complexity around batching up handle closing is simply to allow the
virtgpu to back up ccmd's to the host (because virtio/virtgpu is pretty
inefficient when it comes to lots of small msgs to the host, and it is
common that when we are deleting BOs, we delete a lot of them at the
same time.  But that will make the locking fix in the next commit
impossible (without nested locks).  So let's flip this around and do the
step that virtgpu wants to batch up first, before we get into closing
GEM handles, etc.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20918>

17 months agofreedreno/drm: Remove bo_del_or_recycle()
Rob Clark [Wed, 25 Jan 2023 22:30:31 +0000 (14:30 -0800)]
freedreno/drm: Remove bo_del_or_recycle()

In prep for the next patch, where locking is swapped around to cover the
whole bo_del() path, decouple handling of the recycle-to-BO-cache path.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20918>

17 months agofreedreno/drm: Detect zombie BOs
Rob Clark [Wed, 25 Jan 2023 19:57:28 +0000 (11:57 -0800)]
freedreno/drm: Detect zombie BOs

When importing from a GEM name or dmabuf fd, we can race with the final
unref of the same BO, in which case we can get a hit in the handle
table for an fd_bo that another thread is about to free().  Detect and
handle this case.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20918>

17 months agofreedreno/drm: Add some ref/unref debugging
Rob Clark [Wed, 25 Jan 2023 19:39:06 +0000 (11:39 -0800)]
freedreno/drm: Add some ref/unref debugging

Helpful to catch common refcnt issues, like resurrecting a zombie
object.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20918>

17 months agofreedreno: Don't sync timestamps while perfetto isn't running.
Emma Anholt [Wed, 25 Jan 2023 19:24:18 +0000 (11:24 -0800)]
freedreno: Don't sync timestamps while perfetto isn't running.

This may help with the regression in trace perf testing since enabling
perfetto on the test drivers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20916>

17 months agodzn: Report as a software device for non-Windows
Jesse Natalie [Thu, 26 Jan 2023 16:02:50 +0000 (08:02 -0800)]
dzn: Report as a software device for non-Windows

Fixes: 5f1b8b3e6c9 ("dzn: Use DXGI swapchains")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20939>

17 months agodzn: Don't recursively lock the physical device enum mutex
Jesse Natalie [Thu, 26 Jan 2023 16:01:58 +0000 (08:01 -0800)]
dzn: Don't recursively lock the physical device enum mutex

Fixes: cfa260cd274 ("dzn: Use common physical device list/enumeration helpers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20939>

17 months agodzn: Fix Windows WSI
Jesse Natalie [Thu, 26 Jan 2023 18:00:22 +0000 (10:00 -0800)]
dzn: Fix Windows WSI

This was a merge conflict from the Win32 WSI DXGI swapchain changes.
I missed moving a new line of code that was added when rearranging
things for using the common helpers.

Fixes: cfa260cd ("dzn: Use common physical device list/enumeration helpers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20944>

17 months agodocs: update calendar for 22.3.4
Eric Engestrom [Thu, 26 Jan 2023 17:37:59 +0000 (17:37 +0000)]
docs: update calendar for 22.3.4

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20942>

17 months agodocs/relnotes: add sha256sum for 22.3.4
Eric Engestrom [Thu, 26 Jan 2023 17:36:37 +0000 (17:36 +0000)]
docs/relnotes: add sha256sum for 22.3.4

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20942>

17 months agodocs: add release notes for 22.3.4
Eric Engestrom [Thu, 26 Jan 2023 17:07:48 +0000 (17:07 +0000)]
docs: add release notes for 22.3.4

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20942>

17 months agofreedreno/registers: Add RBBM_GPR0_CNTL for non-GMU operation
Konrad Dybcio [Wed, 25 Jan 2023 21:42:42 +0000 (22:42 +0100)]
freedreno/registers: Add RBBM_GPR0_CNTL for non-GMU operation

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20925>

17 months agofreedreno/a6xx: Add a few kernel regs/etc
Rob Clark [Wed, 18 Jan 2023 21:53:45 +0000 (13:53 -0800)]
freedreno/a6xx: Add a few kernel regs/etc

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20925>

17 months agovirgl: remove unused virgl_encoder_inline_write
Gert Wollny [Mon, 12 Sep 2022 08:18:44 +0000 (10:18 +0200)]
virgl: remove unused virgl_encoder_inline_write

The only user was removed with

be8eeb3b59abf18d6b706016c5fa05b746d88f65
  virgl: remove unused virgl_transfer_inline_write

so drop this code too.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18543>

17 months agoir3, isaspec: add raw instruction to assembler/disassembler.
Amber [Thu, 19 Jan 2023 12:59:09 +0000 (13:59 +0100)]
ir3, isaspec: add raw instruction to assembler/disassembler.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20789>

17 months agofrontends/va: revert commit 0b02db30
Ruijing Dong [Tue, 24 Jan 2023 16:25:47 +0000 (11:25 -0500)]
frontends/va: revert commit 0b02db30

revert commit 0b02db30 as it is not a
proper way to fix av1 decoding 10bit issue.

this is corresponding to the fix in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20870

Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20911>

17 months agokopper: Do not free the given screen in initScreen implementation
Corentin Noël [Thu, 26 Jan 2023 12:25:57 +0000 (13:25 +0100)]
kopper: Do not free the given screen in initScreen implementation

The given screen is already freed by the caller in case a NULL-pointer is
returned by the implementation.

Cc: mesa-stable
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20933>

17 months agoutil/tests/cache_test: Skip Cache.List if not supported
Juston Li [Mon, 23 Jan 2023 22:24:57 +0000 (14:24 -0800)]
util/tests/cache_test: Skip Cache.List if not supported

FOZ_DB_UTIL_DYNAMIC_LIST depends on inotify support

Fixes: 3b69b67545b ("util/fossilize_db: add runtime RO foz db loading via FOZ_DBS_DYNAMIC_LIST")

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20865>

17 months agoutil/fossilize_db: add ifdef for inotify header
Juston Li [Mon, 23 Jan 2023 20:45:56 +0000 (12:45 -0800)]
util/fossilize_db: add ifdef for inotify header

FOZ_DB_UTIL_DYNAMIC_LIST is defined if the inotify header was
detected.

Fixes: 3b69b67545b ("util/fossilize_db: add runtime RO foz db loading via FOZ_DBS_DYNAMIC_LIST")

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20865>

17 months agonir: Add algebraic optimization for VKD3D-Proton fp32->fp16 conversion.
Timur Kristóf [Sat, 9 Apr 2022 20:28:28 +0000 (22:28 +0200)]
nir: Add algebraic optimization for VKD3D-Proton fp32->fp16 conversion.

VKD3D-Proton DXBC f32 to f16 conversion implements a float conversion using PackHalf2x16.
Because the spec does not specify a rounding mode, it emits a sequence to ensure
D3D-like behaviour for infinity.

When we know the current backend has pack_half_2x16_rtz_split,
we can eliminate the extra sequence.

Fossil DB stats on GFX11:
Totals from 835 (0.62% of 134913) affected shaders:
VGPRs: 49368 -> 49224 (-0.29%)
CodeSize: 5341956 -> 5124564 (-4.07%)
Instrs: 1024062 -> 987041 (-3.62%)
Latency: 6530956 -> 6465120 (-1.01%); split: -1.01%, +0.00%
InvThroughput: 908189 -> 870253 (-4.18%)
VClause: 18704 -> 18702 (-0.01%); split: -0.02%, +0.01%
SClause: 33406 -> 33284 (-0.37%); split: -0.38%, +0.01%
Copies: 67440 -> 65992 (-2.15%); split: -2.15%, +0.00%
Branches: 18498 -> 18465 (-0.18%)
PreSGPRs: 38409 -> 38331 (-0.20%)
PreVGPRs: 44089 -> 43834 (-0.58%)

Note, some fossils are from before this pattern was added to VKD3D-Proton,
so the above may not reflect real-world impact.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15838>

17 months agonir: Lower pack_half_2x16_split to RTZ if available.
Timur Kristóf [Tue, 24 Jan 2023 18:15:07 +0000 (19:15 +0100)]
nir: Lower pack_half_2x16_split to RTZ if available.

Constant folding always uses RTNE for pack_half_2x16_split, but some
backends implement it with RTZ.

Lowering to RTZ when available ensures that the behaviour will be
consistent between constant folding and the backend.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15838>

17 months agoradv, aco, ac: Implement pack_half_2x16_rtz_split.
Timur Kristóf [Tue, 24 Jan 2023 18:14:47 +0000 (19:14 +0100)]
radv, aco, ac: Implement pack_half_2x16_rtz_split.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15838>

17 months agonir: Add pack_half_2x16_rtz_split opcode.
Timur Kristóf [Tue, 24 Jan 2023 17:53:52 +0000 (18:53 +0100)]
nir: Add pack_half_2x16_rtz_split opcode.

Same as pack_half_2x16_rtz_split, but always uses RTZ mode.
Note that pack_half_2x16 rounding mode is unspecified.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15838>

17 months agointel/fs: drop FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD_GFX7
Lionel Landwerlin [Wed, 21 Dec 2022 18:16:27 +0000 (20:16 +0200)]
intel/fs: drop FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD_GFX7

We can lower FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD into other more
generic sends and drop this internal opcode.

The idea behind this change is to allow bindless surfaces to be used
for UBO pulls and why it's interesting to be able to reuse
setup_surface_descriptors(). But that will come in a later change.

No shader-db changes on TGL & DG2.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20416>

17 months agolima/ci: Add more piglit unsupported tests to skip
Erico Nunes [Wed, 11 Jan 2023 12:50:48 +0000 (13:50 +0100)]
lima/ci: Add more piglit unsupported tests to skip

It is not an exhaustive list but it helps by reducing the bulk of
"Failed to create waffle_context for OpenGL [34].x" errors in the logs
by thousands of occurrences and those are probably not going to be
needed.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20909>

17 months agollvmpipe: Ensure floating point SSE state is reset regardless of the write mask.
Jose Fonseca [Mon, 16 Jan 2023 14:20:04 +0000 (14:20 +0000)]
llvmpipe: Ensure floating point SSE state is reset regardless of the write mask.

The code emitted by lp_build_fpstate_set to reset the FP state could be
jumped over when the write mask was zero, leading to denormals not being
flushed to zero.

Spotted by Roland Scheidegger.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20901>

17 months agoradv: fix ignoring graphics shader stages that don't need to be imported
Samuel Pitoiset [Wed, 25 Jan 2023 08:30:48 +0000 (09:30 +0100)]
radv: fix ignoring graphics shader stages that don't need to be imported

If a shader stage is already imported from a library it should be
properly ignored.

Fixes recent CTS dEQP-VK.pipeline.fast_linked_library.misc.unused_shader_stages*.

Fixes: c8765c5244a ("radv: ignore shader stages that don't need to be imported with GPL")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20899>

17 months agoradv: fix creating libraries with PS epilog and all CB states as dynamic
Samuel Pitoiset [Tue, 24 Jan 2023 17:04:13 +0000 (18:04 +0100)]
radv: fix creating libraries with PS epilog and all CB states as dynamic

It's legal to create a library with FRAGMENT_OUTPUT_INTERFACE and with
all CB states as dynamic, in this case the PS epilog should be dynamic.

This fixes a bunch of regressions while running Zink/RADV CTS with
RADV_PERFTEST=gpl.

Zink is the final boss.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20882>

17 months agov3dv: add a cl_advance_and_end helper
Iago Toral Quiroga [Mon, 23 Jan 2023 09:57:40 +0000 (10:57 +0100)]
v3dv: add a cl_advance_and_end helper

For the common case where we're emitting packet we don't need to
update the cl_out pointer and then store the result in cl->next,
we can directly update cl->next.

This shows a small improvement in vkoverhead's scores for basic
draw tests.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20897>

17 months agodzn: Support Vulkan 1.2
Jesse Natalie [Wed, 25 Jan 2023 20:24:56 +0000 (12:24 -0800)]
dzn: Support Vulkan 1.2

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20919>

17 months agodzn: Ensure we don't mix DSV+simultaneous-access
Jesse Natalie [Wed, 25 Jan 2023 22:56:22 +0000 (14:56 -0800)]
dzn: Ensure we don't mix DSV+simultaneous-access

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20919>

17 months agodzn: Enhanced barriers fixes/workarounds
Jesse Natalie [Wed, 25 Jan 2023 21:16:47 +0000 (13:16 -0800)]
dzn: Enhanced barriers fixes/workarounds

Fix: Acquire/release should have one valid access/sync and one set
to none.

Workaround: D3D doesn't like simultaneous access resources leaving
COMMON layout, nor does it like setting UAV/RTV access bits for the
COMMON layout.
Use UNDEFINED -> UNDEFINED layout transitions, where the access bits
just aren't validated.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20919>

17 months agodzn: Always do clears with copies on non-graphics queues
Jesse Natalie [Wed, 25 Jan 2023 20:24:45 +0000 (12:24 -0800)]
dzn: Always do clears with copies on non-graphics queues

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20919>

17 months agodzn: Support float control
Jesse Natalie [Wed, 25 Jan 2023 20:20:01 +0000 (12:20 -0800)]
dzn: Support float control

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20919>

17 months agodzn: Cache GPUVA for buffers
Jesse Natalie [Wed, 25 Jan 2023 17:03:52 +0000 (09:03 -0800)]
dzn: Cache GPUVA for buffers

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20919>

17 months agodzn: Handle separate stencil usage
Jesse Natalie [Wed, 25 Jan 2023 17:02:35 +0000 (09:02 -0800)]
dzn: Handle separate stencil usage

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20919>

17 months agodzn: Fix dynamic rendering clear load op for non-multiview
Jesse Natalie [Wed, 25 Jan 2023 16:48:18 +0000 (08:48 -0800)]
dzn: Fix dynamic rendering clear load op for non-multiview

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20919>

17 months agomicrosoft/compiler: Support float controls
Jesse Natalie [Wed, 25 Jan 2023 20:18:01 +0000 (12:18 -0800)]
microsoft/compiler: Support float controls

Float controls are emitted as function attributes on the entrypoint.
These function attributes are not the standard build-in LLVM kind, but
are strings, which the DXIL backend didn't know how to emit. So, this
change adds string attribute support and uses it for fp32 ftz/preserve.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20919>

17 months agoaco: Remove dynamic VS input loads.
Timur Kristóf [Tue, 31 May 2022 19:13:36 +0000 (21:13 +0200)]
aco: Remove dynamic VS input loads.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20733>

17 months agoradv: Lower dynamic VS inputs in NIR.
Timur Kristóf [Mon, 16 Jan 2023 21:22:03 +0000 (22:22 +0100)]
radv: Lower dynamic VS inputs in NIR.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20733>

17 months agoaco: Enable constant exec mask based optimization on compute shaders.
Timur Kristóf [Tue, 10 Jan 2023 18:15:25 +0000 (19:15 +0100)]
aco: Enable constant exec mask based optimization on compute shaders.

We know for sure exec is initially -1 when the shader always has full subgroups.

Fossil DB stats on GFX11:
Totals from 3884 (2.88% of 134913) affected shaders:
SpillSGPRs: 1673 -> 1697 (+1.43%); split: -1.67%, +3.11%
SpillVGPRs: 2316 -> 2310 (-0.26%); split: -0.65%, +0.39%
CodeSize: 19584436 -> 19567156 (-0.09%); split: -0.13%, +0.04%
Scratch: 217088 -> 216832 (-0.12%)
Instrs: 3784596 -> 3780303 (-0.11%); split: -0.15%, +0.03%
Latency: 39971204 -> 39794967 (-0.44%); split: -0.47%, +0.03%
InvThroughput: 7885552 -> 7801247 (-1.07%); split: -1.14%, +0.07%
VClause: 74654 -> 74611 (-0.06%); split: -0.07%, +0.01%
SClause: 103139 -> 103043 (-0.09%); split: -0.13%, +0.04%
Copies: 279864 -> 281995 (+0.76%); split: -0.72%, +1.48%
Branches: 92082 -> 92084 (+0.00%); split: -0.03%, +0.03%
PreSGPRs: 155637 -> 149491 (-3.95%)

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20670>

17 months agoradv, aco: Add uses_full_subgroups to compute shader info.
Timur Kristóf [Tue, 10 Jan 2023 11:58:52 +0000 (12:58 +0100)]
radv, aco: Add uses_full_subgroups to compute shader info.

Allow the compiler to assume that the shader always has full subgroups,
meaning that the initial EXEC mask is -1 in all waves (all lanes enabled).
This assumption is incorrect for ray tracing and internal (meta) shaders
because they can use unaligned dispatch.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20670>

17 months agoradv: Get rid of app_shaders_internal.
Timur Kristóf [Fri, 20 Jan 2023 16:04:20 +0000 (17:04 +0100)]
radv: Get rid of app_shaders_internal.

This will make sure the internal field is set to true for internal
shaders which are initialized outside of radv_device_init_meta.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20670>

17 months agovulkan/rmv: Remove delta parameter from dump helpers
Friedrich Vock [Fri, 20 Jan 2023 21:17:48 +0000 (22:17 +0100)]
vulkan/rmv: Remove delta parameter from dump helpers

It was unused.

Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20820>

17 months agovulkan/rmv: Use the timestamp divisor instead of a hardcoded value
Friedrich Vock [Fri, 20 Jan 2023 21:17:12 +0000 (22:17 +0100)]
vulkan/rmv: Use the timestamp divisor instead of a hardcoded value

Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20820>

17 months agoradv/rmv: Correct timestamp shifting
Friedrich Vock [Fri, 20 Jan 2023 20:19:28 +0000 (21:19 +0100)]
radv/rmv: Correct timestamp shifting

The shifting was off-by-one compared to how it is done in the kernel. Also, excess_length needs to be casted to uint64_t to prevent zeroing everything except the 5 LSBs.

Fixes: abf3bcd6 ("radv: Add RMV resource tracking")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20820>

17 months agoradv/rmv: Log bo destruction before freeing it
Friedrich Vock [Fri, 20 Jan 2023 20:14:44 +0000 (21:14 +0100)]
radv/rmv: Log bo destruction before freeing it

Fixes: abf3bcd6 ("radv: Add RMV resource tracking")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20820>

17 months agoradv/rmv: Avoid more CPU unmap deadlocks
Friedrich Vock [Wed, 18 Jan 2023 17:46:55 +0000 (18:46 +0100)]
radv/rmv: Avoid more CPU unmap deadlocks

Fixes: 8d0e6c02 ("radv: Add RMV tracing utilities")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20820>

17 months agoradv/rmv: Also check the other pid field
Friedrich Vock [Wed, 18 Jan 2023 17:14:37 +0000 (18:14 +0100)]
radv/rmv: Also check the other pid field

Sometimes it seems like this field contains the correct pid instead.

Fixes: 8d0e6c02 ("radv: Add RMV tracing utilities")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20820>

17 months agoci: Add manual rules variations to disable irrelevant driver jobs.
Emma Anholt [Sun, 10 Jul 2022 03:22:35 +0000 (20:22 -0700)]
ci: Add manual rules variations to disable irrelevant driver jobs.

If you're only affecting one or a couple of drivers, it would be nice if
your pipeline buttons on the web UI weren't full of manual run buttons for
all the other drivers.

This is a bunch of duplicated lines, but less than it could have been now
that we have !references.

In some of these cases (i915g, nouveau, etnaviv), we have no non-manual
jobs for those drivers, so I could have just rewritten the original
"driver-rules" to "driver-manual-rules".  I decided to keep things
consistent between drivers, though, because this is all esoteric enough to
readers already without making different drivers' rules look different.

Fixes: #4891
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17445>

17 months agoci: Move the performance jobs' allow_failure:true to the gl rules.
Emma Anholt [Tue, 22 Nov 2022 19:49:47 +0000 (11:49 -0800)]
ci: Move the performance jobs' allow_failure:true to the gl rules.

This helps clarify what's going on with these magic manual jobs.

Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17445>

17 months agovulkan/wsi/wayland: improve same gpu detection
Lionel Landwerlin [Wed, 25 Jan 2023 18:16:23 +0000 (20:16 +0200)]
vulkan/wsi/wayland: improve same gpu detection

Some compositor like KWin do not return the render node.

v2: Make sure we test if only drm_info.hasPrimary is true (Jason)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: db42ed1e04 ("vulkan/wsi/wl: correctly find whether the compositor uses the same GPU")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8139
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20914>

17 months agomesa: fix out of bounds stack access on big endian
Adam Stylinski [Mon, 23 Jan 2023 02:07:22 +0000 (21:07 -0500)]
mesa: fix out of bounds stack access on big endian

The texture format code relies on a python-generated atlas of structs
that describe a lookup table for texture swizzling. Many of these
texture formats contain the index "6" used for this lookup. The 6th
index just so happens to represent a "don't care" value, however the
out of bounds read is still best to be avoided. The address sanitizer
finds this issue pretty immediately but it only shows up on big endian
because the textures don't need this on little.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20846>

17 months agozink: Fix non debug builds failing to compile on
Sidney Just [Wed, 25 Jan 2023 22:14:44 +0000 (14:14 -0800)]
zink: Fix non debug builds failing to compile on

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20917>

17 months agointel/fs: Fix src and dst types of LOAD_PAYLOAD ACP entries during copy propagation.
Francisco Jerez [Tue, 27 Sep 2022 22:28:48 +0000 (15:28 -0700)]
intel/fs: Fix src and dst types of LOAD_PAYLOAD ACP entries during copy propagation.

The ACP entries created by copy propagation to track the implied
copies of LOAD_PAYLOAD instructions don't model the behavior of
LOAD_PAYLOAD correctly, since (as of 41868bb6824c6106a55c844) header
moves are implicitly retyped to UD and the destination of non-header
copies implicitly uses the same type as the corresponding source, even
though the ACP entries created for such copies could incorrectly
represent a type conversion, which can lead to mis-optimization of the
program.

According to Marcin, this fixes the func.mesh.ext.workgroup_id.task.q0
crucible test.

Fixes: 41868bb6824c6106a55c844 ("i965/fs: Rework the fs_visitor LOAD_PAYLOAD instruction")
Reported-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Tested-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18980>

17 months agodocs: Lower Python requirement to 3.6
Chad Versace [Fri, 9 Dec 2022 17:41:30 +0000 (09:41 -0800)]
docs: Lower Python requirement to 3.6

Issue 7716 bumped the Python requirement from 3.6 to 3.7 for two
reasons. They are now non-issues.

  - Usage of f-strings. But f-strings are a 3.6 feature.
  - Usage of `from __future__ import annotations`. But the previous
    commit removes that usage.

See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7716
See: 5cf862fbb9 ("docs: update Python requirement to 3.7")
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20237>

17 months agoutil/glsl2spirv: Fix build with Python 3.6
Chad Versace [Thu, 8 Dec 2022 18:53:51 +0000 (10:53 -0800)]
util/glsl2spirv: Fix build with Python 3.6

ChromeOS still uses Python 3.6, but the glsl2spirv script uses module
'__future__.annotations', introduced in Python 3.7. Fix the build by
removing module, but otherwise preserve the type annotations.

Fixes: 949c3b55db ("util/glsl2spirv: add type annotations")
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20237>

17 months agozink: validation ci updates
Mike Blumenkrantz [Tue, 24 Jan 2023 22:02:08 +0000 (17:02 -0500)]
zink: validation ci updates

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20891>

17 months agozink: force GENERAL layout for all fb attachments with image binds
Mike Blumenkrantz [Tue, 24 Jan 2023 21:56:48 +0000 (16:56 -0500)]
zink: force GENERAL layout for all fb attachments with image binds

this is incredibly stupid, but KHR-GL46.texture_view.coherency does all
kinds of rasterization discard draws with fb attachments bound as images,
and there's no other sane way to catch it dynamically

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20891>

17 months agozink: update sampler layout when detecting feedback loop for first time
Mike Blumenkrantz [Tue, 24 Jan 2023 21:46:30 +0000 (16:46 -0500)]
zink: update sampler layout when detecting feedback loop for first time

ensure synchronization between descriptor layout and layout used here

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20891>

17 months agozink: return false for implicit feedback loop check with image binds
Mike Blumenkrantz [Tue, 24 Jan 2023 21:46:02 +0000 (16:46 -0500)]
zink: return false for implicit feedback loop check with image binds

this can only be GENERAL layout so it's not a feedback loop ever

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20891>

17 months agozink: don't skip repeated handling feedback loops
Mike Blumenkrantz [Tue, 24 Jan 2023 21:45:15 +0000 (16:45 -0500)]
zink: don't skip repeated handling feedback loops

these can persist across multiple draws, so return true if it's still
a feedback loop

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20891>

17 months agozink: move barrier jit to zink_context.c
Mike Blumenkrantz [Tue, 24 Jan 2023 21:19:45 +0000 (16:19 -0500)]
zink: move barrier jit to zink_context.c

this gives access to all the good descriptor functions and enshrinkens
the c++ file size

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20891>

17 months agozink: fix VK_DYNAMIC_STATE_LINE_WIDTH usage
Mike Blumenkrantz [Wed, 25 Jan 2023 14:24:16 +0000 (09:24 -0500)]
zink: fix VK_DYNAMIC_STATE_LINE_WIDTH usage

add a special tracker here to set the state only when necessary

Fixes: 659c39fafbb ("zink: rework primitive rasterization type logic")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20886>

17 months agoradv/winsys: prefix all error messages with RADV
Samuel Pitoiset [Wed, 25 Jan 2023 13:29:18 +0000 (14:29 +0100)]
radv/winsys: prefix all error messages with RADV

RadeonSI prints the exact same message and it can be confusing.
All other error messages in the winsys are prefixed now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20904>

17 months agoradv: Move constant flushing check out to callers.
Mike Blumenkrantz [Mon, 12 Sep 2022 19:38:35 +0000 (15:38 -0400)]
radv: Move constant flushing check out to callers.

Approximately 10% improvement in CPU overhead score on 3900X.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20655>

17 months agointel/ds: Nuke intel_ds_queue::queue_id
José Roberto de Souza [Mon, 23 Jan 2023 21:02:34 +0000 (13:02 -0800)]
intel/ds: Nuke intel_ds_queue::queue_id

queue_id is not used anywhere.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20888>

17 months agohasvk: Nuke anv_queue:index_in_family
José Roberto de Souza [Mon, 23 Jan 2023 19:03:55 +0000 (11:03 -0800)]
hasvk: Nuke anv_queue:index_in_family

This value is also stored in vk_queue, so we can nuke from anv_queue.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20888>

17 months agoanv: Nuke anv_queue:index_in_family
José Roberto de Souza [Mon, 23 Jan 2023 19:02:55 +0000 (11:02 -0800)]
anv: Nuke anv_queue:index_in_family

This value is also stored in vk_queue, so we can nuke from anv_queue.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20888>

17 months agointel: Add kmd_type parameter to necessary intel_gem.h functions
José Roberto de Souza [Thu, 6 Oct 2022 20:33:15 +0000 (13:33 -0700)]
intel: Add kmd_type parameter to necessary intel_gem.h functions

Here adding kmd_type parameter to
intel_gem_read_render_timestamp(), intel_gem_can_render_on_fd() and
intel_gem_supports_protected_context().
Those 3 functions will have Xe implementations, the other functions
in intel_gem.h will not be called by Xe code paths so not adding
kernel_driver_type to it.

Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20773>

17 months agointel: Add intel_kmd_type parameter to intel_engine_get_info()
José Roberto de Souza [Mon, 22 Aug 2022 19:56:27 +0000 (12:56 -0700)]
intel: Add intel_kmd_type parameter to intel_engine_get_info()

This will be needed to execute proper function to fetch engines from
kernel mode driver.

Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20773>

17 months agointel/dev: Detect what is the kernel mode driver loaded
José Roberto de Souza [Thu, 4 Aug 2022 20:21:05 +0000 (13:21 -0700)]
intel/dev: Detect what is the kernel mode driver loaded

Intel GPUs will have a new kernel mode driver, support for some
platforms will overlap so we will need to detect in runtime what is
the kernel mode driver loaded for each device.

Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20773>

17 months agoradeonsi: correctly declare YUV420_10 RT Format support for AV1
Philip Langdale [Mon, 23 Jan 2023 10:36:26 +0000 (18:36 +0800)]
radeonsi: correctly declare YUV420_10 RT Format support for AV1

This appears to have been an oversight. AV1 Main profile requires
support for both 8bit and 10bit, and so we should always declare
support for the YUV420_10 RT Format. This support then cascades
into supporting the appropriate surface formats and meets expectations
of vaapi clients (especially ffmpeg based) on how to detect support
for these formats.

Note that the commit [0b02db3007] was also made with the intention of
fixing this problem, but it does so in a non-idiomatic way. With that
change, there is still no declared YUV420_10 RT Format, and instead
the P010 surface format is reported under the YUV420 RT Format. This
is not going to work with all vaapi clients. I recommend that this
commit be reverted.

Signed-off-by: Philip Langdale <philipl@overt.org>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20870>

17 months agoradv: Merge the leaf and internal converter
Konstantin Seurer [Wed, 18 Jan 2023 15:34:55 +0000 (16:34 +0100)]
radv: Merge the leaf and internal converter

We have everything we need in the internal one already so we can just
encode leaf nodes there. Since this functionality isn't split anymore,
the shader was renamed to "encode".

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20768>