zink: The result should be assigned a value when returned

Signed-off-by: xurui <xurui@kylinos.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24034>
This commit is contained in:
xurui
2023-07-07 10:03:42 +08:00
committed by Marge Bot
parent 2ad2af19ce
commit b6cfb9aa9d

View File

@@ -245,8 +245,10 @@ kopper_CreateSwapchain(struct zink_screen *screen, struct kopper_displaytarget *
{
VkResult error = VK_SUCCESS;
struct kopper_swapchain *cswap = CALLOC_STRUCT(kopper_swapchain);
if (!cswap)
if (!cswap) {
*result = VK_ERROR_OUT_OF_HOST_MEMORY;
return NULL;
}
cswap->last_present_prune = 1;
bool has_alpha = cdt->info.has_alpha && (cdt->caps.supportedCompositeAlpha & VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR);