platform/upstream/mesa.git
9 months agoasahi: gracefully handle allocating linear images
Karol Herbst [Fri, 1 Sep 2023 09:52:50 +0000 (11:52 +0200)]
asahi: gracefully handle allocating linear images

Frontends might try to allocate linear textures or images, we  should
gracefully return NULL so frontends can do fallback paths.

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25052>

9 months agoasahi: implement clear_buffer
Karol Herbst [Wed, 30 Aug 2023 09:21:13 +0000 (11:21 +0200)]
asahi: implement clear_buffer

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25052>

9 months agoasahi: implement set_global_binding
Karol Herbst [Fri, 3 Feb 2023 17:42:50 +0000 (18:42 +0100)]
asahi: implement set_global_binding

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25052>

9 months agoasahi: implement get_compute_state_info
Karol Herbst [Tue, 29 Aug 2023 12:53:56 +0000 (14:53 +0200)]
asahi: implement get_compute_state_info

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25052>

9 months agoasahi: handle load_global_invocation_id_zero_base
Karol Herbst [Tue, 29 Aug 2023 18:33:42 +0000 (20:33 +0200)]
asahi: handle load_global_invocation_id_zero_base

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25052>

9 months agoasahi: handle load_workgroup_size
Karol Herbst [Tue, 29 Aug 2023 15:09:14 +0000 (17:09 +0200)]
asahi: handle load_workgroup_size

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25052>

9 months agoasahi: handle kernels
Karol Herbst [Tue, 29 Aug 2023 13:02:41 +0000 (15:02 +0200)]
asahi: handle kernels

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25052>

9 months agoasahi: lower hadd
Karol Herbst [Tue, 29 Aug 2023 22:51:11 +0000 (00:51 +0200)]
asahi: lower hadd

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25052>

9 months agoasahi: fetch available system memory
Karol Herbst [Fri, 3 Feb 2023 17:42:36 +0000 (18:42 +0100)]
asahi: fetch available system memory

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25052>

9 months agovk/graphics_state: Fix copying MS locations pipeline state
Connor Abbott [Fri, 25 Aug 2023 10:47:29 +0000 (12:47 +0200)]
vk/graphics_state: Fix copying MS locations pipeline state

Copying the state below overwrote the ms.sample_locations we set,
so our new_sample_locations was never actually used and we were
accidentally doing a shallow copy. Turnip passes a stack-allocated
old_state, so this resulted in invalid stack pointers.

Fixes: f497cc9d56e ("vk/graphics_state: Add helpers for pre-baking state")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25031>

9 months agoci: skip containers & build jobs when disabling a farm
Eric Engestrom [Mon, 4 Sep 2023 11:40:18 +0000 (12:40 +0100)]
ci: skip containers & build jobs when disabling a farm

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25032>

9 months agotu/a7xx: Disable LRZ
Danylo Piliaiev [Fri, 14 Jul 2023 14:41:48 +0000 (16:41 +0200)]
tu/a7xx: Disable LRZ

Even with GMEM disabled LRZ is still interacted with in some cases.
So it has to be completely disabled until it is fixed.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217>

9 months agotu/a7xx: Fix CmdDrawIndirectByteCountEXT
Danylo Piliaiev [Mon, 10 Jul 2023 13:07:39 +0000 (15:07 +0200)]
tu/a7xx: Fix CmdDrawIndirectByteCountEXT

On a7xx DI_SRC_SEL_AUTO_INDEX is used instead of DI_SRC_SEL_AUTO_XFB.

On a7xx the counter value and offset are shifted right by 2, so
the vertexStride should also be in units of dwords.
CTS doesn't test this though.

Fixes:
 dEQP-VK.transform_feedback.simple.draw_indirect_*

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217>

9 months agotu/a7xx: Fix 3d blits after multiview usage
Danylo Piliaiev [Tue, 4 Jul 2023 13:11:58 +0000 (15:11 +0200)]
tu/a7xx: Fix 3d blits after multiview usage

Fixes cts tests:
 dEQP-VK.dynamic_rendering.primary_cmd_buff.random.seed*

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217>

9 months agotu/a7xx: Fix occlusion query
Danylo Piliaiev [Thu, 22 Jun 2023 10:30:42 +0000 (12:30 +0200)]
tu/a7xx: Fix occlusion query

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217>

9 months agotu/a7xx: Adapt r3d blits for A7xx
Mark Collins [Tue, 6 Jun 2023 10:27:20 +0000 (10:27 +0000)]
tu/a7xx: Adapt r3d blits for A7xx

As r3d_ops emits sysmem draws directly, it needs to be manually
updated to emit the A7XX commands instead of A6XX.

VK-CTS tests success on A630 + A740:
dEQP-VK.api.copy_and_blit.core.blit_image.*

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217>

9 months agotu/a7xx: Fix flat shading
Danylo Piliaiev [Wed, 31 May 2023 12:29:41 +0000 (14:29 +0200)]
tu/a7xx: Fix flat shading

dEQP-VK.rasterization.flatshading.* are passing.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217>

9 months agotu/a7xx: Fix multiview
Danylo Piliaiev [Tue, 30 May 2023 13:03:23 +0000 (15:03 +0200)]
tu/a7xx: Fix multiview

dEQP-VK.multiview.* mostly works, fails seem to be caused by lack of
3d blits.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217>

9 months agotu/a7xx: Fix tesselation shaders
Danylo Piliaiev [Tue, 30 May 2023 13:02:28 +0000 (15:02 +0200)]
tu/a7xx: Fix tesselation shaders

