mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-22 02:18:10 +02:00
As an off-shoot of trying to delete modifiers (and nir_register) from NIR, I'd like to get rid of some of the modifier NIR silliness that Midgard is doing. The CSEL type selection heuristic at NIR->MIR time is peak backend silly, so replace it with nir_gather_ssa_types. Small win on shader-db. I didn't investigate much, but this matches my intution for how this patch would perform: very small instruction/cycle count improvements due to slightly better decisions around modifiers, more substantial space savings due to more float constants getting inlined. total instructions in shared programs: 1518422 -> 1518414 (<.01%) instructions in affected programs: 1914 -> 1906 (-0.42%) helped: 8 HURT: 0 Instructions are helped. total bundles in shared programs: 646941 -> 646937 (<.01%) bundles in affected programs: 344 -> 340 (-1.16%) helped: 4 HURT: 0 Bundles are helped. total quadwords in shared programs: 1134727 -> 1134324 (-0.04%) quadwords in affected programs: 66752 -> 66349 (-0.60%) helped: 351 HURT: 54 Quadwords are helped. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Italo Nicola <italonicola@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23769>
8 lines
314 B
C
8 lines
314 B
C
#include <stdbool.h>
|
|
#include "nir.h"
|
|
|
|
bool midgard_nir_lower_algebraic_early(nir_shader *shader);
|
|
bool midgard_nir_lower_algebraic_late(nir_shader *shader);
|
|
bool midgard_nir_cancel_inot(nir_shader *shader);
|
|
void midgard_nir_type_csel(nir_shader *shader);
|
|
bool midgard_nir_lower_image_bitsize(nir_shader *shader);
|