[Piglit] [PATCH 1/8] fbo-formats: include information about number of bits in sized formats

Nicolai Hähnle nhaehnle at gmail.com
Mon Jan 18 13:40:21 PST 2016


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

The idea is that tests can get an idea of how much precision to expect when
using these formats.
---
 tests/fbo/fbo-formats.h | 392 ++++++++++++++++++++++++------------------------
 1 file changed, 198 insertions(+), 194 deletions(-)

diff --git a/tests/fbo/fbo-formats.h b/tests/fbo/fbo-formats.h
index d73e282..acd3174 100644
--- a/tests/fbo/fbo-formats.h
+++ b/tests/fbo/fbo-formats.h
@@ -40,278 +40,282 @@ struct format_desc {
 	 * GL_RG, GL_RGB, GL_RGBA.
 	 */
 	GLenum base_internal_format;
+
+	/* The number of bits in the smallest channel for the sized formats
+	 * and 0 for unsized and compressed formats. */
+	unsigned min_bits;
 };
 
-#define FORMAT(f, base_internal_format) { f, #f, base_internal_format }
+#define FORMAT(f, base_internal_format, min_bits) { f, #f, base_internal_format, min_bits }
 static const struct format_desc core[] = {
-	FORMAT(3, GL_RGB),
-	FORMAT(4, GL_RGBA),
-	FORMAT(GL_RGB, GL_RGB),
-	FORMAT(GL_RGBA, GL_RGBA),
-	FORMAT(GL_ALPHA, GL_ALPHA),
-	FORMAT(GL_LUMINANCE, GL_LUMINANCE),
-	FORMAT(GL_LUMINANCE_ALPHA, GL_LUMINANCE_ALPHA),
-	FORMAT(GL_INTENSITY, GL_INTENSITY),
-
-	FORMAT(GL_ALPHA4, GL_ALPHA),
-	FORMAT(GL_ALPHA8, GL_ALPHA),
-	FORMAT(GL_ALPHA12, GL_ALPHA),
-	FORMAT(GL_ALPHA16, GL_ALPHA),
-
-	FORMAT(GL_LUMINANCE4, GL_LUMINANCE),
-	FORMAT(GL_LUMINANCE8, GL_LUMINANCE),
-	FORMAT(GL_LUMINANCE12, GL_LUMINANCE),
-	FORMAT(GL_LUMINANCE16, GL_LUMINANCE),
-
-	FORMAT(GL_LUMINANCE4_ALPHA4, GL_LUMINANCE_ALPHA),
-	FORMAT(GL_LUMINANCE8_ALPHA8, GL_LUMINANCE_ALPHA),
-	FORMAT(GL_LUMINANCE12_ALPHA12, GL_LUMINANCE_ALPHA),
-	FORMAT(GL_LUMINANCE16_ALPHA16, GL_LUMINANCE_ALPHA),
-
-	FORMAT(GL_INTENSITY4, GL_INTENSITY),
-	FORMAT(GL_INTENSITY8, GL_INTENSITY),
-	FORMAT(GL_INTENSITY12, GL_INTENSITY),
-	FORMAT(GL_INTENSITY16, GL_INTENSITY),
-
-	FORMAT(GL_R3_G3_B2, GL_RGB),
-	FORMAT(GL_RGB4, GL_RGB),
-	FORMAT(GL_RGB5, GL_RGB),
-	FORMAT(GL_RGB8, GL_RGB),
-	FORMAT(GL_RGB10, GL_RGB),
-	FORMAT(GL_RGB12, GL_RGB),
-	FORMAT(GL_RGB16, GL_RGB),
-
-	FORMAT(GL_RGBA2, GL_RGBA),
-	FORMAT(GL_RGBA4, GL_RGBA),
-	FORMAT(GL_RGB5_A1, GL_RGBA),
-	FORMAT(GL_RGBA8, GL_RGBA),
-	FORMAT(GL_RGB10_A2, GL_RGBA),
-	FORMAT(GL_RGBA12, GL_RGBA),
-	FORMAT(GL_RGBA16, GL_RGBA),
+	FORMAT(3, GL_RGB, 0),
+	FORMAT(4, GL_RGBA, 0),
+	FORMAT(GL_RGB, GL_RGB, 0),
+	FORMAT(GL_RGBA, GL_RGBA, 0),
+	FORMAT(GL_ALPHA, GL_ALPHA, 0),
+	FORMAT(GL_LUMINANCE, GL_LUMINANCE, 0),
+	FORMAT(GL_LUMINANCE_ALPHA, GL_LUMINANCE_ALPHA, 0),
+	FORMAT(GL_INTENSITY, GL_INTENSITY, 0),
+
+	FORMAT(GL_ALPHA4, GL_ALPHA, 4),
+	FORMAT(GL_ALPHA8, GL_ALPHA, 8),
+	FORMAT(GL_ALPHA12, GL_ALPHA, 12),
+	FORMAT(GL_ALPHA16, GL_ALPHA, 16),
+
+	FORMAT(GL_LUMINANCE4, GL_LUMINANCE, 4),
+	FORMAT(GL_LUMINANCE8, GL_LUMINANCE, 8),
+	FORMAT(GL_LUMINANCE12, GL_LUMINANCE, 12),
+	FORMAT(GL_LUMINANCE16, GL_LUMINANCE, 16),
+
+	FORMAT(GL_LUMINANCE4_ALPHA4, GL_LUMINANCE_ALPHA, 4),
+	FORMAT(GL_LUMINANCE8_ALPHA8, GL_LUMINANCE_ALPHA, 8),
+	FORMAT(GL_LUMINANCE12_ALPHA12, GL_LUMINANCE_ALPHA, 12),
+	FORMAT(GL_LUMINANCE16_ALPHA16, GL_LUMINANCE_ALPHA, 16),
+
+	FORMAT(GL_INTENSITY4, GL_INTENSITY, 4),
+	FORMAT(GL_INTENSITY8, GL_INTENSITY, 8),
+	FORMAT(GL_INTENSITY12, GL_INTENSITY, 12),
+	FORMAT(GL_INTENSITY16, GL_INTENSITY, 16),
+
+	FORMAT(GL_R3_G3_B2, GL_RGB, 2),
+	FORMAT(GL_RGB4, GL_RGB, 4),
+	FORMAT(GL_RGB5, GL_RGB, 5),
+	FORMAT(GL_RGB8, GL_RGB, 8),
+	FORMAT(GL_RGB10, GL_RGB, 10),
+	FORMAT(GL_RGB12, GL_RGB, 12),
+	FORMAT(GL_RGB16, GL_RGB, 16),
+
+	FORMAT(GL_RGBA2, GL_RGBA, 2),
+	FORMAT(GL_RGBA4, GL_RGBA, 4),
+	FORMAT(GL_RGB5_A1, GL_RGBA, 1),
+	FORMAT(GL_RGBA8, GL_RGBA, 8),
+	FORMAT(GL_RGB10_A2, GL_RGBA, 2),
+	FORMAT(GL_RGBA12, GL_RGBA, 12),
+	FORMAT(GL_RGBA16, GL_RGBA, 16),
 };
 
 static const struct format_desc arb_depth_texture[] = {
-	FORMAT(GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT),
-	FORMAT(GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT),
-	FORMAT(GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT),
-	FORMAT(GL_DEPTH_COMPONENT32, GL_DEPTH_COMPONENT),
+	FORMAT(GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT, 0),
+	FORMAT(GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT, 16),
+	FORMAT(GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT, 24),
+	FORMAT(GL_DEPTH_COMPONENT32, GL_DEPTH_COMPONENT, 32),
 };
 
 static const struct format_desc ext_packed_depth_stencil[] = {
-	FORMAT(GL_DEPTH_STENCIL_EXT, GL_DEPTH_STENCIL),
-	FORMAT(GL_DEPTH24_STENCIL8_EXT, GL_DEPTH_STENCIL),
+	FORMAT(GL_DEPTH_STENCIL_EXT, GL_DEPTH_STENCIL, 0),
+	FORMAT(GL_DEPTH24_STENCIL8_EXT, GL_DEPTH_STENCIL, 8),
 };
 
 static const struct format_desc ext_texture_srgb[] = {
-	FORMAT(GL_SRGB_EXT, GL_RGB),
-	FORMAT(GL_SRGB8_EXT, GL_RGB),
-	FORMAT(GL_SRGB_ALPHA_EXT, GL_RGBA),
-	FORMAT(GL_SRGB8_ALPHA8_EXT, GL_RGBA),
-	FORMAT(GL_SLUMINANCE_ALPHA_EXT, GL_LUMINANCE_ALPHA),
-	FORMAT(GL_SLUMINANCE8_ALPHA8_EXT, GL_LUMINANCE_ALPHA),
-	FORMAT(GL_SLUMINANCE_EXT, GL_LUMINANCE),
-	FORMAT(GL_SLUMINANCE8_EXT, GL_LUMINANCE),
+	FORMAT(GL_SRGB_EXT, GL_RGB, 0),
+	FORMAT(GL_SRGB8_EXT, GL_RGB, 8),
+	FORMAT(GL_SRGB_ALPHA_EXT, GL_RGBA, 0),
+	FORMAT(GL_SRGB8_ALPHA8_EXT, GL_RGBA, 8),
+	FORMAT(GL_SLUMINANCE_ALPHA_EXT, GL_LUMINANCE_ALPHA, 0),
+	FORMAT(GL_SLUMINANCE8_ALPHA8_EXT, GL_LUMINANCE_ALPHA, 8),
+	FORMAT(GL_SLUMINANCE_EXT, GL_LUMINANCE, 0),
+	FORMAT(GL_SLUMINANCE8_EXT, GL_LUMINANCE, 8),
 };
 
 static const struct format_desc ext_texture_srgb_compressed[] = {
-	FORMAT(GL_COMPRESSED_SRGB_EXT, GL_RGB),
-	FORMAT(GL_COMPRESSED_SRGB_S3TC_DXT1_EXT, GL_RGB),
-	FORMAT(GL_COMPRESSED_SRGB_ALPHA_EXT, GL_RGBA),
-	FORMAT(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, GL_RGBA),
-	FORMAT(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, GL_RGBA),
-	FORMAT(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, GL_RGBA),
-	FORMAT(GL_COMPRESSED_SLUMINANCE_ALPHA_EXT, GL_LUMINANCE_ALPHA),
-	FORMAT(GL_COMPRESSED_SLUMINANCE_EXT, GL_LUMINANCE),
+	FORMAT(GL_COMPRESSED_SRGB_EXT, GL_RGB, 0),
+	FORMAT(GL_COMPRESSED_SRGB_S3TC_DXT1_EXT, GL_RGB, 0),
+	FORMAT(GL_COMPRESSED_SRGB_ALPHA_EXT, GL_RGBA, 0),
+	FORMAT(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, GL_RGBA, 0),
+	FORMAT(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, GL_RGBA, 0),
+	FORMAT(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, GL_RGBA, 0),
+	FORMAT(GL_COMPRESSED_SLUMINANCE_ALPHA_EXT, GL_LUMINANCE_ALPHA, 0),
+	FORMAT(GL_COMPRESSED_SLUMINANCE_EXT, GL_LUMINANCE, 0),
 };
 
 static const struct format_desc ext_texture_compression[] = {
-	FORMAT(GL_COMPRESSED_ALPHA, GL_ALPHA),
-	FORMAT(GL_COMPRESSED_LUMINANCE, GL_LUMINANCE),
-	FORMAT(GL_COMPRESSED_LUMINANCE_ALPHA, GL_LUMINANCE_ALPHA),
-	FORMAT(GL_COMPRESSED_INTENSITY, GL_INTENSITY),
-	FORMAT(GL_COMPRESSED_RGB, GL_RGB),
-	FORMAT(GL_COMPRESSED_RGBA, GL_RGBA),
+	FORMAT(GL_COMPRESSED_ALPHA, GL_ALPHA, 0),
+	FORMAT(GL_COMPRESSED_LUMINANCE, GL_LUMINANCE, 0),
+	FORMAT(GL_COMPRESSED_LUMINANCE_ALPHA, GL_LUMINANCE_ALPHA, 0),
+	FORMAT(GL_COMPRESSED_INTENSITY, GL_INTENSITY, 0),
+	FORMAT(GL_COMPRESSED_RGB, GL_RGB, 0),
+	FORMAT(GL_COMPRESSED_RGBA, GL_RGBA, 0),
 };
 
 static const struct format_desc tdfx_texture_compression_fxt1[] = {
-	FORMAT(GL_COMPRESSED_RGB_FXT1_3DFX, GL_RGB),
-	FORMAT(GL_COMPRESSED_RGBA_FXT1_3DFX, GL_RGBA),
+	FORMAT(GL_COMPRESSED_RGB_FXT1_3DFX, GL_RGB, 0),
+	FORMAT(GL_COMPRESSED_RGBA_FXT1_3DFX, GL_RGBA, 0),
 };
 
 static const struct format_desc ext_texture_compression_s3tc[] = {
-	FORMAT(GL_COMPRESSED_RGB_S3TC_DXT1_EXT, GL_RGB),
-	FORMAT(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, GL_RGBA),
-	FORMAT(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, GL_RGBA),
-	FORMAT(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, GL_RGBA),
+	FORMAT(GL_COMPRESSED_RGB_S3TC_DXT1_EXT, GL_RGB, 0),
+	FORMAT(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, GL_RGBA, 0),
+	FORMAT(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, GL_RGBA, 0),
+	FORMAT(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, GL_RGBA, 0),
 };
 
 static const struct format_desc ext_texture_integer[] = {
-	FORMAT(GL_RGBA8UI_EXT, GL_RGBA),
-	FORMAT(GL_RGBA16UI_EXT, GL_RGBA),
-	FORMAT(GL_RGBA32UI_EXT, GL_RGBA),
-	FORMAT(GL_RGBA8I_EXT, GL_RGBA),
-	FORMAT(GL_RGBA16I_EXT, GL_RGBA),
-	FORMAT(GL_RGBA32I_EXT, GL_RGBA),
-	FORMAT(GL_RGB8UI_EXT, GL_RGB),
-	FORMAT(GL_RGB16UI_EXT, GL_RGB),
-	FORMAT(GL_RGB32UI_EXT, GL_RGB),
-	FORMAT(GL_RGB8I_EXT, GL_RGB),
-	FORMAT(GL_RGB16I_EXT, GL_RGB),
-	FORMAT(GL_RGB32I_EXT, GL_RGB),
-	FORMAT(GL_ALPHA8UI_EXT, GL_ALPHA),
-	FORMAT(GL_ALPHA16UI_EXT, GL_ALPHA),
-	FORMAT(GL_ALPHA32UI_EXT, GL_ALPHA),
-	FORMAT(GL_ALPHA8I_EXT, GL_ALPHA),
-	FORMAT(GL_ALPHA16I_EXT, GL_ALPHA),
-	FORMAT(GL_ALPHA32I_EXT, GL_ALPHA),
-	FORMAT(GL_INTENSITY8UI_EXT, GL_INTENSITY),
-	FORMAT(GL_INTENSITY16UI_EXT, GL_INTENSITY),
-	FORMAT(GL_INTENSITY32UI_EXT, GL_INTENSITY),
-	FORMAT(GL_INTENSITY8I_EXT, GL_INTENSITY),
-	FORMAT(GL_INTENSITY16I_EXT, GL_INTENSITY),
-	FORMAT(GL_INTENSITY32I_EXT, GL_INTENSITY),
-	FORMAT(GL_LUMINANCE8UI_EXT, GL_LUMINANCE),
-	FORMAT(GL_LUMINANCE16UI_EXT, GL_LUMINANCE),
-	FORMAT(GL_LUMINANCE32UI_EXT, GL_LUMINANCE),
-	FORMAT(GL_LUMINANCE8I_EXT, GL_LUMINANCE),
-	FORMAT(GL_LUMINANCE16I_EXT, GL_LUMINANCE),
-	FORMAT(GL_LUMINANCE32I_EXT, GL_LUMINANCE),
-	FORMAT(GL_LUMINANCE_ALPHA8UI_EXT, GL_LUMINANCE_ALPHA),
-	FORMAT(GL_LUMINANCE_ALPHA16UI_EXT, GL_LUMINANCE_ALPHA),
-	FORMAT(GL_LUMINANCE_ALPHA32UI_EXT, GL_LUMINANCE_ALPHA),
-	FORMAT(GL_LUMINANCE_ALPHA8I_EXT, GL_LUMINANCE_ALPHA),
-	FORMAT(GL_LUMINANCE_ALPHA16I_EXT, GL_LUMINANCE_ALPHA),
-	FORMAT(GL_LUMINANCE_ALPHA32I_EXT, GL_LUMINANCE_ALPHA),
+	FORMAT(GL_RGBA8UI_EXT, GL_RGBA, 8),
+	FORMAT(GL_RGBA16UI_EXT, GL_RGBA, 16),
+	FORMAT(GL_RGBA32UI_EXT, GL_RGBA, 32),
+	FORMAT(GL_RGBA8I_EXT, GL_RGBA, 8),
+	FORMAT(GL_RGBA16I_EXT, GL_RGBA, 16),
+	FORMAT(GL_RGBA32I_EXT, GL_RGBA, 32),
+	FORMAT(GL_RGB8UI_EXT, GL_RGB, 8),
+	FORMAT(GL_RGB16UI_EXT, GL_RGB, 16),
+	FORMAT(GL_RGB32UI_EXT, GL_RGB, 32),
+	FORMAT(GL_RGB8I_EXT, GL_RGB, 8),
+	FORMAT(GL_RGB16I_EXT, GL_RGB, 16),
+	FORMAT(GL_RGB32I_EXT, GL_RGB, 32),
+	FORMAT(GL_ALPHA8UI_EXT, GL_ALPHA, 8),
+	FORMAT(GL_ALPHA16UI_EXT, GL_ALPHA, 16),
+	FORMAT(GL_ALPHA32UI_EXT, GL_ALPHA, 32),
+	FORMAT(GL_ALPHA8I_EXT, GL_ALPHA, 8),
+	FORMAT(GL_ALPHA16I_EXT, GL_ALPHA, 16),
+	FORMAT(GL_ALPHA32I_EXT, GL_ALPHA, 32),
+	FORMAT(GL_INTENSITY8UI_EXT, GL_INTENSITY, 8),
+	FORMAT(GL_INTENSITY16UI_EXT, GL_INTENSITY, 16),
+	FORMAT(GL_INTENSITY32UI_EXT, GL_INTENSITY, 32),
+	FORMAT(GL_INTENSITY8I_EXT, GL_INTENSITY, 8),
+	FORMAT(GL_INTENSITY16I_EXT, GL_INTENSITY, 16),
+	FORMAT(GL_INTENSITY32I_EXT, GL_INTENSITY, 32),
+	FORMAT(GL_LUMINANCE8UI_EXT, GL_LUMINANCE, 8),
+	FORMAT(GL_LUMINANCE16UI_EXT, GL_LUMINANCE, 16),
+	FORMAT(GL_LUMINANCE32UI_EXT, GL_LUMINANCE, 32),
+	FORMAT(GL_LUMINANCE8I_EXT, GL_LUMINANCE, 8),
+	FORMAT(GL_LUMINANCE16I_EXT, GL_LUMINANCE, 16),
+	FORMAT(GL_LUMINANCE32I_EXT, GL_LUMINANCE, 32),
+	FORMAT(GL_LUMINANCE_ALPHA8UI_EXT, GL_LUMINANCE_ALPHA, 8),
+	FORMAT(GL_LUMINANCE_ALPHA16UI_EXT, GL_LUMINANCE_ALPHA, 16),
+	FORMAT(GL_LUMINANCE_ALPHA32UI_EXT, GL_LUMINANCE_ALPHA, 32),
+	FORMAT(GL_LUMINANCE_ALPHA8I_EXT, GL_LUMINANCE_ALPHA, 8),
+	FORMAT(GL_LUMINANCE_ALPHA16I_EXT, GL_LUMINANCE_ALPHA, 16),
+	FORMAT(GL_LUMINANCE_ALPHA32I_EXT, GL_LUMINANCE_ALPHA, 32),
 };
 
 static const struct format_desc arb_texture_rg[] = {
-	FORMAT(GL_R8, GL_RED),
-	FORMAT(GL_R16, GL_RED),
-	FORMAT(GL_RG, GL_RG),
-	FORMAT(GL_RG8, GL_RG),
-	FORMAT(GL_RG16, GL_RG),
+	FORMAT(GL_R8, GL_RED, 8),
+	FORMAT(GL_R16, GL_RED, 16),
+	FORMAT(GL_RG, GL_RG, 0),
+	FORMAT(GL_RG8, GL_RG, 8),
+	FORMAT(GL_RG16, GL_RG, 16),
 };
 
 static const struct format_desc arb_texture_rg_int[] = {
-	FORMAT(GL_R8I, GL_RED),
-	FORMAT(GL_R8UI, GL_RED),
-	FORMAT(GL_R16I, GL_RED),
-	FORMAT(GL_R16UI, GL_RED),
-	FORMAT(GL_R32I, GL_RED),
-	FORMAT(GL_R32UI, GL_RED),
-	FORMAT(GL_RG_INTEGER, GL_RG),
-	FORMAT(GL_RG8I, GL_RG),
-	FORMAT(GL_RG8UI, GL_RG),
-	FORMAT(GL_RG16I, GL_RG),
-	FORMAT(GL_RG16UI, GL_RG),
-	FORMAT(GL_RG32I, GL_RG),
-	FORMAT(GL_RG32UI, GL_RG),
+	FORMAT(GL_R8I, GL_RED, 8),
+	FORMAT(GL_R8UI, GL_RED, 8),
+	FORMAT(GL_R16I, GL_RED, 16),
+	FORMAT(GL_R16UI, GL_RED, 16),
+	FORMAT(GL_R32I, GL_RED, 32),
+	FORMAT(GL_R32UI, GL_RED, 32),
+	FORMAT(GL_RG_INTEGER, GL_RG, 0),
+	FORMAT(GL_RG8I, GL_RG, 8),
+	FORMAT(GL_RG8UI, GL_RG, 8),
+	FORMAT(GL_RG16I, GL_RG, 16),
+	FORMAT(GL_RG16UI, GL_RG, 16),
+	FORMAT(GL_RG32I, GL_RG, 32),
+	FORMAT(GL_RG32UI, GL_RG, 32),
 };
 
 static const struct format_desc arb_texture_rg_float[] = {
-	FORMAT(GL_R16F, GL_RED),
-	FORMAT(GL_R32F, GL_RED),
-	FORMAT(GL_RG16F, GL_RG),
-	FORMAT(GL_RG32F, GL_RG),
+	FORMAT(GL_R16F, GL_RED, 16),
+	FORMAT(GL_R32F, GL_RED, 32),
+	FORMAT(GL_RG16F, GL_RG, 16),
+	FORMAT(GL_RG32F, GL_RG, 32),
 };
 
 static const struct format_desc ext_texture_shared_exponent[] = {
-	FORMAT(GL_RGB9_E5_EXT, GL_RGB),
+	FORMAT(GL_RGB9_E5_EXT, GL_RGB, 9),
 };
 
 static const struct format_desc ext_packed_float[] = {
-	FORMAT(GL_R11F_G11F_B10F_EXT, GL_RGB),
+	FORMAT(GL_R11F_G11F_B10F_EXT, GL_RGB, 10),
 };
 
 static const struct format_desc arb_depth_buffer_float[] = {
-	FORMAT(GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT),
-	FORMAT(GL_DEPTH32F_STENCIL8, GL_DEPTH_STENCIL),
+	FORMAT(GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT, 32),
+	FORMAT(GL_DEPTH32F_STENCIL8, GL_DEPTH_STENCIL, 8),
 };
 
 static const struct format_desc ext_texture_compression_rgtc[] = {
-	FORMAT(GL_COMPRESSED_RED, GL_RED),
-	FORMAT(GL_COMPRESSED_RED_RGTC1_EXT, GL_RED),
-	FORMAT(GL_COMPRESSED_RG, GL_RG),
-	FORMAT(GL_COMPRESSED_RED_GREEN_RGTC2_EXT, GL_RG),
+	FORMAT(GL_COMPRESSED_RED, GL_RED, 0),
+	FORMAT(GL_COMPRESSED_RED_RGTC1_EXT, GL_RED, 0),
+	FORMAT(GL_COMPRESSED_RG, GL_RG, 0),
+	FORMAT(GL_COMPRESSED_RED_GREEN_RGTC2_EXT, GL_RG, 0),
 };
 
 static const struct format_desc ext_texture_compression_rgtc_signed[] = {
-	FORMAT(GL_COMPRESSED_SIGNED_RED_RGTC1_EXT, GL_RED),
-	FORMAT(GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT, GL_RG),
+	FORMAT(GL_COMPRESSED_SIGNED_RED_RGTC1_EXT, GL_RED, 0),
+	FORMAT(GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT, GL_RG, 0),
 };
 
 static const struct format_desc arb_texture_float[] = {
-	FORMAT(GL_RGB16F_ARB, GL_RGB),
-	FORMAT(GL_RGBA16F_ARB, GL_RGBA),
-	FORMAT(GL_ALPHA16F_ARB, GL_ALPHA),
-	FORMAT(GL_LUMINANCE16F_ARB, GL_LUMINANCE),
-	FORMAT(GL_LUMINANCE_ALPHA16F_ARB, GL_LUMINANCE_ALPHA),
-	FORMAT(GL_INTENSITY16F_ARB, GL_INTENSITY),
-	FORMAT(GL_RGB32F_ARB, GL_RGB),
-	FORMAT(GL_RGBA32F_ARB, GL_RGBA),
-	FORMAT(GL_ALPHA32F_ARB, GL_ALPHA),
-	FORMAT(GL_LUMINANCE32F_ARB, GL_LUMINANCE),
-	FORMAT(GL_LUMINANCE_ALPHA32F_ARB, GL_LUMINANCE_ALPHA),
-	FORMAT(GL_INTENSITY32F_ARB, GL_INTENSITY)
+	FORMAT(GL_RGB16F_ARB, GL_RGB, 16),
+	FORMAT(GL_RGBA16F_ARB, GL_RGBA, 16),
+	FORMAT(GL_ALPHA16F_ARB, GL_ALPHA, 16),
+	FORMAT(GL_LUMINANCE16F_ARB, GL_LUMINANCE, 16),
+	FORMAT(GL_LUMINANCE_ALPHA16F_ARB, GL_LUMINANCE_ALPHA, 16),
+	FORMAT(GL_INTENSITY16F_ARB, GL_INTENSITY, 16),
+	FORMAT(GL_RGB32F_ARB, GL_RGB, 32),
+	FORMAT(GL_RGBA32F_ARB, GL_RGBA, 32),
+	FORMAT(GL_ALPHA32F_ARB, GL_ALPHA, 32),
+	FORMAT(GL_LUMINANCE32F_ARB, GL_LUMINANCE, 32),
+	FORMAT(GL_LUMINANCE_ALPHA32F_ARB, GL_LUMINANCE_ALPHA, 32),
+	FORMAT(GL_INTENSITY32F_ARB, GL_INTENSITY, 32)
 };
 
 static const struct format_desc ati_texture_compression_3dc[] = {
-	FORMAT(GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI, GL_LUMINANCE_ALPHA)
+	FORMAT(GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI, GL_LUMINANCE_ALPHA, 0)
 };
 
 static const struct format_desc ext_texture_compression_latc[] = {
-	FORMAT(GL_COMPRESSED_LUMINANCE_LATC1_EXT, GL_LUMINANCE),
-	FORMAT(GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT, GL_LUMINANCE_ALPHA),
+	FORMAT(GL_COMPRESSED_LUMINANCE_LATC1_EXT, GL_LUMINANCE, 0),
+	FORMAT(GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT, GL_LUMINANCE_ALPHA, 0),
 };
 
 static const struct format_desc ext_texture_compression_latc_signed[] = {
-	FORMAT(GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT, GL_LUMINANCE),
-	FORMAT(GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT, GL_LUMINANCE_ALPHA)
+	FORMAT(GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT, GL_LUMINANCE, 0),
+	FORMAT(GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT, GL_LUMINANCE_ALPHA, 0)
 };
 
 static const struct format_desc ext_texture_snorm[] = {
-        FORMAT(GL_RED_SNORM, GL_RED),
-        FORMAT(GL_R8_SNORM, GL_RED),
-        FORMAT(GL_RG_SNORM, GL_RG),
-        FORMAT(GL_RG8_SNORM, GL_RG),
-        FORMAT(GL_RGB_SNORM, GL_RGB),
-        FORMAT(GL_RGB8_SNORM, GL_RGB),
-        FORMAT(GL_RGBA_SNORM, GL_RGBA),
-        FORMAT(GL_RGBA8_SNORM, GL_RGBA),
-        FORMAT(GL_ALPHA_SNORM, GL_ALPHA),
-        FORMAT(GL_ALPHA8_SNORM, GL_ALPHA),
-        FORMAT(GL_LUMINANCE_SNORM, GL_LUMINANCE),
-        FORMAT(GL_LUMINANCE8_SNORM, GL_LUMINANCE),
-        FORMAT(GL_LUMINANCE_ALPHA_SNORM, GL_LUMINANCE_ALPHA),
-        FORMAT(GL_LUMINANCE8_ALPHA8_SNORM, GL_LUMINANCE_ALPHA),
-        FORMAT(GL_INTENSITY_SNORM, GL_INTENSITY),
-        FORMAT(GL_INTENSITY8_SNORM, GL_INTENSITY),
-        FORMAT(GL_R16_SNORM, GL_RED),
-        FORMAT(GL_RG16_SNORM, GL_RG),
-        FORMAT(GL_RGB16_SNORM, GL_RGB),
-        FORMAT(GL_RGBA16_SNORM, GL_RGBA),
-        FORMAT(GL_ALPHA16_SNORM, GL_ALPHA),
-        FORMAT(GL_LUMINANCE16_SNORM, GL_LUMINANCE),
-        FORMAT(GL_LUMINANCE16_ALPHA16_SNORM, GL_LUMINANCE_ALPHA),
-        FORMAT(GL_INTENSITY16_SNORM, GL_INTENSITY)
+        FORMAT(GL_RED_SNORM, GL_RED, 0),
+        FORMAT(GL_R8_SNORM, GL_RED, 8),
+        FORMAT(GL_RG_SNORM, GL_RG, 0),
+        FORMAT(GL_RG8_SNORM, GL_RG, 8),
+        FORMAT(GL_RGB_SNORM, GL_RGB, 0),
+        FORMAT(GL_RGB8_SNORM, GL_RGB, 8),
+        FORMAT(GL_RGBA_SNORM, GL_RGBA, 0),
+        FORMAT(GL_RGBA8_SNORM, GL_RGBA, 8),
+        FORMAT(GL_ALPHA_SNORM, GL_ALPHA, 0),
+        FORMAT(GL_ALPHA8_SNORM, GL_ALPHA, 8),
+        FORMAT(GL_LUMINANCE_SNORM, GL_LUMINANCE, 0),
+        FORMAT(GL_LUMINANCE8_SNORM, GL_LUMINANCE, 8),
+        FORMAT(GL_LUMINANCE_ALPHA_SNORM, GL_LUMINANCE_ALPHA, 0),
+        FORMAT(GL_LUMINANCE8_ALPHA8_SNORM, GL_LUMINANCE_ALPHA, 8),
+        FORMAT(GL_INTENSITY_SNORM, GL_INTENSITY, 0),
+        FORMAT(GL_INTENSITY8_SNORM, GL_INTENSITY, 8),
+        FORMAT(GL_R16_SNORM, GL_RED, 16),
+        FORMAT(GL_RG16_SNORM, GL_RG, 16),
+        FORMAT(GL_RGB16_SNORM, GL_RGB, 16),
+        FORMAT(GL_RGBA16_SNORM, GL_RGBA, 16),
+        FORMAT(GL_ALPHA16_SNORM, GL_ALPHA, 16),
+        FORMAT(GL_LUMINANCE16_SNORM, GL_LUMINANCE, 16),
+        FORMAT(GL_LUMINANCE16_ALPHA16_SNORM, GL_LUMINANCE_ALPHA, 16),
+        FORMAT(GL_INTENSITY16_SNORM, GL_INTENSITY, 16)
 };
 
 static const struct format_desc arb_texture_compression_bptc_unorm[] = {
-	FORMAT(GL_COMPRESSED_RGBA_BPTC_UNORM, GL_RGBA),
-	FORMAT(GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM, GL_RGBA)
+	FORMAT(GL_COMPRESSED_RGBA_BPTC_UNORM, GL_RGBA, 0),
+	FORMAT(GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM, GL_RGBA, 0)
 };
 
 static const struct format_desc arb_texture_compression_bptc_float[] = {
-	FORMAT(GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT, GL_RGB),
-	FORMAT(GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT, GL_RGB)
+	FORMAT(GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT, GL_RGB, 0),
+	FORMAT(GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT, GL_RGB, 0)
 };
 
 static const struct format_desc arb_es2_compatibility[] = {
-	FORMAT(GL_RGB565, GL_RGB)
+	FORMAT(GL_RGB565, GL_RGB, 5)
 };
 
 static const struct format_desc arb_texture_stencil8[] = {
-	FORMAT(GL_STENCIL_INDEX8, GL_STENCIL_INDEX)
+	FORMAT(GL_STENCIL_INDEX8, GL_STENCIL_INDEX, 8)
 };
 
 struct test_desc {
-- 
2.5.0



More information about the Piglit mailing list