Commit Graph

177704 Commits

Author SHA1 Message Date
Konstantin Seurer
028ba76a00 radv/ci: Document new flake
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25140>
2023-09-11 16:33:31 +00:00
Paulo Zanoni
0c29b7aeaf anv: remove misleading comment about batch_len
We don't fill batch_len later when chaining batches. But that doesn't
seem to be a problem, I checked i915.ko and nothing Gen8+ seems to use
batch_len. The new xe.ko exec ioctl doesn't even ask for batch_len.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24681>
2023-09-11 16:04:02 +00:00
Paulo Zanoni
9a7c6ae32c anv/xe: return failure in case waiting for the vm_bind syncobj fails
Don't hide failures, we have xe.ko bugs related to that, such as:
    https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/496

The bind ioctl may fail if the application does something wrong, but
the wait really should never fail.

v2: Don't print an error message (Lionel).

Reviewed-by: José Roberto de Souza <jose.souza@intel.com> (v1)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24681>
2023-09-11 16:04:02 +00:00
Paulo Zanoni
935a1d2c8f anv/xe: make vm_binds async
Our sparse implementation will require us to issue partial unbinds,
but partial unbinds are not supported in synchronous vm_bind ioctls,
requiring us to to have our VM be marked with the ASYNC flag. This is
not properly documented and is subject to change in the next
iterations of the API.

Error handling with async binds is also not documented anywhere and is
being actively discussed in the mailing lists, so whatever we decide
to implement here is likely to end up changing in a few weeks. Also, I
haven't seen these errors happening in the real world, so for now
they're a very corner case. So for now just foward errors to
user-space and hope things work.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24681>
2023-09-11 16:04:01 +00:00
Paulo Zanoni
7018e64d79 anv: add a new vm_bind vfunc
For Sparse Resources we need to be able to specify the address, size
and offsets and we also want to be able to issue multiple binds at the
same time. Extend xe_vm_bind_op() to handle those cases and add
the new vfunc.

v2:
 - use STACK_ARRAY() (Lionel)
 - no more need to work around xe.ko bug that was fixed (José)

Reviewed-by: José Roberto de Souza <jose.souza@intel.com> (v1)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24681>
2023-09-11 16:04:01 +00:00
Paulo Zanoni
a54451075d anv: rename the vm_bind vfuncs
The only driver that has a vm_bind ioctl is xe.ko, and its vm_bind
ioctl is not called GEM vm_bind, it's just DRM_IOCTL_XE_VM_BIND
(without GEM anywhere). Back when i915.ko was going to have a vm_bind
ioctl it had GEM on its name, so I guess that's how "gem" appeared in
the naming here, but now nothing does, so let's get rid of it.

Also, these vfuncs we have are specifically made to bind and unbind
whole BOs, so rename them to vm_bind_bo() and vm_unbind_bo() in order
to try to clarify what they mean. The goal is to add a more generic
vm_bind() later that can do anything.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24681>
2023-09-11 16:04:01 +00:00
Xaver Hugl
0a1ccd4a9a vulkan wsi: add support for PresentOptionAsyncMayTear
This commit adds tearing support for Xwayland

