Commit Graph

151953 Commits

Author SHA1 Message Date
Mike Blumenkrantz eb8cde0d93 zink: use GENERAL layout for mixed zs fb attachments
this interaction requires read-only sampler access from
depth component with writes to the stencil component, which can only
be done in the GENERAL layout

affects:
GTF-GL46.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_functionality_color_and_stencil_blit

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716>
2022-04-06 04:49:00 +00:00
Mike Blumenkrantz fb2a08bb01 zink: update samplerview layouts for zs attachments during renderpass prep
this interaction might require layout changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716>
2022-04-06 04:49:00 +00:00
Mike Blumenkrantz c132a28745 zink: use store op NONE when necessary for depth usage
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716>
2022-04-06 04:49:00 +00:00
Mike Blumenkrantz eee8db250d zink: delete some code in get_layout_for_binding()
should be no functional changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716>
2022-04-06 04:49:00 +00:00
Mike Blumenkrantz ef99ceaec2 zink: add a ctx param to zink_descriptor_util_image_layout_eval
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716>
2022-04-06 04:49:00 +00:00
Mike Blumenkrantz 7781a75229 zink: add a renderpass flag for mixed zs layout
this indicates that the layout requires reading from the depth aspect
and writing to the stencil aspect

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716>
2022-04-06 04:49:00 +00:00
Mike Blumenkrantz f24b966d27 zink: further simplify zs case for zink_descriptor_util_image_layout_eval
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716>
2022-04-06 04:49:00 +00:00
Mike Blumenkrantz fd9a5fed16 zink: remove commented code
probably never actually going to do this since it serves no purpose

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716>
2022-04-06 04:49:00 +00:00
Mike Blumenkrantz a57b3bb82a zink: refactor zink_descriptor_util_image_layout_eval
slightly more readable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716>
2022-04-06 04:49:00 +00:00
Mike Blumenkrantz 72a63649c2 zink: use EXT_image_2d_view_of_3d
fixes #4562

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716>
2022-04-06 04:49:00 +00:00
Mike Blumenkrantz f05d0f1238 zink: unset resource layout+access when doing storage setup
the previous access info is transferred to the staging resource for the copy,
and the new image has no access info

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716>
2022-04-06 04:49:00 +00:00
Mike Blumenkrantz 65394fcaef zink: prune shader i/o
to avoid validation spam when variables are declared but never used,
eliminate persisting i/o variables which are never used

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716>
2022-04-06 04:49:00 +00:00
Mike Blumenkrantz c5f44e51fb zink: fix max geometry input component advertising
forgot to divide by 4 somehow

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716>
2022-04-06 04:49:00 +00:00
Mike Blumenkrantz 5ca6b28c58 zink: convert all 64bit vertex attribs to 32bit
this applies not only to dvec3/dvec4, but to any type of 64bit input
since that's what gallium gives us

fixes #6211

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716>
2022-04-06 04:49:00 +00:00
Mike Blumenkrantz 7cf7e113ba zink: apply fb attachment layout to dummy attachments
this doesn't actually matter but it still triggers validation spam

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716>
2022-04-06 04:49:00 +00:00
Mike Blumenkrantz e72ca7e7ac zink: clamp min viewport width to 1
fixes validation spam

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716>
2022-04-06 04:49:00 +00:00
Mike Blumenkrantz d4e91d0baa zink: handle 1bit xor as OpLogicalNotEqual
fixes more validation spam

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716>
2022-04-06 04:49:00 +00:00
Mike Blumenkrantz d1f52d300d zink: set Geometry capability for fs if geometry inputs are read
super legal.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716>
2022-04-06 04:48:59 +00:00
Mike Blumenkrantz 3f918bbd23 zink: always set stencil dynamic states before draw
these are dynamic states set on the pipeline, so they must always
be set on a cmdbuf before draw

fixes some validation spam

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716>
2022-04-06 04:48:59 +00:00
Mike Blumenkrantz 2ccb24757a zink: merge stencil test case for draw-time dynamic state
these cases were identical but using different conditionals

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716>
2022-04-06 04:48:59 +00:00
Mike Blumenkrantz b76ad3efa0 zink: only uncommit sparse pages that have been committed
avoid spamming drivers unnecessary with submits since this is expensive

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716>
2022-04-06 04:48:59 +00:00
Mike Blumenkrantz 3dcb80da9d zink: fix barrier generation for ssbo descriptors
ssbo binds are always at least readable, so without deeper shader
inspection, never assume that write binds mean no read access

