From 385fccab037e2dc20fd6f3f94ef2ad2ed261e9df Mon Sep 17 00:00:00 2001 From: Peter Siket Date: Thu, 19 May 2016 09:57:25 +0200 Subject: [PATCH] Added vertex input attribute offset size chek to the drawPrimitives() method. --- .../vulkan/rasterization/vktRasterizationTests.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/external/vulkancts/modules/vulkan/rasterization/vktRasterizationTests.cpp b/external/vulkancts/modules/vulkan/rasterization/vktRasterizationTests.cpp index 3792b360a..3ce3290e2 100644 --- a/external/vulkancts/modules/vulkan/rasterization/vktRasterizationTests.cpp +++ b/external/vulkancts/modules/vulkan/rasterization/vktRasterizationTests.cpp @@ -639,6 +639,14 @@ void BaseRenderingTestInstance::drawPrimitives (tcu::Surface& result, const std: Move graphicsPipeline; Move vertexBuffer; de::MovePtr 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 { -- 2.34.1