platform/upstream/mesa.git
2 years agoturnip: Correctly store separate stencil in gmem store
Danylo Piliaiev [Wed, 23 Mar 2022 12:09:36 +0000 (14:09 +0200)]
turnip: Correctly store separate stencil in gmem store

- When resolving d32s8 to s8 we stored stencil with a wrong format.
- For unaligned multi-sample store we used wrong gmem offset for stencil.

If unaligined store is forced this change fixes a hang in:
 dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d32_sfloat_s8_uint_separate_layouts.compatibility_depth_zero_stencil_zero_testing_stencil

Fixes: b157a5d0d68ee8a1b4cb862a56b97bd881841413
("tu: Implement non-aligned multisample GMEM STORE_OP_STORE")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15532>

2 years agoradv: enable VK_KHR_pipeline_library
Samuel Pitoiset [Mon, 4 Apr 2022 16:05:10 +0000 (18:05 +0200)]
radv: enable VK_KHR_pipeline_library

This has been initially implemented for raytracing but
VK_EXT_graphics_pipeline_library requires it.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15737>

2 years agozink: use GENERAL layout for mixed zs fb attachments
Mike Blumenkrantz [Tue, 5 Apr 2022 19:03:25 +0000 (15:03 -0400)]
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>

2 years agozink: update samplerview layouts for zs attachments during renderpass prep
Mike Blumenkrantz [Tue, 5 Apr 2022 19:02:29 +0000 (15:02 -0400)]
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>

2 years agozink: use store op NONE when necessary for depth usage
Mike Blumenkrantz [Tue, 5 Apr 2022 19:00:16 +0000 (15:00 -0400)]
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>

2 years agozink: delete some code in get_layout_for_binding()
Mike Blumenkrantz [Tue, 5 Apr 2022 18:57:01 +0000 (14:57 -0400)]
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>

2 years agozink: add a ctx param to zink_descriptor_util_image_layout_eval
Mike Blumenkrantz [Tue, 5 Apr 2022 18:56:24 +0000 (14:56 -0400)]
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>

2 years agozink: add a renderpass flag for mixed zs layout
Mike Blumenkrantz [Tue, 5 Apr 2022 18:55:05 +0000 (14:55 -0400)]
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>

2 years agozink: further simplify zs case for zink_descriptor_util_image_layout_eval
Mike Blumenkrantz [Tue, 5 Apr 2022 18:13:44 +0000 (14:13 -0400)]
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>

2 years agozink: remove commented code
Mike Blumenkrantz [Tue, 5 Apr 2022 18:12:03 +0000 (14:12 -0400)]
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>

2 years agozink: refactor zink_descriptor_util_image_layout_eval
Mike Blumenkrantz [Tue, 5 Apr 2022 18:11:40 +0000 (14:11 -0400)]
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>

2 years agozink: use EXT_image_2d_view_of_3d
Mike Blumenkrantz [Tue, 5 Apr 2022 20:03:08 +0000 (16:03 -0400)]
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>

2 years agozink: unset resource layout+access when doing storage setup
Mike Blumenkrantz [Tue, 5 Apr 2022 16:09:02 +0000 (12:09 -0400)]
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>

2 years agozink: prune shader i/o
Mike Blumenkrantz [Tue, 5 Apr 2022 14:40:27 +0000 (10:40 -0400)]
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>

2 years agozink: fix max geometry input component advertising
Mike Blumenkrantz [Mon, 4 Apr 2022 21:00:26 +0000 (17:00 -0400)]
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>

2 years agozink: convert all 64bit vertex attribs to 32bit
Mike Blumenkrantz [Mon, 4 Apr 2022 16:41:10 +0000 (12:41 -0400)]
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>

2 years agozink: apply fb attachment layout to dummy attachments
Mike Blumenkrantz [Mon, 4 Apr 2022 15:50:25 +0000 (11:50 -0400)]
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>

2 years agozink: clamp min viewport width to 1
Mike Blumenkrantz [Mon, 4 Apr 2022 15:03:38 +0000 (11:03 -0400)]
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>

2 years agozink: handle 1bit xor as OpLogicalNotEqual
Mike Blumenkrantz [Mon, 4 Apr 2022 14:09:09 +0000 (10:09 -0400)]
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>

