platform/upstream/mesa.git
2 years agonir: add nir_gather_xfb_info_from_intrinsics for lowered IO
Marek Olšák [Mon, 3 Jan 2022 04:38:00 +0000 (23:38 -0500)]
nir: add nir_gather_xfb_info_from_intrinsics for lowered IO

Drivers will use this.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14388>

2 years agonir: add nir_lower_io_passes() with new transform feedback
Marek Olšák [Sat, 1 Jan 2022 10:32:14 +0000 (05:32 -0500)]
nir: add nir_lower_io_passes() with new transform feedback

moved from radeonsi without the vectorization, which won't be needed for
now. We will lower IO in st/mesa instead of radeonsi to get the transform
feedback info into store instructions.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14388>

2 years agonir: add nir_io_semantics::no_varying, no_sysval_output, and helpers
Marek Olšák [Mon, 3 Jan 2022 00:46:45 +0000 (19:46 -0500)]
nir: add nir_io_semantics::no_varying, no_sysval_output, and helpers

This is for drivers that have separate store instructions for varyings,
system value outputs (such as clip distances), and transform feedback.
The flags tell the driver not to store the output to those locations.

This will be used by radeonsi initially, and then maybe by a new linker.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14388>

2 years agonir: scalarize transform feedback info in nir_lower_io_to_scalar
Marek Olšák [Sun, 19 Dec 2021 21:23:42 +0000 (16:23 -0500)]
nir: scalarize transform feedback info in nir_lower_io_to_scalar

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14388>

2 years agonir: add shader_info::xfb_strides
Marek Olšák [Sat, 1 Jan 2022 11:18:56 +0000 (06:18 -0500)]
nir: add shader_info::xfb_strides

NIR now fully contains pipe_stream_output_info in shader_info and IO
intrinsics if lower_io_variables is true. radeonsi will not use
pipe_stream_output_info after this, and other drivers are free to follow
that.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14388>

2 years agonir: add transform feedback info into nir_intrinsic_store_output
Marek Olšák [Sun, 19 Dec 2021 19:20:52 +0000 (14:20 -0500)]
nir: add transform feedback info into nir_intrinsic_store_output

This will allow compaction of transform feedback varyings because they
are no longer tied to varying slots with this information.
It will also make transform feedback info available to all NIR passes
after IO is lowered. It's meant to replace pipe_stream_output_info.

Other intrinsics are not used with transform feedback.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14388>

2 years agonir: fix nir_io_semantics::gs_streams in nir_lower_io_to_scalar
Marek Olšák [Sun, 2 Jan 2022 04:11:00 +0000 (23:11 -0500)]
nir: fix nir_io_semantics::gs_streams in nir_lower_io_to_scalar

gs_streams is relative to the component. Also clear the high bits.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14388>

2 years agonir: validate write_mask for all intrinsics that have it
Marek Olšák [Sun, 19 Dec 2021 20:32:08 +0000 (15:32 -0500)]
nir: validate write_mask for all intrinsics that have it

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14388>

2 years agoradeonsi: fix broken VK-GL buffer interop
Marek Olšák [Tue, 22 Feb 2022 21:46:28 +0000 (16:46 -0500)]
radeonsi: fix broken VK-GL buffer interop

Fixes: ad9b5ac0a18 - radeonsi: more fixes for si_buffer_from_winsys_buffer for GL-VK interop
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6063

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tested-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15124>

2 years agoanv: Disable aux if the explicit modifier lacks it
Nanley Chery [Fri, 25 Feb 2022 01:16:37 +0000 (17:16 -0800)]
anv: Disable aux if the explicit modifier lacks it

For dmabuf imports, configure the primary surface without support for
compression if the modifier doesn't specify it. This helps to create VkImages
with memory requirements that are compatible with the buffers apps provide.

Suggested-by: Philip Langdale <philipl@overt.org>
Cc: 22.0 <mesa-stable>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5940
Tested-by: Philip Langdale <philipl@overt.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15181>

2 years agoanv: Refactor anv_image_init_from_create_info
Nanley Chery [Fri, 25 Feb 2022 17:50:13 +0000 (09:50 -0800)]
anv: Refactor anv_image_init_from_create_info

Use a variable to store the anv_image_create_info struct. We'll modify it for a
bug fix in the next patch.

Cc: 22.0 <mesa-stable>
Tested-by: Philip Langdale <philipl@overt.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15181>

2 years agoanv: Change a parameter of the implicit layout fn
Nanley Chery [Fri, 25 Feb 2022 01:17:49 +0000 (17:17 -0800)]
anv: Change a parameter of the implicit layout fn

Replace the create_info parameter with isl_extra_usage_flags to more closely
match the parameters of explicit layout function.

Tested-by: Philip Langdale <philipl@overt.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15181>

2 years agopan/va: Add missing copyright notice
Alyssa Rosenzweig [Tue, 1 Mar 2022 19:14:12 +0000 (14:14 -0500)]
pan/va: Add missing copyright notice

Minor.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>

2 years agopan/bi: Extract INSTRUCTION_CASE macro
Alyssa Rosenzweig [Fri, 19 Nov 2021 20:51:13 +0000 (15:51 -0500)]
pan/bi: Extract INSTRUCTION_CASE macro

