Add fatal (device lost/out of memory) error checking to backends

* We check for errors to try to catch them as soon as possible, and early-out
  return even in the middle of functions. The idea being even if this leaves us
  in a weird state we won't get called again as the replay controller will
  detect the error and substitute out a dummy driver.
This commit is contained in:
baldurk committed 2021-08-18 20:12:07 +01:00
1 parent 620e75c2a1
commit cab76389c7
64 files changed
+1438 -496

No files matched your search

+2 -2
View File
@@ -328,7 +328,7 @@ VulkanShaderCache::VulkanShaderCache(WrappedVulkan *driver)
VkResult vkr = driver->vkCreateShaderModule(
m_Device, &modinfo, NULL, &m_BuiltinShaderModules[i][baseType][textureType]);
RDCASSERTEQUAL(vkr, VK_SUCCESS);
driver->CheckVkResult(vkr);
driver->GetResourceManager()->SetInternalResource(
GetResID(m_BuiltinShaderModules[i][baseType][textureType]));
@@ -393,7 +393,7 @@ VulkanShaderCache::VulkanShaderCache(WrappedVulkan *driver)
VkResult vkr = ObjDisp(m_Device)->CreatePipelineCache(Unwrap(m_Device), &createInfo, NULL,
&m_PipelineCache);
RDCASSERTEQUAL(vkr, VK_SUCCESS);
driver->CheckVkResult(vkr);
if(vkr == VK_SUCCESS)
{