Commit graph

186337 commits

Author SHA1 Message Date
Marcin Ślusarz
2ad4d5f8dd intel/compiler/xe2: fix decoding of sampler simd mode
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28191>
2024-03-15 03:01:53 +00:00
Lionel Landwerlin
4df58ef503 intel/fs: bump max simd size of some messages for xe2
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28191>
2024-03-15 03:01:53 +00:00
Caio Oliveira
e5bc5bba7c anv: Enable VK_KHR_shader_maximal_reconvergence
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27278>
2024-03-15 02:10:21 +00:00
Yiwei Zhang
d56f65f7ca venus: ensure shmem is attached to renderer before use for guest vram
For guest vram, there's already roundtrip to protect device memory alloc
ordering. This change adds the same protection for shmem used in below
scenarios and optimize to wait for new shmem only.
- reply shmem
- indirect upload shmem
- cmd stream shmem

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28147>
2024-03-15 01:51:16 +00:00
Yiwei Zhang
72b124031b venus: minor naming cleanups
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28147>
2024-03-15 01:51:16 +00:00
Yiwei Zhang
362ba3f007 venus: roundtrip now belongs to ring
A roundtrip is to ensure a cmd via virtqueue happens on the renderer
side before a ring relies on it. Since venus is now with multi-ring, the
roundtrip submit and wait should belong to ring instead of instance, and
each ring owns its own roundtrip seqno to synchronize with virtqueue.

No behavior change.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28147>
2024-03-15 01:51:16 +00:00
Faith Ekstrand
160aa8ba48 nvk: Ignore rasterizationSamples when handling sampleShadingEnable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28192>
2024-03-15 01:31:55 +00:00
Timothy Arceri
20db9b77aa glsl: move invariant builtin validation to the nir linker
We don't attempt to recreate a nir implementation of the symbol table
instead here we simply use location to find the variables we need to
validate.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28142>
2024-03-15 00:01:34 +00:00
Yiwei Zhang
1bc25f4754 venus: optimize to further batch query records
Below is the common client pattern (app, angle, zink, etc):
- a few resets for queries to be used in this batch
  - optional, depending on EXT_host_query_reset
- a few queries
  - incremental
  - can cross query pool boundary

The HW drivers normally have faster shader path when there are too many
individual reset and copies. Without further resolving, this ends up
with linear overhead on the 2d engines. This change has largely
optimized that:
- angle: many copies => 1 copy (or 2)
- zink: many resets and copies => 1 reset and 1 copy (or 2)

and again...some more renamings around

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28112>
2024-03-14 23:40:44 +00:00
Yiwei Zhang
7c221e65a4 venus: add vn_queue_submission_get_resolved_query_records
This new split is for the getting the resolved query records, which is
to prepare for further query records resolving.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28112>
2024-03-14 23:40:44 +00:00
Yiwei Zhang
e868fc0b1e venus: refactor vn_queue_submission_add_query_feedback
Drop vn_combine_query_records_and_record_feedback to save the lines of
codes for args preparing. Also refactor to avoid the cmd stride trick,
but use indexing.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28112>
2024-03-14 23:40:44 +00:00
Yiwei Zhang
a6bc116f84 venus: rewrite qfb vn_feedback helpers
1. move record into alloc to simplify caller handling, which aligns
   with ffb and sfb as well
2. simplify locking to reduce lock overhead
3. remove unbalanced free from record helper
4. move reset to alloc

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28112>
2024-03-14 23:40:44 +00:00
Yiwei Zhang
aabb52979a venus: refactor query record recycle
Add a new free helper while renaming the alloc one as well. During query
record resolving, use a dropped list to store those records being reset.
This is to prepare for later further query record resolving.

This change also simplifies a query pool compare.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28112>
2024-03-14 23:40:44 +00:00
Yiwei Zhang
2a7085584e venus: simplify vn_cmd_reset and apply more code sharing
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28112>
2024-03-14 23:40:44 +00:00
Yiwei Zhang
5dbd88ad2a venus: drop vn_get_temp_cmd_ptr
It's more robust to base on original batch cmds instead of assuming
various constraints on copied cmds in the temp storage.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28112>
2024-03-14 23:40:44 +00:00
Yiwei Zhang
9e7797c8c1 venus: minor cmd count related refactors
This is to prepare for qfb refactor, so that we can distinguish the
current batch's cmd count and the appended new cmd count

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28112>
2024-03-14 23:40:44 +00:00
Yiwei Zhang
4bab7344a8 venus: massive qfb renamings
Summary:
- vn_feedback_query_batch => vn_cmd_query_record
- combined_batches => resolved_batches
- vn_feedback_query => vn_query_feedback

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28112>
2024-03-14 23:40:43 +00:00
Yiwei Zhang
25be8e721d venus: combine query record and reset
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28112>
2024-03-14 23:40:43 +00:00
Yiwei Zhang
71bf46fa5d venus: qfb to track cmd handle directly
since all usages are with vk handle

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28112>
2024-03-14 23:40:43 +00:00
Mike Blumenkrantz
e931ef4884 zink: iterate all the modes when doing separate shader fixups
otherwise this might only do the inputs without also handling outputs

