Improve logging in dEQP-VK.api.info.device.memory_properties
authorPyry Haulos <phaulos@google.com>
Mon, 21 Mar 2016 19:48:50 +0000 (12:48 -0700)
committerPyry Haulos <phaulos@google.com>
Tue, 12 Apr 2016 16:49:07 +0000 (09:49 -0700)
Change-Id: I70927510e3dce6dbc05cc0f49f24f5d331f49412
(cherry picked from commit cdf80ba37ef186bb2d8fc5a3a97dd633e6a67d85)

external/vulkancts/framework/vulkan/vkStrUtilImpl.inl
external/vulkancts/gen_framework.py
external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp [changed mode: 0755->0644]

index b30ceee..89da2cb 100644 (file)
@@ -1753,9 +1753,9 @@ std::ostream& operator<< (std::ostream& s, const VkPhysicalDeviceMemoryPropertie
 {
        s << "VkPhysicalDeviceMemoryProperties = {\n";
        s << "\tmemoryTypeCount = " << value.memoryTypeCount << '\n';
 {
        s << "VkPhysicalDeviceMemoryProperties = {\n";
        s << "\tmemoryTypeCount = " << value.memoryTypeCount << '\n';
-       s << "\tmemoryTypes = " << '\n' << tcu::formatArray(DE_ARRAY_BEGIN(value.memoryTypes), DE_ARRAY_END(value.memoryTypes)) << '\n';
+       s << "\tmemoryTypes = " << '\n' << tcu::formatArray(DE_ARRAY_BEGIN(value.memoryTypes), DE_ARRAY_BEGIN(value.memoryTypes) + value.memoryTypeCount) << '\n';
        s << "\tmemoryHeapCount = " << value.memoryHeapCount << '\n';
        s << "\tmemoryHeapCount = " << value.memoryHeapCount << '\n';
-       s << "\tmemoryHeaps = " << '\n' << tcu::formatArray(DE_ARRAY_BEGIN(value.memoryHeaps), DE_ARRAY_END(value.memoryHeaps)) << '\n';
+       s << "\tmemoryHeaps = " << '\n' << tcu::formatArray(DE_ARRAY_BEGIN(value.memoryHeaps), DE_ARRAY_BEGIN(value.memoryHeaps) + value.memoryHeapCount) << '\n';
        s << '}';
        return s;
 }
        s << '}';
        return s;
 }
index 3d10ef9..deae330 100644 (file)
@@ -550,8 +550,12 @@ def writeStrUtilImpl (api, filename):
                                                newLine = "'\\n' << "
                                                valFmt = "tcu::formatArray(tcu::Format::HexIterator<%s>(DE_ARRAY_BEGIN(value.%s)), tcu::Format::HexIterator<%s>(DE_ARRAY_END(value.%s)))" % (member.type, baseName, member.type, baseName)
                                        else:
                                                newLine = "'\\n' << "
                                                valFmt = "tcu::formatArray(tcu::Format::HexIterator<%s>(DE_ARRAY_BEGIN(value.%s)), tcu::Format::HexIterator<%s>(DE_ARRAY_END(value.%s)))" % (member.type, baseName, member.type, baseName)
                                        else:
+                                               if baseName == "memoryTypes" or baseName == "memoryHeaps":
+                                                       endIter = "DE_ARRAY_BEGIN(value.%s) + value.%sCount" % (baseName, baseName[:-1])
+                                               else:
+                                                       endIter = "DE_ARRAY_END(value.%s)" % baseName
                                                newLine = "'\\n' << "
                                                newLine = "'\\n' << "
-                                               valFmt = "tcu::formatArray(DE_ARRAY_BEGIN(value.%s), DE_ARRAY_END(value.%s))" % (baseName, baseName)
+                                               valFmt = "tcu::formatArray(DE_ARRAY_BEGIN(value.%s), %s)" % (baseName, endIter)
                                        memberName = baseName
                                else:
                                        valFmt = "value.%s" % member.name
                                        memberName = baseName
                                else:
                                        valFmt = "value.%s" % member.name