Commit Graph

144165 Commits

Author SHA1 Message Date
Boris Brezillon
5a4fcb42f7 panvk: Fix panvk_copy_fb_desc()
We should not skip the copy when the batch is attached a framebuffer
descriptor, quite the opposite. Let's drop the check instead of reversing
it since we are guaranteed to have an FB attached when
panvk_copy_fb_desc() is called.

Fixes: 792a0ab0b1 ("panvk: Prepare per-gen split")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12590>
2021-08-27 16:38:45 +02:00
Boris Brezillon
d84dedc48f panvk: Make the per-arch static lib depend on panvk_entrypoints.h
The panvk_entrypoints.h header is included by all panvk_vX_xxx.c
source files, without this dependency the build can fail.

Fixes: 792a0ab0b1 ("panvk: Prepare per-gen split")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Fabio Pedretti <pedretti.fabio@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12590>
2021-08-27 16:37:36 +02:00
Mike Blumenkrantz
3990f95822 zink: more effectively utilize batch_usage for query destruction
there's no need to track the number of batches that a query is referenced on,
as all the tracking is already done by the batch_usage mechanism, so this
can be simplified to manage destruction based on whether batch_usage exists

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12578>
2021-08-27 14:26:50 +00:00
Mike Blumenkrantz
0f40ac286b zink: don't try to sync previous timestamp query qbo values
this makes no sense, so don't explode the qbo by trying

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12578>
2021-08-27 14:26:50 +00:00
Mike Blumenkrantz
4421180fe3 zink: move time query ending out to zink_end_query
time queries only need to be ended when the api ends them, not per-cmdbuf

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12578>
2021-08-27 14:26:50 +00:00
Mike Blumenkrantz
68c1b1b0e3 zink: improve threadsafe qbo access
these should be staging resources since they're being read from often,
and this allows dropping the UNSYNCHRONIZED flag from map since it should
be inferred

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12578>
2021-08-27 14:26:50 +00:00
Mike Blumenkrantz
4a5dfabb12 zink: make zink_gfx_pipeline_state::vertices_per_patch a bitfield
this is clamped to MAX_PATCH_VERTICES

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12586>
2021-08-27 10:52:59 +00:00
Mike Blumenkrantz
7b3dfea6c1 zink: repack zink_gfx_pipeline_state
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12586>
2021-08-27 10:52:59 +00:00
Mike Blumenkrantz
9c5a2ab6a9 zink: convert rasterizer pipeline components to bitfield
this reduces the hashed pipeline key size by 53 bits

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12586>
2021-08-27 10:52:59 +00:00
Mike Blumenkrantz
c73adf8c90 zink: steal a bit from rast_samples in pipeline state
zink only handles values up to 64, so this still has an extra bit

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12586>
2021-08-27 10:52:59 +00:00
Mike Blumenkrantz
9260b86905 zink: add clip_halfz to rasterizer hw state
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12586>
2021-08-27 10:52:59 +00:00
Mike Blumenkrantz
0e5ba2a508 zink: repack zink_rasterizer_hw_state
this is now 11 bits

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12586>
2021-08-27 10:52:59 +00:00
Mike Blumenkrantz
827fcb7e32 zink: zero viewport and scissor count in pipeline with dynamic state1
this is illegal

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12586>
2021-08-27 10:52:59 +00:00
Mike Blumenkrantz
cab68281ba zink: move viewport count into dynamic state1 part of pipeline hash
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12586>
2021-08-27 10:52:59 +00:00
Mike Blumenkrantz
94e9091ba2 zink: move dynamic state1 pipeline members into substruct
this is a bit easier to manage

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12586>
2021-08-27 10:52:59 +00:00
Boris Brezillon
19e29960e9 panfrost: v7 does not support RGB32_UNORM textures
Cc: mesa-stable
Fixes: c6bdd976e6 ("panfrost: Split out v6/v7 format tables")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12588>
2021-08-27 08:21:14 +00:00
Yevhenii Kharchenko
b945262773 iris: fix layer calculation for TEXTURE_3D ReadPixels() on mip-level>0
Fixes assert when ReadPixels() called to read from FBO to
GL_PIXEL_PACK_BUFFER, on mip-level > 0, since num_layers
wasn't properly calculated with mip-level.

