Path: blob/21.2-virgl/src/util/format/u_format_bptc.h
7178 views
/**************************************************************************1*2* Copyright 2010 VMware, Inc.3* All Rights Reserved.4*5* Permission is hereby granted, free of charge, to any person obtaining a6* copy of this software and associated documentation files (the7* "Software"), to deal in the Software without restriction, including8* without limitation the rights to use, copy, modify, merge, publish,9* distribute, sub license, and/or sell copies of the Software, and to10* permit persons to whom the Software is furnished to do so, subject to11* the following conditions:12*13* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR14* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,15* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL16* THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,17* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR18* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE19* USE OR OTHER DEALINGS IN THE SOFTWARE.20*21* The above copyright notice and this permission notice (including the22* next paragraph) shall be included in all copies or substantial portions23* of the Software.24*25**************************************************************************/262728#ifndef U_FORMAT_BPTC_H_29#define U_FORMAT_BPTC_H_303132#include "pipe/p_compiler.h"3334#ifdef __cplusplus35extern "C" {36#endif3738void39util_format_bptc_rgba_unorm_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride,40const uint8_t *restrict src_row, unsigned src_stride,41unsigned width, unsigned height);42void43util_format_bptc_rgba_unorm_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride,44const uint8_t *restrict src_row, unsigned src_stride,45unsigned width, unsigned height);46void47util_format_bptc_rgba_unorm_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride,48const uint8_t *restrict src_row, unsigned src_stride,49unsigned width, unsigned height);50void51util_format_bptc_rgba_unorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride,52const float *restrict src_row, unsigned src_stride,53unsigned width, unsigned height);54void55util_format_bptc_rgba_unorm_fetch_rgba(void *restrict dst, const uint8_t *restrict src,56unsigned width, unsigned height);5758void59util_format_bptc_srgba_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride,60const uint8_t *restrict src_row, unsigned src_stride,61unsigned width, unsigned height);62void63util_format_bptc_srgba_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride,64const uint8_t *restrict src_row, unsigned src_stride,65unsigned width, unsigned height);66void67util_format_bptc_srgba_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride,68const uint8_t *restrict src_row, unsigned src_stride,69unsigned width, unsigned height);70void71util_format_bptc_srgba_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride,72const float *restrict src_row, unsigned src_stride,73unsigned width, unsigned height);74void75util_format_bptc_srgba_fetch_rgba(void *restrict dst, const uint8_t *restrict src,76unsigned width, unsigned height);7778void79util_format_bptc_rgb_float_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride,80const uint8_t *restrict src_row, unsigned src_stride,81unsigned width, unsigned height);82void83util_format_bptc_rgb_float_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride,84const uint8_t *restrict src_row, unsigned src_stride,85unsigned width, unsigned height);86void87util_format_bptc_rgb_float_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride,88const uint8_t *restrict src_row, unsigned src_stride,89unsigned width, unsigned height);90void91util_format_bptc_rgb_float_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride,92const float *restrict src_row, unsigned src_stride,93unsigned width, unsigned height);94void95util_format_bptc_rgb_float_fetch_rgba(void *restrict dst, const uint8_t *restrict src,96unsigned width, unsigned height);9798void99util_format_bptc_rgb_ufloat_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride,100const uint8_t *restrict src_row, unsigned src_stride,101unsigned width, unsigned height);102void103util_format_bptc_rgb_ufloat_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride,104const uint8_t *restrict src_row, unsigned src_stride,105unsigned width, unsigned height);106void107util_format_bptc_rgb_ufloat_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride,108const uint8_t *restrict src_row, unsigned src_stride,109unsigned width, unsigned height);110void111util_format_bptc_rgb_ufloat_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride,112const float *restrict src_row, unsigned src_stride,113unsigned width, unsigned height);114void115util_format_bptc_rgb_ufloat_fetch_rgba(void *restrict dst, const uint8_t *restrict src,116unsigned width, unsigned height);117#ifdef __cplusplus118}119#endif120121#endif /* U_FORMAT_BPTC_H_ */122123124