<Test name="copyteximage2d_invalid_width_height_cube_neg_x" />
<Test name="copyteximage2d_invalid_width_height_cube_neg_y" />
<Test name="copyteximage2d_invalid_width_height_cube_neg_z" />
-<Test name="generatemipmap_invalid_target_bind" />
<Test name="teximage2d_format_mismatch" />
<Test name="compressedteximage2d_width_height_max_cube_pos_y" />
<Test name="compressedtexsubimage2d_offset_allowed" />
<Test name="teximage2d_neg_width_height_cube_neg_x" />
<Test name="teximage2d_neg_width_height_cube_neg_y" />
<Test name="teximage2d_neg_width_height_cube_neg_z" />
-<Test name="compressedtexsubimage2d_invalid_format" />
<Test name="copyteximage2d_invalid_border_cube_pos_z" />
<Test name="copyteximage2d_invalid_border_cube_pos_x" />
<Test name="copyteximage2d_invalid_border_cube_pos_y" />
void CallLogWrapper::glCompressedTexImage2D (glw::GLenum target, glw::GLint level, glw::GLenum internalformat, glw::GLsizei width, glw::GLsizei height, glw::GLint border, glw::GLsizei imageSize, const void *data)
{
if (m_enableLog)
- m_log << TestLog::Message << "glCompressedTexImage2D(" << getTextureTargetStr(target) << ", " << level << ", " << getPixelFormatStr(internalformat) << ", " << width << ", " << height << ", " << border << ", " << imageSize << ", " << data << ");" << TestLog::EndMessage;
+ m_log << TestLog::Message << "glCompressedTexImage2D(" << getTextureTargetStr(target) << ", " << level << ", " << getCompressedTexFormatStr(internalformat) << ", " << width << ", " << height << ", " << border << ", " << imageSize << ", " << data << ");" << TestLog::EndMessage;
m_gl.compressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
}
void CallLogWrapper::glCompressedTexSubImage2D (glw::GLenum target, glw::GLint level, glw::GLint xoffset, glw::GLint yoffset, glw::GLsizei width, glw::GLsizei height, glw::GLenum format, glw::GLsizei imageSize, const void *data)
{
if (m_enableLog)
- m_log << TestLog::Message << "glCompressedTexSubImage2D(" << getTextureTargetStr(target) << ", " << level << ", " << xoffset << ", " << yoffset << ", " << width << ", " << height << ", " << getPixelFormatStr(format) << ", " << imageSize << ", " << data << ");" << TestLog::EndMessage;
+ m_log << TestLog::Message << "glCompressedTexSubImage2D(" << getTextureTargetStr(target) << ", " << level << ", " << xoffset << ", " << yoffset << ", " << width << ", " << height << ", " << getCompressedTexFormatStr(format) << ", " << imageSize << ", " << data << ");" << TestLog::EndMessage;
m_gl.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
}
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR: return "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR";
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR: return "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR";
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR: return "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR";
+ case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: return "GL_COMPRESSED_RGB_S3TC_DXT1_EXT";
+ case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: return "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT";
+ case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: return "GL_COMPRESSED_RGBA_S3TC_DXT3_EXT";
+ case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: return "GL_COMPRESSED_RGBA_S3TC_DXT5_EXT";
+ case GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG: return "GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG";
+ case GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG: return "GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG";
+ case GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG: return "GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG";
+ case GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG: return "GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG";
default: return DE_NULL;
}
}
#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
#define GL_MIRRORED_REPEAT 0x8370
+#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
+#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
+#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
+#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
#define GL_TEXTURE0 0x84C0
#define GL_CURRENT_PROGRAM 0x8B8D
#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
+#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
+#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
+#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
+#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
#define GL_TEXTURE_RED_TYPE 0x8C10
#define GL_TEXTURE_GREEN_TYPE 0x8C11
#define GL_TEXTURE_BLUE_TYPE 0x8C12
expectError(GL_INVALID_ENUM);
m_log << TestLog::EndSection;
});
- ES2F_ADD_API_CASE(generatemipmap_invalid_target_bind, "Invalid glGenerateMipmap() usage",
+ ES2F_ADD_API_CASE(generatemipmap_npot_wdt_hgt, "Invalid glGenerateMipmap() usage",
{
GLuint texture;
- glGenTextures(1, &texture);
- m_log << TestLog::Section("", "INVALID_OPERATION is generated if the texture bound to target is not cube complete.");
- glBindTexture(GL_TEXTURE_2D, texture);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, 0, GL_RGB, GL_UNSIGNED_BYTE, 0);
- glGenerateMipmap(GL_TEXTURE_CUBE_MAP);
- expectError(GL_INVALID_OPERATION);
- m_log << TestLog::EndSection;
+ if (m_context.getContextInfo().isExtensionSupported("GL_OES_texture_npot"))
+ {
+ m_log << tcu::TestLog::Message
+ << "GL_OES_texture_npot extension removes error condition, skipping test"
+ << tcu::TestLog::EndMessage;
+ return;
+ }
- glDeleteTextures(1, &texture);
- });
- ES2F_ADD_API_CASE(generatemipmap_npot_wdt_hgt, "Invalid glGenerateMipmap() usage",
- {
- GLuint texture;
glActiveTexture(GL_TEXTURE0);
glGenTextures(1, &texture);
glBindTexture(GL_TEXTURE_2D, texture);
}
}
});
- ES2F_ADD_API_CASE(compressedtexsubimage2d_invalid_format, "Invalid glCompressedTexSubImage2D() usage",
- {
- vector<deInt32> supported;
- vector<deInt32> accepted;
- getSupportedExtensions(GL_NUM_COMPRESSED_TEXTURE_FORMATS, GL_COMPRESSED_TEXTURE_FORMATS, supported);
- getCompressedTexSubImage2DFormat(supported, accepted);
-
- if (accepted.empty())
- {
- m_log << TestLog::Message << "// No suitable compressed formats found, expect GL_INVALID_ENUM." << TestLog::EndMessage;
- glCompressedTexImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, 0, 0);
- expectError(GL_INVALID_ENUM);
- }
- else
- {
- for (int i = 0; i < (int)accepted.size(); i++)
- {
- m_log << TestLog::Section("", "GL_INVALID_ENUM is generated if format is not a supported format returned in GL_COMPRESSED_TEXTURE_FORMATS.");
- m_log << TestLog::Message << "// Using texture format " << tcu::toHex(accepted[i]) << TestLog::EndMessage;
- //glCompressedTexImage2D(GL_TEXTURE_2D, 0, accepted[i], 0, 0, 0, 0, 0);
- //expectError(GL_NO_ERROR);
- glCompressedTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, accepted[i], 0, 0);
- expectError(GL_INVALID_ENUM);
- m_log << TestLog::EndSection;
- }
- }
- });
ES2F_ADD_API_CASE(compressedtexsubimage2d_neg_level_tex2d, "Invalid glCompressedTexSubImage2D() usage",
{
vector<deInt32> supported;
"glClearBufferfi": LogSpec({0: enum("Buffer")}),
"glClearBufferiv": LogSpec({0: enum("Buffer")}),
"glClearBufferuiv": LogSpec({0: enum("Buffer")}),
- "glCompressedTexImage2D": LogSpec({0: enum("TextureTarget"), 2: enum("PixelFormat")}),
- "glCompressedTexSubImage2D": LogSpec({0: enum("TextureTarget"), 6: enum("PixelFormat")}),
+ "glCompressedTexImage2D": LogSpec({0: enum("TextureTarget"), 2: enum("CompressedTexFormat")}),
+ "glCompressedTexSubImage2D": LogSpec({0: enum("TextureTarget"), 6: enum("CompressedTexFormat")}),
"glCopyTexImage1D": LogSpec({0: enum("TextureTarget"), 2: enum("PixelFormat")}),
"glCopyTexImage2D": LogSpec({0: enum("TextureTarget"), 2: enum("PixelFormat")}),
"glCreateShader": LogSpec({0: enum("ShaderType")}),
"COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR",
"COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR",
"COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR",
- "COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR"
+ "COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR",
+
+ # EXT_texture_compression_s3tc
+ "COMPRESSED_RGB_S3TC_DXT1_EXT",
+ "COMPRESSED_RGBA_S3TC_DXT1_EXT",
+ "COMPRESSED_RGBA_S3TC_DXT3_EXT",
+ "COMPRESSED_RGBA_S3TC_DXT5_EXT",
+
+ # IMG_texture_compression_pvrtc
+ "COMPRESSED_RGB_PVRTC_4BPPV1_IMG",
+ "COMPRESSED_RGB_PVRTC_2BPPV1_IMG",
+ "COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",
+ "COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",
]),
# Shader var type
'GL_OES_texture_half_float',
'GL_OES_texture_storage_multisample_2d_array',
'GL_OES_sample_shading',
+ 'GL_EXT_texture_compression_s3tc',
+ 'GL_IMG_texture_compression_pvrtc',
]
def getGLRegistry ():