platform/upstream/mesa.git
17 months agollvmpipe/cs: add multiple stride indirect to fill_grid_info.
Dave Airlie [Wed, 17 May 2023 02:05:20 +0000 (12:05 +1000)]
llvmpipe/cs: add multiple stride indirect to fill_grid_info.

mesh shaders needs to iterate across multiple indirect draws

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23066>

17 months agollvmpipe/cs: add task/mesh shader support to compute shader builder.
Dave Airlie [Wed, 17 May 2023 02:01:36 +0000 (12:01 +1000)]
llvmpipe/cs: add task/mesh shader support to compute shader builder.

This allows generating task and mesh variants of compute shaders.

It adds:
- vertex and primitive outputs support - aos writing.
- payload support
- mesh iface for the output and count callbacks.
- draw_id
- multiple iteration support to the exec fn to allow launches
in multiple passes to reduce memory usage

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23066>

17 months agogallivm/cs: add payload ptr to the cs thread data.
Dave Airlie [Wed, 17 May 2023 01:57:25 +0000 (11:57 +1000)]
gallivm/cs: add payload ptr to the cs thread data.

This fits best at a thread level beside shared.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23066>

17 months agollvmpipe: bind task/mesh resources and dirty bits
Dave Airlie [Wed, 17 May 2023 01:56:41 +0000 (11:56 +1000)]
llvmpipe: bind task/mesh resources and dirty bits

This binds the task/mesh states to be updated on dirty changes

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23066>

17 months agollvmpipe: add query support for task/mesh shaders
Dave Airlie [Wed, 17 May 2023 01:55:10 +0000 (11:55 +1000)]
llvmpipe: add query support for task/mesh shaders

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23066>

17 months agollvmpipe: add debug bit for mesh shaders
Dave Airlie [Wed, 17 May 2023 01:54:57 +0000 (11:54 +1000)]
llvmpipe: add debug bit for mesh shaders

Reviewed-by: Roland Scheidegger <sroland@vmware.com>#
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23066>

17 months agollvmpipe: add dirty bits for mesh and task shaders.
Dave Airlie [Wed, 17 May 2023 01:54:37 +0000 (11:54 +1000)]
llvmpipe: add dirty bits for mesh and task shaders.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23066>

17 months agollvmpipe: bump dirty tracker to 64-bits.
Dave Airlie [Wed, 17 May 2023 01:54:11 +0000 (11:54 +1000)]
llvmpipe: bump dirty tracker to 64-bits.

We need a lot more dirty states for task/mesh

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23066>

17 months agollvmpipe: start adding task/mesh support.
Dave Airlie [Wed, 17 May 2023 01:47:55 +0000 (11:47 +1000)]
llvmpipe: start adding task/mesh support.

This is just some infrastructure for creating shaders and contexts.

task/mesh shaders are based on compute shaders and share nearly all
their code with compute.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23066>

17 months agollvmpipe: resize arrays to handle mesh shaders.
Dave Airlie [Mon, 29 May 2023 06:30:24 +0000 (16:30 +1000)]
llvmpipe: resize arrays to handle mesh shaders.

This just bumps some limits.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23066>

17 months agogallivm/nir: add support for mesh shader outputs.
Dave Airlie [Wed, 17 May 2023 01:43:23 +0000 (11:43 +1000)]
gallivm/nir: add support for mesh shader outputs.

mesh shaders can have vertex and primitive outputs, and act a bit
like TCS shaders, add the callback to allow the driver to decide
how to store these.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23066>

17 months agogallivm/nir: call task shader lowering.
Dave Airlie [Wed, 17 May 2023 01:43:04 +0000 (11:43 +1000)]
gallivm/nir: call task shader lowering.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23066>

17 months agogallivm/nir: add a mesh interface and vert/prim count setting.
Dave Airlie [Wed, 17 May 2023 01:42:19 +0000 (11:42 +1000)]
gallivm/nir: add a mesh interface and vert/prim count setting.

This adds a callback to the driver for a mesh interface to implement
the set_vertex_and_primitive_count intrinsic

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23066>

17 months agogallivm/nir: add launch mesh workgroups
Dave Airlie [Wed, 17 May 2023 01:40:32 +0000 (11:40 +1000)]
gallivm/nir: add launch mesh workgroups

add support the launch mesh workgroups intrinsic for task shaders.

This writes the values out to the start of the payload.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23066>

17 months agogallivm: add support for payload access
Dave Airlie [Wed, 17 May 2023 01:35:18 +0000 (11:35 +1000)]
gallivm: add support for payload access