dEQP-VK.tessellation.* are passing now.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217>

9 months agotu/a7xx: Fix geometry shaders
Danylo Piliaiev [Tue, 30 May 2023 13:00:43 +0000 (15:00 +0200)]
tu/a7xx: Fix geometry shaders

dEQP-VK.geometry.* are passing now

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217>

9 months agofreedreno/fdl: Set LOSSLESSCOMPEN for image when ubwc is enabled on a7xx
Danylo Piliaiev [Tue, 23 May 2023 16:44:58 +0000 (18:44 +0200)]
freedreno/fdl: Set LOSSLESSCOMPEN for image when ubwc is enabled on a7xx

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217>

9 months agotu: Basic a7xx support
Danylo Piliaiev [Wed, 19 Apr 2023 17:18:13 +0000 (19:18 +0200)]
tu: Basic a7xx support

Works:
- sysmem rendering

Doesn't work:
- gmem rendering
- 3d blits
- TESS and GS

Wild Life Extreme benchmarks runs without issues, most Sascha Willems
Vulkan demos are working.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217>

9 months agotu/common: Generalize TU_GENX macro
Danylo Piliaiev [Wed, 19 Apr 2023 17:05:00 +0000 (19:05 +0200)]
tu/common: Generalize TU_GENX macro

Now it doesn't require generated macro.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217>

9 months agoir3/a7xx: Disable shared consts for a7xx
Danylo Piliaiev [Wed, 3 May 2023 17:32:20 +0000 (19:32 +0200)]
ir3/a7xx: Disable shared consts for a7xx

a7xx introduced a new way to upload shared consts with old one
becoming unavailable, use fallback mechanism until we implement
the new shared consts.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217>

9 months agoir3/a7xx: Use ccinv for data synchronization
Danylo Piliaiev [Wed, 3 May 2023 17:27:45 +0000 (19:27 +0200)]
ir3/a7xx: Use ccinv for data synchronization

Fixes a lot of tests in dEQP-VK.memory_model.* e.g.:
 dEQP-VK.memory_model.message_passing.core11.u32.coherent.fence_fence.atomicwrite.device.payload_local.buffer.guard_local.buffer.comp

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217>

9 months agoir3/a7xx: Add ccinv instruction
Danylo Piliaiev [Wed, 3 May 2023 17:25:06 +0000 (19:25 +0200)]
ir3/a7xx: Add ccinv instruction

_Presumably_ invalidates workgroup-wide cache for image/buffer data access.
so while "fence" is enough to synchronize data access inside a workgroup,
for cross-workgroup synchronization we have to invalidate that cache.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217>

9 months agoir3/a7xx: insert lock/unlock at the end of every compute shader
Danylo Piliaiev [Mon, 24 Apr 2023 14:39:44 +0000 (16:39 +0200)]
ir3/a7xx: insert lock/unlock at the end of every compute shader

Add (ss)(sy) in all cases until.

TODO: Set sync flags depending on real need.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217>

9 months agoir3/a7xx: Don't multiply global mem instruction's offset by 4
Danylo Piliaiev [Wed, 19 Apr 2023 17:08:00 +0000 (19:08 +0200)]
ir3/a7xx: Don't multiply global mem instruction's offset by 4

a7xx global memory instructions don't have implied shift.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217>

9 months agoir3/a7xx: cat5 mode1 has swapped tex/samp ids
Danylo Piliaiev [Wed, 3 May 2023 17:39:46 +0000 (19:39 +0200)]
ir3/a7xx: cat5 mode1 has swapped tex/samp ids

Though blob is not seen to even use mode1 on a740, it uses
S2EN variant instead.

Fixes:
 dEQP-VK.binding_model.descriptor_buffer.multiple.*
 dEQP-VK.binding_model.descriptor_buffer.embedded_imm_samplers.*
 dEQP-VK.pipeline.monolithic.descriptor_limits.compute_shader.*

Adapted from Jonathan Marek's changes.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217>

9 months agoisaspec: Make possible to obtain gpu_id in <expr> blocks
Danylo Piliaiev [Fri, 9 Jun 2023 10:58:55 +0000 (12:58 +0200)]
isaspec: Make possible to obtain gpu_id in <expr> blocks

Done with ISA_GPU_ID() macro. This makes possible to use
gpu generation in to select between overrides.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217>

9 months agofreedreno/computerator: Fix remaining issues with A7XX
Danylo Piliaiev [Mon, 17 Apr 2023 13:39:09 +0000 (15:39 +0200)]
freedreno/computerator: Fix remaining issues with A7XX

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217>

9 months agoir3/tests: Use fd_dev_info to infer GPU generation
Danylo Piliaiev [Mon, 4 Sep 2023 15:53:09 +0000 (17:53 +0200)]
ir3/tests: Use fd_dev_info to infer GPU generation

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217>

9 months agofreedreno: Fully define a730 and a740 device properties
Danylo Piliaiev [Mon, 17 Apr 2023 13:38:00 +0000 (15:38 +0200)]
freedreno: Fully define a730 and a740 device properties

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217>

9 months agofreedreno: Add a list of raw magic regs
Danylo Piliaiev [Tue, 2 May 2023 11:26:06 +0000 (13:26 +0200)]
freedreno: Add a list of raw magic regs

The set of magic regs is different between generations and even
sub-gens. Adding a new one and/or emitting one on specific generation
takes much more code than necessary. Doing this in a single place is
much nicer.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217>

