mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-11-27 09:31:03 +00:00
nine: check return on resource_get_handle
this has a return code, and if it return false, this is probably an exit condition cc: mesa-stable Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17775> (cherry picked from commit 188721d6d3d4cab9b0ca8fa419e4c33a33ae3910)
This commit is contained in:
parent
0d7d35c84a
commit
349576d92f
@ -418,7 +418,7 @@
|
||||
"description": "nine: check return on resource_get_handle",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
@ -103,11 +103,14 @@ D3DWindowBuffer_create(struct NineSwapChain9 *This,
|
||||
|
||||
memset(&whandle, 0, sizeof(whandle));
|
||||
whandle.type = WINSYS_HANDLE_TYPE_FD;
|
||||
This->screen->resource_get_handle(This->screen, pipe, resource,
|
||||
&whandle,
|
||||
for_frontbuffer_reading ?
|
||||
PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE :
|
||||
PIPE_HANDLE_USAGE_EXPLICIT_FLUSH);
|
||||
if (!This->screen->resource_get_handle(This->screen, pipe, resource,
|
||||
&whandle,
|
||||
for_frontbuffer_reading ?
|
||||
PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE :
|
||||
PIPE_HANDLE_USAGE_EXPLICIT_FLUSH)) {
|
||||
ERR("Failed to get handle for resource\n");
|
||||
return NULL;
|
||||
}
|
||||
nine_context_get_pipe_release(This->base.device);
|
||||
stride = whandle.stride;
|
||||
dmaBufFd = whandle.handle;
|
||||
|
Loading…
Reference in New Issue
Block a user