mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 16:50:13 +01: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 188721d6d3)
This commit is contained in:
parent
0d7d35c84a
commit
349576d92f
2 changed files with 9 additions and 6 deletions
|
|
@ -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…
Add table
Reference in a new issue