mesh shading has a payload to pass between task and mesh shaders,
this acts like shared memory as well, so we use the standard memory
hooks to access it.

This current adds the payload after the 12-byte header which will
contain the x/y/z grid sizes.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23066>

17 months agodraw: add support for per primitive aos emission
Dave Airlie [Wed, 17 May 2023 01:22:23 +0000 (11:22 +1000)]
draw: add support for per primitive aos emission

This add support to the aos emit code so that mesh shaders
can use it for per prim outputs.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23066>

17 months agodraw: add mesh pipeline middle end.
Dave Airlie [Wed, 17 May 2023 01:20:12 +0000 (11:20 +1000)]
draw: add mesh pipeline middle end.

This sets up the mesh pipeline to call the post vs clipping
and so emit for stats (not for so).

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23066>

17 months agodraw: add a mesh primitive assembler.
Dave Airlie [Wed, 17 May 2023 01:18:26 +0000 (11:18 +1000)]
draw: add a mesh primitive assembler.

This is assembles prims from mesh vertex and per-primitive outputs.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23066>

17 months agodraw: move draw_vertex_info and draw_prim_info to public header.
Dave Airlie [Wed, 17 May 2023 01:08:34 +0000 (11:08 +1000)]
draw: move draw_vertex_info and draw_prim_info to public header.

Need to use these in llvmpipe for mesh shaders

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23066>

17 months agodraw: add mesh shader infrastructure
Dave Airlie [Wed, 17 May 2023 01:01:07 +0000 (11:01 +1000)]
draw: add mesh shader infrastructure

This adds draw mesh shader infrastructure, as mesh shaders have
to be able to feed into the post vs stages like clipping, so
we have to wire informational things up.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23066>

17 months agolavapipe: fix indentation whitespace
Dave Airlie [Mon, 5 Jun 2023 07:15:20 +0000 (17:15 +1000)]
lavapipe: fix indentation whitespace

these were indented too much.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23066>

17 months agolavapipe: fix pipeline sanitizing.
Dave Airlie [Wed, 24 May 2023 03:03:26 +0000 (13:03 +1000)]
lavapipe: fix pipeline sanitizing.

This isn't needed for fragment shader.

Cc: mesa-stable
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23066>

17 months agod3d12: Fully initialize UAV desc for null SSBOs
Jesse Natalie [Mon, 5 Jun 2023 15:17:10 +0000 (08:17 -0700)]
d3d12: Fully initialize UAV desc for null SSBOs

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

17 months agozink/ci: remove useless RADV_PERFTEST=gpl
Samuel Pitoiset [Mon, 5 Jun 2023 15:21:08 +0000 (17:21 +0200)]
zink/ci: remove useless RADV_PERFTEST=gpl

This option has been removed a while ago.

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

17 months agobroadcom/ci: update expected results
Juan A. Suarez Romero [Mon, 5 Jun 2023 15:00:04 +0000 (17:00 +0200)]
broadcom/ci: update expected results

Update failing/flake list.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23441>

17 months agonir: use generated immediate comparison helpers
Erik Faye-Lund [Mon, 8 May 2023 12:00:41 +0000 (14:00 +0200)]
nir: use generated immediate comparison helpers

This makes the code a bit less verbose, so let's use the helpers.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23393>

17 months agonir: generate nir_{cmp}_imm variants
Erik Faye-Lund [Mon, 8 May 2023 07:01:51 +0000 (09:01 +0200)]
nir: generate nir_{cmp}_imm variants

We have a couple of open-coded variants of these, but let's generate all
of them for completeness.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23393>

17 months agonir: use nir_i{ne,eq}_imm helpers
Erik Faye-Lund [Fri, 2 Jun 2023 10:25:58 +0000 (12:25 +0200)]
nir: use nir_i{ne,eq}_imm helpers

We already have these, so let's use them more.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23393>

17 months agod3d12, dozen: make sure we pass float to fge
Erik Faye-Lund [Tue, 23 May 2023 10:23:51 +0000 (12:23 +0200)]
d3d12, dozen: make sure we pass float to fge

This doesn't matter much in practice, because the integer an float
representations of zero are the same. But it's easier to understand
what's going on if the correct type is used, so let's clean this up.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23393>

17 months agopvr: Fix typo causing seg faults copying immutable samplers
Karmjit Mahil [Thu, 18 May 2023 12:43:11 +0000 (13:43 +0100)]
pvr: Fix typo causing seg faults copying immutable samplers

