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:
@@ -245,8 +245,10 @@ kopper_CreateSwapchain(struct zink_screen *screen, struct kopper_displaytarget *
|
|||||||
{
|
{
|
||||||
VkResult error = VK_SUCCESS;
|
VkResult error = VK_SUCCESS;
|
||||||
struct kopper_swapchain *cswap = CALLOC_STRUCT(kopper_swapchain);
|
struct kopper_swapchain *cswap = CALLOC_STRUCT(kopper_swapchain);
|
||||||
if (!cswap)
|
if (!cswap) {
|
||||||
|
*result = VK_ERROR_OUT_OF_HOST_MEMORY;
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
cswap->last_present_prune = 1;
|
cswap->last_present_prune = 1;
|
||||||
|
|
||||||
bool has_alpha = cdt->info.has_alpha && (cdt->caps.supportedCompositeAlpha & VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR);
|
bool has_alpha = cdt->info.has_alpha && (cdt->caps.supportedCompositeAlpha & VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR);
|
||||||
|
Reference in New Issue
Block a user