header_txt.append(' validate_status((void*)pObj, VK_OBJECT_TYPE_CMD_BUFFER, OBJSTATUS_DEPTH_STENCIL_BOUND, OBJSTATUS_DEPTH_STENCIL_BOUND, VK_DBG_MSG_UNKNOWN, OBJTRACK_DEPTH_STENCIL_NOT_BOUND, "Depth-stencil object not bound to this command buffer");')
header_txt.append('}')
header_txt.append('')
- header_txt.append('static void validate_memory_mapping_status(const VK_GPU_MEMORY* pMemRefs, uint32_t numRefs) {')
- header_txt.append(' uint32_t i;')
- header_txt.append(' for (i = 0; i < numRefs; i++) {')
- header_txt.append(' if (pMemRefs[i]) {')
- header_txt.append(' // If mem reference is in a presentable image memory list, skip the check of the GPU_MEMORY list')
- header_txt.append(' if (!validate_status((void *)pMemRefs[i], VK_OBJECT_TYPE_PRESENTABLE_IMAGE_MEMORY, OBJSTATUS_NONE, OBJSTATUS_NONE, VK_DBG_MSG_UNKNOWN, OBJTRACK_NONE, NULL) == VK_TRUE)')
- header_txt.append(' {')
- header_txt.append(' validate_status((void *)pMemRefs[i], VK_OBJECT_TYPE_GPU_MEMORY, OBJSTATUS_GPU_MEM_MAPPED, OBJSTATUS_NONE, VK_DBG_MSG_ERROR, OBJTRACK_GPU_MEM_MAPPED, "A Mapped Memory Object was referenced in a command buffer");')
- header_txt.append(' }')
- header_txt.append(' }')
- header_txt.append(' }')
- header_txt.append('}')
- header_txt.append('')
- header_txt.append('static void validate_mem_ref_count(uint32_t numRefs) {')
- header_txt.append(' if (maxMemReferences == 0) {')
- header_txt.append(' char str[1024];')
- header_txt.append(' sprintf(str, "vkQueueSubmit called before calling vkGetGpuInfo");')
- header_txt.append(' layerCbMsg(VK_DBG_MSG_WARNING, VK_VALIDATION_LEVEL_0, NULL, 0, OBJTRACK_GETGPUINFO_NOT_CALLED, "OBJTRACK", str);')
- header_txt.append(' } else {')
- header_txt.append(' if (numRefs > maxMemReferences) {')
- header_txt.append(' char str[1024];')
- header_txt.append(' sprintf(str, "vkQueueSubmit Memory reference count (%d) exceeds allowable GPU limit (%d)", numRefs, maxMemReferences);')
- header_txt.append(' layerCbMsg(VK_DBG_MSG_ERROR, VK_VALIDATION_LEVEL_0, NULL, 0, OBJTRACK_MEMREFCOUNT_MAX_EXCEEDED, "OBJTRACK", str);')
- header_txt.append(' }')
- header_txt.append(' }')
- header_txt.append('}')
- header_txt.append('')
header_txt.append('static void setGpuQueueInfoState(void *pData) {')
header_txt.append(' maxMemReferences = ((VK_PHYSICAL_GPU_QUEUE_PROPERTIES *)pData)->maxMemReferences;')
header_txt.append('}')