freedreno: Make BIT() 64-bit
In turnip we were using this a lot with the dynamic state enum, and we're running out of space there because we're needing to add more and more dynamic states that don't correspond to draw states. Make it 64-bit-safe so we don't need to rewrite everything in turnip. In the case where the thing being operated on is 32-bit the compiler can usually optimize it away, as can be seen with the release build size before and after: before: text data bss dec hex filename 5404913 293592 22744 5721249 574ca1 /home/cwabbott/build/mesa-release/lib64/libvulkan_freedreno.so text data bss dec hex filename 13981320 498550 205000 14684870 e012c6 /home/cwabbott/build/mesa-release/lib64/dri/msm_dri.so after: text data bss dec hex filename 5404969 293592 22744 5721305 574cd9 /home/cwabbott/build/mesa-release/lib64/libvulkan_freedreno.so text data bss dec hex filename 13981320 498550 205000 14684870 e012c6 /home/cwabbott/build/mesa-release/lib64/dri/msm_dri.so In the end the only changes is an additional ~50 bytes of text in turnip. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18912>
This commit is contained in:
@@ -54,6 +54,6 @@
|
||||
/* for conditionally setting boolean flag(s): */
|
||||
#define COND(bool, val) ((bool) ? (val) : 0)
|
||||
|
||||
#define BIT(bit) BITFIELD_BIT(bit)
|
||||
#define BIT(bit) BITFIELD64_BIT(bit)
|
||||
|
||||
#endif /* FREEDRENO_COMMON_H_ */
|
||||
|
||||
Reference in New Issue
Block a user