mesa/src/asahi
Alyssa Rosenzweig 8dcf7648f1 agx: Lower VBOs in NIR
Now we support all the vertex formats! This means we don't hit u_vbuf for format
translation, which helps performance in lots of applications. By doing the
lowering in NIR, the vertex fetch code itself can be optimized by NIR (e.g.
nir_opt_algebraic) which can improve generated code quality.

In my first implementation of this, I had a big switch statement mapping format
enums to interchange formats and post-processing code. This ends up being really
unwieldly, the combinatorics of bit packing + conversion + swizzles is
enormous and for performance we want to support everything (no u_vbuf
fallbacks). To keep the combinatorics in check, we rely on parsing the
util_format_description to separate out the issues of bit packing, conversion,
and swizzling, allowing us to handle bizarro formats like B10G10R10A2_SNORM with
no special casing.

In an effort to support everything in one shot, this handles all the formats
needed for the extensions EXT_vertex_array_bgra, ARB_vertex_type_2_10_10_10_rev,
and ARB_vertex_type_10f_11f_11f_rev.

Passes dEQP-GLES3.functional.vertex_arrays.*

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19996>
2022-12-02 06:25:20 +00:00
..
compiler agx: Lower VBOs in NIR 2022-12-02 06:25:20 +00:00
drm-shim asahi: Add drm-shim implementation 2022-11-07 16:10:11 +00:00
layout ail: Split off test-miptree.cpp from test-layout.cpp 2022-11-28 19:50:18 +00:00
lib agx: Lower VBOs in NIR 2022-12-02 06:25:20 +00:00
meson.build asahi: Add drm-shim implementation 2022-11-07 16:10:11 +00:00