platform/upstream/mesa.git
2 years agoanv: Use input assembly state only when pipeline has vertex stage
Marcin Ślusarz [Tue, 31 Aug 2021 12:49:57 +0000 (14:49 +0200)]
anv: Use input assembly state only when pipeline has vertex stage

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13047>

2 years agoanv: Set graphics pipeline active_stages earlier
Marcin Ślusarz [Tue, 31 Aug 2021 12:43:08 +0000 (14:43 +0200)]
anv: Set graphics pipeline active_stages earlier

So that we can use the active_stages in copy_non_dynamic_state() later.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13047>

2 years agoanv: Validate vertex related states only when VS is present
Caio Marcelo de Oliveira Filho [Wed, 19 May 2021 18:26:21 +0000 (11:26 -0700)]
anv: Validate vertex related states only when VS is present

Mesh pipeline doesn't use those states, so we can't assert them
unconditionally for a graphics pipeline.

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

2 years agocompiler/clc: Preserve OCL kernel arg type metadata on LLVM13
Jesse Natalie [Mon, 4 Oct 2021 16:32:02 +0000 (09:32 -0700)]
compiler/clc: Preserve OCL kernel arg type metadata on LLVM13

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

2 years agocompiler/clc: Null extensions should mean all supported, not all
Jesse Natalie [Mon, 4 Oct 2021 16:29:22 +0000 (09:29 -0700)]
compiler/clc: Null extensions should mean all supported, not all

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

2 years agolima: use nir_shader_instructions_pass in lima_nir_split_load_input
Marcin Ślusarz [Tue, 10 Aug 2021 12:44:22 +0000 (14:44 +0200)]
lima: use nir_shader_instructions_pass in lima_nir_split_load_input

Changes:
- nir_metadata_preserve(..., nir_metadata_block_index | nir_metadata_dominance)
  is called only when pass makes progress
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
  make progress

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13176>

2 years agowsi/x11: Fix a misunderstanding about how xcb_get_geometry works
Adam Jackson [Wed, 29 Sep 2021 15:44:42 +0000 (11:44 -0400)]
wsi/x11: Fix a misunderstanding about how xcb_get_geometry works

The code here is well-intentioned, but the only way a GetGeometry
request can fail is if you name an invalid drawable. And if we did that,
either our internal state got corrupted, or - more likely - the user
destroyed the window. In either case there's nothing more we can do with
the surface, so report that it's been lost.

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

2 years agofreedreno: Handle PIPE_FORMAT_NONE buffers
Rob Clark [Sun, 8 Aug 2021 19:23:43 +0000 (12:23 -0700)]
freedreno: Handle PIPE_FORMAT_NONE buffers

Clover creates buffers with format=NONE.. which is not technically
incorrect.  Just treat this as r8_unorm so we know width0 is the size
in bytes.

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

2 years agofreedreno: Handle cso==NULL in bind_sampler_states
Rob Clark [Tue, 24 Aug 2021 00:18:57 +0000 (17:18 -0700)]
freedreno: Handle cso==NULL in bind_sampler_states

This is a thing that comes up with clover.

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

2 years agofreedreno/ir3: Remove used unused
Rob Clark [Sun, 22 Aug 2021 15:31:51 +0000 (08:31 -0700)]
freedreno/ir3: Remove used unused

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

2 years agofreedreno: Fix some indentation
Rob Clark [Mon, 23 Aug 2021 15:58:27 +0000 (08:58 -0700)]
freedreno: Fix some indentation

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

2 years agofreedreno: Optimize no-op submits
Rob Clark [Thu, 30 Sep 2021 15:39:53 +0000 (08:39 -0700)]
freedreno: Optimize no-op submits

In some cases we need to emit a no-op batch/submit, just to get a fence.
No need to emit all the boilerplate state-resture and flushing in this
case.

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

2 years agofreedreno: Get shader variant msgs in perf debug output
Rob Clark [Sat, 2 Oct 2021 18:55:10 +0000 (11:55 -0700)]
freedreno: Get shader variant msgs in perf debug output

We want FD_MESA_DEBUG=perf to also tell us about variants.

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

