| 1 |
|
| 2 |
. |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
#ifndef KK_FORMAT_H |
| 9 |
#define KK_FORMAT_H 1 |
| 10 |
|
| 11 |
#include "kk_private.h" |
| 12 |
|
| 13 |
#include "util/format/u_format.h" |
| 14 |
|
| 15 |
struct kk_physical_device; |
| 16 |
enum pipe_format; |
| 17 |
enum mtl_pixel_format; |
| 18 |
|
| 19 |
struct kk_va_format { |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
struct { |
| 24 |
union { |
| 25 |
struct { |
| 26 |
uint8_t red; |
| 27 |
uint8_t green; |
| 28 |
uint8_t blue; |
| 29 |
uint8_t alpha; |
| 30 |
}; |
| 31 |
uint8_t channels[4]; |
| 32 |
}; |
| 33 |
} unswizzle; |
| 34 |
uint32_t mtl_pixel_format; |
| 35 |
uint8_t bit_widths; |
| 36 |
uint8_t filter : 1; |
| 37 |
uint8_t write : 1; |
| 38 |
uint8_t color : 1; |
| 39 |
uint8_t blend : 1; |
| 40 |
uint8_t msaa : 1; |
| 41 |
uint8_t resolve : 1; |
| 42 |
uint8_t sparse : 1; |
| 43 |
uint8_t atomic : 1; |
| 44 |
struct { |
| 45 |
uint8_t write : 1; |
| 46 |
uint8_t read : 1; |
| 47 |
uint8_t read_write : 1; |
| 48 |
} texel_buffer; |
| 49 |
uint8_t is_native : 1; |
| 50 |
}; |
| 51 |
|
| 52 |
const struct kk_va_format *kk_get_va_format(enum pipe_format format); |
| 53 |
|
| 54 |
enum mtl_pixel_format vk_format_to_mtl_pixel_format(enum VkFormat vkformat); |
| 55 |
|
| 56 |
#endif |