Commit graph

201327 commits

Author SHA1 Message Date
Alyssa Rosenzweig
b8ae31948d hk: plumb indirect_local
for tess.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
e68aed3a13 libagx: extend indirect tess to handle indexed
this was missed, vk cts hits it

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
5e464521fb asahi: presumably fix indirect indexed tess
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Mary Guillemard
053d4c5666 hk: Fill deviceUUID
Before this the device UUID was never filled.

Fixes: 5bc8284816 ("hk: add Vulkan driver for Apple GPUs")
Signed-off-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Sergio Lopez
167744dce9 hk: allow overriding sysmem with an env var
When running in a VM, the amount of RAM seen through /proc/meminfo
doesn't necessarily reflect the real amount of memory available in the
system to be used as VRAM. For instance, on a system with 8 GB of
physical RAM, the user might want to run a VM with 2 GB of RAM and still
be able to use 4 GB as VRAM.

To achieve this, allow the reported sysmem to be overridden by the
value (in bytes) of the HK_SYSMEM environment variable.

Signed-off-by: Sergio Lopez <slp@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Sergio Lopez
2c18b0c6aa hk: limit the number of free BOs in each cmd pool
Some clients like to have long living command pools, each one with
multiple command buffers, and trigger bursts of BO allocations on them.
This leads to the an ever increasing number of BOs allocated on each
command pool, easily reaching over a couple thousand BOs per pool.

The visible effect is an ever increasing amount of VRAM consumption,
which has been observed to easily get over 700MB for a workload
consuming around 4GB of heap.

Here we limit the number of free BOs in each pool to 32. The rest are
dereferenced when the command buffer is reset. In practice, with
workloads triggering bursts of BO allocations on command buffers, those
BOs aren't really released, keeping them in the BO cache and getting
reused shortly after. This has the nice size effect of doing bookkeeping
on the BO cache, trimming it up when needed.

With this change, the tested workloads present a significant reduction
of VRAM, combined with an stabilization of BO allocations.

Signed-off-by: Sergio Lopez <slp@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
2c513e8689 agx: consistent ffma name
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
7e9d468891 agx: encoding_32 -> encoding
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
22a8a0fe6d agx: drop encoding_16
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
ce02690902 agx: special case mov_imm
so we can rm a worse special case

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
11f797d93a agx: split up f16 ops
they're fundamentally different instructions, model that appropriately.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
72b533f5c7 asahi,agx: clang-format
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
7ca27ebd46 asahi: rm tessellator branch
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
ea18348d94 asahi: defer fixed->float to tess
this should parallelize better.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
3f6ff1b11e asahi: don't do extra runtime validation for exact
silly.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
cc8d50baf5 asahi: make wrapping less silly
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
c8a1c82175 asahi: get rid of default from the XML
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
1a2938704d asahi: drop implied defaults
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
f3612689d9 asahi: automatically set default to encode to zero
even with mods.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
f5d8edd2de asahi: be explicit about frag properties
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
2dff6a541e asahi: be explicit about usc reg unk
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
0e49bd15ff asahi: drop unused default
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
0f5f4e10b5 asahi: set clamp W? explicitly
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
20fd77ba03 asahi: idetnify Clamp W
this is in the powervr xml.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
a88cebb7c3 asahi: drop dated comments
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
37161f2483 asahi: drop comment about blob weirdness
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
e55207f973 asahi: drop comment
I no longer believe this is correct.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
7cdd2a642d asahi: set exact on some fixed? unknown fields
I don't think I've ever seen these change. Treat as fixed constants.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
04a27020be asahi: drop fragment face 2 defaults
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
8dfe60bd26 asahi: drop PBE default
this changes null PBE to use 1d instead of 2d, this should be ok and is
consistent with texturing.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
0098941c99 asahi: drop macOS defaults
we don't pack macOS structs anymore so we dont' care.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
15a97db59d asahi: drop zero defaults
this is implied.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
2a2889b72e asahi: be explicit about LOD clamps
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
c8f8e2e19d asahi: drop trailing
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
50798855b8 asahi: convert to exact
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
a8bb267b16 asahi: add exact fields to genxml
instead of misusing default for this. get better validation and eventually I
want to whack default.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
a0c786b47f asahi: fix newlines
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
5f54d8d195 asahi: guard darwin stuff
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
a91aecc03f asahi: guard some apple code
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
0ec9b27ff0 asahi: drop extra new line
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
d370b81fd4 asahi: cleanup generate valid
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
84d3d7e158 asahi: cleanup validation
make less of a mess of generated output.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
c3b202b71e asahi: fix indentation
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
8809b8c662 asahi: migrate f-strings
https://github.com/ikamensh/flynt nifty

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
a1b8aae170 asahi: normalize enum formatting
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
06a3ecf617 asahi: assume compiler is not stupid
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
f16597d488 asahi: fix spacing
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
5787a6ade8 asahi: split out genxml header
for syntax highlighting and autoformatting and so on.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
e3f91fb13c nir/serialize: fix name
no more nir_register

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Reviewed-by: Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31892>
2024-10-30 12:59:11 +00:00
Alyssa Rosenzweig
b8624d5c6b nir: correct comment
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Reviewed-by: Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31892>
2024-10-30 12:59:11 +00:00