2 years agopan/mdg: Use the correct swizzle for condition moves
Icecream95 [Fri, 23 Jul 2021 00:14:32 +0000 (12:14 +1200)]
pan/mdg: Use the correct swizzle for condition moves

Fixes: 70072a20e00 ("pan/midgard: Refactor swizzles")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13173>

2 years agopanvk: Support clearing ZS attachments
Boris Brezillon [Thu, 30 Sep 2021 10:54:40 +0000 (12:54 +0200)]
panvk: Support clearing ZS attachments

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13137>

2 years agopanvk: Allow clear_attachment of RTs > 0
Boris Brezillon [Thu, 30 Sep 2021 10:53:11 +0000 (12:53 +0200)]
panvk: Allow clear_attachment of RTs > 0

It's just a matter of skipping unused BLEND descriptors and emitting
the one we want to clear.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13137>

2 years agopanvk: Pass the render target index to panvk_meta_clear_attachment()
Boris Brezillon [Thu, 30 Sep 2021 09:36:50 +0000 (11:36 +0200)]
panvk: Pass the render target index to panvk_meta_clear_attachment()

The attachment index and render target don't necessarily match. We need
to explicitly pass the render target index to
panvk_meta_clear_attachment() so it can select the correct shader and
emit a valid RSD.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13136>

2 years agopanvk: Fix wls_size retrieval
Boris Brezillon [Thu, 30 Sep 2021 08:45:56 +0000 (10:45 +0200)]
panvk: Fix wls_size retrieval

Fix a typo in wls_size assignment leading to a wrong wls_size.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13136>

2 years agopanvk: Don't use panfrost_get_default_swizzle() on v7+
Boris Brezillon [Thu, 30 Sep 2021 08:52:07 +0000 (10:52 +0200)]
panvk: Don't use panfrost_get_default_swizzle() on v7+

This helper produces invalid component order values on v7. Use the
MALI_RGB_COMPONENT_ORDER_xxx definitions instead.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13136>

2 years agopanvk: Fix allocation of BOs bigger than the slab size
Boris Brezillon [Fri, 1 Oct 2021 07:11:42 +0000 (09:11 +0200)]
panvk: Fix allocation of BOs bigger than the slab size

We can pick a BO from the pool if the BO size exceeds the pool size. In
that case, allocate a BO and save it in a separate array so we can free
it when the memory pool is reset or released.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13136>

2 years agoradv: Add force_emulate_rt perftest option
Joshua Ashton [Wed, 22 Sep 2021 09:55:15 +0000 (10:55 +0100)]
radv: Add force_emulate_rt perftest option

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12974>

2 years agoradv: Enable raytracing extensions on older generations
Joshua Ashton [Tue, 21 Sep 2021 12:59:43 +0000 (13:59 +0100)]
radv: Enable raytracing extensions on older generations

We have shader-based bvh traversal for this on older generations now.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12974>

2 years agoradv: Implement software emulation for intersect_ray
Joshua Ashton [Tue, 21 Sep 2021 14:29:59 +0000 (15:29 +0100)]
radv: Implement software emulation for intersect_ray

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12974>

2 years agoradv: Implement build_node_to_addr for GFX8 and below
Joshua Ashton [Tue, 21 Sep 2021 14:46:03 +0000 (15:46 +0100)]
radv: Implement build_node_to_addr for GFX8 and below

Removes the nir_ prefix also given it no longer acts like a typical builder function.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12974>

2 years agoradv: Do not pass result to insert_traversal_aabb_case
Joshua Ashton [Tue, 21 Sep 2021 14:24:25 +0000 (15:24 +0100)]
radv: Do not pass result to insert_traversal_aabb_case

This is unused as it performs the tests itself.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12974>

2 years agoradv: Remove assert in radv_rt_bind_tables
Joshua Ashton [Tue, 21 Sep 2021 13:00:34 +0000 (14:00 +0100)]
radv: Remove assert in radv_rt_bind_tables

Not necessary anymore.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12974>