Signed-off-by: Xaver Hugl <xaver.hugl@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19125>
2023-09-11 15:25:25 +00:00
Mike Blumenkrantz
39aa483760 zink: set optimal_keys for turnip jobs
nobody cares about stipple on turnip for real world scenarios, so
testing it instead of the thing that people will actually want is pointless

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25037>
2023-09-11 14:48:31 +00:00
Mike Blumenkrantz
cf66ed2dec zink: imply ZINK_DEBUG=quiet if ZINK_DEBUG=optimal_keys is set on turnip
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25037>
2023-09-11 14:48:31 +00:00
Mike Blumenkrantz
1e1f58c1ac zink: add ZINK_DEBUG=quiet
mainly for use with ZINK_DEBUG=optimal_keys on turnip since spamming
a warning like that constantly is pointless

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25037>
2023-09-11 14:48:31 +00:00
Daniel Stone
cb76e90793 ci/zink: Add new zink-lvp flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25149>
2023-09-11 14:10:23 +00:00
Daniel Stone
f5c80f001b ci/intel: Add new skqp flake
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25149>
2023-09-11 14:10:23 +00:00
Daniel Stone
077e2da21e ci/d3d12: Add new flake
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25149>
2023-09-11 14:10:23 +00:00
Daniel Stone
abb612ec1f ci/radeonsi: Add new flake
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25149>
2023-09-11 14:10:23 +00:00
Daniel Stone
9dbc8a7ee3 ci: Declare stages before jobs
It looks like GitLab 16.x requires us to declare the stages before we
declare any jobs, else it falls down resolving 'needs' with 'job is not
in any earlier stage'.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25149>
2023-09-11 14:10:23 +00:00
Alba Mendez
e3aab80d4f meson: support installation tags
the only thing missing is to tag custom install targets, namely:
 - ICDs (vulkan, glvnd, OpenCL, VA-API, VDPAU)
 - Vulkan layers
 - custom install script for megadrivers
 - drirc file

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24911>
2023-09-11 13:00:45 +00:00
Iago Toral Quiroga
05e80e1a5e v3dv: expand sampling from linear image hack to support multi-planar images
Tested-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25048>
2023-09-11 12:04:35 +00:00
Iago Toral Quiroga
95f881adbd v3dv: add support for sampling simple 2D linear textures
V3D can't sample linear images (other than 1D), however, some applications
will require this to work. Particularly, our swapchain images may need to be
linear (for display), so sampling from them won't work.