Fixes seg faults in:
  dEQP-VK.binding_model.shader_access.primary_cmd_buf
    .sampler_immutable.no_access.single_descriptor.*
  dEQP-VK.binding_model.shader_access.primary_cmd_buf
    .sampler_immutable.no_access.multiple_contiguous_descriptors.*

It does not fix them. Now they just hit asserts in the compiler.

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

17 months agor300: fail linking instead of using dummy shaders
Pavel Ondračka [Tue, 25 Apr 2023 14:33:52 +0000 (16:33 +0200)]
r300: fail linking instead of using dummy shaders

We need to tell the apps about the hardware limtations, so that they
have a chance to take a fallback path. Fixes GTK misrendering, due to
use of the dummy shaders (now properly fallbacks to software).

Based on a MR by Filip Gawin.

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

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22708>

17 months agoaco/tests: add discard export target tests
Rhys Perry [Fri, 2 Jun 2023 12:36:55 +0000 (13:36 +0100)]
aco/tests: add discard export target tests

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

17 months agoaco: fix has_color_exports=true for mrtz exports
Rhys Perry [Thu, 1 Jun 2023 15:18:27 +0000 (16:18 +0100)]
aco: fix has_color_exports=true for mrtz exports

V_008DFC_SQ_EXP_NULL is after V_008DFC_SQ_EXP_MRTZ.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Tested-by: Mikhail Gavrilov mikhail.v.gavrilov@gmail.com
Fixes: d3611af3896 ("aco: support nir_export_amd with ps targets")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9135
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23371>

17 months agoRevert "ci: disable Collabora's LAVA lab for maintance"
Sergi Blanch Torne [Mon, 5 Jun 2023 08:31:30 +0000 (10:31 +0200)]
Revert "ci: disable Collabora's LAVA lab for maintance"

This reverts commit https://gitlab.freedesktop.org/mesa/mesa/-/commit/7059aa2f842aae442e75b4d6e9d4a37bf4489bff

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23429>

17 months agor300: enable PIPE_CAP_TGSI_TEXCOORD
Pavel Ondračka [Fri, 28 Apr 2023 11:17:52 +0000 (13:17 +0200)]
r300: enable PIPE_CAP_TGSI_TEXCOORD

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23299>

17 months agov3d: Z/S blit require Z/S formats
Juan A. Suarez Romero [Thu, 1 Jun 2023 07:48:52 +0000 (09:48 +0200)]
v3d: Z/S blit require Z/S formats

Similar to checking that a z/s format can not be used for color
blit with tile-based blit path, color format can not be used for z/s
blit.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23390>

17 months agor300: remove nir round lowering
Pavel Ondračka [Sat, 3 Jun 2023 12:22:49 +0000 (14:22 +0200)]
r300: remove nir round lowering

We should only see round from lowered ARR and in that case we want
to reconstruct the ARR, not lower it.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23419>

17 months agor300: fuse ROUND and ARL to ARR
Pavel Ondračka [Sat, 3 Jun 2023 12:20:05 +0000 (14:20 +0200)]
r300: fuse ROUND and ARL to ARR

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23419>

17 months agopvr: Fix signed comparison
Vinson Lee [Sat, 3 Jun 2023 23:16:41 +0000 (16:16 -0700)]
pvr: Fix signed comparison

Fix defect reported by Coverity Scan.

Unsigned compared against 0 (NO_EFFECT)
unsigned_compare: This less-than-zero comparison of an unsigned value is never true. val < 0U.
unsigned_conversion: val is converted to an unsigned type because it's compared to an unsigned constant.

Fixes: 480bdff4b52 ("pvr: Add support to process transfer and blit cmds")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23416>

17 months agoUprev Piglit to 5036601c43fff63f7be5cd8ad7b319a5c1f6652c
Collabora's Gfx CI Team [Mon, 5 Jun 2023 00:06:30 +0000 (00:06 +0000)]
Uprev Piglit to 5036601c43fff63f7be5cd8ad7b319a5c1f6652c

https://gitlab.freedesktop.org/mesa/piglit/-/compare/d8c08d123fadb986e9a8a7887b922ff63fcff52e...5036601c43fff63f7be5cd8ad7b319a5c1f6652c

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

17 months agolavapipe: when in doubt, swizzle the swizzle
Dave Airlie [Mon, 5 Jun 2023 07:34:20 +0000 (17:34 +1000)]
lavapipe: when in doubt, swizzle the swizzle

