Commit Graph

165947 Commits

Author SHA1 Message Date
Lina Versace a429d06878 mailmap: Lina is Chad's new name
If you can longer find chadversary or chadv on the interwebs, then
search for linyaa or versalinyaa.

Egg-crAcked-By: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Egg-Cracked-By: Faith Ekstrand <faith@gfxstrand.net>
Egg-Cracked-By: Lyude Paul <lyude@redhat.com>
Egg-Cracked-By: Wann
Egg-Cracked-By: Zach Lesher
Egg-Cracked-By: 初音ミク
Acked-by: Daniel Stone <daniels@collabora.com>
2023-01-31 18:12:42 -08:00
Lionel Landwerlin 13de23ea07 intel: add missing PS restriction on BDW+
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20949>
2023-02-01 00:28:53 +00:00
Lionel Landwerlin 75159304b0 docs: list anv in EXT_extended_dynamic_state3 support
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Luis Felipe Strano Moraes <luis.strano@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21017>
2023-01-31 22:34:07 +00:00
Ryan Neph 65adf0c0af util/xmlconfig: add MESA_DRICONF_EXECUTABLE_OVERRIDE
Allow the loading process to affect driconf option matching without
changing the behavior throughout mesa common code or leaking the name of
the loading process to logs, artifact storage, or in sub-thread naming,
as can be the case with the broader MESA_PROCESS_NAME override.

This new MESA_DRICONF_EXECUTABLE_OVERRIDE takes higher precedence over
MESA_PROCESS_NAME in the case where both are set.

Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20779>
2023-01-31 22:02:58 +00:00
Ryan Neph 887ca5e1b2 util/u_process: remove util_get_process_name_may_override()
Also deprecate GALLIUM_PROCESSS_NAME in favor of MESA_PROCESS_NAME,
while maintaining existing functionality for use cases relying on
GALLIUM_PROCESSS_NAME.

GALLIUM_PROCESSS_NAME takes higher precedence over MESA_PROCESS_NAME in
the case where both are set.

Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20779>
2023-01-31 22:02:58 +00:00
Ryan Neph c8fe878717 util/u_process: add MESA_PROCESS_NAME override to util_get_process_name()
Allow processes to set a custom process name before loading drivers.

Especially useful for virtualized workloads hidden behind a
generically-named host renderer process (e.g. Venus render_server) to
retain game-specific driconf option matching.

Signed-off-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20779>
2023-01-31 22:02:58 +00:00
Ryan Neph a2b296c75b ci: fix directory existence racing in parallel test execution
meson tests sharing a binary (and deviating in their env/args) will
produce temporary logs to the same directory, which is assumed to exist
only for the duration of a single test. This is problematic when running
tests in parallel, as one test may remove the directory before the
other(s) finish, causing a test flake.

This appends the each test's pid to the output directory to enforce
uniqueness and avoid the race.

Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20779>
2023-01-31 22:02:58 +00:00
Samuel Pitoiset 064141266f radv: skip shaders cache for fast-linked pipelines with GPL
Shader binaries that are imported during linking should already be in
the cache (not yet implemented though) and computing the per pipeline
cache hash is really expensive.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21009>
2023-01-31 20:27:50 +00:00
Thong Thai 2fe3ac2f88 radeonsi/vcn: use encoder/decoder caps reported by kernel
Rely on the kernel for video encoder/decode capabilities where possible,
since there might be special cases for some devices. Otherwise, fallback
to the older logic for older kernels.

v2: Made the macro lines shorter and added a comment to explain (David)
v3: Undo deleting some logic (Ruijing)

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20969>
2023-01-31 18:56:18 +00:00
Marcin Ślusarz af9e2b8bf1 intel/compiler/mesh: remove dead code path supporting >4 dword writes
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20858>
2023-01-31 18:28:21 +00:00
Marcin Ślusarz be82ed28f0 intel/compiler/mesh: support longer write messages
Allowing longer writes reduces the number of send messages needed
to support unaligned 4-component writes.