2 years agozink: set Geometry capability for fs if geometry inputs are read
Mike Blumenkrantz [Fri, 1 Apr 2022 17:37:52 +0000 (13:37 -0400)]
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>

2 years agozink: always set stencil dynamic states before draw
Mike Blumenkrantz [Fri, 1 Apr 2022 17:26:28 +0000 (13:26 -0400)]
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>

2 years agozink: merge stencil test case for draw-time dynamic state
Mike Blumenkrantz [Fri, 1 Apr 2022 17:25:49 +0000 (13:25 -0400)]
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>

2 years agozink: only uncommit sparse pages that have been committed
Mike Blumenkrantz [Fri, 1 Apr 2022 12:01:32 +0000 (08:01 -0400)]
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>

2 years agozink: fix barrier generation for ssbo descriptors
Mike Blumenkrantz [Thu, 31 Mar 2022 15:29:36 +0000 (11:29 -0400)]
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>

2 years agoRevert "venus: Increase the base sleep of vn_relax"
Renato Pereyra [Wed, 6 Apr 2022 01:02:46 +0000 (18:02 -0700)]
Revert "venus: Increase the base sleep of vn_relax"

This reverts commit 737937f45e4231dd596780a856270693566de658.

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

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

2 years agopanvk: Enable VK_EXT_debug_report and VK_EXT_debug_utils
Jason Ekstrand [Thu, 24 Mar 2022 16:33:46 +0000 (11:33 -0500)]
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>

2 years agoanv: Enable VK_EXT_debug_utils
Jason Ekstrand [Thu, 24 Mar 2022 16:33:19 +0000 (11:33 -0500)]
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>

2 years agolavapipe: Enable VK_EXT_debug_utils
Jason Ekstrand [Thu, 24 Mar 2022 16:32:46 +0000 (11:32 -0500)]
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>

2 years agoturnip: Enable VK_EXT_debug_utils
Jason Ekstrand [Thu, 24 Mar 2022 16:32:32 +0000 (11:32 -0500)]
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>

2 years agov3dv: Enable VK_EXT_debug_utils
Jason Ekstrand [Thu, 24 Mar 2022 16:32:01 +0000 (11:32 -0500)]
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>

2 years agolavapipe: Switch to the common sync framework
Jason Ekstrand [Tue, 29 Mar 2022 19:07:18 +0000 (14:07 -0500)]
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>

2 years agovulkan: Use timespec_add_nsec in vk_sync_timeline
Jason Ekstrand [Tue, 29 Mar 2022 18:14:27 +0000 (13:14 -0500)]
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>

2 years agoutil/timespec: Return overflow from timespec_add_[mn]sec()
Jason Ekstrand [Thu, 31 Mar 2022 15:44:56 +0000 (10:44 -0500)]
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>

2 years agogallivm/nir: Add a short circuit uniform-offset mode for load_ssbo/load_shared.
Emma Anholt [Thu, 10 Feb 2022 23:05:19 +0000 (15:05 -0800)]
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>

2 years agogallivm/nir: Add a short circuit uniform-offset mode for load_global.
Emma Anholt [Thu, 10 Feb 2022 22:29:13 +0000 (14:29 -0800)]
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>

2 years agogallivm/nir: Refactor out some repeated code to generate 0 values.
Emma Anholt [Thu, 10 Feb 2022 22:47:42 +0000 (14:47 -0800)]
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>

2 years agogallivm/nir: Refactor out some repeated logic for SSBO/shared access.
Emma Anholt [Thu, 10 Feb 2022 22:15:01 +0000 (14:15 -0800)]
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>

2 years agogallivm/nir: Pull some repeated exec_mask computation out of loops.
Emma Anholt [Thu, 10 Feb 2022 19:27:31 +0000 (11:27 -0800)]
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>

2 years agogallivm/nir: Don't do uniform-and-broadcast access on inactive invocations.
Emma Anholt [Fri, 11 Feb 2022 17:12:10 +0000 (09:12 -0800)]
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>

2 years agoutil/log: Add support for logging once.
Emma Anholt [Fri, 18 Feb 2022 18:49:24 +0000 (10:49 -0800)]
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>

2 years agoci/lava: Simplify passthrough of the request to upload results/ to minio.
Emma Anholt [Thu, 10 Mar 2022 22:21:53 +0000 (14:21 -0800)]
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>

