Added vertex input attribute offset size chek to the drawPrimitives() method.
authorPeter Siket <ps.szeged@partner.samsung.com>
Thu, 19 May 2016 07:57:25 +0000 (09:57 +0200)
committerPeter Siket <ps.szeged@partner.samsung.com>
Thu, 19 May 2016 07:57:25 +0000 (09:57 +0200)
external/vulkancts/modules/vulkan/rasterization/vktRasterizationTests.cpp

index 3792b36..3ce3290 100644 (file)
@@ -639,6 +639,14 @@ void BaseRenderingTestInstance::drawPrimitives (tcu::Surface& result, const std:
        Move<VkPipeline>                                                        graphicsPipeline;
        Move<VkBuffer>                                                          vertexBuffer;
        de::MovePtr<Allocation>                                         vertexBufferMemory;
+       const VkPhysicalDeviceProperties                        properties                              = m_context.getDeviceProperties();
+       
+       if (attributeBatchSize > properties.limits.maxVertexInputAttributeOffset)
+       {
+               std::stringstream message;
+               message << "Larger vertex input attribute offset is needed (" << attributeBatchSize << ") than the available maximum (" << properties.limits.maxVertexInputAttributeOffset << ").";
+               TCU_THROW(NotSupportedError, message.str().c_str());
+       }
 
        // Create Graphics Pipeline
        {