9 months agofreedreno/registers: Generate python files with reg offsets
Danylo Piliaiev [Fri, 11 Aug 2023 13:30:47 +0000 (15:30 +0200)]
freedreno/registers: Generate python files with reg offsets

This would allow us to use register names in python scripts.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217>

9 months agofreedreno/registers: Refactor gen_header.py to allow more options
Danylo Piliaiev [Fri, 11 Aug 2023 13:10:59 +0000 (15:10 +0200)]
freedreno/registers: Refactor gen_header.py to allow more options

We want it to also generate .py files with reg definitions.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217>

9 months agointel/nir: rerun lower_tex if it lowers something
Lionel Landwerlin [Sat, 2 Sep 2023 15:53:13 +0000 (18:53 +0300)]
intel/nir: rerun lower_tex if it lowers something

nir_lower_tex can lower tg4 coords into tg4 offset which on DG2+ we
also need to lower into constant offsets.

Unfortunately the nir_lower_tex pass is not able to lower the
instructions it itself generates, so the easy fix for when
nir_lower_tex lowers tg4 coords into tg4 offsets is to rerun the pass.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9735
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25015>

9 months agopvr: Implement VK_KHR_format_feature_flags2
Vlad Schiller [Mon, 21 Aug 2023 05:34:36 +0000 (06:34 +0100)]
pvr: Implement VK_KHR_format_feature_flags2

This commit will implement and set VK_KHR_format_feature_flags2
instead of the old ones.

Signed-off-by: Vlad Schiller <vlad-radu.schiller@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24929>

9 months agoradv/amdgpu: do not copy the original chain link for IBs
Samuel Pitoiset [Wed, 30 Aug 2023 12:08:09 +0000 (14:08 +0200)]
radv/amdgpu: do not copy the original chain link for IBs

Otherwise, if a secondary CS is grown and then executed without IB2,
the INDIRECT_BUFFER packet would have been copied but it shouldn't.

This fixes a regression that introduced GPU hangs with
gl_vk_meshlet_cadscene on RDNA2.

Fixes: df0c742543d ("radv/amdgpu: rework growing a CS with the chained IB path slightly")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24891>

9 months agoradv/amdgpu: fix executing secondaries without IB2
Samuel Pitoiset [Fri, 25 Aug 2023 15:26:30 +0000 (17:26 +0200)]
radv/amdgpu: fix executing secondaries without IB2

