Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect handling of xrCreateSwapchainAndroidSurfaceKHR in template_gen_dispatch.cpp #99

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 out_handle_param_name = cur_cmd.params[-2].name
HandleState* const parentHandleState = GetHandleState(HandleStateKey{HandleToInt(/*{ first_handle_name }*/), XR_OBJECT_TYPE_SESSION});
RegisterHandleState(parentHandleState->CloneForChild(HandleToInt(* /*{ out_handle_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
Loading