Commit Graph

144935 Commits

Author SHA1 Message Date
Mike Blumenkrantz f54cde75d7 zink: fix dmabuf cap export
this requires a lot more than just one extension

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967>
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz 9ec9289385 zink: add dmabuf fd handling
just gotta get it out of the underlying graphics layer

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967>
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz 651def5896 zink: use foreign queue import for dmabufs
this is required to get image data

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967>
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz 7d2de96847 zink: fix import pNext attachment during image creation
there's better checks for this now, so the weird pNext handling here
can be simplified

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967>
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz 5b827b0a39 zink: handle image creation for dmabufs
these use PREINIT layout

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967>
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz 2a63f38cb1 zink: set a flag for dmabuf init
this will be useful for barrier handling

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967>
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz 3bd98d4bf6 zink: split import and export fd handle types
these can maybe be different

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967>
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz 6f7fe12fd4 zink: hook up VK_EXT_queue_family_foreign
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967>
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz 2b98fba806 zink: add dmabuf modifier query hooks for screen
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967>
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz b359950b0f zink: hook up dmabuf ext
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967>
2021-09-14 03:14:12 +00:00
Anuj Phogat 18477f60e2 intel/dg2: Add L3 configuration
Rework:
 * Jordan: Merge dg1/dg2 into empty_l3_list

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12711>
2021-09-14 02:51:03 +00:00
Jordan Justen 4620f8334f intel/dev: Add is_dg2 to devinfo
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12711>
2021-09-14 02:51:03 +00:00
Mike Blumenkrantz 727e10d290 zink: use smallest int type possible for decompose shader key
this reduces the component key size for decomposition by up to 75%, down
to as low as 2 bytes, which is more optimal for both hashing and memcmp of
the key

it will become more useful as further changes are added to improve vertex format
support, enabling the keysize to remain relatively small

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12771>
2021-09-14 01:55:56 +00:00
Mike Blumenkrantz 1542f3eb47 zink: decompose vertex attribs into single components when not supported
this avoids vbuf in a lot more cases on radv where 3component attribs aren't supported

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12771>
2021-09-14 01:55:56 +00:00
Mike Blumenkrantz c106c45a99 zink: add function for decomposing vertex format to single component
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12771>
2021-09-14 01:55:56 +00:00
Marek Olšák 9df5ebe5bf radeonsi: fix DCC image stores with image descriptors in user SGPRs
The bug workaround was not applied there.

Fixes: 34a2c75310 - radeonsi: enable DCC stores on gfx10.3 APUs for better performance

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12809>
2021-09-13 22:23:27 +00:00
Marek Olšák 921c770d49 driconf: remove leftover code for allow_incorrect_primitive_id
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12809>
2021-09-13 22:23:27 +00:00
Marek Olšák a5ea2ef93e radeonsi: copy a few nir_shader_compiler_options from RADV
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12809>
2021-09-13 22:23:27 +00:00
Marek Olšák 3d1ca01e41 radeonsi: fix DCC image stores with display DCC
Fixes: 34a2c75310 - radeonsi: enable DCC stores on gfx10.3 APUs for better performance

Tested-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12809>
2021-09-13 22:23:27 +00:00
Kai Wasserbäch d4f7337d14 fix(clover/llvm): update code to build with recent versions of LLVM 14 (Git)
`hasAttribute()` in `llvm::AttributeList` is gone, use `hasParamAttr()` instead.

This fixes an FTBFS.

Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12826>
2021-09-13 22:10:49 +00:00
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