Mesa (main): dzn: Use os_time_sleep instead of Win32 Sleep

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jul 6 12:34:28 UTC 2022


Module: Mesa
Branch: main
Commit: b31c0775e6d2ccd183eff57eb3cc91d8feb76f3c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b31c0775e6d2ccd183eff57eb3cc91d8feb76f3c

Author: Jesse Natalie <jenatali at microsoft.com>
Date:   Fri Jul  1 09:04:02 2022 -0700

dzn: Use os_time_sleep instead of Win32 Sleep

Reviewed-by: Boris Brezillon <boris.brezillon at collabora.com>
Reviewed-by: Bill Kristiansen <billkris at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17340>

---

 src/microsoft/vulkan/dzn_query.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/microsoft/vulkan/dzn_query.c b/src/microsoft/vulkan/dzn_query.c
index 94e4215bdce..c094cc623de 100644
--- a/src/microsoft/vulkan/dzn_query.c
+++ b/src/microsoft/vulkan/dzn_query.c
@@ -27,6 +27,8 @@
 #include "vk_debug_report.h"
 #include "vk_util.h"
 
+#include "os_time.h"
+
 static D3D12_QUERY_HEAP_TYPE
 dzn_query_pool_get_heap_type(VkQueryType in)
 {
@@ -290,7 +292,7 @@ dzn_GetQueryPoolResults(VkDevice device,
             /* Check again in 10ms.
              * FIXME: decrease the polling period if it happens to hurt latency.
              */
-            Sleep(10);
+            os_time_sleep(10 * 1000);
          }
 
          ID3D12Fence_SetEventOnCompletion(query_fence, query_fence_val, NULL);



More information about the mesa-commit mailing list