| 19 | class NegativeVertexInput : public VkLayerTest {}; |
| 20 | |
| 21 | TEST_F(NegativeVertexInput, AttributeFormat) { |
| 22 | TEST_DESCRIPTION("Test that pipeline validation catches invalid vertex attribute formats"); |
| 23 | |
| 24 | RETURN_IF_SKIP(Init()); |
| 25 | InitRenderTarget(); |
| 26 | |
| 27 | VkVertexInputBindingDescription input_binding = {0, 4, VK_VERTEX_INPUT_RATE_VERTEX}; |
| 28 | |
| 29 | VkVertexInputAttributeDescription input_attribs; |
| 30 | memset(&input_attribs, 0, sizeof(input_attribs)); |
| 31 | |
| 32 | // Pick a really bad format for this purpose and make sure it should fail |
| 33 | input_attribs.format = VK_FORMAT_BC2_UNORM_BLOCK; |
| 34 | if ((m_device->FormatFeaturesBuffer(VK_FORMAT_BC2_UNORM_BLOCK) & VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT) != 0) { |
| 35 | GTEST_SKIP() << "Format unsuitable for test"; |
| 36 | } |
| 37 | |
| 38 | input_attribs.location = 0; |
| 39 | |
| 40 | auto set_info = [&](CreatePipelineHelper& helper) { |
| 41 | helper.vi_ci_.pVertexBindingDescriptions = &input_binding; |
| 42 | helper.vi_ci_.vertexBindingDescriptionCount = 1; |
| 43 | helper.vi_ci_.pVertexAttributeDescriptions = &input_attribs; |
| 44 | helper.vi_ci_.vertexAttributeDescriptionCount = 1; |
| 45 | }; |
| 46 | CreatePipelineHelper::OneshotTest(*this, set_info, kErrorBit, "VUID-VkVertexInputAttributeDescription-format-00623"); |
| 47 | } |
| 48 | |
| 49 | TEST_F(NegativeVertexInput, DivisorExtension) { |
| 50 | TEST_DESCRIPTION("Test VUIDs added with VK_EXT_vertex_attribute_divisor extension."); |
nothing calls this directly
no test coverage detected