windows: clean up windows compile issues
authorTony Barbour <tony@LunarG.com>
Sat, 11 Jul 2015 00:32:33 +0000 (18:32 -0600)
committerCourtney Goeltzenleuchter <courtney@LunarG.com>
Fri, 17 Jul 2015 16:05:22 +0000 (10:05 -0600)
Conflicts:
layers/object_track.h
vk-layer-generate.py

icd/nulldrv/nulldrv.c
layers/mem_tracker.cpp
layers/object_track.h
vk-layer-generate.py

index 867b3db7aede78926eed87fa42af0924759f067d..1a90be05e51e935d8ff6af8973ba6a29ad97d3ae 100644 (file)
@@ -464,7 +464,7 @@ static VkResult nulldrv_pipeline_layout_create(struct nulldrv_dev *dev,
     return VK_SUCCESS;
 }
 
-static struct nulldrv_desc_layout *nulldrv_desc_layout(VkDescriptorSetLayout layout)
+static struct nulldrv_desc_layout *nulldrv_desc_layout(const VkDescriptorSetLayout layout)
 {
     return *(struct nulldrv_desc_layout **) &layout;
 }
@@ -2240,7 +2240,7 @@ ICD_EXPORT VkResult VKAPI vkAllocDescriptorSets(
 
     for (i = 0; i < count; i++) {
         const struct nulldrv_desc_layout *layout =
-            nulldrv_desc_layout((VkDescriptorSetLayout) pSetLayouts[i]);
+            nulldrv_desc_layout(pSetLayouts[i]);
 
         ret = nulldrv_desc_set_create(dev, pool, setUsage, layout,
                 (struct nulldrv_desc_set **) &pDescriptorSets[i]);
index e6b6753a6d889a2d47fbab184950bb007f4c9850..39a48bf60fd9c0dd614ef436870236710412e645 100644 (file)
@@ -1760,6 +1760,7 @@ VK_LAYER_EXPORT VkResult VKAPI vkDestroyFramebuffer(VkDevice device, VkFramebuff
     }
     loader_platform_thread_unlock_mutex(&globalLock);
     VkResult result = get_dispatch_table(mem_tracker_device_table_map, device)->DestroyFramebuffer(device, framebuffer);
+    return result;
 }
 
 VK_LAYER_EXPORT VkResult VKAPI vkDestroyDynamicViewportState(VkDevice device, VkDynamicViewportState dynamicViewportState)
index 636a090ab18ebad19ae903fb9c863071fb0f039a..d163076c3a28fd2c46408c7b7aaafae6eb5c2032 100644 (file)
@@ -343,7 +343,7 @@ static void validate_object(VkQueue dispatchable_object, VkBuffer object)
 {
     if (VkBufferMap.find((void*)object.handle) != VkBufferMap.end()) {
         log_msg(mdd(dispatchable_object), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType) 0, object.handle, 0, OBJTRACK_INVALID_OBJECT, "OBJTRACK",
-            "Invalid VkBuffer Object %p",reinterpret_cast<VkUintPtrLeast64>(object.handle));
+            "Invalid VkBuffer Object %p", object.handle);
     }
 }
 
@@ -357,9 +357,9 @@ static void set_status(VkQueue dispatchable_object, VkFence object, VkDbgObjectT
         }
         else {
             // If we do not find it print an error
-            log_msg(mdd(dispatchable_object), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType) 0, reinterpret_cast<VkUintPtrLeast64>(object.handle), 0, OBJTRACK_NONE, "OBJTRACK",
+            log_msg(mdd(dispatchable_object), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType) 0, object.handle, 0, OBJTRACK_NONE, "OBJTRACK",
                 "Unable to set status for non-existent object 0x%" PRIxLEAST64 " of %s type",
-                reinterpret_cast<VkUintPtrLeast64>(object.handle), string_VkDbgObjectType(objType));
+                object.handle, string_VkDbgObjectType(objType));
         }
     }
 }
@@ -368,7 +368,7 @@ static void validate_object(VkQueue dispatchable_object, VkSemaphore object)
 {
     if (VkSemaphoreMap.find((void*)object.handle) == VkSemaphoreMap.end()) {
         log_msg(mdd(dispatchable_object), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType) 0, object.handle, 0, OBJTRACK_INVALID_OBJECT, "OBJTRACK",
-            "Invalid VkSemaphore Object %p",reinterpret_cast<VkUintPtrLeast64>(object.handle));
+            "Invalid VkSemaphore Object %p", object.handle);
     }
 }
 
index 441a54cfad6f319279cbb904b666cb7f7e320ee0..c44b0f85fa97a3d7ebecf936ce1b3179273a837c 100755 (executable)
@@ -1074,7 +1074,7 @@ class ObjectTrackerSubcommand(Subcommand):
                 procs_txt.append('{')
                 procs_txt.append('    log_msg(mdd(dispatchable_object), VK_DBG_REPORT_INFO_BIT, objType, vkObj.handle, 0, OBJTRACK_NONE, "OBJTRACK",')
                 procs_txt.append('        "OBJ[%llu] : CREATE %s object 0x%" PRIxLEAST64 , object_track_index++, string_VkDbgObjectType(objType),')
