Fixes sparse_resources.shader_intrinsics.* tests to check for device feature support.
authorPetros Bantolas <petros.bantolas@imgtec.com>
Fri, 26 Aug 2016 14:25:45 +0000 (15:25 +0100)
committerPetros Bantolas <Petros.Bantolas@imgtec.com>
Tue, 30 Aug 2016 14:44:15 +0000 (10:44 -0400)
Change-Id: Ie3461ae4ec32b1f431b21ba7c6f453bde70834c7

external/vulkancts/modules/vulkan/sparse_resources/vktSparseResourcesShaderIntrinsicsBase.cpp

index 22f3432..12aa864 100644 (file)
@@ -201,6 +201,9 @@ tcu::TestStatus SparseShaderIntrinsicsInstanceBase::iterate (void)
        if (!checkSparseSupportForImageType(instance, physicalDevice, m_imageType))
                TCU_THROW(NotSupportedError, "Sparse residency for image type is not supported");
 
+       if (!getPhysicalDeviceFeatures(instance, physicalDevice).shaderResourceResidency)
+               TCU_THROW(NotSupportedError, "Sparse resource residency information not supported in shader code.");
+
        imageSparseInfo.sType                                   = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO;
        imageSparseInfo.pNext                                   = DE_NULL;
        imageSparseInfo.flags                                   = VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT | VK_IMAGE_CREATE_SPARSE_BINDING_BIT;