1 #include "zink_format.h"
2 #include "vk_format.h"
3 
4 int
main(int argc,char * argv[])5 main(int argc, char *argv[])
6 {
7    int ret = 0;
8    for (int i = 0; i < PIPE_FORMAT_COUNT; ++i) {
9       enum pipe_format pipe_fmt = i;
10       VkFormat vk_fmt = zink_pipe_format_to_vk_format(i);
11 
12       /* skip unsupported formats */
13       if (vk_fmt == VK_FORMAT_UNDEFINED)
14          continue;
15 
16       enum pipe_format roundtrip = vk_format_to_pipe_format(vk_fmt);
17       if (roundtrip != pipe_fmt) {
18          fprintf(stderr, "Format does not roundtrip\n"
19                          "\tgot: %s\n"
20                          "\texpected: %s\n",
21                          util_format_name(roundtrip),
22                          util_format_name(pipe_fmt));
23          ret = 1;
24       }
25    }
26    return ret;
27 }
28