switch (target)
{
case GL_TEXTURE_2D:
- gl.compressedTexImage2D(target, 0, GL_COMPRESSED_RGB8_ETC2, s_texture_data_width, s_texture_data_height, 0,
+ gl.compressedTexImage2D(target, 0, GL_COMPRESSED_RGBA_BPTC_UNORM, s_texture_data_width, s_texture_data_height, 0,
s_texture_data_compressed_size / s_texture_data_depth, s_texture_data_compressed);
GLU_EXPECT_NO_ERROR(gl.getError(), "glCompressedTexImage2D call failed.");
break;
case GL_TEXTURE_CUBE_MAP:
gl.compressedTexImage2D(
- GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0, GL_COMPRESSED_RGB8_ETC2, s_texture_data_width, s_texture_data_height,
+ GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0, GL_COMPRESSED_RGBA_BPTC_UNORM, s_texture_data_width, s_texture_data_height,
0, s_texture_data_compressed_size / s_texture_data_depth,
&s_texture_data_compressed[0 * s_texture_data_compressed_size / s_texture_data_depth]);
gl.compressedTexImage2D(
- GL_TEXTURE_CUBE_MAP_NEGATIVE_X, 0, GL_COMPRESSED_RGB8_ETC2, s_texture_data_width, s_texture_data_height,
+ GL_TEXTURE_CUBE_MAP_NEGATIVE_X, 0, GL_COMPRESSED_RGBA_BPTC_UNORM, s_texture_data_width, s_texture_data_height,
0, s_texture_data_compressed_size / s_texture_data_depth,
&s_texture_data_compressed[1 * s_texture_data_compressed_size / s_texture_data_depth]);
gl.compressedTexImage2D(
- GL_TEXTURE_CUBE_MAP_POSITIVE_Y, 0, GL_COMPRESSED_RGB8_ETC2, s_texture_data_width, s_texture_data_height,
+ GL_TEXTURE_CUBE_MAP_POSITIVE_Y, 0, GL_COMPRESSED_RGBA_BPTC_UNORM, s_texture_data_width, s_texture_data_height,
0, s_texture_data_compressed_size / s_texture_data_depth,
&s_texture_data_compressed[2 * s_texture_data_compressed_size / s_texture_data_depth]);
gl.compressedTexImage2D(
- GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, 0, GL_COMPRESSED_RGB8_ETC2, s_texture_data_width, s_texture_data_height,
+ GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, 0, GL_COMPRESSED_RGBA_BPTC_UNORM, s_texture_data_width, s_texture_data_height,
0, s_texture_data_compressed_size / s_texture_data_depth,
&s_texture_data_compressed[3 * s_texture_data_compressed_size / s_texture_data_depth]);
gl.compressedTexImage2D(
- GL_TEXTURE_CUBE_MAP_POSITIVE_Z, 0, GL_COMPRESSED_RGB8_ETC2, s_texture_data_width, s_texture_data_height,
+ GL_TEXTURE_CUBE_MAP_POSITIVE_Z, 0, GL_COMPRESSED_RGBA_BPTC_UNORM, s_texture_data_width, s_texture_data_height,
0, s_texture_data_compressed_size / s_texture_data_depth,
&s_texture_data_compressed[4 * s_texture_data_compressed_size / s_texture_data_depth]);
gl.compressedTexImage2D(
- GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, 0, GL_COMPRESSED_RGB8_ETC2, s_texture_data_width, s_texture_data_height,
+ GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, 0, GL_COMPRESSED_RGBA_BPTC_UNORM, s_texture_data_width, s_texture_data_height,
0, s_texture_data_compressed_size / s_texture_data_depth,
&s_texture_data_compressed[5 * s_texture_data_compressed_size / s_texture_data_depth]);
GLU_EXPECT_NO_ERROR(gl.getError(), "glCompressedTexImage2D call failed.");
break;
case GL_TEXTURE_CUBE_MAP_ARRAY:
- gl.compressedTexImage3D(target, 0, GL_COMPRESSED_RGB8_ETC2, s_texture_data_width, s_texture_data_height, 6,
+ gl.compressedTexImage3D(target, 0, GL_COMPRESSED_RGBA_BPTC_UNORM, s_texture_data_width, s_texture_data_height, 6,
0, s_texture_data_compressed_size / s_texture_data_depth * 6,
s_texture_data_compressed);
GLU_EXPECT_NO_ERROR(gl.getError(), "glCompressedTexImage3D call failed.");
break;
case GL_TEXTURE_2D_ARRAY:
- gl.compressedTexImage3D(target, 0, GL_COMPRESSED_RGB8_ETC2, s_texture_data_width, s_texture_data_height,
+ gl.compressedTexImage3D(target, 0, GL_COMPRESSED_RGBA_BPTC_UNORM, s_texture_data_width, s_texture_data_height,
s_texture_data_depth, 0, s_texture_data_compressed_size, s_texture_data_compressed);
GLU_EXPECT_NO_ERROR(gl.getError(), "glCompressedTexImage3D call failed.");
break;
if (is_compressed)
{
- number_of_components = 8; /* 64 bit block of 4x4 compressed pixels. */
+ number_of_components = 16; /* 128 bit block of 4x4 compressed pixels. */
}
else
{
/** ETC2 8x8x8(layers) pixels in size source texture for testing GetCompressedTextureSubImage. */
const glw::GLubyte gl4cts::GetTextureSubImage::Functional::s_texture_data_compressed[] = {
/* Layer 0 */
- 0x80, 0x80, 0x4, 0x2, 0x1, 0x0, 0x10, 0x0, 0x80, 0x81, 0x4, 0x2, 0x1, 0xf8, 0x10, 0x20, 0x81, 0x80, 0x4, 0x2, 0x81,
- 0x0, 0x1f, 0xc0, 0x81, 0x81, 0x4, 0x2, 0x81, 0xf8, 0x1f, 0xe0,
+ 0x80, 0x80, 0x4, 0x2, 0x1, 0x0, 0x10, 0x0, 0x80, 0x81, 0x4, 0x2, 0x1, 0xf8, 0x10, 0x20,
+ 0x81, 0x80, 0x4, 0x2, 0x81, 0x0, 0x1f, 0xc0, 0x81, 0x81, 0x4, 0x2, 0x81, 0xf8, 0x1f, 0xe0,
+ 0x80, 0x80, 0x5, 0x2, 0x1, 0x0, 0x10, 0x0, 0x80, 0x81, 0x5, 0x2, 0x1, 0xf8, 0x10, 0x20,
+ 0x81, 0x80, 0x5, 0x2, 0x81, 0x0, 0x1f, 0xc0, 0x81, 0x81, 0x5, 0x2, 0x81, 0xf8, 0x1f, 0xe0,
/* Layer 1 */
- 0x90, 0x80, 0x4, 0x12, 0x1, 0x1, 0x10, 0x0, 0x90, 0x81, 0x4, 0x12, 0x1, 0xf9, 0x10, 0x20, 0x91, 0x80, 0x4, 0x12,
- 0x81, 0x1, 0x1f, 0xc0, 0x91, 0x81, 0x4, 0x12, 0x81, 0xf9, 0x1f, 0xe0,
+ 0x90, 0x80, 0x4, 0x12, 0x1, 0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