diff options
author | Petr Kraus <petr_kraus@email.cz> | 2019-08-10 01:17:44 +0200 |
---|---|---|
committer | Mark Lobodzinski <mark@lunarg.com> | 2019-08-12 13:36:15 -0600 |
commit | 2047c7e5d575716472d37096b620aa41bf910169 (patch) | |
tree | 514374f735e79d56e379f9aa22ad792667577ead /tests/layer_validation_tests.cpp | |
parent | 341bffb52bb370a5ce28073d88250940603f8548 (diff) | |
download | vulkan-validation-layers-2047c7e5d575716472d37096b620aa41bf910169.tar.gz |
tests: Fix OOBA, using `sizeof` on array
Diffstat (limited to 'tests/layer_validation_tests.cpp')
-rw-r--r-- | tests/layer_validation_tests.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/layer_validation_tests.cpp b/tests/layer_validation_tests.cpp index cebf2f782..19572ffaf 100644 --- a/tests/layer_validation_tests.cpp +++ b/tests/layer_validation_tests.cpp @@ -27,8 +27,8 @@ #include "layer_validation_tests.h" VkFormat FindSupportedDepthStencilFormat(VkPhysicalDevice phy) { - VkFormat ds_formats[] = {VK_FORMAT_D16_UNORM_S8_UINT, VK_FORMAT_D24_UNORM_S8_UINT, VK_FORMAT_D32_SFLOAT_S8_UINT}; - for (uint32_t i = 0; i < sizeof(ds_formats); i++) { + const VkFormat ds_formats[] = {VK_FORMAT_D16_UNORM_S8_UINT, VK_FORMAT_D24_UNORM_S8_UINT, VK_FORMAT_D32_SFLOAT_S8_UINT}; + for (uint32_t i = 0; i < size(ds_formats); ++i) { VkFormatProperties format_props; vkGetPhysicalDeviceFormatProperties(phy, ds_formats[i], &format_props); |