1 #ifndef _ES3FASTCDECOMPRESSIONCASES_HPP
2 #define _ES3FASTCDECOMPRESSIONCASES_HPP
3 /*-------------------------------------------------------------------------
4 * drawElements Quality Program OpenGL ES 3.0 Module
5 * -------------------------------------------------
7 * Copyright 2014 The Android Open Source Project
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
23 * \brief ASTC decompression tests
24 *//*--------------------------------------------------------------------*/
27 #include "tes3TestCase.hpp"
28 #include "tcuCompressedTexture.hpp"
29 #include "tcuAstcUtil.hpp"
30 #include "deUniquePtr.hpp"
41 namespace ASTCDecompressionCaseInternal
48 // General ASTC block test class.
49 class ASTCBlockCase2D : public TestCase
52 ASTCBlockCase2D (Context& context,
54 const char* description,
55 tcu::astc::BlockTestType testType,
56 tcu::CompressedTexFormat format);
57 ~ASTCBlockCase2D (void);
61 IterateResult iterate (void);
64 ASTCBlockCase2D (const ASTCBlockCase2D& other);
65 ASTCBlockCase2D& operator= (const ASTCBlockCase2D& other);
67 const tcu::astc::BlockTestType m_testType;
68 const tcu::CompressedTexFormat m_format;
69 std::vector<deUint8> m_blockData;
71 int m_numBlocksTested;
72 int m_currentIteration;
74 de::UniquePtr<ASTCDecompressionCaseInternal::ASTCRenderer2D> m_renderer;
77 // For a format with block size (W, H), test with texture sizes {(k*W + a, k*H + b) | 0 <= a < W, 0 <= b < H } .
78 class ASTCBlockSizeRemainderCase2D : public TestCase
81 ASTCBlockSizeRemainderCase2D (Context& context,
83 const char* description,
84 tcu::CompressedTexFormat format);
85 ~ASTCBlockSizeRemainderCase2D (void);
89 IterateResult iterate (void);
98 ASTCBlockSizeRemainderCase2D (const ASTCBlockSizeRemainderCase2D& other);
99 ASTCBlockSizeRemainderCase2D& operator= (const ASTCBlockSizeRemainderCase2D& other);
101 const tcu::CompressedTexFormat m_format;
103 int m_currentIteration;
105 de::UniquePtr<ASTCDecompressionCaseInternal::ASTCRenderer2D> m_renderer;
112 #endif // _ES3FASTCDECOMPRESSIONCASES_HPP