Respect maxColorAttachments in image tests
authorSteve Hill <hills@broadcom.com>
Tue, 28 Mar 2017 12:40:59 +0000 (13:40 +0100)
committerPyry Haulos <phaulos@google.com>
Fri, 31 Mar 2017 16:46:54 +0000 (12:46 -0400)
Tests in the image section were using up to 8 framebuffer
attachments.  The minumum required number is 4.

Affects:

dEQP-VK.pipeline.image.sampling_type.*.count_8.*

Components: Vulkan

VK-GL-CTS issue: 192

Change-Id: I21d957f17ec5ef7f9efc8d49f91c7a6d521da053

external/vulkancts/modules/vulkan/pipeline/vktPipelineImageSamplingInstance.cpp

index 310910a..6ea4ac6 100644 (file)
@@ -160,6 +160,9 @@ ImageSamplingInstance::ImageSamplingInstance (Context&                                                      context,
        if (!isSupportedSamplableFormat(context.getInstanceInterface(), context.getPhysicalDevice(), imageFormat))
                throw tcu::NotSupportedError(std::string("Unsupported format for sampling: ") + getFormatName(imageFormat));
 
+       if ((deUint32)imageCount > context.getDeviceProperties().limits.maxColorAttachments)
+               throw tcu::NotSupportedError(std::string("Unsupported render target count: ") + de::toString(imageCount));
+
        if ((samplerParams.minFilter == VK_FILTER_LINEAR ||
                 samplerParams.magFilter == VK_FILTER_LINEAR ||
                 samplerParams.mipmapMode == VK_SAMPLER_MIPMAP_MODE_LINEAR) &&