Commit Graph

149487 Commits

Author SHA1 Message Date
Nanley Chery dc70dd8c7d iris: Support the XeHP media compression format
The format on this platform is slightly different from the one used on
TGL. Also it's part of the surface state instead of an aux-map.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14355>
2022-01-28 00:30:55 +00:00
Nanley Chery 7f46e569e5 intel/isl: Support the XeHP media compression format
The format on this platform is slightly different from the one used on
TGL. Also it's part of the surface state instead of an aux-map.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14355>
2022-01-28 00:30:55 +00:00
Nanley Chery fde43bb194 intel: Rename a RenderCompressionFormat field
The name of the bit field is CompressionFormat. The format subsections
of the field specify the alternate names of RenderCompressionFormat or
MediaCompressionFormat depending on the compression type.

We're going to start programming this field for media compression, so
we'd like to use either the bit field name or a new
MediaCompressionFormat field. Either option seems fine, so we go with
the first.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14355>
2022-01-28 00:30:55 +00:00
Nanley Chery d8c6b2c394 iris: Use iris_format_for_usage in map_aux_addresses
Enables dropping the format-mapping switch statement in
iris_resource_finish_aux_import.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14355>
2022-01-28 00:30:55 +00:00
Nanley Chery 37a0185ec2 iris: Drop stale media compression import code
With commit f57c074270,
("gallium/dri: Allow use of R8G8_R8B8 for YUYV and G8R8_B8R8 for UYVY"),
iris stopped lowering media compressed surfaces to multiple planes.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14355>
2022-01-28 00:30:55 +00:00
Nanley Chery cc973de5f6 intel/isl: Support YUV pipe-to-isl format mapping
This will help to configure surfaces for media compression.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14355>
2022-01-28 00:30:55 +00:00
Nanley Chery 514897ef41 iris: Explicitly rely on gallium fallbacks for YUV
iris_is_format_supported has been returning false for YUV pipe formats.
We're going to update isl_format_for_pipe_format to map some YUV pipe
formats, but we don't want iris_is_format_supported to start returning
true for them.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14355>
2022-01-28 00:30:55 +00:00
Emma Anholt b5e41c8c2d ci/freedreno: Switch 2 default a630 VK jobs to being GLES and VK ASan jobs.
The automatic VK coverage we care about is happening on a618, which is the
HW we're shipping.  Having the old 630 runners make sure we don't leak
memory is a great use for them.  Still, keep one default A630 VK job to
make sure we don't totally trash it.

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14235>
2022-01-27 23:47:46 +00:00
Emma Anholt 8457667be9 ci: Use a dlclose-disabling preload library for leak checking in Vulkan.
For GL, we disable the dlclose() call on the driver in asan builds so that
leak reports get proper backtraces.  For Vulkan, the dlclose() happens
from libvulkan so you need a bigger hammer to keep our drivers loaded.

Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14235>
2022-01-27 23:47:46 +00:00
Danylo Piliaiev da7a475138 turnip: Drop references to layout of all sets on pool reset/destruction
We dropped the references only for non-host_memory_base pools.
Create a list of alive descriptor to account for all of them.

Fixes: 1b513f49 ("tu: add reference counting for descriptor set layouts")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14235>
2022-01-27 23:47:46 +00:00
Emma Anholt bdb8e615d1 vulkan: Fix leak of error messages
Fixes: 0cad3beb2a ("vulkan/log: Add common vk_error and vk_errorf helpers")
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14235>
2022-01-27 23:47:46 +00:00
Nanley Chery 749b82238b isl: Enable compression with multisampled Tile64
We haven't tested the single-sampled case, so this doesn't enable any
more uses of standalone CCS. This does however, allow multisampled
surfaces with MCS or HIZ to get upgraded to MCS_CCS and HIZ_CCS,
respectively.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14431>
2022-01-27 22:38:01 +00:00
Jordan Justen 792e294572 isl: Enable compression with Tile4
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14431>
2022-01-27 22:38:01 +00:00
Nanley Chery 793338266c anv: Don't allocate VMA for CCS on XeHP
On XeHP, CCS doesn't require VMA on XeHP. The HW provides anything
allocated in LMEM a mapping to a CCS memory range for free. So, we:

