Commit Graph

177720 Commits

Author SHA1 Message Date
Rob Clark
c4c76b72e1 freedreno/a6xx: ARB_shader_viewport_layer_array
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24999>
2023-09-11 19:45:19 +00:00
Rob Clark
0bb34e49ec freedreno/a6xx: Handle PIPE_BIND_BLENDABLE
We weren't advertising EXT_float_blend due to missing handling for the
BLENDABLE usage bit.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24999>
2023-09-11 19:45:19 +00:00
Rob Clark
e6b5e965cc freedreno/a6xx: Use pipe_blit_info::sample0_only
Instead of trying to pass this back-door, and failing in a few cases we
go thru generic paths.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24999>
2023-09-11 19:45:19 +00:00
Rob Clark
c1a188ad4f freedreno/a6xx: EXT_depth_bounds_test
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24999>
2023-09-11 19:45:19 +00:00
Rob Clark
43c77244d9 freedreno/a6xx: EXT_shader_image_load_formatted
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24999>
2023-09-11 19:45:19 +00:00
Rob Clark
6df5f3d4f1 freedreno/a6xx: EXT_demote_to_helper_invocation
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24999>
2023-09-11 19:45:19 +00:00
Rob Clark
babe8a10d9 freedreno/a6xx: ARB_texture_filter_minmax
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24999>
2023-09-11 19:45:19 +00:00
Rob Clark
286b7723f0 freedreno/a6xx: ARB_sample_locations
Note, gl_SamplePosition (rgetpos), and therefore interpolateAtSample(),
doesn't work with sample location_enable=true.  For vulkan, "If the
current pipeline uses custom sample locations the value of any variable
decorated with the SamplePosition built-in decoration is undefined."
But ARB_sample_positions doesn't mention this.  Possibly the vk text
should be backported to the gl extension.  (If the app is specifying the
sample locations, it shouldn't need gl_SamplePosition.)

The upshot of this is 2 out of 3 tests that piglit arb_sample_locations
test tests fail, even though sample locations itself is working.
Possibly the test should be updated.  Or we could use driconf to hide
ARB_gpu_shader5 and ARB_sample_shading from this test.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24999>
2023-09-11 19:45:19 +00:00
Rob Clark
fd00e99444 freedreno/a6xx: ARB_post_depth_coverage
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24999>
2023-09-11 19:45:19 +00:00
Rob Clark
eb3cb03bbe freedreno: Implement ATI_meminfo
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24999>
2023-09-11 19:45:19 +00:00
Rob Clark
c2e8b52922 freedreno/a6xx: Re-write the function-of-doom
Re-write the program state building to align more closely with turnip,
for easier comparision.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24999>
2023-09-11 19:45:19 +00:00
Rob Clark
9b2780dcaf freedreno/a6xx: Re-work fd6_emit_shader
Shuffle around a bit of the state emit, so that it more closely matches
tu_emit_xs().

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24999>
2023-09-11 19:45:19 +00:00
Rob Clark
a11e3f35df freedreno/a6xx: Drop unused screen args
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24999>
2023-09-11 19:45:19 +00:00
Rob Clark
71fe3f1073 ir3+tu: Simplify ir3_find_sysval_regid callers
The test for NULL shader stage is pretty common so just move it into
ir3_find_sysval_regid().

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24999>
2023-09-11 19:45:18 +00:00
Pavel Ondračka
38694b7386 r300: reduce number of iterations for vertex shader loops
Using the default value leads to occasional hangs on RV516 for unknown
reasons. Set it to 128 insted of 255.

dEQP and piglit are still happy and I don't expect any real app to hit
this, but lets see. As a side effect this boosts fps in the apps that
have non-unrollable vertex shaders (as the shaders now effectivelly run
almost two times faster) and ~5% dEQP runtime decrease.

Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7934
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20873>
2023-09-11 19:30:52 +00:00
Chia-I Wu
ccd3bb4548 winsys/radeon: fix a race between bo import and destroy
This is similar to commit 85e74944c6 ("winsys/amdgpu: fix a race
between import and destroy") but for winsys/radeon.  In short, we need
to check the reference count again after bo_handles_mutex is held.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25133>
2023-09-11 19:11:29 +00:00
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