GetLiveHandle / GetCurrentHandle should return wrapped object

This commit is contained in:
baldurk
2015-09-19 17:12:02 +02:00
parent 2559907c17
commit d081efe65c
3 changed files with 5 additions and 7 deletions
+2 -2
View File
@@ -1346,13 +1346,13 @@ bool WrappedVulkan::Serialise_vkQueueSubmit(
ResourceId partial = GetResID(PartialCmdBuf());
RDCDEBUG("Queue Submit partial replay of %llu at %u, using %llu", cmdIds[c], eid, partial);
trimmedCmdIds.push_back(partial);
trimmedCmds.push_back(PartialCmdBuf());
trimmedCmds.push_back(Unwrap(PartialCmdBuf()));
}
else if(m_LastEventID >= end)
{
RDCDEBUG("Queue Submit full replay %llu", cmdIds[c]);
trimmedCmdIds.push_back(cmdIds[c]);
trimmedCmds.push_back(GetResourceManager()->GetLiveHandle<VkCmdBuffer>(cmdIds[c]));
trimmedCmds.push_back(Unwrap(GetResourceManager()->GetLiveHandle<VkCmdBuffer>(cmdIds[c])));
}
else
{
+1 -1
View File
@@ -239,7 +239,7 @@ void VulkanResourceManager::SerialiseImageStates(Serialiser *m_pSerialiser, map<
t.outputMask = 0;
t.srcQueueFamilyIndex = 0;
t.destQueueFamilyIndex = 0;
t.image = GetCurrentHandle<VkImage>(liveid);
t.image = Unwrap(GetCurrentHandle<VkImage>(liveid));
t.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED;
t.newLayout = state.state;
t.subresourceRange = state.range;
+2 -4
View File
@@ -75,15 +75,13 @@ class VulkanResourceManager : public ResourceManager<WrappedVkRes*, RealVkRes, V
template<typename realtype>
realtype GetLiveHandle(ResourceId origid)
{
RealVkRes &res = ((typename UnwrapHelper<realtype>::ParentType *)ResourceManager::GetLiveResource(origid))->real;
return res.As<realtype>();
return realtype( (uint64_t) ((typename UnwrapHelper<realtype>::ParentType *)ResourceManager::GetLiveResource(origid)) );
}
template<typename realtype>
realtype GetCurrentHandle(ResourceId id)
{
RealVkRes &res = ((typename UnwrapHelper<realtype>::ParentType *)ResourceManager::GetCurrentResource(id))->real;
return res.As<realtype>();
return realtype( (uint64_t) ((typename UnwrapHelper<realtype>::ParentType *)ResourceManager::GetCurrentResource(id)) );
}
// handling memory & image transitions