| 37 | // Tests for Arm-specific best practices |
| 38 | |
| 39 | TEST_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 | |
| 64 | TEST_F(NegativeBestPracticesARM, NonTransientMSImage) { |
| 65 | TEST_DESCRIPTION("Test for non-transient multisampled images"); |
nothing calls this directly
no test coverage detected