layers: GH-909 level/layer Valid Usage checking
authorMike Weiblen <mikew@lunarg.com>
Tue, 24 Jan 2017 20:08:42 +0000 (13:08 -0700)
committerMike Weiblen <mikew@lunarg.com>
Fri, 27 Jan 2017 17:41:56 +0000 (10:41 -0700)
commit0bb17d975de61f7b223797e1772b81cd0ab8d43c
treea885910732f0e1dc553ffc370087beb30f3263be
parent8d5226c619572dacf4778aa95dc51a98557f9554
layers: GH-909 level/layer Valid Usage checking

Refactor subresourceRange.levelCount and subresourceRange.layerCount
checking from PreCallValidateCreateImageView() into a standalone
helper function ValidateImageSubrangeLevelLayerCounts() to facilitate
reuse below.

Add ValidateImageSubrangeLevelLayerCounts() to ValidateBarrier(), to
address GH-909.

This extends the reuse of Valid Usages 00768 and 00769, which are
already tagged as deserving new standalone Valid Usages.
This change is implemented such that it will be simple to modify for
new VUs, once they're available.

Also canonicalize function names passed as parameter to helper
function.

Change-Id: I8346a19e9b2c4df578334c2aebfb78e6492bd1d9
layers/core_validation.cpp
layers/vk_validation_error_database.txt