Lines Matching defs:const
54 static const deUint32 SEED = 0xc2a39fu;
55 static const deUint32 INDEX_LIMIT = 10000;
57 static const deUint32 OFFSET_LIMIT = 1000;
59 static const deUint32 PRIMITIVE_COUNT[] = {1, 3, 17, 45};
71 const char* getDrawCommandTypeName (DrawCommandType command)
114 DrawParamsBase (const vk::VkPrimitiveTopology top, const SharedGroupParams gParams)
129 const vk::VkIndexType indexType;
131 IndexedParamsBase (const vk::VkIndexType indexT)
142 DrawParams (const vk::VkPrimitiveTopology top, const SharedGroupParams gParams, const deUint32 vertexC, const deUint32 instanceC, const deUint32 firstV, const deUint32 firstI)
157 DrawIndexedParams (const vk::VkPrimitiveTopology top, const SharedGroupParams gParams, const vk::VkIndexType indexT, const deUint32 indexC, const deUint32 instanceC, const deUint32 firstIdx, const deInt32 vertexO, const deUint32 firstIns)
173 DrawIndirectParams (const vk::VkPrimitiveTopology top, const SharedGroupParams gParams)
177 void addCommand (const deUint32 vertexC, const deUint32 instanceC, const deUint32 firstV, const deUint32 firstI)
193 DrawIndexedIndirectParams (const vk::VkPrimitiveTopology top, const SharedGroupParams gParams, const vk::VkIndexType indexT)
198 void addCommand (const deUint32 indexC, const deUint32 instanceC, const deUint32 firstIdx, const deInt32 vertexO, const deUint32 firstIns)
223 void shadeVertices (const rr::VertexAttrib* inputs, rr::VertexPacket* const* packets, const int numPackets) const
250 void shadeFragments (rr::FragmentPacket* packets, const int numPackets, const rr::FragmentShadingContext& context) const
264 inline bool imageCompare (tcu::TestLog& log, const tcu::ConstPixelBufferAccess& reference, const tcu::ConstPixelBufferAccess& result, const vk::VkPrimitiveTopology topology)
284 void initialize (const DrawParamsBase& data);
285 void initPipeline (const vk::VkDevice device);
291 void beginSecondaryCmdBuffer (const vk::DeviceInterface& vk, vk::VkRenderingFlagsKHR renderingFlags = 0u);
301 void generateRefImage (const tcu::PixelBufferAccess& access, const std::vector<tcu::Vec4>& vertices, const std::vector<tcu::Vec4>& colors) const;
304 const vk::DeviceInterface& m_vk;
336 void DrawTestInstanceBase::initialize (const DrawParamsBase& data)
340 const vk::VkDevice device = m_context.getDevice();
341 const deUint32 queueFamilyIndex = m_context.getUniversalQueueFamilyIndex();
343 const PipelineLayoutCreateInfo pipelineLayoutCreateInfo;
346 const vk::VkExtent3D targetImageExtent = { WIDTH, HEIGHT, 1 };
347 const ImageCreateInfo targetImageCreateInfo(vk::VK_IMAGE_TYPE_2D, m_colorAttachmentFormat, targetImageExtent, 1, 1, vk::VK_SAMPLE_COUNT_1_BIT,
352 const ImageViewCreateInfo colorTargetViewInfo(m_colorTargetImage->object(), vk::VK_IMAGE_VIEW_TYPE_2D, m_colorAttachmentFormat);
368 const vk::VkAttachmentReference colorAttachmentReference
389 const FramebufferCreateInfo framebufferCreateInfo (*m_renderPass, colorAttachments, WIDTH, HEIGHT, 1);
393 const vk::VkVertexInputBindingDescription vertexInputBindingDescription =
400 const vk::VkVertexInputAttributeDescription vertexInputAttributeDescriptions[2] =
421 const vk::VkDeviceSize dataSize = m_data.vertices.size() * sizeof(PositionColorVertex);
442 const CmdPoolCreateInfo cmdPoolCreateInfo(queueFamilyIndex);
452 void DrawTestInstanceBase::initPipeline (const vk::VkDevice device)
454 const vk::Unique<vk::VkShaderModule> vs(createShaderModule(m_vk, device, m_context.getBinaryCollection().get("vert"), 0));
455 const vk::Unique<vk::VkShaderModule> fs(createShaderModule(m_vk, device, m_context.getBinaryCollection().get("frag"), 0));
457 const PipelineCreateInfo::ColorBlendState::Attachment vkCbAttachmentState;
507 const vk::VkClearValue clearColor { { { 0.0f, 0.0f, 0.0f, 1.0f } } };
512 const ImageSubresourceRange subresourceRange(vk::VK_IMAGE_ASPECT_COLOR_BIT);
516 const vk::VkMemoryBarrier memBarrier
531 const vk::VkClearValue clearColor { { { 0.0f, 0.0f, 0.0f, 1.0f } } };
532 const vk::VkRect2D renderArea = vk::makeRect2D(WIDTH, HEIGHT);
543 void DrawTestInstanceBase::beginSecondaryCmdBuffer(const vk::DeviceInterface& vk, vk::VkRenderingFlagsKHR renderingFlags)
545 const vk::VkCommandBufferInheritanceRenderingInfoKHR inheritanceRenderingInfo
548 DE_NULL, // const void* pNext;
552 &m_colorAttachmentFormat, // const VkFormat* pColorAttachmentFormats;
558 const vk::VkCommandBufferInheritanceInfo bufferInheritanceInfo
561 &inheritanceRenderingInfo, // const void* pNext;
574 const vk::VkCommandBufferBeginInfo commandBufBeginParams
577 DE_NULL, // const void* pNext;
587 const vk::VkClearValue clearColor{ { { 0.0f, 0.0f, 0.0f, 1.0f } } };
588 const vk::VkRect2D renderArea = vk::makeRect2D(WIDTH, HEIGHT);
599 void DrawTestInstanceBase::generateRefImage (const tcu::PixelBufferAccess& access, const std::vector<tcu::Vec4>& vertices, const std::vector<tcu::Vec4>& colors) const
601 const PassthruVertShader vertShader;
602 const PassthruFragShader fragShader;
603 const rr::Program program (&vertShader, &fragShader);
604 const rr::MultisamplePixelBufferAccess colorBuffer = rr::MultisamplePixelBufferAccess::fromSinglesampleAccess(access);
605 const rr::RenderTarget renderTarget (colorBuffer);
606 const rr::RenderState renderState ((rr::ViewportState(colorBuffer)), m_context.getDeviceProperties().limits.subPixelPrecisionBits);
607 const rr::Renderer renderer;
609 const rr::VertexAttrib vertexAttribs[] =
627 DrawTestInstance (Context& context, const T& data);
637 DrawTestInstance<T>::DrawTestInstance (Context& context, const T& data)
673 DrawTestCase (tcu::TestContext& context, const char* name, const T data);
675 virtual void initPrograms (vk::SourceCollections& programCollection) const;
677 virtual void checkSupport (Context& context) const;
678 virtual TestInstance* createInstance (Context& context) const;
687 DrawTestCase<T>::DrawTestCase (tcu::TestContext& context, const char* name, const T data)
700 void DrawTestCase<T>::initPrograms (vk::SourceCollections& programCollection) const
707 void DrawTestCase<T>::checkSupport (Context& context) const
767 TestInstance* DrawTestCase<T>::createInstance (Context& context) const
778 const deUint32 vectorSize = m_data.params.firstVertex + m_data.params.vertexCount;
786 const float f0 = rnd.getFloat(-1.0f, 1.0f);
787 const float f1 = rnd.getFloat(-1.0f, 1.0f);
805 const vk::VkQueue queue = m_context.getUniversalQueue();
806 const vk::VkDevice device = m_context.getDevice();
807 const vk::VkDeviceSize vertexBufferOffset = 0;
808 const vk::VkBuffer vertexBuffer = m_vertexBuffer->object();
891 const vk::VkOffset3D zeroOffset = { 0, 0, 0 };
892 const tcu::ConstPixelBufferAccess renderedFrame = m_colorTargetImage->readSurface(queue, m_context.getDefaultAllocator(),
907 const deUint32 indexSize = m_data.params.firstIndex + m_data.params.indexCount;
932 const float f0 = rnd.getFloat(-1.0f, 1.0f);
933 const float f1 = rnd.getFloat(-1.0f, 1.0f);
951 const vk::DeviceInterface& vk = m_context.getDeviceInterface();
952 const vk::VkDevice vkDevice = m_context.getDevice();
953 const deUint32 queueFamilyIndex = m_context.getUniversalQueueFamilyIndex();
954 const vk::VkQueue queue = m_context.getUniversalQueue();
956 const vk::VkDeviceSize vertexBufferOffset = 0;
957 const vk::VkBuffer vertexBuffer = m_vertexBuffer->object();
958 const deUint32 bufferSize = (deUint32)(m_data.indexes.size() * sizeof(deUint32));
960 const vk::VkBufferCreateInfo bufferCreateInfo =
963 DE_NULL, // const void* pNext;
969 &queueFamilyIndex, // const deUint32* pQueueFamilyIndices;
1067 const vk::VkOffset3D zeroOffset = { 0, 0, 0 };
1068 const tcu::ConstPixelBufferAccess renderedFrame = m_colorTargetImage->readSurface(queue, m_context.getDefaultAllocator(),
1089 const deUint32 index = it->firstVertex + it->vertexCount;
1106 const float f0 = rnd.getFloat(-1.0f, 1.0f);
1107 const float f1 = rnd.getFloat(-1.0f, 1.0f);
1119 const vk::VkPhysicalDeviceFeatures features = m_context.getDeviceFeatures();
1126 const deUint32 offset = (deUint32)(indirectOffset + cmdIdx * sizeof(vk::VkDrawIndirectCommand));
1140 const vk::DeviceInterface& vk = m_context.getDeviceInterface();
1141 const vk::VkDevice vkDevice = m_context.getDevice();
1143 const vk::VkQueue queue = m_context.getUniversalQueue();
1144 const deUint32 queueFamilyIndex = m_context.getUniversalQueueFamilyIndex();
1145 const vk::VkDeviceSize vertexBufferOffset = 0;
1146 const vk::VkBuffer vertexBuffer = m_vertexBuffer->object();
1151 const vk::VkDeviceSize indirectInfoSize = m_data.commands.size() * sizeof(vk::VkDrawIndirectCommand);
1153 const vk::VkBufferCreateInfo indirectCreateInfo =
1156 DE_NULL, // const void* pNext;
1162 &queueFamilyIndex, // const deUint32* pQueueFamilyIndices;
1261 const vk::VkOffset3D zeroOffset = { 0, 0, 0 };
1262 const tcu::ConstPixelBufferAccess renderedFrame = m_colorTargetImage->readSurface(queue, m_context.getDefaultAllocator(),
1283 const deUint32 index = it->firstIndex + it->indexCount;
1297 const deUint32 vertexIdx = rnd.getInt(it->vertexOffset, INDEX_LIMIT);
1298 const deUint32 maxIndex = vertexIdx + it->vertexOffset;
1319 const float f0 = rnd.getFloat(-1.0f, 1.0f);
1320 const float f1 = rnd.getFloat(-1.0f, 1.0f);
1332 const vk::VkPhysicalDeviceFeatures features = m_context.getDeviceFeatures();
1339 const deUint32 offset = (deUint32)(indirectOffset + cmdIdx * sizeof(vk::VkDrawIndexedIndirectCommand));
1353 const vk::DeviceInterface& vk = m_context.getDeviceInterface();
1354 const vk::VkDevice vkDevice = m_context.getDevice();
1355 const deUint32 queueFamilyIndex = m_context.getUniversalQueueFamilyIndex();
1356 const vk::VkQueue queue = m_context.getUniversalQueue();
1358 const vk::VkDeviceSize vertexBufferOffset = 0;
1359 const vk::VkBuffer vertexBuffer = m_vertexBuffer->object();
1364 const vk::VkDeviceSize indirectInfoSize = m_data.commands.size() * sizeof(vk::VkDrawIndexedIndirectCommand);
1369 DE_NULL, // const void* pNext;
1375 &queueFamilyIndex, // const deUint32* pQueueFamilyIndices;
1397 const deUint32 bufferSize = (deUint32)(m_data.indexes.size() * sizeof(deUint32));
1404 DE_NULL, // const void* pNext;
1410 &queueFamilyIndex, // const deUint32* pQueueFamilyIndices;
1515 const deUint32 vertexIndex = cmd->vertexOffset + m_data.indexes[cmd->firstIndex + idx];
1522 const vk::VkOffset3D zeroOffset = { 0, 0, 0 };
1523 const tcu::ConstPixelBufferAccess renderedFrame = m_colorTargetImage->readSurface(queue, m_context.getDefaultAllocator(),
1541 const DrawCommandType command;
1542 const vk::VkPrimitiveTopology topology;
1543 const SharedGroupParams groupParams;
1545 TestCaseParams (const DrawCommandType cmd, const vk::VkPrimitiveTopology top, const SharedGroupParams gParams)
1554 void populateSubGroup (tcu::TestCaseGroup* testGroup, const TestCaseParams caseParams)
1558 const DrawCommandType command = caseParams.command;
1559 const vk::VkPrimitiveTopology topology = caseParams.topology;
1560 const SharedGroupParams groupParams = caseParams.groupParams;
1561 const deUint32 primitiveCountArrLength = DE_LENGTH_OF_ARRAY(PRIMITIVE_COUNT);
1565 const deUint32 primitives = PRIMITIVE_COUNT[primitiveCountIdx];
1589 const deUint32 vertexCount = multiplier * primitives + offset;
1644 void createDrawTests(tcu::TestCaseGroup* testGroup, const SharedGroupParams groupParams)
1648 const DrawCommandType command (static_cast<DrawCommandType>(drawTypeIndex));
1653 const vk::VkPrimitiveTopology topology (static_cast<vk::VkPrimitiveTopology>(topologyIdx));
1654 const std::string groupName (de::toLower(getPrimitiveTopologyName(topology)).substr(22));
1680 tcu::TestCaseGroup* createBasicDrawTests (tcu::TestContext& testCtx, const SharedGroupParams groupParams)