Commit Graph

144815 Commits

Author SHA1 Message Date
Jordan Justen c7d8a69249 intel/devinfo: Add devinfo->max_scratch_ids
This consolidates several duplicated pieces of code into devinfo.
max_scratch_ids is an array that provides the max number of threads
for the rendering and compute stages.

This fixes some exceptions missed by crocus for scratch ids on haswell
and cherryview.

It also fills out devinfo->max_scratch_ids properly for stages VS
through CS on Gfx12.5. But, functionally this should not make a
difference as Gfx12.5 already uses COMPUTE for all stages.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12799>
2021-09-13 13:26:51 -07:00
Jordan Justen 32e848aeaa intel: Move subslice_total into devinfo
Reworks:
 * Move asserts for subslice_total into intel_device_info.c (s-b Ken)
 * Drop now unused intel_device_info_subslice_total (s-b Ken)
 * Add comment for subslice_total (Ken)

Suggested-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12799>
2021-09-13 13:26:23 -07:00
Simon Ser 3c18e69078 vulkan/wsi/x11: add driconf option to not wait under Xwayland
By default, Mesa's X11 Vulkan WSI will wait for buffers to be ready
before submitting them to Xwayland when the swapchain is created
with the IMMEDIATE mode.

This is undesirable when the Wayland compositor already monitors
fences. A Wayland compositor may want to know the delay between
the buffer submition and the end of the GPU work, this is impossible
to measure if the WSI waits for the buffer to be ready before
submission.

Since most compositors don't monitor fences, let's introduce a driconf
option for this for now. We can reconsider once more compositors
have better support for fences.

Signed-off-by: Simon Ser <contact@emersion.fr>
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11290>
2021-09-13 19:38:13 +00:00
Emma Anholt 91dc863921 mesa: Move the advanced blend bitmask to shader_info.
For drivers that don't lower advanced blend to FBFETCH, we need the
bitmask to be in the NIR shader so that it gets carried over to TGSI
successfully.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12813>
2021-09-13 18:36:58 +00:00
Mike Blumenkrantz a45c84f226 zink: fix ZINK_MAX_DESCRIPTORS_PER_TYPE to stop exploding the stack
this isn't the max per type, it's the max that can be used for a type,
which is the max used by a shader stage * the number of shader stages

Cc: mesa-stable

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12829>
2021-09-13 17:46:11 +00:00
Rob Clark a601cae51c freedreno: Move a6xx specific screen init
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12820>
2021-09-13 17:21:14 +00:00
Rob Clark 0ee0972a0d freedreno: Cleanup primtypes/primtypes_mask
Move primtypes/primtypes_mask to screen to remove duplicated introduced
by 744ef862b8.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5299
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12820>
2021-09-13 17:21:14 +00:00
Rob Clark 1e5730102a freedreno: Remove unused function
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12820>
2021-09-13 17:21:14 +00:00
Samuel Pitoiset b269f59ec5 radv: enable comp-to-single for MSAA images
This allows fast clears for concurrent MSAA images.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12483>
2021-09-13 16:43:07 +00:00
Samuel Pitoiset de8865df56 radv: add MSAA support to the comp-to-single fast clear path
Clearing the first sample is enough as long as CMASK is also cleared
to indicate that other samples are also cleared.

I verified that the first sample is always at the beginning of 256B
blocks.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12483>
2021-09-13 16:43:07 +00:00
Juan A. Suarez Romero 010fbbeff2 ci/v3dv: update flakes
dEQP-VK.api.external.fence.opaque_fd.signal_export_import_wait_permanent
became a flake in latest kernel (5.10.60-v8+)

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12832>
2021-09-13 13:56:03 +00:00
Charlie Turner a356da6357 ci: Fix syntax error in radv fails files
Fixes instances of,

  Error: Failed to parse dEQP-VK.ssbo.phys.layout.random.8bit.all_per_block_buffers.46 as CSV test,status[,duration] or comment at line 1

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12777>
2021-09-13 13:31:20 +00:00
Charlie Turner 79197dac58 ci: Build libdrm earlier for x86_test-vk
VK-CTS v1.2.7.0 has buggy tests that only work if DRM support is
available for them (drm_files_exist). This isn't exposed in the Mesa
CI by other farms, because their infra installs libdrm-dev as part
of either rootfs generation for freedreno/broadcom or respective
container stages (for lava). In the case of radv, we directly use the
x86 Mesa testing containers, so we are the odd ones out here.

By moving the building of the custom libdrm above the building of
vk-gl-cts, it will compile in support required for this test to pass,
ensuring the x86_test-vk container has the right dependencies to match
the rest of the CI. Lava actually installs drm development files
twice, once from the Debian repos, which vk-gl-cts then compiles
against, and a second time from a tarball, which the tests will use at
runtime. Seemed a little cleaner to use the version of libdrm
specified in the Mesa CI, and hence used at both build time and
runtime.

A bug should be raised with the testsuite to avoid this in the future,
but we should probably have libdrm development files exposed for these
components anyway.

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12777>
2021-09-13 13:31:20 +00:00
Bas Nieuwenhuizen afee571d2b radv: Expose a bufferImageGranularity of 1.
It shouldn't matter as image & buffer alignment are enough and we
don't need any alignment between the two.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5213
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12765>
2021-09-13 13:12:41 +00:00
Juan A. Suarez Romero 9c158fcc70 broadcom: add cl_nobin debug option
Dumps the command list, excluding the binary resources.

v2 (Juan):
 - Make this option independent from `cl`

v3 (Iago):
 - Rename option name
 - Fix style issues
 - Do not print BO ranges

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12803>
2021-09-13 08:51:54 +00:00
Juan A. Suarez Romero d220d8cb51 broadcom/compiler: add V3D_DEBUG_NO_LOOP_UNROLL debug option
Disables loop unrolling.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12803>
2021-09-13 08:51:54 +00:00
Samuel Pitoiset 09cf2584bd ac/llvm: fix build with LLVM 14
AttributeList::hasAttribute() has been replaced by
hasParamAttr()/hasRetAttr().

All supported LLVM versions have hasParamAttr().

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5320
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12715>
2021-09-13 10:04:30 +02:00
Mike Blumenkrantz 718e9dd133 zink: use descriptor info for ubo hashing
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12824>
2021-09-13 04:04:58 +00:00
Mike Blumenkrantz 41c3363e07 zink: remove zink_get_resource_for_descriptor()
this is no longer useful

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12824>
2021-09-13 04:04:58 +00:00
Mike Blumenkrantz 3db5c1bfc5 zink: remove bind_stages and bind_history from zink_resource
these are no longer used

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 c5a090aa3a zink: use more accurate generation for buffer barrier pipeline stages
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 793e5dba98 zink: don't generate more pipeline stages if vertex bit is already set
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 a810e58051 zink: use bind_stages for pipeline barrier generation
Fixes: be40886521 ("zink: emit descriptor barriers and references during bind")

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 18866dc733 zink: remove ZINK_RESOURCE_USAGE_STREAMOUT
we can use a bool flag for this instead to be more sensible

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 13114ff712 zink: use better check for determining bufferview rebinds
we have the bvci here so the actual buffer is still available

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 60bc0fbffa zink: make a local screen var for buffer replace
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 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