2 years agoradv: determine the ES type (VS or TES) for GS earlier
Samuel Pitoiset [Thu, 30 Sep 2021 07:53:18 +0000 (09:53 +0200)]
radv: determine the ES type (VS or TES) for GS earlier

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13170>

2 years agoradv: remove useless loads_dynamic_offsets when emitting push constants
Samuel Pitoiset [Tue, 28 Sep 2021 12:30:53 +0000 (14:30 +0200)]
radv: remove useless loads_dynamic_offsets when emitting push constants

It's always TRUE if loads_push_constants is TRUE.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13170>

2 years agoradv: remove redundant check of needs_multiview_view_index for PS
Samuel Pitoiset [Tue, 28 Sep 2021 09:31:11 +0000 (11:31 +0200)]
radv: remove redundant check of needs_multiview_view_index for PS

layer_input is always TRUE if needs_multiview_view_index is TRUE.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13170>

2 years agoradv: move use of NGG to the graphics pipeline key
Samuel Pitoiset [Wed, 29 Sep 2021 10:01:57 +0000 (12:01 +0200)]
radv: move use of NGG to the graphics pipeline key

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13099>

2 years agoradv: move forcing VRS rates to the graphics pipeline key
Samuel Pitoiset [Wed, 29 Sep 2021 09:51:51 +0000 (11:51 +0200)]
radv: move forcing VRS rates to the graphics pipeline key

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13099>

2 years agoradv: move forcing MRT output NaN fixup to the graphics pipeline key
Samuel Pitoiset [Wed, 29 Sep 2021 09:11:33 +0000 (11:11 +0200)]
radv: move forcing MRT output NaN fixup to the graphics pipeline key

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13099>

2 years agoradv: move forcing invariant geometry to the graphics pipeline key
Samuel Pitoiset [Wed, 29 Sep 2021 09:07:02 +0000 (11:07 +0200)]
radv: move forcing invariant geometry to the graphics pipeline key

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13099>

2 years agoradv: move forcing discard to demote to the graphics pipeline key
Samuel Pitoiset [Wed, 29 Sep 2021 09:01:31 +0000 (11:01 +0200)]
radv: move forcing discard to demote to the graphics pipeline key

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13099>

2 years agoradv: constify radv_shader_info for radv_lower_{io_to_mem,ngg}()
Samuel Pitoiset [Fri, 1 Oct 2021 07:58:46 +0000 (09:58 +0200)]
radv: constify radv_shader_info for radv_lower_{io_to_mem,ngg}()

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13134>

2 years agoradv: remove unnecessary ac_nir_ngg_config output struct
Samuel Pitoiset [Fri, 1 Oct 2021 08:00:25 +0000 (10:00 +0200)]
radv: remove unnecessary ac_nir_ngg_config output struct

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13134>

2 years agoradv: move ngg passthrough determination earlier
Samuel Pitoiset [Fri, 1 Oct 2021 07:56:44 +0000 (09:56 +0200)]
radv: move ngg passthrough determination earlier

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13134>

2 years agomove: move ngg lds bytes determination earlier
Samuel Pitoiset [Fri, 1 Oct 2021 07:49:43 +0000 (09:49 +0200)]
move: move ngg lds bytes determination earlier

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13134>

2 years agoradv: move ngg early prim export determination earlier
Samuel Pitoiset [Fri, 1 Oct 2021 07:41:49 +0000 (09:41 +0200)]
radv: move ngg early prim export determination earlier

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13134>

2 years agoradv: move ngg culling determination earlier
Rhys Perry [Fri, 10 Sep 2021 15:25:05 +0000 (16:25 +0100)]
radv: move ngg culling determination earlier

Co-Authored-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13134>

2 years agoradv: do not declare an extra user SGPR for sample positions and PS
Samuel Pitoiset [Fri, 1 Oct 2021 12:47:47 +0000 (14:47 +0200)]
radv: do not declare an extra user SGPR for sample positions and PS

This is part of the scratch buffer.

No fossils-db change on Sienna.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13140>

2 years agoradeonsi: don't clear G_028644_OFFSET
Pierre-Eric Pelloux-Prayer [Wed, 29 Sep 2021 13:02:13 +0000 (15:02 +0200)]
radeonsi: don't clear G_028644_OFFSET