v2: patched 'iris_create_sampler_view' function instead of
'resolve_sampler_views'. Just like it was suggested in this
function's comment.
The logic of fix is similar to one in 'update_image_surface' function
of i965 driver, which is introduced in commit
f9fd0cf479.
With a slight change: setting array_len=1, like it was done in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5808 ,
since minifying depth fails KHR-GLES2.texture_3d.filtering tests.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4145
Fixes: 3c979b0e ('iris: add some draw resolve hooks')

Signed-off-by: Yevhenii Kharchenko <yevhenii.kharchenko@globallogic.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9253>
2021-08-27 08:07:10 +00:00
Samuel Pitoiset
d90a8c79df radv: remove unecessary radv_finishme() for invalid color formats
Something really bad happen (likely driver bug) if this is triggered.
Replace with some assertions to catch an eventual issue in debug build.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12556>
2021-08-27 07:29:17 +00:00
Samuel Pitoiset
df90bb3f88 radv: remove useless check about number of samples in the HW resolve path
Although this can likely hang, this is invalid and should be caught
by the validation layers. There is many ways to hang the GPU with VK,
this check alone is useless.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12556>
2021-08-27 07:29:17 +00:00
Samuel Pitoiset
b05c2023cc radv: remove outdated radv_finishme() in the HW resolve path
Resolving layered MSAA images is actually implemented by the HW
resolve path but never used because the driver uses the compute path.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12556>
2021-08-27 07:29:17 +00:00
Mike Blumenkrantz
aab95f1bdf zink: set primitive restart with extended dynamic state2
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12585>
2021-08-27 03:31:25 +00:00
Mike Blumenkrantz
9c2fe8e621 zink: bump dynamic pipeline state count
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12585>
2021-08-27 03:31:25 +00:00
Mike Blumenkrantz
53da55ac87 zink: template for VK_EXT_extended_dynamic_state2
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12585>
2021-08-27 03:31:25 +00:00
Mike Blumenkrantz
7811037de5 zink: hook up VK_EXT_extended_dynamic_state2
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12585>
2021-08-27 03:31:25 +00:00
Mike Blumenkrantz
5b5201f0fd zink: no-op prim changes for pipeline recalc
this is no longer part of pipeline hash since we're using dynamic state

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12585>
2021-08-27 03:31:25 +00:00
Mike Blumenkrantz
0cec4d581c zink: consolidate pipeline hash tables
with dynamic prim type, pipelines can now be grouped by base prim type
instead of requiring a different pipeline for overall prim type

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12585>
2021-08-27 03:31:25 +00:00
Mike Blumenkrantz
305966ca75 zink: use dynamic prim type
this is part of dynamic state but wasn't used since it required
actual work to effectively make use of it

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12585>
2021-08-27 03:31:25 +00:00
Mike Blumenkrantz
3674839d11 zink: batch mem barrier hooks
memory barriers are redundant, so batch them and apply based on actual
usage to be slightly more efficient

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12576>
2021-08-27 02:59:24 +00:00
Mike Blumenkrantz
115935cc53 zink: slim down streamout component of mem barrier hook
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12576>
2021-08-27 02:59:24 +00:00
Mike Blumenkrantz
c095a32026 zink: remove query flush from memory barrier hook
qbos are separate buffers with their own barriers, so this just stalls
pointlessly

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12576>
2021-08-27 02:59:24 +00:00
Mike Blumenkrantz
ce87300412 zink: use ctx gfx prim mode for draw comparisons
just being consistent

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12572>
2021-08-27 02:39:34 +00:00
Mike Blumenkrantz
95a9ea54f3 zink: init ctx->gfx_prim_mode to nonzero value to trigger pipeline changes
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12572>
2021-08-27 02:39:34 +00:00
Mike Blumenkrantz
b06ef86020 zink: reorder gfx program/pipeline/descriptor binds if dynamic state is present
this enables deferring the heavy lifting until the rest of the state updates are
done

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12572>
2021-08-27 02:39:34 +00:00
Mike Blumenkrantz
c2aa47a708 zink: remove extra unsetting of ctx->vertex_state_changed
this is already managed in zink_get_gfx_pipeline

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12572>
2021-08-27 02:39:34 +00:00
Mike Blumenkrantz
8a4681aea5 zink: pass current program's shader array, not ctx array
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12572>
2021-08-27 02:39:34 +00:00
Mike Blumenkrantz
ab08dcd895 zink: remove attachment count from pipeline hash
this is redundant

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12572>
2021-08-27 02:39:34 +00:00
Mike Blumenkrantz
1bb9704bce zink: declare ctx var during blend state bind
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12572>
2021-08-27 02:39:34 +00:00
Mike Blumenkrantz
960e776f24 zink: assert precise queries are occlusion queries
this should always be the case

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12583>
2021-08-27 02:26:17 +00:00
Mike Blumenkrantz
9d9e197d74 zink: require occlusionQueryPrecise for occlusion queries
ensure this is present to avoid driver explosions

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12583>
2021-08-27 02:26:17 +00:00
Mike Blumenkrantz
336dea90f0 zink: always init bordercolor value for sampler
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12574>
2021-08-27 02:01:02 +00:00
Mike Blumenkrantz
b192b9c88a zink: implement PIPE_QUERY_GPU_FINISHED
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12573>
2021-08-26 21:28:42 -04:00
Ella-0
1e921e5098 v3dv: Implement VK_EXT_pipeline_creation_feedback
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12371>
2021-08-26 21:04:42 +00:00
Erik Faye-Lund
c8581d0fae microsoft/compiler: trivial fixes to error-handling
We're really bad at making sure we report errors when we fail to
allocate memory. This makes us a bit better...

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12541>
2021-08-26 18:57:40 +00:00
Erik Faye-Lund
e0f3133447 microsoft/compiler: return errors from get_n_src
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12541>
2021-08-26 18:57:40 +00:00
Erik Faye-Lund
2c166a27fc microsoft/compiler: remove needless error-returns
There's no root error-conditions in this code, just code that assumes
they exist and tries to handle them.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12541>
2021-08-26 18:57:40 +00:00
Filip Gawin
46f3582c6f nir: fix ifind_msb_rev by using appropriate type
As you can see comparion "x < 0" doesn't make
sense if x is unsigned.