2 years agoci/deqp: Move the set +e just before the deqp-runner invocation.
Emma Anholt [Thu, 10 Mar 2022 20:56:17 +0000 (12:56 -0800)]
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>

2 years agoci/deqp: Add gitlab-ci sections to deqp-runner.sh.
Emma Anholt [Thu, 10 Mar 2022 20:53:22 +0000 (12:53 -0800)]
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>

2 years agospirv: Silence "Decoration not allowed on struct members: SpvDecorationRestrict"
Emma Anholt [Thu, 10 Mar 2022 20:39:24 +0000 (12:39 -0800)]
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>

2 years agoutil/log: Don't print an extra \n if the format string had one.
Emma Anholt [Thu, 10 Mar 2022 20:30:16 +0000 (12:30 -0800)]
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>

2 years agodocs: update features for VK_EXT_image_2d_view_of_3d
Mike Blumenkrantz [Tue, 5 Apr 2022 21:08:02 +0000 (17:08 -0400)]
docs: update features for VK_EXT_image_2d_view_of_3d

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

2 years agoanv: expose VK_EXT_image_2d_view_of_3d
Mike Blumenkrantz [Tue, 5 Apr 2022 12:40:34 +0000 (08:40 -0400)]
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>

2 years agolavapipe: expose VK_EXT_image_2d_view_of_3d
Mike Blumenkrantz [Tue, 5 Apr 2022 12:39:59 +0000 (08:39 -0400)]
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>

2 years agovulkan: check 3D image type for VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT
Mike Blumenkrantz [Tue, 5 Apr 2022 12:39:34 +0000 (08:39 -0400)]
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>

2 years agotu: Expose VK_KHR_maintenance4
Connor Abbott [Fri, 18 Mar 2022 14:51:40 +0000 (15:51 +0100)]
tu: Expose VK_KHR_maintenance4

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

2 years agotu: Remove tu_pipeline::layout
Connor Abbott [Fri, 18 Mar 2022 13:46:43 +0000 (14:46 +0100)]
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>

2 years agotu: Fill out maxBufferSize
Connor Abbott [Fri, 18 Mar 2022 13:36:11 +0000 (14:36 +0100)]
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>

2 years agotu: Implement GetDevice*MemoryRequirements()
Connor Abbott [Fri, 18 Mar 2022 13:13:47 +0000 (14:13 +0100)]
tu: Implement GetDevice*MemoryRequirements()

Based mostly on anv, which is a bit more optimized than radv - we at
allocate the image on the stack.

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

2 years agoci: do not specify c_std and cpp_std for windows-build
Erik Faye-Lund [Fri, 1 Apr 2022 07:13:36 +0000 (09:13 +0200)]
ci: do not specify c_std and cpp_std for windows-build

When parts of the tree needs later c and c++ versions, they should ask
for it in the build-system itself, not expect the user to ask for it on
the command-line instead. So let's not paper over things by specifying
them here.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15706>

2 years agodozen: require c++20 for designated initializers
Erik Faye-Lund [Fri, 1 Apr 2022 07:07:40 +0000 (09:07 +0200)]
dozen: require c++20 for designated initializers

We do require C++20 still, because designated initializers is part of
that standard. This is almost a revert, but conditionally selecting
between c++latest or c++20 when available, as that's what we really want.

Fixes: 55ca1c8db37 ("vulkan/microsoft: Remove `override_options: ['cpp_std=c++latest']` option for visual studio")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15706>

2 years agonir/tests: do not use designated initializers in c++ code
Erik Faye-Lund [Fri, 1 Apr 2022 08:34:11 +0000 (10:34 +0200)]
nir/tests: do not use designated initializers in c++ code

Designated initializers require C++20, which is a bit easier said than
done to support well across meson versions. Let's avoid using them
for now instead.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15706>

2 years agoaco: do not use designated initializers
Erik Faye-Lund [Mon, 4 Apr 2022 08:54:07 +0000 (10:54 +0200)]
aco: do not use designated initializers

Designated initializers are a C++20 feature, but we don't use C++20. In
fact, enabling C++20 for ACO triggers new compiler errors due to some
equality semantics details.

So let's instead stop using designated initializers here.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15706>

