ext_gpu_shader4: add compiler tests for everything
[piglit.git] / tests / spec / khr_texture_compression_astc / common.h
blobeeab70f7e926e0120d37a5c3a0ee5e3a357dbec8
1 /*
2 * Copyright © 2018 Intel Corporation
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
13 * Software.
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 * DEALINGS IN THE SOFTWARE.
24 static const struct astc_fmt {
25 /** The GLenum for the ASTC format. */
26 GLenum fmt;
28 /** The block width. */
29 int bw;
31 /** The block height. */
32 int bh;
34 /** The number of bytes per block. */
35 int bb;
36 } formats[] = {
37 {GL_COMPRESSED_RGBA_ASTC_4x4_KHR , 4, 4, 16},
38 {GL_COMPRESSED_RGBA_ASTC_5x4_KHR , 5, 4, 16},
39 {GL_COMPRESSED_RGBA_ASTC_5x5_KHR , 5, 5, 16},
40 {GL_COMPRESSED_RGBA_ASTC_6x5_KHR , 6, 5, 16},
41 {GL_COMPRESSED_RGBA_ASTC_6x6_KHR , 6, 6, 16},
42 {GL_COMPRESSED_RGBA_ASTC_8x5_KHR , 8, 5, 16},
43 {GL_COMPRESSED_RGBA_ASTC_8x6_KHR , 8, 6, 16},
44 {GL_COMPRESSED_RGBA_ASTC_8x8_KHR , 8, 8, 16},
45 {GL_COMPRESSED_RGBA_ASTC_10x5_KHR , 10, 5, 16},
46 {GL_COMPRESSED_RGBA_ASTC_10x6_KHR , 10, 6, 16},
47 {GL_COMPRESSED_RGBA_ASTC_10x8_KHR , 10, 8, 16},
48 {GL_COMPRESSED_RGBA_ASTC_10x10_KHR , 10, 10, 16},
49 {GL_COMPRESSED_RGBA_ASTC_12x10_KHR , 12, 10, 16},
50 {GL_COMPRESSED_RGBA_ASTC_12x12_KHR , 12, 12, 16},
51 {GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR , 4, 4, 16},
52 {GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR , 5, 4, 16},
53 {GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR , 5, 5, 16},
54 {GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR , 6, 5, 16},
55 {GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR , 6, 6, 16},
56 {GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR , 8, 5, 16},
57 {GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR , 8, 6, 16},
58 {GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR , 8, 8, 16},
59 {GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR , 10, 5, 16},
60 {GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR , 10, 6, 16},
61 {GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR , 10, 8, 16},
62 {GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR, 10, 10, 16},
63 {GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR, 12, 10, 16},
64 {GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR, 12, 12, 16}