1 /* 2 * Copyright 2021 Alyssa Rosenzweig 3 * SPDX-License-Identifier: MIT 4 * 5 */ 6 7 #pragma once 8 9 #include "util/format/u_format.h" 10 11 struct agx_pixel_format_entry { 12 uint8_t channels; 13 uint8_t type; 14 bool texturable : 1; 15 enum pipe_format renderable; 16 }; 17 18 extern const struct agx_pixel_format_entry agx_pixel_format[PIPE_FORMAT_COUNT]; 19 20 static inline bool agx_is_valid_pixel_format(enum pipe_format format)21agx_is_valid_pixel_format(enum pipe_format format) 22 { 23 return agx_pixel_format[format].texturable; 24 } 25 26 struct agx_border_packed; 27 28 void agx_pack_border(struct agx_border_packed *out, const uint32_t in[4], 29 enum pipe_format format); 30