Alyssa Rosenzweig
9bbe93d158
hk: fix alpha-to-coverage with sample shading
...
fixes sascha willem's deferredmultisampling.
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
d0b3b4c309
agx: move binary_size into info
...
this simplifies serialization, and will simplify future work.
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
6c5be08269
agx: pack agx_cf_binding
...
dramatically reduces shader info size.
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
5d628e3892
agx: fix uniform packing with local_load
...
fixes with constant promotion:
dEQP-VK.compute.shader_object_spirv.workgroup_memory_explicit_layout.alias.i32_to_u16_array_scalar_func_read_write_barrier
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
773dd89fde
asahi: fix no16 flag
...
regressed when shuffling code for hk.
Fixes: 3cb8c1de81 ("asahi: get debug in common")
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
Asahi Lina
02169e76dd
agx: Fix queue destroy op for virtgpu
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908 >
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
12ab3abaac
hk: bump max push size
...
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
6dad37c812
hk: use push size macro
...
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
fe84aaa8a7
hk: switch to 64-bit queries
...
for timestamps
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
b1b125dbe6
hk: drop store_op_dontcare w/a
...
updated CTS fixes this.
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
3ee036b2b5
hk: wire up indirect 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
a4e3ca1fc5
hk: add mechanism to test indirects
...
while we wait for cts.
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
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