From: Józef Kucia jkucia@codeweavers.com
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- demos/demo_xcb.h | 1 + include/vkd3d_utils.h | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/demos/demo_xcb.h b/demos/demo_xcb.h index 38715565267e..40e25340b3f1 100644 --- a/demos/demo_xcb.h +++ b/demos/demo_xcb.h @@ -26,6 +26,7 @@ #include <limits.h> #include <unistd.h> #include <fcntl.h> +#include <stdbool.h>
struct demo { diff --git a/include/vkd3d_utils.h b/include/vkd3d_utils.h index 676d3330ed5e..49987d0343b0 100644 --- a/include/vkd3d_utils.h +++ b/include/vkd3d_utils.h @@ -19,8 +19,6 @@ #ifndef __VKD3D_UTILS_H #define __VKD3D_UTILS_H
-#include <stdbool.h> - #ifdef __cplusplus extern "C" { #endif /* __cplusplus */
From: Józef Kucia jkucia@codeweavers.com
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- Makefile.am | 2 +- include/{ => private}/vkd3d_shader.h | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename include/{ => private}/vkd3d_shader.h (100%)
diff --git a/Makefile.am b/Makefile.am index f1f80c32881d..494e3788b1a7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -65,7 +65,7 @@ libvkd3d_shader_la_SOURCES = \ include/private/vkd3d_common.h \ include/private/vkd3d_debug.h \ include/private/vkd3d_memory.h \ - include/vkd3d_shader.h \ + include/private/vkd3d_shader.h \ libs/vkd3d-shader/dxbc.c \ libs/vkd3d-shader/spirv.c \ libs/vkd3d-shader/vkd3d_shader.map \ diff --git a/include/vkd3d_shader.h b/include/private/vkd3d_shader.h similarity index 100% rename from include/vkd3d_shader.h rename to include/private/vkd3d_shader.h
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
From: Józef Kucia jkucia@codeweavers.com
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- demos/demo.h | 1 + include/vkd3d_utils.h | 8 ++++---- libs/vkd3d-utils/vkd3d_utils_main.c | 12 ++++++------ tests/d3d12.c | 4 ++++ 4 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/demos/demo.h b/demos/demo.h index 4645bd7f5cd3..2869ea7b5eba 100644 --- a/demos/demo.h +++ b/demos/demo.h @@ -142,5 +142,6 @@ static inline HRESULT demo_create_root_signature(ID3D12Device *device, #include "demo_win32.h" #else #include <vkd3d_utils.h> +#define INFINITE VKD3D_INFINITE #include "demo_xcb.h" #endif diff --git a/include/vkd3d_utils.h b/include/vkd3d_utils.h index 49987d0343b0..6c926e4e1643 100644 --- a/include/vkd3d_utils.h +++ b/include/vkd3d_utils.h @@ -23,10 +23,10 @@ extern "C" { #endif /* __cplusplus */
-#define WAIT_OBJECT_0 (0) -#define WAIT_TIMEOUT (1) -#define WAIT_FAILED (~0u) -#define INFINITE (~0u) +#define VKD3D_WAIT_OBJECT_0 (0) +#define VKD3D_WAIT_TIMEOUT (1) +#define VKD3D_WAIT_FAILED (~0u) +#define VKD3D_INFINITE (~0u)
HANDLE vkd3d_create_event(void); HRESULT vkd3d_signal_event(HANDLE event); diff --git a/libs/vkd3d-utils/vkd3d_utils_main.c b/libs/vkd3d-utils/vkd3d_utils_main.c index 3c0d13971b6c..2c4d89a7e38e 100644 --- a/libs/vkd3d-utils/vkd3d_utils_main.c +++ b/libs/vkd3d-utils/vkd3d_utils_main.c @@ -126,7 +126,7 @@ unsigned int vkd3d_wait_event(HANDLE event, unsigned int milliseconds) if ((rc = pthread_mutex_lock(&impl->mutex))) { ERR("Failed to lock mutex, error %d.\n", rc); - return WAIT_FAILED; + return VKD3D_WAIT_FAILED; }
if (impl->is_signaled || !milliseconds) @@ -134,10 +134,10 @@ unsigned int vkd3d_wait_event(HANDLE event, unsigned int milliseconds) bool is_signaled = impl->is_signaled; impl->is_signaled = false; pthread_mutex_unlock(&impl->mutex); - return is_signaled ? WAIT_OBJECT_0 : WAIT_TIMEOUT; + return is_signaled ? VKD3D_WAIT_OBJECT_0 : VKD3D_WAIT_TIMEOUT; }
- if (milliseconds == INFINITE) + if (milliseconds == VKD3D_INFINITE) { do { @@ -145,18 +145,18 @@ unsigned int vkd3d_wait_event(HANDLE event, unsigned int milliseconds) { ERR("Failed to wait on condition variable, error %d.\n", rc); pthread_mutex_unlock(&impl->mutex); - return WAIT_FAILED; + return VKD3D_WAIT_FAILED; } } while (!impl->is_signaled);
impl->is_signaled = false; pthread_mutex_unlock(&impl->mutex); - return WAIT_OBJECT_0; + return VKD3D_WAIT_OBJECT_0; }
pthread_mutex_unlock(&impl->mutex); FIXME("Timed wait not implemented yet.\n"); - return WAIT_FAILED; + return VKD3D_WAIT_FAILED; }
HRESULT vkd3d_signal_event(HANDLE event) diff --git a/tests/d3d12.c b/tests/d3d12.c index ea7d24da57be..c7303f8d7ab9 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -201,6 +201,10 @@ static void destroy_event(HANDLE event) CloseHandle(event); } #else +#define INFINITE VKD3D_INFINITE +#define WAIT_OBJECT_0 VKD3D_WAIT_OBJECT_0 +#define WAIT_TIMEOUT VKD3D_WAIT_TIMEOUT + static HANDLE create_event(void) { return vkd3d_create_event();
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com