Vulkan config in dm
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1872283003
Review URL: https://codereview.chromium.org/1872283003
diff --git a/src/gpu/vk/GrVkBackendContext.cpp b/src/gpu/vk/GrVkBackendContext.cpp
index f5cd08c..d189840 100644
--- a/src/gpu/vk/GrVkBackendContext.cpp
+++ b/src/gpu/vk/GrVkBackendContext.cpp
@@ -109,7 +109,7 @@
err = vkCreateInstance(&instance_create, nullptr, &inst);
if (err < 0) {
SkDebugf("vkCreateInstance failed: %d\n", err);
- SkFAIL("failing");
+ return nullptr;
}
uint32_t gpuCount;
@@ -117,7 +117,7 @@
if (err) {
SkDebugf("vkEnumeratePhysicalDevices failed: %d\n", err);
vkDestroyInstance(inst, nullptr);
- SkFAIL("failing");
+ return nullptr;
}
SkASSERT(gpuCount > 0);
// Just returning the first physical device instead of getting the whole array.
@@ -127,7 +127,7 @@
if (err) {
SkDebugf("vkEnumeratePhysicalDevices failed: %d\n", err);
vkDestroyInstance(inst, nullptr);
- SkFAIL("failing");
+ return nullptr;
}
// query to get the initial queue props size
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp
index 428c2ff..280346f 100644
--- a/src/gpu/vk/GrVkGpu.cpp
+++ b/src/gpu/vk/GrVkGpu.cpp
@@ -63,10 +63,10 @@
GrGpu* GrVkGpu::Create(GrBackendContext backendContext, const GrContextOptions& options,
GrContext* context) {
- SkAutoTUnref<const GrVkBackendContext> vkBackendContext(
- reinterpret_cast<const GrVkBackendContext*>(backendContext));
+ const GrVkBackendContext* vkBackendContext =
+ reinterpret_cast<const GrVkBackendContext*>(backendContext);
if (!vkBackendContext) {
- vkBackendContext.reset(GrVkBackendContext::Create());
+ vkBackendContext = GrVkBackendContext::Create();
if (!vkBackendContext) {
return nullptr;
}