]> git.pld-linux.org Git - packages/vulkan-sdk.git/blob - vktrace_wayland.patch
c7d1c4c45f0d930cf7b6bbc9a3cffc42c0ce9c30
[packages/vulkan-sdk.git] / vktrace_wayland.patch
1 diff -dur vulkan-sdk-1.0.8.0.orig/VulkanTools/vktrace/src/vktrace_layer/vktrace_lib_trace.cpp vulkan-sdk-1.0.8.0/VulkanTools/vktrace/src/vktrace_layer/vktrace_lib_trace.cpp
2 --- vulkan-sdk-1.0.8.0.orig/VulkanTools/vktrace/src/vktrace_layer/vktrace_lib_trace.cpp 2016-04-07 18:04:06.000000000 +0200
3 +++ vulkan-sdk-1.0.8.0/VulkanTools/vktrace/src/vktrace_layer/vktrace_lib_trace.cpp      2016-04-08 18:01:49.000000000 +0200
4 @@ -1507,7 +1507,36 @@
5      return result;
6  }
7  #endif
8 -//TODO Wayland and Mir support
9 +#ifdef VK_USE_PLATFORM_WAYLAND_KHR
10 +VKTRACER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL __HOOKED_vkCreateWaylandSurfaceKHR(
11 +    VkInstance                                  instance,
12 +    const VkWaylandSurfaceCreateInfoKHR*        pCreateInfo,
13 +    const VkAllocationCallbacks*                pAllocator,
14 +    VkSurfaceKHR*                               pSurface)
15 +{
16 +    VkResult result;
17 +
18 +    // TODO: Implement.
19 +
20 +    result = mid(instance)->instTable.CreateWaylandSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface);
21 +
22 +    return result;
23 +}
24 +
25 +VKTRACER_EXPORT VKAPI_ATTR VkBool32 VKAPI_CALL __HOOKED_vkGetPhysicalDeviceWaylandPresentationSupportKHR(
26 +    VkPhysicalDevice                            physicalDevice,
27 +    uint32_t                                    queueFamilyIndex,
28 +    struct wl_display*                          display)
29 +{
30 +    VkBool32 result;
31 +
32 +    // TODO: Implement.
33 +
34 +    result = mid(physicalDevice)->instTable.GetPhysicalDeviceWaylandPresentationSupportKHR(physicalDevice, queueFamilyIndex, display);
35 +
36 +    return result;
37 +}
38 +#endif
39  
40  /* TODO: Probably want to make this manual to get the result of the boolean and then check it on replay
41  VKTRACER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL __HOOKED_vkGetPhysicalDeviceSurfaceSupportKHR(
42 --- vulkan-sdk-1.0.17.0.orig/VulkanTools/vk_helper.py   2016-06-23 17:32:27.000000000 +0200
43 +++ vulkan-sdk-1.0.17.0/VulkanTools/vk_helper.py        2016-07-14 13:14:33.000000000 +0200
44 @@ -1423,7 +1423,7 @@
45                      elif is_type(self.struct_dict[s][m]['type'], 'struct'):
46                          sh_funcs.append('%sstructSize += %s(pStruct->%s);' % (indent, self._get_size_helper_func_name(self.struct_dict[s][m]['type']), self.struct_dict[s][m]['name']))
47                      elif 'void' not in self.struct_dict[s][m]['type'].lower():
48 -                        if (self.struct_dict[s][m]['type'] != 'xcb_connection_t'):
49 +                        if (self.struct_dict[s][m]['type'] not in ('xcb_connection_t', 'struct wl_display', 'struct wl_surface')):
50                              sh_funcs.append('%sstructSize += sizeof(%s);' % (indent, self.struct_dict[s][m]['type']))
51                  elif 'size_t' == self.struct_dict[s][m]['type'].lower():
52                      sh_funcs.append('%sstructSize += pStruct->%s;' % (indent, self.struct_dict[s][m]['name']))
53 --- vulkan-sdk-1.0.17.0.orig/VulkanTools/vk_helper_api_dump.py  2016-06-23 17:32:27.000000000 +0200
54 +++ vulkan-sdk-1.0.17.0/VulkanTools/vk_helper_api_dump.py       2016-07-14 13:14:44.000000000 +0200
55 @@ -1468,7 +1468,7 @@
56                      elif is_type(self.struct_dict[s][m]['type'], 'struct'):
57                          sh_funcs.append('%sstructSize += %s(pStruct->%s);' % (indent, self._get_size_helper_func_name(self.struct_dict[s][m]['type']), self.struct_dict[s][m]['name']))
58                      elif 'void' not in self.struct_dict[s][m]['type'].lower():
59 -                        if (self.struct_dict[s][m]['type'] != 'xcb_connection_t'):
60 +                        if (self.struct_dict[s][m]['type'] not in ('xcb_connection_t', 'struct wl_display', 'struct wl_surface')):
61                              sh_funcs.append('%sstructSize += sizeof(%s);' % (indent, self.struct_dict[s][m]['type']))
62                  elif 'size_t' == self.struct_dict[s][m]['type'].lower():
63                      sh_funcs.append('%sstructSize += pStruct->%s;' % (indent, self.struct_dict[s][m]['name']))
This page took 0.105448 seconds and 2 git commands to generate.