Before 11d1309d827 this field was updated even when G_028644_PT_SPRITE_TEX was 0.

See https://gitlab.freedesktop.org/mesa/mesa/-/issues/5423

Fixes: 11d1309d827 ("radeonsi: restructure si_get_ps_input_cntl for future refactoring")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13105>

2 years agoradv: get the float controls execution mode from NIR for LLVM
Samuel Pitoiset [Thu, 23 Sep 2021 08:07:38 +0000 (10:07 +0200)]
radv: get the float controls execution mode from NIR for LLVM

No need to duplicate it. Though, I think it was already broken
for merged shaders, but it doesn't matter.

No CTS regressions anyways with LLVM.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12989>

2 years agoradv: disable the DX10 diamond test for better line rasterization perf
Samuel Pitoiset [Mon, 27 Sep 2021 15:48:04 +0000 (17:48 +0200)]
radv: disable the DX10 diamond test for better line rasterization perf

Ported from RadeonSI. PAL also doesn't enable it for Vulkan.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13066>

2 years agolima/parser: add shader disassembly to dump
Andreas Baierl [Fri, 1 Oct 2021 10:44:17 +0000 (12:44 +0200)]
lima/parser: add shader disassembly to dump

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13138>

2 years agoclc: let user specify the targetted SPIRV version
Lionel Landwerlin [Fri, 24 Sep 2021 08:00:16 +0000 (11:00 +0300)]
clc: let user specify the targetted SPIRV version

This version is given to the LLVM-SPIRV translator. On the SPIRV-Tools
side of things, we want to use the highest available version to be
sure to be able to parse back what was generated.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13113>

2 years agoclc: print warnings/errors on their own line
Lionel Landwerlin [Fri, 30 Jul 2021 11:05:49 +0000 (14:05 +0300)]
clc: print warnings/errors on their own line

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13113>

2 years agoclc: add allowed extension for compile parameter
Lionel Landwerlin [Fri, 30 Jul 2021 11:04:24 +0000 (14:04 +0300)]
clc: add allowed extension for compile parameter

The LLVM-SPIRV translator can include a bunch of capabilities into the
generated SPIRV which is not what you always want. That include
internal Intel specific capabilities from the translator.

v2: Rename options
    Fixup checks (Jesse)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13113>

2 years agozink: ensure fences are released before reusing them
Mike Blumenkrantz [Fri, 24 Sep 2021 16:00:33 +0000 (12:00 -0400)]
zink: ensure fences are released before reusing them

at this point it's guaranteed that the cmdbuf has completed since the
timeline id has passed, but vulkan hasn't technically "released" the fence
until it's been waited upon, so cut down on some validation spam by waiting
here like in get_batch_state()

Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13144>

2 years agozink: stop using VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT
Mike Blumenkrantz [Fri, 24 Sep 2021 16:37:40 +0000 (12:37 -0400)]
zink: stop using VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT

the pool is reset anyway so this is unnecessary

Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13145>

2 years agoradv: Don't invalidate VCACHE after clear_htile_mask.
Bas Nieuwenhuizen [Sun, 8 Aug 2021 22:30:55 +0000 (00:30 +0200)]
radv: Don't invalidate VCACHE after clear_htile_mask.

radv_src_access_flush sets all the required flags (which doesn't include VCACHE. The
flush after write is implicit. The invalidate happens for any user that needs it
with the radv_dst_access_flush).

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

2 years agoanv: honor INTEL_DEBUG=sync
Lionel Landwerlin [Sat, 2 Oct 2021 20:44:35 +0000 (23:44 +0300)]
anv: honor INTEL_DEBUG=sync

Useful debug option for hangs.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13161>

2 years agoradv: Fix Android build for common functions.
Bas Nieuwenhuizen [Wed, 8 Sep 2021 10:25:46 +0000 (12:25 +0200)]
radv: Fix Android build for common functions.

Fixes: 9fc16b66d0d ("radv: use common vkGetPhysicalDevice{Image}FormatProperties()")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5328
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12764>