If a secondary cmdbuf has been grown and is executed without IB2
(eg. on compute queue or when it's not allowed), the ib size ptr
contains chaining info, which means the IB size was wrong.

This fixes CPU crashes when running gl_vk_meshlet_cadscene.

Fixes: 277b2afd708 ("radv/amdgpu: add support for executing DGC cmdbuf with RADV_DEBUG=noibs")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24891>

9 months agointel/measure: track batch buffer sizes
Lionel Landwerlin [Fri, 11 Aug 2023 09:19:28 +0000 (12:19 +0300)]
intel/measure: track batch buffer sizes

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24628>

9 months agoanv: reuse cmd_buffer::total_batch_size
Lionel Landwerlin [Fri, 11 Aug 2023 09:14:32 +0000 (12:14 +0300)]
anv: reuse cmd_buffer::total_batch_size

This was left unused after 624ac55721 ("anv: move total_batch_size to
anv_batch"). We're now going to use it to store the total amount of
commands written in a command buffer.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24628>

9 months agoanv: rename total_batch_size
Lionel Landwerlin [Fri, 11 Aug 2023 09:04:18 +0000 (12:04 +0300)]
anv: rename total_batch_size

This name is confusing, the real thing it represents is the allocated
amount of batch space.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24628>

9 months agoanv/android: Enable shared presentable image support
Chris Spencer [Tue, 29 Aug 2023 19:26:20 +0000 (20:26 +0100)]
anv/android: Enable shared presentable image support

Signed-off-by: Chris Spencer <spencercw@gmail.com>
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24941>

9 months agoandroid: Add explanatory comment to u_gralloc
Chris Spencer [Tue, 29 Aug 2023 21:16:45 +0000 (22:16 +0100)]
android: Add explanatory comment to u_gralloc

Signed-off-by: Chris Spencer <spencercw@gmail.com>
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24941>

9 months agoutil/cache_test: Add test for get/put() with disabled cache
Dmitry Osipenko [Fri, 1 Sep 2023 00:36:15 +0000 (03:36 +0300)]
util/cache_test: Add test for get/put() with disabled cache

The disk_cache_create() now always returns valid cache even when disk
cache is disabled. In a case of disabled cache, the disk cache is NO-OP.
Test whether get/put() work as expected for the disabled cache.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24985>

9 months agoutil/cache_test: Fix disabled cache test using SHADER_CACHE_DISABLE_BY_DEFAULT
Dmitry Osipenko [Fri, 1 Sep 2023 00:13:11 +0000 (03:13 +0300)]
util/cache_test: Fix disabled cache test using SHADER_CACHE_DISABLE_BY_DEFAULT

Previous commit decoupled EGL_ANDROID_blob_cache from the disk cache
and haven't updated the SHADER_CACHE_DISABLE_BY_DEFAULT test-case that
is failing because now cache is always created even if disk cache is
disabled, such cache is NO-OP in this case. Fix the failing test.

Fixes: 39f26642 ("util: Decouple disk cache from EGL_ANDROID_blob_cache")
Reviewed-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24985>

9 months agoutil/cache_test: Re-add test for disabled cache
Dmitry Osipenko [Fri, 1 Sep 2023 00:03:22 +0000 (03:03 +0300)]
util/cache_test: Re-add test for disabled cache

Test for disabled cache was removed when we decoupled
EGL_ANDROID_blob_cache from the disk cache because test was failing
since it became outdated. Add the updated test.

Fixes: 39f26642 ("util: Decouple disk cache from EGL_ANDROID_blob_cache")
Reviewed-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24985>

9 months agollvmpipe/cs: further cleanups after tgsi removal.
Dave Airlie [Wed, 30 Aug 2023 01:56:56 +0000 (11:56 +1000)]
llvmpipe/cs: further cleanups after tgsi removal.

These was still a few more places that could be polished better.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25045>

9 months agozink: fix linear modifier dmabuf imports
Mike Blumenkrantz [Fri, 1 Sep 2023 17:23:32 +0000 (13:23 -0400)]
zink: fix linear modifier dmabuf imports

these are disguised as INVALID modifiers, but really they're LINEAR

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25002>

9 months agonir/opt_if: Simplify if's with general conditions
Alyssa Rosenzweig [Wed, 30 Aug 2023 22:10:28 +0000 (18:10 -0400)]
nir/opt_if: Simplify if's with general conditions

Dolphin ubershaders have a pattern:

   if (x && y) {
   } else {
      discard;
   }

The current code to simplify if's will bail on this pattern, since the condition
is not a comparison. However, if that check is dropped and we allow NIR to
invert this, we get:

   if (!(x && y)) {
      discard;
   } else {
   }

which is now in a form for nir_opt_conditional_discard to turn into it

   discard_if(!(x && y))

which may be substantially cheaper than the original code.

In general, I see no reason to restrict to conditionals. Assuming the backend is
clever enough to delete empty else blocks (I think most are), then this patch is
a strict win as long as inot instructions are cheaper than empty else blocks.
This matches my intuition for typical GPUs, where simple ALU instructions are
cheaper than control flow. Furthermore, it may be possible in practice for
backends to fold the inot into a richer set of instructions. For example, most
GPUs have a NAND instructions which would fold in the inot in the above code.

So just drop the check, simplify the pass, get the win.

---

Also, to avoid inflating register pressure, make sure we put the inot right
before the if. Android shader-db on is uninspiring due to terrible
coalescing decisions in the current RA. But it does fix the Dolphin smell.

   total instructions in shared programs: 1756571 -> 1756568 (<.01%)
   instructions in affected programs: 1600 -> 1597 (-0.19%)
   helped: 1
   HURT: 4
   Inconclusive result (value mean confidence interval includes 0).

   total bytes in shared programs: 11521172 -> 11521156 (<.01%)
   bytes in affected programs: 10080 -> 10064 (-0.16%)
   helped: 1
   HURT: 4
   Inconclusive result (value mean confidence interval includes 0).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24965>

9 months agolavapipe: fix pipeline stride propagation
Mike Blumenkrantz [Wed, 30 Aug 2023 13:49:30 +0000 (09:49 -0400)]
lavapipe: fix pipeline stride propagation

this is on the cso now

affects dEQP-VK.pipeline.fast_linked_library.extended_dynamic_state.before_good_static.large_stride

Fixes: 76725452239 ("gallium: move vertex stride to CSO")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24954>

9 months agolavapipe: update vbo indices before propagating stride
Mike Blumenkrantz [Wed, 30 Aug 2023 13:38:54 +0000 (09:38 -0400)]
lavapipe: update vbo indices before propagating stride

the vbo index is used to set the stride, so it needs to be updated

affects dEQP-VK.pipeline.pipeline_library.bind_buffers_2.single.stride_0_4_offset_1_0.count_2

Fixes: 76725452239 ("gallium: move vertex stride to CSO")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24954>

9 months agozink: don't block reordering during ref updates in unordered blits
Mike Blumenkrantz [Thu, 24 Aug 2023 12:26:10 +0000 (08:26 -0400)]
zink: don't block reordering during ref updates in unordered blits

unordered blits handle all the reorder mechanics already, so any changes
here end up unnecessarily blocking further reordering

test case KHR-GLES3.packed_pixels.varied_rectangle.rgb

ref #9016

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24934>

9 months agozink: be more precise about flagging rp changes around unordered u_blitter
Mike Blumenkrantz [Wed, 30 Aug 2023 10:54:37 +0000 (06:54 -0400)]
zink: be more precise about flagging rp changes around unordered u_blitter

failing to update rp attachments as needed after unordered blits results in
broken (depth) rendering

Fixes: 3a9f7d70383 ("zink: implement unordered u_blitter calls")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24934>

9 months agoradeonsi/vcn: fix the incorrect dt_size
Leo Liu [Fri, 1 Sep 2023 22:26:43 +0000 (18:26 -0400)]
radeonsi/vcn: fix the incorrect dt_size

Issue: For texture with multiple planes, the planes will point to the
same BO with the total size, so current vcn dt_size is incorrect.

(gdb) p/x *((struct si_resource *)(((struct vl_video_buffer *)out_surf)->resources[0]))
...
  buf = 0x5555558daa30,
  gpu_address = 0xffff800101000000,
  bo_size = 0xa2000,
...
}
(gdb) p/x *((struct si_resource *)(((struct vl_video_buffer *)out_surf)->resources[1]))
...
  buf = 0x5555558daa30,
  gpu_address = 0xffff800101000000,
  bo_size = 0xa2000,
...
}