this is different than image descriptors which can explicitly get
write-only access set

cc: mesa-stable

fixes #6231

THANKS TO @daniel-schuermann FOR SOLVING THIS WITH HIS INCREDIBLE TALENT AND WIT

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15697>
2022-04-05 22:47:39 -04:00
Renato Pereyra 5ec4995305 Revert "venus: Increase the base sleep of vn_relax"
This reverts commit 737937f45e.

Testing has revealed sizable performance drops arising out of this change.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15760>
2022-04-06 01:46:10 +00:00
Jason Ekstrand cc78a3a820 panvk: Enable VK_EXT_debug_report and VK_EXT_debug_utils
They're both implemented in common code as long as you use
vk_command_buffer.

Acked-by: Emma Anholt <emma@anholt.net>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15560>
2022-04-06 01:18:23 +00:00
Jason Ekstrand 29b8097408 anv: Enable VK_EXT_debug_utils
It's implemented in common code as long as you use vk_command_buffer.

Acked-by: Emma Anholt <emma@anholt.net>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15560>
2022-04-06 01:18:23 +00:00
Jason Ekstrand 77ffa61a14 lavapipe: Enable VK_EXT_debug_utils
It's implemented in common code as long as you use vk_command_buffer.

Acked-by: Emma Anholt <emma@anholt.net>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15560>
2022-04-06 01:18:23 +00:00
Jason Ekstrand bdf52654ac turnip: Enable VK_EXT_debug_utils
It's implemented in common code as long as you use vk_command_buffer.

Acked-by: Emma Anholt <emma@anholt.net>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15560>
2022-04-06 01:18:23 +00:00
Jason Ekstrand 292ceb297c v3dv: Enable VK_EXT_debug_utils
It's implemented in common code as long as you use vk_command_buffer.

Acked-by: Emma Anholt <emma@anholt.net>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15560>
2022-04-06 01:18:23 +00:00
Jason Ekstrand 3b547a9b58 lavapipe: Switch to the common sync framework
The common Vulkan sync framework will do most of the queueing for us.
It will even sort out timeline semaphore dependencies and ensure
everything executes in-order.  All we have to do is make sure our
vk_sync type implements VK_SYNC_FEATURE_WAIT_PENDING.  This lets us get
rid of a big pile of code.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15651>
2022-04-06 00:38:22 +00:00
Jason Ekstrand 2f6bca6a74 vulkan: Use timespec_add_nsec in vk_sync_timeline
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15651>
2022-04-06 00:38:22 +00:00
Jason Ekstrand 0ba22b203d util/timespec: Return overflow from timespec_add_[mn]sec()
To avoid altering any currently existing callers, we continue on with
the calculation regardless of overflow.  This also matches the behavior
of GCC's __builtin_add_overflow().

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15651>
2022-04-06 00:38:22 +00:00
Emma Anholt 591899eedd gallivm/nir: Add a short circuit uniform-offset mode for load_ssbo/load_shared.
dEQP-VK.binding_model.buffer_device_address.set3.depth3.basessbo.convertuvec2.nostore.multi.scalar.vert
runtime -24.4002% +/- 1.94375% (n=7).  The win (I think) is in LLVM not
having to chew through handling the extra loops on every constant-offset
SSBO load, not in actual rendering time.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14999>
2022-04-06 00:04:14 +00:00
Emma Anholt 181f25aff4 gallivm/nir: Add a short circuit uniform-offset mode for load_global.
If we know the offset is constant, we don't have ask LLVM to loop over the
elements pulling the same value out over and over.