2 years agoac/surface: enable DCC image stores for all displayable DCC on gfx10.3
Marek Olšák [Fri, 1 Oct 2021 21:59:18 +0000 (22:59 +0100)]
ac/surface: enable DCC image stores for all displayable DCC on gfx10.3

Co-authored-by: Joshua Ashton <joshua@froggi.es>
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13153>

2 years agoradeonsi: Use common DCC image store check
Joshua Ashton [Fri, 1 Oct 2021 21:53:43 +0000 (22:53 +0100)]
radeonsi: Use common DCC image store check

We need to keep RADV and RadeonSI on the same page about this due to modifiers.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
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/13153>

2 years agoradv: Use common DCC image store check
Joshua Ashton [Fri, 1 Oct 2021 21:52:36 +0000 (22:52 +0100)]
radv: Use common DCC image store check

We need to keep RADV and RadeonSI on the same page about this due to modifiers.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
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/13153>

2 years agoac/surface: Add helper for checking if a surface supports DCC Image stores
Joshua Ashton [Fri, 1 Oct 2021 21:52:03 +0000 (22:52 +0100)]
ac/surface: Add helper for checking if a surface supports DCC Image stores

We need to keep RADV and RadeonSI on the same page about this due to modifiers.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
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/13153>

2 years agoiris: Delete the MI_COPY_MEM_MEM resource_copy_region implementation.
Kenneth Graunke [Tue, 7 Sep 2021 20:48:58 +0000 (13:48 -0700)]
iris: Delete the MI_COPY_MEM_MEM resource_copy_region implementation.

The MI_COPY_MEM_MEM version of resource_copy_region has known bugs:

- It's failing to set valid_buffer_range correctly
- It's missing iris_emit_buffer_barrier_for() for the
  source/destination, so there may be missing flushes.
- There are some bad interactions with the tile cache and VF using L3.

Even with those fixed, if you expand the "no more than 16 bytes"
restriction to allow copies up to 1024 bytes, then it starts failing
Piglit tests on Icelake.

We could probably fix this.  However, I had originally only measured a
0.689096% +/- 0.473968% (n=4) speedup in Shadow of Mordor's OpenGL
port, which is already fairly small, especially before adding missing
flushes.  Further, some of that likely came from not switching between
render and compute...which we'll soon be able to avoid thanks to BLOCS.

Folks were also worried that MI_COPY_MEM_MEM can't be pipelined, and
that stalling the command streamer may actually slow things down,
especially as the GPUs become more powerful.  We aren't really sure
about this, but it's another concern.

So, let's just get rid of this optimization.  It seemed like a good
idea at the time, but it's just causing issues for very little gain.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12863>

2 years agofreedreno: Move the headergen2 test to be meson unit tests.
Emma Anholt [Thu, 30 Sep 2021 16:34:00 +0000 (09:34 -0700)]
freedreno: Move the headergen2 test to be meson unit tests.

Now all the freedreno build-time testing is just "meson test -C build"

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

2 years agofreedreno: Move crashdec/cffdec tests to be meson unit tests.
Emma Anholt [Thu, 23 Sep 2021 18:36:40 +0000 (11:36 -0700)]
freedreno: Move crashdec/cffdec tests to be meson unit tests.

Now they run automatically in parallel with other unit testing, rather
than needing a separate script and environment to run them.

Instead of doing shell script filtering afterwards, I just added a little
flag to suppress printing the path name.  Also dropped the "Parsing
<file>" in addition to "Reading <file>" in the tested script, since it's
redundant and baked the path name into the reference.

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

2 years agofreedreno: Move afuc tests to meson unit tests.
Emma Anholt [Thu, 23 Sep 2021 18:25:58 +0000 (11:25 -0700)]
freedreno: Move afuc tests to meson unit tests.

Now they run automatically in parallel with other unit testing, rather
than needing a separate script and environment to run them.

Instead of doing shell script filtering afterwards, I just added a little
flag to suppress printing the path name.

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

2 years agofreedreno: Reuse u_math.h instead of open coding uif().
Eric Anholt [Mon, 17 Aug 2020 23:11:44 +0000 (16:11 -0700)]
freedreno: Reuse u_math.h instead of open coding uif().

