-
Notifications
You must be signed in to change notification settings - Fork 8
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
Run gRPC service independently #158
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,4 +42,13 @@ class ServerRunner | |
|
||
ServerRunner &GetServerRunner(); | ||
|
||
struct Server | ||
{ | ||
std::thread server_thread; | ||
Server(); | ||
void StopServer(); | ||
}; | ||
|
||
extern Server server; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. instead of using extern, maybe it's better to using the tricky of |
||
|
||
} // namespace DiveLayer |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,12 +43,6 @@ struct InstanceData | |
{ | ||
VkInstance instance; | ||
InstanceDispatchTable dispatch_table; | ||
ServerRunner &server; | ||
|
||
InstanceData() : | ||
server(GetServerRunner()) | ||
{ | ||
} | ||
}; | ||
|
||
struct DeviceData | ||
|
@@ -515,6 +509,10 @@ extern "C" | |
return (PFN_vkVoidFunction)&DiveInterceptEnumerateInstanceExtensionProperties; | ||
if (0 == strcmp(func, "vkCreateInstance")) | ||
return (PFN_vkVoidFunction)&DiveInterceptCreateInstance; | ||
if (0 == strcmp(func, "vkDestroyInstance")) | ||
{ | ||
LOGI("vkDestroyInstance"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do we need this func? only for debug log? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if you mean to stop the server in vkDestroyInstance, you will need to implement the interception functions, similar in the openxr layer. |
||
} | ||
if (inst == VK_NULL_HANDLE) | ||
return NULL; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you help unify the code style here