Commit Graph

169155 Commits

Author SHA1 Message Date
Corentin Noël 1eaea97f3a venus/ci: Only run one crosvm instance
As venus now has separate render server processes it is better to use a single
crosvm instance to run all the tests.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21693>
2023-03-31 12:39:49 +00:00
Corentin Noël c08c2a0963 ci: Uprev crosvm and virglrenderer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21693>
2023-03-31 12:39:49 +00:00
Samuel Pitoiset df3536cd4a vulkan: Update XML and headers to 1.3.246
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22231>
2023-03-31 11:43:20 +00:00
antonino c682de95fb zink: update requirements now that pv mode can be emulated
Zink can now emulate provoking vertex mode when the extention is
missing, update requirements to reflect this.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22162>
2023-03-31 11:03:48 +00:00
antonino 302302a8a1 zink: always advertize provoking vertex mode support
Require VK_EXT_provoking_vertex for optimal_keys and always advertize
PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION since it can now be
emulated

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22162>
2023-03-31 11:03:48 +00:00
antonino 5a4083349f zink: add provoking vertex mode lowering
Can be used as fallback for when VK_EXT_provoking_vertex is missing

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22162>
2023-03-31 11:03:48 +00:00
antonino 9466a6e2f8 zink: add field to 'zink_gs_key' and enum
Add enum for pv emulation primitives and `lower_pv_mode`
to `zink_gs_key`

The enum contains the possible values of the lower_pv_mode key

This key will be non 0 whenever provoking vertex mode needs to be
emulated and it's exact value encodes relevant information about the
primitive that needs to be emulated

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22162>
2023-03-31 11:03:48 +00:00
antonino 34faab07da zink: simplify logic to call `zink_set_primitive_emulation_keys`
The logic had grown to check every primitive indivdually, instead just
check wehether `rast_prim` has changed

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22162>
2023-03-31 11:03:48 +00:00
antonino 15b3d77b40 nir: only handle flat interpolation when needed in `nir_create_passthrough_gs`
When turning primitives into line strips this function needs to move
attributes around, but this is not needed in other cases.

