Lines Matching refs:format
77 bool isSupportedSamplableFormat (const InstanceInterface& instanceInterface, VkPhysicalDevice device, VkFormat format)
79 if (isCompressedFormat(format))
82 const tcu::CompressedTexFormat compressedFormat = mapVkCompressedFormat(format);
103 DE_FATAL("Unsupported compressed format");
108 instanceInterface.getPhysicalDeviceFormatProperties(device, format, &formatProps);
113 bool isLinearFilteringSupported (const InstanceInterface& vki, VkPhysicalDevice physicalDevice, VkFormat format, VkImageTiling tiling)
115 const VkFormatProperties formatProperties = getPhysicalDeviceFormatProperties(vki, physicalDevice, format);
123 bool isMinMaxFilteringSupported (const InstanceInterface& vki, VkPhysicalDevice physicalDevice, VkFormat format, VkImageTiling tiling)
125 const VkFormatProperties formatProperties = getPhysicalDeviceFormatProperties(vki, physicalDevice, format);
133 static bool isBorderColorInt (VkFormat format, bool useStencilAspect)
135 return (!isCompressedFormat(format) && (isIntFormat(format) || isUintFormat(format) || (isDepthStencilFormat(format) && useStencilAspect)));
138 VkBorderColor getFormatBorderColor (BorderColor color, VkFormat format, bool useStencilAspect)
140 if (isBorderColorInt(format, useStencilAspect))
169 rr::GenericVec4 getFormatCustomBorderColor (tcu::Vec4 floatValue, tcu::IVec4 intValue, vk::VkFormat format, bool useStencilAspect)
171 if (isBorderColorInt(format, useStencilAspect))
181 void getLookupScaleBias (vk::VkFormat format, tcu::Vec4& lookupScale, tcu::Vec4& lookupBias, bool useStencilAspect)
183 if (!isCompressedFormat(format))
185 const auto tcuFormat = mapVkFormat(format);
204 switch (format)
239 vk::VkFormat format,
248 const tcu::TextureFormat tcuFormat = mapVkFormat(format);
297 vk::VkFormat format,
308 const VkImageAspectFlags barrierAspect = VK_IMAGE_ASPECT_DEPTH_BIT | (mapVkFormat(format).order == tcu::TextureFormat::DS ? VK_IMAGE_ASPECT_STENCIL_BIT : (VkImageAspectFlagBits)0);
310 switch (format)
327 TCU_FAIL("unrecognized format");
375 vk::VkFormat format,
387 const VkImageAspectFlags barrierAspect = VK_IMAGE_ASPECT_STENCIL_BIT | (mapVkFormat(format).order == tcu::TextureFormat::DS ? VK_IMAGE_ASPECT_DEPTH_BIT : (VkImageAspectFlagBits)0);
434 tcu::TextureFormat format,
442 const VkImageAspectFlags imageAspectFlags = getImageAspectFlags(format);
447 // Stencil-only texture should be provided if (and only if) the image has a combined DS format
448 DE_ASSERT((tcu::hasDepthComponent(format.order) && tcu::hasStencilComponent(format.order)) == (srcStencilTexture != DE_NULL));
507 getPhysicalDeviceSparseImageFormatProperties(instance, physicalDevice, imageCreateInfo.format, imageCreateInfo.imageType, imageCreateInfo.samples, imageCreateInfo.usage, imageCreateInfo.tiling);
530 tcu::TextureFormat format,
534 const VkImageAspectFlags imageAspectFlags = getImageAspectFlags(format);
544 // Stencil-only texture should be provided if (and only if) the image has a combined DS format
545 DE_ASSERT((tcu::hasDepthComponent(format.order) && tcu::hasStencilComponent(format.order)) == (srcStencilTexture != DE_NULL));
554 allocateAndBindSparseImage (vk, device, physicalDevice, instance, imageCreateInfo, imageMemoryBindSemaphore.get(), sparseQueue, allocator, allocations, format, destImage);
624 tcu::TextureFormat format;
628 format = tcu::TextureFormat(tcu::TextureFormat::D, tcu::TextureFormat::UNORM_INT16);
631 format = tcu::TextureFormat(tcu::TextureFormat::D, tcu::TextureFormat::UNSIGNED_INT_24_8_REV);
634 format = tcu::TextureFormat(tcu::TextureFormat::D, tcu::TextureFormat::FLOAT);
637 DE_FATAL("Unexpected source texture format.");
640 srcDepthTexture = srcTexture.copy(format);
672 tcu::TextureFormat format;
676 format = tcu::TextureFormat(tcu::TextureFormat::D, tcu::TextureFormat::UNORM_INT16);
679 format = tcu::TextureFormat(tcu::TextureFormat::D, tcu::TextureFormat::UNSIGNED_INT_24_8_REV);
682 format = tcu::TextureFormat(tcu::TextureFormat::D, tcu::TextureFormat::FLOAT);
685 DE_FATAL("Unexpected source texture format.");
688 srcDepthTexture = srcTexture.copy(format);
750 TestTexture::TestTexture (const tcu::TextureFormat& format, int width, int height, int depth)
756 DE_UNREF(format);
762 TestTexture::TestTexture (const tcu::CompressedTexFormat& format, int width, int height, int depth)
768 DE_UNREF(format);
996 void TestTexture::populateCompressedLevels (tcu::CompressedTexFormat format, const std::vector<tcu::PixelBufferAccess>& decompressedLevels)
1005 tcu::CompressedTexture* compressedLevel = new tcu::CompressedTexture(format, level.getWidth(), level.getHeight(), level.getDepth());
1008 if (tcu::isAstcFormat(format))
1012 format, tcu::TexDecompressionParams::ASTCMODE_LDR, random.getUint32());
1017 // Random initial values cause assertion during the decompression in case of COMPRESSEDTEXFORMAT_ETC1_RGB8 format
1018 if (format != tcu::COMPRESSEDTEXFORMAT_ETC1_RGB8)
1023 if (format == tcu::COMPRESSEDTEXFORMAT_BC7_UNORM_BLOCK || format == tcu::COMPRESSEDTEXFORMAT_BC7_SRGB_BLOCK)
1025 const int blockSize = tcu::getBlockSize(format);
1048 TestTexture1D::TestTexture1D (const tcu::TextureFormat& format, int width)
1049 : TestTexture (format, width, 1, 1)
1050 , m_texture (format, width)
1056 TestTexture1D::TestTexture1D (const tcu::CompressedTexFormat& format, int width)
1057 : TestTexture (format, width, 1, 1)
1058 , m_texture (tcu::getUncompressedFormat(format), width)
1061 TestTexture::populateCompressedLevels(format, getLevelsVector(m_texture));
1097 de::MovePtr<TestTexture> TestTexture1D::copy(const tcu::TextureFormat format) const
1101 de::MovePtr<TestTexture> texture (new TestTexture1D(format, m_texture.getWidth()));
1110 TestTexture1DArray::TestTexture1DArray (const tcu::TextureFormat& format, int width, int arraySize)
1111 : TestTexture (format, width, arraySize, 1)
1112 , m_texture (format, width, arraySize)
1118 TestTexture1DArray::TestTexture1DArray (const tcu::CompressedTexFormat& format, int width, int arraySize)
1119 : TestTexture (format, width, arraySize, 1)
1120 , m_texture (tcu::getUncompressedFormat(format), width, arraySize)
1129 TestTexture::populateCompressedLevels(format, layers);
1174 de::MovePtr<TestTexture> TestTexture1DArray::copy(const tcu::TextureFormat format) const
1178 de::MovePtr<TestTexture> texture (new TestTexture1DArray(format, m_texture.getWidth(), getArraySize()));
1187 TestTexture2D::TestTexture2D (const tcu::TextureFormat& format, int width, int height)
1188 : TestTexture (format, width, height, 1)
1189 , m_texture (format, width, height)
1195 TestTexture2D::TestTexture2D (const tcu::TextureFormat& format, int width, int height, int miplevels)
1196 : TestTexture(format, width, height, 1)
1197 , m_texture(format, width, height, miplevels)
1204 TestTexture2D::TestTexture2D (const tcu::CompressedTexFormat& format, int width, int height)
1205 : TestTexture (format, width, height, 1)
1206 , m_texture (tcu::getUncompressedFormat(format), width, height)
1209 TestTexture::populateCompressedLevels(format, getLevelsVector(m_texture));
1245 de::MovePtr<TestTexture> TestTexture2D::copy(const tcu::TextureFormat format) const
1249 de::MovePtr<TestTexture> texture (new TestTexture2D(format, m_texture.getWidth(), m_texture.getHeight(), m_texture.getNumLevels()));
1258 TestTexture2DArray::TestTexture2DArray (const tcu::TextureFormat& format, int width, int height, int arraySize)
1259 : TestTexture (format, width, height, arraySize)
1260 , m_texture (format, width, height, arraySize)
1266 TestTexture2DArray::TestTexture2DArray (const tcu::CompressedTexFormat& format, int width, int height, int arraySize)
1267 : TestTexture (format, width, height, arraySize)
1268 , m_texture (tcu::getUncompressedFormat(format), width, height, arraySize)
1277 TestTexture::populateCompressedLevels(format, layers);
1322 de::MovePtr<TestTexture> TestTexture2DArray::copy(const tcu::TextureFormat format) const
1326 de::MovePtr<TestTexture> texture (new TestTexture2DArray(format, m_texture.getWidth(), m_texture.getHeight(), getArraySize()));
1335 TestTexture3D::TestTexture3D (const tcu::TextureFormat& format, int width, int height, int depth)
1336 : TestTexture (format, width, height, depth)
1337 , m_texture (format, width, height, depth)
1343 TestTexture3D::TestTexture3D (const tcu::CompressedTexFormat& format, int width, int height, int depth)
1344 : TestTexture (format, width, height, depth)
1345 , m_texture (tcu::getUncompressedFormat(format), width, height, depth)
1348 TestTexture::populateCompressedLevels(format, getLevelsVector(m_texture));
1384 de::MovePtr<TestTexture> TestTexture3D::copy(const tcu::TextureFormat format) const
1388 de::MovePtr<TestTexture> texture (new TestTexture3D(format, m_texture.getWidth(), m_texture.getHeight(), m_texture.getDepth()));
1407 TestTextureCube::TestTextureCube (const tcu::TextureFormat& format, int size)
1408 : TestTexture (format, size, size, 1)
1409 , m_texture (format, size)
1421 TestTextureCube::TestTextureCube (const tcu::CompressedTexFormat& format, int size)
1422 : TestTexture (format, size, size, 1)
1423 , m_texture (tcu::getUncompressedFormat(format), size)
1436 TestTexture::populateCompressedLevels(format, levels);
1473 de::MovePtr<TestTexture> TestTextureCube::copy(const tcu::TextureFormat format) const
1477 de::MovePtr<TestTexture> texture (new TestTextureCube(format, m_texture.getSize()));
1486 TestTextureCubeArray::TestTextureCubeArray (const tcu::TextureFormat& format, int size, int arraySize)
1487 : TestTexture (format, size, size, arraySize)
1488 , m_texture (format, size, arraySize)
1494 TestTextureCubeArray::TestTextureCubeArray (const tcu::CompressedTexFormat& format, int size, int arraySize)
1495 : TestTexture (format, size, size, arraySize)
1496 , m_texture (tcu::getUncompressedFormat(format), size, arraySize)
1507 TestTexture::populateCompressedLevels(format, layers);
1552 de::MovePtr<TestTexture> TestTextureCubeArray::copy(const tcu::TextureFormat format) const
1556 de::MovePtr<TestTexture> texture (new TestTextureCubeArray(format, m_texture.getSize(), getArraySize()));