Plus the old version had a comment with what conversion was being done
swapped!

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

2 years agofreedreno: Reuse u_math.h instead of open coding ALIGN/ARRAY_SIZE.
Eric Anholt [Mon, 17 Aug 2020 23:09:36 +0000 (16:09 -0700)]
freedreno: Reuse u_math.h instead of open coding ALIGN/ARRAY_SIZE.

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

2 years agofreedreno: Fix UBSan failures in cffdec's (uint8_t)x << 24
Eric Anholt [Mon, 17 Aug 2020 20:56:38 +0000 (13:56 -0700)]
freedreno: Fix UBSan failures in cffdec's (uint8_t)x << 24

Types <32 bit get promoted to int32_t when you do expressions on them
(thus why (u8)x << 8 works at all), but shifting into the top bit of the
signed int is undefined behavior.

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

2 years agofreedreno/afuc: Avoid ubsan warns about shifting to the top bit of 'int'
Emma Anholt [Thu, 23 Sep 2021 20:56:27 +0000 (13:56 -0700)]
freedreno/afuc: Avoid ubsan warns about shifting to the top bit of 'int'

I think maybe it's being promoted to int due to the mismatched bitfield
sizes of the uint32_t values being referenced here?

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

2 years agofreedreno/rnndec: Avoid making 0-length variable length arrays.
Emma Anholt [Thu, 23 Sep 2021 20:56:04 +0000 (13:56 -0700)]
freedreno/rnndec: Avoid making 0-length variable length arrays.

ubsan hates it.

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

2 years agofreedreno/rnndec: Fix use of undefined value_orig in the !ti case.
Emma Anholt [Thu, 23 Sep 2021 20:55:44 +0000 (13:55 -0700)]
freedreno/rnndec: Fix use of undefined value_orig in the !ti case.

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

2 years agor300: implement forgotten tgsi's cases of textures
Filip Gawin [Fri, 1 Oct 2021 09:20:27 +0000 (11:20 +0200)]
r300: implement forgotten tgsi's cases of textures

Fixes: d0c398a8 ("r300g: Use radeon compiler for fragment programs")

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

2 years agoturnip: Expose a device name similar to the blob.
Emma Anholt [Fri, 24 Sep 2021 19:28:31 +0000 (12:28 -0700)]
turnip: Expose a device name similar to the blob.

We add "Turnip" so that users (and vulkan.gpuinfo.org) can distinguish us
without requiring VK_KHR_driver_properties.  This will be a lot more
user-friendly than "FD618", though.

I made some little vk_asprintf helpers, because I figure other drivers
setting up deviceName's will want them too.

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

2 years agoturnip: Match the blob's format for vendorID and deviceID.
Emma Anholt [Fri, 24 Sep 2021 18:46:10 +0000 (11:46 -0700)]
turnip: Match the blob's format for vendorID and deviceID.

This should hopefully cause us the least trouble with apps tuning for
device performance.

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

2 years agoiris: Enable atomic operations on compressed surfaces
Sagar Ghuge [Tue, 21 Sep 2021 06:12:57 +0000 (23:12 -0700)]
iris: Enable atomic operations on compressed surfaces

Let's not turn off compression for atomic operations since XeHPG
supports it.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12966>

2 years agoanv: support EXT_primitive_topology_list_restart
Mike Blumenkrantz [Mon, 30 Aug 2021 19:27:16 +0000 (15:27 -0400)]
anv: support EXT_primitive_topology_list_restart

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Tested-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12628>

2 years agoac/surface: don't overwrite DCC settings for imported buffers
Marek Olšák [Thu, 30 Sep 2021 13:50:47 +0000 (09:50 -0400)]
ac/surface: don't overwrite DCC settings for imported buffers

Fixes: 0f6251b31fc - ac/surface: use DCC compatible with image stores for < 4K resolutions

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13120>

2 years agolima: split_load_input: don't split unaligned vec2
Vasily Khoruzhick [Fri, 1 Oct 2021 02:31:09 +0000 (19:31 -0700)]
lima: split_load_input: don't split unaligned vec2