This doesn't seem to have produced a win in the testcase I was looking at,
but it was an easier entrypoint to figuring out how to do scalar memory
access than load_memory, and will probably affect some workload.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14999>
2022-04-06 00:04:14 +00:00
Emma Anholt d74606d440 gallivm/nir: Refactor out some repeated code to generate 0 values.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14999>
2022-04-06 00:04:14 +00:00
Emma Anholt 4fad4c1d79 gallivm/nir: Refactor out some repeated logic for SSBO/shared access.
I needed to be able to get these pointers/limits from another location,
and missing some of the repeated steps was giving me bugs.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14999>
2022-04-06 00:04:14 +00:00
Emma Anholt 21b3db7d17 gallivm/nir: Pull some repeated exec_mask computation out of loops.
If the exec mask hasn't changed, don't hassle LLVM to set it up

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14999>
2022-04-06 00:04:14 +00:00
Emma Anholt 9ab4ecb1ae gallivm/nir: Don't do uniform-and-broadcast access on inactive invocations.
In a fragment shader or inside of control flow, invocation 0 might be
inactive, and so our use-first-invocation-and-broadcast optimizations
would be invalid, and the loop logic of an emit_read_invocation would
defeat the point of these optimized paths.

For load_kernel_input, I didn't guard the uniform path with the check
because some CL tests that are currently passing are doing the
load_kernel_input under (presumably) uniform control flow.  Instead, I
dropped in a once warning for the next person to be debugging CL.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14999>
2022-04-06 00:04:14 +00:00
Emma Anholt 04cdd41fdc util/log: Add support for logging once.
These are not data-race safe (like many other once patterns in Mesa), so
they might not log exactly once, but it should be good enough for not
spamming the console.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14999>
2022-04-06 00:04:14 +00:00
Emma Anholt ad0fcaf1ee ci/lava: Simplify passthrough of the request to upload results/ to minio.
We already have a way to pass env vars around, just use that instead of
packing/unpacking it on the kernel command line.

Cleans up HW runner job log output some more.

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15332>
2022-04-05 21:37:46 +00:00
Emma Anholt 34278e8f2e ci/deqp: Move the set +e just before the deqp-runner invocation.
You don't want to proceed to running deqp-runner if you failed at the
vtest or runner options environment setup.

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15332>
2022-04-05 21:37:46 +00:00
Emma Anholt 82cd8614e6 ci/deqp: Add gitlab-ci sections to deqp-runner.sh.
This should help highlight the actual test results, as opposed to the setup
and teardown.

Also tuned the "set -x"es a little bit so we get less surrounding noise in
the echo process.

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15332>
2022-04-05 21:37:46 +00:00
Emma Anholt 03549f3bf3 spirv: Silence "Decoration not allowed on struct members: SpvDecorationRestrict"
VK-GL-CTS causes tons of these due to a bug in glslang, to the point where
it's hard to find actual issues in test logs.  Disable the warning for
now, with a link to the issue we're waiting on being resolved.

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15332>
2022-04-05 21:37:46 +00:00
Emma Anholt 0ee0d54985 util/log: Don't print an extra \n if the format string had one.
You're not supposed to include a '\n' in mesa_log*() messages because
android logging will log what you provide on its own line anyway, so each
mesa_log() should be the body of a log line.  But also, getting everyone
to consistently not do that is hopeless because we're all so trained by
printf().  So, just detect an existing \n and don't add a new one.

Cleans up deqp-vk debug output a bunch from turnip.

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15332>
2022-04-05 21:37:46 +00:00
Mike Blumenkrantz e0b431da33 docs: update features for VK_EXT_image_2d_view_of_3d
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15757>
2022-04-05 17:08:02 -04:00
Mike Blumenkrantz 6fd344ff98 anv: expose VK_EXT_image_2d_view_of_3d
sampling only available on gen9+

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15754>
2022-04-05 20:30:31 +00:00
Mike Blumenkrantz 8b5c9e7c81 lavapipe: expose VK_EXT_image_2d_view_of_3d
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15754>
2022-04-05 20:30:31 +00:00
Mike Blumenkrantz 9a6ea51388 vulkan: check 3D image type for VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15754>
2022-04-05 20:30:31 +00:00
Connor Abbott b91b90c256 tu: Expose VK_KHR_maintenance4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15488>
2022-04-05 17:46:35 +00:00
Connor Abbott 5eb63d825f tu: Remove tu_pipeline::layout
This makes it more obvious that the layout is never used after creating
the pipeline, which is required by VK_KHR_maintenance4.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15488>
2022-04-05 17:46:35 +00:00
Connor Abbott 7455a7a44c tu: Fill out maxBufferSize
It seems this is really a workaround for silly issues in
GetBufferMemoryRequirements when you ask for a really large buffer. Just
expose the maximum possible size ATM.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15488>
2022-04-05 17:46:35 +00:00