instead of swizzling.

Fixes a bunch of broken depth/stencil swizzling tests in CTS
dEQP-VK.pipeline.monolithic.sampler.border_swizzle.s8_uint_stencil.argb.transparent_black.gather_0.no_swizzle_hint

v2: kusma had nicer ideas.

Fixes: 7826648e14105 ("lavapipe: fix depth texturing swizzle")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23428>

17 months agoci: disable Collabora's LAVA lab for maintance
Sergi Blanch Torne [Mon, 5 Jun 2023 07:28:56 +0000 (09:28 +0200)]
ci: disable Collabora's LAVA lab for maintance

This is to inform you of some planned downtime in the LAVA lab as follows:
    Start: 2023-06-05 08:00 GMT
    End: 2023-06-05 12:00 GMT

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23426>

17 months agoutil: Replace all usage of PIPE_TIMEOUT_INFINITE with OS_TIMEOUT_INFINITE
Yonggang Luo [Fri, 2 Jun 2023 09:48:20 +0000 (17:48 +0800)]
util: Replace all usage of PIPE_TIMEOUT_INFINITE with OS_TIMEOUT_INFINITE

They are exactly the same, so it's safe to do the replace
Also gen OS_TIMEOUT_INFINITE var with rusticl_mesa_bindings_rs by OS_ prefix and
include "util/os_time.h" in rusticl/rusticl_mesa_bindings.h

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23401>

17 months agoci/fedora: re-enable ccache
David Heidelberg [Thu, 1 Jun 2023 10:10:01 +0000 (12:10 +0200)]
ci/fedora: re-enable ccache

Works well with Fedora 38, the offending bug was fixed.

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

17 months agoci: use bash arrays in Fedora script + shebang change
David Heidelberg [Thu, 1 Jun 2023 09:35:00 +0000 (11:35 +0200)]
ci: use bash arrays in Fedora script + shebang change

We not passing very long string, but multiple separate packages, using
the array seems to be more logical and clear solution, without
shellcheck complaining about word spliting and risk making of accidental
mistakes (missed backslash etc.).

Shebang change, because let's have it same everywhere.

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

17 months agonv50: Fix memory leak in error path
Vinson Lee [Sat, 3 Jun 2023 23:32:44 +0000 (16:32 -0700)]
nv50: Fix memory leak in error path

Fix defect reported by Coverity Scan.

Resource leak (RESOURCE_LEAK)
leaked_storage: Variable memobj going out of scope leaks the storage it points to.

Fixes: a1571333804 ("nvc0/nv50: support and enable EXT_memory_object*")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23417>

17 months agonir: Remove unnecessary assert in nir_before_src
Friedrich Vock [Wed, 12 Apr 2023 15:15:29 +0000 (17:15 +0200)]
nir: Remove unnecessary assert in nir_before_src

This condition can occur in the wild (more specifically in RT shader
call lowering), and it is handled correctly.

Cc: mesa-stable
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22536>

17 months agonir: Rematerialize derefs in use blocks before repairing SSA
Friedrich Vock [Mon, 17 Apr 2023 13:58:39 +0000 (15:58 +0200)]
nir: Rematerialize derefs in use blocks before repairing SSA

nir_repair_ssa_impl may insert phi nodes for any deref, but if the deref mode is uniform, validation fails.
To fix this, rematerialize the derefs in the blocks they are used to avoid generating phi nodes for them.

Cc: mesa-stable
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22536>

17 months agoamd/ci: run gl(es) cts & piglit on radeonsi on vangogh
Eric Engestrom [Wed, 10 May 2023 14:47:10 +0000 (15:47 +0100)]
amd/ci: run gl(es) cts & piglit on radeonsi on vangogh

Manual/post-merge for now because radeonsi isn't a priority for the few
steamdecks that we have in CI and we need to keep them free for merging
MRs.

Signed-off-by: Eric Engestrom <eric@igalia.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22990>

17 months agodocs: Update document about pipe_prim_type with mesa_prim
Yonggang Luo [Thu, 1 Jun 2023 15:06:19 +0000 (23:06 +0800)]
docs: Update document about pipe_prim_type with mesa_prim

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23369>

17 months agocompiler: Rename shader_prim to mesa_prim and replace all usage of pipe_prim_type...
Yonggang Luo [Thu, 1 Jun 2023 15:03:34 +0000 (23:03 +0800)]
compiler: Rename shader_prim to mesa_prim and replace all usage of pipe_prim_type with mesa_prim

