intel: Drop compressed_multisample_layout_mask from the compiler keys
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 8 Dec 2022 04:20:12 +0000 (20:20 -0800)
committerMarge Bot <emma+marge@anholt.net>
Fri, 9 Dec 2022 10:18:25 +0000 (10:18 +0000)
commit584e18863e6f0b408a7275cd427ca7e678abe836
tree583a9f99c15eeb22595326e95756170f7d11dc27
parent5c62f526a4bc95f87eddde186fc30790d732bf3f
intel: Drop compressed_multisample_layout_mask from the compiler keys

The compiler looks at this key field to determine whether to perform
an MCS fetch for a txf_ms or samples_identical texture message, if a
nir_tex_src_ms_mcs_intel source wasn't provided.  If it isn't set,
it instead uses constant 0 (nothing is compressed).

All of the drivers (iris, crocus, anv, hasvk) unconditionally set this
to ~0 because we don't want to pay for costly shader recompiles (which
can cause nasty stuttering).  Most textures are compressed anyway, and
the hardware ignores the l2dms MCS parameter if MCS is disabled.

The only user was BLORP, which sets the key field based on whether the
texture's aux usage has MCS.  But if it has MCS, it also does the MCS
fetch itself and supplies it directly.  Otherwise, it relies on the
compiler to fill in the 0 value.  But it could easily just provide the
0 value itself in that case and not rely on the compiler at all.

With that fixed, we can just drop the key fields entirely.  We leave
them as padding for now to avoid repacking structures; we won't need
to after the next commits anyway.

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20223>
src/gallium/drivers/crocus/crocus_program.c
src/gallium/drivers/iris/iris_program.c
src/intel/blorp/blorp_blit.c
src/intel/blorp/blorp_clear.c
src/intel/compiler/brw_compiler.h
src/intel/compiler/brw_debug_recompile.c
src/intel/compiler/brw_fs_nir.cpp
src/intel/compiler/brw_vec4_nir.cpp
src/intel/vulkan/anv_pipeline.c
src/intel/vulkan_hasvk/anv_pipeline.c