1e5c31af7Sopenharmony_ci#ifndef _ES3FASTCDECOMPRESSIONCASES_HPP 2e5c31af7Sopenharmony_ci#define _ES3FASTCDECOMPRESSIONCASES_HPP 3e5c31af7Sopenharmony_ci/*------------------------------------------------------------------------- 4e5c31af7Sopenharmony_ci * drawElements Quality Program OpenGL ES 3.0 Module 5e5c31af7Sopenharmony_ci * ------------------------------------------------- 6e5c31af7Sopenharmony_ci * 7e5c31af7Sopenharmony_ci * Copyright 2014 The Android Open Source Project 8e5c31af7Sopenharmony_ci * 9e5c31af7Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 10e5c31af7Sopenharmony_ci * you may not use this file except in compliance with the License. 11e5c31af7Sopenharmony_ci * You may obtain a copy of the License at 12e5c31af7Sopenharmony_ci * 13e5c31af7Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 14e5c31af7Sopenharmony_ci * 15e5c31af7Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 16e5c31af7Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 17e5c31af7Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18e5c31af7Sopenharmony_ci * See the License for the specific language governing permissions and 19e5c31af7Sopenharmony_ci * limitations under the License. 20e5c31af7Sopenharmony_ci * 21e5c31af7Sopenharmony_ci *//*! 22e5c31af7Sopenharmony_ci * \file 23e5c31af7Sopenharmony_ci * \brief ASTC decompression tests 24e5c31af7Sopenharmony_ci *//*--------------------------------------------------------------------*/ 25e5c31af7Sopenharmony_ci 26e5c31af7Sopenharmony_ci#include "deDefs.h" 27e5c31af7Sopenharmony_ci#include "tes3TestCase.hpp" 28e5c31af7Sopenharmony_ci#include "tcuCompressedTexture.hpp" 29e5c31af7Sopenharmony_ci#include "tcuAstcUtil.hpp" 30e5c31af7Sopenharmony_ci#include "deUniquePtr.hpp" 31e5c31af7Sopenharmony_ci 32e5c31af7Sopenharmony_ci#include <vector> 33e5c31af7Sopenharmony_ci 34e5c31af7Sopenharmony_cinamespace deqp 35e5c31af7Sopenharmony_ci{ 36e5c31af7Sopenharmony_cinamespace gles3 37e5c31af7Sopenharmony_ci{ 38e5c31af7Sopenharmony_cinamespace Functional 39e5c31af7Sopenharmony_ci{ 40e5c31af7Sopenharmony_ci 41e5c31af7Sopenharmony_cinamespace ASTCDecompressionCaseInternal 42e5c31af7Sopenharmony_ci{ 43e5c31af7Sopenharmony_ci 44e5c31af7Sopenharmony_ciclass ASTCRenderer2D; 45e5c31af7Sopenharmony_ci 46e5c31af7Sopenharmony_ci} 47e5c31af7Sopenharmony_ci 48e5c31af7Sopenharmony_ci// General ASTC block test class. 49e5c31af7Sopenharmony_ciclass ASTCBlockCase2D : public TestCase 50e5c31af7Sopenharmony_ci{ 51e5c31af7Sopenharmony_cipublic: 52e5c31af7Sopenharmony_ci ASTCBlockCase2D (Context& context, 53e5c31af7Sopenharmony_ci const char* name, 54e5c31af7Sopenharmony_ci const char* description, 55e5c31af7Sopenharmony_ci tcu::astc::BlockTestType testType, 56e5c31af7Sopenharmony_ci tcu::CompressedTexFormat format); 57e5c31af7Sopenharmony_ci ~ASTCBlockCase2D (void); 58e5c31af7Sopenharmony_ci 59e5c31af7Sopenharmony_ci void init (void); 60e5c31af7Sopenharmony_ci void deinit (void); 61e5c31af7Sopenharmony_ci IterateResult iterate (void); 62e5c31af7Sopenharmony_ci 63e5c31af7Sopenharmony_ciprivate: 64e5c31af7Sopenharmony_ci ASTCBlockCase2D (const ASTCBlockCase2D& other); 65e5c31af7Sopenharmony_ci ASTCBlockCase2D& operator= (const ASTCBlockCase2D& other); 66e5c31af7Sopenharmony_ci 67e5c31af7Sopenharmony_ci const tcu::astc::BlockTestType m_testType; 68e5c31af7Sopenharmony_ci const tcu::CompressedTexFormat m_format; 69e5c31af7Sopenharmony_ci std::vector<deUint8> m_blockData; 70e5c31af7Sopenharmony_ci 71e5c31af7Sopenharmony_ci int m_numBlocksTested; 72e5c31af7Sopenharmony_ci int m_currentIteration; 73e5c31af7Sopenharmony_ci 74e5c31af7Sopenharmony_ci de::UniquePtr<ASTCDecompressionCaseInternal::ASTCRenderer2D> m_renderer; 75e5c31af7Sopenharmony_ci}; 76e5c31af7Sopenharmony_ci 77e5c31af7Sopenharmony_ci// For a format with block size (W, H), test with texture sizes {(k*W + a, k*H + b) | 0 <= a < W, 0 <= b < H } . 78e5c31af7Sopenharmony_ciclass ASTCBlockSizeRemainderCase2D : public TestCase 79e5c31af7Sopenharmony_ci{ 80e5c31af7Sopenharmony_cipublic: 81e5c31af7Sopenharmony_ci ASTCBlockSizeRemainderCase2D (Context& context, 82e5c31af7Sopenharmony_ci const char* name, 83e5c31af7Sopenharmony_ci const char* description, 84e5c31af7Sopenharmony_ci tcu::CompressedTexFormat format); 85e5c31af7Sopenharmony_ci ~ASTCBlockSizeRemainderCase2D (void); 86e5c31af7Sopenharmony_ci 87e5c31af7Sopenharmony_ci void init (void); 88e5c31af7Sopenharmony_ci void deinit (void); 89e5c31af7Sopenharmony_ci IterateResult iterate (void); 90e5c31af7Sopenharmony_ci 91e5c31af7Sopenharmony_ciprivate: 92e5c31af7Sopenharmony_ci enum 93e5c31af7Sopenharmony_ci { 94e5c31af7Sopenharmony_ci MAX_NUM_BLOCKS_X = 5, 95e5c31af7Sopenharmony_ci MAX_NUM_BLOCKS_Y = 5 96e5c31af7Sopenharmony_ci }; 97e5c31af7Sopenharmony_ci 98e5c31af7Sopenharmony_ci ASTCBlockSizeRemainderCase2D (const ASTCBlockSizeRemainderCase2D& other); 99e5c31af7Sopenharmony_ci ASTCBlockSizeRemainderCase2D& operator= (const ASTCBlockSizeRemainderCase2D& other); 100e5c31af7Sopenharmony_ci 101e5c31af7Sopenharmony_ci const tcu::CompressedTexFormat m_format; 102e5c31af7Sopenharmony_ci 103e5c31af7Sopenharmony_ci int m_currentIteration; 104e5c31af7Sopenharmony_ci 105e5c31af7Sopenharmony_ci de::UniquePtr<ASTCDecompressionCaseInternal::ASTCRenderer2D> m_renderer; 106e5c31af7Sopenharmony_ci}; 107e5c31af7Sopenharmony_ci 108e5c31af7Sopenharmony_ci} // Functional 109e5c31af7Sopenharmony_ci} // gles3 110e5c31af7Sopenharmony_ci} // deqp 111e5c31af7Sopenharmony_ci 112e5c31af7Sopenharmony_ci#endif // _ES3FASTCDECOMPRESSIONCASES_HPP 113