This is because: in function static struct si_texture *si_texture_create_object(),
   if (plane0) {
      /* The buffer is shared with the first plane. */
      resource->bo_size = plane0->buffer.bo_size;
      ...
      radeon_bo_reference(sscreen->ws, &resource->buf, plane0->buffer.buf);
      resource->gpu_address = plane0->buffer.gpu_address;
   }

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9728
Cc: mesa-stable
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25013>

9 months agoiris: implement Wa_14018912822
Tapani Pälli [Mon, 21 Aug 2023 10:29:43 +0000 (13:29 +0300)]
iris: implement Wa_14018912822

When MSAA is enabled, instead of using BLENDFACTOR_ZERO use CONST_COLOR,
CONST_ALPHA and supply zero by using blend constants.

We need info on blend state entries in the CSO so that we can set them
up properly.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24714>

9 months agoanv: implement Wa_14018912822
Tapani Pälli [Wed, 16 Aug 2023 05:20:12 +0000 (08:20 +0300)]
anv: implement Wa_14018912822

When MSAA is enabled, instead of using BLENDFACTOR_ZERO use CONST_COLOR,
CONST_ALPHA and supply zero by using blend constants.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24714>

9 months agoci: do not fail vkd3d-proton job when the expectations match
Samuel Pitoiset [Mon, 4 Sep 2023 08:34:06 +0000 (10:34 +0200)]
ci: do not fail vkd3d-proton job when the expectations match

When the list of expected failures match, the job shouldn't fail.
This also adjusts the first error check to catch segfaults.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25025>

9 months agoradv/ci: re-enable vkd3d-polaris10-valve
Samuel Pitoiset [Mon, 4 Sep 2023 06:44:51 +0000 (08:44 +0200)]
radv/ci: re-enable vkd3d-polaris10-valve

Like the vkcts job, this was disabled a while ago but it seems to be
working well again.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25025>

9 months agor300: use w channel for scalar opcodes if possible
Pavel Ondračka [Wed, 23 Aug 2023 11:55:48 +0000 (13:55 +0200)]
r300: use w channel for scalar opcodes if possible

The opcodes write to w by default so using anything else means we can't
schedule anything in the rbg slot anyway becasue we have to replicate the
result from w. We already attempt to do this during the scheduling, but
at that point it is more tricky, so doing it early leads to much better
code. Performance++

RV530 benchmarks:

Lightsmark, 1280x800, fullscreen
before:
    N           Min           Max        Median           Avg        Stddev
x   5         27.32         27.36         27.34         27.34   0.015811388
after:
    N           Min           Max        Median           Avg        Stddev
x   5         27.53         27.61         27.59        27.576   0.034351128

Unigine Sanctuary, 1280x800, fullscreen, medium shaders
before:
    N           Min           Max        Median           Avg        Stddev
x   5       10.1211       10.1238       10.1214      10.12192  0.0011211601
after:
    N           Min           Max        Median           Avg        Stddev
x   5       10.4607       10.4637       10.4619      10.46206  0.0012441865

RV530 shader-db:
total instructions in shared programs: 129643 -> 128038 (-1.24%)
instructions in affected programs: 45415 -> 43810 (-3.53%)
helped: 514
HURT: 43
total presub in shared programs: 4912 -> 5201 (5.88%)
presub in affected programs: 752 -> 1041 (38.43%)
helped: 40
HURT: 30
total omod in shared programs: 381 -> 383 (0.52%)
omod in affected programs: 6 -> 8 (33.33%)
helped: 1
HURT: 3
total temps in shared programs: 16904 -> 16841 (-0.37%)
temps in affected programs: 1377 -> 1314 (-4.58%)
helped: 81
HURT: 52
total lits in shared programs: 3555 -> 3550 (-0.14%)
lits in affected programs: 294 -> 289 (-1.70%)
helped: 13
HURT: 11
total cycles in shared programs: 194771 -> 193734 (-0.53%)
cycles in affected programs: 79079 -> 78042 (-1.31%)
helped: 452
HURT: 84
GAINED: shaders/glamor/82.shader_test FS

RV370 shader-db:
total instructions in shared programs: 82116 -> 81600 (-0.63%)
instructions in affected programs: 11888 -> 11372 (-4.34%)
helped: 273
HURT: 40
total temps in shared programs: 12438 -> 12441 (0.02%)
temps in affected programs: 692 -> 695 (0.43%)
helped: 36
HURT: 39
total cycles in shared programs: 128140 -> 127630 (-0.40%)
cycles in affected programs: 25838 -> 25328 (-1.97%)
helped: 266
HURT: 41
GAINED: shaders/0ad/12.shader_test FS
GAINED: shaders/CC3-tiberium-wars/314.shader_test FS
GAINED: shaders/lightsmark/16.shader_test FS
GAINED: shaders/sanctuary/159.shader_test FS
GAINED: shaders/sanctuary/162.shader_test FS
GAINED: shaders/sanctuary/51.shader_test FS
GAINED: shaders/sanctuary/54.shader_test FS
GAINED: shaders/trine/fp-422.shader_test FS

Partial fix for: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6661

Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24889>

9 months agopvr: Add 'info' PVR_DEBUG flag
Vlad Schiller [Thu, 10 Aug 2023 07:39:17 +0000 (08:39 +0100)]
pvr: Add 'info' PVR_DEBUG flag