Fixes: a5747f8a ("nir: add opcodes for *find_msb_rev and lowering ")

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12548>
2021-08-26 18:35:31 +00:00
Filip Gawin
9083e9a483 nir: fix shadowed variable in nir_lower_bit_size.c
Fixes: 6d79298992 ("nir/lower_bit_size: fix lowering of {imul,umul}_high")

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12527>
2021-08-26 18:04:22 +00:00
Yiwei Zhang
3538b5af6d venus: conditionally enable async descriptor set allocation
When VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT is not used to
create the pool, set allocation is guaranteed to not return
VK_ERROR_FRAGMENTED_POOL, and we can safely move set allocation to async
after doing resource tracking in the driver.

Enable after fully tested with assert(false) in the failure case.

Tested with:
- dEQP-VK.api.descriptor*
- dEQP-VK.api.object_management.*
- dEQP-VK.binding_model.descriptor*
- dEQP-VK.descriptor_indexing.*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12501>
2021-08-26 17:56:19 +00:00
Yiwei Zhang
288ce1b033 venus: check descriptor allocations against pool resource
Only kick in when async_set_allocation is enabled.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12501>
2021-08-26 17:56:19 +00:00
Yiwei Zhang
70b03e96f9 venus: descriptor set to track descriptor count of last binding
Track the descriptor count to be used instead of the variable descriptor
count to avoid duplicate checks in later accounting.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12501>
2021-08-26 17:56:19 +00:00