1) use the implicit CCS framework to avoid adding an image memory
   binding for the CCS surface.
2) leave each BO sized as-is instead of adding on space for the CCS.
   Thankfully the framework only adds on space if an aux-map is present.
   XeHP has no aux-map, so this patch doesn't explicitly do anything for
   this.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14431>
2022-01-27 22:38:01 +00:00
Nanley Chery 382f6ccda8 anv: Require the local heap for CCS on XeHP
This platform doesn't support CCS in system memory.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14431>
2022-01-27 22:38:01 +00:00
Nanley Chery 93f8d88fa3 anv: Disable the SMEM fallback for local memory
The fallback is incompatible with allocations that use CCS on XeHP. On
that platform, compression can't be used in SMEM.

Apps should be okay with this change. They're able to manage local and
system memory heaps directly (see VK_EXT_memory_budget).

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14431>
2022-01-27 22:38:01 +00:00
Nanley Chery 63096b886f anv: Drop redundant disabling of non-renderable CCS
ISL reports no CCS support for these formats, except for
R10G10B10A2_UNORM_SRGB. Anv doesn't support that format at all however.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14431>
2022-01-27 22:38:01 +00:00
Chia-I Wu 4f1cf6fd3b vulkan/wsi/x11: fix x11_image_init return value on errors
fail_pixmap is reached when xshmfence alloc/map fails.  result is
VK_SUCCESS and we need to pick an error code explicitly.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14748>
2022-01-27 22:06:19 +00:00
Pavel Ondračka e020c1b979 r300: Set consistent PIPE_SHADER_CAP_PREFERRED_IR
This efectivelly enables NIR to TGSI for swtcl chipsets.

Otherwise on swtcl chipsets we can end with PIPE_SHADER_IR_TGSI
for vertex stage and PIPE_SHADER_IR_NIR for fragment stage.
This is not expected by core mesa and leads to issues most
visible as crashing piglit atan tests.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5916
Reviewed-by: Emma Anholt <emma@anholt.net>
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14732>
2022-01-27 21:04:32 +00:00
Pavel Ondračka 8b11d8a127 r300: Disable integers and indirect temporary addressing with swctl
This is not needed with TGSI, but will be needed by the next commit
after we switch to NIR. Copied from i915 including the comments.

Reviewed-by: Emma Anholt <emma@anholt.net>
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14732>
2022-01-27 21:04:32 +00:00
Chia-I Wu bf32d3145c venus: handle VkBindImageMemorySwapchainInfoKHR
The common WSI advertises VK_KHR_swapchain v70.  We must handle
VkBindImageMemorySwapchainInfoKHR.

Fixes dEQP-VK.wsi.*.image_swapchain_create_info.

v2: try to match vn_wsi_create_image (Yiwei) and the common WSI
v3: match modifier as well (Yiwei)

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14550>
2022-01-27 20:35:07 +00:00
Chia-I Wu 127263dc4a venus: remember the memory bound to a swapchain image
It will be needed for VkBindImageMemorySwapchainInfoKHR.

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14550>
2022-01-27 20:35:07 +00:00
Chia-I Wu 350dfb8c3c venus: format with clang-format
clang-format misaligns one of the comments in
vn_physical_device_get_passthrough_extensions, but we can live with
that.

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14550>
2022-01-27 20:35:07 +00:00
Chia-I Wu 4d15b52783 venus: fix VK_KHR_driver_properties
VK-GL-CTS 1.2.7.1 does not really recognize VK_DRIVER_ID_MESA_VENUS, but
it is harmless to lie.

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14749>
2022-01-27 20:24:57 +00:00
Danylo Piliaiev 24144f6f5c turnip/trace: Delete unused start/end_resolve tracepoints
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14391>
2022-01-27 18:59:43 +00:00
Danylo Piliaiev 1989e1e6d8 turnip/perfetto: handle gpu timestamps being non-monotonic
Perfetto requires time in clock snaphots to be monotonic, otherwise
the clock would be excluded.
GPU timestamps start from zero after every suspend-resume cycle
which makes them non-monotonic.

