MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-ValidationLayers / TEST_F

Function TEST_F

tests/unit/best_practices_arm.cpp:39–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37// Tests for Arm-specific best practices
38
39TEST_F(NegativeBestPracticesARM, TooManySamples) {
40 TEST_DESCRIPTION("Test for multisampled images with too many samples");
41 RETURN_IF_SKIP(InitBestPracticesFramework(kEnableArmValidation));
42 RETURN_IF_SKIP(InitState());
43
44 auto image_ci = vkt::Image::ImageCreateInfo2D(1920, 1080, 1, 1, VK_FORMAT_R8G8B8A8_UNORM,
45 VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT);
46 image_ci.samples = VK_SAMPLE_COUNT_8_BIT;
47
48 VkImageFormatProperties img_limits;
49 VkResult res = GetImageFormatProps(Gpu(), image_ci, img_limits);
50 if (res != VK_SUCCESS || (img_limits.sampleCounts & VK_SAMPLE_COUNT_8_BIT) == 0) {
51 GTEST_SKIP() << "Required format not supported";
52 }
53
54 VkImage image = VK_NULL_HANDLE;
55 m_errorMonitor->SetDesiredFailureMsg(kPerformanceWarningBit, "BestPractices-Arm-vkCreateImage-too-large-sample-count");
56 vk::CreateImage(device(), &image_ci, nullptr, &image);
57 m_errorMonitor->VerifyFound();
58
59 if (image) {
60 vk::DestroyImage(device(), image, nullptr);
61 }
62}
63
64TEST_F(NegativeBestPracticesARM, NonTransientMSImage) {
65 TEST_DESCRIPTION("Test for non-transient multisampled images");

Callers

nothing calls this directly

Calls 15

GetImageFormatPropsFunction · 0.85
CreateImageFunction · 0.85
DestroyImageFunction · 0.85
CreateRenderPassFunction · 0.85
CmdBindPipelineFunction · 0.85
CmdBindIndexBufferFunction · 0.85
CmdDrawIndexedFunction · 0.85
FreeDescriptorSetsFunction · 0.85
ResetCommandPoolFunction · 0.85
CreateSwapchainKHRFunction · 0.85

Tested by

no test coverage detected