From 7b3eaf4ad96b307fa75bddea1bbd9938893ef665 Mon Sep 17 00:00:00 2001 From: John Zulauf Date: Wed, 3 Jan 2018 08:47:35 -0700 Subject: icd: GetImageSubresourceLayout zeros passed layout Calling tests use return values from GetImageSubresourceLayout to compute offsets in texures. Zero'd values are safe for this usage and add minimal overhead to icd. Change-Id: If52cf240925d2f7a41bb22d87519a918be5eb60a --- scripts/mock_icd_generator.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scripts') diff --git a/scripts/mock_icd_generator.py b/scripts/mock_icd_generator.py index de8a9066..38895215 100644 --- a/scripts/mock_icd_generator.py +++ b/scripts/mock_icd_generator.py @@ -663,6 +663,10 @@ CUSTOM_C_INTERCEPTS = { } mapped_memory_map.erase(memory); ''', +'vkGetImageSubresourceLayout': ''' + // Need safe values. Callers are computing memory offsets from pLayout, with no return code to flag failure. + *pLayout = VkSubresourceLayout(); // Default constructor zero values. +''', } # MockICDGeneratorOptions - subclass of GeneratorOptions. -- cgit v1.2.3