Fixes: 1a5bdca2dd ("zink: implement flat shading using inlined uniforms")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22162>
2023-03-31 11:03:48 +00:00
xurui 744cdf4262 panfrost: Check the return value of drmGetVersion
Signed-off-by: xurui <xurui@kylinos.cn>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22203>
2023-03-31 09:45:19 +00:00
Erik Faye-Lund 1aa09f3346 docs: make code-block indents consistent
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22052>
2023-03-31 09:39:17 +00:00
Erik Faye-Lund eec6564258 docs: format code-block as toml
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22052>
2023-03-31 09:39:17 +00:00
Erik Faye-Lund e7f00ee2c8 docs: format code-block as ini
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22052>
2023-03-31 09:39:17 +00:00
Friedrich Vock b8ee90188b radv: Work around use-after-free compiler errors
Fixes: 4dafb69d ("radv/rt: defer library_pipeline allocation")
Tested-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21981>
2023-03-31 08:52:16 +00:00
Samuel Pitoiset 56b98bb36d radv: add dynamic support for rectangles enable/mode
This is in VK_EXT_discard_rectangles version 2.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21360>
2023-03-31 07:59:18 +00:00
Samuel Pitoiset 1577906d9f vulkan: add dynamic support for rectangles enable/mode
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21360>
2023-03-31 07:59:18 +00:00
Samuel Pitoiset 552f877b2d radv: fix sample shading when a new fragment shader is bound
Sample shading can be enabled from the pipeline and from the fragment
shader, in that case we need to re-emit some states.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22215>
2023-03-31 07:09:15 +00:00
Sagar Ghuge a064e8ff29 intel/decoder: Bump the binding table guess value to 32
Let's bump the binding table value guess to 32 instead of 8 and also stop
decoding the binding table entries as soon as we hit the zero
initialized value in the map.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22221>
2023-03-31 01:01:53 +00:00
Alyssa Rosenzweig 4d2c8bf859 docs: Remove docs about macOS hardware drivers
We dropped support for hardware macOS drivers in afe134a49c ("asahi: Drop macOS
backend"), so drop the corresponding documentation. Layered and software drivers
are still supported on macOS for better or worse, so the main "Notes on macOS"
page can stay I think.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22213>
2023-03-31 00:55:44 +00:00
Jesse Natalie 31778ac869 microsoft/clc: Add shader model / validator to compiler API
Shader model 6.2 was the upper bounds of what *could* be generated
before, but not all devices support it. And other devices support
even more. So, let's pass in the shader model / validator that will
be used by the API caller.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21178>
2023-03-31 00:37:19 +00:00
Alyssa Rosenzweig cd03392c7e panfrost: Choose hierarchy masks by vertex count
Currently, we always use a hierarchy mask with all levels enabled. While this is
efficient for geometry-heavy workloads like 3D games, it is wasteful for 2D
applications that draw very few vertices. For drawing just a few textured quads,
the overhead of small bin sizes outweighs any performance advantages, so it's a
bit slower. More problematically, small bin sizes require tremendous amounts of
memory for the polygon lists, leading to significant memory consumption (~10MB)
for the polygon list for even the simplest of 2D blits.

To reduce our memory footprint, we need to choose our hierarchy masks more
carefully. In general, we want to allow small bin sizes for geometry-heavy
workloads but not for geometry-light workloads. We estimate vertex count in the
driver as a proxy for this, and use a simple heuristic to select a bin size
based on the estimated vertex count. None of this is an exact science, and the
heuristic could probably be tuned. Nevertheless, the heuristic used (comparing
framebuffer size to vertex count) works well in practice, significantly reducing
the memory footprint of 2D applications like Firefox without hurting the
performance of 3D applications.

I originally wrote this patch while diagnosing high memory footprints on my
Midgard laptop, which is why only Midgard is in scope here. On Bifrost and
Valhall, we have a similar hiearchy mask selection problem. It seems likely that
the same heuristic would work there too, but it's a different code path that I
have not integrated or tested. I'll leave that for the adventurous reader, to
get the memory footprint win there too.

(It's also possible the win is smaller on newer Malis than on Midgard, since Arm
claims they optimized the tiler data structures on the newer parts. There's
probably still some merit to the idea.)

On Mali-T860, glmark2 -bdesktop frametime decreased by 1.35% +/- 0.91% at 95%
confidence, showing a slight win for 2D workloads No statistically significant
difference for glmark2 -bshading:shading=phong, since 3D workloads continue to
use the same hierarchy masks.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19482>
2023-03-31 00:19:18 +00:00
Alyssa Rosenzweig 1887b26845 panfrost: Estimate vertex count for hier mask
In the next commit, we will refine our algorithm to select hierarchy masks based
on the vertex count. In preparation, augment the driver to track rough estimates
of the vertex count so we have a "geometry complexity" input for the heuristic.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19482>
2023-03-31 00:19:18 +00:00
Alyssa Rosenzweig cabed30111 panfrost: Clean up tiler calculations
We're about to do some work on this file. Clean it up first.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19482>
2023-03-31 00:19:18 +00:00
Danylo Piliaiev 9f43bc73da freedreno/computerator: Add support for a7xx
Not everything works correctly, e.g. stib seems flakey while stg
seems alright.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22148>
2023-03-30 23:40:48 +00:00
Danylo Piliaiev f32eb48095 freedreno/computerator: Templatize a6xx backend
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22148>
2023-03-30 23:40:48 +00:00
Danylo Piliaiev 8558d07014 freedreno: Add dummy a730/a740 definition
Needed for assembly/disassembly.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22148>
2023-03-30 23:40:48 +00:00
Danylo Piliaiev 3389c3b84c freedreno: Move fd6_pack.h to common code accessible by computerator
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22148>
2023-03-30 23:40:48 +00:00
Danylo Piliaiev 48ad485d1c freedreno/computerator: Convert to C++
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22148>
2023-03-30 23:40:48 +00:00
Danylo Piliaiev 1ae595873f freedreno: C++ fixes for computerator to compile
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22148>
2023-03-30 23:40:48 +00:00
Danylo Piliaiev 6826a0ab14 freedreno/computerator: C++ proofing
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22148>
2023-03-30 23:40:48 +00:00
Danylo Piliaiev 5d2ddce99f freedreno/registers: More a7xx regs
Based on 011c54b0 from Jonathan Marek.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22148>
2023-03-30 23:40:48 +00:00
Danylo Piliaiev 899d142336 freedreno/registers: Document new CP_EVENT_WRITE::SEQNO
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22148>
2023-03-30 23:40:48 +00:00
Alyssa Rosenzweig 1e67f71324 panfrost: Add a v9 fast path for no images
The usual case.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21848>
2023-03-30 23:21:59 +00:00
Alyssa Rosenzweig e6529d6dcc panfrost: Don't update access with a single batch
drawoverhead test 25 from 462->492

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21848>
2023-03-30 23:21:59 +00:00
Alyssa Rosenzweig c224bc6f70 panfrost: Mark packs as ALWAYS_INLINE
As Intel does. These functions are written with the expectation that they will
be inlined away, allowing gcc's copy-prop and constant folding to eliminate the
template struct and any unused fields.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21848>
2023-03-30 23:21:59 +00:00
Alyssa Rosenzweig f8b29f47a0 panfrost: Don't redundantly call emit_const_buf
On Valhall, we were calling emit_const_buf in two places:

1. The main "handle dirty flags" code shared with Bifrost
2. A Valhall-specific shader environment emitter

The latter was not dirty tracked, and the former was not used. That meant we
were calling emit_const_buf way too much. It's not a cheap routine, either.

Instead, use the results from the dirty tracked function in the shader
environment emitter, to avoid the redundant call and get the expected dirty
tracking.

In a Dolphin trace I'm looking at, fps increases 27->33.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21848>
2023-03-30 23:21:59 +00:00
Alyssa Rosenzweig 6ba62be633 panfrost: Print perf debug on seqnum overflow
Another unexpected source of flushes.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21830>
2023-03-30 22:53:16 +00:00
Alyssa Rosenzweig 9d3e01ddef panfrost: Print perf debug when flushing everything
..Even if the only batch is the one that's currently bound.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21830>
2023-03-30 22:53:16 +00:00
Mike Blumenkrantz 70b7c24206 zink: stop caching vertex states
I tried to be too clever and ended up wasting cpu cycles. it's
much, much, much, much faster to just generate this one struct array
every time than it is to do set lookups with thousands of members

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22116>
2023-03-30 22:28:38 +00:00
Mike Blumenkrantz 91ddfe55b5 zink: use fast popcnt for vstate draws
also delete some unused stubs for no dynamic vertex input since I'm never
gonna implement that path

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22116>
2023-03-30 22:28:38 +00:00
Mike Blumenkrantz 11a61ab424 zink: don't swizzle velems state for vstate draws
this isn't ever used, so don't touch it

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22116>
2023-03-30 22:28:38 +00:00
Mike Blumenkrantz f676704fca zink: explicitly pass null velems when creating pipelines with dynamic vinput
this may or may not be a usable pointer, and it's not being read, so
don't pass it at all

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22116>
2023-03-30 22:28:38 +00:00
Mike Blumenkrantz 1ead8f7375 zink: add another vstate draw template for popcnt presence
matching radeonsi

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22116>
2023-03-30 22:28:38 +00:00
Mike Blumenkrantz 41983630c4 zink: bind vertex state directly from draw hook
this is more streamlined and readable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22116>
2023-03-30 22:28:38 +00:00
Mike Blumenkrantz 837168db20 zink: use search_or_add for masking vstate
this should be a significant perf boost instead of multiple lookups

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22116>
2023-03-30 22:28:38 +00:00
Mike Blumenkrantz 4be5caba67 zink: flag vertex buffers for rebind after vstate draws
vstate draws bind their own vertex buffers unrelated to the bound
gallium buffers, so any draw occurring after a vstate draw must
rebind vertex buffers to ensure the correct ones are bound

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22116>
2023-03-30 22:28:38 +00:00
Mike Blumenkrantz 6c3b5921b2 zink: omit VkPipelineVertexInputStateCreateInfo with dynamic vinput
this should never be used/needed

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22116>
2023-03-30 22:28:38 +00:00
Konstantin Seurer f6147051e2 radv: Stop counting user SGPRS separately
Renames radv_declare_shader_args to declare_shader_args and runs it
twice to first gather the user SGPR count without push constants and
descriptor sets.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22119>
2023-03-30 21:52:03 +00:00
Konstantin Seurer 0c915ba501 radv: Set user SGPR locations when declaring args
Merge shader arg declaration with setting up the user data locations.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22119>
2023-03-30 21:52:03 +00:00
Harri Nieminen fd767a4517 bin: Fix typos
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22189>
2023-03-30 21:37:00 +00:00