summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_private.h
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-11-18 13:35:16 -0800
committerJason Ekstrand <[email protected]>2016-11-22 14:24:29 -0800
commit772d223c9c05322ef26640667d1938d8c378b531 (patch)
treebe939a7680cd131d2a84db88ac2112c146170dd5 /src/intel/vulkan/anv_private.h
parentd1d6b788989e73edd2426999d891230500dc1a73 (diff)
anv: Add a vk_to_isl_color helper
Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_private.h')
-rw-r--r--src/intel/vulkan/anv_private.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index 7b521b1268d..7931d4bb790 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -153,6 +153,19 @@ anv_clear_mask(uint32_t *inout_mask, uint32_t clear_mask)
}
}
+static inline union isl_color_value
+vk_to_isl_color(VkClearColorValue color)
+{
+ return (union isl_color_value) {
+ .u32 = {
+ color.uint32[0],
+ color.uint32[1],
+ color.uint32[2],
+ color.uint32[3],
+ },
+ };
+}
+
#define for_each_bit(b, dword) \
for (uint32_t __dword = (dword); \
(b) = __builtin_ffs(__dword) - 1, __dword; \