Mali4x0 can't fetch unaligned vec2 (i.e. .yz), so don't split it.

Fixes: 6dd0ad66dedc ("lima/ppir: add NIR pass to split varying loads")
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13131>

2 years agopanvk: remove feature checks from device creation
Tapani Pälli [Mon, 27 Sep 2021 06:31:46 +0000 (09:31 +0300)]
panvk: remove feature checks from device creation

This is already handled by vk_device_init(); drivers no longer
need to do it themselves.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12867>

2 years agolavapipe: remove feature checks from device creation
Tapani Pälli [Mon, 27 Sep 2021 06:30:37 +0000 (09:30 +0300)]
lavapipe: remove feature checks from device creation

This is already handled by vk_device_init(); drivers no longer
need to do it themselves.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12867>

2 years agov3dv: remove feature checks from device creation
Tapani Pälli [Mon, 27 Sep 2021 06:29:50 +0000 (09:29 +0300)]
v3dv: remove feature checks from device creation

This is already handled by vk_device_init(); drivers no longer
need to do it themselves.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12867>

2 years agoturnip: remove feature checks from device creation
Tapani Pälli [Mon, 27 Sep 2021 06:25:43 +0000 (09:25 +0300)]
turnip: remove feature checks from device creation

This is already handled by vk_device_init(); drivers no longer
need to do it themselves.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12867>

2 years agoradv: remove feature checks from device creation
Tapani Pälli [Mon, 20 Sep 2021 11:17:19 +0000 (14:17 +0300)]
radv: remove feature checks from device creation

This is already handled by vk_device_init(); drivers no longer
need to do it themselves.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12867>

2 years agoanv: remove feature checks from device creation
Tapani Pälli [Mon, 20 Sep 2021 11:09:40 +0000 (14:09 +0300)]
anv: remove feature checks from device creation

This is already handled by vk_device_init(); drivers no longer
need to do it themselves.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12867>

2 years agovulkan: provide common functions to check device features
Tapani Pälli [Fri, 1 Oct 2021 04:55:09 +0000 (07:55 +0300)]
vulkan: provide common functions to check device features

v2: move checks to vk_device_init, ignore struct types from
    provisional extensions + lots of cleanups/fixes (Jason Ekstrand)
v3: squash in following patch from Jason:
    "vulkan: Restructure vk_physical_device_check_device_features()"
v4 (Jason): Fix a Windows build error

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12867>

2 years agoradv: determine the VS output parameters in the shader info pass
Samuel Pitoiset [Thu, 30 Sep 2021 09:10:08 +0000 (11:10 +0200)]
radv: determine the VS output parameters in the shader info pass

This can be determined earlier instead of duplicating code in both
compiler backends.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13119>

2 years agoradv: set export_clip_dists for the GS copy shader
Samuel Pitoiset [Thu, 30 Sep 2021 12:50:31 +0000 (14:50 +0200)]
radv: set export_clip_dists for the GS copy shader

This is needed for the next change to correctly compute the VS
output parameters from the shader info pass.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13119>

2 years agoradv: Don't declare ngg_gs_state when there is no API GS.
Timur Kristóf [Thu, 30 Sep 2021 21:42:45 +0000 (23:42 +0200)]
radv: Don't declare ngg_gs_state when there is no API GS.

This shader arg is only used when the pipeline has API GS,
so it is useless to declare it otherwise.

Also remove unused code from radv_declare_shader_args.
NGG is handled by the GS code path so these were never
actually used.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13129>

2 years agoaco: Fix determining whether any culling is enabled.
Timur Kristóf [Fri, 1 Oct 2021 10:29:24 +0000 (12:29 +0200)]
aco: Fix determining whether any culling is enabled.

Use 0xB instead of 0x00FFFFFF - this allows to jump over the culling
code when no actual culling is enabled but the ngg_cull_face_is_ccw
flag is set.

Fixes: 182d9b1e6072bec190cf0a52e9d93dbbdbaa850d
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13129>

2 years agoaco: Fix small primitive precision.
Timur Kristóf [Thu, 30 Sep 2021 21:11:05 +0000 (23:11 +0200)]
aco: Fix small primitive precision.