Useful across multiple optimization tests.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>

2 years agopan/bi: Adapt bi_lower_branch for Valhall
Alyssa Rosenzweig [Tue, 27 Jul 2021 00:19:48 +0000 (20:19 -0400)]
pan/bi: Adapt bi_lower_branch for Valhall

Disable the Bifrost optimization; it's not portable.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>

2 years agopan/bi: Trade off registers/threads on Valhall
Alyssa Rosenzweig [Mon, 2 Aug 2021 16:30:03 +0000 (12:30 -0400)]
pan/bi: Trade off registers/threads on Valhall

It's only v6 that's missing this feature.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>

2 years agopan/bi: Add BI_SUBGROUP_SUBGROUP16 option
Alyssa Rosenzweig [Wed, 11 Aug 2021 20:34:46 +0000 (16:34 -0400)]
pan/bi: Add BI_SUBGROUP_SUBGROUP16 option

Valhall uses 16-wide warps.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>

2 years agopan/bi: Wire Valhall disassembler into compiler
Alyssa Rosenzweig [Tue, 1 Mar 2022 19:13:53 +0000 (14:13 -0500)]
pan/bi: Wire Valhall disassembler into compiler

Useful when we grow Valhall support (soon!)

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>

2 years agopan/bi: Support standalone Valhall disassembly
Alyssa Rosenzweig [Mon, 22 Nov 2021 00:01:31 +0000 (19:01 -0500)]
pan/bi: Support standalone Valhall disassembly

$ bifrost_compiler disasm --gpu=G78 foo.bin

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>

2 years agopan/bi: Allow CSE of preloaded registers
Alyssa Rosenzweig [Sun, 12 Dec 2021 21:45:16 +0000 (16:45 -0500)]
pan/bi: Allow CSE of preloaded registers

Needed to CSE `LEA_VARY` in varying shaders on Valhall.

No shader-db changes on Bifrost.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>

2 years agopan/bi: Use a progress loop for constant folding
Alyssa Rosenzweig [Wed, 22 Dec 2021 18:22:21 +0000 (13:22 -0500)]
pan/bi: Use a progress loop for constant folding

Needed to fold the dependent patterns produced by texture instructions
during NIR->Valhall.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>

2 years agopan/bi: Mark NOP as having no destinations
Alyssa Rosenzweig [Sun, 9 Jan 2022 21:01:09 +0000 (16:01 -0500)]
pan/bi: Mark NOP as having no destinations

More accurate and more convenient.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>

2 years agopanfrost: Unify barrier+helper handling
Alyssa Rosenzweig [Sun, 23 Jan 2022 21:09:18 +0000 (16:09 -0500)]
panfrost: Unify barrier+helper handling

These are unified in the hardware, so let's unify them in pan_shader_info.
Hoisting this logic to pan_shader.c avoids the need to duplicate this logic for
Midgard/Bifrost (RSD packing) and Valhall (SPD packing).

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>

2 years agopanfrost: Set texel_interleave on Valhall
Alyssa Rosenzweig [Tue, 1 Mar 2022 19:18:51 +0000 (14:18 -0500)]
panfrost: Set texel_interleave on Valhall

Instead of specifying the tiling on the texture descriptor, Valhall specifies it
on the plane descriptor. There is a new flag on the texture descriptor
specifying only whether the planes are interleaved or not.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>

2 years agopanfrost: Adapt estimate_texture_payload_size to Valhall
Alyssa Rosenzweig [Fri, 25 Feb 2022 21:42:28 +0000 (16:42 -0500)]
panfrost: Adapt estimate_texture_payload_size to Valhall

The plane descriptor is larger than earlier surface descriptors, so we need to
be somewhat careful here. This removes a memory micro-optimization in the
interest of simplifying the code.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>

2 years agopanfrost: Don't emit compression tags on Valhall
Alyssa Rosenzweig [Thu, 3 Feb 2022 15:50:34 +0000 (10:50 -0500)]
panfrost: Don't emit compression tags on Valhall

Unnecessary. To avoid even more #if/#endif soup, merge the v4, v5-v8, and v9
paths together -- by returning 0 as the compression tag on v4 or v9.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>

2 years agopanfrost: Allow uploading fragment SPDs
Alyssa Rosenzweig [Fri, 19 Nov 2021 04:38:50 +0000 (23:38 -0500)]
panfrost: Allow uploading fragment SPDs

SPDs don't have the state dependence that fragment RSDs do.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>

2 years agopanfrost: Don't pack blend constants with blend shaders
Alyssa Rosenzweig [Sat, 29 Jan 2022 15:16:21 +0000 (10:16 -0500)]
panfrost: Don't pack blend constants with blend shaders

It's probably harmless, but it is logically meaningless. The DDK doesn't do it,
I don't see a reason for us to, either. In theory this should be a small
overhead win.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>

2 years agopanfrost: Generalize some is_bifrost users
Alyssa Rosenzweig [Fri, 28 Jan 2022 22:05:45 +0000 (17:05 -0500)]
panfrost: Generalize some is_bifrost users

Valhall would want these too. Regretting the is_bifrost check at all..

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>

2 years agopanfrost: Add PAN_MESA_DEBUG=dump option
Alyssa Rosenzweig [Fri, 28 Jan 2022 21:18:34 +0000 (16:18 -0500)]
panfrost: Add PAN_MESA_DEBUG=dump option