2 years agofrontends/va: fix decode issues introduced by efc change
Thong Thai [Fri, 25 Mar 2022 00:21:19 +0000 (20:21 -0400)]
frontends/va: fix decode issues introduced by efc change

Fixes: 96025265689 ("frontends/va: add encoder format conversion (EFC) support")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6153
Signed-off-by: Thong Thai <thong.thai@amd.com>
Tested-by: Andrew Falcon <bluestang2006@gmail.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15717>

2 years agoradv: Remove radv_util.c
Konstantin Seurer [Sun, 3 Apr 2022 11:25:44 +0000 (13:25 +0200)]
radv: Remove radv_util.c

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15725>

2 years agovulkan: spec update to 1.3.211
Mike Blumenkrantz [Tue, 5 Apr 2022 12:36:26 +0000 (08:36 -0400)]
vulkan: spec update to 1.3.211

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

2 years agopanfrost: Don't crash on panfrost_bo_create() with size==0 invocation
Roman Stratiienko [Mon, 4 Apr 2022 17:52:59 +0000 (20:52 +0300)]
panfrost: Don't crash on panfrost_bo_create() with size==0 invocation

1. Clamp bucket_index from both ends to avoid returning negative index.
2. Return NULL in case BO allocation/fetching failure to prevent invalid
   bo mapping.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6247
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15748>

2 years agoradv: only declare dynamic states that are used by internal operations
Samuel Pitoiset [Fri, 1 Apr 2022 09:44:26 +0000 (11:44 +0200)]
radv: only declare dynamic states that are used by internal operations

Initialize some default static PSO states instead.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15729>

2 years agoradv: use radv_dynamic_state for saving/restoring meta operations
Samuel Pitoiset [Mon, 4 Apr 2022 06:11:40 +0000 (08:11 +0200)]
radv: use radv_dynamic_state for saving/restoring meta operations

Instead of duplicating every fields.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15729>

2 years agoradv: save/restore more dynamic states during internal driver operations
Samuel Pitoiset [Mon, 4 Apr 2022 06:09:56 +0000 (08:09 +0200)]
radv: save/restore more dynamic states during internal driver operations

This doesn't fix anything known but it could happen in theory.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15729>

2 years agoradv/ci: update CI lists against CTS 1.3.1.1
Samuel Pitoiset [Tue, 5 Apr 2022 06:37:27 +0000 (08:37 +0200)]
radv/ci: update CI lists against CTS 1.3.1.1

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

2 years agovenus: add VK_EXT_{conditional_rendering,index_type_uint8} extensions
Igor Torrente [Tue, 29 Mar 2022 14:59:49 +0000 (11:59 -0300)]
venus: add VK_EXT_{conditional_rendering,index_type_uint8} extensions

Implements all the necessary code in the device initialization
and extensions functions.

Signed-off-by: Igor Torrente <igor.torrente@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15652>

2 years agovenus: Update venus-protocol to add two new extensions
Igor Torrente [Tue, 29 Mar 2022 13:39:25 +0000 (10:39 -0300)]
venus: Update venus-protocol to add two new extensions

These are the changes automatically generated from the venus-protocol
repository.

Update the file to add `VK_EXT_index_type_uint8` and
`VK_EXT_conditional_rendering`

Signed-off-by: Igor Torrente <igor.torrente@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15652>

2 years agovenus: workaround an ANGLE assumption on FORMAT_IMPLEMENTATION_DEFINED
Yiwei Zhang [Sat, 2 Apr 2022 06:10:14 +0000 (06:10 +0000)]
venus: workaround an ANGLE assumption on FORMAT_IMPLEMENTATION_DEFINED

ANGLE expects VK_FORMAT_UNDEFINED to be returned for such AHB prop
query.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15721>

2 years agoci: bump VK-GL-CTS to 1.3.1.1
Omar Akkila [Tue, 29 Mar 2022 16:44:17 +0000 (12:44 -0400)]
ci: bump VK-GL-CTS to 1.3.1.1

Signed-off-by: Omar Akkila <omar.akkila@collabora.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15668>

2 years agoanv: Advertise two more formats
Jason Ekstrand [Mon, 28 Mar 2022 23:36:39 +0000 (18:36 -0500)]
anv: Advertise two more formats

