Lines Matching defs:const
113 static string getCoordStr (const ImageType imageType,
114 const std::string& x,
115 const std::string& y,
116 const std::string& z)
141 const bool is64 = (componentWidth == 64);
157 const bool is64 = (componentWidth == 64);
169 static string getAtomicFuncArgumentShaderStr (const AtomicOperation op,
170 const string& x,
171 const string& y,
172 const string& z,
173 const IVec3& gridSize)
196 static string getAtomicOperationCaseName (const AtomicOperation op)
217 static string getAtomicOperationShaderFuncName (const AtomicOperation op)
236 T getOperationInitialValue (const AtomicOperation op)
259 deInt64 getOperationInitialValue<deInt64>(const AtomicOperation op)
282 deUint64 getOperationInitialValue<deUint64>(const AtomicOperation op)
289 static T getAtomicFuncArgument (const AtomicOperation op,
290 const IVec3& invocationID,
291 const IVec3& gridSize)
293 const T x = static_cast<T>(invocationID.x());
294 const T y = static_cast<T>(invocationID.y());
295 const T z = static_cast<T>(invocationID.z());
323 static bool isOrderIndependentAtomicOperation (const AtomicOperation op)
337 static bool isSpirvAtomicOperation (const AtomicOperation op)
345 static std::string getSpirvAtomicOpName (const AtomicOperation op)
360 static bool isSpirvAtomicNoLastArgOp (const AtomicOperation op)
376 static T computeBinaryAtomicOperationResult (const AtomicOperation op, const T a, const T b)
408 const ImageType& imageType,
409 const tcu::TextureFormat& format,
410 const string& componentType,
411 const string& vec4Type)
413 const string imageInCoord = getCoordStr(imageType, "gx", "gy", "gz");
414 const string shaderImageFormatStr = getShaderImageFormatQualifier(format);
415 const string shaderImageTypeStr = getShaderImageType(format, imageType);
416 const auto componentWidth = getFormatComponentWidth(mapTextureFormat(format), 0u);
417 const string extensions = ((componentWidth == 64u)
423 const string fillShader = "#version 450\n"
444 const string readShader = "#version 450\n"
470 const string readShaderResidency = "#version 450\n"
504 static void initDataForImage (const VkDevice device,
505 const DeviceInterface& deviceInterface,
506 const TextureFormat& format,
507 const AtomicOperation operation,
508 const tcu::UVec3& gridSize,
512 const VkFormat imageFormat = mapTextureFormat(format);
517 const deInt64 initialValue(getOperationInitialValue<deInt64>(operation));
528 const tcu::IVec4 initialValue(getOperationInitialValue<deInt32>(operation));
541 void commonCheckSupport (Context& context, const tcu::TextureFormat& tcuFormat, VkImageTiling tiling, ImageType imageType, const tcu::UVec3& imageSize, AtomicOperation operation, bool useTransfer, ShaderReadType readType, ImageBackingType backingType)
543 const VkFormat format = mapTextureFormat(tcuFormat);
544 const VkImageType vkImgType = mapImageType(imageType);
545 const VkFormatFeatureFlags texelBufferSupport = (VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT | VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT);
547 const auto& vki = context.getInstanceInterface();
548 const auto physicalDevice = context.getPhysicalDevice();
549 const auto usageFlags = getUsageFlags(useTransfer);
552 const auto result = vki.getPhysicalDeviceImageFormatProperties(physicalDevice, format, vkImgType, tiling, usageFlags, 0, &vkImageFormatProperties);
564 const VkFormatProperties formatProperties = getPhysicalDeviceFormatProperties(context.getInstanceInterface(),
570 const VkFormatFeatureFlags requiredFeaturesLinear = (VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT | VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT);
601 const VkFormatFeatureFlags requiredFeatures = (VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT | VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT);
602 const auto& atomicFloatFeatures = context.getShaderAtomicFloatFeaturesEXT();
638 const VkFormatFeatureFlags requiredFeatures = (VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT | VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT);
639 const auto& atomicInt64Features = context.getShaderImageAtomicInt64FeaturesEXT();
653 const VkFormatFeatureFlags transferFeatures = (VK_FORMAT_FEATURE_TRANSFER_SRC_BIT | VK_FORMAT_FEATURE_TRANSFER_DST_BIT);
669 const string& name,
670 const ImageType imageType,
671 const tcu::UVec3& imageSize,
672 const tcu::TextureFormat& format,
673 const VkImageTiling tiling,
674 const AtomicOperation operation,
675 const bool useTransfer,
676 const ShaderReadType shaderReadType,
677 const ImageBackingType backingType,
678 const glu::GLSLVersion glslVersion);
680 void initPrograms (SourceCollections& sourceCollections) const;
681 TestInstance* createInstance (Context& context) const;
682 virtual void checkSupport (Context& context) const;
685 const ImageType m_imageType;
686 const tcu::UVec3 m_imageSize;
687 const tcu::TextureFormat m_format;
688 const VkImageTiling m_tiling;
689 const AtomicOperation m_operation;
690 const bool m_useTransfer;
691 const ShaderReadType m_readType;
692 const ImageBackingType m_backingType;
693 const glu::GLSLVersion m_glslVersion;
697 const string& name,
698 const ImageType imageType,
699 const tcu::UVec3& imageSize,
700 const tcu::TextureFormat& format,
701 const VkImageTiling tiling,
702 const AtomicOperation operation,
703 const bool useTransfer,
704 const ShaderReadType shaderReadType,
705 const ImageBackingType backingType,
706 const glu::GLSLVersion glslVersion)
720 void BinaryAtomicEndResultCase::checkSupport (Context& context) const
725 void BinaryAtomicEndResultCase::initPrograms (SourceCollections& sourceCollections) const
727 const VkFormat imageFormat = mapTextureFormat(m_format);
728 const deUint32 componentWidth = getFormatComponentWidth(imageFormat, 0);
729 const bool intFormat = isIntFormat(imageFormat);
730 const bool uintFormat = isUintFormat(imageFormat);
731 const bool floatFormat = isFloatFormat(imageFormat);
732 const string type = getComponentTypeStr(componentWidth, intFormat, uintFormat, floatFormat);
733 const string vec4Type = getVec4TypeStr(componentWidth, intFormat, uintFormat, floatFormat);
739 const CaseVariant caseVariant{m_imageType, m_format.order, m_format.type, CaseVariant::CHECK_TYPE_END_RESULTS};
740 const tcu::StringTemplate shaderTemplate{getSpirvAtomicOpShader(caseVariant)};
751 const string versionDecl = glu::getGLSLVersionDeclaration(m_glslVersion);
753 const UVec3 gridSize = getShaderGridSize(m_imageType, m_imageSize);
754 const string atomicCoord = getCoordStr(m_imageType, "gx % " + toString(gridSize.x()), "gy", "gz");
756 const string atomicArgExpr = type + getAtomicFuncArgumentShaderStr(m_operation,
760 const string compareExchangeStr = (m_operation == ATOMIC_OPERATION_COMPARE_EXCHANGE) ?
763 const string atomicInvocation = getAtomicOperationShaderFuncName(m_operation) + "(u_resultImage, " + atomicCoord + compareExchangeStr + ", " + atomicArgExpr + ")";
764 const string shaderImageFormatStr = getShaderImageFormatQualifier(m_format);
765 const string shaderImageTypeStr = getShaderImageType(m_format, m_imageType);
766 const string extensions = "#extension GL_EXT_shader_atomic_float : enable\n"
799 const string& name,
800 const ImageType imageType,
801 const tcu::UVec3& imageSize,
802 const tcu::TextureFormat& format,
803 const VkImageTiling tiling,
804 const AtomicOperation operation,
805 const bool useTransfer,
806 const ShaderReadType shaderReadType,
807 const ImageBackingType backingType,
808 const glu::GLSLVersion glslVersion);
810 void initPrograms (SourceCollections& sourceCollections) const;
811 TestInstance* createInstance (Context& context) const;
812 virtual void checkSupport (Context& context) const;
815 const ImageType m_imageType;
816 const tcu::UVec3 m_imageSize;
817 const tcu::TextureFormat m_format;
818 const VkImageTiling m_tiling;
819 const AtomicOperation m_operation;
820 const bool m_useTransfer;
821 const ShaderReadType m_readType;
822 const ImageBackingType m_backingType;
823 const glu::GLSLVersion m_glslVersion;
827 const string& name,
828 const ImageType imageType,
829 const tcu::UVec3& imageSize,
830 const TextureFormat& format,
831 const VkImageTiling tiling,
832 const AtomicOperation operation,
833 const bool useTransfer,
834 const ShaderReadType shaderReadType,
835 const ImageBackingType backingType,
836 const glu::GLSLVersion glslVersion)
850 void BinaryAtomicIntermValuesCase::checkSupport (Context& context) const
855 void BinaryAtomicIntermValuesCase::initPrograms (SourceCollections& sourceCollections) const
857 const VkFormat imageFormat = mapTextureFormat(m_format);
858 const deUint32 componentWidth = getFormatComponentWidth(imageFormat, 0);
859 const bool intFormat = isIntFormat(imageFormat);
860 const bool uintFormat = isUintFormat(imageFormat);
861 const bool floatFormat = isFloatFormat(imageFormat);
862 const string type = getComponentTypeStr(componentWidth, intFormat, uintFormat, floatFormat);
863 const string vec4Type = getVec4TypeStr(componentWidth, intFormat, uintFormat, floatFormat);
869 const CaseVariant caseVariant{m_imageType, m_format.order, m_format.type, CaseVariant::CHECK_TYPE_INTERMEDIATE_RESULTS};
870 const tcu::StringTemplate shaderTemplate{getSpirvAtomicOpShader(caseVariant)};
881 const string versionDecl = glu::getGLSLVersionDeclaration(m_glslVersion);
882 const UVec3 gridSize = getShaderGridSize(m_imageType, m_imageSize);
883 const string atomicCoord = getCoordStr(m_imageType, "gx % " + toString(gridSize.x()), "gy", "gz");
884 const string invocationCoord = getCoordStr(m_imageType, "gx", "gy", "gz");
885 const string atomicArgExpr = type + getAtomicFuncArgumentShaderStr(m_operation,
889 const string compareExchangeStr = (m_operation == ATOMIC_OPERATION_COMPARE_EXCHANGE) ?
892 const string atomicInvocation = getAtomicOperationShaderFuncName(m_operation) +
894 const string shaderImageFormatStr = getShaderImageFormatQualifier(m_format);
895 const string shaderImageTypeStr = getShaderImageType(m_format, m_imageType);
896 const string extensions = "#extension GL_EXT_shader_atomic_float : enable\n"
931 const string& name,
932 const ImageType imageType,
933 const tcu::UVec3& imageSize,
934 const TextureFormat& format,
935 const VkImageTiling tiling,
936 const AtomicOperation operation,
937 const bool useTransfer,
938 const ShaderReadType shaderReadType,
939 const ImageBackingType backingType);
943 virtual deUint32 getOutputBufferSize (void) const = 0;
945 virtual void prepareResources (const bool useTransfer) = 0;
946 virtual void prepareDescriptors (const bool isTexelBuffer) = 0;
948 virtual void commandsBeforeCompute (const VkCommandBuffer cmdBuffer) const = 0;
949 virtual void commandsAfterCompute (const VkCommandBuffer cmdBuffer,
950 const VkPipeline pipeline,
951 const VkPipelineLayout pipelineLayout,
952 const VkDescriptorSet descriptorSet,
953 const VkDeviceSize& range,
954 const bool useTransfer) = 0;
957 const bool is64Bit) const = 0;
961 void shaderFillImage (const VkCommandBuffer cmdBuffer,
962 const VkBuffer& buffer,
963 const VkPipeline pipeline,
964 const VkPipelineLayout pipelineLayout,
965 const VkDescriptorSet descriptorSet,
966 const VkDeviceSize& range,
967 const tcu::UVec3& gridSize);
970 const tcu::UVec3& imageExent,
975 void createImageResources (const VkFormat& imageFormat,
976 const bool useTransfer);
978 const string m_name;
979 const ImageType m_imageType;
980 const tcu::UVec3 m_imageSize;
981 const TextureFormat m_format;
982 const VkImageTiling m_tiling;
983 const AtomicOperation m_operation;
984 const bool m_useTransfer;
985 const ShaderReadType m_readType;
986 const ImageBackingType m_backingType;
1006 const string& name,
1007 const ImageType imageType,
1008 const tcu::UVec3& imageSize,
1009 const TextureFormat& format,
1010 const VkImageTiling tiling,
1011 const AtomicOperation operation,
1012 const bool useTransfer,
1013 const ShaderReadType shaderReadType,
1014 const ImageBackingType backingType)
1030 const VkDevice device = m_context.getDevice();
1031 const DeviceInterface& deviceInterface = m_context.getDeviceInterface();
1032 const VkQueue queue = m_context.getUniversalQueue();
1033 const deUint32 queueFamilyIndex = m_context.getUniversalQueueFamilyIndex();
1035 const VkDeviceSize imageSizeInBytes = tcu::getPixelSize(m_format) * getNumPixels(m_imageType, m_imageSize);
1036 const VkDeviceSize outBuffSizeInBytes = getOutputBufferSize();
1037 const VkFormat imageFormat = mapTextureFormat(m_format);
1038 const bool isTexelBuffer = (m_imageType == IMAGE_TYPE_BUFFER);
1128 const Unique<VkShaderModule> shaderModule(createShaderModule(deviceInterface, device, m_context.getBinaryCollection().get(m_name), 0));
1129 const Unique<VkPipelineLayout> pipelineLayout(makePipelineLayout(deviceInterface, device, *m_descriptorSetLayout));
1130 const Unique<VkPipeline> pipeline(makeComputePipeline(deviceInterface, device, *pipelineLayout, *shaderModule));
1133 const Unique<VkCommandPool> cmdPool(createCommandPool(deviceInterface, device, VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT, queueFamilyIndex));
1134 const Unique<VkCommandBuffer> cmdBuffer(allocateCommandBuffer(deviceInterface, device, *cmdPool, VK_COMMAND_BUFFER_LEVEL_PRIMARY));
1142 const vector<VkBufferImageCopy> bufferImageCopy(1, makeBufferImageCopy(makeExtent3D(getLayerSize(m_imageType, m_imageSize)), getNumLayers(m_imageType, m_imageSize)));
1171 const VkBufferMemoryBarrier outputBufferPreHostReadBarrier
1200 void BinaryAtomicInstanceBase::shaderFillImage (const VkCommandBuffer cmdBuffer,
1201 const VkBuffer& buffer,
1202 const VkPipeline pipeline,
1203 const VkPipelineLayout pipelineLayout,
1204 const VkDescriptorSet descriptorSet,
1205 const VkDeviceSize& range,
1206 const tcu::UVec3& gridSize)
1208 const VkDevice device = m_context.getDevice();
1209 const DeviceInterface& deviceInterface = m_context.getDeviceInterface();
1210 const VkDescriptorImageInfo descResultImageInfo = makeDescriptorImageInfo(DE_NULL, *m_resultImageView, VK_IMAGE_LAYOUT_GENERAL);
1211 const VkDescriptorBufferInfo descResultBufferInfo = makeDescriptorBufferInfo(buffer, 0, range);
1212 const VkImageSubresourceRange subresourceRange = makeImageSubresourceRange(VK_IMAGE_ASPECT_COLOR_BIT, 0u, 1u, 0u, getNumLayers(m_imageType, m_imageSize));
1219 const VkImageMemoryBarrier imageBarrierPre = makeImageMemoryBarrier(0,
1230 0, (const VkMemoryBarrier*)DE_NULL,
1231 0, (const VkBufferMemoryBarrier*)DE_NULL,
1239 const VkImageMemoryBarrier imageBarrierPost = makeImageMemoryBarrier(VK_ACCESS_SHADER_WRITE_BIT,
1250 0, (const VkMemoryBarrier*)DE_NULL,
1251 0, (const VkBufferMemoryBarrier*)DE_NULL,
1256 const tcu::UVec3& imageExent,
1261 const VkDevice device = m_context.getDevice();
1262 const DeviceInterface& deviceInterface = m_context.getDeviceInterface();
1264 const VkImageUsageFlags usageFlags = getUsageFlags(useTransfer);
1270 const auto numLayers = getNumLayers(m_imageType, m_imageSize);
1275 DE_NULL, // const void* pNext;
1287 DE_NULL, // const deUint32* pQueueFamilyIndices;
1294 const auto& vki = m_context.getInstanceInterface();
1295 const auto physicalDevice = m_context.getPhysicalDevice();
1296 const auto sparseQueue = m_context.getSparseQueue();
1297 const auto sparseQueueIdx = m_context.getSparseQueueFamilyIndex();
1298 const auto universalQIdx = m_context.getUniversalQueueFamilyIndex();
1299 const deUint32 queueIndices[] = { universalQIdx, sparseQueueIdx };
1310 const auto sparseImage = new SparseImage(deviceInterface, device, physicalDevice, vki, createInfo, sparseQueue, allocator, m_format);
1318 const VkImageSubresourceRange subresourceRange = makeImageSubresourceRange(VK_IMAGE_ASPECT_COLOR_BIT, 0u, 1u, 0u, numLayers);
1323 void BinaryAtomicInstanceBase::createImageResources (const VkFormat& imageFormat,
1324 const bool useTransfer)
1335 const string& name,
1336 const ImageType imageType,
1337 const tcu::UVec3& imageSize,
1338 const TextureFormat& format,
1339 const VkImageTiling tiling,
1340 const AtomicOperation operation,
1341 const bool useTransfer,
1342 const ShaderReadType shaderReadType,
1343 const ImageBackingType backingType)
1346 virtual deUint32 getOutputBufferSize (void) const;
1348 virtual void prepareResources (const bool useTransfer) { DE_UNREF(useTransfer); }
1349 virtual void prepareDescriptors (const bool isTexelBuffer);
1351 virtual void commandsBeforeCompute (const VkCommandBuffer) const {}
1352 virtual void commandsAfterCompute (const VkCommandBuffer cmdBuffer,
1353 const VkPipeline pipeline,
1354 const VkPipelineLayout pipelineLayout,
1355 const VkDescriptorSet descriptorSet,
1356 const VkDeviceSize& range,
1357 const bool useTransfer);
1360 const bool is64Bit) const;
1365 bool isValueCorrect (const T resultValue,
1369 const UVec3& gridSize,
1370 const IVec3 extendedGridSize) const;
1373 deUint32 BinaryAtomicEndResultInstance::getOutputBufferSize (void) const
1378 void BinaryAtomicEndResultInstance::prepareDescriptors (const bool isTexelBuffer)
1380 const VkDescriptorType descriptorType = isTexelBuffer ?
1383 const VkDevice device = m_context.getDevice();
1384 const DeviceInterface& deviceInterface = m_context.getDeviceInterface();
1408 const VkDescriptorImageInfo descResultImageInfo = makeDescriptorImageInfo(DE_NULL, *m_resultImageView, VK_IMAGE_LAYOUT_GENERAL);
1416 void BinaryAtomicEndResultInstance::commandsAfterCompute (const VkCommandBuffer cmdBuffer,
1417 const VkPipeline pipeline,
1418 const VkPipelineLayout pipelineLayout,
1419 const VkDescriptorSet descriptorSet,
1420 const VkDeviceSize& range,
1421 const bool useTransfer)
1423 const DeviceInterface& deviceInterface = m_context.getDeviceInterface();
1424 const VkImageSubresourceRange subresourceRange = makeImageSubresourceRange(VK_IMAGE_ASPECT_COLOR_BIT, 0u, 1u, 0u, getNumLayers(m_imageType, m_imageSize));
1425 const UVec3 layerSize = getLayerSize(m_imageType, m_imageSize);
1433 const VkImageMemoryBarrier resultImagePostDispatchBarrier =
1447 const VkBufferImageCopy bufferImageCopyParams = makeBufferImageCopy(makeExtent3D(layerSize), getNumLayers(m_imageType, m_imageSize));
1453 const VkDevice device = m_context.getDevice();
1454 const VkDescriptorImageInfo descResultImageInfo = makeDescriptorImageInfo(DE_NULL, *m_resultImageView, VK_IMAGE_LAYOUT_GENERAL);
1455 const VkDescriptorBufferInfo descResultBufferInfo = makeDescriptorBufferInfo(m_outputBuffer->get(), 0, range);
1462 const VkImageMemoryBarrier resultImagePostDispatchBarrier =
1497 const bool is64Bit) const
1499 const UVec3 gridSize = getShaderGridSize(m_imageType, m_imageSize);
1500 const IVec3 extendedGridSize = IVec3(NUM_INVOCATIONS_PER_PIXEL*gridSize.x(), gridSize.y(), gridSize.z());
1508 const void* resultValue = resultBuffer.getPixelPtr(x, y, z);
1559 const IVec3 gid(x + i*gridSize.x(), y, z);
1578 const IVec3 gid(x + i*gridSize.x(), y, z);
1596 bool BinaryAtomicEndResultInstance::isValueCorrect(const T resultValue, deInt32 x, deInt32 y, deInt32 z, const UVec3& gridSize, const IVec3 extendedGridSize) const
1601 const IVec3 gid(x + i*gridSize.x(), y, z);
1608 TestInstance* BinaryAtomicEndResultCase::createInstance (Context& context) const
1618 const string& name,
1619 const ImageType imageType,
1620 const tcu::UVec3& imageSize,
1621 const TextureFormat& format,
1622 const VkImageTiling tiling,
1623 const AtomicOperation operation,
1624 const bool useTransfer,
1625 const ShaderReadType shaderReadType,
1626 const ImageBackingType backingType)
1629 virtual deUint32 getOutputBufferSize (void) const;
1631 virtual void prepareResources (const bool useTransfer);
1632 virtual void prepareDescriptors (const bool isTexelBuffer);
1634 virtual void commandsBeforeCompute (const VkCommandBuffer cmdBuffer) const;
1635 virtual void commandsAfterCompute (const VkCommandBuffer cmdBuffer,
1636 const VkPipeline pipeline,
1637 const VkPipelineLayout pipelineLayout,
1638 const VkDescriptorSet descriptorSet,
1639 const VkDeviceSize& range,
1640 const bool useTransfer);
1643 const bool is64Bit) const;
1649 const bool isFloatingPoint,
1653 const UVec3& gridSize,
1654 const IVec3 extendedGridSize) const;
1657 bool verifyRecursive (const deInt32 index,
1658 const T valueSoFar,
1660 const T atomicArgs[NUM_INVOCATIONS_PER_PIXEL],
1661 const T resultValues[NUM_INVOCATIONS_PER_PIXEL]) const;
1666 deUint32 BinaryAtomicIntermValuesInstance::getOutputBufferSize (void) const
1671 void BinaryAtomicIntermValuesInstance::prepareResources (const bool useTransfer)
1673 const UVec3 layerSize = getLayerSize(m_imageType, m_imageSize);
1674 const bool isCubeBasedImage = (m_imageType == IMAGE_TYPE_CUBE || m_imageType == IMAGE_TYPE_CUBE_ARRAY);
1675 const UVec3 extendedLayerSize = isCubeBasedImage ? UVec3(NUM_INVOCATIONS_PER_PIXEL * layerSize.x(), NUM_INVOCATIONS_PER_PIXEL * layerSize.y(), layerSize.z())
1681 void BinaryAtomicIntermValuesInstance::prepareDescriptors (const bool isTexelBuffer)
1683 const VkDescriptorType descriptorType = isTexelBuffer ?
1687 const VkDevice device = m_context.getDevice();
1688 const DeviceInterface& deviceInterface = m_context.getDeviceInterface();
1715 const VkDescriptorImageInfo descResultImageInfo = makeDescriptorImageInfo(DE_NULL, *m_resultImageView, VK_IMAGE_LAYOUT_GENERAL);
1716 const VkDescriptorImageInfo descIntermResultsImageInfo = makeDescriptorImageInfo(DE_NULL, *m_intermResultsImageView, VK_IMAGE_LAYOUT_GENERAL);
1725 void BinaryAtomicIntermValuesInstance::commandsBeforeCompute (const VkCommandBuffer cmdBuffer) const
1727 const DeviceInterface& deviceInterface = m_context.getDeviceInterface();
1728 const VkImageSubresourceRange subresourceRange = makeImageSubresourceRange(VK_IMAGE_ASPECT_COLOR_BIT, 0u, 1u, 0u, getNumLayers(m_imageType, m_imageSize));
1730 const VkImageMemoryBarrier imagePreDispatchBarrier =
1741 void BinaryAtomicIntermValuesInstance::commandsAfterCompute (const VkCommandBuffer cmdBuffer,
1742 const VkPipeline pipeline,
1743 const VkPipelineLayout pipelineLayout,
1744 const VkDescriptorSet descriptorSet,
1745 const VkDeviceSize& range,
1746 const bool useTransfer)
1752 const DeviceInterface& deviceInterface = m_context.getDeviceInterface();
1753 const VkImageSubresourceRange subresourceRange = makeImageSubresourceRange(VK_IMAGE_ASPECT_COLOR_BIT, 0u, 1u, 0u, getNumLayers(m_imageType, m_imageSize));
1754 const UVec3 layerSize = getLayerSize(m_imageType, m_imageSize);
1758 const VkImageMemoryBarrier imagePostDispatchBarrier =
1768 const UVec3 extendedLayerSize = UVec3(NUM_INVOCATIONS_PER_PIXEL * layerSize.x(), layerSize.y(), layerSize.z());
1769 const VkBufferImageCopy bufferImageCopyParams = makeBufferImageCopy(makeExtent3D(extendedLayerSize), getNumLayers(m_imageType, m_imageSize));
1775 const VkDevice device = m_context.getDevice();
1776 const VkDescriptorImageInfo descResultImageInfo = makeDescriptorImageInfo(DE_NULL, *m_intermResultsImageView, VK_IMAGE_LAYOUT_GENERAL);
1777 const VkDescriptorBufferInfo descResultBufferInfo = makeDescriptorBufferInfo(m_outputBuffer->get(), 0, range);
1784 const VkImageMemoryBarrier resultImagePostDispatchBarrier =
1819 const bool is64Bit) const
1821 const UVec3 gridSize = getShaderGridSize(m_imageType, m_imageSize);
1822 const IVec3 extendedGridSize = IVec3(NUM_INVOCATIONS_PER_PIXEL*gridSize.x(), gridSize.y(), gridSize.z());
1868 bool BinaryAtomicIntermValuesInstance::areValuesCorrect(tcu::ConstPixelBufferAccess& resultBuffer, const bool isFloatingPoint, deInt32 x, deInt32 y, deInt32 z, const UVec3& gridSize, const IVec3 extendedGridSize) const
1894 bool BinaryAtomicIntermValuesInstance::verifyRecursive (const deInt32 index,
1895 const T valueSoFar,
1897 const T atomicArgs[NUM_INVOCATIONS_PER_PIXEL],
1898 const T resultValues[NUM_INVOCATIONS_PER_PIXEL]) const
1921 TestInstance* BinaryAtomicIntermValuesCase::createInstance (Context& context) const
1934 ImageParams(const ImageType imageType, const tcu::UVec3& imageSize)
1939 const ImageType m_imageType;
1940 const tcu::UVec3 m_imageSize;
1943 const ImageParams imageParamsArray[] =
1955 const tcu::TextureFormat formats[] =
1964 static const VkImageTiling s_tilings[] = {
1969 const struct
1972 const char* name;
1981 const struct
1984 const char* name;
1995 const AtomicOperation operation = (AtomicOperation)operationI;
2001 const ImageType imageType = imageParamsArray[imageTypeNdx].m_imageType;
2002 const tcu::UVec3 imageSize = imageParamsArray[imageTypeNdx].m_imageSize;
2008 const bool useTransfer = (useTransferIdx > 0);
2009 const string groupName = (!useTransfer ? "no" : "") + string("transfer");
2015 const auto& readType = readTypes[readTypeIdx];
2021 const auto& backingType = backingTypes[backingTypeIdx];
2029 const TextureFormat& format = formats[formatNdx];
2030 const std::string formatName = getShaderImageFormatQualifier(format);
2031 const char* suffix = (s_tilings[tilingNdx] == VK_IMAGE_TILING_OPTIMAL) ? "" : "_linear";
2041 const auto vkImageType = mapImageType(imageType);
2071 const string caseEndResult = formatName + "_end_result" + suffix;
2075 const string caseIntermValues = formatName + "_intermediate_values" + suffix;