• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef _VKTSYNCHRONIZATIONOPERATIONRESOURCES_HPP
2 #define _VKTSYNCHRONIZATIONOPERATIONRESOURCES_HPP
3 /*------------------------------------------------------------------------
4  * Vulkan Conformance Tests
5  * ------------------------
6  *
7  * Copyright (c) 2017 The Khronos Group Inc.
8  *
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
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
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.
20  *
21  *//*!
22  * \file
23  * \brief Synchronization operation static data
24  *//*--------------------------------------------------------------------*/
25 
26 #include "tcuDefs.hpp"
27 #include "vkDefs.hpp"
28 #include "tcuVector.hpp"
29 #include "vktSynchronizationOperation.hpp"
30 
31 namespace vkt
32 {
33 namespace synchronization
34 {
35 
36 static const ResourceDescription s_resources[] =
37 {
38 	{ RESOURCE_TYPE_BUFFER,	tcu::IVec4( 0x4000, 0, 0, 0),	vk::VK_IMAGE_TYPE_LAST,	vk::VK_FORMAT_UNDEFINED,			(vk::VkImageAspectFlags)0,			vk::VK_SAMPLE_COUNT_1_BIT },	// 16 KiB (min max UBO range)
39 	{ RESOURCE_TYPE_BUFFER,	tcu::IVec4(0x40000, 0, 0, 0),	vk::VK_IMAGE_TYPE_LAST,	vk::VK_FORMAT_UNDEFINED,			(vk::VkImageAspectFlags)0,			vk::VK_SAMPLE_COUNT_1_BIT },	// 256 KiB
40 
41 	{ RESOURCE_TYPE_IMAGE,	tcu::IVec4(128, 0, 0, 0),		vk::VK_IMAGE_TYPE_1D,	vk::VK_FORMAT_R32_UINT,				vk::VK_IMAGE_ASPECT_COLOR_BIT,		vk::VK_SAMPLE_COUNT_1_BIT },
42 
43 	{ RESOURCE_TYPE_IMAGE,	tcu::IVec4(128, 128, 0, 0),		vk::VK_IMAGE_TYPE_2D,	vk::VK_FORMAT_R8_UNORM,				vk::VK_IMAGE_ASPECT_COLOR_BIT,		vk::VK_SAMPLE_COUNT_1_BIT },
44 	{ RESOURCE_TYPE_IMAGE,	tcu::IVec4(128, 128, 0, 0),		vk::VK_IMAGE_TYPE_2D,	vk::VK_FORMAT_R16_UINT,				vk::VK_IMAGE_ASPECT_COLOR_BIT,		vk::VK_SAMPLE_COUNT_1_BIT },
45 	{ RESOURCE_TYPE_IMAGE,	tcu::IVec4(128, 128, 0, 0),		vk::VK_IMAGE_TYPE_2D,	vk::VK_FORMAT_R8G8B8A8_UNORM,		vk::VK_IMAGE_ASPECT_COLOR_BIT,		vk::VK_SAMPLE_COUNT_1_BIT },
46 	{ RESOURCE_TYPE_IMAGE,	tcu::IVec4(128, 128, 0, 0),		vk::VK_IMAGE_TYPE_2D,	vk::VK_FORMAT_R16G16B16A16_UINT,	vk::VK_IMAGE_ASPECT_COLOR_BIT,		vk::VK_SAMPLE_COUNT_1_BIT },
47 	{ RESOURCE_TYPE_IMAGE,	tcu::IVec4(128, 128, 0, 0),		vk::VK_IMAGE_TYPE_2D,	vk::VK_FORMAT_R32G32B32A32_SFLOAT,	vk::VK_IMAGE_ASPECT_COLOR_BIT,		vk::VK_SAMPLE_COUNT_1_BIT },
48 
49 	{ RESOURCE_TYPE_IMAGE,	tcu::IVec4(64, 64, 8, 0),		vk::VK_IMAGE_TYPE_3D,	vk::VK_FORMAT_R32_SFLOAT,			vk::VK_IMAGE_ASPECT_COLOR_BIT,		vk::VK_SAMPLE_COUNT_1_BIT },
50 
51 	// \note Mixed depth/stencil formats add complexity in image<->buffer transfers (packing), so we just avoid them here
52 	{ RESOURCE_TYPE_IMAGE,	tcu::IVec4(128, 128, 0, 0),		vk::VK_IMAGE_TYPE_2D,	vk::VK_FORMAT_D16_UNORM,			vk::VK_IMAGE_ASPECT_DEPTH_BIT,		vk::VK_SAMPLE_COUNT_1_BIT },
53 	{ RESOURCE_TYPE_IMAGE,	tcu::IVec4(128, 128, 0, 0),		vk::VK_IMAGE_TYPE_2D,	vk::VK_FORMAT_D32_SFLOAT,			vk::VK_IMAGE_ASPECT_DEPTH_BIT,		vk::VK_SAMPLE_COUNT_1_BIT },
54 	{ RESOURCE_TYPE_IMAGE,	tcu::IVec4(128, 128, 0, 0),		vk::VK_IMAGE_TYPE_2D,	vk::VK_FORMAT_S8_UINT,				vk::VK_IMAGE_ASPECT_STENCIL_BIT,	vk::VK_SAMPLE_COUNT_1_BIT },
55 
56 	// \note Special resources, when test case isn't strictly a copy and comparison of some data
57 	{ RESOURCE_TYPE_INDIRECT_BUFFER_DRAW,			tcu::IVec4(sizeof(vk::VkDrawIndirectCommand),        0, 0, 0),	vk::VK_IMAGE_TYPE_LAST, vk::VK_FORMAT_UNDEFINED, (vk::VkImageAspectFlags)0, vk::VK_SAMPLE_COUNT_1_BIT },
58 	{ RESOURCE_TYPE_INDIRECT_BUFFER_DRAW_INDEXED,	tcu::IVec4(sizeof(vk::VkDrawIndexedIndirectCommand), 0, 0, 0),	vk::VK_IMAGE_TYPE_LAST, vk::VK_FORMAT_UNDEFINED, (vk::VkImageAspectFlags)0, vk::VK_SAMPLE_COUNT_1_BIT },
59 	{ RESOURCE_TYPE_INDIRECT_BUFFER_DISPATCH,		tcu::IVec4(sizeof(vk::VkDispatchIndirectCommand),    0, 0, 0),	vk::VK_IMAGE_TYPE_LAST, vk::VK_FORMAT_UNDEFINED, (vk::VkImageAspectFlags)0, vk::VK_SAMPLE_COUNT_1_BIT },
60 	{ RESOURCE_TYPE_INDEX_BUFFER,					tcu::IVec4(sizeof(deUint32) * 5,                     0, 0, 0),	vk::VK_IMAGE_TYPE_LAST, vk::VK_FORMAT_UNDEFINED, (vk::VkImageAspectFlags)0, vk::VK_SAMPLE_COUNT_1_BIT },
61 
62 	// \note Special multisampled image resource needed to test resolve
63 	{ RESOURCE_TYPE_IMAGE,	tcu::IVec4(64, 64, 0, 0),		vk::VK_IMAGE_TYPE_2D,	vk::VK_FORMAT_R32_UINT,				vk::VK_IMAGE_ASPECT_COLOR_BIT,		vk::VK_SAMPLE_COUNT_4_BIT },
64 };
65 
66 } // synchronization
67 } // vkt
68 
69 #endif // _VKTSYNCHRONIZATIONOPERATIONRESOURCES_HPP
70