As a solution on msm we check whether GPU was just resumed and
remember previous highest timestamp to then add it to the next
timestamps.

If the functionality to get whether gpu is resumed is unavailable
or doesn't work - we fallback to a check for a discontinuity
in timestamps. For kgsl we always use fallback.

Fixes renderstage timeline disappearing in AGI.

Or you could avoid the issue altogether by preventing GPU from going to
sleep by increasing auto suspend delay e.g.:

  echo 5000 > /sys/devices/platform/soc\@0/3d00000.gpu/power/autosuspend_delay_ms

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14391>
2022-01-27 18:59:43 +00:00
Danylo Piliaiev ba7faa6f43 turnip/trace: process u_trace chunks on queue submission
tu_QueuePresentKHR was not the best place since application
isn't required to call it.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14391>
2022-01-27 18:59:43 +00:00
Danylo Piliaiev a6482a3a6e turnip: rename tu_drm_get_timestamp into tu_device_get_gpu_timestamp
It is not drm specific and will be implemented in kgsl.

Change parameter to tu_device along the way.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14391>
2022-01-27 18:59:43 +00:00
Danylo Piliaiev f2c53c2a9b turnip/trace: refactor creation and usage of trace flush data
Fixes the case when last cmd buffer in submission doesn't have
tracepoints leading to flush data not being freed.

Added a few comments, renamed things, refactored allocations - now
the data flow should be a bit more clean.

Extracted submission data creation into tu_u_trace_submission_data_create
which would be later used in in tu_kgsl.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14391>
2022-01-27 18:59:43 +00:00
Danylo Piliaiev 95896dee93 turnip/perfetto: Optimize timestamp synchronization
We shouldn't do ioctl to get timestamp if perfetto isn't connected.
Also it's better to sync timestamps after submission since the
call could block until GPU is resumed.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14391>
2022-01-27 18:59:43 +00:00
Guilherme Gallo 2d75fd1e0a virgl/ci: make crosvm-runner pass variables in a secure way
crosvm-runner.sh was using `export -p` to create an environment script
for the virtualized system, but this command will dump every declared
environment variable in the system, which includes Gitlab's CI variables
with sensitive data, such as passwords and auth tokens.

Replacing `export -p` to `generate-env.sh`, which only exports the
necessary variables for Mesa CI jobs.

Extra changes:

* Stop changing ${PWD} variable programmatically in scripts. ${PWD} is a
variable used by most prolific coreutils and bash commands, such as `cd`
and `pwd`, besides it is set by subshells [1]; changing this variable
may lead to complex situations.
As drop-in replacement for ${PWD}, use ${DEQP_BIN_DIR} to flag that
there is a special folder where dEQP should be run.
* Double quote path and array variables. See: https://github.com/koalaman/shellcheck/wiki/SC2086
* Do not export variables directly from commands output. See: https://github.com/koalaman/shellcheck/wiki/SC2155

[1]
```
$ cd /tmp
$ export PWD=test; bash -c 'echo $PWD'
/tmp
```

v2:
- Revert $DEQP_BIN_DIR quoting in crosvm-runner.sh and crosvm-init.sh
- Log all the passed variables to stdout, to help with debugging when
  new variable are needed to be put in `generate-env.sh`

