layers: Add pNext parameter checking
authorDustin Graves <dustin@lunarg.com>
Wed, 9 Mar 2016 00:48:20 +0000 (17:48 -0700)
committerDustin Graves <dustin@lunarg.com>
Fri, 11 Mar 2016 23:15:30 +0000 (16:15 -0700)
commit401164266a64aaa506224c173962a31f689f6b4c
tree0e12fef8ae9266d1a3e862271798f591e9b27ca2
parent5b36f92f8d4aa4bbb218492e139636b688a9e9c4
layers: Add pNext parameter checking

Validate pNext based on the validextensionstructs tag from the XML
registry.  If the tag provides a list of valid structures, walk the
pNext list and check each node's sType value agains the
VkStructureType value associated with the structs from the list.
If no valid structure list is provided, ensure that pNext is NULL.

Invalid struct types produce errors similar to the following:
ERROR: [PARAMCHECK] Code 1 : vkCreateImage: pCreateInfo->pNext chain
 includes a structure with unexpected VkStructureType
 VK_STRUCTURE_TYPE_APPLICATION_INFO; Allowed structures are
 [VkInstanceCreateInfo, VkDeviceCreateInfo]

Change-Id: I2c2471a068cb304120c66cb4156331999f8548cd
generator.py
layers/param_checker_utils.h