platform/upstream/mesa.git
15 months agoradv: ensure to retain NIR shaders for GPL libs found in the cache
Samuel Pitoiset [Mon, 3 Apr 2023 08:12:25 +0000 (10:12 +0200)]
radv: ensure to retain NIR shaders for GPL libs found in the cache

Even if we are able to get the assembly from the shaders cache for
graphics pipeline libraries, we still need to retain NIR shaders in
case the LTO pipelines won't be find in the cache.

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

15 months agoradv: add VkGraphicsPipelineLibraryFlag to the graphics pipeline key
Samuel Pitoiset [Fri, 31 Mar 2023 14:30:09 +0000 (16:30 +0200)]
radv: add VkGraphicsPipelineLibraryFlag to the graphics pipeline key

This is to generate a different key for a library created with
FRAGMENT_SHADER_BIT and no FS (ie. it would generate a noop FS) and
a library created with FRAGMENT_OUTPUT_INTERFACE with no CB attachments.

Otherwise, the same key would be generated and this would corrupt
the cache.

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

15 months agoradv: remove dead code in radv_pipeline_get_nir()
Samuel Pitoiset [Mon, 3 Apr 2023 08:46:03 +0000 (10:46 +0200)]
radv: remove dead code in radv_pipeline_get_nir()

We either import the NIR or the assembly, so this was never reached.

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

15 months agoradv: allow to create/insert PS epilogs from/to the cache for libs
Samuel Pitoiset [Mon, 3 Apr 2023 08:11:21 +0000 (10:11 +0200)]
radv: allow to create/insert PS epilogs from/to the cache for libs

To cache PS epilogs compiled inside graphics pipeline libraries.

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

15 months agoradv: rely on non-NULL binaries when inserting shaders to the cache
Samuel Pitoiset [Fri, 6 Jan 2023 08:27:30 +0000 (09:27 +0100)]
radv: rely on non-NULL binaries when inserting shaders to the cache