These both require swizzling so border colors won't work.  However,
they're conveniently in the list of formats for which custom border
colors require you to specify a format in the sampler.  That list
constists of:

    - VK_FORMAT_B4G4R4A4_UNORM_PACK16
    - VK_FORMAT_B5G6R5_UNORM_PACK16
    - VK_FORMAT_B5G5R5A1_UNORM_PACK16

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

2 years agoanv: Generalize border color swizzles
Jason Ekstrand [Tue, 29 Mar 2022 15:55:00 +0000 (10:55 -0500)]
anv: Generalize border color swizzles

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

2 years agoanv: Disallow blending on swizzled formats
Jason Ekstrand [Tue, 29 Mar 2022 21:35:49 +0000 (16:35 -0500)]
anv: Disallow blending on swizzled formats

Fixes: c20f78dc5d7e ("anv: Support swizzled formats.")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15624>

2 years agointel/isl: Add a helper for swizzling color values
Jason Ekstrand [Tue, 29 Mar 2022 15:42:08 +0000 (10:42 -0500)]
intel/isl: Add a helper for swizzling color values

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

2 years agovulkan/queue: Destroy wait temps if they are skipped
Benjamin Cheng [Sun, 3 Apr 2022 23:03:56 +0000 (19:03 -0400)]
vulkan/queue: Destroy wait temps if they are skipped

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6223
Fixes: 8a11d2a31bf9 ("vulkan: Add a dummy sync type")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Jakob Bornecrantz <jakob@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15727>

2 years agoaco: don't use v_mad_mix on GFX9 if 16-bit denormals must be preserved
Rhys Perry [Fri, 1 Apr 2022 18:51:55 +0000 (19:51 +0100)]
aco: don't use v_mad_mix on GFX9 if 16-bit denormals must be preserved

This probably effectively disables the v_mad_mix optimization on GFX9.

fossil-db (Vega):
Totals from 11545 (7.15% of 161366) affected shaders:
MaxWaves: 43025 -> 42780 (-0.57%); split: +0.06%, -0.63%
Instrs: 18571635 -> 18734201 (+0.88%); split: -0.00%, +0.88%
CodeSize: 96483568 -> 96611012 (+0.13%); split: -0.11%, +0.24%
SGPRs: 1079056 -> 1077616 (-0.13%); split: -0.14%, +0.01%
VGPRs: 819248 -> 821868 (+0.32%); split: -0.04%, +0.36%
SpillSGPRs: 13313 -> 12464 (-6.38%)
Latency: 293804093 -> 295046122 (+0.42%); split: -0.09%, +0.51%
InvThroughput: 110002239 -> 110994978 (+0.90%); split: -0.03%, +0.93%
VClause: 342458 -> 342596 (+0.04%); split: -0.12%, +0.16%
SClause: 648566 -> 648046 (-0.08%); split: -0.12%, +0.04%
Copies: 1728225 -> 1726679 (-0.09%); split: -0.66%, +0.57%
Branches: 552973 -> 552963 (-0.00%); split: -0.02%, +0.02%
PreSGPRs: 862360 -> 856820 (-0.64%); split: -0.69%, +0.05%
PreVGPRs: 773689 -> 776818 (+0.40%); split: -0.02%, +0.42%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6178
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15718>

2 years agoiris: Replace unconditional QBO flush with iris_dirty_for_history().
Francisco Jerez [Fri, 7 Feb 2020 04:58:40 +0000 (20:58 -0800)]
iris: Replace unconditional QBO flush with iris_dirty_for_history().

We can now use the same cache tracking mechanism for synchronizing QBO
writes instead of the unconditional PIPE_CONTROL performed currently,
which is unable to invalidate any incoherent caches which may contain
stale data for the buffer object.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15738>

2 years agoiris: Remove remaining history flushes.
Francisco Jerez [Thu, 6 Feb 2020 02:26:39 +0000 (18:26 -0800)]
iris: Remove remaining history flushes.

This removes a couple of remaining history flushes which were
open-coded instead of using the iris_flush_and_dirty_for_history()
helper.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15738>

2 years agoiris: Demote all callers of iris_flush_and_dirty_for_history() to iris_dirty_for_hist...
Francisco Jerez [Thu, 30 Apr 2020 22:11:19 +0000 (15:11 -0700)]
iris: Demote all callers of iris_flush_and_dirty_for_history() to iris_dirty_for_history().