Note: nothing currently generates 8-component writes, so this change
makes "second_mask" code path in emit_urb_direct_writes and
emit_urb_indirect_writes_mod dead.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20858>
2023-01-31 18:28:21 +00:00
Alyssa Rosenzweig 0f087b56d0 agx: Bump preamble_storage_size to 512
nir_opt_preamble is now aware of the internal uniforms we insert, so it can use
the whole uniform file available to it. This lets us push more (all?) uniform
loads in Dolphin ubershaders to the preamble.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20562>
2023-01-31 17:02:34 +00:00
Alyssa Rosenzweig 02fe57b7e9 agx: Lower system values in NIR in the driver
To comply with The Ekstrand Rule.

AGX has a large number of "uniform registers" available. These may be loaded
with arbitrary ranges of GPU memory by the driver, or they can be written by the
preamble shader. Currently, the compiler runs nir_opt_preamble on the first half
of the uniform file, and then translates NIR sysvals to moves from the second
half of the uniform file, passing back a uniform->sysval map for the GL driver
to respect. This has (at least) two issues:

* Since nir_opt_preamble runs before gathering sysvals, it has to assume the
  maximum number of sysvals are pushed, which can prevent it from moving some
  computation to the preamble due to running out of partitioned uniform registers.
  This is a problem for Dolphin's ubershaders, though it's unclear how much it
  matters for Dolphin perf.

* This violates The Ekstrand Rule and apparently will be a problem for our
  Vulkan driver. I'm just a compiler+GL girl, so I wouldn't know.

To fix this, we invert the order of operations. At the end of this series, we
instead lower NIR system values to NIR load_preamble instructions in the GL
driver. The compiler just translates directly to uniform registers reads. The
Vulkan driver will need its own version of this code, but maybe it can do
something clever and descriptor set aware.

This means that there will already be some load_preamble instructions when
nir_opt_preamble runs, so I've made minor changes to nir_opt_preamble to handle
that gracefully. This is a bit lazy... The alternative is to introduce a
`load_uniform_agx` intrinsic which `load_preamble` gets lowered to trivially.
But that's another pass over the IR (and due to AGX's shader variant hell I'm
sensitive to backend compile time) and it would be more complicated than what's
implemented here.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Ella Stanforth <ella@iglunix.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20562>
2023-01-31 17:02:34 +00:00
Alyssa Rosenzweig b0b5a71c74 nir/opt_preamble: Consider load_preamble as movable
It's kosher to get load_preamble intrinsics ahead of time if the driver is
pushing sysvals. Handle them like load_uniform.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by-(with-sparkles): Asahi Lina <lina@asahilina.net>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20562>
2023-01-31 17:02:34 +00:00
Alyssa Rosenzweig 05d3238692 nir/opt_preamble: Treat *size as an input
Some backends may wish to reserve early uniforms for internal system values, and
use the remaining space for preamble storage. In this case, it's convenient to
teach nir_opt_preamble about a reserved offset. It's logical to treat the output
*size instead of an in/out variable that nir_opt_preamble adds to. This requires
a slight change to the consumers to zero the input.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by-(with-sparkles): Asahi Lina <lina@asahilina.net>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20562>
2023-01-31 17:02:34 +00:00
Mike Blumenkrantz d745e3b0ab zink: always unref old images when adding new binds
at some point this was correct, but refactoring has since occurred,
and this ends up leaking storage image objects

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20867>
2023-01-31 16:31:46 +00:00
Mike Blumenkrantz dd733034aa zink: stop leaking push descriptor templates
templates[ZINK_DESCRIPTOR_TYPE_UNIFORMS] needs to be deleted, which
requires a larger iterator

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20867>
2023-01-31 16:31:46 +00:00
Mike Blumenkrantz 01d2e7afce zink: don't add dmabuf export type if dmabuf isn't supported
avoid trying to create dmabuf-exportable resources too

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20791>
2023-01-31 15:57:13 +00:00
Samuel Pitoiset e07232acbb radv: fix GPL fast-linking with libs that have retained NIR shaders
Zink creates all libaries with CREATE_RETAIN_LINK_TIME_OPTIMIZATION,
then it first creates unoptimized pipelines and it enqueues optimized
pipelines in the background with CREATE_LINK_TIME_OPTIMIZATION.

