1 #ifndef _VKTPIPELINEVERTEXUTIL_HPP
2 #define _VKTPIPELINEVERTEXUTIL_HPP
3 /*------------------------------------------------------------------------
4 * Vulkan Conformance Tests
5 * ------------------------
7 * Copyright (c) 2015 The Khronos Group Inc.
8 * Copyright (c) 2015 Imagination Technologies Ltd.
10 * Licensed under the Apache License, Version 2.0 (the "License");
11 * you may not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
14 * http://www.apache.org/licenses/LICENSE-2.0
16 * Unless required by applicable law or agreed to in writing, software
17 * distributed under the License is distributed on an "AS IS" BASIS,
18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 * See the License for the specific language governing permissions and
20 * limitations under the License.
24 * \brief Utilities for vertex buffers.
25 *//*--------------------------------------------------------------------*/
28 #include "tcuDefs.hpp"
29 #include "tcuVectorUtil.hpp"
50 deUint32 getVertexFormatSize (vk::VkFormat format);
51 deUint32 getVertexFormatComponentCount (vk::VkFormat format);
52 deUint32 getVertexFormatComponentSize (vk::VkFormat format);
53 bool isVertexFormatComponentOrderBGR (vk::VkFormat format);
54 bool isVertexFormatSint (vk::VkFormat format);
55 bool isVertexFormatUint (vk::VkFormat format);
56 bool isVertexFormatSfloat (vk::VkFormat format);
57 bool isVertexFormatUfloat (vk::VkFormat format);
58 bool isVertexFormatUnorm (vk::VkFormat format);
59 bool isVertexFormatSnorm (vk::VkFormat format);
60 bool isVertexFormatSRGB (vk::VkFormat format);
61 bool isVertexFormatSscaled (vk::VkFormat format);
62 bool isVertexFormatUscaled (vk::VkFormat format);
63 bool isVertexFormatDouble (vk::VkFormat format);
65 /*! \brief Creates a pattern of 4 overlapping quads.
67 * The quads are alined along the plane Z = 0, with X,Y taking values between -1 and 1.
68 * Each quad covers one of the quadrants of the scene and partially extends to the other 3 quadrants.
69 * The triangles of each quad have different winding orders (CW/CCW).
71 std::vector<Vertex4RGBA> createOverlappingQuads (void);
73 std::vector<Vertex4Tex4> createFullscreenQuad (void);
74 std::vector<Vertex4Tex4> createQuadMosaic (int rows, int columns);
75 std::vector<Vertex4Tex4> createQuadMosaicCube (void);
76 std::vector<Vertex4Tex4> createQuadMosaicCubeArray (int faceArrayIndices[6]);
78 std::vector<Vertex4Tex4> createTestQuadMosaic (vk::VkImageViewType viewType);
83 #endif // _VKTPIPELINEVERTEXUTIL_HPP