This commit will add a new PVR_DEBUG flag that, when used,
it will display information about the display and render
devices in the common code (without adding dependencies)

Signed-off-by: Vlad Schiller <vlad-radu.schiller@imgtec.com>
Reviewed-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24931>

9 months agokmsro: Add hdlcd DPU
Carsten Haitzler [Mon, 4 Sep 2023 08:55:34 +0000 (09:55 +0100)]
kmsro: Add hdlcd DPU

Arm hdlcd display units do exist on Juno SoC's. This is the
first time Mesa has had to deal with panfrost working on these SoC's,
thus have to add hdlcd support.

Signed-off-by: Carsten Haitzler <carsten.haitzler@foss.arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25027>

9 months agoci: disable Google Freedreno farm, currently timeouting on all jobs
David Heidelberg [Mon, 4 Sep 2023 10:55:24 +0000 (16:25 +0530)]
ci: disable Google Freedreno farm, currently timeouting on all jobs

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25030>

9 months agov3dv/android: Skip swapchain binding
Roman Stratiienko [Sat, 2 Sep 2023 19:00:32 +0000 (22:00 +0300)]
v3dv/android: Skip swapchain binding

ANV functionality was used as a reference. As stated in anv_BindImageMemory2:

    Ignore this struct on Android, we cannot access swapchain
    structures there.

Fixes 2 failing VTS test:

    dEQP-VK.wsi.android.swapchain.create#image_swapchain_create_info
    dEQP-VK.wsi.android.swapchain.simulate_oom#image_swapchain_create_info

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25028>

9 months agov3dv: Migrate to vk_device_memory
Roman Stratiienko [Sat, 2 Sep 2023 18:01:33 +0000 (21:01 +0300)]
v3dv: Migrate to vk_device_memory

It allows the reuse of some generic code, especially AHB logic.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25028>

9 months agov3dv/android: Enable shared presentable image support
Roman Stratiienko [Sat, 2 Sep 2023 15:35:09 +0000 (18:35 +0300)]
v3dv/android: Enable shared presentable image support

Functionality ensures gralloc won't allocate compressed buffer
incompatible with shared presentable image support.

Broadcom does not support compressed buffers and we can just enable the
feature without additional logic. Despite that, we add the logic here
so it can be replaced with the generic code someday.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25028>

9 months agov3dv/android: Use u_gralloc code
Roman Stratiienko [Sat, 2 Sep 2023 15:18:50 +0000 (18:18 +0300)]
v3dv/android: Use u_gralloc code

Use generic u_gralloc logic instead of custom.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25028>

9 months agoradv: fix capturing indirect dispatches with SQTT
Samuel Pitoiset [Fri, 1 Sep 2023 11:52:28 +0000 (13:52 +0200)]
radv: fix capturing indirect dispatches with SQTT

Looks like indirect dispatches require an event marker instead of an
event marker with dims. That makes sense somehow given the blocks size
is not known at record time with indirect dispatches.

This allows RGP to report correct block sizes.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24994>

9 months agoaco,radv,radeonsi: rename is_monolithic to merged_shader_compiled_separately
Qiang Yu [Fri, 1 Sep 2023 07:21:11 +0000 (15:21 +0800)]
aco,radv,radeonsi: rename is_monolithic to merged_shader_compiled_separately

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24990>

9 months agoradeonsi: Set PIPE_CONTEXT_LOSE_CONTEXT_ON_RESET for auxiliary contexts
Alexander Orzechowski [Sun, 3 Sep 2023 20:28:11 +0000 (16:28 -0400)]
radeonsi: Set PIPE_CONTEXT_LOSE_CONTEXT_ON_RESET for auxiliary contexts

This fixes a regression with context loss hardened compositors such as
wlroots or kwin where instead of continuing execution in a reset
situation, the process would be aborted. Although these applications set
their notification strategy to lose context on reset, radeonsi also
creates auxiliary contexts for its own use observed when
`egl_init_display` and `gbm_create_device` are called from these
compositors. Fix this by allowing a context loss on reset for these
auxiliary contexts.

Note: It seems this has been attempted before for another call site
creating auxiliary contexts, but this location was missed, hence the
fixed commit hash below.

Fixes: #9672
Fixes: 591aaea6486fca44feb65e46ba09aaa708315b50

Signed-off-by: Alexander Orzechowski <alex@ozal.ski>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25023>

9 months agonir/gather: add support for fbfetch and bindless image loads.
Dave Airlie [Thu, 31 Aug 2023 02:07:33 +0000 (12:07 +1000)]
nir/gather: add support for fbfetch and bindless image loads.

If a driver calls gather after lowering the uses_fbfetch_output
needs to be set properly if we have bindless image loads.

Fixes a regression seen calling gather info later in some llvmpipe
work.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24987>

9 months agoac/nir/ngg: Extract nogs_export_vertex_params function.
Timur Kristóf [Mon, 7 Aug 2023 09:19:49 +0000 (11:19 +0200)]
ac/nir/ngg: Extract nogs_export_vertex_params function.

Just for better code readability. No functional changes.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24574>

9 months agoac/nir/ngg: Wait for attribute ring stores in mesh shaders.
Timur Kristóf [Tue, 22 Aug 2023 20:39:22 +0000 (22:39 +0200)]
ac/nir/ngg: Wait for attribute ring stores in mesh shaders.

Make sure that both per-vertex and per-primitive attribute
ring stores are finished before position or primitive export
instructions are executed.

