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.
-- v7: include: Move D3D_BLOB_PART to a new header file.
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 da59bc8da..4e6c5b65f 100755 --- a/gitlab/build-crosstest +++ b/gitlab/build-crosstest @@ -19,7 +19,7 @@ cd build touch ../pipeline_failed
mkdir -p ../artifacts/$COMMIT -rsync -Rr config.log tests/*.txt tests/*.exe ../artifacts/$COMMIT +rsync -Rr config.log tests/*.txt tests/*.exe ../artifacts/$COMMIT || true
# Make the driver easily available to the Windows CI job cp tests/driver.cross64.exe ../artifacts 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 86e12afe5..273a85fc5 100644 --- a/libs/vkd3d-shader/dxil.c +++ b/libs/vkd3d-shader/dxil.c @@ -4150,7 +4150,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 6faac0ccd..ad84d4cd7 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -5447,9 +5447,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
--- gitlab/build.yml | 1 + 1 file changed, 1 insertion(+)
diff --git a/gitlab/build.yml b/gitlab/build.yml index 6a260510a..fd2b63ff2 100644 --- a/gitlab/build.yml +++ b/gitlab/build.yml @@ -153,6 +153,7 @@ build-mac: variables: VKD3D_DISABLE_EXTENSIONS: "VK_EXT_descriptor_indexing" VKD3D_SHADER_CONFIG: 'force_validation' + MVK_CONFIG_LOG_LEVEL: 1 artifacts: when: always paths:
From: Giovanni Mascellani gmascellani@codeweavers.com
According to a clang diagnostic, redefining a typedef is C11, and we want to stick with C99. --- Makefile.am | 1 + include/vkd3d_d3dcompiler.h | 23 ++-------------- include/vkd3d_d3dcompiler_types.h | 45 +++++++++++++++++++++++++++++++ include/vkd3d_utils.h | 4 +-- 4 files changed, 49 insertions(+), 24 deletions(-) create mode 100644 include/vkd3d_d3dcompiler_types.h
diff --git a/Makefile.am b/Makefile.am index 5fbac802b..531a2705f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -24,6 +24,7 @@ vkd3d_public_headers = \ include/vkd3d_d3d9types.h \ include/vkd3d_d3dcommon.h \ include/vkd3d_d3dcompiler.h \ + include/vkd3d_d3dcompiler_types.h \ include/vkd3d_d3dx9shader.h \ include/vkd3d_dxgibase.h \ include/vkd3d_dxgiformat.h \ diff --git a/include/vkd3d_d3dcompiler.h b/include/vkd3d_d3dcompiler.h index 78d529483..c78cf25b9 100644 --- a/include/vkd3d_d3dcompiler.h +++ b/include/vkd3d_d3dcompiler.h @@ -20,6 +20,8 @@ #define __VKD3D_D3DCOMPILER_H #ifndef __D3DCOMPILER_H__
+#include <vkd3d_d3dcompiler_types.h> + #define D3DCOMPILE_DEBUG 0x00000001 #define D3DCOMPILE_SKIP_VALIDATION 0x00000002 #define D3DCOMPILE_SKIP_OPTIMIZATION 0x00000004 @@ -58,27 +60,6 @@ #define D3DCOMPILE_SECDATA_PRESERVE_TEMPLATE_SLOTS 0x00000002 #define D3DCOMPILE_SECDATA_REQUIRE_TEMPLATE_MATCH 0x00000004
-typedef enum D3D_BLOB_PART -{ - D3D_BLOB_INPUT_SIGNATURE_BLOB, - D3D_BLOB_OUTPUT_SIGNATURE_BLOB, - D3D_BLOB_INPUT_AND_OUTPUT_SIGNATURE_BLOB, - D3D_BLOB_PATCH_CONSTANT_SIGNATURE_BLOB, - D3D_BLOB_ALL_SIGNATURE_BLOB, - D3D_BLOB_DEBUG_INFO, - D3D_BLOB_LEGACY_SHADER, - D3D_BLOB_XNA_PREPASS_SHADER, - D3D_BLOB_XNA_SHADER, - D3D_BLOB_PDB, - D3D_BLOB_PRIVATE_DATA, - D3D_BLOB_ROOT_SIGNATURE, - D3D_BLOB_DEBUG_NAME, - D3D_BLOB_TEST_ALTERNATE_SHADER = 0x8000, - D3D_BLOB_TEST_COMPILE_DETAILS, - D3D_BLOB_TEST_COMPILE_PERF, - D3D_BLOB_TEST_COMPILE_REPORT -} D3D_BLOB_PART; - typedef enum D3DCOMPILER_STRIP_FLAGS { D3DCOMPILER_STRIP_REFLECTION_DATA = 0x00000001, diff --git a/include/vkd3d_d3dcompiler_types.h b/include/vkd3d_d3dcompiler_types.h new file mode 100644 index 000000000..b3a47cdd9 --- /dev/null +++ b/include/vkd3d_d3dcompiler_types.h @@ -0,0 +1,45 @@ +/* + * Copyright 2010 Matteo Bruni for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __VKD3D_D3DCOMPILER_TYPES_H +#define __VKD3D_D3DCOMPILER_TYPES_H +#ifndef __D3DCOMPILER_H__ + +typedef enum D3D_BLOB_PART +{ + D3D_BLOB_INPUT_SIGNATURE_BLOB, + D3D_BLOB_OUTPUT_SIGNATURE_BLOB, + D3D_BLOB_INPUT_AND_OUTPUT_SIGNATURE_BLOB, + D3D_BLOB_PATCH_CONSTANT_SIGNATURE_BLOB, + D3D_BLOB_ALL_SIGNATURE_BLOB, + D3D_BLOB_DEBUG_INFO, + D3D_BLOB_LEGACY_SHADER, + D3D_BLOB_XNA_PREPASS_SHADER, + D3D_BLOB_XNA_SHADER, + D3D_BLOB_PDB, + D3D_BLOB_PRIVATE_DATA, + D3D_BLOB_ROOT_SIGNATURE, + D3D_BLOB_DEBUG_NAME, + D3D_BLOB_TEST_ALTERNATE_SHADER = 0x8000, + D3D_BLOB_TEST_COMPILE_DETAILS, + D3D_BLOB_TEST_COMPILE_PERF, + D3D_BLOB_TEST_COMPILE_REPORT +} D3D_BLOB_PART; + +#endif /* __D3DCOMPILER_H__ */ +#endif /* __VKD3D_D3DCOMPILER_TYPES_H */ diff --git a/include/vkd3d_utils.h b/include/vkd3d_utils.h index b5ec79813..686ddf386 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_types.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);
This merge request was approved by Henri Verbeet.