platform/upstream/mesa.git
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>

2 years agoradv: Add GPU copying of acceleration structures.
Bas Nieuwenhuizen [Sun, 12 Sep 2021 23:31:56 +0000 (01:31 +0200)]
radv: Add GPU copying 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 copying of acceleration structures.
Bas Nieuwenhuizen [Sun, 12 Sep 2021 23:31:43 +0000 (01:31 +0200)]
radv: Add CPU copying 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 GPU copy/serialization/deserialization shader.
Bas Nieuwenhuizen [Sun, 12 Sep 2021 23:30:54 +0000 (01:30 +0200)]
radv: Add GPU copy/serialization/deserialization shader.

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

2 years agoradv: Add acceleration structure queries.
Bas Nieuwenhuizen [Fri, 3 Sep 2021 01:07:45 +0000 (03:07 +0200)]
radv: Add acceleration structure queries.

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

2 years agoradv: Add copy/serialization info to accel struct headers.
Bas Nieuwenhuizen [Wed, 1 Sep 2021 10:50:00 +0000 (12:50 +0200)]
radv: Add copy/serialization info to accel struct headers.

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

2 years agoradv: Add an indirect dispatch struct to the header.
Bas Nieuwenhuizen [Tue, 31 Aug 2021 00:53:17 +0000 (02:53 +0200)]
radv: Add an indirect dispatch struct to the header.

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

2 years agoradv: Add an internal indirect dispatch command.
Bas Nieuwenhuizen [Tue, 31 Aug 2021 23:29:40 +0000 (01:29 +0200)]
radv: Add an internal indirect dispatch command.

Avoiding the entire buffer dance.

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

2 years agoradv: Add DMA buffer update function for internal use.
Bas Nieuwenhuizen [Fri, 24 Sep 2021 00:30:38 +0000 (02:30 +0200)]
radv: Add DMA buffer update function for internal use.

Only split out the DMA part because that doesn't need the BO.

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

2 years agozink: break out surface info init to helper function
Mike Blumenkrantz [Wed, 29 Sep 2021 17:34:39 +0000 (13:34 -0400)]
zink: break out surface info init to helper function

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

2 years agozink: make a local resource var in fb_clears_apply_internal
Mike Blumenkrantz [Wed, 29 Sep 2021 13:13:56 +0000 (09:13 -0400)]
zink: make a local resource var in fb_clears_apply_internal

no functional changes

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

2 years agopanfrost/ci: Run Piglit's quick_gl tests on G52
Tomeu Vizoso [Fri, 24 Sep 2021 06:21:15 +0000 (08:21 +0200)]
panfrost/ci: Run Piglit's quick_gl tests on G52

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13063>

2 years agoci: Rebuild kernel with Amlogic KMS support
Tomeu Vizoso [Fri, 24 Sep 2021 08:45:38 +0000 (10:45 +0200)]
ci: Rebuild kernel with Amlogic KMS support

So we can run Xorg for Piglit tests.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13063>

2 years agoetnaviv: add etna_lookup_or_create_screen(..)
Christian Gmeiner [Thu, 16 Sep 2021 17:42:58 +0000 (19:42 +0200)]
etnaviv: add etna_lookup_or_create_screen(..)

It is an improved version of etna_drm_screen_create_renderonly(..)
which also needs the gpu fd. Also switch etna_drm_screen_create(..)
and etna_drm_screen_create_renderonly(..) to use the new function.

This follows how other driver's winsys code looks like and fixes a
crash I when running piglit with PIGLIT_PLATFORM="gbm".

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Tested-by: Philipp Zabel p.zabel@pengutronix.de
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12904>

2 years agoetnaviv: extend screen_create(..) with gpu_fd
Christian Gmeiner [Thu, 16 Sep 2021 17:36:05 +0000 (19:36 +0200)]
etnaviv: extend screen_create(..) with gpu_fd

Decouples gpu fd and renderonly object. This opens the door for
some simplifications.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Tested-by: Philipp Zabel p.zabel@pengutronix.de
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12904>

2 years agoetnaviv: allow screen creation with NULL renderonly object
Christian Gmeiner [Thu, 16 Sep 2021 17:08:06 +0000 (19:08 +0200)]
etnaviv: allow screen creation with NULL renderonly object

Prep change for winsys cleanups.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Tested-by: Philipp Zabel p.zabel@pengutronix.de
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12904>

2 years agoetnaviv: move drm version readout to drm layer
Christian Gmeiner [Thu, 16 Sep 2021 18:27:40 +0000 (20:27 +0200)]
etnaviv: move drm version readout to drm layer

It fits here better.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Tested-by: Philipp Zabel p.zabel@pengutronix.de
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12904>

2 years agoetnaviv: fix indentation
Christian Gmeiner [Thu, 16 Sep 2021 17:06:10 +0000 (19:06 +0200)]
etnaviv: fix indentation

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Tested-by: Philipp Zabel p.zabel@pengutronix.de
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12904>

2 years agoetnaviv: fix leak of the screen hash table
Christian Gmeiner [Thu, 16 Sep 2021 16:50:42 +0000 (18:50 +0200)]
etnaviv: fix leak of the screen hash table

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Tested-by: Philipp Zabel p.zabel@pengutronix.de
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12904>

2 years agoetnaviv: use better name for fd hash table
Christian Gmeiner [Thu, 16 Sep 2021 16:55:18 +0000 (18:55 +0200)]
etnaviv: use better name for fd hash table

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Tested-by: Philipp Zabel p.zabel@pengutronix.de
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12904>

2 years agoanv: remove a format assert when setting up attachments
Tapani Pälli [Tue, 28 Sep 2021 10:20:53 +0000 (13:20 +0300)]
anv: remove a format assert when setting up attachments

There are exceptions in spec where the framebuffer image format and
format given for render pass attachment may differ. This happens in
particular when subpass has resolve attachment that might resolve
only depth from a combined depth+stencil format. There the formats do
not need to match but be 'compatible' with each other.

As example using VK_FORMAT_D32_SFLOAT format is considered compatible
when actual framebuffer format is VK_FORMAT_D32_SFLOAT_S8_UINT.

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

2 years agoaco/spill: Use std::unordered_map for spills_entry
Tony Wasserka [Fri, 16 Jul 2021 10:19:28 +0000 (12:19 +0200)]
aco/spill: Use std::unordered_map for spills_entry

fossil-db on Navi14:
Totals from 305 (0.20% of 150305) affected shaders:
CodeSize: 5498340 -> 5498328 (-0.00%)
Instrs: 1009992 -> 1009989 (-0.00%)
Latency: 33922644 -> 33923018 (+0.00%)
InvThroughput: 9302963 -> 9303151 (+0.00%)
VClause: 19004 -> 19001 (-0.02%)

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

2 years agoaco/spill: Use unordered_map for spills_exit
Tony Wasserka [Fri, 16 Jul 2021 10:17:29 +0000 (12:17 +0200)]
aco/spill: Use unordered_map for spills_exit

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

2 years agoaco/spill: Clarify use of long-lived references by adding const
Tony Wasserka [Fri, 16 Jul 2021 09:33:32 +0000 (11:33 +0200)]
aco/spill: Clarify use of long-lived references by adding const

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

2 years agoaco/spill: Reduce allocations in next_uses_per_block
Tony Wasserka [Thu, 15 Jul 2021 15:11:24 +0000 (17:11 +0200)]
aco/spill: Reduce allocations in next_uses_per_block

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