This is necessary because we need to ensure that mesh shader
waves work correctly when they have either vertex-only or
primitive-only waves.

Cc: mesa-stable
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/24574>

9 months agoac/nir/ngg: Refactor mesh shader primitive export.
Timur Kristóf [Tue, 22 Aug 2023 20:28:43 +0000 (22:28 +0200)]
ac/nir/ngg: Refactor mesh shader primitive export.

Cleanup the code that generates the two channels of the
primitive export instruction, and move storing the built-in
per-primitive outputs out to match how vertex attributes work.

Prepares the mesh shader lowering for a workaround that
affect export instructions.

Cc: mesa-stable
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/24574>

9 months agoac/nir/ngg: Wait for attribute stores before VS/TES/GS pos0 export.
Timur Kristóf [Tue, 22 Aug 2023 19:51:43 +0000 (21:51 +0200)]
ac/nir/ngg: Wait for attribute stores before VS/TES/GS pos0 export.

This is a HW bug workaround for some (all?) GFX11 chips.

On these chips, rasterization can start before the attribute ring
stores are finished, which can cause issues.
As a workaround, wait for attribute ring stores to finish
before doing the position export.

Mesh shaders will be taken care of in another commit.

Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24574>

9 months agoac/nir: Slightly refactor how pos0 exports are added when missing.
Timur Kristóf [Tue, 22 Aug 2023 19:30:05 +0000 (21:30 +0200)]
ac/nir: Slightly refactor how pos0 exports are added when missing.

Prepares for a workaround. Makes it possible for this function
to not emit the pos0 export at all so that it can be emitted
by a subsequent call to the function later.

Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24574>

9 months agoac/nir: Add done arg to ac_nir_export_position.
Timur Kristóf [Tue, 22 Aug 2023 18:22:32 +0000 (20:22 +0200)]
ac/nir: Add done arg to ac_nir_export_position.

This prepares for a workaround where we won't need to add
the done flag to the last export in this function, because
it will be added in a subsequent call to the same function.

Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24574>

9 months agoisl/tilememcpy_test: add multiple tile testing
Lionel Landwerlin [Fri, 25 Aug 2023 07:48:19 +0000 (10:48 +0300)]
isl/tilememcpy_test: add multiple tile testing

Also verify that there is no out-of-bounds accesses.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Aditya Swarup <aditya.swarup@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13391>

9 months agoRevert "iris: Disable tiled memcpy for Tile4"
Aditya Swarup [Thu, 28 Jul 2022 00:35:03 +0000 (17:35 -0700)]
Revert "iris: Disable tiled memcpy for Tile4"

This reverts commit 0022a11ff4fbbe89c2511d758f807b286ebb1bd7.

Enable path for Tile4 memcpy functions to be used.

Signed-off-by: Aditya Swarup <aditya.swarup@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13391>

9 months agointel/isl: Linear to Tile-4 conversion unittest
Aditya Swarup [Mon, 18 Jul 2022 23:59:46 +0000 (16:59 -0700)]
intel/isl: Linear to Tile-4 conversion unittest

Add unittest to test conversion of data from linear to
Tile-4 format based on bit swizzling conversion info
mentioned in Bspec.

Signed-off-by: Aditya Swarup <aditya.swarup@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13391>

9 months agointel/isl: Convert Tile4 texture to linear format
Aditya Swarup [Mon, 18 Jul 2022 21:22:12 +0000 (14:22 -0700)]
intel/isl: Convert Tile4 texture to linear format

Add memcpy function to convert Tile-4 4KB texture to linear
format.

Signed-off-by: Aditya Swarup <aditya.swarup@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13391>

9 months agointel/isl: Convert linear texture to Tile4 format
Aditya Swarup [Mon, 18 Jul 2022 21:18:24 +0000 (14:18 -0700)]
intel/isl: Convert linear texture to Tile4 format

Add memcpy function to convert linear data to Tile 4 format.
Tile 4 format consists of 4KB block divided into chunks of 512B.
Each 512B chunk/block is comprised of 8 64B blocks arranged in
Y-tile format.

Signed-off-by: Aditya Swarup <aditya.swarup@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13391>

9 months agointel/isl: Unittest for linear to Ytile conversion
Aditya Swarup [Mon, 1 Nov 2021 21:41:04 +0000 (14:41 -0700)]
intel/isl: Unittest for linear to Ytile conversion

Add unittests for linear to tiled and tiled to linear texture
conversions for Ytile. The test prints the source/output buffer
in hex format with debug flags to verify the result.

Linear to tile conversion fills the linear buffer with values
based on the OWORD index number i.e., OWORD3 will contain
all values filled as 0x03 and
OWORD3 = 0x03030303030303030303030303030303.

The Y-tile to Linear tile conversion uses a similar logic to place
the tiled values in a manner that will result in a linear buffer with
OWORDs filled according to index number as mentioned above.

Signed-off-by: Aditya Swarup <aditya.swarup@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13391>

9 months agoblorp: drop undefined macro
Rohan Garg [Fri, 1 Sep 2023 11:48:51 +0000 (13:48 +0200)]
blorp: drop undefined macro

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 97d6ceaf04 ("intel: Remove GEN_IS_HASWELL macro")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25011>

9 months agocrocus: fix GFX_VERx10 macro
Rohan Garg [Fri, 1 Sep 2023 11:48:20 +0000 (13:48 +0200)]
crocus: fix GFX_VERx10 macro

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25011>

