1946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark/* 2946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark * Copyright (C) 2016 Rob Clark <robclark@freedesktop.org> 3946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark * 4946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark * Permission is hereby granted, free of charge, to any person obtaining a 5946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark * copy of this software and associated documentation files (the "Software"), 6946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark * to deal in the Software without restriction, including without limitation 7946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark * and/or sell copies of the Software, and to permit persons to whom the 9946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark * Software is furnished to do so, subject to the following conditions: 10946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark * 11946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark * The above copyright notice and this permission notice (including the next 12946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark * paragraph) shall be included in all copies or substantial portions of the 13946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark * Software. 14946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark * 15946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark * SOFTWARE. 22946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark * 23946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark * Authors: 24946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark * Rob Clark <robclark@freedesktop.org> 25946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark */ 26946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark 27946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark#ifndef FD5_UTIL_H_ 28946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark#define FD5_UTIL_H_ 29946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark 30946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark#include "freedreno_util.h" 31946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark 32946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark#include "a5xx.xml.h" 33946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark 34946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clarkenum a5xx_vtx_fmt fd5_pipe2vtx(enum pipe_format format); 35946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clarkenum a5xx_tex_fmt fd5_pipe2tex(enum pipe_format format); 36946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clarkenum a5xx_color_fmt fd5_pipe2color(enum pipe_format format); 37946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clarkenum a3xx_color_swap fd5_pipe2swap(enum pipe_format format); 38946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clarkenum a5xx_tex_fetchsize fd5_pipe2fetchsize(enum pipe_format format); 39946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clarkenum a5xx_depth_format fd5_pipe2depth(enum pipe_format format); 40946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark 41946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clarkuint32_t fd5_tex_swiz(enum pipe_format format, unsigned swizzle_r, 42946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark unsigned swizzle_g, unsigned swizzle_b, unsigned swizzle_a); 43946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark 44946cf4eb6846767306a221eec7d0f82d20dfb6b5Rob Clark#endif /* FD5_UTIL_H_ */ 45