platform/upstream/mesa.git
14 months agoaco: combine scalar mul+pk_add to pk_fma
Georg Lehmann [Thu, 9 Mar 2023 13:51:50 +0000 (14:51 +0100)]
aco: combine scalar mul+pk_add to pk_fma

Foz-DB Navi21:
Totals from 12 (0.01% of 134913) affected shaders:
CodeSize: 37860 -> 37668 (-0.51%)
Instrs: 6757 -> 6733 (-0.36%)
Latency: 25632 -> 25589 (-0.17%)
InvThroughput: 2637 -> 2622 (-0.57%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21819>

14 months agoaco: use uses helpers for pk_fma opt
Georg Lehmann [Thu, 9 Mar 2023 13:17:53 +0000 (14:17 +0100)]
aco: use uses helpers for pk_fma opt

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21819>

14 months agoradv: use wave32 for small workgroups
Rhys Perry [Fri, 9 Jun 2023 14:41:05 +0000 (15:41 +0100)]
radv: use wave32 for small workgroups

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

14 months agoradv: refactor CS subgroup size determination
Rhys Perry [Fri, 9 Jun 2023 14:39:28 +0000 (15:39 +0100)]
radv: refactor CS subgroup size determination

This is less convoluted.

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

14 months agoradeonsi/vcn: update luma and chroma size
SureshGuttula [Mon, 5 Jun 2023 19:51:05 +0000 (01:21 +0530)]
radeonsi/vcn: update luma and chroma size

This patch will adjust aligned_height to enc_alignment  which
is helping to address some corner cases like 4096x64/64x<>.

Actually less dpb size causing PROTECTION_FAULT. This change is
fixing the issue.

Signed-off-by: SureshGuttula <suresh.guttula@amd.com>
Reviewed-by: Boyuan Zhang Boyuan.Zhang@amd.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23448>

14 months agoradv: advertise VK_EXT_depth_bias_control
Samuel Pitoiset [Tue, 16 May 2023 13:11:49 +0000 (15:11 +0200)]
radv: advertise VK_EXT_depth_bias_control

Pass new CTS on RDNA2.

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

14 months agoradv: implement VK_EXT_depth_bias_control
Samuel Pitoiset [Tue, 16 May 2023 13:11:26 +0000 (15:11 +0200)]
radv: implement VK_EXT_depth_bias_control

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

14 months agovulkan/runtime: call CmdSetDepthBias2EXT() from CmdSetDepthBias()
Samuel Pitoiset [Tue, 20 Jun 2023 07:43:38 +0000 (09:43 +0200)]
vulkan/runtime: call CmdSetDepthBias2EXT() from CmdSetDepthBias()

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23696>

14 months agor600/sfn: Implement source mod optimization in backend
Gert Wollny [Fri, 16 Jun 2023 15:52:36 +0000 (17:52 +0200)]
r600/sfn: Implement source mod optimization in backend

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23702>

14 months agor600/sfn: add source and dest mod info to opcode table
Gert Wollny [Fri, 16 Jun 2023 15:51:39 +0000 (17:51 +0200)]
r600/sfn: add source and dest mod info to opcode table

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23702>

14 months agor600/sfn: allow source mods for per source with multi-slot ops
Gert Wollny [Fri, 16 Jun 2023 15:50:55 +0000 (17:50 +0200)]
r600/sfn: allow source mods for per source with multi-slot ops

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23702>

14 months agor600/sfn: drop use of nir source mods
Gert Wollny [Fri, 16 Jun 2023 15:46:07 +0000 (17:46 +0200)]
r600/sfn: drop use of nir source mods

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23702>

14 months agor600/sfn: Fix typo
Gert Wollny [Fri, 16 Jun 2023 15:53:19 +0000 (17:53 +0200)]
r600/sfn: Fix typo

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23702>

14 months agovirgl: don't allow vertex input arrays on GLES hosts
Gert Wollny [Thu, 24 Mar 2022 11:39:40 +0000 (12:39 +0100)]
virgl: don't allow vertex input arrays on GLES hosts

v2: - use new HOST_IS_GLES flag (Corentin)
    - drop stray fprintf (Emma)
    - reorder cases to avoid code replication

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15550>

14 months agozink, drirc: Add Borderlands 2 workaround to fix spir-v 1.6 translated discard
Illia Polishchuk [Fri, 16 Jun 2023 12:53:36 +0000 (15:53 +0300)]
zink, drirc: Add Borderlands 2 workaround to fix spir-v 1.6 translated discard

The game expects HLSL discard behavour

But it fails only on Zink because GLSL discard translates to
nir_intrinsic_discard (BRW_PREDICATE_ALIGN1_ANY4H in native Intel asm)
but Zink replaces it with OpTerminateInvocation SPIR-V and it translates to
nir_intrinsic_terminate (BRW_PREDICATE_NORMAL in native Intel asm)

Bisected commit in ZINK: bd816084

On AMD it works because they enabled the
glsl_correct_derivatives_after_discard by default: !10522 (17861aff)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9205
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Illia Polishchuk <illia.a.polishchuk@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23694>

14 months agoetnaviv: remove not used tgsi includes
Christian Gmeiner [Tue, 20 Jun 2023 06:53:15 +0000 (08:53 +0200)]
etnaviv: remove not used tgsi includes

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23738>

14 months agoetnaviv: drop usage of tgsi_swizzle_names
Christian Gmeiner [Tue, 20 Jun 2023 06:48:47 +0000 (08:48 +0200)]
etnaviv: drop usage of tgsi_swizzle_names

Gets rid of extern usage.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23738>

14 months agoetnaviv: remove tgsi remains
Christian Gmeiner [Tue, 20 Jun 2023 06:45:39 +0000 (08:45 +0200)]
etnaviv: remove tgsi remains

tokens member was not used for a long time.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23738>

14 months agov3d: clear alpha-only as red-only
Juan A. Suarez Romero [Tue, 6 Jun 2023 15:03:29 +0000 (17:03 +0200)]
v3d: clear alpha-only as red-only

When clearing an alpha-only format, set the alpha channel into red
channel.

Fixes `spec@ext_texture_integer@multisample-fast-clear
gl_ext_texture_integer`.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23497>

14 months agogallium/util: fix color clamp for alpha-only formats
Juan A. Suarez Romero [Tue, 6 Jun 2023 14:59:59 +0000 (16:59 +0200)]
gallium/util: fix color clamp for alpha-only formats

Alpha format only contains one channel, but it is placed in the 4th
position, not 1st.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23497>

14 months agoisl: handle DRM_FORMAT_MOD_INVALID in isl_drm_modifier_has_aux
Tapani Pälli [Mon, 19 Jun 2023 08:20:38 +0000 (11:20 +0300)]
isl: handle DRM_FORMAT_MOD_INVALID in isl_drm_modifier_has_aux

This fixes crashes with piglit.spec.ext_external_objects.* tests on TGL
that started to trigger with commit 8bc7bcfa0c19.

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

14 months agogallium: Remove unused os_process.h in gallium/auxiliary
Yonggang Luo [Wed, 1 Feb 2023 07:15:45 +0000 (15:15 +0800)]
gallium: Remove unused os_process.h in gallium/auxiliary

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23503>

14 months agodd: Replace the usage of os_get_process_name with util_get_process_name in dd_draw.c
Yonggang Luo [Tue, 31 Jan 2023 08:37:07 +0000 (16:37 +0800)]
dd: Replace the usage of os_get_process_name with util_get_process_name in dd_draw.c

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23503>

14 months agozink: Replace the usage of os_get_process_name with util_get_process_name
Yonggang Luo [Wed, 1 Feb 2023 07:01:55 +0000 (15:01 +0800)]
zink: Replace the usage of os_get_process_name with util_get_process_name

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23503>

14 months agomesa: Fix use after free.
Mykola Piatykop [Wed, 1 Mar 2023 14:48:45 +0000 (16:48 +0200)]
mesa: Fix use after free.

Reset the pointer to the earlier free st_context.
Check the st_context pointer before st_glFlush.

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

Signed-off-by: Mykola Piatykop <mykola.piatykop@globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21656>

14 months agocompiler/clc: Move related NIR passes to the common mesa clc
Caio Oliveira [Thu, 15 Jun 2023 05:35:23 +0000 (22:35 -0700)]
compiler/clc: Move related NIR passes to the common mesa clc

These were historically in the spirv+nir combo, but the common mesa clc
is a better home for them.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Nora Allen <blackcatgames@protonmail.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23667>

14 months agocompiler/clc: Rename the internal library from libclc to libmesaclc
Caio Oliveira [Thu, 15 Jun 2023 06:42:24 +0000 (23:42 -0700)]
compiler/clc: Rename the internal library from libclc to libmesaclc

There is an actual external libclc and we do use it, so rename the
internal common library to avoid confusion.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Nora Allen <blackcatgames@protonmail.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23667>

14 months agointel/compiler: Move brw_kernel.c to the intel_clc target
Caio Oliveira [Thu, 15 Jun 2023 18:31:39 +0000 (11:31 -0700)]
intel/compiler: Move brw_kernel.c to the intel_clc target

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23667>

14 months agoanv: add VK_EXT_depth_bias_control support
Lionel Landwerlin [Tue, 6 Jun 2023 05:07:10 +0000 (08:07 +0300)]
anv: add VK_EXT_depth_bias_control support

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23716>

14 months agovulkan/runtime: add support for EXT_depth_bias_control
Lionel Landwerlin [Tue, 6 Jun 2023 04:55:05 +0000 (07:55 +0300)]
vulkan/runtime: add support for EXT_depth_bias_control

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23716>

14 months agovulkan: registry/headers bump to 1.3.254
Lionel Landwerlin [Tue, 6 Jun 2023 04:29:55 +0000 (07:29 +0300)]
vulkan: registry/headers bump to 1.3.254

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23716>

14 months agoanv: switch copy query results with shaders from semaphore waits to flushes
Lionel Landwerlin [Thu, 15 Jun 2023 12:14:04 +0000 (15:14 +0300)]
anv: switch copy query results with shaders from semaphore waits to flushes

Since we expect the number of copies to be > 6, emitting fewer
commands makes more sense.

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

14 months agoanv: tracking query buffer writes & query clears separately
Lionel Landwerlin [Thu, 15 Jun 2023 10:44:44 +0000 (13:44 +0300)]
anv: tracking query buffer writes & query clears separately

Clears should be flushed only on :
  - vkCmdBeginQuery*
  - vkCmdWriteTimestamp*
  - vkCmdWriteAccelerationStructuresPropertiesKHR
  - vkCmdCopyQueryPoolResults

Buffer writes should be flush only on :
  - vkCmdCopyQueryPoolResults

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

14 months agoanv: fix pending query bits for compute only command buffers
Lionel Landwerlin [Thu, 15 Jun 2023 10:41:58 +0000 (13:41 +0300)]
anv: fix pending query bits for compute only command buffers

If we do the clear operations on a compute only command buffer, the
operations will not use render target writes but compute shader writes
instead.

Probably not an issue right now because this is not a feature we've
enabled.

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

14 months agoanv: change the way we clear pending query bits
Lionel Landwerlin [Thu, 15 Jun 2023 10:33:28 +0000 (13:33 +0300)]
anv: change the way we clear pending query bits

Instead of having genX(emit_apply_pipe_flushes) doing the clearing,
ask genX(emit_apply_pipe_flushes) for the emitted bits and do the
clearing using a helper.

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

14 months agoanv: track buffer writes from shaders for query results writes
Lionel Landwerlin [Thu, 15 Jun 2023 11:04:14 +0000 (14:04 +0300)]
anv: track buffer writes from shaders for query results writes

In the following sequence :
   - write buffer B with a shader
   - barrier on buffer from shader-write to transfer
   - vkCmdCopyQueryPoolResults to buffer B

The barrier should take care of ordering things between the shader
writes and vkCmdCopyQueryPoolResults.

The problem is that vkCmdCopyQueryPoolResults runs on the command
streamer and that is not coherent or synchronized in the same way as
shaders.

This change marks the barrier has potentially containing pending
buffer writes for queries so that we can insert the necessary flush
for vkCmdCopyQueryPoolResults later.

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

14 months agoanv: add missing query clear flush for acceleration structure queries
Lionel Landwerlin [Thu, 15 Jun 2023 10:46:50 +0000 (13:46 +0300)]
anv: add missing query clear flush for acceleration structure queries

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: a787728906 ("anv: enable blorp query reset for performance queries")
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23675>

14 months agocompiler/types: fix size of padded OpenCL Structs
Karol Herbst [Sat, 17 Jun 2023 06:50:12 +0000 (08:50 +0200)]
compiler/types: fix size of padded OpenCL Structs

In C the size of a struct { uin32_t a; uint8_t b; } is 8, not 5, so we have
to account for the biggest alignment across all struct members.

Funny that the OpenCL CTS doesn't catch that.

Fixes: 44d32e62fb8 ("glsl: add cl_size and cl_alignment")
Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23701>

14 months agoc11: Implement os_time_get_nano with timespec_get(&ts, TIME_MONOTONIC)
Yonggang Luo [Mon, 13 Feb 2023 18:49:56 +0000 (02:49 +0800)]
c11: Implement os_time_get_nano with timespec_get(&ts, TIME_MONOTONIC)

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23733>

14 months agoc11: Improve mtx_timedlock to use timespec_get instead of time(NULL)
Yonggang Luo [Mon, 13 Feb 2023 03:07:59 +0000 (11:07 +0800)]
c11: Improve mtx_timedlock to use timespec_get instead of time(NULL)

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23733>

14 months agoc11: Improve timespec_get to support TIME_MONOTONIC TIME_ACTIVE TIME_THREAD_ACTIVE...
Yonggang Luo [Sat, 11 Feb 2023 16:15:19 +0000 (00:15 +0800)]
c11: Improve timespec_get to support TIME_MONOTONIC TIME_ACTIVE TIME_THREAD_ACTIVE TIME_MONOTONIC_RAW

As c11 already provided timespec_get, to avoid symbol conflict, use c23_timespec_get as the function name
and define timespec_get c23_timespec_get to achieve that

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23733>

14 months agowsi: Fixes passing argument 1 of ‘mtx_unlock’ from incompatible pointer type
Yonggang Luo [Sat, 11 Feb 2023 07:35:19 +0000 (15:35 +0800)]
wsi: Fixes passing argument 1 of ‘mtx_unlock’ from incompatible pointer type

../../src/vulkan/wsi/wsi_common_display.c:2908:15: error: passing argument 1 of ‘mtx_unlock’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 2908 |    mtx_unlock(&wsi->wait_mutex);
      |               ^~~~~~~~~~~~~~~~
      |               |
      |               pthread_mutex_t *

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23733>

14 months agofreedreno: Fixes error: passing argument 1 of ‘pthread_mutex_unlock’ from incompatibl...
Yonggang Luo [Mon, 13 Feb 2023 08:43:39 +0000 (16:43 +0800)]
freedreno: Fixes error: passing argument 1 of ‘pthread_mutex_unlock’ from incompatible pointer type in tu_pipeline.c

src/freedreno/vulkan/tu_pipeline.c:4723:25: error: passing argument 1 of ‘pthread_mutex_unlock’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 4723 |    pthread_mutex_unlock(&dev->pipeline_mutex);
      |                         ^~~~~~~~~~~~~~~~~~~~
      |                         |
      |                         mtx_t *
In file included from ../../src/freedreno/vulkan/tu_common.h:14,
                 from ../../src/freedreno/vulkan/tu_pipeline.h:13,
                 from ../../src/freedreno/vulkan/tu_pipeline.c:10:
/usr/include/pthread.h:835:51: note: expected ‘pthread_mutex_t *’ but argument is of type ‘mtx_t *’
  835 | extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23733>

14 months agonir/print: Use mesa_scope_name() function to print scopes
Caio Oliveira [Tue, 30 May 2023 19:41:23 +0000 (12:41 -0700)]
nir/print: Use mesa_scope_name() function to print scopes

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23328>

14 months agocompiler: Add mesa_scope_name() function
Caio Oliveira [Wed, 7 Jun 2023 17:48:39 +0000 (10:48 -0700)]
compiler: Add mesa_scope_name() function

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23328>

14 months agocompiler: Move from nir_scope to mesa_scope
Caio Oliveira [Tue, 30 May 2023 19:05:30 +0000 (12:05 -0700)]
compiler: Move from nir_scope to mesa_scope

Just moving the enum and performing renames, no behavior change.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23328>

14 months agorusticl/program: pass our max param size along to the spirv validator
Karol Herbst [Fri, 16 Jun 2023 17:58:28 +0000 (19:58 +0200)]
rusticl/program: pass our max param size along to the spirv validator

Fixes "api min_max_parameter_size" in spir-v mode

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23700>

14 months agoclc: allow passing custom validator options
Karol Herbst [Fri, 16 Jun 2023 17:54:04 +0000 (19:54 +0200)]
clc: allow passing custom validator options

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23700>

14 months agoclc: fix SPIRVMessageConsumer for NULL src
Karol Herbst [Fri, 16 Jun 2023 17:44:43 +0000 (19:44 +0200)]
clc: fix SPIRVMessageConsumer for NULL src

This happens if we pass our own validator options. It's nothing we can
control, SPIRV-Tools just passes NULL instead of "input".

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23700>

14 months agor600/sfn: Clean up FS member initialization
Gert Wollny [Mon, 19 Jun 2023 06:55:10 +0000 (08:55 +0200)]
r600/sfn: Clean up FS member initialization

All members that are initialized with predefined values should
be initialized with the declaration.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23717>

14 months agor600/sfn: on R600/R700 write a dummy pixel output if there is a gap
Gert Wollny [Mon, 19 Jun 2023 06:53:49 +0000 (08:53 +0200)]
r600/sfn: on R600/R700 write a dummy pixel output if there is a gap

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

Fixes: 98d65120cb66cf8ca9f9928b107d93af24c83776
  r600/sfn: Fix FS out handling

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

14 months agoanv: avoid private buffer allocations in vkGetDeviceImageMemoryRequirementsKHR
Lionel Landwerlin [Mon, 19 Jun 2023 10:03:37 +0000 (13:03 +0300)]
anv: avoid private buffer allocations in vkGetDeviceImageMemoryRequirementsKHR

The whole point of vkGetDeviceImageMemoryRequirementsKHR is to avoid
creating an image so we should completely avoid any allocation like
the private binding.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 4075dd16ab ("anv: implement vkGetDeviceImageMemoryRequirementsKHR")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23720>

14 months agorusticl/format: enable all trivial to support optional image formats
Karol Herbst [Sun, 18 Jun 2023 14:53:08 +0000 (16:53 +0200)]
rusticl/format: enable all trivial to support optional image formats

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Nora Allen <blackcatgames@protonmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23714>

14 months agorusticl/format: move format table generation into a macro
Karol Herbst [Sun, 18 Jun 2023 16:14:24 +0000 (18:14 +0200)]
rusticl/format: move format table generation into a macro

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Nora Allen <blackcatgames@protonmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23714>

14 months agorusticl/format: document cl to pipe format mapping
Karol Herbst [Sun, 18 Jun 2023 17:40:28 +0000 (19:40 +0200)]
rusticl/format: document cl to pipe format mapping

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Nora Allen <blackcatgames@protonmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23714>

14 months agorusticl/format: add required format table for CL2.0
Karol Herbst [Sun, 18 Jun 2023 13:01:19 +0000 (15:01 +0200)]
rusticl/format: add required format table for CL2.0

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Nora Allen <blackcatgames@protonmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23714>

14 months agorusticl/format: drop req_for_3d_image_write_ext
Karol Herbst [Sun, 18 Jun 2023 12:41:11 +0000 (14:41 +0200)]
rusticl/format: drop req_for_3d_image_write_ext

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Nora Allen <blackcatgames@protonmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23714>

14 months agorusticl/format: extract required format checks into const functions
Karol Herbst [Sun, 18 Jun 2023 12:20:25 +0000 (14:20 +0200)]
rusticl/format: extract required format checks into const functions

Also dropping the 3D image write special case, because there is nothing in
the spec treating it differently.

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Nora Allen <blackcatgames@protonmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23714>

14 months agorusticl/format: extract CL format to pipe format mapping into const function
Karol Herbst [Sun, 18 Jun 2023 11:54:52 +0000 (13:54 +0200)]
rusticl/format: extract CL format to pipe format mapping into const function

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Nora Allen <blackcatgames@protonmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23714>

14 months agorusticl/format: pass order and type to rusticl_image_format directly
Karol Herbst [Sun, 18 Jun 2023 11:37:22 +0000 (13:37 +0200)]
rusticl/format: pass order and type to rusticl_image_format directly

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Nora Allen <blackcatgames@protonmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23714>

14 months agorusticl/mem: fix validation of packed image formats
Karol Herbst [Sun, 18 Jun 2023 16:30:57 +0000 (18:30 +0200)]
rusticl/mem: fix validation of packed image formats

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Nora Allen <blackcatgames@protonmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23714>

14 months agorusticl/mem: cache the pipe_format
Karol Herbst [Sun, 18 Jun 2023 15:21:27 +0000 (17:21 +0200)]
rusticl/mem: cache the pipe_format

This moves the expensive to_pipe_format call to image creation time.

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Nora Allen <blackcatgames@protonmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23714>

14 months agodocs/cl: improve reporting of image features
Karol Herbst [Mon, 19 Jun 2023 09:12:12 +0000 (11:12 +0200)]
docs/cl: improve reporting of image features

Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Nora Allen <blackcatgames@protonmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23714>

14 months agoRevert "ci: remove clang-format testing"
Eric Engestrom [Mon, 19 Jun 2023 10:16:01 +0000 (11:16 +0100)]
Revert "ci: remove clang-format testing"

This reverts commit d666a8d259a0bb0a14e5bf42e90f167e150f185b.

Let's move past that tantrum and hope we can have an adult conversation
if one person wants to go against all the other developers.

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

14 months agoradv: fix formatting
Eric Engestrom [Mon, 19 Jun 2023 10:19:33 +0000 (11:19 +0100)]
radv: fix formatting

Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23719>

14 months agodocs: remove i965 features from docs/features.txt
Illia Abernikhin [Thu, 8 Sep 2022 08:35:01 +0000 (11:35 +0300)]
docs: remove i965 features from docs/features.txt

Upgrade docs/features.txt

Signed-off-by: Illia Abernikhin <illia.abernikhin@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4990
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17251>

14 months agodocs: add crocus features to docs/features.txt
Illia Abernikhin [Thu, 8 Sep 2022 08:28:07 +0000 (11:28 +0300)]
docs: add crocus features to docs/features.txt

Upgrade docs/features.txt with crocus extensions

Signed-off-by: Illia Abernikhin <illia.abernikhin@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17251>

14 months agodocs: add iris features to docs/features.txt
Illia Abernikhin [Tue, 6 Sep 2022 20:15:57 +0000 (23:15 +0300)]
docs: add iris features to docs/features.txt

Upgrade docs/features.txt with iris extensions

Signed-off-by: Illia Abernikhin <illia.abernikhin@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17251>

14 months agov3dv: expose shaderImageGatherExtended
Iago Toral Quiroga [Tue, 13 Jun 2023 08:40:07 +0000 (10:40 +0200)]
v3dv: expose shaderImageGatherExtended

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23616>

14 months agobroadcom/compiler: handle textureGatherOffsets
Iago Toral Quiroga [Tue, 13 Jun 2023 08:34:33 +0000 (10:34 +0200)]
broadcom/compiler: handle textureGatherOffsets

There is a lowering in NIR for this so we just need to enable it.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23616>

14 months agonir/lower_tex: handle lower_tg4_offsets with lower_tg4_broadcom_swizzle
Iago Toral Quiroga [Thu, 15 Jun 2023 08:19:17 +0000 (10:19 +0200)]
nir/lower_tex: handle lower_tg4_offsets with lower_tg4_broadcom_swizzle

This pass uses a safe iterator so it can't lower new instructions that are
injected as part of the lowering, which is exactly what lower_tg4_offsets
does, and if lower_tg4_broadcom_swizzle is also set then we need to lower
these new instructions. Handle this by running the pass twice when both
are set: the first pass will only handle lower_tg4_offsets and
the second pass (which will see the new tg4 instructions produced with
lower_tg4_offsets) will process the remaining options, including
lower_tg4_broadcom_swizzle.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23616>

14 months agonir/lower_tex: copy missing fields when creating copy of tex instruction
Iago Toral Quiroga [Tue, 13 Jun 2023 08:27:57 +0000 (10:27 +0200)]
nir/lower_tex: copy missing fields when creating copy of tex instruction

This is missing both texture and sampler indices.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23616>

14 months agoradv: use cs_execute_ib() for GFX, MBCP and DGC IBs
Samuel Pitoiset [Thu, 15 Jun 2023 08:58:41 +0000 (10:58 +0200)]
radv: use cs_execute_ib() for GFX, MBCP and DGC IBs

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

14 months agoradv/amdgpu: add cs_execute_ib() for executing IBs
Samuel Pitoiset [Thu, 15 Jun 2023 08:58:33 +0000 (10:58 +0200)]
radv/amdgpu: add cs_execute_ib() for executing IBs

This will be used to implement support for DGC with RADV_DEBUG=noibs,
DGC for secondaries and for future work.

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

14 months agoradv/amdgpu: remove useless assert in radv_amdgpu_winsys_cs_submit_internal()
Samuel Pitoiset [Thu, 15 Jun 2023 08:03:44 +0000 (10:03 +0200)]
radv/amdgpu: remove useless assert in radv_amdgpu_winsys_cs_submit_internal()

The zero CS submission path is used instead, and this assertion isn't
really useful.

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

14 months agoradv/amdgpu: fix a buffer overflow for submissions with RADV_DEBUG=noibs
Samuel Pitoiset [Thu, 15 Jun 2023 08:00:57 +0000 (10:00 +0200)]
radv/amdgpu: fix a buffer overflow for submissions with RADV_DEBUG=noibs

With RADV_DEBUG=noibs (aka no chaining) the number of IBs to submit
depends on the number of old IB buffers of every CS.

This fixes a stack smashing error.

Fixes: 53b439d24fa ("radv/amdgpu: Use STACK_ARRAY for IB array to reduce stack usage."
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23669>

14 months agoradv: reserve space for shadowed regs
Samuel Pitoiset [Thu, 15 Jun 2023 09:34:09 +0000 (11:34 +0200)]
radv: reserve space for shadowed regs

Tested on RDNA2, hopefully the space reservation is large enough for
other chips as well.

Fixes: 7893040f807f ("radv: Add stricter space checks.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23672>

14 months agoradv: use IB for the GFX preamble on GFX6
Samuel Pitoiset [Thu, 15 Jun 2023 08:47:32 +0000 (10:47 +0200)]
radv: use IB for the GFX preamble on GFX6

GFX6 supports IBs without any issues.

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

14 months agoradv: do not use IB for the GFX preamble with RADV_DEBUG=noibs
Samuel Pitoiset [Thu, 15 Jun 2023 08:46:16 +0000 (10:46 +0200)]
radv: do not use IB for the GFX preamble with RADV_DEBUG=noibs

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

14 months agoci/docs: fixup incorrect spacing around console block
David Heidelberg [Sun, 18 Jun 2023 18:09:25 +0000 (20:09 +0200)]
ci/docs: fixup incorrect spacing around console block

Fixes: dcf5dfbbf8d3 ("ci: implement farms handling trough files inside .ci-farms")

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

14 months agor600/sfn: Don't deref unused group slots
Gert Wollny [Sun, 18 Jun 2023 07:58:32 +0000 (09:58 +0200)]
r600/sfn: Don't deref unused group slots

Fixes: e57643cf5 (r600/sfn: Add handling for R600 indirect access alias handling)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9219

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23711>

14 months agor600: Split tex CF only if written component is read
Gert Wollny [Sun, 18 Jun 2023 07:11:30 +0000 (09:11 +0200)]
r600: Split tex CF only if written component is read

There is no need to split the CF if only the register ID
in a previous write is the same, we should look at the actual
slots instead, ut we have also to take writes of 0 and 1 into
account.

Cc: mesa-stable
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23710>

14 months agointel/ci: disable iris-jsl-deqp because it always fails for an AMD MR
Marek Olšák [Sat, 17 Jun 2023 21:04:35 +0000 (17:04 -0400)]
intel/ci: disable iris-jsl-deqp because it always fails for an AMD MR

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

14 months agoci: remove clang-format testing
Marek Olšák [Sat, 17 Jun 2023 18:55:00 +0000 (14:55 -0400)]
ci: remove clang-format testing

The way it's used is unacceptable. Here's the change it suggested:

    diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
    index 05b9cb0a3f1..e58abfa885f 100644
    --- a/src/amd/vulkan/radv_device.c
    +++ b/src/amd/vulkan/radv_device.c
    @@ -783,8 +783,7 @@ radv_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCr
        device->overallocation_disallowed = overallocation_disallowed;
        mtx_init(&device->overallocation_mutex, mtx_plain);

    -   if (physical_device->rad_info.register_shadowing_required ||
    -       device->instance->debug_flags & RADV_DEBUG_SHADOW_REGS)
    +   if (physical_device->rad_info.register_shadowing_required || device->instance->debug_flags & RADV_DEBUG_SHADOW_REGS)
           device->uses_shadow_regs = true;

        /* Create one context per queue priority. */

This is the dumbest reason to prevent merging a MR. I don't want to see this
in projects I work on.

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

14 months agoradeonsi: remove gfx10 NGG streamout
Marek Olšák [Wed, 7 Jun 2023 19:48:46 +0000 (15:48 -0400)]
radeonsi: remove gfx10 NGG streamout

Unused and unstable. Keep it only for gfx11.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23687>

14 months agoradeonsi: handle GE_CNTL and IA_MULTI_VGT_PARAM as a tracked register
Marek Olšák [Tue, 6 Jun 2023 17:20:14 +0000 (13:20 -0400)]
radeonsi: handle GE_CNTL and IA_MULTI_VGT_PARAM as a tracked register

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23687>

14 months agoradeonsi: handle VGT_LS_HS_CONFIG like a tracker register
Marek Olšák [Tue, 6 Jun 2023 16:55:26 +0000 (12:55 -0400)]
radeonsi: handle VGT_LS_HS_CONFIG like a tracker register

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23687>

14 months agoradeonsi: handle VGT_GS_OUT_PRIM_TYPE like a tracked register
Marek Olšák [Tue, 6 Jun 2023 16:40:20 +0000 (12:40 -0400)]
radeonsi: handle VGT_GS_OUT_PRIM_TYPE like a tracked register

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23687>

14 months agoradeonsi: eliminate redundant compute SH register changes
Marek Olšák [Mon, 5 Jun 2023 18:59:25 +0000 (14:59 -0400)]
radeonsi: eliminate redundant compute SH register changes

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23687>

14 months agoradeonsi: handle demoted si_pm4_set_reg_idx3 as si_pm4_set_reg
Marek Olšák [Sat, 3 Jun 2023 11:15:41 +0000 (07:15 -0400)]
radeonsi: handle demoted si_pm4_set_reg_idx3 as si_pm4_set_reg

to allow merging packets; otherwise no change in behavior

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23687>

14 months agoradeonsi: set non-graphics uconfig registers first in the preamble
Marek Olšák [Sat, 3 Jun 2023 09:42:06 +0000 (05:42 -0400)]
radeonsi: set non-graphics uconfig registers first in the preamble

we want to keep all SH registers next to each other, so that we can use
only one SET_SH_REG_PAIRS_PACKED packet

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23687>

14 months agoradeonsi: remove sscreen parameter from si_pm4_set_reg_idx3
Marek Olšák [Fri, 2 Jun 2023 18:50:02 +0000 (14:50 -0400)]
radeonsi: remove sscreen parameter from si_pm4_set_reg_idx3

si_pm4_state now contains the screen.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23687>

14 months agoradeonsi: add more variables into si_pm4_state and rework how it's created
Marek Olšák [Fri, 2 Jun 2023 18:48:12 +0000 (14:48 -0400)]
radeonsi: add more variables into si_pm4_state and rework how it's created

to be used later

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23687>

14 months agoradeonsi: don't needlessly invalidate L0/L1 caches at the beginning of IBs
Marek Olšák [Wed, 7 Jun 2023 16:22:09 +0000 (12:22 -0400)]
radeonsi: don't needlessly invalidate L0/L1 caches at the beginning of IBs

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23687>

14 months agoradeonsi: don't do PFP_SYNC_ME before CP DMA and compute blits
Marek Olšák [Mon, 5 Jun 2023 19:01:29 +0000 (15:01 -0400)]
radeonsi: don't do PFP_SYNC_ME before CP DMA and compute blits

It's not needed before them, and we already set it after them.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23687>

14 months agoradeonsi: shrink the last field of tcs_offchip_layout due to LDS limit
Marek Olšák [Thu, 8 Jun 2023 03:27:18 +0000 (23:27 -0400)]
radeonsi: shrink the last field of tcs_offchip_layout due to LDS limit

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23687>

14 months agoradeonsi: change si_emit_derived_tess_state into a state atom
Marek Olšák [Tue, 23 Aug 2022 23:23:09 +0000 (19:23 -0400)]
radeonsi: change si_emit_derived_tess_state into a state atom

This splits the state into an update function and an emit function
setting the registers, and only 2 functions update it: set_patch_vertices
and si_update_shaders.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23687>

14 months agoradeonsi: fix RB+ and gfx11 issues with framebuffer state
Marek Olšák [Tue, 6 Jun 2023 18:23:02 +0000 (14:23 -0400)]
radeonsi: fix RB+ and gfx11 issues with framebuffer state

This fixes most gfx11 test failures.

Fixes: 9fecac091f31 - radeonsi/gfx11: scattered register deltas

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23687>

14 months agoradeonsi/ci: add glx@glx-visuals-stencil to skips because it gets stuck often
Marek Olšák [Mon, 5 Jun 2023 14:41:54 +0000 (10:41 -0400)]
radeonsi/ci: add glx@glx-visuals-stencil to skips because it gets stuck often

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23687>

14 months agoradeonsi: set register_shadowing_enabled if AMD_DEBUG=shadowregs is set
Marek Olšák [Sat, 10 Jun 2023 20:37:42 +0000 (16:37 -0400)]
radeonsi: set register_shadowing_enabled if AMD_DEBUG=shadowregs is set

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23687>