@ -132,8 +132,17 @@ std::tuple<Containers::Array<Float>, Float, Float> calculateImageDelta(const Pix
Containers : : arrayCast < 2 , const Math : : Vector < size , T > > ( actualPixels ) , \
expected . pixels < Math : : Vector < size , T > > ( ) , delta ) ; \
break ;
# define _f(first, second, third, fourth, size, T) \
case PixelFormat : : first : \
case PixelFormat : : second : \
case PixelFormat : : third : \
case PixelFormat : : fourth : \
max = calculateImageDelta < size , T > ( \
Containers : : arrayCast < 2 , const Math : : Vector < size , T > > ( actualPixels ) , \
expected . pixels < Math : : Vector < size , T > > ( ) , delta ) ; \
break ;
/* LCOV_EXCL_START */
_e ( R8Unorm , R8Srgb , R8UI , 1 , UnsignedByte )
_f ( R8Unorm , R8Srgb , R8UI , Stencil 8UI , 1 , UnsignedByte )
_e ( RG8Unorm , RG8Srgb , RG8UI , 2 , UnsignedByte )
_e ( RGB8Unorm , RGB8Srgb , RGB8UI , 3 , UnsignedByte )
_e ( RGBA8Unorm , RGBA8Srgb , RGBA8UI , 4 , UnsignedByte )
@ -141,7 +150,7 @@ std::tuple<Containers::Array<Float>, Float, Float> calculateImageDelta(const Pix
_d ( RG8Snorm , RG8I , 2 , Byte )
_d ( RGB8Snorm , RGB8I , 3 , Byte )
_d ( RGBA8Snorm , RGBA8I , 4 , Byte )
_d ( R16Unorm , R16UI , 1 , UnsignedShort )
_e ( R16Unorm , R16UI , Depth16Unorm , 1 , UnsignedShort )
_d ( RG16Unorm , RG16UI , 2 , UnsignedShort )
_d ( RGB16Unorm , RGB16UI , 3 , UnsignedShort )
_d ( RGBA16Unorm , RGBA16UI , 4 , UnsignedShort )
@ -149,7 +158,7 @@ std::tuple<Containers::Array<Float>, Float, Float> calculateImageDelta(const Pix
_d ( RG16Snorm , RG16I , 2 , Short )
_d ( RGB16Snorm , RGB16I , 3 , Short )
_d ( RGBA16Snorm , RGBA16I , 4 , Short )
_c ( R32UI , 1 , UnsignedInt )
_d ( R32UI , Depth24Unorm , 1 , UnsignedInt )
_c ( RG32UI , 2 , UnsignedInt )
_c ( RGB32UI , 3 , UnsignedInt )
_c ( RGBA32UI , 4 , UnsignedInt )
@ -157,11 +166,12 @@ std::tuple<Containers::Array<Float>, Float, Float> calculateImageDelta(const Pix
_c ( RG32I , 2 , Int )
_c ( RGB32I , 3 , Int )
_c ( RGBA32I , 4 , Int )
_c ( R 32F , 1 , Float )
_d ( R32F , Depth 32F , 1 , Float )
_c ( RG32F , 2 , Float )
_c ( RGB32F , 3 , Float )
_c ( RGBA32F , 4 , Float )
/* LCOV_EXCL_STOP */
# undef _f
# undef _e
# undef _d
# undef _c
@ -171,6 +181,10 @@ std::tuple<Containers::Array<Float>, Float, Float> calculateImageDelta(const Pix
case PixelFormat : : RGB16F :
case PixelFormat : : RGBA16F :
CORRADE_ASSERT_UNREACHABLE ( " DebugTools::CompareImage: half-float formats are not supported yet " , { } ) ;
case PixelFormat : : Depth16UnormStencil8UI :
case PixelFormat : : Depth24UnormStencil8UI :
case PixelFormat : : Depth32FStencil8UI :
CORRADE_ASSERT_UNREACHABLE ( " DebugTools::CompareImage: packed depth/stencil formats are not supported yet " , { } ) ;
}
# ifdef __GNUC__
# pragma GCC diagnostic pop
@ -261,11 +275,18 @@ void printPixelAt(Debug& out, const Containers::StridedArrayView3D<const char>&
# define _e(first, second, third, size, T) \
case PixelFormat : : first : \
case PixelFormat : : second : \
case PixelFormat : : third : \
case PixelFormat : : third : \
out < < * reinterpret_cast < const Math : : Vector < size , T > * > ( pixel ) ; \
break ;
# define _f(first, second, third, fourth, size, T) \
case PixelFormat : : first : \
case PixelFormat : : second : \
case PixelFormat : : third : \
case PixelFormat : : fourth : \
out < < * reinterpret_cast < const Math : : Vector < size , T > * > ( pixel ) ; \
break ;
/* LCOV_EXCL_START */
_e ( R8Unorm , R8Srgb , R8UI , 1 , UnsignedByte )
_f ( R8Unorm , R8Srgb , R8UI , Stencil 8UI , 1 , UnsignedByte )
_e ( RG8Unorm , RG8Srgb , RG8UI , 2 , UnsignedByte )
_c ( RGB8UI , 3 , UnsignedByte )
_c ( RGBA8UI , 4 , UnsignedByte )
@ -274,7 +295,7 @@ void printPixelAt(Debug& out, const Containers::StridedArrayView3D<const char>&
_d ( RG8Snorm , RG8I , 2 , Byte )
_d ( RGB8Snorm , RGB8I , 3 , Byte )
_d ( RGBA8Snorm , RGBA8I , 4 , Byte )
_d ( R16Unorm , R16UI , 1 , UnsignedShort )
_e ( R16Unorm , R16UI , Depth16Unorm , 1 , UnsignedShort )
_d ( RG16Unorm , RG16UI , 2 , UnsignedShort )
_d ( RGB16Unorm , RGB16UI , 3 , UnsignedShort )
_d ( RGBA16Unorm , RGBA16UI , 4 , UnsignedShort )
@ -282,7 +303,7 @@ void printPixelAt(Debug& out, const Containers::StridedArrayView3D<const char>&
_d ( RG16Snorm , RG16I , 2 , Short )
_d ( RGB16Snorm , RGB16I , 3 , Short )
_d ( RGBA16Snorm , RGBA16I , 4 , Short )
_c ( R32UI , 1 , UnsignedInt )
_d ( R32UI , Depth24Unorm , 1 , UnsignedInt )
_c ( RG32UI , 2 , UnsignedInt )
_c ( RGB32UI , 3 , UnsignedInt )
_c ( RGBA32UI , 4 , UnsignedInt )
@ -290,11 +311,12 @@ void printPixelAt(Debug& out, const Containers::StridedArrayView3D<const char>&
_c ( RG32I , 2 , Int )
_c ( RGB32I , 3 , Int )
_c ( RGBA32I , 4 , Int )
_c ( R 32F , 1 , Float )
_d ( R32F , Depth 32F , 1 , Float )
_c ( RG32F , 2 , Float )
_c ( RGB32F , 3 , Float )
_c ( RGBA32F , 4 , Float )
/* LCOV_EXCL_STOP */
# undef _f
# undef _e
# undef _d
# undef _c
@ -313,6 +335,9 @@ void printPixelAt(Debug& out, const Containers::StridedArrayView3D<const char>&
case PixelFormat : : RG16F :
case PixelFormat : : RGB16F :
case PixelFormat : : RGBA16F :
case PixelFormat : : Depth16UnormStencil8UI :
case PixelFormat : : Depth24UnormStencil8UI :
case PixelFormat : : Depth32FStencil8UI :
/* Already handled by a printing assert before */
CORRADE_INTERNAL_ASSERT_UNREACHABLE ( ) ; /* LCOV_EXCL_LINE */
}