-                procs_txt.append('        reinterpret_cast<VkUintPtrLeast64>(vkObj.handle));')
+                procs_txt.append('        vkObj.handle);')
             procs_txt.append('')
             procs_txt.append('    OBJTRACK_NODE* pNewObjNode = new OBJTRACK_NODE;')
             procs_txt.append('    pNewObjNode->objType = objType;')
@@ -1083,7 +1083,7 @@ class ObjectTrackerSubcommand(Subcommand):
                 procs_txt.append('    pNewObjNode->vkObj  = reinterpret_cast<VkUintPtrLeast64>(vkObj);')
                 procs_txt.append('    %sMap[vkObj] = pNewObjNode;' % (o))
             else:
-                procs_txt.append('    pNewObjNode->vkObj  = reinterpret_cast<VkUintPtrLeast64>(vkObj.handle);')
+                procs_txt.append('    pNewObjNode->vkObj  = vkObj.handle;')
                 procs_txt.append('    %sMap[(void*)vkObj.handle] = pNewObjNode;' % (o))
             procs_txt.append('    uint32_t objIndex = objTypeToIndex(objType);')
             procs_txt.append('    numObjs[objIndex]++;')
@@ -1103,7 +1103,7 @@ class ObjectTrackerSubcommand(Subcommand):
             else:
                 procs_txt.append('    if (%sMap.find((void*)object.handle) == %sMap.end()) {' % (o, o))
                 procs_txt.append('        log_msg(mdd(dispatchable_object), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType) 0, object.handle, 0, OBJTRACK_INVALID_OBJECT, "OBJTRACK",')
-                procs_txt.append('            "Invalid %s Object %%p",reinterpret_cast<VkUintPtrLeast64>(object.handle));' % o)
+                procs_txt.append('            "Invalid %s Object %%p", object.handle);' % o)
             procs_txt.append('    }')
             procs_txt.append('}')
             procs_txt.append('')
@@ -1132,7 +1132,7 @@ class ObjectTrackerSubcommand(Subcommand):
             else:
                 procs_txt.append('        log_msg(mdd(dispatchable_object), VK_DBG_REPORT_INFO_BIT, pNode->objType, object.handle, 0, OBJTRACK_NONE, "OBJTRACK",')
                 procs_txt.append('           "OBJ_STAT Destroy %s obj 0x%" PRIxLEAST64 " (%lu total objs remain & %lu %s objs).",')
-                procs_txt.append('            string_VkDbgObjectType(pNode->objType), reinterpret_cast<VkUintPtrLeast64>(object.handle), numTotalObjs, numObjs[objIndex],')
+                procs_txt.append('            string_VkDbgObjectType(pNode->objType), object.handle, numTotalObjs, numObjs[objIndex],')
             procs_txt.append('            string_VkDbgObjectType(pNode->objType));')
             procs_txt.append('        delete pNode;')
             if o in [ 'VkInstance', 'VkPhysicalDevice', 'VkDevice', 'VkQueue', 'VkCmdBuffer']:
@@ -1147,7 +1147,7 @@ class ObjectTrackerSubcommand(Subcommand):
                 procs_txt.append('    } else {')
                 procs_txt.append('        log_msg(mdd(dispatchable_object), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType) 0, object.handle, 0, OBJTRACK_NONE, "OBJTRACK",')
                 procs_txt.append('            "Unable to remove obj 0x%" PRIxLEAST64 ". Was it created? Has it already been destroyed?",')
-                procs_txt.append('           reinterpret_cast<VkUintPtrLeast64>(object.handle));')
+                procs_txt.append('            object.handle);')
                 procs_txt.append('    }')
             procs_txt.append('}')
             procs_txt.append('')
@@ -1176,7 +1176,7 @@ class ObjectTrackerSubcommand(Subcommand):
             else:
                 procs_txt.append('            log_msg(mdd(dispatchable_object), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType) 0, object.handle, 0, OBJTRACK_NONE, "OBJTRACK",')
                 procs_txt.append('                "Unable to set status for non-existent object 0x%" PRIxLEAST64 " of %s type",')
-                procs_txt.append('                reinterpret_cast<VkUintPtrLeast64>(object.handle), string_VkDbgObjectType(objType));')
+                procs_txt.append('                object.handle, string_VkDbgObjectType(objType));')
             procs_txt.append('        }')
             procs_txt.append('    }')
             procs_txt.append('}')
@@ -1201,7 +1201,6 @@ class ObjectTrackerSubcommand(Subcommand):
                 procs_txt.append('    if (%sMap.find((void*)object.handle) != %sMap.end()) {' % (o, o))
                 procs_txt.append('        OBJTRACK_NODE* pNode = %sMap[(void*)object.handle];' % (o))
             procs_txt.append('        if ((pNode->status & status_mask) != status_flag) {')