9 months agocrocus: add a __gen_get_batch_address declaration
Rohan Garg [Fri, 1 Sep 2023 11:29:53 +0000 (13:29 +0200)]
crocus: add a __gen_get_batch_address declaration

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25011>

9 months agoanv: use the lineage number for WA
Rohan Garg [Fri, 1 Sep 2023 10:39:13 +0000 (12:39 +0200)]
anv: use the lineage number for WA

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: d0669f3ede ("intel/dev: switch defect identifiers to use lineage numbers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25011>

9 months agoiris: use the correct WA macros and lineage numbers
Rohan Garg [Fri, 1 Sep 2023 10:38:35 +0000 (12:38 +0200)]
iris: use the correct WA macros and lineage numbers

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 0ce595a89a ("intel: use generated helpers for Wa_1508744258")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25011>

9 months agoanv: drop dead ifdef
Rohan Garg [Fri, 1 Sep 2023 09:48:18 +0000 (11:48 +0200)]
anv: drop dead ifdef

The GFX_VERX10 macro doesn't exist and we no longer use
SCRATCH_SURFACE_STATE_POOL_SIZE.

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: b3f6e5dc702 ('anv: remove incorrect ifdef')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25011>

9 months agointel: Limit Intel Vulkan RT to x86_64
Matt Turner [Sat, 2 Sep 2023 12:22:53 +0000 (08:22 -0400)]
intel: Limit Intel Vulkan RT to x86_64

Note: passed CI repeatedly except for the timing out WHL jobs.

Fixes: 28c1053c07c ("intel: Allow using intel_clc from the system")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25009>

9 months agoci: Disable WHL jobs
Alyssa Rosenzweig [Sat, 2 Sep 2023 19:43:01 +0000 (15:43 -0400)]
ci: Disable WHL jobs

Timing out all day.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
9 months agoci: Disable known broken Bifrost Vulkan job
Alyssa Rosenzweig [Wed, 30 Aug 2023 00:56:53 +0000 (20:56 -0400)]
ci: Disable known broken Bifrost Vulkan job

Until someone does the work to eliminate faults, PanVK will be inherently flaky
and should not be in CI. deqp-runner can eat a lot of flakes, and then retrying
the whole job eats more flakes, but neither is a substitute for not testing
known broken (and hence flaky) code and both increase runtime unacceptably. the
g52-vk job earned 2 spots on the latest leaderboard for slowest jobs, I clicked
on https://gitlab.freedesktop.org/mesa/mesa/-/jobs/48142375 to see a jawdropping
54 flakes reported by deqp-runner.

If people insist on keeping the job, then panfrost-g52-vk needs to be demoted to
manual until after someone fixes all these bugs on the driver side. If that's
not going to happen, then there's no point in it being in CI at all. It's broken
code. After a buggy MR, it'll still be broken code. CI doesn't matter if we're
ok with it being broken.

Bottom line is, we can't be running known broken code in CI (bugs = faults =
flakes = unhappy developers), at least for non-robust stacks (panfrost.ko
included). This needs to be policy if it isn't already. Merging this single
character change deals with the hot problem without any fanfare or adverse
effects.

This turns the job into a nightly as David suggested to get it out of the
premerge path until someone is committed to supporting it and does the work to
make it happen.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9721
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24943>

9 months agoaco: implement some exclusive scans with inclusive scans
Georg Lehmann [Tue, 8 Aug 2023 11:35:18 +0000 (13:35 +0200)]
aco: implement some exclusive scans with inclusive scans

exclusive scan lowering uses full wave shift, for iadd/ixor it's faster
to do inclusive scans and subtract/xor the thread's source.

Foz-DB Navi21:
Totals from 21 (0.02% of 132657) affected shaders:
Instrs: 10925 -> 10727 (-1.81%)
CodeSize: 58064 -> 56488 (-2.71%)
Latency: 178471 -> 177928 (-0.30%)
InvThroughput: 24374 -> 24145 (-0.94%)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24555>

9 months agorusticl/memory: only specify PIPE_BIND_SHADER_IMAGE where supported
Karol Herbst [Tue, 29 Aug 2023 19:59:31 +0000 (21:59 +0200)]
rusticl/memory: only specify PIPE_BIND_SHADER_IMAGE where supported

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24982>

9 months agonir: add nir_scalar_equal
Georg Lehmann [Sat, 12 Aug 2023 22:14:29 +0000 (00:14 +0200)]
nir: add nir_scalar_equal

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24656>

9 months agonir: add nir_scalar intrinsic helpers
Georg Lehmann [Sat, 12 Aug 2023 22:03:03 +0000 (00:03 +0200)]
nir: add nir_scalar intrinsic helpers

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24656>

9 months agodocs: add LAVA farm informations
David Heidelberg [Wed, 30 Aug 2023 19:11:26 +0000 (21:11 +0200)]
docs: add LAVA farm informations

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24959>

9 months agoRevert "ci: disable a660 jobs"
David Heidelberg [Wed, 30 Aug 2023 17:49:20 +0000 (19:49 +0200)]
Revert "ci: disable a660 jobs"

This reverts commit 209ed8eace0ba9095e3ef956a10cd9196407047f.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24959>

9 months agoanv: enable standard Y tiles
Lionel Landwerlin [Wed, 14 Jun 2023 09:31:19 +0000 (12:31 +0300)]
anv: enable standard Y tiles

We kept those tilings disabled up to know. Now that ISL has proper
support for them, remove this.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>