With GPL, a stage can be imported from a library which means that the
binary is NULL (it's freed right after compilation) but the shader is
non-NULL. To avoid crashing, rely on non-NULL binaries because this
implies that the shader is non-NULL as well.

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

15 months agoradv: only copy non-NULL shaders when loaded from the cache
Samuel Pitoiset [Thu, 5 Jan 2023 16:58:45 +0000 (17:58 +0100)]
radv: only copy non-NULL shaders when loaded from the cache

With GPL, we don't necessarily load all stages from the same cache
entry and other stages might have been imported from libraries, so
don't overwrite them.

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

15 months agonir, spirv: Add support for VK_EXT_fragment_density_map
Connor Abbott [Fri, 25 Nov 2022 11:41:46 +0000 (12:41 +0100)]
nir, spirv: Add support for VK_EXT_fragment_density_map

This involves two new system values.

Reviewed-by: Faith Ekstrand <faith@gfxstrand.net>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20303>

15 months agoci/zink: Drop validation exception for leaks at device destroy.
Emma Anholt [Tue, 7 Feb 2023 18:09:17 +0000 (10:09 -0800)]
ci/zink: Drop validation exception for leaks at device destroy.

Between the recent glthread and zink fixes, we should be good to go.

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

15 months agoradeonsi: update test results
Pierre-Eric Pelloux-Prayer [Fri, 31 Mar 2023 15:34:58 +0000 (17:34 +0200)]
radeonsi: update test results

This test was fixed by bf910c94e06 ("glsl: fix gl_CullDistance lowering
from float[8] to vec4[2]").

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22237>

15 months agoutil/vbuf: fix index_bo leak
Pierre-Eric Pelloux-Prayer [Fri, 31 Mar 2023 15:01:53 +0000 (17:01 +0200)]
util/vbuf: fix index_bo leak

When indices are unrolled we still have to release the index_bo
references passed to us.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8272
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22237>

15 months agoutil/vbuf: clarify indirect draws handling
Pierre-Eric Pelloux-Prayer [Fri, 31 Mar 2023 14:59:32 +0000 (16:59 +0200)]
util/vbuf: clarify indirect draws handling

It wasn't obvious from the u_vbuf code alone that num_draws
is guaranteed to be 1 in the indirect case.

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

15 months agomesa: fix invalid index_bo refcounting
Pierre-Eric Pelloux-Prayer [Fri, 31 Mar 2023 14:57:08 +0000 (16:57 +0200)]
mesa: fix invalid index_bo refcounting

If take_index_buffer_ownership is true, then we should reserve
enough references of index_bo or we'll get an underflow later.

Fixes: 819627041e7 ("mesa: set pipe_draw_info::index::resource directly and remove gl_bo")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8747
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22237>

15 months agozink: be explicit about separate shader dsl indexing during creation
Mike Blumenkrantz [Mon, 3 Apr 2023 16:45:11 +0000 (12:45 -0400)]
zink: be explicit about separate shader dsl indexing during creation

this fixes a minor issue where a fs without a vs dsl would have the wrong
index

Fixes: e3b746e3a31 ("zink: use GPL to handle (simple) separate shader objects")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22269>

15 months agoanv: check for MESA_SHADER_TESS_CTRL with get_tcs_prog_data
Tapani Pälli [Tue, 4 Apr 2023 07:15:29 +0000 (10:15 +0300)]
anv: check for MESA_SHADER_TESS_CTRL with get_tcs_prog_data

Fixes: 86d931724db ("anv: Implement Wa_14015297576")
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/22282>

15 months agoanv: take primitive ID override to account Wa_14015297576
Tapani Pälli [Tue, 4 Apr 2023 05:40:34 +0000 (08:40 +0300)]
anv: take primitive ID override to account Wa_14015297576

Commit ca4ec49b0e0 took primitive ID override fields in to use, this
has to be checked as part of Wa_14015297576.

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

15 months agozink: always store nir serialized
Mike Blumenkrantz [Wed, 29 Mar 2023 11:47:43 +0000 (07:47 -0400)]
zink: always store nir serialized

this saves a ton of memory and has minimal, if any cpu impact

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

15 months agozink: store num_inlinable_uniforms separately for cs programs
Mike Blumenkrantz [Wed, 29 Mar 2023 12:40:14 +0000 (08:40 -0400)]
zink: store num_inlinable_uniforms separately for cs programs

compute is a special case because the zink_shader itself is created
in a thread, which means it cannot be accessed directly at bind time
since it may not have finished creating itself yet

to avoid prematurely waiting on an async fence, the one value needed
at bind time can instead be stored separately

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

15 months agozink: move nir cloning out to callers of zink_shader_compile
Mike Blumenkrantz [Wed, 29 Mar 2023 12:10:51 +0000 (08:10 -0400)]
zink: move nir cloning out to callers of zink_shader_compile

this will make more sense with future changes

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

15 months agozink: break out nir blob deserializing
Mike Blumenkrantz [Wed, 29 Mar 2023 12:08:00 +0000 (08:08 -0400)]
zink: break out nir blob deserializing

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

15 months agozink: simplify assign_io() further
Mike Blumenkrantz [Wed, 29 Mar 2023 11:46:10 +0000 (07:46 -0400)]
zink: simplify assign_io() further

no functional changes

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

15 months agozink: store nir as serialized on zink_shader structs
Mike Blumenkrantz [Tue, 28 Mar 2023 22:52:31 +0000 (18:52 -0400)]
zink: store nir as serialized on zink_shader structs

nir_shader objects are hefty, and they really add up when there's a lot
of them. there's also not much use in keeping them around, as any time
they'll be used, they're always cloned first, and deserializing isn't
likely to be any slower than a clone

cuts driver memory usage by ~40% for tomb raider

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

15 months agozink: streamline nir cloning for assign_io
Mike Blumenkrantz [Tue, 28 Mar 2023 22:51:42 +0000 (18:51 -0400)]
zink: streamline nir cloning for assign_io

more relics from the time of pipe_shader_type

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

15 months agozink: directly return nir from zink_shader_tcs_create
Mike Blumenkrantz [Wed, 29 Mar 2023 12:18:04 +0000 (08:18 -0400)]
zink: directly return nir from zink_shader_tcs_create

not currently used but will be

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

15 months agozink: swap nir pointers when compiling compute shaders
Mike Blumenkrantz [Tue, 28 Mar 2023 22:47:08 +0000 (18:47 -0400)]
zink: swap nir pointers when compiling compute shaders

these are the same pointer, just use a different one

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

15 months agozink: pass nir directly to zink_shader_tcs_create()
Mike Blumenkrantz [Tue, 28 Mar 2023 22:46:02 +0000 (18:46 -0400)]
zink: pass nir directly to zink_shader_tcs_create()

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

15 months agozink: simplify fbfetch output detection from fs
Mike Blumenkrantz [Tue, 28 Mar 2023 22:43:18 +0000 (18:43 -0400)]
zink: simplify fbfetch output detection from fs

this should be identical to the previous code, except it also
handles depth/stencil (not yet supported)

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

15 months agozink: use zink_shader::info instead of zink_shader::nir::info
Mike Blumenkrantz [Tue, 28 Mar 2023 22:42:44 +0000 (18:42 -0400)]
zink: use zink_shader::info instead of zink_shader::nir::info

no functional changes

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

15 months agozink: generate flat_flags during shader creation
Mike Blumenkrantz [Wed, 29 Mar 2023 20:53:52 +0000 (16:53 -0400)]
zink: generate flat_flags during shader creation

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

15 months agozink: pass nir_shader to update_so_info()
Mike Blumenkrantz [Tue, 28 Mar 2023 22:37:49 +0000 (18:37 -0400)]
zink: pass nir_shader to update_so_info()

no functional changes

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

15 months agozink: add and populate a shader_info struct to zink_shader
Mike Blumenkrantz [Tue, 28 Mar 2023 22:39:29 +0000 (18:39 -0400)]
zink: add and populate a shader_info struct to zink_shader

this avoids the need to use the nir pointer to access shader info

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

15 months agozink: delete shader reordering in assign_io()
Mike Blumenkrantz [Tue, 28 Mar 2023 22:22:39 +0000 (18:22 -0400)]
zink: delete shader reordering in assign_io()

this is a relic of when pipe_shader_type was different than gl_shader_stage

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

15 months agov3dv/pipeline: use pipeline depth bias enabled to fill up CFG packet
Alejandro Piñeiro [Sat, 1 Apr 2023 22:19:32 +0000 (00:19 +0200)]
v3dv/pipeline: use pipeline depth bias enabled to fill up CFG packet

Even if the VkPipelineRasterizationStateCreateInfo sets
depthBiasEnable, internally we comput if it is really makes sense, and
use that to decide for example if we emit the Depth Offset packet.

But we were not using this to enable Depth Bias through the depth
offset enable field on the CFG packet.

So in some tests we were enabling depth bias, but not emitting the
packet to configure it, that seemed somewhat inconsistent.

This didn't cause any issue so far, but let's be conservative.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22252>

15 months agointel/perf: fix OA format selection on MTL
Lionel Landwerlin [Mon, 3 Apr 2023 06:25:44 +0000 (09:25 +0300)]
intel/perf: fix OA format selection on MTL

Anything Gfx12.5+ has a different format.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 90c86fe63e ("intel: add MTL performance metrics")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22257>

15 months agointel/dev: set a default valid kmd_type
Lionel Landwerlin [Mon, 3 Apr 2023 06:33:56 +0000 (09:33 +0300)]
intel/dev: set a default valid kmd_type

src/intel/perf/intel_perf_query_layout.c needs a valid kmd type to
look at the metrics

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 757e2dd692 ("intel/perf: Disable it for Xe KMD")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22257>

15 months agointel/fs: Rework the loop of opt_combine_constants that collects constants
Ian Romanick [Thu, 30 Jul 2020 02:10:55 +0000 (19:10 -0700)]
intel/fs: Rework the loop of opt_combine_constants that collects constants

This is a bit more wordy, but it will greatly simplify some future
changes.

v2: Rebase on ADD3 changes.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Tested-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22274>

15 months agointel/fs: Refactor part of opt_combine_constants to a separate function
Ian Romanick [Thu, 30 Jul 2020 01:37:42 +0000 (18:37 -0700)]
intel/fs: Refactor part of opt_combine_constants to a separate function

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Tested-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22274>

15 months agointel/fs: Output opt_combine_constants debug to stderr
Ian Romanick [Wed, 2 Dec 2020 19:31:57 +0000 (11:31 -0800)]
intel/fs: Output opt_combine_constants debug to stderr

It's a lot more useful to have it in the same stream with the
INTEL_DEBUG=fs output.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Tested-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22274>

15 months agovulkan/wsi/display: do not dereference a NULL pointer
Iván Briano [Mon, 10 Oct 2022 21:45:58 +0000 (14:45 -0700)]
vulkan/wsi/display: do not dereference a NULL pointer

Fixes dEQP-VK.wsi.direct_drm.swapchain.simulate_oom.*

Cc: mesa-stable
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19025>

15 months agovulkan: Drop VkRenderingSelfDependencyInfoMESA
Faith Ekstrand [Wed, 29 Mar 2023 15:02:15 +0000 (10:02 -0500)]
vulkan: Drop VkRenderingSelfDependencyInfoMESA

It's no longer needed as VK_EXT_attachment_feedback_loop_layout provides
everything we need.

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

15 months agovulkan: Drop vk_render_pass_state::*self_dependenc*
Faith Ekstrand [Wed, 29 Mar 2023 15:02:15 +0000 (10:02 -0500)]
vulkan: Drop vk_render_pass_state::*self_dependenc*

ANV was the only driver using them and now it's on feedback loop flags.
Other drivers should convert instead of depending on the old version.

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

15 months agohasvk/pipeline: Use feedback loop flags for self-dependencies
Faith Ekstrand [Wed, 29 Mar 2023 15:02:15 +0000 (10:02 -0500)]
hasvk/pipeline: Use feedback loop flags for self-dependencies

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

15 months agoanv/pipeline: Use feedback loop flags for self-dependencies
Faith Ekstrand [Wed, 29 Mar 2023 15:02:15 +0000 (10:02 -0500)]
anv/pipeline: Use feedback loop flags for self-dependencies

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

15 months agovulkan: Plumb rendering flags through vk_graphics_pipeline_state
Faith Ekstrand [Thu, 30 Mar 2023 15:27:27 +0000 (10:27 -0500)]
vulkan: Plumb rendering flags through vk_graphics_pipeline_state

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

15 months agovk/render_pass: Support VK_EXT_fragment_density_map
Connor Abbott [Thu, 30 Mar 2023 17:14:21 +0000 (12:14 -0500)]
vk/render_pass: Support VK_EXT_fragment_density_map

Support emulating "classic" FDM with dynamic rendering.

Reviewed-by: Faith Ekstrand <faith@gfxstrand.net>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22191>

15 months agotu: Use vk_pipeline_get_renderpass_flags()
Connor Abbott [Mon, 12 Dec 2022 20:21:17 +0000 (21:21 +0100)]
tu: Use vk_pipeline_get_renderpass_flags()

With this we can remove usage of VkSelfDependencyInfoMESA.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22191>

15 months agovulkan: Record pipeline flags in the render pass
Jason Ekstrand [Tue, 2 Aug 2022 18:13:54 +0000 (13:13 -0500)]
vulkan: Record pipeline flags in the render pass

This records any rendering pipeline flags in the render pass.  This
provides much-needed information for the VK_KHR_fragment_shading_rate
and VK_EXT_fragment_density_map extensions as well as provides an
alternative to VkRenderingSelfDependencyInfoMESA which is based on
VK_EXT_attachment_feedback_loop_layout.

v2 (Connor): Name something more general
v3 (Faith): Also add the FSR flag

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

15 months agoradv/ci: add one more flake
Samuel Pitoiset [Mon, 3 Apr 2023 07:18:20 +0000 (09:18 +0200)]
radv/ci: add one more flake

This one is randomly failing.

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

15 months agozink/ci: remove primitive-id-no-gs-quads from the NAVI10 fail list
Samuel Pitoiset [Mon, 3 Apr 2023 07:16:53 +0000 (09:16 +0200)]
zink/ci: remove primitive-id-no-gs-quads from the NAVI10 fail list

It has been fixed too.

Fixes: 5fb8ba0eb8b ("zink/ci: remove `primitive-id-no-gs-quads` from radv-vangogh-fails")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22258>

15 months agoradv/gfx11: improve RT scratch allocation
Rhys Perry [Wed, 29 Mar 2023 13:59:00 +0000 (14:59 +0100)]
radv/gfx11: improve RT scratch allocation

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22232>

15 months agoradv: Use linear_dispatch info in GFX11 task/mesh draw packet.
Timur Kristóf [Thu, 30 Mar 2023 18:08:35 +0000 (20:08 +0200)]
radv: Use linear_dispatch info in GFX11 task/mesh draw packet.

This helps the CP (command processor) optimize mesh shader
dispatch when Y = Z = 1.

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

15 months agonir: Gather compile time constant task->mesh dispatch size.
Timur Kristóf [Thu, 30 Mar 2023 17:34:31 +0000 (19:34 +0200)]
nir: Gather compile time constant task->mesh dispatch size.

Some GPUs such as AMD RDNA3 can use this information
to optimize mesh shader dispatches.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22222>

15 months agoaco: Better phi lowering for merge block when else-side is const.
Timur Kristóf [Tue, 21 Feb 2023 14:04:40 +0000 (15:04 +0100)]
aco: Better phi lowering for merge block when else-side is const.

Add a new special case for binary merge blocks to boolean
phi lowerig. This special case benefits shaders that
have divergent branches with an empty else block,
for example all NGG culling shaders.

Fossil DB stats on Rembrandt (NGG culling enabled):

Totals from 61778 (45.79% of 134913) affected shaders:
SpillVGPRs: 2268 -> 2284 (+0.71%); split: -1.10%, +1.81%
CodeSize: 164317952 -> 162962772 (-0.82%); split: -0.83%, +0.00%
Instrs: 31249824 -> 30910686 (-1.09%); split: -1.09%, +0.00%
Latency: 154948555 -> 154781097 (-0.11%); split: -0.12%, +0.02%
InvThroughput: 30397664 -> 30370872 (-0.09%); split: -0.13%, +0.04%
VClause: 529239 -> 529229 (-0.00%); split: -0.00%, +0.00%
SClause: 783417 -> 783430 (+0.00%)
Copies: 2627570 -> 2595161 (-1.23%); split: -1.25%, +0.02%
Branches: 976506 -> 976508 (+0.00%); split: -0.00%, +0.00%

Fossil DB stats on GFX11 (NGG culling disabled):

Totals from 895 (0.66% of 134913) affected shaders:
SpillVGPRs: 2258 -> 2322 (+2.83%); split: -0.44%, +3.28%
CodeSize: 6229152 -> 6215880 (-0.21%); split: -0.37%, +0.16%
Scratch: 216576 -> 215808 (-0.35%); split: -0.47%, +0.12%
Instrs: 1202077 -> 1198396 (-0.31%); split: -0.43%, +0.13%
Latency: 15921336 -> 16000561 (+0.50%); split: -0.74%, +1.24%
InvThroughput: 7425765 -> 7474891 (+0.66%); split: -0.67%, +1.33%
VClause: 22976 -> 23008 (+0.14%); split: -0.03%, +0.17%
SClause: 38269 -> 38271 (+0.01%)
Copies: 123244 -> 123896 (+0.53%); split: -0.30%, +0.83%
Branches: 47570 -> 47574 (+0.01%); split: -0.00%, +0.01%

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21493>

15 months agoaco: Call dominator_tree before lower_phis.
Timur Kristóf [Tue, 21 Feb 2023 13:33:58 +0000 (14:33 +0100)]
aco: Call dominator_tree before lower_phis.

This just makes it possible to use the dominator
tree information during phi lowering.

No Fossil DB changes on GFX11.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21493>

15 months agoaco: Pop branch operands when targets are same in SSA elimination.
Timur Kristóf [Sun, 2 Apr 2023 22:05:09 +0000 (00:05 +0200)]
aco: Pop branch operands when targets are same in SSA elimination.

The branch instruction is no longer conditional when the targets are the
same, so the operand is not necessary and can be removed.

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

15 months agoaco: Don't verify branch exec read when eliminating exec writes.
Timur Kristóf [Sun, 2 Apr 2023 22:03:37 +0000 (00:03 +0200)]
aco: Don't verify branch exec read when eliminating exec writes.

Verifying that the branch instruction reads exec is not actually
necessary because the pattern that we look for already implies that.

This prepares for the next commit which will remove the exec operand
from branches that have the same target. These branches will no
longer read exec, but they should still get the same optimization.

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

15 months agoaco: Simplify get_phi_operand using Operand::c32_or_c64.
Timur Kristóf [Sun, 19 Feb 2023 13:07:10 +0000 (14:07 +0100)]
aco: Simplify get_phi_operand using Operand::c32_or_c64.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21493>

15 months agoaco: Don't remove exec writes that also write other registers.
Timur Kristóf [Sun, 2 Apr 2023 20:11:25 +0000 (22:11 +0200)]
aco: Don't remove exec writes that also write other registers.

Don't eliminate an instruction that writes registers other than exec and scc.
It is possible that this is eg. an s_and_saveexec and the saved value is
used by a later branch.

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

15 months agoaco: Consider p_cbranch_nz as divergent branch too.
Timur Kristóf [Sun, 2 Apr 2023 20:08:51 +0000 (22:08 +0200)]
aco: Consider p_cbranch_nz as divergent branch too.

A p_cbranch_nz instruction that reads exec is divergent too.

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

15 months agoci: disable lima farm, currently out-of-space, needs to be fixed
David Heidelberg [Mon, 3 Apr 2023 12:41:15 +0000 (14:41 +0200)]
ci: disable lima farm, currently out-of-space, needs to be fixed

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

15 months agoradv: Pre-compute descriptor set layout hash.
Tatsuyuki Ishi [Sun, 2 Apr 2023 06:41:25 +0000 (15:41 +0900)]
radv: Pre-compute descriptor set layout hash.

While analyzing cache loading performance, hashing the pipeline layout was
surprisingly consuming around 4% of time, sometimes close to the cost of
hashing shader modules.

Turns out we were hashing the pipeline layout on every pipeline creation.
Considering that pipeline layouts are usually deduplicated by the
application, this was amplifying the hashing cost by a big margin.

With Graphics Pipeline Library, we do need to rebuild the pipeline layout
by combining those from each library, but we can memoize the hash of the
descriptor set layout. The cost of re-hashing hashes is negligible since
each descriptor set layout can amount to 1–2KB in size.

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

15 months agoanv: Bump VkDeviceMemory objects limit to 4GB
Nataraj Deshpande [Tue, 14 Mar 2023 23:39:34 +0000 (16:39 -0700)]
anv: Bump VkDeviceMemory objects limit to 4GB

Android CTS 13_r4 tests dEQP-VK.memory.allocation.random* fail
with VK_ERROR_OUT_OF_DEVICE_MEMORY on ADL boards with 32GB memory
as memory allocation requests from DEQP are much larger(~2.9GB+)
based on device heap size/8.

Increase the limit to unsigned 32bit max(~4GB) which helps to
fix the dEQP-VK.memory.allocation.random* tests.

v1: Bound allocation by the largest memory heap size (Lionel Landwerlin)

v2: Clean up comments to reflect the code change (Ivan Briano)
    Update the value of MAX_MEMORY_ALLOCATION_SIZE (Lionel Landwerlin)

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

15 months agoisl: update max buffer size for SKL+
Lionel Landwerlin [Wed, 22 Mar 2023 10:11:22 +0000 (12:11 +0200)]
isl: update max buffer size for SKL+

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22066>

15 months agoanv: take care of maxStorageBufferRange being uint32_t
Lionel Landwerlin [Wed, 22 Mar 2023 11:39:42 +0000 (13:39 +0200)]
anv: take care of maxStorageBufferRange being uint32_t

Not fixing anything, but required for another fix.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22066>

15 months agoac/llvm: remove ac_build_opencoded_load_format
Qiang Yu [Mon, 20 Mar 2023 04:37:22 +0000 (12:37 +0800)]
ac/llvm: remove ac_build_opencoded_load_format

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

15 months agoac/llvm,radeonsi: remove abi->load_inputs implementation
Qiang Yu [Mon, 20 Mar 2023 04:33:26 +0000 (12:33 +0800)]
ac/llvm,radeonsi: remove abi->load_inputs implementation

No nir_load_input in VS now.

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

15 months agoradeonsi: monolithic VS emit prolog in nir directly
Qiang Yu [Mon, 20 Mar 2023 04:26:57 +0000 (12:26 +0800)]
radeonsi: monolithic VS emit prolog 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/22045>

15 months agoac/llvm: move ac_fixup_ls_hs_input_vgprs to amd common
Qiang Yu [Mon, 20 Mar 2023 04:15:02 +0000 (12:15 +0800)]
ac/llvm: move ac_fixup_ls_hs_input_vgprs to amd common

To be shared with radeonsi.

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

15 months agoac/llvm: vs_rel_patch_id can also be fixed up
Qiang Yu [Mon, 20 Mar 2023 03:49:20 +0000 (11:49 +0800)]
ac/llvm: vs_rel_patch_id can also be fixed up

It's currently used when LS store output to LDS.
The LS/HS bug fix seems does not affect this case.
But we'd better treat it as other fixed args.

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

15 months agoradeonsi: add si_nir_lower_vs_inputs
Qiang Yu [Sat, 18 Mar 2023 13:35:45 +0000 (21:35 +0800)]
radeonsi: add si_nir_lower_vs_inputs

Ported from llvm:
* si_load_vs_input
* ac_build_opencoded_load_format
* ac_ufN_to_float
* get_vertex_index
* ac_build_fast_udiv_nuw

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

15 months agoac/nir: add ac_nir_load_arg_at_offset
Qiang Yu [Sat, 18 Mar 2023 13:32:16 +0000 (21:32 +0800)]
ac/nir: add ac_nir_load_arg_at_offset

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

15 months agoradeonsi: expose si_nir_load_internal_binding
Qiang Yu [Fri, 3 Mar 2023 03:36:20 +0000 (11:36 +0800)]
radeonsi: expose si_nir_load_internal_binding

PS polygon stippling is going to use it too.

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

15 months agohasvk: include "vk_android.h" header in anv_android.c
Mauro Rossi [Sat, 1 Apr 2023 11:24:19 +0000 (13:24 +0200)]
hasvk: include "vk_android.h" header in anv_android.c

Fixes the following building errors:

../src/intel/vulkan_hasvk/anv_android.c:387:34: error: implicit declaration of function 'vk_alloc_ahardware_buffer' is invalid in C99 [-Werror,-
Wimplicit-function-declaration]
   struct AHardwareBuffer *ahw = vk_alloc_ahardware_buffer(pAllocateInfo);
                                 ^
../src/intel/vulkan_hasvk/anv_android.c:387:28: error: incompatible integer to pointer conversion initializing 'struct AHardwareBuffer *' with an expression of type 'int' [-Werror,-Wint-conversion]
   struct AHardwareBuffer *ahw = vk_alloc_ahardware_buffer(pAllocateInfo);
                           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.

Fixes: b16cfe23 ("vulkan,anv,hasvk,radv: Unify Android hardware buffer creation")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22251>

15 months agoac/nir: When task->mesh dispatch Y or Z are 0, also set X to 0.
Timur Kristóf [Thu, 30 Mar 2023 20:41:45 +0000 (22:41 +0200)]
ac/nir: When task->mesh dispatch Y or Z are 0, also set X to 0.

AMD recommends doing this to speed up the CP when it processes
the draw ring entries. LLPC also does this.

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

15 months agoac/nir: Store only lowest 8 bits for task draw ring DWORD3.
Timur Kristóf [Wed, 29 Mar 2023 22:33:17 +0000 (00:33 +0200)]
ac/nir: Store only lowest 8 bits for task draw ring DWORD3.

When writing the draw ready bit, don't write the high 24 bits
of DWORD3, because that is used by the HW for something else
according to LLPC.

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

15 months agoaco: fix nir_var_shader_out barriers for task shaders
Rhys Perry [Fri, 31 Mar 2023 12:59:59 +0000 (13:59 +0100)]
aco: fix nir_var_shader_out barriers for task shaders

These will be used in a future commit.

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

15 months agofreedreno: Support the disable_throttling=true driconf option
Rob Clark [Wed, 29 Mar 2023 21:33:57 +0000 (14:33 -0700)]
freedreno: Support the disable_throttling=true driconf option

At this point, mostly just to make it easier to disable throttling for
performance debugging.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224>

15 months agofreedreno: Move driconf settings into sub-struct
Rob Clark [Wed, 29 Mar 2023 21:22:30 +0000 (14:22 -0700)]
freedreno: Move driconf settings into sub-struct

Organize all one of them in a single place before adding more.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224>

15 months agofreedreno: Avoid looping shader stages if nothing dirty
Rob Clark [Mon, 27 Mar 2023 18:00:45 +0000 (11:00 -0700)]
freedreno: Avoid looping shader stages if nothing dirty

We have corresponding global dirty bits for each of the per-stage dirty
bits.  We can use this to skip iterating over shader stages when there
is no per-stage dirty state to handle.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224>

15 months agofreedreno: Re-work dirty-resource tracking
Rob Clark [Sun, 26 Mar 2023 20:00:25 +0000 (13:00 -0700)]
freedreno: Re-work dirty-resource tracking

If a resource is dirty but already tracked by the current batch, no need
to process it at draw time.

Note that the batch could change (ie. new fb state bound, etc) after the
check if we need resource dirty tracking, but in these cases all the
dirty-resource state is marked dirty.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224>

15 months agofreedreno: Inline single-use helpers
Rob Clark [Sun, 26 Mar 2023 19:27:22 +0000 (12:27 -0700)]
freedreno: Inline single-use helpers

bind_sampler_states() / set_sampler_views() have just a single caller.
So inline them.  Needed for next commit.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224>

15 months agofreedreno: Extract out a helper
Rob Clark [Sun, 26 Mar 2023 19:16:50 +0000 (12:16 -0700)]
freedreno: Extract out a helper

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224>

15 months agofreedreno: Hoist dirty vars
Rob Clark [Sun, 26 Mar 2023 18:53:15 +0000 (11:53 -0700)]
freedreno: Hoist dirty vars

Prep to re-work how we track dirty-resource.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224>

15 months agofreedreno: Stop being too clever by half
Rob Clark [Mon, 27 Mar 2023 22:06:37 +0000 (15:06 -0700)]
freedreno: Stop being too clever by half

This wasn't taking into account a change in corresponding bit in
writeable_bitmask, causing problem if an SSBO was first bound for
read, and then rebound for write, we wouldn't update the buffers
valid range.  Instead just drop the premature optimization.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224>

15 months agofreedreno: Fix or/and'ing two BitmaskEnums
Connor Abbott [Fri, 17 Mar 2023 14:11:53 +0000 (15:11 +0100)]
freedreno: Fix or/and'ing two BitmaskEnums

Previously when there was an & or | with two BitmaskEnums, the compiler
would try to cast the RHS and find a matching overload, but there were
many different casts (to the enum itself, to an integer, to a boolean,
etc.) each with a matching overload which meant that it couldn't pick
one and errored out due to an ambiguous overload. Fix this by
explicitly providing an overload that takes a BitmaskEnum on the RHS.
It has to also provide a BitmaskEnum output, so that subsequent
operators with the result on the LHS (e.g. when or'ing together three
BitmaskEnums without any parentheses tricks) also get the right
overload.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224>

15 months agonine: use separate register for aL emulation
Pavel Ondračka [Thu, 9 Feb 2023 19:49:54 +0000 (20:49 +0100)]
nine: use separate register for aL emulation

NIR loop unrolling is only working if the loop counter is a scalar.
So keep the loop counter separate and move the aL emulation and
the aL increment to a new register.

This allows loop unrolling with vec4 backends where unconditional
scalarizing of phi nodes is undesirable, like for example r300.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Axel Davy <davyaxel0@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7222
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21243>

15 months agorusticl/kernel: make use of cso info
Karol Herbst [Fri, 18 Nov 2022 14:51:18 +0000 (15:51 +0100)]
rusticl/kernel: make use of cso info

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>

15 months agopanfrost: implement get_compute_state_info
Karol Herbst [Wed, 30 Nov 2022 16:53:43 +0000 (17:53 +0100)]
panfrost: implement get_compute_state_info

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>

15 months agopanfrost: move max_thread_count and take reg_count into account
Karol Herbst [Wed, 30 Nov 2022 16:53:12 +0000 (17:53 +0100)]
panfrost: move max_thread_count and take reg_count into account

We'll need it to report proper thread counts for OpenCL.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>

15 months agonvc0: implement get_compute_state_info
Karol Herbst [Wed, 30 Nov 2022 13:55:30 +0000 (14:55 +0100)]
nvc0: implement get_compute_state_info

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>

15 months agonv50: implement get_compute_state_info
Karol Herbst [Wed, 30 Nov 2022 16:17:48 +0000 (17:17 +0100)]
nv50: implement get_compute_state_info

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>

15 months agoiris: implement get_compute_state_info
Karol Herbst [Fri, 18 Nov 2022 20:20:05 +0000 (21:20 +0100)]
iris: implement get_compute_state_info

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>

15 months agolp: implement get_compute_state_info
Karol Herbst [Wed, 30 Nov 2022 11:53:57 +0000 (12:53 +0100)]
lp: implement get_compute_state_info

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>

15 months agogallium: add get_compute_state_info
Karol Herbst [Wed, 16 Nov 2022 22:22:13 +0000 (23:22 +0100)]
gallium: add get_compute_state_info

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>

15 months agorusticl/kernel: set has_variable_shared_mem on the nir
Karol Herbst [Tue, 22 Nov 2022 22:00:46 +0000 (23:00 +0100)]
rusticl/kernel: set has_variable_shared_mem on the nir

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>

15 months agonir: track existence of variable shared memory
Karol Herbst [Tue, 22 Nov 2022 21:47:29 +0000 (22:47 +0100)]
nir: track existence of variable shared memory

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>

15 months agoRevert "d3d12: Honor suggested driver profile/level for H264/HEVC encode"
Sil Vilerino [Fri, 31 Mar 2023 15:12:28 +0000 (11:12 -0400)]
Revert "d3d12: Honor suggested driver profile/level for H264/HEVC encode"

This reverts commit 37652da61612aadfedc23ba484b33781654d5d56.

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

15 months agoaco: don't optimize s_or_b64(v_cmp_u_f32(a, b), cmp(a, a))
Rhys Perry [Thu, 30 Mar 2023 14:33:57 +0000 (15:33 +0100)]
aco: don't optimize s_or_b64(v_cmp_u_f32(a, b), cmp(a, a))

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22214>

15 months agodocs: add a few vulkan extensions supported by multiple drivers
Charlie Birks [Thu, 17 Jun 2021 11:23:29 +0000 (11:23 +0000)]
docs: add a few vulkan extensions supported by multiple drivers

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11445>

15 months agoradv/ci: Update ray tracing pipeline fail/skip lists
Konstantin Seurer [Thu, 2 Mar 2023 12:57:03 +0000 (13:57 +0100)]
radv/ci: Update ray tracing pipeline fail/skip lists

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

15 months agoradv: fix binding raytracing/compute pipelines
Samuel Pitoiset [Fri, 31 Mar 2023 11:32:59 +0000 (13:32 +0200)]
radv: fix binding raytracing/compute pipelines

If a compute pipeline is bound after a raytracing pipeline, the
computes shader slot (aka RT prolog) will be overwritten.

To fix this, move the RT prolog outside of the compute shader slot.

Fixes: d109362a3da ("radv: copy bound shaders to the cmdbuf state")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22235>