To dump all graphics memory via the new pandecode_dump_mappings function(),
since for Valhall I have to do this often enough to warrant a dynamic flag.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>

2 years agopanfrost: Rename prepare_rsd->prepare_shader
Alyssa Rosenzweig [Fri, 19 Nov 2021 04:37:41 +0000 (23:37 -0500)]
panfrost: Rename prepare_rsd->prepare_shader

This hook will be repurposed on Valhall to prepare the Shader Program
Descriptor, which takes the role of the RSD. Rename to avoid confusion.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>

2 years agopanfrost: Add an enum for Valhall resource tables
Alyssa Rosenzweig [Sat, 11 Dec 2021 23:08:47 +0000 (18:08 -0500)]
panfrost: Add an enum for Valhall resource tables

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>

2 years agopanfrost: Make Divisor E an integer on v9
Alyssa Rosenzweig [Fri, 25 Feb 2022 20:15:35 +0000 (15:15 -0500)]
panfrost: Make Divisor E an integer on v9

For consistency with previous architecture's XML files. Logically this is an
1-bit unsigned integer, not a boolean.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>

2 years agopanfrost: Clarify contains descriptor? bit
Alyssa Rosenzweig [Thu, 3 Feb 2022 00:43:10 +0000 (19:43 -0500)]
panfrost: Clarify contains descriptor? bit

Influences cache prefetching. I don't see a good reason to put anything other
than descriptors inside shader resources, meaning always setting this bit is
appropriate (at least for GLES).

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>

2 years agopanfrost: Remove Invalidate Cache from Valhall job header
Alyssa Rosenzweig [Thu, 3 Feb 2022 00:29:35 +0000 (19:29 -0500)]
panfrost: Remove Invalidate Cache from Valhall job header

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>

2 years agopanfrost: Add Tile Render Order enum to fragment jobs
Alyssa Rosenzweig [Wed, 2 Feb 2022 23:31:18 +0000 (18:31 -0500)]
panfrost: Add Tile Render Order enum to fragment jobs

Not sure what this is needed for yet.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>

2 years agopanfrost: Extend SPD size
Alyssa Rosenzweig [Sun, 9 Jan 2022 18:38:23 +0000 (13:38 -0500)]
panfrost: Extend SPD size

There is software-defined state at the end we don't need. Model in the XML for
correct behaviour.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>

2 years agoradeonsi: add check for graphics to si_try_normal_clear
Thong Thai [Fri, 25 Feb 2022 17:12:07 +0000 (12:12 -0500)]
radeonsi: add check for graphics to si_try_normal_clear

Cc: mesa-stable
Signed-off-by: Thong Thai <thong.thai@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15177>

2 years agoanv: fix fast clear type value with external images
Lionel Landwerlin [Sat, 19 Feb 2022 22:00:48 +0000 (00:00 +0200)]
anv: fix fast clear type value with external images

Disable fast clear if not supported by the external modifier.

v2: Set fast_clear value to NONE in case of import/export from/to external

v3: Move logic next to existing acquire/release checks (Nanley)

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

2 years agovenus: Implement guest vram blob type.
Oleksandr Gabrylchuk [Thu, 24 Feb 2022 11:06:48 +0000 (12:06 +0100)]
venus: Implement guest vram blob type.

Add support of GUEST_VRAM type of blob. These are dedicated heap memory
allocations required for vk support on hypervisors that don't support
runtime injections of host memory into guest physical address space.

The flow of usage:
1) Host VM reserves dedicated heap memory
2) Device get info about memory reservations and report it to guest
using mmio registers
3) Guest virtio-gpu driver on starts checks mmio registers for
physical address and length of reserved region. Then it reserves it
in guest.
4) On each call of vkAllocateMemory() guest driver gets chunk of
required memory and send it to host using sg list. It uses one sg
entry for 1 blob call. Heap is managed on guest using drm memory
manager (drm_mm).

Signed-off-by: Oleksandr.Gabrylchuk <Oleksandr.Gabrylchuk@opensynergy.com>
Signed-off-by: Andrii Pauk <Andrii.Pauk@opensynergy.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14536>

2 years agoamd: update addrlib
Marek Olšák [Thu, 24 Feb 2022 16:46:51 +0000 (11:46 -0500)]
amd: update addrlib

Reviewed-by: Yifan Zhang <yifan1.zhang@amd.com>
Tested-by: Yifan Zhang <yifan1.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15155>

2 years agoamd: add support for gfx1036 and gfx1037 chips
Marek Olšák [Thu, 24 Feb 2022 15:25:23 +0000 (10:25 -0500)]
amd: add support for gfx1036 and gfx1037 chips

Both are identified as GFX1036 for simplicity.

Reviewed-by: Yifan Zhang <yifan1.zhang@amd.com>
Tested-by: Yifan Zhang <yifan1.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15155>

2 years agoac: set correct cache size per TCC for Yellow Carp
Marek Olšák [Sat, 9 Oct 2021 01:24:02 +0000 (21:24 -0400)]
ac: set correct cache size per TCC for Yellow Carp

Reviewed-by: Yifan Zhang <yifan1.zhang@amd.com>
Tested-by: Yifan Zhang <yifan1.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15155>

