1e5c31af7Sopenharmony_ci#ifndef _GL4CSYNCTESTS_HPP 2e5c31af7Sopenharmony_ci#define _GL4CSYNCTESTS_HPP 3e5c31af7Sopenharmony_ci/*------------------------------------------------------------------------- 4e5c31af7Sopenharmony_ci * OpenGL Conformance Test Suite 5e5c31af7Sopenharmony_ci * ----------------------------- 6e5c31af7Sopenharmony_ci * 7e5c31af7Sopenharmony_ci * Copyright (c) 2015-2016 The Khronos Group Inc. 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 24e5c31af7Sopenharmony_ci */ /*-------------------------------------------------------------------*/ 25e5c31af7Sopenharmony_ci 26e5c31af7Sopenharmony_ci/** 27e5c31af7Sopenharmony_ci * \file gl4cSyncTests.hpp 28e5c31af7Sopenharmony_ci * \brief Declares test classes for synchronization functionality. 29e5c31af7Sopenharmony_ci */ /*-------------------------------------------------------------------*/ 30e5c31af7Sopenharmony_ci 31e5c31af7Sopenharmony_ci/* Includes. */ 32e5c31af7Sopenharmony_ci 33e5c31af7Sopenharmony_ci#include "glcTestCase.hpp" 34e5c31af7Sopenharmony_ci#include "glwDefs.hpp" 35e5c31af7Sopenharmony_ci#include "tcuDefs.hpp" 36e5c31af7Sopenharmony_ci 37e5c31af7Sopenharmony_cinamespace gl4cts 38e5c31af7Sopenharmony_ci{ 39e5c31af7Sopenharmony_cinamespace Sync 40e5c31af7Sopenharmony_ci{ 41e5c31af7Sopenharmony_ci/** @class Tests 42e5c31af7Sopenharmony_ci * 43e5c31af7Sopenharmony_ci * @brief Direct State Access test group. 44e5c31af7Sopenharmony_ci */ 45e5c31af7Sopenharmony_ciclass Tests : public deqp::TestCaseGroup 46e5c31af7Sopenharmony_ci{ 47e5c31af7Sopenharmony_cipublic: 48e5c31af7Sopenharmony_ci /* Public member functions */ 49e5c31af7Sopenharmony_ci Tests(deqp::Context& context); 50e5c31af7Sopenharmony_ci 51e5c31af7Sopenharmony_ci void init(); 52e5c31af7Sopenharmony_ci 53e5c31af7Sopenharmony_ciprivate: 54e5c31af7Sopenharmony_ci /* Private member functions */ 55e5c31af7Sopenharmony_ci Tests(const Tests& other); 56e5c31af7Sopenharmony_ci Tests& operator=(const Tests& other); 57e5c31af7Sopenharmony_ci}; 58e5c31af7Sopenharmony_ci/* Tests class */ 59e5c31af7Sopenharmony_ci 60e5c31af7Sopenharmony_ci/** @class SyncFlushCommandsTest 61e5c31af7Sopenharmony_ci * 62e5c31af7Sopenharmony_ci * Description: 63e5c31af7Sopenharmony_ci * 64e5c31af7Sopenharmony_ci * This test verifies that ClientWaitSync called with SYNC_FLUSH_COMMANDS_BIT flag 65e5c31af7Sopenharmony_ci * behaves like Flush was inserted immediately after the creation of sync. This shall 66e5c31af7Sopenharmony_ci * happen in finite time (OpenGL 4.5 Core Profile, Chapter 4.1.2). 67e5c31af7Sopenharmony_ci * 68e5c31af7Sopenharmony_ci * Steps: 69e5c31af7Sopenharmony_ci * 70e5c31af7Sopenharmony_ci * Prepare first buffer with reference data. 71e5c31af7Sopenharmony_ci * 72e5c31af7Sopenharmony_ci * Create second buffer with null data and persistent coherent storage. 73e5c31af7Sopenharmony_ci * 74e5c31af7Sopenharmony_ci * Map second buffer for read with persistent and coherent flags. 75e5c31af7Sopenharmony_ci * 76e5c31af7Sopenharmony_ci * Copy first buffer to second buffer using Copy*BufferSubData function. 77e5c31af7Sopenharmony_ci * 78e5c31af7Sopenharmony_ci * Create synchronization object using FenceSync. 79e5c31af7Sopenharmony_ci * 80e5c31af7Sopenharmony_ci * Use ClientWaitSync, with SYNC_FLUSH_COMMANDS_BIT flag and 16 seconds timeout, to 81e5c31af7Sopenharmony_ci * wait for synchronization being done. Check for errors - expect NO_ERROR. Expect 82e5c31af7Sopenharmony_ci * no timeout, but if it happen return test timeout result with indication that 83e5c31af7Sopenharmony_ci * tests possibly fails due to not returning after finite time. 84e5c31af7Sopenharmony_ci * 85e5c31af7Sopenharmony_ci * If ClientWaitSync succeeded, compare queried data with the reference. Expect 86e5c31af7Sopenharmony_ci * equality. 87e5c31af7Sopenharmony_ci * 88e5c31af7Sopenharmony_ci * Unmap second buffer. 89e5c31af7Sopenharmony_ci */ 90e5c31af7Sopenharmony_ciclass FlushCommandsTest : public deqp::TestCase 91e5c31af7Sopenharmony_ci{ 92e5c31af7Sopenharmony_cipublic: 93e5c31af7Sopenharmony_ci /* Public member functions */ 94e5c31af7Sopenharmony_ci FlushCommandsTest(deqp::Context& context); 95e5c31af7Sopenharmony_ci 96e5c31af7Sopenharmony_ci virtual tcu::TestNode::IterateResult iterate(); 97e5c31af7Sopenharmony_ci 98e5c31af7Sopenharmony_ciprivate: 99e5c31af7Sopenharmony_ci /* Private member functions */ 100e5c31af7Sopenharmony_ci FlushCommandsTest(const FlushCommandsTest& other); 101e5c31af7Sopenharmony_ci FlushCommandsTest& operator=(const FlushCommandsTest& other); 102e5c31af7Sopenharmony_ci}; 103e5c31af7Sopenharmony_ci 104e5c31af7Sopenharmony_ci/* FlushCommandsTest class */ 105e5c31af7Sopenharmony_ci} /* Sync namespace */ 106e5c31af7Sopenharmony_ci} /* gl4cts */ 107e5c31af7Sopenharmony_ci 108e5c31af7Sopenharmony_ci#endif // _GL4CSYNCTESTS_HPP 109