v3:
- Revert $DEQP_BIN_DIR quoting leftovers

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14626>
2022-01-27 18:28:48 +00:00
Emma Anholt 7380d8e285 ci/freedreno: Update hashes for closed traces.
These two had different pixel results from last time someone updated them,
but things still look fine.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14757>
2022-01-27 17:46:52 +00:00
Connor Abbott 065785e689 tu: Report code size in pipeline statistics
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14754>
2022-01-27 17:16:18 +00:00
Lionel Landwerlin 583e4549fe intel/ci: expected failure for 1.3 with older CTS
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14706>
2022-01-27 16:42:01 +00:00
Lionel Landwerlin f3877182f7 relnotes/features: updates for Vulkan 1.3
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14706>
2022-01-27 16:42:01 +00:00
Jason Ekstrand df8ac77af8 anv: Advertise Vulkan 1.3
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14706>
2022-01-27 16:42:01 +00:00
Lionel Landwerlin 7d9cd208d5 anv: switch a bunch of struct/enum to 1.3 versions
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14706>
2022-01-27 16:42:01 +00:00
Jason Ekstrand 2e730167a4 anv: Implement 1.3 features/properties
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14706>
2022-01-27 16:42:01 +00:00
Caio Marcelo de Oliveira Filho 372faa4a23 anv: SPIR-V 1.6 shaders imply ALLOW_VARYING_SUBGROUP_SIZE
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14706>
2022-01-27 16:42:01 +00:00
Manas Chaudhary cad053db61 panvk: Fix pointer corruption in panvk_add_wait_event_syncobjs
nr_in_fences was being incremented to point to an
illegal address

Fixes: 1e23004600 ("panvk: Add vkEvents support")
Cc: mesa-stable
Signed-off-by: Manas Chaudhary <manas.chaudhary@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14744>
2022-01-27 14:16:17 +00:00
Mike Blumenkrantz ece10a5467 zink: unify some context casts in zink_create_sampler_view
no functional changes

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14746>
2022-01-27 13:32:54 +00:00
Mike Blumenkrantz fe3984b8cd anv: silence wsi debug logging
this is triggered by mesa's own wsi handling, so stop printing nonsense

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14743>
2022-01-27 13:10:27 +00:00
Roman Gilg 6018d5c44a vulkan/wsi/x11: document implementation
To extend the shared understanding of our code base and ease contributing
document purpose and flow for many of our internal functions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6536>
2022-01-27 09:14:29 +00:00
Martin Roukala (né Peres) 978ea32acf radv/ci: mark the dEQP fails related to a missing VKCTS 1.3 as expected
Now that RADV is exposing Vulkan 1.3 by default, VKCTS is getting
confused by it and fails 2 tests:

 - dEQP-VK.api.version_check.version: This version of CTS does not
   support Vulkan device version 1.3.204 (Fail)
 - dEQP-VK.info.device_properties: deviceProperties apiVersion not
   valid (Fail)

Mark both of these failures as expected, while we wait for VKCTS 1.3
to be released.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14729>
2022-01-27 07:55:53 +00:00
Iago Toral Quiroga 764c8867b0 v3dv: document why we don't expose VK_EXT_scalar_block_layout
And since this is an optional feature in Vulkan 1.2, fill in the
corresponding feature query while we are at it.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14731>
2022-01-27 07:34:19 +00:00
Iago Toral Quiroga 06220a28e7 v3dv: rework Vulkan 1.2 feature queries
Fill them into a VkPhysicalDeviceVulkan12Features struct like we
do for Vulkan 1.1, and then read them from there.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14731>
2022-01-27 07:34:19 +00:00
Iago Toral Quiroga 692e0dfe27 v3dv: implement VK_KHR_imageless_framebuffer
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14704>
2022-01-27 07:11:20 +00:00
Iago Toral Quiroga 2ee9487ad7 v3dv: drop signature of undefined function
This is a left over from when we added multi-version support in the
driver, where we turned this helper into a versioned scheme.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14704>
2022-01-27 07:11:20 +00:00
Emma Anholt af957d4a17 ci/traces: Always generate the junit XML.
While it's not the primary interface to interpreting trace job failures,
it was set in all the traces jobs it looks like and it's low cost anyway.

Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14604>
2022-01-27 04:37:16 +00:00
Emma Anholt 60f7bd3c09 ci/traces: Drop PIGLIT_REPLAY_UPLOAD_TO_MINIO.
You have to do this as part of the traces workflow, otherwise there are no
baseline images for your driver to compare to in the HTML summary.

Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14604>
2022-01-27 04:37:16 +00:00