Fixes: 0a12cedec9 ("zink: add a special separate shader i/o mode for legacy variables")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28185>
2024-03-14 23:17:02 +00:00
Faith Ekstrand
b68f2e747c zink: Rework sparse texture lowering
Instead of the previous fragile attempt to handle sparse_resident_and
by crawling deref chains, we now insert an is_sparse_resident_zink
intrinsic immediately after the tex or sparse_load intrinsic and define
Zink's sparse resident codes to always be 0/1.  Then sparse_resident_and
becomes iand and is_sparse_texels_resident becomes != 0 and everything
is well-defined and robust.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28123>
2024-03-14 22:37:51 +00:00
Eric Engestrom
8a5120003c ci/deqp: document which build produces which binary
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28181>
2024-03-14 22:06:05 +00:00
Corentin Noël
51593c6b34 dri/kopper: Assume a non-null drawable in flush_frontbuffer
It is expected that drawable is non-null here so don't add check for it.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28180>
2024-03-14 21:30:31 +00:00
Kenneth Graunke
484246ea0a iris: Eliminate prototype introduced in the previous patch
By moving iris_flush_resource() below.  This is done separately to
make the diff for the actual change in the previous patch easier to
follow.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13154>
2024-03-14 20:37:09 +00:00
Kenneth Graunke
fa24ff24dd iris: Remove suballocation in iris_flush_resource()
pipe->flush_resource() is called from eglCreateImageKHR in order to
prepare images to be shared.  It also has a valid context.  We can
just remove suballocation there, rather than doing it on the first
dri_image_query like radeonsi does.

This is much simpler and seems to work fine.

Suggested-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13154>
2024-03-14 20:37:09 +00:00
Sviatoslav Peleshko
a330ecc48a dri: Flush the context after flush_resource when creating shareable image
This makes sure that we'll be done with any pending preparations before
the actual export of the resource.

Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13154>
2024-03-14 20:37:09 +00:00
Nanley Chery
27d35588f5 iris: Copy main ISL surf when reallocating in place
When reallocating a resource in place, we make sure to pass the
PIPE_BIND_SHARED flag for the new resource. On ACM, this generally
changes the allocation of the resource from tiled to linear. To pick up
the new layout of the resource, copy the new ISL surf.

This enables ACM to pass piglit's egl-ext_egl_image_storage
test.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10367
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13154>
2024-03-14 20:37:09 +00:00
Valentine Burley
98690db847 tu: Reorder device features
Sort device features by KHR, EXT, vendor and then alphabetically within that.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28095>
2024-03-14 19:13:23 +00:00
Valentine Burley
1726e03df4 tu: Advertise VK_KHR_vertex_attribute_divisor
This is a promotion from the EXT, except the new property
supportsNonZeroFirstInstance which should already be supported.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28095>
2024-03-14 19:13:23 +00:00
Valentine Burley
355dd782c5 tu: Implement VK_KHR_map_memory2
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28080>
2024-03-14 18:50:19 +00:00
Corentin Noël
e7de9ab62a zink: Make sure to initialize all the fields of VkMemoryBarrier
Fixes several random validation errors as the value of dstAccessMask could be
anything.

Cc: mesa-stable
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28166>
2024-03-14 18:29:14 +00:00
Danylo Piliaiev
2aab8e0806 meson: Correctly get sizeof_pointer with cross-compilers
"native : true" used build system's compiler to determine
sizeof void*, which is wrong - we need to use host compiler.

Found when using pure NIX cross-compilation environment.

