Commit Graph

144839 Commits

Author SHA1 Message Date
Mike Blumenkrantz b5e460cec2 zink: move batch ref when possible during buffer replacement
avoid atomics when possible

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822>
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz d772419dab zink: add a batch ref when replacing a buffer that has binds and usage
any resource with active binds will have exactly 1 ref for the bind, so
if it also has usage, it needs to be destroyed on the batch to avoid
early deletion while it's in use

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822>
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz 566771ee31 zink: add some asserts for buffer replacement
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822>
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz f44d8d8b74 zink: replace a couple checks for bind counts with new inline
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822>
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz 107866cf7a zink: add inline for checking whether a resource has any binds
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822>
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz 468a0fb2b1 zink: set vbo resource usage on bind
this is more accurate and avoids setting usage on a batch that could be
flushed before draw

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822>
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz 891b4497b4 Revert "zink: ci updates"
This reverts commit 03489cf519.

maybe not...

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12821>
2021-09-13 02:38:28 +00:00
Mike Blumenkrantz eb7d2ef070 zink: initialize zink_descriptor_layout_key::use_count on create
Fixes: 95fe2f7b82 ("zink: track active use counts for descriptor layouts")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12821>
2021-09-13 02:38:28 +00:00
Mike Blumenkrantz 14e9d01aa6 zink: export PIPE_SHADER_CAP_FP16_CONST_BUFFERS
this is now functional

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12823>
2021-09-13 02:13:06 +00:00
Mike Blumenkrantz a955d89f20 zink: add 8/16bit ubo handling
left this out of the original 8/16bit storage implementation somehow,
but it didn't matter since nothing was doing 8/16bit ubo reads

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12823>
2021-09-13 02:13:06 +00:00
Mike Blumenkrantz 3a3c968de8 zink: clamp instance divisors to max value
better than exploding

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12756>
2021-09-13 01:09:54 +00:00
Mike Blumenkrantz b483faccb6 zink: remove batch params from barrier functions
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12770>
2021-09-13 00:53:02 +00:00
Mike Blumenkrantz 5e17510d51 zink: remove unused barrier function
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12770>
2021-09-13 00:53:02 +00:00
Mike Blumenkrantz ec2cce6d60 zink: remove batch params from resource copy functions
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12770>
2021-09-13 00:53:02 +00:00
Mike Blumenkrantz ba925cf958 zink: remove batch params from renderpass functions
this no longer makes sense to have

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12770>
2021-09-13 00:53:02 +00:00
Mike Blumenkrantz 46b6ecd4ab zink: move resource unrefs to flush thread
unrefs here (almost always) mean destruction, which means eating the cost
of the atomics for the unrefs and then also the destructors

instead, handle this at the end of the next submit from this batch, since the
submit thread is never as busy as the driver thread

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12759>
2021-09-13 00:38:42 +00:00
Mike Blumenkrantz 03489cf519 zink: ci updates
I think these should be more reliable now

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12783>
2021-09-12 23:58:48 +00:00
Mike Blumenkrantz 7a03507f3c zink: document ZINK_DESCRIPTORS env var
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12783>
2021-09-12 23:58:48 +00:00
Mike Blumenkrantz 7c1b7ded7a zink: add "nofallback" descriptor mode
this disables lazy fallback and forces caching always

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12783>
2021-09-12 23:58:48 +00:00
Mike Blumenkrantz 5475a6fe18 zink: fall back to lazy descriptors if too many cache misses in a row
in the cases where it's not useful to cache for one reason or another, stop
trying to force it and just go with the flow

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12783>
2021-09-12 23:58:48 +00:00
Mike Blumenkrantz d3ae8e82d7 zink: split out lazy set updating
make this reusable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12783>
2021-09-12 23:58:48 +00:00
Mike Blumenkrantz 815e5c4df9 zink: reorganize cached descriptor updating a bit
do per-set updates in each part to stop passing around arrays

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12783>
2021-09-12 23:58:48 +00:00
Ella-0 08b17e029f ci/v3dv: Update fails with multiview failing with points
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12524>
2021-09-12 21:01:20 +00:00
Ella-0 bd0f9283f8 v3dv: Implement VK_EXT_vertex_attribute_divisor
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12524>
2021-09-12 21:01:20 +00:00
Ella-0 43790a4d08 v3dv: Expose correct point size granularity
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12524>
2021-09-12 21:01:20 +00:00
Ella-0 7bf707f6d6 v3d: Don't handle PIPE_SPRITE_COORD_UPPER_LEFT twice
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12524>
2021-09-12 21:01:20 +00:00
Ella-0 53ae5c3aae v3d/compiler: Handle point_coord_upper_left
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12524>
2021-09-12 21:01:11 +00:00
Joshua Ashton 138463d3c3 radv: Fix DCC image store check
Doesn't seem to be causing any issues right now but could with modifiers potentially.