2 years agoradv: disable DCC for Fable Anniversary, Dragons Dogma, GTA IV and more
Samuel Pitoiset [Tue, 1 Mar 2022 13:16:24 +0000 (14:16 +0100)]
radv: disable DCC for Fable Anniversary, Dragons Dogma, GTA IV and more

Also Starcraft 2 and The Force Unleashed II.

These games are known to be affected by the feedback loop issue. We will
fix this properly soon but as a hotfix disabling DCC should be enough.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4424
Cc: mesa-stable
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/15203>

2 years agoiris: Do not apply SCANOUT allocation flags for SHARED-only requests
Vadym Shovkoplias [Mon, 20 Dec 2021 11:39:21 +0000 (13:39 +0200)]
iris: Do not apply SCANOUT allocation flags for SHARED-only requests

It provides similar solution as in [1].

This was workaround for the users of gbm_bo_create_with_modifiers(),
which were unable to specify the buffer usage (GPU / GPU+DISPLAY).

But after the commit [2] this become possible. And forcing usage to
GBM_BO_USE_SCANOUT migrated directly into gbm_bo_create_with_modifiers
[3], allowing us to remove such workarounds from the drivers.

[1]: ef3b31c9 ("v3d: Don't force SCANOUT for PIPE_BIND_SHARED requests")
[2]: 268e12c6 ("gbm: add gbm_{bo,surface}_create_with_modifiers2")
[3]: ad50b47a ("gbm: assume USE_SCANOUT in create_with_modifiers")

Suggested-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
Signed-off-by: Vadym Shovkoplias <vadym.shovkoplias@globallogic.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5642
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14264>

2 years agoac/nir: Extract final mesh shader output counts to a separate function.
Timur Kristóf [Sun, 27 Feb 2022 17:46:59 +0000 (18:46 +0100)]
ac/nir: Extract final mesh shader output counts to a separate function.

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/15199>

2 years agoaco: Remove superfluous code for mesh shader workgroup ID.
Timur Kristóf [Sun, 27 Feb 2022 17:41:24 +0000 (18:41 +0100)]
aco: Remove superfluous code for mesh shader workgroup ID.

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/15199>

2 years agoac/nir: Properly invalidate mesh shader metadata.
Timur Kristóf [Sun, 27 Feb 2022 17:41:10 +0000 (18:41 +0100)]
ac/nir: Properly invalidate mesh shader metadata.

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/15199>

2 years agoac/nir: Fix workgroup ID in mesh shader waves other than the first.
Timur Kristóf [Sun, 27 Feb 2022 17:40:36 +0000 (18:40 +0100)]
ac/nir: Fix workgroup ID in mesh shader waves other than the first.

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/15199>

2 years agoac/nir: Store mesh shader API and HW workgroup size in lowering state.
Timur Kristóf [Sun, 27 Feb 2022 17:39:01 +0000 (18:39 +0100)]
ac/nir: Store mesh shader API and HW workgroup size in lowering state.

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/15199>

2 years agoac/nir: Reuse existing nir_builder for emit_ms_finale.
Timur Kristóf [Sun, 27 Feb 2022 16:59:21 +0000 (17:59 +0100)]
ac/nir: Reuse existing nir_builder for emit_ms_finale.

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/15199>

2 years agoac/nir: Use vertex count minus 1 to determine max index in mesh shaders.
Timur Kristóf [Sun, 27 Feb 2022 16:58:46 +0000 (17:58 +0100)]
ac/nir: Use vertex count minus 1 to determine max index in mesh shaders.

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/15199>

2 years agoci, valve: Add the dEQP runners for Valve CI
Charlie Turner [Mon, 21 Feb 2022 12:38:25 +0000 (12:38 +0000)]
ci, valve: Add the dEQP runners for Valve CI

v2.

  - Build the runner image as part of the CI for the boot2container
  project, rather than as a manually step using the build instructions
  in valve-trigger.dockerfile.

  - Depend on a non-default kernel build hosted in the valve-infra
  package repository. This does reduce the current caching feature of
  local artifacts, but makes it easier to chop and change kernels on a
  per-project or even per-test basis.

v3.

  - Depend on a kernel built and stored in the valve-infra generic
  package repo.

  - Build the runner container using ci-templates as part of the CI in
  valve-infra.

  - Now that the runner container is built in the valve-infra CI, I
  dropped the source import of client.py and message.py. They are
  built in the runner container.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14660>

2 years agoamd, ci: Categorize the sections of the CI file.
Charlie Turner [Mon, 10 Jan 2022 18:46:25 +0000 (18:46 +0000)]
amd, ci: Categorize the sections of the CI file.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14660>

2 years agoamd, ci: Drop log level in SPIRV -> NIR code generator.
Charlie Turner [Mon, 10 Jan 2022 18:45:40 +0000 (18:45 +0000)]
amd, ci: Drop log level in SPIRV -> NIR code generator.

See 786fa3435c for the rationale of this variable, but the point is to
avoid many error reports for conformance conformance issues within the
VK-CTS shaders.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14660>

2 years agoamd, ci: Remove unused runners.
Charlie Turner [Mon, 10 Jan 2022 18:45:26 +0000 (18:45 +0000)]
amd, ci: Remove unused runners.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14660>

