1 #ifndef _RRPRIMITIVEPACKET_HPP
2 #define _RRPRIMITIVEPACKET_HPP
3 /*-------------------------------------------------------------------------
4 * drawElements Quality Program Reference Renderer
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 Primitive packet
24 *//*--------------------------------------------------------------------*/
27 #include "rrGenericVector.hpp"
35 class VertexPacketAllocator;
37 /*--------------------------------------------------------------------*//*!
38 * \brief Geometry packet
40 * Geometry packet contains inputs for geometry shading.
41 *//*--------------------------------------------------------------------*/
42 struct PrimitivePacket
45 const VertexPacket* vertices[6];
46 } DE_WARN_UNUSED_TYPE;
48 /*--------------------------------------------------------------------*//*!
49 * \brief Geometry emitter
51 * Geometry emitter handles outputting of new vertices from geometry shader
52 *//*--------------------------------------------------------------------*/
56 GeometryEmitter (VertexPacketAllocator& vpalloc, size_t numVertices);
58 void EmitVertex (const tcu::Vec4& position, float pointSize, const GenericVec4* varyings, int primitiveID);
59 void EndPrimitive (void);
61 void moveEmittedTo (std::vector<VertexPacket*>&);
64 GeometryEmitter (const GeometryEmitter&);
65 GeometryEmitter& operator= (const GeometryEmitter&);
67 std::vector<VertexPacket*> m_emitted; //!< NULL elements mean primitive end
68 VertexPacketAllocator& m_vpalloc;
72 } DE_WARN_UNUSED_TYPE;
76 #endif // _RRPRIMITIVEPACKET_HPP