Fixes: ad34c932cd
("glapi: pass pointer size to python for glthread from meson")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.co
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28177>
2024-03-14 17:49:18 +00:00
Yonggang Luo
d2229304dc panfrost/meson: remove redundant gallium include from meson files
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24439>
2024-03-14 17:23:55 +00:00
Yonggang Luo
13ce0358b0 panfrost/shared: avoid use gallium helper in pan_minmax_cache.*
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24439>
2024-03-14 17:23:55 +00:00
Lionel Landwerlin
20df1d2b1f anv: ignore descriptor alignment for inline uniforms
For this particular case only it doesn't matter. Fixes some new CTS
tests with small inline uniform sizes.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28040>
2024-03-14 16:54:30 +00:00
Corentin Noël
812be09cd2 st_pbo/compute: Use the correct structure type when allocating a specialized key
Use pbo_spec_async_data instead of pbo_async_data.

Cc: mesa-stable
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28173>
2024-03-14 16:18:13 +00:00
José Roberto de Souza
27ab5fcf9f anv: Set VM control to true in Xe KMD
Xe KMD needs VMs to be created to work.
Setting this on Xe KMD code path allow us to simply a feature check
in init_queue_families().

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28161>
2024-03-14 15:53:22 +00:00
José Roberto de Souza
c20388d617 anv: Set VK_QUEUE_PROTECTED_BIT during queue families initialization
Don't make sense to only set it in VkGetPhysicalDeviceQueueFamilyProperties2().
Not setting it to the code path without pdevice->engine_info because
the protected support landed on i915 after DRM_I915_QUERY_ENGINE_INFO.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28161>
2024-03-14 15:53:22 +00:00
José Roberto de Souza
9102cb972a anv: Replace the 2 sparse booleans by 1 enum
Having just one place to check the Sparse type is less error prone.
For example in i915 it was always setting sparse_uses_trtt to true
even if running in gfx 9 that don't support sparse.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28161>
2024-03-14 15:53:22 +00:00
Rhys Perry
ec892c4d2b aco: don't reuse misaligned attribute destination VGPRs in VS prologs
Since we split misaligned attributes, we could overwrite one of these
VGPRs in the middle of loading the attribute.

For example:
   v_add_u32_e32 v4, vcc, s7, v1
   s_waitcnt lgkmcnt(0)
   buffer_load_dword v4, v4, s[32:35], 0 idxen
   buffer_load_dword v5, v4, s[32:35], 0 idxen offset:4
can overwrite the vertex index in the load of the first component.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27920>
2024-03-14 15:30:12 +00:00
Rhys Perry
df7024bcdd radv,aco: allow VS prologs to increase VGPR usage
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27920>
2024-03-14 15:30:12 +00:00
Samuel Pitoiset
1a20942f6a radv: fix wave32 support with ESO
For example when RADV_PERFTEST=gewave32 is used, the vgt shader key
was incorrect.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28151>
2024-03-14 14:56:45 +00:00
Samuel Pitoiset
e1c73db01c radv: rework generating vgt_shader_key for pipelines
This new helper will also be used for ESO.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28151>
2024-03-14 14:56:45 +00:00
Samuel Pitoiset
c6485f560d radv: determine radv_vgt_shader_key::has_ngg_xxx with the last VGT shader
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28151>
2024-03-14 14:56:44 +00:00
Samuel Pitoiset
9ccbd459c6 radv: fix determining if PrimId is used for merged shaders compiled separately
For ESO when TES and GS are compiled separately,
BREAK_WAVE_AT_EOI/IA_SWITCH_ON_EOI must be enabled if the GS uses
PrimID.

This fixes
tests/spec/arb_tessellation_shader/execution/gs-primitiveid-instanced.shader_test
on RDNA2 when shader object is enabled with Zink.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28149>
2024-03-14 14:34:19 +00:00
Guilherme Gallo
e052e30b29 r300/ci: Update xfiles based on nightly run
Refer to:
- https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1125483
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56164946

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28145>
2024-03-14 13:53:45 +00:00
Guilherme Gallo
3d45451fb4 etnaviv/ci: Update xfiles based on nightly run
Refer to:
- https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1125483

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28145>
2024-03-14 13:53:45 +00:00
Guilherme Gallo
7d9ba366d4 freedreno/ci: Update xfiles based on nightly run
Refer to:
- https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1125483
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56164985
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56164987
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56164988
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56164989
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56164989
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56164990
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56164990

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28145>
2024-03-14 13:53:45 +00:00
Guilherme Gallo
c6b65ac639 v3d/ci: Update xfiles based on nightly run
Refer to:
- https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1125483
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56164970

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28145>
2024-03-14 13:53:45 +00:00
Guilherme Gallo
4350c7cb30 radv/ci: Update xfiles based on nightly run
Refer to:
- https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1125483
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56167363

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28145>
2024-03-14 13:53:45 +00:00