2 years agoci, valve: Add support scripts for the Valve bare-metal farm.
Charlie Turner [Thu, 17 Feb 2022 09:49:32 +0000 (09:49 +0000)]
ci, valve: Add support scripts for the Valve bare-metal farm.

- Add the scripts to the prepared Mesa artifacts for use in later
runner stages.

- Add a template generator (generate_b2c.py) which reads and
validates (very lightly for now) the Gitlab job environment and then
spits out a YAML file describing the necessary test workload to be
sent to a Valve CI gateway.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14660>

2 years agoradv: remove color exports in presence of holes
Samuel Pitoiset [Mon, 21 Feb 2022 14:47:46 +0000 (15:47 +0100)]
radv: remove color exports in presence of holes

If there is holes, eg. if only MRT0 and MRT2 are exported, we have to
set MRT1 to SPI_SHADER_32_R to avoid a GPU hang but the export can
still be removed from the fragment shader.

fossils-db (Sienna Cichlid):
Totals from 565 (0.42% of 134913) affected shaders:
VGPRs: 13328 -> 11456 (-14.05%)
CodeSize: 613232 -> 548224 (-10.60%); split: -11.13%, +0.53%
LDS: 284672 -> 296960 (+4.32%)
MaxWaves: 17624 -> 17684 (+0.34%)
Instrs: 113056 -> 100445 (-11.15%); split: -11.68%, +0.53%
Latency: 684327 -> 639348 (-6.57%); split: -7.17%, +0.60%
InvThroughput: 122877 -> 104382 (-15.05%); split: -15.18%, +0.13%
VClause: 2601 -> 2323 (-10.69%); split: -10.77%, +0.08%
SClause: 5629 -> 5443 (-3.30%); split: -3.91%, +0.60%
Copies: 9393 -> 8720 (-7.16%); split: -8.22%, +1.05%
PreSGPRs: 14623 -> 13666 (-6.54%); split: -6.76%, +0.22%
PreVGPRs: 9847 -> 8503 (-13.65%)

fossils-db (Polaris10):
Totals from 565 (0.42% of 135960) affected shaders:
SGPRs: 28064 -> 27104 (-3.42%)
VGPRs: 12516 -> 10544 (-15.76%); split: -15.79%, +0.03%
CodeSize: 516920 -> 456536 (-11.68%); split: -11.68%, +0.00%
MaxWaves: 4369 -> 4418 (+1.12%)
Instrs: 97771 -> 85903 (-12.14%); split: -12.14%, +0.00%
Latency: 767482 -> 708545 (-7.68%); split: -7.97%, +0.29%
InvThroughput: 280017 -> 235744 (-15.81%)
VClause: 2270 -> 2090 (-7.93%); split: -8.50%, +0.57%
SClause: 5185 -> 5012 (-3.34%); split: -3.86%, +0.52%
Copies: 8328 -> 7555 (-9.28%); split: -9.35%, +0.07%
Branches: 1143 -> 1113 (-2.62%)
PreSGPRs: 13816 -> 12725 (-7.90%); split: -7.92%, +0.02%
PreVGPRs: 9707 -> 8270 (-14.80%)

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

2 years agoac/nir: remove TCS nir_var_shader_out memory barrier
Rhys Perry [Fri, 25 Feb 2022 17:40:16 +0000 (17:40 +0000)]
ac/nir: remove TCS nir_var_shader_out memory barrier

nir_var_shader_out writes are only used for later TES invocations, so I
don't think there's any need for the TCS workgroup to wait for them.

fossil-db (Sienna Cichlid):
Totals from 1691 (1.04% of 162293) affected shaders:
Instrs: 710699 -> 709008 (-0.24%)
CodeSize: 3830168 -> 3823404 (-0.18%)
Latency: 3396997 -> 3007934 (-11.45%)
InvThroughput: 1212094 -> 1082823 (-10.67%)

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

2 years agointel/compiler: Lower Task/Mesh I/O before SIMD specific lowering
Caio Oliveira [Tue, 15 Feb 2022 00:13:28 +0000 (16:13 -0800)]
intel/compiler: Lower Task/Mesh I/O before SIMD specific lowering

These are the same for all variants, so just lower it before cloning
the nir_shader for each of them.

Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15019>

2 years agoturnip: Implement VK_EXT_physical_device_drm
Danylo Piliaiev [Thu, 10 Feb 2022 13:35:59 +0000 (15:35 +0200)]
turnip: Implement VK_EXT_physical_device_drm

Copied from ANV and V3DV.

v1. Fix a build error for clang "unannotated fall-through between switch labels"
( Hyunjun Ko <zzoon.ko@igalia.com> )

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

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14971>

2 years agoradeonsi/drirc: use force_gl_vendor for Maya
Pierre-Eric Pelloux-Prayer [Thu, 24 Feb 2022 08:59:51 +0000 (09:59 +0100)]
radeonsi/drirc: use force_gl_vendor for Maya

Otherwise OpenCL initialization fails with "unknown vendor id 0".

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15151>

2 years agonouveau: add dEQP/GLCTS run failure info for GF108/GT215
Ilia Mirkin [Mon, 31 Jan 2022 05:45:52 +0000 (00:45 -0500)]
nouveau: add dEQP/GLCTS run failure info for GF108/GT215

