1af69d88dSmrg/*
2af69d88dSmrg * Copyright (C) 2011 LunarG, Inc.
3af69d88dSmrg *
4af69d88dSmrg * Permission is hereby granted, free of charge, to any person obtaining a
5af69d88dSmrg * copy of this software and associated documentation files (the "Software"),
6af69d88dSmrg * to deal in the Software without restriction, including without limitation
7af69d88dSmrg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8af69d88dSmrg * and/or sell copies of the Software, and to permit persons to whom the
9af69d88dSmrg * Software is furnished to do so, subject to the following conditions:
10af69d88dSmrg *
11af69d88dSmrg * The above copyright notice and this permission notice (including the next
12af69d88dSmrg * paragraph) shall be included in all copies or substantial portions of the
13af69d88dSmrg * Software.
14af69d88dSmrg *
15af69d88dSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16af69d88dSmrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17af69d88dSmrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18af69d88dSmrg * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19af69d88dSmrg * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20af69d88dSmrg * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21af69d88dSmrg * DEALINGS IN THE SOFTWARE.
22af69d88dSmrg */
23af69d88dSmrg
24af69d88dSmrg#ifndef TEXCOMPRESS_ETC1_H
25af69d88dSmrg#define TEXCOMPRESS_ETC1_H
26af69d88dSmrg
27af69d88dSmrg#include <inttypes.h>
28af69d88dSmrg#include "glheader.h"
29af69d88dSmrg#include "texcompress.h"
30af69d88dSmrg#include "texstore.h"
31af69d88dSmrg
32af69d88dSmrg
33af69d88dSmrgGLboolean
34af69d88dSmrg_mesa_texstore_etc1_rgb8(TEXSTORE_PARAMS);
35af69d88dSmrg
36af69d88dSmrgGLboolean
37af69d88dSmrg_mesa_texstore_etc2_rgb8(TEXSTORE_PARAMS);
38af69d88dSmrg
39af69d88dSmrgGLboolean
40af69d88dSmrg_mesa_texstore_etc2_srgb8(TEXSTORE_PARAMS);
41af69d88dSmrg
42af69d88dSmrgGLboolean
43af69d88dSmrg_mesa_texstore_etc2_rgba8_eac(TEXSTORE_PARAMS);
44af69d88dSmrg
45af69d88dSmrgGLboolean
46af69d88dSmrg_mesa_texstore_etc2_srgb8_alpha8_eac(TEXSTORE_PARAMS);
47af69d88dSmrg
48af69d88dSmrgGLboolean
49af69d88dSmrg_mesa_texstore_etc2_r11_eac(TEXSTORE_PARAMS);
50af69d88dSmrg
51af69d88dSmrgGLboolean
52af69d88dSmrg_mesa_texstore_etc2_rg11_eac(TEXSTORE_PARAMS);
53af69d88dSmrg
54af69d88dSmrgGLboolean
55af69d88dSmrg_mesa_texstore_etc2_signed_r11_eac(TEXSTORE_PARAMS);
56af69d88dSmrg
57af69d88dSmrgGLboolean
58af69d88dSmrg_mesa_texstore_etc2_signed_rg11_eac(TEXSTORE_PARAMS);
59af69d88dSmrg
60af69d88dSmrgGLboolean
61af69d88dSmrg_mesa_texstore_etc2_rgb8_punchthrough_alpha1(TEXSTORE_PARAMS);
62af69d88dSmrg
63af69d88dSmrgGLboolean
64af69d88dSmrg_mesa_texstore_etc2_srgb8_punchthrough_alpha1(TEXSTORE_PARAMS);
65af69d88dSmrg
66af69d88dSmrgvoid
67af69d88dSmrg_mesa_etc1_unpack_rgba8888(uint8_t *dst_row,
68af69d88dSmrg                           unsigned dst_stride,
69af69d88dSmrg                           const uint8_t *src_row,
70af69d88dSmrg                           unsigned src_stride,
71af69d88dSmrg                           unsigned src_width,
72af69d88dSmrg                           unsigned src_height);
73af69d88dSmrgvoid
74af69d88dSmrg_mesa_unpack_etc2_format(uint8_t *dst_row,
75af69d88dSmrg                         unsigned dst_stride,
76af69d88dSmrg                         const uint8_t *src_row,
77af69d88dSmrg                         unsigned src_stride,
78af69d88dSmrg                         unsigned src_width,
79af69d88dSmrg                         unsigned src_height,
8001e04c3fSmrg			 mesa_format format,
8101e04c3fSmrg			 bool bgra);
82af69d88dSmrg
83af69d88dSmrgcompressed_fetch_func
84af69d88dSmrg_mesa_get_etc_fetch_func(mesa_format format);
85af69d88dSmrg
86af69d88dSmrg#endif
87