[Piglit] [PATCH 3/7] gl-3.3, 4.2: Add testing for required sized formats.
Eric Anholt
eric at anholt.net
Thu May 16 07:28:45 PDT 2013
---
tests/all.tests | 4 ++++
tests/util/sized-internalformats.c | 13 ++++++++++---
tests/util/sized-internalformats.h | 4 ++++
3 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/tests/all.tests b/tests/all.tests
index 8e452a7..f53c991 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -714,6 +714,10 @@ for subtest in ['generated', 'written', 'flush']:
gl31[cmdline] = concurrent_test('gl-3.1-' + cmdline)
gl31['required-sized-texture-formats'] = concurrent_test('gl-3.0-required-sized-texture-formats 31')
+spec['!OpenGL 3.3/required-sized-texture-formats'] = concurrent_test('gl-3.0-required-sized-texture-formats 33')
+
+spec['!OpenGL 4.2/required-sized-texture-formats'] = concurrent_test('gl-3.0-required-sized-texture-formats 42')
+
# Group spec/glsl-es-1.00
spec['glsl-es-1.00'] = Group()
import_glsl_parser_tests(spec['glsl-es-1.00'],
diff --git a/tests/util/sized-internalformats.c b/tests/util/sized-internalformats.c
index 1017832..626d215 100644
--- a/tests/util/sized-internalformats.c
+++ b/tests/util/sized-internalformats.c
@@ -46,6 +46,9 @@ static const struct {
{ 16, GL_INT },
{ 16, GL_UNSIGNED_INT },
+ { 10, GL_UNSIGNED_INT },
+ { 2, GL_UNSIGNED_INT },
+
{ 12, GL_UNSIGNED_NORMALIZED },
{ 10, GL_UNSIGNED_NORMALIZED },
@@ -54,6 +57,7 @@ static const struct {
{ 8, GL_INT },
{ 8, GL_UNSIGNED_INT },
+ { 6, GL_UNSIGNED_NORMALIZED },
{ 5, GL_UNSIGNED_NORMALIZED },
{ 4, GL_UNSIGNED_NORMALIZED },
{ 3, GL_UNSIGNED_NORMALIZED },
@@ -92,6 +96,7 @@ const struct sized_internalformat sized_internalformats[] = {
FORMAT(GL_RGB5_A1, UN5, UN5, UN5, UN1, NONE, NONE, NONE, NONE),
FORMAT(GL_RGBA8, UN8, UN8, UN8, UN8, NONE, NONE, NONE, NONE),
FORMAT(GL_RGB10_A2, UN10, UN10, UN10, UN2, NONE, NONE, NONE, NONE),
+ FORMAT(GL_RGB10_A2UI, U10, U10, U10, U2, NONE, NONE, NONE, NONE),
FORMAT(GL_RGBA12, UN12, UN12, UN12, UN12, NONE, NONE, NONE, NONE),
FORMAT(GL_RGBA16, UN16, UN16, UN16, UN16, NONE, NONE, NONE, NONE),
FORMAT(GL_SRGB8, UN8, UN8, UN8, NONE, NONE, NONE, NONE, NONE),
@@ -105,6 +110,7 @@ const struct sized_internalformat sized_internalformats[] = {
FORMAT(GL_RGB32F, F32, F32, F32, NONE, NONE, NONE, NONE, NONE),
FORMAT(GL_RGBA32F, F32, F32, F32, F32, NONE, NONE, NONE, NONE),
FORMAT(GL_R11F_G11F_B10F, F11, F11, F10, NONE, NONE, NONE, NONE, NONE),
+ FORMAT(GL_RGB565, UN5, UN6, UN5, NONE, NONE, NONE, NONE, NONE),
FORMAT(GL_RGB9_E5, F9, F9, F9, NONE, NONE, NONE, NONE, NONE),
FORMAT(GL_R8I, I8, NONE, NONE, NONE, NONE, NONE, NONE, NONE),
FORMAT(GL_R8UI, U8, NONE, NONE, NONE, NONE, NONE, NONE, NONE),
@@ -210,8 +216,7 @@ const struct required_format required_formats[] = {
{ GL_R11F_G11F_B10F, 30, true },
- /* Not in the headers! */
- /* { GL_RGB565, 42 }, */
+ { GL_RGB565, 42 },
{ GL_RG32F, 30, true },
{ GL_RG32I, 30, true },
@@ -363,7 +368,7 @@ valid_for_gl_version(const struct required_format *format, int target_version)
static void
usage(const char *name)
{
- fprintf(stderr, "usage: %s <30 | 31>\n", name);
+ fprintf(stderr, "usage: %s <30 | 31 | 33 | 42>\n", name);
piglit_report_result(PIGLIT_FAIL);
}
@@ -389,6 +394,8 @@ setup_required_size_test(int argc, char **argv,
config->supports_gl_compat_version = 30;
break;
case 31:
+ case 33:
+ case 42:
config->supports_gl_core_version = target_version;
break;
default:
diff --git a/tests/util/sized-internalformats.h b/tests/util/sized-internalformats.h
index 5271f14..9529d7c 100644
--- a/tests/util/sized-internalformats.h
+++ b/tests/util/sized-internalformats.h
@@ -41,6 +41,9 @@ enum bits_types {
I16,
U16,
+ U10,
+ U2,
+
UN12,
UN10,
@@ -49,6 +52,7 @@ enum bits_types {
I8,
U8,
+ UN6,
UN5,
UN4,
UN3,
--
1.8.3.rc0
More information about the Piglit
mailing list