-            procs_txt.append('           char str[1024];')
             if o in [ 'VkInstance', 'VkPhysicalDevice', 'VkDevice', 'VkQueue', 'VkCmdBuffer']:
                 procs_txt.append('            log_msg(mdd(dispatchable_object), msg_flags, pNode->objType, reinterpret_cast<VkUintPtrLeast64>(object), 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK",')
                 procs_txt.append('                "OBJECT VALIDATION WARNING: %s object 0x%" PRIxLEAST64 ": %s", string_VkDbgObjectType(objType),')
@@ -1209,7 +1208,7 @@ class ObjectTrackerSubcommand(Subcommand):
             else:
                 procs_txt.append('            log_msg(mdd(dispatchable_object), msg_flags, pNode->objType, object.handle, 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK",')
                 procs_txt.append('                "OBJECT VALIDATION WARNING: %s object 0x%" PRIxLEAST64 ": %s", string_VkDbgObjectType(objType),')
-                procs_txt.append('                 reinterpret_cast<VkUintPtrLeast64>(object.handle), fail_msg);')
+                procs_txt.append('                 object.handle, fail_msg);')
             procs_txt.append('            return VK_FALSE;')
             procs_txt.append('        }')
             procs_txt.append('        return VK_TRUE;')
@@ -1223,7 +1222,7 @@ class ObjectTrackerSubcommand(Subcommand):
             else:
                 procs_txt.append('        log_msg(mdd(dispatchable_object), msg_flags, (VkDbgObjectType) 0, object.handle, 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK",')
                 procs_txt.append('            "Unable to obtain status for non-existent object 0x%" PRIxLEAST64 " of %s type",')
-                procs_txt.append('            reinterpret_cast<VkUintPtrLeast64>(object.handle), string_VkDbgObjectType(objType));')
+                procs_txt.append('            object.handle, string_VkDbgObjectType(objType));')
             procs_txt.append('        return VK_FALSE;')
             procs_txt.append('    }')
             procs_txt.append('}')
@@ -1251,7 +1250,7 @@ class ObjectTrackerSubcommand(Subcommand):
             else:
                 procs_txt.append('        log_msg(mdd(dispatchable_object), VK_DBG_REPORT_ERROR_BIT, objType, object.handle, 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK",')
                 procs_txt.append('            "Unable to reset status for non-existent object 0x%" PRIxLEAST64 " of %s type",')
-                procs_txt.append('            reinterpret_cast<VkUintPtrLeast64>(object.handle), string_VkDbgObjectType(objType));')
+                procs_txt.append('            object.handle, string_VkDbgObjectType(objType));')
             procs_txt.append('    }')
             procs_txt.append('}')
             procs_txt.append('')
@@ -1275,7 +1274,7 @@ class ObjectTrackerSubcommand(Subcommand):
             gedi_txt.append('        OBJTRACK_NODE* pNode = it->second;')
             gedi_txt.append('        log_msg(mid(instance), VK_DBG_REPORT_ERROR_BIT, pNode->objType, pNode->vkObj, 0, OBJTRACK_OBJECT_LEAK, "OBJTRACK",')
             gedi_txt.append('                "OBJ ERROR : %s object 0x%" PRIxLEAST64 " has not been destroyed.", string_VkDbgObjectType(pNode->objType),')
-            gedi_txt.append('                reinterpret_cast<VkUintPtrLeast64>(pNode->vkObj));')
+            gedi_txt.append('                pNode->vkObj);')
             gedi_txt.append('    }')
             gedi_txt.append('')
         gedi_txt.append('    dispatch_key key = get_dispatch_key(instance);')
@@ -1318,7 +1317,7 @@ class ObjectTrackerSubcommand(Subcommand):
             gedd_txt.append('        OBJTRACK_NODE* pNode = it->second;')
             gedd_txt.append('        log_msg(mdd(device), VK_DBG_REPORT_ERROR_BIT, pNode->objType, pNode->vkObj, 0, OBJTRACK_OBJECT_LEAK, "OBJTRACK",')
             gedd_txt.append('                "OBJ ERROR : %s object 0x%" PRIxLEAST64 " has not been destroyed.", string_VkDbgObjectType(pNode->objType),')
-            gedd_txt.append('                reinterpret_cast<VkUintPtrLeast64>(pNode->vkObj));')
+            gedd_txt.append('                pNode->vkObj);')
             gedd_txt.append('    }')
             gedd_txt.append('')
         gedd_txt.append("    // Clean up Queue's MemRef Linked Lists")
@@ -1346,7 +1345,7 @@ class ObjectTrackerSubcommand(Subcommand):
             cbv_txt.append('{')
             cbv_txt.append('    if (%sMap.find((void*)object.handle) == %sMap.end()) {' % (o, o))
             cbv_txt.append('        log_msg(mdd(dispatchable_object), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType) 0, object.handle, 0, OBJTRACK_INVALID_OBJECT, "OBJTRACK",')
-            cbv_txt.append('            "Invalid %s Object %%p",reinterpret_cast<VkUintPtrLeast64>(object.handle));' % (o))
+            cbv_txt.append('            "Invalid %s Object %%p", object.handle);' % (o))
             cbv_txt.append('    }')
             cbv_txt.append('}')
             cbv_txt.append('')