If a pipeline is linked without CREATE_LINK_TIME_OPTIMIZATION, the
driver should import binaries instead of retained NIR shaders. This
was broken because RADV wasn't compiling binaries at all in presence
of CREATE_RETAIN_LINK_TIME_OPTIMIZATIONS. Now, it always compiles
binaries in libraries but can also retain NIR if requested.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8150
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21008>
2023-01-31 15:24:50 +00:00
Marcin Ślusarz 3131c2fc7a intel/compiler/mesh: optimize indirect writes
Our hardware requires that we write to URB using full vec4s at aligned
addresses. It gives us an ability to mask-off dwords within vec4 we don't
want to write, but we have to know their positions at compile time.

Let's assume that:
- V represents one dword we want to write
- ? is an unitinitialized value
- "|" is a vec4 boundary.

When we want to write 2-dword value at offset 0 we generate 1 write message:
| V1 V2 ? ? |
with mask:
| 1  1  0 0 |

When we want to write 4-dword value at offset 2 we generate 2 write messages:
| ? ? V1 V2 | V3 V4 ? ? |
with mask:
| 0 0 1  1  | 1  1  0 0 |

However if we don't know the offset within vec4 at *compile time* we
currently generate 4 write messages:
| V1 V1 V1 V1 |
| 0  0  1  0  |

| V2 V2 V2 V2 |
| 0  0  0  1  |

| V3 V3 V3 V3 |
| 1  0  0  0  |

| V4 V4 V4 V4 |
| 0  1  0  0  |

where masks are determined at *run time*.

This is quite wasteful and slow.

However, if we could determine the offset modulo 4 statically at compile time,
we could generate only 1 or 2 write messages (1 if modulo is 0) instead of 4.

This is what this patch does: it analyzes the addressing expression for
modulo 4 value and if it can determine it at compile time, we generate
1 or 2 writes, and if it can't we fallback to the old 4 writes method.

In mesh shader, the value of offset modulo 4 should be known for all outputs,
with an exception of primitive indices.

The modulo value should be known because of MUE layout restrictions, which
require that user per-primitive and per-vertex data start at address aligned
to 8 dwords and we should statically always know the offset from this base.

There can be some cases where the offset from the base is more dynamic
(e.g. indirect array access inside a per-vertex value), so we always do
the analysis.

Primitive indices are an exception, because they form vec3s (for triangles),
which means that the offset will not be easy to analyse.

When U888X index format lands, primitive indices will use only one dword
per triangle, which means that we'll always write them using one message.

Task shaders don't have any predetermined structure of output memory, so
always do the analysis.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20050>
2023-01-31 13:50:08 +00:00
Marcin Ślusarz 2255375c4d nir: add nir_mod_analysis & its tests
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20050>
2023-01-31 13:50:08 +00:00
Samuel Pitoiset 56158bd0c0 radv: adjust ACCUM tessellation fields on GFX11+
Based on RadeonSI/PAL.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20982>
2023-01-31 11:43:10 +00:00
Samuel Pitoiset c8a575eb30 radv: fix RB+ for SRGB formats
This should be set for linear colorspace only.

Ported from RadeonSI.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20982>
2023-01-31 11:43:10 +00:00
Samuel Pitoiset 47852b9ff4 radv: stop setting INTERPOLATE_COMP_Z
Based on RadeonSI/PAL.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20982>
2023-01-31 11:43:10 +00:00
Hyunjun Ko c489b3eadb vulkan/runtime: match the spec when taking pipeline subsets.
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21006>
2023-01-31 11:21:22 +00:00
Simon Ser 6e359c2189 egl: fix fd_display_gpu on surfaceless and device platforms
The original commit missed these.

