vrclient: Use Vulkan unwrappers in IVRCompositor::GetVulkanDeviceExtensionsRequired

This commit is contained in:
Andrew Eikum 2018-04-11 10:10:22 -05:00
parent 73ba2b3471
commit f386e16db8
4 changed files with 25 additions and 4 deletions

View file

@ -147,11 +147,15 @@ def ivrcompositor_wait_get_poses(cppname, method):
return "ivrcompositor_wait_get_poses"
return None
def ivrcompositor_get_vulkan_device_extensions_required(cppname, method):
return "ivrcompositor_get_vulkan_device_extensions_required"
method_overrides = [
("IVRSystem", "GetDXGIOutputInfo", ivrsystem_get_dxgi_output_info),
("IVRCompositor", "Submit", ivrcompositor_submit),
("IVRCompositor", "PostPresentHandoff", ivrcompositor_post_present_handoff),
("IVRCompositor", "WaitGetPoses", ivrcompositor_wait_get_poses),
("IVRCompositor", "GetVulkanDeviceExtensionsRequired", ivrcompositor_get_vulkan_device_extensions_required),
]
method_overrides_data = [

View file

@ -485,3 +485,15 @@ EVRCompositorError ivrcompositor_wait_get_poses(
return r;
}
uint32_t ivrcompositor_get_vulkan_device_extensions_required(
uint32_t (*cpp_func)(void *, VkPhysicalDevice_T *, char *, uint32_t),
void *linux_side, VkPhysicalDevice_T *phys_dev, char *value, uint32_t bufsize,
unsigned int version, struct compositor_data *user_data)
{
load_vk_unwrappers();
phys_dev = get_native_VkPhysicalDevice(phys_dev);
return cpp_func(linux_side, phys_dev, value, bufsize);
}

View file

@ -80,6 +80,11 @@ EVRCompositorError ivrcompositor_wait_get_poses(
void *linux_side, TrackedDevicePose_t *render_poses, uint32_t render_pose_count,
TrackedDevicePose_t *game_poses, uint32_t game_pose_count,
unsigned int version, struct compositor_data *user_data);
uint32_t ivrcompositor_get_vulkan_device_extensions_required(
uint32_t (*cpp_func)(void *, VkPhysicalDevice_T *, char *, uint32_t),
void *linux_side, VkPhysicalDevice_T *phys_dev, char *value, uint32_t bufsize,
unsigned int version, struct compositor_data *user_data);
#endif /* __cplusplus */
#define TRACE WINE_TRACE

View file

@ -309,7 +309,7 @@ DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_GetVulkanDeviceExtens
uint32_t __thiscall winIVRCompositor_IVRCompositor_022_GetVulkanDeviceExtensionsRequired(winIVRCompositor_IVRCompositor_022 *_this, VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize)
{
TRACE("%p\n", _this);
return cppIVRCompositor_IVRCompositor_022_GetVulkanDeviceExtensionsRequired(_this->linux_side, pPhysicalDevice, pchValue, unBufferSize);
return ivrcompositor_get_vulkan_device_extensions_required(cppIVRCompositor_IVRCompositor_022_GetVulkanDeviceExtensionsRequired, _this->linux_side, pPhysicalDevice, pchValue, unBufferSize, 22, &_this->user_data);
}
DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_SetExplicitTimingMode, 8)
@ -682,7 +682,7 @@ DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_GetVulkanDeviceExtens
uint32_t __thiscall winIVRCompositor_IVRCompositor_021_GetVulkanDeviceExtensionsRequired(winIVRCompositor_IVRCompositor_021 *_this, VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize)
{
TRACE("%p\n", _this);
return cppIVRCompositor_IVRCompositor_021_GetVulkanDeviceExtensionsRequired(_this->linux_side, pPhysicalDevice, pchValue, unBufferSize);
return ivrcompositor_get_vulkan_device_extensions_required(cppIVRCompositor_IVRCompositor_021_GetVulkanDeviceExtensionsRequired, _this->linux_side, pPhysicalDevice, pchValue, unBufferSize, 21, &_this->user_data);
}
DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_SetExplicitTimingMode, 5)
@ -1055,7 +1055,7 @@ DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_GetVulkanDeviceExtens
uint32_t __thiscall winIVRCompositor_IVRCompositor_020_GetVulkanDeviceExtensionsRequired(winIVRCompositor_IVRCompositor_020 *_this, VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize)
{
TRACE("%p\n", _this);
return cppIVRCompositor_IVRCompositor_020_GetVulkanDeviceExtensionsRequired(_this->linux_side, pPhysicalDevice, pchValue, unBufferSize);
return ivrcompositor_get_vulkan_device_extensions_required(cppIVRCompositor_IVRCompositor_020_GetVulkanDeviceExtensionsRequired, _this->linux_side, pPhysicalDevice, pchValue, unBufferSize, 20, &_this->user_data);
}
extern vtable_ptr winIVRCompositor_IVRCompositor_020_vtable;
@ -1405,7 +1405,7 @@ DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_GetVulkanDeviceExtens
uint32_t __thiscall winIVRCompositor_IVRCompositor_019_GetVulkanDeviceExtensionsRequired(winIVRCompositor_IVRCompositor_019 *_this, VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize)
{
TRACE("%p\n", _this);
return cppIVRCompositor_IVRCompositor_019_GetVulkanDeviceExtensionsRequired(_this->linux_side, pPhysicalDevice, pchValue, unBufferSize);
return ivrcompositor_get_vulkan_device_extensions_required(cppIVRCompositor_IVRCompositor_019_GetVulkanDeviceExtensionsRequired, _this->linux_side, pPhysicalDevice, pchValue, unBufferSize, 19, &_this->user_data);
}
extern vtable_ptr winIVRCompositor_IVRCompositor_019_vtable;