This change detects the case where we are binding a descriptor which attempts
to sample from a simple 2D linear texture, transparently creates a tiled
copy of the image and rewrites the  descriptor to refer to the tiled image
instead. This will be slow but will allow some applications that require this
to work (i.e. some aspects of Android's user interface).

As of this patch, this only supports sampling linear images with a single
miplevel and layer from single-plane images in non-arrayed descriptors. We
could handle other cases too with a bit more work though.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9712
Tested-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25048>
2023-09-11 12:04:35 +00:00
Sergi Blanch Torne
151f78150b Revert "ci: disable Collabora's LAVA lab for maintance"
This reverts commit c558c49550

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25143>
2023-09-11 11:26:30 +00:00
Roman Stratiienko
d74d017f7d v3dv: Rely on the internal tiled flag instead of the common vk structure
Common vk.tiling can have 3 states:

VK_IMAGE_TILING_OPTIMAL = 0,
VK_IMAGE_TILING_LINEAR = 1,
VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT = 1000158000,

The latter is checked by [1]

In this case, actual tiling can be either linear or tiled;
therefore, logic in v3dv_meta_copy will not work correctly.

[1]: 39fca243bb/src/vulkan/runtime/vk_image.c (L158)

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25139>
2023-09-11 11:08:04 +00:00
Connor Abbott
a03525d8db tu: Split program draw state into per-shader states
This completely rewrites how uploading variants and emitting the program
state works, which will make fast linking significantly faster and lays
some of the groundwork for EXT_shader_objects. Variants are now
compiled and uploaded as part of creating a tu_shader, and a
a per-stage draw state is also created that contains all registers that
are only set based on one stage. The program state is split into
per-stage states, which come from the shaders, and VPC state which is
emitted at linking time. Pipelines now contain shaders, and importing
shaders from libraries when fast-linking just involves taking a
reference on the shader. While the command buffer code still uses the
old pipeline structures, the plan is to switch more and more things to
directly use the shaders or derived state from the shaders that gets set
by the pipeline, so that we can eliminate pipeline usage from
tu_cmd_buffer.cc to enable ESO.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25076>
2023-09-11 10:34:11 +00:00
Connor Abbott
a80f026073 ir3: Add helper to determine when variant exceeds safe constlen
This will help us not compile extra variants as often in the unlinked
case, which will become the only case on turnip.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25076>
2023-09-11 10:34:11 +00:00
Connor Abbott
252aee2634 freedreno, ir3, tu: Constify various uses of ir3_shader_variant
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25076>
2023-09-11 10:34:10 +00:00
Connor Abbott
d1b333a0b5 tu: Split up tu6_emit_vpc()
This started out as a place to set linkage-related registers, but it
gradually became a grab-bag of different things. In the future each
stage will have its own draw state, so we split out the parts that only
depend on a single stage into separate functions. Each piece of state we
can split out is another piece of state that won't have to be emitted
while fast-linking.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25076>
2023-09-11 10:34:10 +00:00
Connor Abbott
211aeb2dda ir3: Add ir3_find_input_loc() helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25076>
2023-09-11 10:34:10 +00:00
Connor Abbott
0d82f92942 tu: Pull entangled shader state into program config
There are a few cross-stage states that we absolutely have to wait to
emit until we know more than one stage. Pull these into the program
config draw state, so that we can split up the program draw state into a
per-stage draw state. For VK_EXT_shader_object, these will have to
emitted at draw time.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25076>
2023-09-11 10:34:10 +00:00
Connor Abbott
5666758820 tu, freedreno/a6xx: Don't use VS for PrimID passthru state
Emit the registers solely based on whether FS reads PrimID, and assume
the HW will do the right thing and disable PrimID passthru when GS is
enabled. This untangles these registers so we can set them from the FS
draw state in the future.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25076>
2023-09-11 10:34:10 +00:00
Connor Abbott
b312155cc5 tu: Rename PrimID-related registers
It turns out that the hardware automatically selects whether PrimID
passthrough needs to happen based on whether GS is enabled, which means
that it's safe to always set these registers based whether PrimID is
read by the FS and the hardware will ignore them when GS is enabled. Use
the real names for these registers to make it less confusing when we
start to do that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25076>
2023-09-11 10:34:10 +00:00
Connor Abbott
979cf7bac0 tu: Merge depth/stencil draw states
This removes more draw states that are commonly set together. We still
have a separate draw state for RB_DEPTH_CNTL, because it depends on
other things like the attachment state and depth clamp and it would be
more difficult for layers like zink to use a combined depth/stencil
state.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25076>
2023-09-11 10:34:10 +00:00
Connor Abbott
3a1f7c61b6 tu: Stop reusing base Vulkan dynamic state enums
We're about to remove the 1:1 correspondance between base Vulkan 1.0
dynamic states and draw states.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25076>
2023-09-11 10:34:10 +00:00
Connor Abbott
1f88c9c5a4 tu: Merge PC_RASTER_CNTL into RAST draw state
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25076>
2023-09-11 10:34:10 +00:00
Connor Abbott
51ba8d4331 tu: Merge SAMPLE_LOCATIONS and SAMPLE_LOCATIONS_ENABLE draw states
There's no need to separate them except that it was easier before, no
one will enable the second without also enabling the first. Now that
mesa will merge the states for us we can go ahead and merge them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25076>
2023-09-11 10:34:09 +00:00
Connor Abbott
d3ab5b68d5 tu: Remove MSAA draw state
We only need to emit MSAA state once per subpass at most, unless the
pipeline switches primitive types or for framebuffer-less subpasses
(which always use sysmem anyway). Therefore it seems like draw state
skipping isn't going to bring much benefit here, and having it as a draw
state in the first place is a remnant of how this used to be part of the
pipeline state.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25076>
2023-09-11 10:34:09 +00:00
Iván Briano
8179b6fcf4 anv: tell blorp to do mesh stuff only if it's enabled
Otherwise blorp operations will set dirty bits for mesh that we don't
expect at pipeline state emission time.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25109>
2023-09-11 10:08:44 +00:00
Iván Briano
3d7153afdf anv: ensure pipelines have all state
While we don't need to emit all of the unused mesh/task states when mesh
is disabled, if we don't have them we fail some assertions in the
difference checks due to the corresponding state being empty.
This may happen when going from a mesh pipeline to a non-mesh one, or
one that uses task shaders to one that doesn't.

It may be possible to avoid having to do this, but I'd rather start from
a working state and optimize it later.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25109>
2023-09-11 10:08:44 +00:00
Iván Briano
3fb3752e33 anv: fix missing 3DSTATE_SBE_CLIP emission
Fixes: 50f6903bd9 ("anv: add new low level emission & dirty state tracking")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25109>
2023-09-11 10:08:44 +00:00
Lionel Landwerlin
05ebfa5463 anv: fix missing 3DSTATE_SBE_MESH emission
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 50f6903bd9 ("anv: add new low level emission & dirty state tracking")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25109>
2023-09-11 10:08:44 +00:00
Lionel Landwerlin
a023897cd3 anv: ensure partially packed instructions are emitted in the pipeline
Any partially packed instructions should always be pre-packed by
genX_pipeline.c

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25109>
2023-09-11 10:08:44 +00:00
Lionel Landwerlin
f5344a6b1c anv: ensure mesh pipeline have all pre-rasterization stages disabled
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 44656f98d5 ("anv: split pipeline programming into instructions")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25109>
2023-09-11 10:08:44 +00:00
Lionel Landwerlin
80feff8559 anv: emit 3DSTATE_URB_ALLOC_(MESH|TASK) only when mesh shaders are enabled
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25109>
2023-09-11 10:08:44 +00:00
Lionel Landwerlin
ef8f28403f anv: fix 3DSTATE_VFG emission
3DSTATE_VFG was moved into a section that only gets emitted for legacy
pipelines, not mesh pipelines.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 0ce772bd19 ("anv: split 3DSTATE_VFG emission")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25109>
2023-09-11 10:08:44 +00:00
Ganesh Belgur Ramachandra
51773d135d radeonsi: sets OPTIMAL_BIN_SELECTION to 0 if using bottom_edge_rule
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24725>
2023-09-11 04:24:41 -05:00
Ganesh Belgur Ramachandra
86b4fe5d68 radeonsi: stores bottom_edge_rule option in the rasterizer state
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24725>
2023-09-11 04:23:59 -05:00
Corentin Noël
c558c49550 ci: disable Collabora's LAVA lab for maintenance
This is to inform you of some planned downtime in the LAVA lab as follows:

* Start: 2023-09-11 08:00 BST (UTC+1)
* End: 2023-09-11 12:00 BST (UTC+1)

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25141>
2023-09-11 07:42:26 +00:00
Samuel Pitoiset
729cb4004a radv: fix enabling DGCC
This was broken if only DGC (graphics) is enabled.

Fixes: 559da06755 ("radv: implement NV_device_generated_commands_compute")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25126>
2023-09-11 07:13:10 +00:00
Dave Airlie
2d4fe5f229 clover/llvm: move to modern pass manager.
This seems like it should work, but I haven't tested it yet.

Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24879>
2023-09-11 13:04:07 +10:00
Erico Nunes
cb1c88d41f lima: fix plbu block stride calculation
For some specific texture sizes, notably some texture sizes with width
4096, block stride calculation could end up calculating stride 256 which
is an invalid value.
In those specific cases, this could cause rendering artifacts or
application/driver crashes.

Cc: mesa-stable

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25084>
2023-09-10 20:41:24 +00:00
Konstantin Seurer
df710fe695 radv/rt: Enable monolithic pipelines
Store can_inline inside the stages to avoid rerunning the analysis pass
for library stages.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21929>
2023-09-10 11:40:12 +00:00
Konstantin Seurer
f2514e75f0 radv/rt: Add monolithic raygen lowering
Ray traversal is inlined to allow for constant folding and avoid
spilling.

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21929>
2023-09-10 11:40:12 +00:00
Konstantin Seurer
e039e3cd76 radv/rt: Store NIR shaders separately
In order to compile monolithic shaders with pipeline libraries, we need
to keep the NIR around for inlining recursive stages.

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21929>
2023-09-10 11:40:12 +00:00