Signed-off-by: Simon Ser <contact@emersion.fr>
Fixes: 31013f3ce7 ("egl: remove is_different_gpu variable from struct dri2_egl_display")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8194

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20992>
2023-01-31 10:41:32 +00:00
David Rosca 09977d687d frontents/va: Use PIPE_USAGE_STAGING for coded buffer
Coded buffer will only be read on CPU, setting
PIPE_USAGE_STAGING instead of PIPE_USAGE_STREAM
makes the CPU reads much faster.

On 6700XT this reduces the CPU copy by around
3ms to 0.3 ms on average while under high GPU
load - real-time game streaming.

Signed-off-by: David Rosca <nowrep@gmail.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20989>
2023-01-31 10:22:05 +00:00
Samuel Pitoiset 2f93398047 radv: only initialize non-zero values for the default dynamic state
This avoids a big memcpy and cut the function time by 2x.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20960>
2023-01-31 09:01:48 +00:00
Samuel Pitoiset 912a19e630 radv: regroup dynamic states initialization
It should be possible to initialize these inside libraries at some
point.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20960>
2023-01-31 09:01:48 +00:00
Samuel Pitoiset c08082e861 radv: ignore all CB dynamic states when there is no color attachments
This simplifies radv_init_dynamic_state() slightly.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20960>
2023-01-31 09:01:48 +00:00
Emma Anholt 5eade8fb9b ci: Run our manual jobs during the nightly scheduled run.
We have a common pain point with fractional CTS coverage, where the test
list changes on a CTS uprev or board load rebalancing, so you get a
different subset of tests run.  The dev updates the list of xfails (a
pain), but also we end up with xfails left behind that aren't tested any
more and don't reflect reality.

For some drivers (tu, freedreno, zink-anv) we have manual jobs available
for curious devs to look at the current state of the CTS, but without
anyone having to keep the full xfails updated during uprevs, you don't
necessarily know what to do with the results you get on your MR.

So, let's introduce nightly testing for the tests that aren't guaranteed
green by Marge.  With that, Someone (possibly me? sigh) can review the
nightly results and push up updates for full-run xfails so everyone can be
on the same page other than a day or so of delay.  We also have some hope
for automated tooling to do this thanks to what Collabora has been working
on for automated CI uprev MR generation.

Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20950>
2023-01-31 01:55:22 +00:00
Emma Anholt 610efb0866 ci/zink: Move the zink-anv-tgl manual full run to custom manual deps.
Follow-up to !17445, since this run had been added while that MR was
outstanding.  Now it shouldn't show up in unrelated pipelines.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20950>
2023-01-31 01:55:22 +00:00
Emma Anholt 2e807a028a ci/zink: Disable Amnesia trace until the linked issue gets fixed.
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20950>
2023-01-31 01:55:22 +00:00
Bas Nieuwenhuizen b0a9772cc6 radv: Shift left the tile swizzle more on GFX11.
ac/surface puts the raw pip_bank_xor there, which needs the extra
shift for the actual tile_swizzle.

(I think long term we should refactor this in ac/surface but for
 now lets fix like radeonsi to avoid race conditions.)

CC: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20979>
2023-01-31 01:25:24 +00:00
Bas Nieuwenhuizen d321bc1323 radv: Set FDCC_CONTROL SAMPLE_MASK_TRACKER_WATERMARK
Might cause hangs according to comments. Syncs with radeonsi/PAL.

Fixes: e210ffb4d0 ("radv: update framebuffer registers on GFX11")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20979>
2023-01-31 01:25:24 +00:00
Faith Ekstrand 03d1141e51 mailmap: Remap e-mail addresses for Faith Ekstrand
Acked-by: Lina Versace <lina@kiwitree.net>
Acked-by: Daniel Stone <daniels@collabora.com>
Lovingly-reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21000>
2023-01-31 01:17:07 +00:00
Alejandro Piñeiro 2901066980 broadcom/compiler: fix indentation at v3d_nir_lower_image_load_store
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20972>
2023-01-30 21:57:45 +00:00
Jesse Natalie 237e12c2df dzn, driconf: Add a driconf entry for NMS to claim wide line support
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20959>
2023-01-30 21:17:25 +00:00
Sagar Ghuge df0054e523 iris: Stop marking context unconditionally as guilty
With this change, we would fetch the reset status and if the context
status is banned or in unknown state, we would just start with the fresh
context.