The unconditional flushing performed by
iris_flush_and_dirty_for_history() is now redundant with the memory
barriers introduced previously in this series, which should be in a
better position to determine from which domain the buffer will
actually be used in the future, and whether an additional flush or
invalidation is required or redundant with other PIPE_CONTROL commands
emitted elsewhere.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15738>

2 years agoaux/trace: dump format in set_shader_images
Mike Blumenkrantz [Wed, 9 Mar 2022 19:36:55 +0000 (14:36 -0500)]
aux/trace: dump format in set_shader_images

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15323>

2 years agoci/freedreno: Reduce concurrency when replaying traces on a630
Tomeu Vizoso [Thu, 31 Mar 2022 03:54:18 +0000 (05:54 +0200)]
ci/freedreno: Reduce concurrency when replaying traces on a630

We are running out of memory when replaying traces sometimes, reduce the
number of concurrent retrace processes.

   Mesa: User error: GL_OUT_OF_MEMORY in glReadPixels
   warning: GL_OUT_OF_MEMORY while getting snapshot
   1074335: warning: failed to get snapshot

https://gitlab.freedesktop.org/mesa/mesa/-/jobs/20519522

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15682>

2 years agov3d: fix some leaks in cache
Juan A. Suarez Romero [Mon, 4 Apr 2022 08:21:21 +0000 (10:21 +0200)]
v3d: fix some leaks in cache

Fix a couple of leaks introduced when adding support for on-disk shader
cache.

Fixes: 4468db20f7f ("v3d: add support for on-disk shader cache")
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15733>

2 years agov3dv: fix limits for inline uniform blocks
Iago Toral Quiroga [Mon, 4 Apr 2022 08:51:50 +0000 (10:51 +0200)]
v3dv: fix limits for inline uniform blocks

We don't support 'Update After Bind', however, the limits for this
model also include the ones without it. See the with or without remark
in the spec below:

"maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks is similar to
 maxPerStageDescriptorInlineUniformBlocks but counts descriptor bindings
 from descriptor sets created with or without the
 VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set."

Fixes:
dEQP-VK.api.info.vulkan1p2_limits_validation.ext_inline_uniform_block

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15732>

2 years agoRevert "ci/panfrost: Disable some jobs due to a lab failure"
Tomeu Vizoso [Mon, 4 Apr 2022 06:59:16 +0000 (08:59 +0200)]
Revert "ci/panfrost: Disable some jobs due to a lab failure"

Machines are back.

This reverts commit b5fd1fddd9cf24e9250b659130057289d5080746.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15730>

2 years agoradv: save/restore the stencil reference during internal driver operations
Samuel Pitoiset [Thu, 31 Mar 2022 18:20:35 +0000 (20:20 +0200)]
radv: save/restore the stencil reference during internal driver operations

I think I should improve this to be more robust.

Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6243
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15700>

2 years agoradv: fix cleaning the image view for CmdCopyImageToBuffer()
Samuel Pitoiset [Thu, 31 Mar 2022 16:23:31 +0000 (18:23 +0200)]
radv: fix cleaning the image view for CmdCopyImageToBuffer()

Fixes: f07e67272e8 ("radv: fix vk_object_base_init/finish for internal image views")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15707>

2 years agopvr: Add stricter type checking in pvr_csb_pack().
Karmjit Mahil [Mon, 14 Mar 2022 11:46:54 +0000 (11:46 +0000)]
pvr: Add stricter type checking in pvr_csb_pack().

Since the packing functions generated by csbgen use a void pointer
for the buffer in which to pack, it's possible to easily write out
of bounds. This commits attempts to reduce the chances by
having the pack macro check that the pointer passed points to an
element sized equally to the state word being packed. Catching
these errors earlier.

As can be seen in this commit, there already was a case of this:
"pds_ctrl". The word size is meant to be 64 bits but the pointer
was pointing to a 32 bit field.

Although it's fine for the word size to be smaller than the
storage pointed to by the pointer, this is not allowed just to
be extra careful.

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/15687>

2 years agoradv: Replace magic constants with enum values
Konstantin Seurer [Sun, 3 Apr 2022 09:24:29 +0000 (11:24 +0200)]
radv: Replace magic constants with enum values

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15722>

2 years agoradv: Advertise ray primitive culling
Konstantin Seurer [Sat, 2 Apr 2022 20:17:15 +0000 (22:17 +0200)]
radv: Advertise ray primitive culling

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15722>

