message: Update object-to-ResourceId patching for new debug message format
diff: @@ -3107,7 +3107,7 @@ void WrappedVulkan::Serialise_DebugMessages(SerialiserType &ser)
  DebugMessages.swap(sink->msgs);
  // if we have the unique objects layer we can assume all objects have a unique ID, and replace
  - // any text that looks like an object reference (0xHEX).
  + // any text that looks like an object reference (0xHEX[NAME]).
  if(m_LayersEnabled[VkCheckLayer_unique_objects])
  {
  for(DebugMessage &msg : DebugMessages)
  @@ -3153,20 +3153,39 @@ void WrappedVulkan::Serialise_DebugMessages(SerialiserType &ser)
  }
  }
  + // we now expect a [NAME]. Look for matched set of []s
  + if(desc[end] == '[')
  + {
  + int depth = 1;
  + end++;
  +
  + while(end < desc.length() && depth)
  + {
  + if(desc[end] == '[')
  + depth++;
  + else if(desc[end] == ']')
  + depth--;
  +
  + end++;
  + }
  +
  // unique objects layer implies this is a unique search so we don't have to worry
  // about type aliases
  ResourceId id = GetResourceManager()->GetFirstIDForHandle(val);
  if(id != ResourceId())
  {
  - std::string idstr = StringFormat::Fmt(" (%s)", ToStr(id).c_str());
  + std::string idstr = ToStr(id);
  - desc.insert(end, idstr.c_str());
  + desc.erase(offs, end - offs);
  - offs = desc.find("0x", end + idstr.length());
  + desc.insert(offs, idstr.c_str());
  +
  + offs = desc.find("0x", offs + idstr.length());
  continue;
  }
  }
  + }
  offs = desc.find("0x", offs + 1);
  }
  