summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/amd/vulkan/radv_util.h')
-rw-r--r--src/amd/vulkan/radv_util.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_util.h b/src/amd/vulkan/radv_util.h
new file mode 100644
index 00000000000..57a4c95adb6
--- /dev/null
+++ b/src/amd/vulkan/radv_util.h
@@ -0,0 +1,9 @@
+#pragma once
+
+#ifdef HAVE___BUILTIN_POPCOUNT
+#define util_bitcount(i) __builtin_popcount(i)
+#else
+extern unsigned int
+util_bitcount(unsigned int n);
+#endif
+