I happened to have these plugged in. Ran them against mesa 21.3 and
recent VK-GL-CTS tree (shortly after vulkan-cts-1.2.8).

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Emma Anholt <emma@anholt.net>
Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14797>

2 years agoRevert "anv: Require the local heap for CCS on XeHP"
Nanley Chery [Thu, 17 Feb 2022 18:34:17 +0000 (10:34 -0800)]
Revert "anv: Require the local heap for CCS on XeHP"

This reverts commit 382f6ccda8869f72134dbfa9c3cc68a229e01138.

The spec requires that all color images created with the same tiling
(and a few other properties) support the same memoryTypeBits. So this
wasn't a valid change. It also wasn't necessary - we already have a
mechanism in anv_BindImageMemory2 for disabling compression if the BO
doesn't support it.

With this, XeHP passes the tests in
dEQP-VK.memory.requirements.*tiling_optimal

Fixes: 382f6ccd ("anv: Require the local heap for CCS on XeHP")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15068>

2 years agoanv: Add a perf warning in anv_BindImageMemory2
Nanley Chery [Fri, 18 Feb 2022 00:20:00 +0000 (16:20 -0800)]
anv: Add a perf warning in anv_BindImageMemory2

It reports: "BO lacks implicit CCS. Disabling the CCS aux usage."

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15068>

2 years agoanv: Fall back to HiZ when disabling CCS on HiZ+CCS
Nanley Chery [Thu, 17 Feb 2022 18:26:34 +0000 (10:26 -0800)]
anv: Fall back to HiZ when disabling CCS on HiZ+CCS

When an image configured for HIZ_CCS/HIZ_CCS_WT is bound to a BO lacking
implicit CCS, we disable any compression it may have had. Such images
are still compatible with ISL_AUX_USAGE_HIZ however. Fall back to that
aux usage to retain the performance benefit.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15068>

2 years agoanv: Don't disable HiZ/MCS in anv_BindImageMemory2
Nanley Chery [Thu, 17 Feb 2022 18:26:34 +0000 (10:26 -0800)]
anv: Don't disable HiZ/MCS in anv_BindImageMemory2

When an image is bound to a BO lacking implicit CCS, we disable any
compression it may have had. This is unnecessary in the cases where the
compression type doesn't depend on the BO having implicit CCS support.
Avoid this disabling for ISL_AUX_USAGE_MCS and ISL_AUX_USAGE_HIZ.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15068>

2 years agoir3: Use isam for bindless images
Connor Abbott [Mon, 21 Feb 2022 18:25:40 +0000 (19:25 +0100)]
ir3: Use isam for bindless images

In the bindless case, we don't have to keep any shadow descriptors and
can just reuse the IBO descriptor as a texture descriptor. Now that
we're emitting the swizzle we can just flip this on.

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

2 years agotu: Call nir_opt_access
Connor Abbott [Mon, 21 Feb 2022 18:24:39 +0000 (19:24 +0100)]
tu: Call nir_opt_access

This adds some small optimizations, and enables lowering to isam in more
cases where the app didn't specify readonly.

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

2 years agoir3/nir: Fix 1d array readonly images
Connor Abbott [Tue, 22 Feb 2022 10:35:55 +0000 (11:35 +0100)]
ir3/nir: Fix 1d array readonly images

ncoords includes the array index, and the NIR source has the array index
as its last component, so we have to insert the extra y coordinate in
the middle in this case.

Fixes: 0bb0cac ("freedreno/ir3: handle image buffer")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15114>

2 years agoir3: Don't always set bindless_tex with readonly images
Connor Abbott [Mon, 21 Feb 2022 18:18:19 +0000 (19:18 +0100)]
ir3: Don't always set bindless_tex with readonly images

