]> git.cworth.org Git - apitrace/blobdiff - retrace/retrace_swizzle.cpp
Dump depth textures as a single image (issue #97).
[apitrace] / retrace / retrace_swizzle.cpp
index 693fdfeb375a5bbd9fd315801a3717ca973d3db8..a7e777d45cba26e8da0abe4a6bf92900a1db5162 100644 (file)
@@ -75,6 +75,12 @@ lowerBound(unsigned long long address) {
         }
     }
 
+#ifndef NDEBUG
+    if (it != regionMap.end()) {
+        assert(contains(it, address) || it->first > address);
+    }
+#endif
+
     return it;
 }
 
@@ -83,6 +89,12 @@ static RegionMap::iterator
 upperBound(unsigned long long address) {
     RegionMap::iterator it = regionMap.upper_bound(address);
 
+#ifndef NDEBUG
+    if (it != regionMap.end()) {
+        assert(it->first >= address);
+    }
+#endif
+
     return it;
 }