From: Brendan Shanks bshanks@codeweavers.com
--- libs/vkd3d/device.c | 9 +++++++++ libs/vkd3d/vkd3d_private.h | 10 +--------- 2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index 1c29bdc1..4018a5c1 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -4479,6 +4479,15 @@ HRESULT vkd3d_join_thread(struct vkd3d_instance *instance, union vkd3d_thread_ha return hr; }
+void vkd3d_set_thread_name(const char *name) +{ +#if defined(HAVE_PTHREAD_SETNAME_NP_2) + pthread_setname_np(pthread_self(), name); +#elif defined(HAVE_PTHREAD_SETNAME_NP_1) + pthread_setname_np(name); +#endif +} + IUnknown *vkd3d_get_device_parent(ID3D12Device *device) { struct d3d12_device *d3d12_device = impl_from_ID3D12Device(device); diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index c9b70d9c..5bacb109 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -330,6 +330,7 @@ static inline int vkd3d_cond_destroy(struct vkd3d_cond *cond) HRESULT vkd3d_create_thread(struct vkd3d_instance *instance, PFN_vkd3d_thread thread_main, void *data, union vkd3d_thread_handle *thread); HRESULT vkd3d_join_thread(struct vkd3d_instance *instance, union vkd3d_thread_handle *thread); +void vkd3d_set_thread_name(const char *name);
struct vkd3d_waiting_fence { @@ -1685,15 +1686,6 @@ extern const char vkd3d_build[];
bool vkd3d_get_program_name(char program_name[PATH_MAX]);
-static inline void vkd3d_set_thread_name(const char *name) -{ -#if defined(HAVE_PTHREAD_SETNAME_NP_2) - pthread_setname_np(pthread_self(), name); -#elif defined(HAVE_PTHREAD_SETNAME_NP_1) - pthread_setname_np(name); -#endif -} - VkResult vkd3d_set_vk_object_name_utf8(struct d3d12_device *device, uint64_t vk_object, VkDebugReportObjectTypeEXT vk_object_type, const char *name); HRESULT vkd3d_set_vk_object_name(struct d3d12_device *device, uint64_t vk_object,