Fixes: 274f381 ("ir3: Plumb through bindless support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15114>

2 years agofreedreno/fdl: Set swizzle on storage descriptor
Connor Abbott [Mon, 21 Feb 2022 18:12:03 +0000 (19:12 +0100)]
freedreno/fdl: Set swizzle on storage descriptor

It appears to be unused by ldib/stib, but it will let us use isam on IBO
descriptors for bindless images.

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

2 years agofreedreno: Replace A6XX_IBO with A6XX_TEX_CONST
Connor Abbott [Mon, 21 Feb 2022 18:05:52 +0000 (19:05 +0100)]
freedreno: Replace A6XX_IBO with A6XX_TEX_CONST

Since these were reverse-engineered, it's become clear that IBO
descriptors are just a subset of texture descriptors, and bindless reads
of readonly images actually use isam on the IBO descriptor, further
confirming that the two are always compatible, even if not all of the
texture fields exist for IBOs. It's pointless to have a separate type
for IBOs, and just leads to things getting out-of-sync unnecessarily
which has already happened. Just remove it and use TEX_CONST insted.

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

2 years agoir3: Use CAN_REORDER instead of NON_WRITEABLE
Connor Abbott [Mon, 21 Feb 2022 17:42:49 +0000 (18:42 +0100)]
ir3: Use CAN_REORDER instead of NON_WRITEABLE

CAN_REORDER takes volatile into account, and is closer to what we
actually require to use texture instructions, which is that we can
arbitrarily reorder loads.

Fixes: aa93896 ("freedreno/ir3: adjust condition for when to use ldib")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15114>

2 years agoturnip: Set drmFormatModifierTilingFeatures
Danylo Piliaiev [Tue, 15 Feb 2022 15:08:14 +0000 (17:08 +0200)]
turnip: Set drmFormatModifierTilingFeatures

From Vulkan spec for VkDrmFormatModifierProperties2EXT:

 "drmFormatModifierTilingFeatures is a bitmask of VkFormatFeatureFlagBits
  that are supported by any image created with format and drmFormatModifier."

 "The returned drmFormatModifierTilingFeatures must contain at least one bit."

 "Therefore, if the returned drmFormatModifier is DRM_FORMAT_MOD_LINEAR,
  then drmFormatModifierPlaneCount must equal the format planecount, and
  drmFormatModifierTilingFeatures must be identical to the
  VkFormatProperties2::linearTilingFeatures returned in the same pNext chain."

Relevant tests: dEQP-VK.drm_format_modifiers.*

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

2 years agozink: add layer asserts for 3d imageview creation
Mike Blumenkrantz [Fri, 18 Feb 2022 14:44:45 +0000 (09:44 -0500)]
zink: add layer asserts for 3d imageview creation

make sure there's no other mishaps here in the future

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15172>

2 years agozink: more accurately clamp 3d fb surfaces to corresponding 2d target
Mike Blumenkrantz [Tue, 22 Feb 2022 21:10:05 +0000 (16:10 -0500)]
zink: more accurately clamp 3d fb surfaces to corresponding 2d target

if more than 1 layer is being bound, this is an array, otherwise it's just
regular 2d

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15172>

2 years agozink: clamp 3d/array shader images to lower dimensionality using layer counts
Mike Blumenkrantz [Fri, 18 Feb 2022 14:43:24 +0000 (09:43 -0500)]
zink: clamp 3d/array shader images to lower dimensionality using layer counts

this creates the view type expected by the shader instead of doing weird stuff
like trying to create a 3D imageview with layers > 1

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15172>

2 years agozink: directly create surfaces for shader images
Mike Blumenkrantz [Fri, 18 Feb 2022 14:42:25 +0000 (09:42 -0500)]
zink: directly create surfaces for shader images

avoid the implicit clamping of fb surfaces in zink_create_surface()
in order to provide more granularity

no functional changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15172>

2 years agozink: restrict clear flushing on sampler/image bind to compute binds
Mike Blumenkrantz [Tue, 8 Feb 2022 16:03:48 +0000 (11:03 -0500)]
zink: restrict clear flushing on sampler/image bind to compute binds

this is otherwise going to be handled on the next renderpass start

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15172>

2 years agozink: use VK_EXT_depth_clip_control when available
Mike Blumenkrantz [Wed, 23 Feb 2022 15:59:12 +0000 (10:59 -0500)]
zink: use VK_EXT_depth_clip_control when available

this saves a few ALUs in vertex stages

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15174>

2 years agoglx/drisw: handle GL_RESET_NOTIFICATION_STRATEGY
Mike Blumenkrantz [Thu, 17 Feb 2022 15:36:05 +0000 (10:36 -0500)]
glx/drisw: handle GL_RESET_NOTIFICATION_STRATEGY

fixes (llvmpipe):
KHR-NoContext.gl45.robustness.lose_context_on_reset

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15061>

2 years agozink: update psiz handling to fix xfb output
Mike Blumenkrantz [Thu, 3 Feb 2022 15:22:34 +0000 (10:22 -0500)]
zink: update psiz handling to fix xfb output

now when gl_PointSize and gl_PointSizeMESA are both present, the former
will be used for xfb with a new location and the latter will be
exported by the shader

fixes (zink):
GTF-GL46.gtf30.GL3Tests.transform_feedback.transform_feedback_builtins

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15184>

2 years agonir/lower_psiz_mov: stop clobbering existing exports
Mike Blumenkrantz [Thu, 3 Feb 2022 15:21:19 +0000 (10:21 -0500)]
nir/lower_psiz_mov: stop clobbering existing exports

for this pass to work with xfb, the original value in the shader must be
preserved when xfb is active, and the driver must export only the newly
created output

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15184>

2 years agonir/lower_psiz: create the store instruction more accurately
Mike Blumenkrantz [Tue, 1 Feb 2022 21:53:20 +0000 (16:53 -0500)]
nir/lower_psiz: create the store instruction more accurately

creating this at the start of the shader means it will get optimized out
when the pass is used to overwrite existing psiz values, and creating it
at the end means it will get optimized out in geometry shaders, so instead
just walk the instructions and create another store right after the existing one

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15184>

2 years agoutil: use correct type in sysctl argument
Jonathan Gray [Mon, 31 Aug 2020 03:00:53 +0000 (13:00 +1000)]
util: use correct type in sysctl argument

Fixes build on OpenBSD/macppc powerpc

error: incompatible pointer types passing 'int *' to parameter of type 'size_t *'
    (aka 'unsigned long *') [-Werror,-Wincompatible-pointer-types]

Fixes: 01bd21eef8f ("gallium: Import Dennis Smit cpu detection code.")
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6511>

2 years agoutil: fix build with clang 10 on mips64
Jonathan Gray [Tue, 4 Aug 2020 08:48:34 +0000 (18:48 +1000)]
util: fix build with clang 10 on mips64

On mips64, the compiler does not allow use of non-zero argument with
__builtin_frame_address(). However, the returned frame address is only
used when PIPE_ARCH_X86 is defined. The compile error can be avoided
by making #ifdef PIPE_ARCH_X86 cover the getting of frame address too.

The argument checking of __builtin_frame_address() has been present
as a debug assert in clang 8. In clang 10, there is a proper runtime
check for the argument. This is why the build has not failed before.

Fixes: dc94a0506f1 ("gallium: Do not add -Wframe-address option for gcc <= 4.4.")
from Visa Hankala

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6511>

2 years agoutil/u_atomic: fix build on clang archs without 64-bit atomics
Jonathan Gray [Mon, 15 Jun 2020 04:40:06 +0000 (14:40 +1000)]
util/u_atomic: fix build on clang archs without 64-bit atomics

Make this build on clang architectures that don't have 64-bit atomic
instructions.  Clang doesn't allow redeclaration (and therefore
redefinition) of the __sync_* builtins.  Use #pragma redefine_extname
to work around that restriction.  Clang also turns __sync_add_and_fetch
into __sync_fetch_and_add (and __sync_sub_and_fetch into
__sync_fetch_and_sub) in certain cases, so provide these functions as
well.

