Skip to content

Commit 4be4c26

Browse files
Abhi-hppfacebook-github-bot
authored andcommitted
Stronger guard against linear tiling (#7181)
Summary: Pull Request resolved: #7181 Reviewed By: SS-JIA Differential Revision: D66776766
1 parent 047fd37 commit 4be4c26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backends/vulkan/runtime/vk_api/Adapter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ Adapter::Adapter(
182182
VkImage image = VK_NULL_HANDLE;
183183
VkResult res =
184184
vkCreateImage(device_.handle, &image_create_info, nullptr, &image);
185-
if (res == VK_ERROR_FEATURE_NOT_PRESENT) {
185+
if (res != VK_SUCCESS) {
186186
linear_tiling_3d_enabled_ = false;
187-
} else if (res == VK_SUCCESS) {
187+
} else {
188188
vkDestroyImage(device_.handle, image, nullptr);
189189
}
190190
return;

0 commit comments

Comments
 (0)