Lines Matching defs:const
58 std::vector<MembT> members (const std::vector<T>& objs, MembT T::* membP)
72 bool operator() (const T& a, const T& b) const { return m_pred(a.*m_membP, b.*m_membP); }
92 inline std::vector<float> lengths (const std::vector<Segment>& segments) { return members(segments, &Segment::length); }
132 const SpacingMode spacingMode,
133 const float tessLevel,
134 const std::vector<float>& coords,
135 float* const pOutAdditionalSegmentLength,
136 int* const pOutAdditionalSegmentLocation)
140 const float clampedLevel = getClampedTessLevel(spacingMode, tessLevel);
141 const int finalLevel = getRoundedTessLevel(spacingMode, clampedLevel);
142 const std::vector<float> sortedCoords = sorted(coords);
178 const float epsilon = 0.001f;
179 const Segment& seg = segments[segNdx];
275 const SpacingMode spacingMode,
276 const std::vector<float>& tessLevels,
277 const std::vector<float>& additionalSegmentLengths,
278 const std::vector<int>& additionalSegmentLocations)
289 const std::vector<LineData> lineDatasSortedByLevel = sorted(lineDatas, memberPred<std::less>(&LineData::tessLevel));
295 const LineData& curData = lineDatasSortedByLevel[lineNdx];
296 const LineData& prevData = lineDatasSortedByLevel[lineNdx-1];
317 const LineData& curData = lineDatasSortedByLevel[lineNdx];
318 const LineData& prevData = lineDatasSortedByLevel[lineNdx-1];
323 const float curClampedLevel = getClampedTessLevel(spacingMode, curData.tessLevel);
324 const float prevClampedLevel = getClampedTessLevel(spacingMode, prevData.tessLevel);
325 const int curFinalLevel = getRoundedTessLevel(spacingMode, curClampedLevel);
326 const int prevFinalLevel = getRoundedTessLevel(spacingMode, prevClampedLevel);
331 const float curFraction = static_cast<float>(curFinalLevel) - curClampedLevel;
332 const float prevFraction = static_cast<float>(prevFinalLevel) - prevClampedLevel;
357 static const float rangeStarts[] = { 7.0f, 8.0f, 9.0f };
358 const int numSamplesPerRange = 10;
373 std::vector<float> readFloatArray(const int count, const void* memory)
379 const float* pFloatData = reinterpret_cast<const float*>(static_cast<const deUint8*>(memory));
527 const DeviceInterface& vk = context.getDeviceInterface();
528 const VkDevice device = context.getDevice();
529 const VkQueue queue = context.getUniversalQueue();
530 const deUint32 queueFamilyIndex = context.getUniversalQueueFamilyIndex();
532 const bool tessGeomPointSize = context.getDeviceFeatures().shaderTessellationAndGeometryPointSize;
534 const std::vector<float> tessLevelCases = genTessLevelCases();
535 const int maxNumVertices = 1 + getClampedRoundedTessLevel(testParams.spacingMode, *std::max_element(tessLevelCases.begin(), tessLevelCases.end()));
539 const VkDeviceSize counterBufferSizeBytes = sizeof(int);
540 const BufferWithMemory counterBuffer(vk, device, allocator, makeBufferCreateInfo(counterBufferSizeBytes, VK_BUFFER_USAGE_STORAGE_BUFFER_BIT), MemoryRequirement::HostVisible);
544 const VkDeviceSize resultBufferSizeBytes = sizeof(float) * maxNumVertices;
545 const BufferWithMemory resultBuffer (vk, device, allocator, makeBufferCreateInfo(resultBufferSizeBytes, VK_BUFFER_USAGE_STORAGE_BUFFER_BIT), MemoryRequirement::HostVisible);
549 const VkDeviceSize tessLevelsBufferSizeBytes = sizeof(float); // we pass only outer1
550 const BufferWithMemory tessLevelsBuffer (vk, device, allocator, makeBufferCreateInfo(tessLevelsBufferSizeBytes, VK_BUFFER_USAGE_STORAGE_BUFFER_BIT), MemoryRequirement::HostVisible);
554 const Unique<VkDescriptorSetLayout> descriptorSetLayout(DescriptorSetLayoutBuilder()
560 const Unique<VkDescriptorPool> descriptorPool(DescriptorPoolBuilder()
566 const Unique<VkDescriptorSet> descriptorSet (makeDescriptorSet(vk, device, *descriptorPool, *descriptorSetLayout));
567 const VkDescriptorBufferInfo tessLevelsBufferInfo = makeDescriptorBufferInfo(tessLevelsBuffer.get(), 0ull, tessLevelsBufferSizeBytes);
568 const VkDescriptorBufferInfo resultBufferInfo = makeDescriptorBufferInfo(resultBuffer.get(), 0ull, resultBufferSizeBytes);
569 const VkDescriptorBufferInfo counterBufferInfo = makeDescriptorBufferInfo(counterBuffer.get(), 0ull, counterBufferSizeBytes);
579 const Unique<VkRenderPass> renderPass (makeRenderPassWithoutAttachments (vk, device));
580 const Unique<VkFramebuffer> framebuffer (makeFramebuffer (vk, device, *renderPass, 0u, DE_NULL, 1u, 1u));
581 const Unique<VkPipelineLayout> pipelineLayout (makePipelineLayout (vk, device, *descriptorSetLayout));
582 const Unique<VkCommandPool> cmdPool (makeCommandPool (vk, device, queueFamilyIndex));
583 const Unique<VkCommandBuffer> cmdBuffer (allocateCommandBuffer (vk, device, *cmdPool, VK_COMMAND_BUFFER_LEVEL_PRIMARY));
585 const Unique<VkPipeline> pipeline(GraphicsPipelineBuilder()
602 const Allocation& alloc = tessLevelsBuffer.getAllocation();
603 float* const tessLevelOuter1 = static_cast<float*>(alloc.getHostPtr());
611 const Allocation& alloc = resultBuffer.getAllocation();
619 const Allocation& alloc = counterBuffer.getAllocation();
637 const VkBufferMemoryBarrier shaderWriteBarrier = makeBufferMemoryBarrier(
650 const Allocation& resultAlloc = resultBuffer.getAllocation();
651 const Allocation& counterAlloc = counterBuffer.getAllocation();
656 const deInt32 numResults = *static_cast<deInt32*>(counterAlloc.getHostPtr());
657 const std::vector<float> resultTessCoords = readFloatArray(numResults, resultAlloc.getHostPtr());
680 void checkSupportTess(Context& context, const TestParams)
683 if (const vk::VkPhysicalDevicePortabilitySubsetFeaturesKHR* const features = getPortability(context))