Matches what is in RadeonSI where the comment is also shamelessly stolen from.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12811>
2021-09-11 05:58:06 +00:00
Marek Olšák eddb65ffb0 radeonsi: don't use NGG passthrough if culling is possible for better perf
Switching NGG passthrough on/off decreases performance because it causes
context rolls.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
2021-09-10 23:32:03 +00:00
Marek Olšák 0e64252912 radeonsi: add AMD_DEBUG=ib to print IBs
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
2021-09-10 23:32:03 +00:00
Marek Olšák 2817ca1aef radeonsi: don't emit PA_SU_POLY_OFFSET_CLAMP if it has no effect
this is more efficient even

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
2021-09-10 23:32:03 +00:00
Marek Olšák 1d4e47e1db radeonsi: remove a few fields from si_state_rasterizer
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
2021-09-10 23:32:03 +00:00
Marek Olšák 1f8be99621 radeonsi: enable shader-based prim culling with polygon mode
Polygon mode should have no effect on culling, so keep it enabled.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
2021-09-10 23:32:03 +00:00
Marek Olšák af7c6720de winsys/amdgpu: include CS ioctl overhead in RADEON_NOOP
submit an empty IB instead of skipping the ioctl

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
2021-09-10 23:32:03 +00:00
Marek Olšák 64a06f8167 radeonsi: skip setting some PGM_HI registers by switching to 32-bit addresses
Other registers benefit from consecutive register offsets for the smallest
command buffer size.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
2021-09-10 23:32:03 +00:00
Marek Olšák a2a7610e1f radeonsi: strengthen the VGT_FLUSH condition in begin_new_gfx_cs
Cc: mesa-stable

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
2021-09-10 23:32:03 +00:00
Marek Olšák 8d7846cfed radeonsi: reduce the frequency of switching GS fast launch on/off
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
2021-09-10 23:32:03 +00:00
Marek Olšák 468135abab winsys/amdgpu: precompute amdgpu_ib_max_submit_dwords
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
2021-09-10 23:32:03 +00:00
Marek Olšák 576f8394db radeonsi: remove the primitive discard compute shader
It doesn't always work, it's only useful on gfx9 and older, and it's too
complicated.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4011

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
2021-09-10 23:32:03 +00:00
Marek Olšák 9e994560ff radeonsi: correct index_bias_varies usage
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
2021-09-10 23:32:02 +00:00
Marek Olšák f734152b62 radeonsi: don't update shaders if only the vertex element count changes
Only check if the relevant fields changed.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
2021-09-10 23:32:02 +00:00
Marek Olšák 58f0ca8685 radeonsi: accurately check if instance divisors need a VS update
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
2021-09-10 23:32:02 +00:00
Marek Olšák ece92ecc35 radeonsi: ignore the vertex element count in si_shader_selector_key_vs
It's always at least num_inputs, so just use num_inputs.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
2021-09-10 23:32:02 +00:00
Marek Olšák 0186c788b6 radeonsi: don't set prefer_mono for fetched instance divisors
It's not necessary because the overhead is very low and the comment isn't
true anymore. (the divisions are fast now)

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
2021-09-10 23:32:02 +00:00
Icecream95 1976f4980c lima: Add a noop drm-shim
Hard-code Mali450 with six cores for now, matching the hardware I
have.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12737>
2021-09-10 21:34:36 +00:00
Daniel Schürmann eb8ec12b23 aco/ra: Fix potential out-of-bounds array accesses.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12748>
2021-09-10 19:39:18 +00:00
Timur Kristóf 536580b139 aco: Add some useful info to the README for debugging.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12748>
2021-09-10 19:39:18 +00:00
Michel Dänzer c10cb38a5c ci: Put all container related jobs in a single stage
GitLab 14.2 supports dependencies between jobs in the same stage.

Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12790>
2021-09-10 18:56:26 +00:00
Tomeu Vizoso 95c1de96ea ci: Stop adding link to tracie dashboard
Besides the sed being broken for some trace names, now we have all
needed information in the artifacts so the dashboard isn't needed.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12675>
2021-09-10 18:15:45 +00:00
Tomeu Vizoso d324748e92 ci: Uprev piglit to 99be1b06ff36
Brings in these changes:

99be1b06ff36 framework/replay: Display the image differences if any
3074b9c72b3d glsl-predication-on-large-array: Test predication on values from large array
c97da22d35b4 cmake: Fix gbm test compiling
0cbccd68c3c1 piglit: Find our data directory when we're invoked through a symlink
4eb71fc10bbe arb_sso: add test that has explicit locations and array fields in ifc
fa9c82380273 glsl-1.30: test shadow var in a switch
aa7f042b0417 glsl-1.30: add tests for incorrect "compare to 0" optimizations
60138ef32ec1 add explicit tests for GetFragDataLocation/Index(gl_Frag*)
4a8806696b90 egl: add test for EGL_KHR_display_reference
d6b7053b4e52 glsl-1.30: test that switch expression is evaluated once
8023a3c945c3 arb_shader_storage_buffer_object: Require extension on the new test
8820cac60827 pbobench: Fix sometimes-uninitialized warning.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12675>
2021-09-10 18:15:45 +00:00