contrib: mingw64: patch dxvahd.h before mingw-w64 11

The releases before 11 had bogus dxvahd
DXVAHD_STREAM_STATE_xxx_COLOR_SPACE_DATA structures. This was confusing the
initialization with LLVM.
This commit is contained in:
Steve Lhomme 2023-03-20 11:38:45 +01:00
parent f9b271e02b
commit 96a19e9410
3 changed files with 93 additions and 1 deletions

View File

@ -0,0 +1,62 @@
From d4249c712991ab191f05968470b34587cc716a53 Mon Sep 17 00:00:00 2001
From: LIU Hao <lh_mouse@126.com>
Date: Sat, 18 Mar 2023 14:59:38 +0800
Subject: [PATCH 1/2] headers: Update to Wine master and regenerate H from IDL
(edited)
Signed-off-by: LIU Hao <lh_mouse@126.com>
edited:
* only kept the dxvahd.h changes
---
mingw-w64-headers/include/dxvahd.h | 27 +++++++++++++++++++--------
1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/mingw-w64-headers/include/dxvahd.h b/mingw-w64-headers/include/dxvahd.h
index 71b027863..aaff9400c 100644
--- a/mingw-w64-headers/include/dxvahd.h
+++ b/mingw-w64-headers/include/dxvahd.h
@@ -251,10 +251,16 @@ typedef struct _DXVAHD_BLT_STATE_CONSTRICTION_DATA {
SIZE Size;
} DXVAHD_BLT_STATE_CONSTRICTION_DATA;
typedef struct _DXVAHD_BLT_STATE_OUTPUT_COLOR_SPACE_DATA {
- UINT Usage : 1;
- UINT RGB_Range : 1;
- UINT YCbCr_Matrix : 1;
- UINT YCbCr_xvYCC : 1;
+ __C89_NAMELESS union {
+ __C89_NAMELESS struct {
+ UINT Usage : 1;
+ UINT RGB_Range : 1;
+ UINT YCbCr_Matrix : 1;
+ UINT YCbCr_xvYCC : 1;
+ UINT Reserved : 28;
+ } __C89_NAMELESSSTRUCTNAME;
+ UINT Value;
+ } __C89_NAMELESSUNIONNAME;
} DXVAHD_BLT_STATE_OUTPUT_COLOR_SPACE_DATA;
typedef struct _DXVAHD_BLT_STATE_PRIVATE_DATA {
GUID Guid;
@@ -332,10 +338,15 @@ typedef struct _DXVAHD_STREAM_STATE_FRAME_FORMAT_DATA {
DXVAHD_FRAME_FORMAT FrameFormat;
} DXVAHD_STREAM_STATE_FRAME_FORMAT_DATA;
typedef struct _DXVAHD_STREAM_STATE_INPUT_COLOR_SPACE_DATA {
- UINT Type : 1;
- UINT RGB_Range : 1;
- UINT YCbCr_Matrix : 1;
- UINT YCbCr_xvYCC : 1;
+ __C89_NAMELESS union {
+ __C89_NAMELESS struct {
+ UINT Type : 1;
+ UINT RGB_Range : 1;
+ UINT YCbCr_Matrix : 1;
+ UINT YCbCr_xvYCC : 1;
+ } __C89_NAMELESSSTRUCTNAME;
+ UINT Value;
+ } __C89_NAMELESSUNIONNAME;
} DXVAHD_STREAM_STATE_INPUT_COLOR_SPACE_DATA;
typedef struct _DXVAHD_STREAM_STATE_LUMA_KEY_DATA {
WINBOOL Enable;
--
2.37.3.windows.1

View File

@ -0,0 +1,25 @@
From d12847294d570acc97790c7a02fb44a73850f347 Mon Sep 17 00:00:00 2001
From: LIU Hao <lh_mouse@126.com>
Date: Sat, 18 Mar 2023 17:19:02 +0800
Subject: [PATCH 2/2] headers/dxvahd: Regenerate H from IDL
Signed-off-by: LIU Hao <lh_mouse@126.com>
---
mingw-w64-headers/include/dxvahd.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/mingw-w64-headers/include/dxvahd.h b/mingw-w64-headers/include/dxvahd.h
index aaff9400c..6bcd753dd 100644
--- a/mingw-w64-headers/include/dxvahd.h
+++ b/mingw-w64-headers/include/dxvahd.h
@@ -344,6 +344,7 @@ typedef struct _DXVAHD_STREAM_STATE_INPUT_COLOR_SPACE_DATA {
UINT RGB_Range : 1;
UINT YCbCr_Matrix : 1;
UINT YCbCr_xvYCC : 1;
+ UINT Reserved : 28;
} __C89_NAMELESSSTRUCTNAME;
UINT Value;
} __C89_NAMELESSUNIONNAME;
--
2.37.3.windows.1

View File

@ -17,7 +17,7 @@ endif # !HAVE_WINSTORE
PKGS += dxva dxvahd
ifeq ($(call mingw_at_least, 8), true)
PKGS_FOUND += d3d9 dxvahd
PKGS_FOUND += d3d9
endif # MINGW 8
ifeq ($(call mingw_at_least, 9), true)
ifdef HAVE_WINSTORE
@ -30,6 +30,9 @@ endif # MINGW 10
ifeq ($(call mingw_at_least, 10), true)
PKGS_FOUND += dcomp
endif
ifeq ($(call mingw_at_least, 11), true)
PKGS_FOUND += dxvahd
endif # MINGW 11
endif # !HAVE_VISUALSTUDIO
HAVE_WINPTHREAD := $(shell $(CC) $(CFLAGS) -E -dM -include pthread.h - < /dev/null >/dev/null 2>&1 || echo FAIL)
@ -53,6 +56,8 @@ $(TARBALLS)/mingw-w64-v$(MINGW64_VERSION).tar.bz2:
mingw64: mingw-w64-v$(MINGW64_VERSION).tar.bz2 .sum-mingw64
# mingw64: mingw-w64-$(MINGW64_HASH).tar.xz .sum-mingw64
$(UNPACK)
$(APPLY) $(SRC)/mingw64/0001-headers-Update-to-Wine-master-and-regenerate-H-from-.patch
$(APPLY) $(SRC)/mingw64/0002-headers-dxvahd-Regenerate-H-from-IDL.patch
$(MOVE)
.mingw64: mingw64