Samuel Pitoiset [Mon, 27 Mar 2023 07:43:35 +0000 (09:43 +0200)]
radv: stop using last_vgt_api_stage_{locs} during cmdbuf recording
Use the last VGT shader instead.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22128>
Samuel Pitoiset [Mon, 27 Mar 2023 12:39:42 +0000 (14:39 +0200)]
radv: determine the last VGT shader at pipeline bind time
And replace streamout_shader by last_vgt_shader which is similar.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22128>
Samuel Pitoiset [Mon, 27 Mar 2023 07:33:14 +0000 (09:33 +0200)]
radv: keep track of active stages as part of the cmdbuf state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22128>
Samuel Pitoiset [Mon, 27 Mar 2023 07:23:44 +0000 (09:23 +0200)]
radv: add an assertion about shader stage to radv_bind_pre_rast_shader()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22128>
Samuel Pitoiset [Fri, 24 Mar 2023 15:12:16 +0000 (16:12 +0100)]
radv: add radv_bind_shader() helper
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22128>
Samuel Pitoiset [Mon, 27 Mar 2023 12:18:57 +0000 (14:18 +0200)]
radv: pass a shaders array to radv_get_shader()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22128>
Samuel Pitoiset [Wed, 22 Mar 2023 11:55:01 +0000 (12:55 +0100)]
radv: pass shader/base_reg to radv_emit_view_index_per_stage
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22128>
Eric Engestrom [Mon, 27 Mar 2023 17:43:10 +0000 (18:43 +0100)]
kmsro: sort drivers alphabetically
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22144>
Eric Engestrom [Mon, 27 Mar 2023 16:33:51 +0000 (17:33 +0100)]
kmsro: uniformize renderonly creation
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22144>
Eric Engestrom [Mon, 27 Mar 2023 16:23:42 +0000 (17:23 +0100)]
vc4: change create_renderonly signature to uniformize it
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22144>
Eric Engestrom [Mon, 27 Mar 2023 16:22:51 +0000 (17:22 +0100)]
v3d: change create_renderonly signature to uniformize it
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22144>
Eric Engestrom [Mon, 27 Mar 2023 16:21:40 +0000 (17:21 +0100)]
panfrost: change create_renderonly signature to uniformize it
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22144>
Eric Engestrom [Mon, 27 Mar 2023 16:20:11 +0000 (17:20 +0100)]
lima: change create_renderonly signature to uniformize it
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22144>
Eric Engestrom [Mon, 27 Mar 2023 16:18:48 +0000 (17:18 +0100)]
freedreno: change create_renderonly signature to uniformize it
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22144>
Eric Engestrom [Mon, 27 Mar 2023 16:15:23 +0000 (17:15 +0100)]
etnaviv: change create_renderonly signature to uniformize it
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22144>
Eric Engestrom [Mon, 27 Mar 2023 16:13:10 +0000 (17:13 +0100)]
asahi: change create_renderonly signature to uniformize it
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22144>
Mike Blumenkrantz [Tue, 28 Mar 2023 20:50:24 +0000 (16:50 -0400)]
zink: stop leaking separate shader nir
this is a huge memleak
Fixes:
e3b746e3a31 ("zink: use GPL to handle (simple) separate shader objects")
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22175>
Emma Anholt [Mon, 27 Mar 2023 16:43:30 +0000 (09:43 -0700)]
ci/zink: Update the tgl manual run xfails.
These have been consistent for 3 runs.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22146>
Emma Anholt [Mon, 27 Mar 2023 16:39:15 +0000 (09:39 -0700)]
ci/etnaviv: Polish the gc2000 xfails a bit.
These were consistent in the last 3 CI runs. The rest of the failures in
those runs were flakes spread all around the general shader tests, which
are correlated with GPU hangs.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22146>
Emma Anholt [Mon, 27 Mar 2023 16:34:14 +0000 (09:34 -0700)]
ci/crocus: Fix 1.3.5.0 xfails.
Whoops, copy and pasted the wrong lines from another board, this GPU is
GL4.6 not 4.5.
Fixes:
ecca3b9655db ("ci/crocus: Update expectations from VK CTS 1.3.5.0.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22146>
Sai Teja Pottumuttu [Tue, 28 Mar 2023 10:13:05 +0000 (10:13 +0000)]
anv: Fix stride mismatch in mesa and minigbm
It is observed that in display resolutions where width is not equal to
stride, vulkan rendering is being distorted. This is happening due to
stride calculation mismatch between minigbm and mesa.
This fix makes sure that the stride calculated in minigbm is passed to
anv and isl.
The issue was found while debugging the following android cts tests and
thus fixes them as well.
android.graphics.cts.VulkanPreTransformTest#testVulkanPreTransformNotSetToMatchCurrentTransform
android.graphics.cts.VulkanPreTransformTest#testVulkanPreTransformSetToMatchCurrentTransform
Signed-off-by: Sai Teja Pottumuttu <sai.teja.pottumuttu@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22163>
Tapani Pälli [Tue, 28 Mar 2023 16:07:22 +0000 (19:07 +0300)]
anv: use primitive ID override when shader does not supply it
Patch moves over this fix from iris driver.
Fixes following test on DG2:
dEQP-VK.rasterization.culling.primitive_id
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com> [v1]
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22130>
Samuel Pitoiset [Thu, 23 Mar 2023 16:26:35 +0000 (17:26 +0100)]
radv: stop using the pipeline for emitting shaders
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22095>
Samuel Pitoiset [Fri, 24 Mar 2023 07:15:05 +0000 (08:15 +0100)]
radv: pass the ES shader to radv_pipeline_emit_hw_ngg()
This allows to remove the radv_pipeline dependency.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22095>
Samuel Pitoiset [Fri, 24 Mar 2023 07:23:24 +0000 (08:23 +0100)]
radv: use the ES type to apply a workaround for NGG on GFX10
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22095>
Samuel Pitoiset [Fri, 24 Mar 2023 07:05:56 +0000 (08:05 +0100)]
radv: use the shader info stage to simplify emitting NGG shaders
Instead of relying on the pipeline.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22095>
Samuel Pitoiset [Thu, 23 Mar 2023 17:16:50 +0000 (18:16 +0100)]
radv: stop using the pipeline for emitting PS inputs
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22095>
Samuel Pitoiset [Thu, 23 Mar 2023 17:15:59 +0000 (18:15 +0100)]
radv: add radv_get_last_vgt_shader() helper
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22095>
Samuel Pitoiset [Thu, 23 Mar 2023 16:22:45 +0000 (17:22 +0100)]
radv: emit the GS copy shader outside of radv_pipeline_emit_hw_gs()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22095>
Samuel Pitoiset [Tue, 21 Mar 2023 13:01:30 +0000 (14:01 +0100)]
radv: stop using get_vs_output_info() when emitting VS/NGG shaders
It's always the current shader outinfo struct.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22095>
Luigi Santivetti [Thu, 9 Mar 2023 15:54:35 +0000 (15:54 +0000)]
pvr: fix segfault in dEQP-VK.ycbcr.query.*
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22061>
Georg Lehmann [Fri, 24 Mar 2023 11:43:35 +0000 (12:43 +0100)]
aco: clean up to_mad_mix
These instructions are 32bit, so they don't support opsel anyway.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22103>
Samuel Pitoiset [Mon, 27 Mar 2023 07:52:29 +0000 (09:52 +0200)]
radv/ci: update CI lists for Polaris10 and Pitcairn
Recent ac/surface changes fixed those.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22127>
Mike Blumenkrantz [Tue, 21 Mar 2023 14:54:16 +0000 (10:54 -0400)]
zink: use c++ template to deduplicate image barrier functions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22057>
Mike Blumenkrantz [Tue, 21 Mar 2023 14:43:37 +0000 (10:43 -0400)]
zink: minor tweaks for image barriers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22057>
Mike Blumenkrantz [Tue, 21 Mar 2023 14:38:51 +0000 (10:38 -0400)]
zink: use c++ template to deduplicate all the buffer barrier code
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22057>
Mike Blumenkrantz [Tue, 21 Mar 2023 14:18:22 +0000 (10:18 -0400)]
zink: move all barrier-related functions to c++
this will enable a lot of deduplication
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22057>
Mike Blumenkrantz [Mon, 27 Mar 2023 13:19:38 +0000 (09:19 -0400)]
zink: break out a src region barrier check for reuse
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22057>
Mike Blumenkrantz [Tue, 21 Mar 2023 14:17:21 +0000 (10:17 -0400)]
zink: fix some type mismatches for c++ compilation
no functional changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22057>
Alyssa Rosenzweig [Fri, 24 Mar 2023 22:22:28 +0000 (18:22 -0400)]
asahi: Don't lie about seamless cube maps
Now that mesa/st is setting seamless_cube_map properly we don't need to play any
games here. Remove the hack workaround.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21978>
Alyssa Rosenzweig [Sat, 11 Mar 2023 23:58:34 +0000 (18:58 -0500)]
mesa/st: Normalize wrap modes for seamless cubes
The OpenGL specification requires that seamless cube maps ignore the wrap mode,
but some hardware may try to respect the wrap mode even for seamless cubes
contrary to the spec. Since OpenGL maps samplers 1:1 to textures (at least
without bindless texture support...), it's easy to override the wrap mode for
seamless cubes to something that works for the hardware.
I'm not sure if there is value in gating this behaviour behind a CAP. On one
hand, there is a tiny bit of extra CPU overhead added to change samplers. On the
other hand, normalizing wrap modes might improve CSO caching, and normalizing to
a non-BORDER mode avoids the expensive border colour code later in the function.
We will need a different workaround in our Vulkan driver. Potentially, we'll
have to duplicate *every* sampler to have a cubemap version and a non-cubemap
version, selecting a sampler in the shader based on the texture opcode. That
sucks and implementing it would depend on subtle details of how we implement
descriptor sets, so it's not like we would share that code with the GL driver
anyway. In the mean time, let's get this right for GL without the performance
hit of duplication.
Fixes dEQP-GLES3.functional.texture.filtering.cube.* on Asahi, as well as a
smattering of dEQP-GLES31.functional.texture.filtering.cube_array.* fails on
softpipe.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21978>
Alyssa Rosenzweig [Fri, 24 Mar 2023 22:18:26 +0000 (18:18 -0400)]
mesa/st: Only set seamless for GLES3
6148e3aae7e ("mesa: Fix ctx->Texture.CubeMapSeamless") introduced a hack, where
seamless cube maps would be requested even for GLES2 contexts despite the spec,
on the assumption that GLES2 gallium drivers would ignore the bit. But that
requires Gallium drivers to know what GLES version they advertise, which is a
horrible layering violation. When the commit was written 8 years ago, there were
classic drivers to contend with so it made sense as a fix to get GLES 3.0 up and
running. With classic drivers gone, it's time to sunset the hack and restore the
intended behaviour by setting ctx->Texture.CubeMapSeamless only once we know the
version.
In addition to fixing a semantic issue in the Gallium contract and preventing a
regression from the next commit, this fixes cube maps on Mali-T720 under
Panfrost. In general, Panfrost supports GLES3 (and honours the seamless flag
everywhere) but on T720 we only advertise GLES2 due to missing MRT support on
older Midgard devices, so we need the flag set properly to distinguish these
cases.
Cc: mesa-stable
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21978>
Paul Gofman [Mon, 27 Mar 2023 20:36:12 +0000 (14:36 -0600)]
driconf: add a workaround for Kaiju-A-Gogo
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22152>
Qiang Yu [Sun, 26 Feb 2023 08:40:12 +0000 (16:40 +0800)]
radeonsi: monolithic PS emit epilog in nir directly
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21552>
Qiang Yu [Sat, 25 Feb 2023 13:14:52 +0000 (21:14 +0800)]
ac/nir: add ac_nir_lower_ps
Lower ps output to nir_export_amd.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21552>
Qiang Yu [Sat, 25 Feb 2023 13:13:50 +0000 (21:13 +0800)]
nir: add nir_fisnan helper function
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21552>
Qiang Yu [Fri, 24 Feb 2023 06:39:17 +0000 (14:39 +0800)]
nir,radeonsi: add and implement nir_load_alpha_reference_amd
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21552>
Qiang Yu [Fri, 24 Feb 2023 06:22:08 +0000 (14:22 +0800)]
aco: implement float16 nir_op_pack_(s|u)norm_2x16
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21552>
Qiang Yu [Fri, 24 Feb 2023 06:17:07 +0000 (14:17 +0800)]
ac/llvm: implement float16 nir_op_pack_(s|u)norm_2x16
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21552>
Qiang Yu [Fri, 24 Feb 2023 05:57:33 +0000 (13:57 +0800)]
nir: pack_(s|u)norm_2x16 support float16 as input
For AMD GPU which has instruction to normalize and pack two float16
inputs, and used when fragment shader export color output.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21552>
José Roberto de Souza [Fri, 24 Feb 2023 18:58:36 +0000 (10:58 -0800)]
intel: Allocate mesh shader URB space before task shader
A future platform requires that mesh shader URB space be allocated
before task shader URB space.
If task shader is enabled, it will align the mesh shader URB size to
8Kb and give the remaning back to task shader. Otherwise, no aligment
is needed, and mesh shader will have all the URB space.
BSpec: 56229, 56230
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21603>
Konstantin Seurer [Tue, 21 Feb 2023 10:45:09 +0000 (11:45 +0100)]
radv/rt: Refactor rq_load lowering
This just gets rid of all the bcsel emissions.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21455>
Mike Blumenkrantz [Wed, 22 Mar 2023 16:58:57 +0000 (12:58 -0400)]
aux/trace: fix GALLIUM_TRACE_NIR handling
this now correctly doesn't dump nir when the counter is zero
Fixes:
f99eab23ad6 ("aux/trace: delete GALLIUM_TRACE_NIR log message")
Reviewed-by: Matti Hämäläinen <ccr@tnsp.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22164>
Mike Blumenkrantz [Wed, 22 Mar 2023 16:58:50 +0000 (12:58 -0400)]
aux/trace: dump blend states with enums
this is more readable
Reviewed-by: Matti Hämäläinen <ccr@tnsp.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22164>
Pierre-Eric Pelloux-Prayer [Fri, 24 Mar 2023 09:18:17 +0000 (10:18 +0100)]
radv: add RADV_DEBUG=extra_md
This enables the use of UMD metadata v2. This allows tools (eg umr)
import buffers.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21984>
Pierre-Eric Pelloux-Prayer [Wed, 22 Mar 2023 14:24:28 +0000 (15:24 +0100)]
radeonsi: don't use si_decompress_dcc if the blitter is running
Otherwise this will cause a blitter recursion which will crash at
some point.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21984>
Pierre-Eric Pelloux-Prayer [Tue, 21 Mar 2023 09:46:53 +0000 (10:46 +0100)]
radeonsi: add AMD_DEBUG=extra_md
When this debug flag is set, the driver sets the umd metadata for
all color textures and enables the use of extended metadata.
Extended metadata allows umr to import textures and setting these
on all color texture allows to import non-exported textures
(eg: dGPU draw surface when DRI_PRIME=1 is used).
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21984>
Pierre-Eric Pelloux-Prayer [Tue, 21 Mar 2023 09:46:39 +0000 (10:46 +0100)]
ac/surface: introduce umd metadata v2
Update the metadata format. For gfx8- chips nothing change.
For gfx9 chips:
* for textures without a valid modifier a dw is added at index=10
containing the stride
* for textures with a valid modifier the modifier is stored at
index 10 and 11. Then the number of planes is stored at 12.
Then for each plane the offset and the stride are stored.
The goal here is to be able to create textures from dmabuf from
umr - without these changes this is impossible because these
values can't be guessed.
The new layout is compatible with version=1 so old/new UMD can
be used together without issues and isn't used by default.
For radeonsi, it will be possible to use it with a AMD_DEBUG=...
option.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21984>
Pierre-Eric Pelloux-Prayer [Tue, 21 Mar 2023 09:54:16 +0000 (10:54 +0100)]
amd/surface: rename metadata functions
Use more specific verbs to avoid confusion:
set -> apply
get -> compute
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21984>
Pierre-Eric Pelloux-Prayer [Fri, 17 Mar 2023 12:57:00 +0000 (13:57 +0100)]
mesa: fix CopyImageSubDataOES with GL_TEXTURE_EXTERNAL_OES
GL_TEXTURE_EXTERNAL_OES is allowed on GLES (any version) and glCopyImageSubDataOES
is implemented as an alias of CopyImageSubData.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21984>
Marcin Ślusarz [Tue, 7 Mar 2023 09:41:10 +0000 (10:41 +0100)]
anv: call nir_shader_gather_info early
Shader info is needed for mesh in linking (in nir_lower_io_to_scalar_early,
see commit
5e144454) and will be needed once MR !17622 (anv: work around
for per-prim attributes corruption) lands.
We still need to call nir_shader_gather_info in anv_pipeline_lower_nir,
because the information got stale between anv_graphics_pipeline_load_nir
and anv_pipeline_lower_nir. Some examples:
- some FS inputs were marked as per-primitive during linking
(brw_nir_link_shaders) affecting per_primitive_inputs mask
- some inputs and outputs were removed, because they are not used
(nir_remove_unused_varyings) affecting outputs_written and inputs_read
This fixes func.mesh.ext.outputs.per_primitive.unused crucible test on DG2.
(I didn't know this test wasn't fixed by
5e144454, because I was testing
with !17622 merged-in, which added its own nir_shader_gather_info before
nir_lower_io_to_scalar_early).
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21787>
Daniel Stone [Tue, 28 Mar 2023 10:10:10 +0000 (11:10 +0100)]
CI: Disable freedreno
The proxy has been broken ever since the network went down.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22161>
Georg Lehmann [Mon, 27 Mar 2023 21:35:57 +0000 (23:35 +0200)]
aco/util: override default assignment operator for bitfield helpers
Otherwise, the default assignment operator copies the whole uint,
not just few bits we are interested in.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes:
e7559da7570 ("aco: add bitfield array helper classes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22154>
Georg Lehmann [Mon, 27 Mar 2023 21:32:54 +0000 (23:32 +0200)]
aco/ir: fix copy paste bug in convert_to_SDWA
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes:
60cd3ba39f1 ("aco: copy abs/neg with assignment")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22154>
Friedrich Vock [Mon, 27 Mar 2023 16:10:20 +0000 (18:10 +0200)]
aco: Swap operands for v_and_b32 in RT prolog
The second operand must be a VGPR, only the first can be a literal.
With a literal, this code was wrongly assembled and resulted in artifacts on GFX11.
Fixes:
6446b791681 ("aco: implement select_rt_prolog()")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8642
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22142>
Timur Kristóf [Sun, 26 Mar 2023 21:49:23 +0000 (23:49 +0200)]
radv: Fix swizzled VS input loads when some components are unused.
Fix how out-of-bounds loads are decided.
It was incorrect because it mismatched the swizzle.
The decision is now made using the loaded num_components.
Fixes:
27c81319780d4a9693ef609b6a891981d1417b70
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8712
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22124>
Samuel Pitoiset [Fri, 24 Mar 2023 16:45:47 +0000 (17:45 +0100)]
radv/rt: bind the pipeline stack when it's not dynamic
This overwrites the rt_stack_size cmdbuf state when a new rt pipeline
with a static stack size is bound.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22126>
Alyssa Rosenzweig [Wed, 15 Mar 2023 21:36:17 +0000 (17:36 -0400)]
asahi: Convert to SPDX headers
Also drop my email address in the copyright lines and fix some "Copyright 208
Alyssa Rosenzweig" lines, I'm not *that* old. Together this drops a lot of
boilerplate without losing any meaningful licensing information. SPDX is already
in use for the MIT-licensed code in turnip, venus, and a few other scattered
parts of the tree, so this should be ok from a Mesa licensing standpoint.
This reduces friction to create new files, by parsing the copy/paste boilerplate
and being short enough you can easily type it out if you want. It makes new
files seem less daunting: 20 lines of header for 30 lines of code is
discouraging, but 2 lines of header for 30 lines of code is reasonable for a
simple compiler pass. This has technical effects, as lowering the barrier to
making new files should encourage people to split code into more modular files
with (hopefully positive) effects on project compile time.
This helps with consistency between files. Across the tree we have at least a
half dozen variants of the MIT license text (probably more), plus code that uses
SPDX headers instead. I've already been using SPDX headers in Asahi manually, so
you can tell old vs new code based on the headers.
Finally, it means less for reviewers to scroll through adding files. Minimal
actual cognitive burden for reviewers thanks to banner blindness, but the big
headers still bloat diffs that add/delete files.
I originally proposed this in December (for much more of the tree) but someone
requested I wait until January to discuss. I've been trying to get in touch with
them since then. It is now almost April and, with still no response, I'd like to
press forward with this. So with a joint sign-off from the major authors of the
code in question, let's do this.
Signed-off-by: Asahi Lina <lina@asahilina.net>
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Emma Anholt <emma@anholt.net>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Rose Hudson <rose@krx.sh>
Acked-by: Lyude Paul [over IRC: "yes I'm fine with that"]
Meh'd-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22062>
Lina Versace [Mon, 27 Mar 2023 21:33:37 +0000 (14:33 -0700)]
mailmap: Add Lina's new google.com address
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22153>
Harri Nieminen [Mon, 27 Mar 2023 19:15:54 +0000 (22:15 +0300)]
docs/svga3d: Fix typo
Found by codespell
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22149>
Harri Nieminen [Mon, 27 Mar 2023 19:14:55 +0000 (22:14 +0300)]
docs/panfrost: Fix typo
Found by codespell
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22149>
Harri Nieminen [Mon, 27 Mar 2023 19:13:50 +0000 (22:13 +0300)]
docs/freedreno: Fix typos
Found by codespell
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22149>
Harri Nieminen [Mon, 27 Mar 2023 19:13:06 +0000 (22:13 +0300)]
docs/gallium: Fix typos
Found by codespell
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22149>
Harri Nieminen [Mon, 27 Mar 2023 19:09:52 +0000 (22:09 +0300)]
docs/specs: Fix typos
Found by codespell
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22149>
Filip Gawin [Mon, 27 Mar 2023 11:44:46 +0000 (13:44 +0200)]
crocus: don't quantize the clear value
Helps with:
spec@!opengl 1.0@depth-clear-precision-check@depth32f_stencil8,UnexpectedPass
spec@!opengl 3.0@clearbuffer-bug,UnexpectedPass
Cc: mesa-stable
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22137>
Marek Olšák [Sat, 25 Mar 2023 00:46:39 +0000 (20:46 -0400)]
amd/llvm: remove no-op code for vec3 loads in ac_build_tbuffer_load
Formatted loads always support vec3, so this code didn't do anything.
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22117>
Marek Olšák [Fri, 24 Mar 2023 23:46:56 +0000 (19:46 -0400)]
amd/llvm: fix handling of unsupported vec3 loads on gfx6
VMEM loads promoted from vec3 to vec4 didn't trim the vector, thus
returning vec4 on gfx6 and vec3 on later generations, which callers
don't expect.
SMEM loads were adding an extra component on gfx6, causing same issues.
Fixes:
82919e2d - amd: lower subdword UBO loads in NIR
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8693
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22117>
Georg Lehmann [Sun, 26 Mar 2023 18:27:14 +0000 (20:27 +0200)]
aco: make .clang-format usable with tests
Code between BEGIN_TEST and END_TEST should be indented,
and comments used by the test itself should not be reformatted.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22122>
Iago Toral Quiroga [Mon, 27 Mar 2023 09:42:23 +0000 (11:42 +0200)]
v3dv: fix format swizzle for buffer views
Fixes:
dEQP-VK.api.buffer_view.access.uniform_texel_buffer.b8g8r8a8_unorm
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22131>
Iago Toral Quiroga [Mon, 27 Mar 2023 09:11:24 +0000 (11:11 +0200)]
v3dv: pause occlusion queries during vkCmdClearAttachments
We implement this by emitting a draw call, which should not be registered
during occlusion query counting.
Fixes:
dEQP-VK.query_pool.occlusion_query*clear*
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22131>
Samuel Pitoiset [Fri, 24 Mar 2023 10:03:42 +0000 (11:03 +0100)]
radv: move {esgs,gsvs}_ring_size to radv_legacy_gs_info
To update the ring info when a geometry shader is bound.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22134>
Samuel Pitoiset [Mon, 27 Mar 2023 11:44:45 +0000 (13:44 +0200)]
radv: rename gfx9_gs_info to radv_legacy_gs_info
This was misleading because it's also needed on GFX6-8.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22134>
Jarred Davies [Thu, 23 Feb 2023 05:16:48 +0000 (05:16 +0000)]
pvr: Add robustness buffer support
The robustness buffer is used when no vertex attribute can be loaded and
robustBufferAccess is enabled.
Signed-off-by: Jarred Davies <jarred.davies@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21579>
Jarred Davies [Thu, 23 Feb 2023 05:16:41 +0000 (05:16 +0000)]
pvr: Rename pvr_xgl_pds.c to pvr_pipeline_pds.c
Signed-off-by: Jarred Davies <jarred.davies@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21579>
Jarred Davies [Thu, 23 Feb 2023 05:16:16 +0000 (05:16 +0000)]
pvr: Always mark robustBufferAccess as supported
As per the Vulkan spec, this is a required feature for graphics implementations.
Signed-off-by: Jarred Davies <jarred.davies@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21579>
Ilya K [Mon, 27 Mar 2023 11:41:35 +0000 (11:41 +0000)]
intel/vk/grl: don't install libgrl.a
It isn't used by anything at runtime and shouldn't be installed.
Saves about 3MB of space on the final artifacts on x86_64-linux.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8711
Fixes:
63966505 ("anv/grl: Build OpenCL kernels")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22133>
Samuel Pitoiset [Fri, 24 Mar 2023 11:35:36 +0000 (12:35 +0100)]
radv: stop checking dynamic states when emitting the guardband state
If the primitive topology is part of the PSO, it's copied at pipeline
bind time to the dynamic state, so this checks is unnecessary.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22105>
Samuel Pitoiset [Mon, 27 Mar 2023 10:28:11 +0000 (12:28 +0200)]
radv: add DI_PT_RECTLIST to si_conv_prim_to_gs_out()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22105>
Georg Lehmann [Fri, 24 Mar 2023 12:45:16 +0000 (13:45 +0100)]
aco: fix p_interp_gfx11 comment
It no longer uses a tmp exec and scc.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22107>
Georg Lehmann [Fri, 24 Mar 2023 12:41:11 +0000 (13:41 +0100)]
aco: don't check usesModifiers for pseudo instructions
This can't happen.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22106>
Lucas Stach [Fri, 17 Mar 2023 16:25:11 +0000 (17:25 +0100)]
etnaviv: fix texture barrier implementation
The current implementation has a number of issues:
- it doesn't flush the depth cache, even though this can also be changed
due to fragment shader operations and thus is included in the definition
of glTextureBarrier
- it doesn't flush the vertex sampler cache
- it doesn't stall the pipeline until the flushes are done
Fix those issues and drop the comment, as it's pretty clear from the
code what is being done.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22104>
Lucas Stach [Tue, 7 Mar 2023 20:02:44 +0000 (21:02 +0100)]
etnaviv: flush VS texture cache when texture data is changed
If a sampler resource is changed the vertex texture caches also need to
be flushed, as those are separate from the fragment texture caches.
It seems that some cores need the VS sampler cache flush to be in a
separate state. I have seen no adverse effects of merging the TEXTUREVS
flush into a single flush state emission on GC3000 and up, but the blob
always emits the vertex sampler cache flush as a separate state, so do
the same here to avoid nasty surprises.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22104>
Erik Faye-Lund [Thu, 16 Mar 2023 08:01:40 +0000 (09:01 +0100)]
docs/freedreno: fix turnip-heading level
Having two top-level headings in an article confuses Sphinx, and makes
both appear as separate articles in the toc-tree.
It doesn't seem like there's a good reason why the following headings
should be nested under the "Turnip"-heading anyway, so let's just make
it a sibling to the "Hardware architecture" heading.
Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21948>
Samuel Pitoiset [Fri, 24 Mar 2023 13:26:20 +0000 (14:26 +0100)]
radv: separate the sample shading state between FS and graphics pipeline
Sample shading can be enabled inside the fragment shader and also
per-pipeline. Separate both cases to be able to enable sample shading
by only binding a FS.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22110>
Samuel Pitoiset [Wed, 22 Mar 2023 15:19:04 +0000 (16:19 +0100)]
radv: move uses_user_sample_locations to radv_multisample_state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22110>
Samuel Pitoiset [Fri, 24 Mar 2023 13:15:26 +0000 (14:15 +0100)]
radv: copy the multisample state to radv_cmd_state
To avoid relying on the pipeline.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22110>
Tatsuyuki Ishi [Thu, 23 Mar 2023 13:40:48 +0000 (22:40 +0900)]
amd: Add radv_foreach_stage to ForEachMacros.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22092>
Marcin Ślusarz [Fri, 24 Mar 2023 16:54:15 +0000 (17:54 +0100)]
anv,hasvk: remove stale comments
Added in
060a6434eca9fb05ca2dfd612f8abd4786ee4549.
The field it described was removed in
c1f4343807d1040bd7b5440aa2f5fccf5f12842d.
Fixes:
c1f4343807d ("anv: Set up memory types and heaps during physical device init")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22113>
Samuel Pitoiset [Tue, 21 Mar 2023 07:32:14 +0000 (08:32 +0100)]
radv: move radv_meta_* to a new folder
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22046>
David Heidelberg [Mon, 27 Mar 2023 00:08:46 +0000 (02:08 +0200)]
ci/broadcom: test occasionally fails, but typically passes
Flake still present.
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22125>