A few recent changes broke the macOS build. Unfortunately nobody noticed, because the macOS CI job always fails. :-(
However, we can still fix that. I'm not sure that the last commit is the best approach, would like to have comments from Henri.
-- v2: include: Import vkd3d_d3dcompiler.h instead of redefining D3D_BLOB_PART. vkd3d-shader: Explicitly cast vkd3d_shader_global_flags to uint64_t. ci: Allow the artifact copy to fail.
From: Giovanni Mascellani gmascellani@codeweavers.com
If the build fail some artifact files might not exist, and we don't want the script to fail just because of that. --- gitlab/build-crosstest | 2 +- gitlab/build-linux | 2 +- gitlab/build-mac | 2 +- gitlab/build-mingw | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/gitlab/build-crosstest b/gitlab/build-crosstest index 4a1341a09..584008fea 100755 --- a/gitlab/build-crosstest +++ b/gitlab/build-crosstest @@ -19,6 +19,6 @@ cd build touch ../pipeline_failed
mkdir -p ../artifacts/$COMMIT -rsync -Rr config.log tests/*.exe ../artifacts/$COMMIT +rsync -Rr config.log tests/*.exe ../artifacts/$COMMIT || true
git reset --hard diff --git a/gitlab/build-linux b/gitlab/build-linux index ee00e61ef..545601bcc 100755 --- a/gitlab/build-linux +++ b/gitlab/build-linux @@ -18,6 +18,6 @@ export LD_LIBRARY_PATH=/usr/local/lib touch ../pipeline_failed
mkdir -p ../artifacts/$COMMIT -rsync -Rr config.log doc/* test-suite.log tests/*.log tests/*/*.log ../artifacts/$COMMIT +rsync -Rr config.log doc/* test-suite.log tests/*.log tests/*/*.log ../artifacts/$COMMIT || true
git reset --hard diff --git a/gitlab/build-mac b/gitlab/build-mac index 854bc8e33..6a795d02f 100755 --- a/gitlab/build-mac +++ b/gitlab/build-mac @@ -17,6 +17,6 @@ cd build touch ../pipeline_failed
mkdir -p ../artifacts/$COMMIT -rsync -Rr config.log test-suite.log tests/*.log tests/*/*.log ../artifacts/$COMMIT +rsync -Rr config.log test-suite.log tests/*.log tests/*/*.log ../artifacts/$COMMIT || true
git reset --hard diff --git a/gitlab/build-mingw b/gitlab/build-mingw index 1334a18a7..0886de2ca 100755 --- a/gitlab/build-mingw +++ b/gitlab/build-mingw @@ -19,7 +19,7 @@ cp -r /usr/include/vulkan /usr/include/vk_video /usr/include/spirv vulkan-header touch ../pipeline_failed
mkdir -p ../artifacts/$COMMIT -cp config.log ../artifacts/$COMMIT -cp destdir/usr/local/bin/* ../artifacts/$COMMIT +cp config.log ../artifacts/$COMMIT || true +cp destdir/usr/local/bin/* ../artifacts/$COMMIT || true
git reset --hard
From: Giovanni Mascellani gmascellani@codeweavers.com
On macOS vkd3d_shader_global_flags has underlying type unsigned long, while uint64_t is defined as unsigned long long. This difference causes a few warnings to be raised. --- libs/vkd3d-shader/d3d_asm.c | 2 +- libs/vkd3d-shader/dxil.c | 2 +- libs/vkd3d-shader/spirv.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/libs/vkd3d-shader/d3d_asm.c b/libs/vkd3d-shader/d3d_asm.c index 40daa5354..5453d432f 100644 --- a/libs/vkd3d-shader/d3d_asm.c +++ b/libs/vkd3d-shader/d3d_asm.c @@ -424,7 +424,7 @@ static void shader_dump_global_flags(struct vkd3d_d3d_asm_compiler *compiler, }
if (global_flags) - vkd3d_string_buffer_printf(&compiler->buffer, "unknown_flags(%#"PRIx64")", global_flags); + vkd3d_string_buffer_printf(&compiler->buffer, "unknown_flags(%#"PRIx64")", (uint64_t)global_flags); }
static void shader_dump_sync_flags(struct vkd3d_d3d_asm_compiler *compiler, uint32_t sync_flags) diff --git a/libs/vkd3d-shader/dxil.c b/libs/vkd3d-shader/dxil.c index 19ce2936a..0e29f6652 100644 --- a/libs/vkd3d-shader/dxil.c +++ b/libs/vkd3d-shader/dxil.c @@ -3857,7 +3857,7 @@ static void sm6_parser_emit_global_flags(struct sm6_parser *sm6, const struct sm enum vkd3d_shader_global_flags global_flags, mask, rotated_flags; struct vkd3d_shader_instruction *ins;
- if (!sm6_metadata_get_uint64_value(sm6, m, &global_flags)) + if (!sm6_metadata_get_uint64_value(sm6, m, (uint64_t*)&global_flags)) { WARN("Failed to load global flags.\n"); vkd3d_shader_parser_error(&sm6->p, VKD3D_SHADER_ERROR_DXIL_INVALID_PROPERTIES, diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 2dab97ccb..c86efb758 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -5393,9 +5393,9 @@ static void spirv_compiler_emit_dcl_global_flags(struct spirv_compiler *compiler }
if (flags & ~(VKD3DSGF_REFACTORING_ALLOWED | VKD3DSGF_ENABLE_RAW_AND_STRUCTURED_BUFFERS)) - FIXME("Unhandled global flags %#"PRIx64".\n", flags); + FIXME("Unhandled global flags %#"PRIx64".\n", (uint64_t)flags); else - WARN("Unhandled global flags %#"PRIx64".\n", flags); + WARN("Unhandled global flags %#"PRIx64".\n", (uint64_t)flags); }
static void spirv_compiler_emit_temps(struct spirv_compiler *compiler, uint32_t count)
From: Giovanni Mascellani gmascellani@codeweavers.com
According to a clang diagnostic, redefining a typedef is C11, and we want to stick with C99. --- include/vkd3d_utils.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/include/vkd3d_utils.h b/include/vkd3d_utils.h index b5ec79813..450abf8c7 100644 --- a/include/vkd3d_utils.h +++ b/include/vkd3d_utils.h @@ -20,6 +20,7 @@ #define __VKD3D_UTILS_H
#include <vkd3d.h> +#include <vkd3d_d3dcompiler.h>
#ifndef VKD3D_UTILS_API_VERSION #define VKD3D_UTILS_API_VERSION VKD3D_API_VERSION_1_0 @@ -51,9 +52,6 @@ extern "C" { # define VKD3D_UTILS_API VKD3D_IMPORT #endif
-/** \since 1.10 */ -typedef enum D3D_BLOB_PART D3D_BLOB_PART; - /* 1.0 */ VKD3D_UTILS_API HANDLE vkd3d_create_event(void); VKD3D_UTILS_API HRESULT vkd3d_signal_event(HANDLE event);