Skip to content

Commit

Permalink
Register handle state for the swapchain created by xrCreateSwapchainA…
Browse files Browse the repository at this point in the history
…ndroidSurfaceKHR
  • Loading branch information
quic-yli25 committed Nov 12, 2024
1 parent 9f3995d commit cf9b05d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/scripts/template_gen_dispatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,17 @@
}
//# endif

//## xrCreateSwapchainAndroidSurfaceKHR is a special case because
//## this is a create command but returned swapchain is not the last parameter.
//# set is_create_swapchain_android_surface = ("xrCreateSwapchainAndroidSurfaceKHR" == cur_cmd.name)
//# if is_create_swapchain_android_surface
if (XR_SUCCEEDED(result)) {
//# set penultimate_param_name = cur_cmd.params[-2].name
HandleState* const parentHandleState = GetHandleState(HandleStateKey{HandleToInt(/*{first_handle_name}*/), XR_OBJECT_TYPE_SESSION});
RegisterHandleState(parentHandleState->CloneForChild(HandleToInt(* /*{penultimate_param_name}*/), XR_OBJECT_TYPE_SWAPCHAIN));
}
//# endif

//## If this is a xrQuerySpacesFB, we have to create an entry in
//## the appropriate unordered_map pointing to the correct dispatch table for
//## the newly created objects.
Expand Down

0 comments on commit cf9b05d

Please sign in to comment.