Also, use the fetched reset status to communicate back to the gallium
frontend.

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

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20928>
2023-01-30 20:48:09 +00:00
Jesse Natalie 0733aafa22 CI: Lima farm is offline
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20995>
2023-01-30 12:05:12 -08:00
Neha Bhende 3b5da9714f docs: Add GL 4.3 support info in mesa docs
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20964>
2023-01-30 18:57:17 +00:00
Boyuan Zhang 4eadb333a8 radeonsi/vcn: validate fence handle before using it
Check if picture fence handle pointer is valid before using.

Fixes: 843bdd22 ('radeonsi/vcn: check fence before destroying dpb')

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20986>
2023-01-30 17:50:52 +00:00
Jesse Natalie 0b9972953c wsi/win32: Use app-provided timeout instead of arbitrary hardcoded value
Prevents returning spurious timeouts when the app wanted to wait
infinitely. Fixes 3DMark Wild Lands which would otherwise attempt
to render/present a buffer it didn't successfully acquire.

Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20963>
2023-01-30 17:27:47 +00:00
Jesse Natalie 202480a9ca wsi/win32: Always use non-SRGB formats for DXGI
The actual buffer is always created as non-SRGB, and then SRGB views
can be used to render into it. Fixes a crash trying to launch
3DMark Wild Lands

Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20963>
2023-01-30 17:27:47 +00:00
Rob Clark a192923f99 freedreno/drm: Restart import on zombie race
If we hit the race condition of looking up an already imported BO that
is in the process of being destroyed, the handle will be GEM_CLOSE'd,
meaning that the handle that we just got from the kernel is probably not
valid.  So in this case we should retry.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20961>
2023-01-30 15:48:41 +00:00
Rob Clark bb438c8dc7 freedreno/drm/virtio: Flush before CREATE_BLOB
The RESOURCE_CREATE_BLOB ioctl can carry a ccmd payload, similarly to
EXECBUF.  But we need to preserve the order of buffered execbuf cmds
which haven't been flushed to the guest kernel yet, rather than let the
CREATE_BLOB payload jump to the head of the queue.  Otherwise, for ex,
the host could see the guest requesting an iova that has not yet been
(from it's perspective) released.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20961>
2023-01-30 15:48:41 +00:00
Samuel Pitoiset df8243dadf radv: rename radv_create_shaders() to radv_graphics_pipeline_compile()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20943>
2023-01-30 09:37:52 +00:00
Samuel Pitoiset 21f53b9c48 radv: split radv_create_shaders() between graphics and compute shaders
This introduces radv_compute_pipeline_compile() which is used for
compute and ray tracing pipelines. I think it's better than having a
single function for compiling everything, and that will allow us to do
more cleanups.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20943>
2023-01-30 09:37:52 +00:00
Samuel Pitoiset 87e055a700 radv: pass the number of stages to radv_hash_shaders()
This will help for splitting radv_create_shaders().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20943>
2023-01-30 09:37:52 +00:00
Samuel Pitoiset fc93e0453c radv: simplify VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED
The Vulkan spec says:
    "VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT specifies
     that pipeline creation will fail if a compile is required for
     creation of a valid VkPipeline object; VK_PIPELINE_COMPILE_REQUIRED
     will be returned by pipeline creation, and the VkPipeline will be
     set to VK_NULL_HANDLE."

Given the implementation is expected to set the pipeline to
VK_NULL_HANDLE, it's unecessary to handle pipeline feedback.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20943>
2023-01-30 09:37:52 +00:00