2 years agoradv: Fully implement ray primitive culling
Konstantin Seurer [Sat, 2 Apr 2022 20:16:16 +0000 (22:16 +0200)]
radv: Fully implement ray primitive culling

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15722>

2 years agoturnip: Allow image access on swapped formats.
Emma Anholt [Fri, 4 Mar 2022 19:57:32 +0000 (11:57 -0800)]
turnip: Allow image access on swapped formats.

This is apparently something that gamescope would like to have, and the
CTS's test coverage is happy with it.

Fixes: #6011 (we hope)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15293>

2 years agoturnip: Disable tiling on 1D images.
Emma Anholt [Wed, 9 Mar 2022 01:17:00 +0000 (17:17 -0800)]
turnip: Disable tiling on 1D images.

If we know the height is 1, then it would be a waste to align each
miplevel to tile height.  For non-mipmapped textures, it doesn't save us
memory (since you still align to 4 on the last miplevel), but it should be
better cache locality by not loading those unused lines.

Incidentally, this gets us some more coverage of swap != WZYX cases in CTS
tests, which often use optimal tiling without also testing linear.

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

2 years agofreedreno/a6xx: Set the color_swap field for storage descriptors.
Emma Anholt [Wed, 9 Mar 2022 18:00:34 +0000 (10:00 -0800)]
freedreno/a6xx: Set the color_swap field for storage descriptors.

This field does appear to work as expected: with 1D/1DArray turnip storage
images switched to be always linear, it fixes the dEQP-VK.image.*store*
tests using a color swapped format (once we allow color swap).

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

2 years agoturnip: Add support for VK_KHR_format_feature_flags2.
Emma Anholt [Fri, 4 Mar 2022 20:29:52 +0000 (12:29 -0800)]
turnip: Add support for VK_KHR_format_feature_flags2.

This reports all of our storage formats as supporting read/write without
format, since we don't have any in-shader format conversions.  Similarly,
shadow comparisons were already supported on all the depth formats.

This extension is required for VK 1.3.

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

2 years agonir_to_tgsi: Add support for nir_intrinsic_image_samples.
Emma Anholt [Fri, 11 Feb 2022 21:38:28 +0000 (13:38 -0800)]
nir_to_tgsi: Add support for nir_intrinsic_image_samples.

Found in 1 piglit test on r600.

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15627>

2 years agolima/ci: enable piglit in lima CI
Erico Nunes [Sun, 5 Dec 2021 22:33:50 +0000 (23:33 +0100)]
lima/ci: enable piglit in lima CI

There are spare boards for it and the results appear stable.
Dividing the load in 2 parallel runs results in a run time
of around 10 minutes each.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15598>

2 years agolima/ci: enable CI again
Erico Nunes [Thu, 2 Dec 2021 20:12:00 +0000 (21:12 +0100)]
lima/ci: enable CI again

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15598>

2 years agolima/ci: update deqp results
Erico Nunes [Fri, 11 Mar 2022 13:21:24 +0000 (14:21 +0100)]
lima/ci: update deqp results

Unfortunately some regressions sneaked in while CI was down.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15598>

2 years agoturnip: Use correct type for OUTARRAY in FormatProperties2
Danylo Piliaiev [Thu, 31 Mar 2022 13:26:55 +0000 (16:26 +0300)]
turnip: Use correct type for OUTARRAY in FormatProperties2

Fixes: 799a9db24c334713c0ba5995f59b7db5f782e85e
("turnip: Stop using VK_OUTARRAY_MAKE()")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15694>

2 years agofreedreno/registers: update dsi registers to support dsc
Vinod Koul [Fri, 1 Apr 2022 11:23:04 +0000 (16:53 +0530)]
freedreno/registers: update dsi registers to support dsc

Display Stream compression (DSC) compresses the display stream in
host which is later decoded by panel. This requires addition of 3 new
DSI registers to support DSC over DSI.

Signed-off-by: Vinod Koul <vkoul@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14967>

2 years agor300: don't assume position is always OUT[0] in rc_copy_output
Pavel Ondračka [Thu, 31 Mar 2022 14:33:50 +0000 (16:33 +0200)]
r300: don't assume position is always OUT[0] in rc_copy_output

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15677>