08b93c841a
The static assert used in encode deref modes used the fact there was less than 16 modes that we wanted to compress as an opportunity to reuse MODE_ENC_GENERIC_BIT as it just happened to represent 16. However if we add more than 16 modes i.e need to compress to 6 bits not 5 bits then MODE_ENC_GENERIC_BIT becomes 32 and the logic in the assert breaks. Instead we more precisely make sure MODE_ENC_GENERIC_BIT is large enough to fit all but the last 4 generic modes and that the last 4 modes defined in the enum are in fact the 4 generic modes. Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30654>