This is a mistake. It should use ngg_culling_settings
instead of ngg_gs_state.

Fixes: 182d9b1e6072bec190cf0a52e9d93dbbdbaa850d
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13129>

2 years agoradeonsi: implement draw_vertex_state for lower display list overhead
Marek Olšák [Tue, 17 Aug 2021 17:59:44 +0000 (13:59 -0400)]
radeonsi: implement draw_vertex_state for lower display list overhead

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

2 years agoradeonsi: separate VBO descriptor code into a new function (for future work)
Marek Olšák [Sun, 13 Jun 2021 23:52:26 +0000 (19:52 -0400)]
radeonsi: separate VBO descriptor code into a new function (for future work)

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

2 years agomesa: use pipe_vertex_state in vbo and st/mesa for lower display list overhead
Marek Olšák [Thu, 12 Aug 2021 03:32:38 +0000 (23:32 -0400)]
mesa: use pipe_vertex_state in vbo and st/mesa for lower display list overhead

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13050>

2 years agost/mesa: make setup_arrays more reusable for future display list support
Marek Olšák [Thu, 12 Aug 2021 03:28:43 +0000 (23:28 -0400)]
st/mesa: make setup_arrays more reusable for future display list support

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13050>

2 years agost/mesa: add ST_PIPELINE_RENDER_NO_VARRAYS, for future display list support
Marek Olšák [Thu, 12 Aug 2021 03:27:13 +0000 (23:27 -0400)]
st/mesa: add ST_PIPELINE_RENDER_NO_VARRAYS, for future display list support

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13050>

2 years agogallium/util: add util_vertex_state_cache for deduplicating the states
Marek Olšák [Thu, 16 Sep 2021 02:51:49 +0000 (22:51 -0400)]
gallium/util: add util_vertex_state_cache for deduplicating the states

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13050>

2 years agogallium/trace: add pipe_vertex_state support
Marek Olšák [Thu, 30 Sep 2021 17:15:06 +0000 (13:15 -0400)]
gallium/trace: add pipe_vertex_state support

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

2 years agogallium/u_threaded: implement draw_vertex_state
Marek Olšák [Sat, 25 Sep 2021 17:47:08 +0000 (13:47 -0400)]
gallium/u_threaded: implement draw_vertex_state

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13050>

2 years agogallium: add pipe_vertex_state and draw_vertex_state for display lists
Marek Olšák [Thu, 16 Sep 2021 02:46:39 +0000 (22:46 -0400)]
gallium: add pipe_vertex_state and draw_vertex_state for display lists

The main motivation is to improve the score of viewperf13/snx.

This new interface is designed to be optimal for display lists as implemented
by the vbo module. It has much lower CPU overhead in the frontend, threaded
context, and the driver.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13050>

2 years agogallium/util: make pipe_vertex_buffer_reference safe for hashing dst
Marek Olšák [Sat, 21 Aug 2021 00:49:34 +0000 (20:49 -0400)]
gallium/util: make pipe_vertex_buffer_reference safe for hashing dst

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

2 years agoutil: import u_debug_refcnt, u_hash_table, u_debug_describe from gallium
Marek Olšák [Thu, 30 Sep 2021 14:34:38 +0000 (10:34 -0400)]
util: import u_debug_refcnt, u_hash_table, u_debug_describe from gallium

to allow pipe_*_reference to be called in src/mesa/vbo.

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

2 years agoutil: add util_popcnt_inline_asm
Marek Olšák [Thu, 16 Sep 2021 08:15:34 +0000 (04:15 -0400)]
util: add util_popcnt_inline_asm

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13050>

2 years agoradv: Add GPU serialization of acceleration structures.
Bas Nieuwenhuizen [Fri, 3 Sep 2021 01:08:49 +0000 (03:08 +0200)]
radv: Add GPU serialization of acceleration structures.

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

2 years agoradv: Add CPU serialization of acceleration structures.
Bas Nieuwenhuizen [Thu, 9 Sep 2021 22:59:04 +0000 (00:59 +0200)]
radv: Add CPU serialization of acceleration structures.

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