diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2012-11-19 05:10:30 -0800 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2012-11-21 01:58:03 -0800 |
commit | cf47699087f74a6fd94c59a74837fc6c3c6422a8 (patch) | |
tree | ea7e3c9fb62a1794a071fd9baaba447ccb1510c7 | |
parent | b715ceab00b9006c63a1573f7fae69ad49ad724b (diff) |
texture-integer-glsl130: Expect 1 for alpha in R, RG, RGB cases.
Table 3.23 (on page 221) of the OpenGL 3.0 specification is:
+----------------------------------------+
| Texture Base | Texture source color |
| Internal Format | C_s A_s |
+-----------------+----------------------+
| ALPHA | (0, 0, 0) | A |
| LUMINANCE | (L, L, L) | 1 |
| LUMINANCE_ALPHA | (L, L, L) | A |
| INTENSITY | (I, I, I) | I |
| RED | (R, 0, 0) | 1 |
| RG | (R, G, 0) | 1 |
| RGB | (R, G, B) | 1 |
| RGBA | (R, G, B) | A |
+-----------------+----------------------+
From this, we see when sampling from RED, RG, and RGB textures, alpha
is supposed to be one.
v2: Change commit message to quote the right part of the spec.
Reviewed-by: Eric Anholt <eric@anholt.net>
-rw-r--r-- | tests/spec/ext_texture_integer/texture-integer-glsl130.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/spec/ext_texture_integer/texture-integer-glsl130.c b/tests/spec/ext_texture_integer/texture-integer-glsl130.c index 17b02bcc..4d59c520 100644 --- a/tests/spec/ext_texture_integer/texture-integer-glsl130.c +++ b/tests/spec/ext_texture_integer/texture-integer-glsl130.c @@ -373,10 +373,9 @@ test_format(const struct format_info *info) value[0] = temp; break; case GL_RGB_INTEGER_EXT: - expected[3] = 0.0; break; case GL_RG_INTEGER: - expected[2] = expected[3] = 0.0; + expected[2] = 0.0; break; case GL_ALPHA_INTEGER_EXT: expected[0] = expected[1] = expected[2] = 0.0; @@ -404,7 +403,7 @@ test_format(const struct format_info *info) expected[0] = expected[1] = expected[2] = expected[3] = 0.25; value[1] = value[2] = value[3] = value[0]; } else { - expected[1] = expected[2] = expected[3] = 0.0; + expected[1] = expected[2] = 0.0; } break; default: |