This is a prepare step to remove depends on p_defines.h in src/util/*

This is done by:
replace pipe_prim_type with mesa_prim
replace shader_prim with mesa_prim
replace PIPE_PRIM_MAX  with MESA_PRIM_COUNT
replace SHADER_PRIM_  with MESA_PRIM_
replace PIPE_PRIM_ with MESA_PRIM_

This patch only replace code only

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23369>

17 months agocompiler: Add SHADER_PRIM_COUNT to be SHADER_PRIM_MAX + 1
Yonggang Luo [Thu, 1 Jun 2023 13:59:37 +0000 (21:59 +0800)]
compiler: Add SHADER_PRIM_COUNT to be SHADER_PRIM_MAX + 1

This is a prepare step for replace all usage of pipe_prim_type and shader_prim with mesa_prim
And the newly added MESA_PRIM_COUNT in latter patch will equal to SHADER_PRIM_COUNT

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23369>

17 months agocompiler: Getting shader_prim to be PACKED that consistence with pipe_prim_type
Yonggang Luo [Thu, 1 Jun 2023 13:44:15 +0000 (21:44 +0800)]
compiler: Getting shader_prim to be PACKED that consistence with pipe_prim_type

This is a prepare step for replace all usage of pipe_prim_type and shader_prim with mesa_prim

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23369>

17 months agomicrosoft/compiler: Getting function impl to be consistence with decl in dxil_enums.*
Yonggang Luo [Thu, 1 Jun 2023 13:54:52 +0000 (21:54 +0800)]
microsoft/compiler: Getting function impl to be consistence with decl in dxil_enums.*

This is a prepare step for add PACKED attribute on shader_prim

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23369>

17 months agointel/tools/error2aub: Fix potential out of bounds read
Dylan Baker [Thu, 1 Jun 2023 22:32:15 +0000 (15:32 -0700)]
intel/tools/error2aub: Fix potential out of bounds read

Originally the engines size was set to I915_ENGINE_CLASS_VIDEO + 1,
where video was the largest value, and INVALID had a value of -1. Since
then a COMPUTE member was added to the enum, and the INTEL_ENGINE class
moved invalid to the last value.

CID: 1530425
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23384>

17 months agovulkan/wsi: fix double free on error condition
Iván Briano [Thu, 1 Jun 2023 21:18:21 +0000 (14:18 -0700)]
vulkan/wsi: fix double free on error condition

On error during wsi_wl_surface_create_swapchain(),
wsi_wl_swapchain_chain_free() is called, followed by vk_free() of the
recently freed chain.
Move the vk_free() to wsi_wl_swapchain_destroy() to avoid the double
free.

Fixes dEQP-VK.wsi.wayland.swapchain.simulate_oom.*

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23383>

17 months agoiris: Implement external object implicit syncronization for Xe kmd
José Roberto de Souza [Tue, 14 Feb 2023 20:23:50 +0000 (12:23 -0800)]
iris: Implement external object implicit syncronization for Xe kmd

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22544>

17 months agoiris: Add iris_implicit_sync struct and functions to do implicit synchronization...
Paulo Zanoni [Tue, 31 Jan 2023 22:01:31 +0000 (14:01 -0800)]
iris: Add iris_implicit_sync struct and functions to do implicit synchronization for Xe kmd

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22544>

17 months agoiris: Extend iris_bo_wait_syncobj() to wait on external implicit syncobj
Paulo Zanoni [Thu, 10 Nov 2022 06:47:48 +0000 (22:47 -0800)]
iris: Extend iris_bo_wait_syncobj() to wait on external implicit syncobj

This way we can guarantee that external bos are also idle in other
process.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22544>

17 months agoiris: Add functions to import and export implicit sync state
Paulo Zanoni [Tue, 31 Jan 2023 21:54:22 +0000 (13:54 -0800)]
iris: Add functions to import and export implicit sync state

Xe KMD is not going to support implicit synchronization, so we need to
use extra ioctls to import/export implicit synchronization state from
gem BOs from/to drm syncobjs.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22544>

17 months agoiris: Attach a dma-buf to bo flink
José Roberto de Souza [Tue, 13 Dec 2022 19:29:33 +0000 (11:29 -0800)]
iris: Attach a dma-buf to bo flink

Bo flink shares a bo in the same GPU between process, flink precedes
dma-buf so it lacks features like syncronization.
So to workaround that, here during iris_bo_flink() it is
attaching a dma-buf to the bo.

Then in imported process it tries to attach a dma-buf again but
as it was already create it is just ref counted.

From this point on importer and exporter can syncronize access like
any other dma-buf.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22544>

17 months agoiris: Store prime fd of external bos for Xe KMD
Paulo Zanoni [Wed, 9 Nov 2022 00:58:05 +0000 (16:58 -0800)]
iris: Store prime fd of external bos for Xe KMD

In the next patches this prime fd will be needed to do implict
synchronization in external bos for Xe KMD as it don't have implict
syncronization in KMD side.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22544>

17 months agohasvk: Use intel_ioctl() helper for GEM_SET_TILING
Dmitry Osipenko [Thu, 30 Mar 2023 18:21:24 +0000 (21:21 +0300)]
hasvk: Use intel_ioctl() helper for GEM_SET_TILING

Replace opencoded ioctl() usage with a common intel_ioctl() helper.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23399>

17 months agoanv: Use intel_ioctl() helper for GEM_SET_TILING
Dmitry Osipenko [Thu, 30 Mar 2023 18:20:42 +0000 (21:20 +0300)]
anv: Use intel_ioctl() helper for GEM_SET_TILING

Replace opencoded ioctl() usage with a common intel_ioctl() helper.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23399>

17 months agointel/dev: Use intel_ioctl() helper for GEM_SET_TILING
Dmitry Osipenko [Thu, 30 Mar 2023 18:20:22 +0000 (21:20 +0300)]
intel/dev: Use intel_ioctl() helper for GEM_SET_TILING

Replace opencoded ioctl() usage with a common intel_ioctl() helper.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23399>

17 months agoiris/bufmgr: Use intel_ioctl() helper for GEM_SET_TILING
Dmitry Osipenko [Sat, 14 Jan 2023 19:00:25 +0000 (22:00 +0300)]
iris/bufmgr: Use intel_ioctl() helper for GEM_SET_TILING

Replace opencoded ioctl() usage with a common intel_ioctl() helper.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23399>

17 months agoci: rename x86 and amd64 to x86_64, armhf to arm32, and i386 to x86_32
David Heidelberg [Fri, 26 May 2023 17:10:57 +0000 (19:10 +0200)]
ci: rename x86 and amd64 to x86_64, armhf to arm32, and i386 to x86_32

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

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23282>

17 months agodzn: Fix incremental binding of VBs
Jesse Natalie [Fri, 2 Jun 2023 18:14:37 +0000 (11:14 -0700)]
dzn: Fix incremental binding of VBs

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

17 months agodzn: Don't create D3D objects for secondary command buffers
Jesse Natalie [Thu, 1 Jun 2023 22:25:08 +0000 (15:25 -0700)]
dzn: Don't create D3D objects for secondary command buffers

We emulate secondary command buffers via record/replay, we don't
need actual D3D objects, and having them can cause debug layer errors
due to getting out of sync with the state of the Vulkan object.

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

17 months agoanv: Remove alignment to aux ratio on size of main surface
Zhang, Jianxun [Tue, 16 May 2023 21:31:05 +0000 (14:31 -0700)]
anv: Remove alignment to aux ratio on size of main surface

The existing 4KB alignment is sufficient for both 1MB and
64KB alignment requirements of CCS buffer.

Signed-off-by: Zhang, Jianxun <jianxun.zhang@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23002>

17 months agoanv: Support 1MB AUX mapping (MTL)
Zhang, Jianxun [Fri, 12 May 2023 19:32:57 +0000 (12:32 -0700)]
anv: Support 1MB AUX mapping (MTL)

Replace the hardcoded 64KB granularity with a value
provided by AUX module that returns either 64KB(TGL)
or 1MB(MTL) of the running system.

Signed-off-by: Zhang, Jianxun <jianxun.zhang@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23002>

17 months agoisl: use generated workaround helpers for Wa_1806565034
Mark Janes [Tue, 14 Mar 2023 21:50:00 +0000 (14:50 -0700)]
isl: use generated workaround helpers for Wa_1806565034

This workaround was enabled for gen12+, but only applies to gen12.0.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21912>

17 months agorusticl/device: set preferred vector size of doubles if fp64 is enabled
Karol Herbst [Fri, 2 Jun 2023 12:34:15 +0000 (14:34 +0200)]
rusticl/device: set preferred vector size of doubles if fp64 is enabled

Fixes: 400847a9900 ("rusticl/device: improve advertisement of fp64 support")
Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23391>

17 months agopvr: Implement ZLS subtile alignment
Matt Coster [Mon, 27 Feb 2023 12:33:31 +0000 (12:33 +0000)]
pvr: Implement ZLS subtile alignment

This is a workaround for the edge case where a depth buffer is smaller
than a single tile size.

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

17 months agopvr: Rename ds_{image,iview} in pvr_gfx_sub_cmd_job_init()
Matt Coster [Mon, 27 Feb 2023 12:26:53 +0000 (12:26 +0000)]
pvr: Rename ds_{image,iview} in pvr_gfx_sub_cmd_job_init()

The added prefix makes it clear we're referencing the depth/stencil
attachment.

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

17 months agopvr: Publicise some static functions from pvr_blit.c
Matt Coster [Mon, 27 Feb 2023 12:19:57 +0000 (12:19 +0000)]
pvr: Publicise some static functions from pvr_blit.c

These will be used to implement ZLS subtile alignment. One function
that was already public has also had its declaration moved from
pvr_private.h to the newly created pvr_blit.h.

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

17 months agopvr: Add pvr_image_view_get_image()
Matt Coster [Mon, 27 Feb 2023 09:08:02 +0000 (09:08 +0000)]
pvr: Add pvr_image_view_get_image()

This replaces the pattern of vk_to_pvr_image(iview->vk.image).

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

17 months agopvr: Cleanup in pvr_process_cmd_buffer()
Matt Coster [Mon, 27 Feb 2023 09:00:36 +0000 (09:00 +0000)]
pvr: Cleanup in pvr_process_cmd_buffer()

Renaming all barrier structs allows the pvr_process_event_cmd_barrier()
calls to be placed on a single line.

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

17 months agopvr: Add wait_on_previous_transfer flag to graphics subcommand
Matt Coster [Tue, 13 Dec 2022 10:12:45 +0000 (10:12 +0000)]
pvr: Add wait_on_previous_transfer flag to graphics subcommand

This inserts a barrier before the fragment job to wait on the previous
transfer job.

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

17 months agopvr: Use pvr_sub_cmd_event union members directly
Matt Coster [Fri, 20 Jan 2023 10:31:12 +0000 (10:31 +0000)]
pvr: Use pvr_sub_cmd_event union members directly

This has the benefit of replacing some explicit asserts with static type
checking.

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

17 months agopvr: Move pvr_get_isp_num_tiles_xy() to rogue_hw_utils.h
Matt Coster [Tue, 13 Dec 2022 10:05:41 +0000 (10:05 +0000)]
pvr: Move pvr_get_isp_num_tiles_xy() to rogue_hw_utils.h

Rename s/pvr/rogue/ to match the other functions in that file.

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

17 months agoradv/rt: Fix pipeline libraries
Konstantin Seurer [Fri, 19 May 2023 10:23:55 +0000 (12:23 +0200)]
radv/rt: Fix pipeline libraries

This was completely broken, because radv_create_group_handles would
access OOB stages.

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

17 months agopvr: Fix segfault in pvr_physical_device_init()
Matt Coster [Tue, 16 May 2023 08:07:48 +0000 (09:07 +0100)]
pvr: Fix segfault in pvr_physical_device_init()

This was introduced (by me) in a previous commit. Part of pdevice->vk
was initialised before calling vk_physical_device_init() which then
overwrite our values.

Fixes: 4ba553ab9ad ("pvr: Use common vkGetPhysicalDeviceFeatures2() implementation")

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

17 months agonir: print locations for per-vertex fragment shader inputs
Samuel Pitoiset [Wed, 31 May 2023 06:42:13 +0000 (08:42 +0200)]
nir: print locations for per-vertex fragment shader inputs

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23254>

17 months agonir/lower_io: add nir_intrinsic_load_input_vertex to is_input()
Samuel Pitoiset [Wed, 22 Jun 2022 07:13:46 +0000 (09:13 +0200)]
nir/lower_io: add nir_intrinsic_load_input_vertex to is_input()

To add the const offset to the base index.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23254>

17 months agospirv,nir: add support for SpvDecorationPerVertexKHR
Samuel Pitoiset [Fri, 27 May 2022 07:16:09 +0000 (09:16 +0200)]
spirv,nir: add support for SpvDecorationPerVertexKHR

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

17 months agospirv,nir: add support for BaryCoord{NoPersp}KHR builtins
Samuel Pitoiset [Thu, 12 May 2022 13:50:04 +0000 (15:50 +0200)]
spirv,nir: add support for BaryCoord{NoPersp}KHR builtins

This introduces new intrinsics nir_intrinsic_load_barycentric_coord_xxx
with 3-components instead of expanding the existing ones that are
supposed to interpolate input varyings, while BaryCoord is a sysval
on most hardware.

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

17 months agospirv: add support for SpvCapabilityFragmentBarycentricKHR
Samuel Pitoiset [Fri, 6 May 2022 12:00:40 +0000 (14:00 +0200)]
spirv: add support for SpvCapabilityFragmentBarycentricKHR

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23254>

17 months agozink: update profiles schema
Erik Faye-Lund [Wed, 31 May 2023 18:25:24 +0000 (20:25 +0200)]
zink: update profiles schema

The 0.8.1-251 release has shipped, which contains the latest bits we
need in order to be clean here. Let's bump the bumpbump-bump.

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

17 months agodraw: add (disabled) vertex dumping for non-linear emit
Mike Blumenkrantz [Wed, 31 May 2023 16:09:31 +0000 (12:09 -0400)]
draw: add (disabled) vertex dumping for non-linear emit

matches linear path

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23368>

17 months agolavapipe: don't pass indirect info in streamout draws
Mike Blumenkrantz [Wed, 31 May 2023 20:40:58 +0000 (16:40 -0400)]
lavapipe: don't pass indirect info in streamout draws

this is otherwise broken for a sequence like draw_indirect -> draw_indirect_bc

cc: mesa-stable

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23368>

17 months agolavapipe: stop setting patch vertices constantly
Mike Blumenkrantz [Wed, 31 May 2023 19:31:14 +0000 (15:31 -0400)]
lavapipe: stop setting patch vertices constantly

this pollutes gallium traces and makes debugging more annoying

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23368>

17 months agolavapipe: bump max push constant size
Mike Blumenkrantz [Tue, 30 May 2023 14:40:36 +0000 (10:40 -0400)]
lavapipe: bump max push constant size

this matches vkd3d-proton requirements

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23368>

17 months agolavapipe: fix DS3 min sample setting
Mike Blumenkrantz [Wed, 31 May 2023 19:25:41 +0000 (15:25 -0400)]
lavapipe: fix DS3 min sample setting

if a DS3 pipeline enabling dynamic samples is not bound when samples
are set dynamically, then such a pipeline is later bound, min samples
would have been incorrectly set to 1

instead, flag the update for later and do it just before draw

cc: mesa-stable

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23368>

17 months agoradv: Guard against misplaced RGP barrier markers.
Tatsuyuki Ishi [Wed, 1 Feb 2023 08:40:02 +0000 (17:40 +0900)]
radv: Guard against misplaced RGP barrier markers.

RGP will crash if we emit a layout transition marker outside a barrier.
If this happens, trigger an assertion if its enabled or silently discard
the marker otherwise to avoid traces that cannot be opened.

Also, guard against attempts to start barrier markers recursively, since
this will corrupt the internal start/end matching.

Closes: <https://gitlab.freedesktop.org/mesa/mesa/-/issues/7971>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21033>

17 months agoradv: Add RGP barrier markers for render pass transition and copy.
Tatsuyuki Ishi [Wed, 1 Feb 2023 08:27:26 +0000 (17:27 +0900)]
radv: Add RGP barrier markers for render pass transition and copy.

This allows them to be attributed to the correct event instead of being
blend to the previous barrier.

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

17 months agoradeonsi: enable aco for mono standalone vs
Qiang Yu [Fri, 28 Apr 2023 03:54:56 +0000 (11:54 +0800)]
radeonsi: enable aco for mono standalone vs

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23096>

17 months agoac/llvm: remove unused barrier implementation
Qiang Yu [Tue, 16 May 2023 02:43:41 +0000 (10:43 +0800)]
ac/llvm: remove unused barrier implementation

memory buffer barrier is still used when nir lowering, will
be removed later.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23096>

17 months agoradeonsi: always use scoped barrier
Qiang Yu [Tue, 16 May 2023 02:22:17 +0000 (10:22 +0800)]
radeonsi: always use scoped barrier

aco has removed non-scoped barrier support.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23096>

17 months agoradeonsi: use nir_umul_high for fast udiv
Qiang Yu [Thu, 11 May 2023 11:41:20 +0000 (19:41 +0800)]
radeonsi: use nir_umul_high for fast udiv

nir has dedicated alu op for it. Also for removing int64
multiply which aco does not support.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23096>