Browse Source

Test: make the tests compile again on old GCCs.

pull/203/merge
Vladimír Vondruš 9 years ago
parent
commit
ec4b177e1b
  1. 8
      src/Magnum/Test/CubeMapTextureArrayGLTest.cpp
  2. 4
      src/Magnum/Test/CubeMapTextureGLTest.cpp
  3. 2
      src/Magnum/Test/RectangleTextureGLTest.cpp
  4. 7
      src/Magnum/Test/TextureArrayGLTest.cpp
  5. 14
      src/Magnum/Test/TextureGLTest.cpp

8
src/Magnum/Test/CubeMapTextureArrayGLTest.cpp

@ -119,7 +119,7 @@ namespace {
Containers::arrayView(Data).suffix(16), 0},
{"skip Z",
Containers::arrayView(Data).suffix(16), PixelStorage{}.setSkip({0, 0, 1}),
Data, 16}
Containers::arrayView(Data), 16}
};
/* Just 4x4 0x00 - 0x3f compressed using RGBA DXT3 by the driver, repeated
@ -175,7 +175,7 @@ namespace {
.setCompressedBlockSize({4, 4, 1})
.setCompressedBlockDataSize(16)
.setSkip({0, 0, 4}),
CompressedData, 16*4}
Containers::arrayView(CompressedData), 16*4}
#endif
};
@ -208,7 +208,7 @@ namespace {
Containers::arrayView(SubData).suffix(16), 0},
{"skip Z",
Containers::arrayView(SubData).suffix(16), PixelStorage{}.setSkip({0, 0, 1}),
SubData, 16}
Containers::arrayView(SubData), 16}
};
/* Just 4x4x4 0x00 - 0xff compressed using RGBA DXT3 by the driver */
@ -258,7 +258,7 @@ namespace {
.setCompressedBlockSize({4, 4, 1})
.setCompressedBlockDataSize(16)
.setSkip({0, 0, 4}),
CompressedSubData, 16*4}
Containers::arrayView(CompressedSubData), 16*4}
#endif
};
}

4
src/Magnum/Test/CubeMapTextureGLTest.cpp

@ -136,7 +136,7 @@ namespace {
#if !defined(MAGNUM_TARGET_GLES2) || !defined(MAGNUM_TARGET_WEBGL)
{"skip Y",
Containers::arrayView(Data).suffix(8), PixelStorage{}.setSkip({0, 1, 0}),
Data, 8}
Containers::arrayView(Data), 8}
#endif
};
@ -177,7 +177,7 @@ namespace {
.setCompressedBlockSize({4, 4, 1})
.setCompressedBlockDataSize(16)
.setSkip({0, 4, 0}),
CompressedData, 16}
Containers::arrayView(CompressedData), 16}
#endif
};

2
src/Magnum/Test/RectangleTextureGLTest.cpp

@ -96,7 +96,7 @@ namespace {
#if !defined(MAGNUM_TARGET_GLES2) || !defined(MAGNUM_TARGET_WEBGL)
{"skip Y",
Containers::arrayView(Data).suffix(8), PixelStorage{}.setSkip({0, 1, 0}),
Data, 8}
Containers::arrayView(Data), 8}
#endif
};
}

7
src/Magnum/Test/TextureArrayGLTest.cpp

@ -170,7 +170,7 @@ namespace {
Containers::arrayView(Data1D).suffix(8), 0},
{"skip Y",
Containers::arrayView(Data1D).suffix(8), PixelStorage{}.setSkip({0, 1, 0}),
Data1D, 8}};
Containers::arrayView(Data1D), 8}};
#endif
constexpr UnsignedByte Data2D[]{
@ -196,7 +196,7 @@ namespace {
Containers::arrayView(Data2D).suffix(16), 0},
{"skip Z",
Containers::arrayView(Data2D).suffix(16), PixelStorage{}.setSkip({0, 0, 1}),
Data2D, 16}};
Containers::arrayView(Data2D), 16}};
/* Just 4x4x3 0x00 - 0x7f compressed using RGBA DXT3 by the driver */
constexpr UnsignedByte CompressedData2D[]{
@ -237,7 +237,8 @@ namespace {
CompressedPixelStorage{}
.setCompressedBlockSize({4, 4, 1})
.setCompressedBlockDataSize(16)
.setSkip({0, 0, 1}), CompressedData2D, 16}
.setSkip({0, 0, 1}),
Containers::arrayView(CompressedData2D), 16}
#endif
};

14
src/Magnum/Test/TextureGLTest.cpp

@ -230,7 +230,7 @@ namespace {
Containers::arrayView(Data1D).suffix(4), 0},
{"skip X",
Containers::arrayView(Data1D).suffix(4), PixelStorage{}.setSkip({1, 0, 0}),
Data1D, 4}};
Containers::arrayView(Data1D), 4}};
#endif
constexpr UnsignedByte Data2D[]{
@ -260,7 +260,7 @@ namespace {
#if !defined(MAGNUM_TARGET_GLES2) || !defined(MAGNUM_TARGET_WEBGL)
{"skip Y",
Containers::arrayView(Data2D).suffix(8), PixelStorage{}.setSkip({0, 1, 0}),
Data2D, 8}
Containers::arrayView(Data2D), 8}
#endif
};
@ -301,7 +301,8 @@ namespace {
CompressedPixelStorage{}
.setCompressedBlockSize({4, 4, 1})
.setCompressedBlockDataSize(16)
.setSkip({0, 4, 0}), CompressedData2D, 16}
.setSkip({0, 4, 0}),
Containers::arrayView(CompressedData2D), 16}
#endif
};
@ -336,7 +337,7 @@ namespace {
#if !defined(MAGNUM_TARGET_GLES2) || !defined(MAGNUM_TARGET_WEBGL)
{"skip Z",
Containers::arrayView(Data3D).suffix(16), PixelStorage{}.setSkip({0, 0, 1}),
Data3D, 16}
Containers::arrayView(Data3D), 16}
#endif
};
@ -380,14 +381,15 @@ namespace {
#ifndef MAGNUM_TARGET_GLES
{},
#endif
Containers::arrayView(CompressedData3D).suffix(16*4), {}},
Containers::arrayView(CompressedData3D).suffix(16*4), 0},
#ifndef MAGNUM_TARGET_GLES
{"skip Z",
Containers::arrayView(CompressedData3D).suffix(16*4),
CompressedPixelStorage{}
.setCompressedBlockSize({4, 4, 4})
.setCompressedBlockDataSize(16*4)
.setSkip({0, 0, 4}), CompressedData3D, 16*4}
.setSkip({0, 0, 4}),
Containers::arrayView(CompressedData3D), 16*4}
#endif
};
}

Loading…
Cancel
Save