Fixes: a6a38a038bd ("util/u_atomic: provide 64bit atomics where they're missing")
patch from Mark Kettenis

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6511>

2 years agoRevert "CI: Disable Panfrost T720 jobs"
Daniel Stone [Mon, 28 Feb 2022 14:07:23 +0000 (14:07 +0000)]
Revert "CI: Disable Panfrost T720 jobs"

This reverts commit 35209b94a6c7d88fb67b6446fda8f8daf556c911.

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

2 years agoRevert "CI: Disable panfrost-t760"
Daniel Stone [Mon, 28 Feb 2022 14:07:21 +0000 (14:07 +0000)]
Revert "CI: Disable panfrost-t760"

This reverts commit b9b444e0b8bc318cea2a93ec04b0a383c444180e.

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

2 years agopanfrost: fix segfault in pandecode
Adrián Larumbe [Mon, 28 Feb 2022 05:47:04 +0000 (05:47 +0000)]
panfrost: fix segfault in pandecode

The structure wrapped around the rb tree node was being freed, but not the node
itself, which caused a segmentation fault when accessing its parent node.

Add rb tree node remove call to fix it.

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

2 years agoCI: Disable Panfrost T720 jobs
Daniel Stone [Mon, 28 Feb 2022 07:06:20 +0000 (07:06 +0000)]
CI: Disable Panfrost T720 jobs

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15189>

2 years agoCI: Disable panfrost-t760
Daniel Stone [Sun, 27 Feb 2022 20:26:17 +0000 (20:26 +0000)]
CI: Disable panfrost-t760

The DUTs are extremely tempremental for some reason.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15186>

2 years agodocs: update irc channel
Erik Faye-Lund [Wed, 17 Nov 2021 14:47:18 +0000 (15:47 +0100)]
docs: update irc channel

According to the virglrenderer README.rst[1] file, #virgil3d has moved
from FreeNode to OFTC. Let's update our link as well.

While we're at it, use a proper link as well.

[1]: https://gitlab.freedesktop.org/virgl/virglrenderer/-/blob/master/README.rst

Acked-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13836>

2 years agodocs: mark virgl gles2 renderer as done
Erik Faye-Lund [Wed, 17 Nov 2021 12:10:33 +0000 (13:10 +0100)]
docs: mark virgl gles2 renderer as done

Acked-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13836>

2 years agodocs: update virgl description
Erik Faye-Lund [Wed, 17 Nov 2021 11:54:07 +0000 (12:54 +0100)]
docs: update virgl description

Since this text was written, VirGL has become a shipping, production
quality solution. It's no longer a research project. Let's update the
text to reflect that.

While we're at it, let's drop the project from the page title, as this
is no longer the docs for the entire project.

Acked-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13836>

2 years agodocs: link to gitlab instead of cgit
Erik Faye-Lund [Wed, 17 Nov 2021 12:11:38 +0000 (13:11 +0100)]
docs: link to gitlab instead of cgit

While we're at it, let's update the releasing article as well.

Acked-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13836>

2 years agodocs: master -> main
Erik Faye-Lund [Wed, 17 Nov 2021 12:08:12 +0000 (13:08 +0100)]
docs: master -> main

Acked-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13836>

2 years agodocs: Virgl -> VirGL
Erik Faye-Lund [Wed, 17 Nov 2021 12:01:21 +0000 (13:01 +0100)]
docs: Virgl -> VirGL

The name used for this project is usually stylized as VirGL instead of
"Virgil" or "Virgil 3D" these days. Let's be consistent.

Acked-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13836>

2 years agodocs: qemu -> QEMU
Erik Faye-Lund [Wed, 17 Nov 2021 11:48:45 +0000 (12:48 +0100)]
docs: qemu -> QEMU

This is the official syling of the name, let's use that instead of
lower-case for consistensy.

Acked-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13836>