winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
May 2024
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
705 discussions
Start a n
N
ew thread
Rémi Bernon : mfreadwrite/tests: Add tests with MFVideoFormat_ABGR32 output format.
by Alexandre Julliard
17 May '24
17 May '24
Module: wine Branch: master Commit: cc57b05d47506fc1d69f47616a1d8e699a862e15 URL:
https://gitlab.winehq.org/wine/wine/-/commit/cc57b05d47506fc1d69f47616a1d8e…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Apr 11 19:06:10 2024 +0200 mfreadwrite/tests: Add tests with MFVideoFormat_ABGR32 output format. --- dlls/mfreadwrite/tests/mfplat.c | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/dlls/mfreadwrite/tests/mfplat.c b/dlls/mfreadwrite/tests/mfplat.c index b51c9739afe..b819b2238e9 100644 --- a/dlls/mfreadwrite/tests/mfplat.c +++ b/dlls/mfreadwrite/tests/mfplat.c @@ -48,6 +48,7 @@ DEFINE_GUID(GUID_NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); #include "wine/test.h" DEFINE_MEDIATYPE_GUID(MFVideoFormat_TEST,MAKEFOURCC('T','E','S','T')); +DEFINE_MEDIATYPE_GUID(MFVideoFormat_ABGR32,D3DFMT_A8B8G8R8); #define check_interface(a, b, c) check_interface_(__LINE__, a, b, c) static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOOL supported) @@ -2503,7 +2504,8 @@ static HRESULT WINAPI test_decoder_SetOutputType(IMFTransform *iface, DWORD id, HRESULT hr; if (type && SUCCEEDED(hr = IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &subtype)) - && IsEqualGUID(&subtype, &MFVideoFormat_RGB32)) + && (IsEqualGUID(&subtype, &MFVideoFormat_RGB32) + || IsEqualGUID(&subtype, &MFVideoFormat_ABGR32))) return MF_E_INVALIDMEDIATYPE; if (flags & MFT_SET_TYPE_TEST_ONLY) @@ -3101,6 +3103,12 @@ static void test_source_reader_transforms_d3d9(void) ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(value == 0, "got %u.\n", value); IMFAttributes_Release(attributes); + + hr = IMFTransform_GetOutputCurrentType(video_processor, 0, &media_type); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + check_media_type(media_type, rgb32_expect_desc, -1); + IMFMediaType_Release(media_type); + IMFTransform_Release(video_processor); hr = IMFSourceReaderEx_GetTransformForStream(reader_ex, 0, 0, NULL, &test_decoder); @@ -3281,6 +3289,22 @@ static void test_source_reader_transforms_d3d11(void) ATTR_UINT32(MF_MT_INTERLACE_MODE, 2, .todo = TRUE), {0}, }; + static const struct attribute_desc abgr32_stream_type_desc[] = + { + ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video), + ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_ABGR32), + {0}, + }; + static const struct attribute_desc abgr32_expect_desc[] = + { + ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video), + ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_ABGR32), + ATTR_RATIO(MF_MT_FRAME_SIZE, 96, 96), + ATTR_UINT32(MF_MT_ALL_SAMPLES_INDEPENDENT, 1), + ATTR_UINT32(MF_MT_COMPRESSED, 0, .todo = TRUE), + ATTR_UINT32(MF_MT_INTERLACE_MODE, 2, .todo = TRUE), + {0}, + }; const MFT_REGISTER_TYPE_INFO output_info[] = { {MFMediaType_Video, MFVideoFormat_NV12}, @@ -3389,6 +3413,21 @@ static void test_source_reader_transforms_d3d11(void) IMFMediaType_Release(media_type); ok(!test_decoder_got_d3d_manager, "d3d manager received\n"); + hr = MFCreateMediaType(&media_type); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + init_media_type(media_type, abgr32_stream_type_desc, -1); + hr = IMFSourceReader_SetCurrentMediaType(reader, 0, NULL, media_type); + todo_wine ok(hr == S_OK || broken(hr == MF_E_INVALIDMEDIATYPE) /* needs a GPU */, "Unexpected hr %#lx.\n", hr); + IMFMediaType_Release(media_type); + + if (hr == S_OK) + { + hr = IMFSourceReader_GetCurrentMediaType(reader, 0, &media_type); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + check_media_type(media_type, abgr32_expect_desc, -1); + IMFMediaType_Release(media_type); + } + hr = MFCreateMediaType(&media_type); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); init_media_type(media_type, rgb32_stream_type_desc, -1);
1
0
0
0
Rémi Bernon : mf/tests: Add video processor tests with MFVideoFormat_ABGR32 format.
by Alexandre Julliard
17 May '24
17 May '24
Module: wine Branch: master Commit: 1c1f03a8b84064a770e0d1d7f371bd93aae62b8b URL:
https://gitlab.winehq.org/wine/wine/-/commit/1c1f03a8b84064a770e0d1d7f371bd…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Apr 25 10:31:53 2024 +0200 mf/tests: Add video processor tests with MFVideoFormat_ABGR32 format. --- dlls/mf/tests/abgr32frame-crop.bmp | Bin 0 -> 27606 bytes dlls/mf/tests/resource.rc | 8 + dlls/mf/tests/rgb32frame-crop-flip.bmp | Bin 0 -> 27606 bytes dlls/mf/tests/rgb32frame-crop.bmp | Bin 27606 -> 27606 bytes dlls/mf/tests/transform.c | 372 ++++++++++++++++++++++++++++++--- 5 files changed, 350 insertions(+), 30 deletions(-)
1
0
0
0
Rémi Bernon : mfplat: Add MFVideoFormat_ABGR32 format information.
by Alexandre Julliard
17 May '24
17 May '24
Module: wine Branch: master Commit: 47884f6fbae0f886c9998a76ee53b7ecea510e59 URL:
https://gitlab.winehq.org/wine/wine/-/commit/47884f6fbae0f886c9998a76ee53b7…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Nov 23 00:45:19 2023 +0100 mfplat: Add MFVideoFormat_ABGR32 format information. --- dlls/mfplat/mediatype.c | 4 ++++ dlls/mfplat/tests/mfplat.c | 30 +++++++++++++++++++++++------- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/dlls/mfplat/mediatype.c b/dlls/mfplat/mediatype.c index dd0b29fac32..3944d64849e 100644 --- a/dlls/mfplat/mediatype.c +++ b/dlls/mfplat/mediatype.c @@ -39,6 +39,7 @@ DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); DEFINE_MEDIATYPE_GUID(MFVideoFormat_RGB1, D3DFMT_A1); DEFINE_MEDIATYPE_GUID(MFVideoFormat_RGB4, MAKEFOURCC('4','P','x','x')); +DEFINE_MEDIATYPE_GUID(MFVideoFormat_ABGR32, D3DFMT_A8B8G8R8); DEFINE_MEDIATYPE_GUID(MFVideoFormat_ARGB1555, D3DFMT_A1R5G5B5); DEFINE_MEDIATYPE_GUID(MFVideoFormat_ARGB4444, D3DFMT_A4R4G4B4); /* SDK MFVideoFormat_A2R10G10B10 uses D3DFMT_A2B10G10R10, let's name it the other way */ @@ -2713,6 +2714,7 @@ static struct uncompressed_video_format video_formats[] = { &MFVideoFormat_RGB32, 32, 3, 1, 0, BI_RGB }, { &MFVideoFormat_RGB565, 16, 3, 1, 0, BI_BITFIELDS }, { &MFVideoFormat_RGB555, 16, 3, 1, 0, BI_RGB }, + { &MFVideoFormat_ABGR32, 32, 3, 1, 0, BI_RGB }, { &MFVideoFormat_A2R10G10B10, 32, 3, 1, 0, -1 }, { &MFVideoFormat_A2B10G10R10, 32, 3, 1, 0, -1 }, { &MFVideoFormat_RGB8, 8, 3, 1, 0, BI_RGB }, @@ -3632,6 +3634,8 @@ DXGI_FORMAT WINAPI MFMapDX9FormatToDXGIFormat(DWORD format) return DXGI_FORMAT_B8G8R8A8_UNORM; case D3DFMT_X8R8G8B8: return DXGI_FORMAT_B8G8R8X8_UNORM; + case D3DFMT_A8B8G8R8: + return DXGI_FORMAT_R8G8B8A8_UNORM; case MAKEFOURCC('A','Y','U','V'): return DXGI_FORMAT_AYUV; case MAKEFOURCC('Y','4','1','0'): diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c index a4ca567367c..21977807ac2 100644 --- a/dlls/mfplat/tests/mfplat.c +++ b/dlls/mfplat/tests/mfplat.c @@ -67,9 +67,11 @@ DEFINE_GUID(DUMMY_GUID3, 0x12345678,0x1234,0x1234,0x23,0x23,0x23,0x23,0x23,0x23, extern const CLSID CLSID_FileSchemePlugin; DEFINE_MEDIATYPE_GUID(MEDIASUBTYPE_Base,0); +DEFINE_GUID(MEDIASUBTYPE_ABGR32,D3DFMT_A8B8G8R8,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70); DEFINE_MEDIATYPE_GUID(MFVideoFormat_RGB1, D3DFMT_A1); DEFINE_MEDIATYPE_GUID(MFVideoFormat_RGB4, MAKEFOURCC('4','P','x','x')); +DEFINE_MEDIATYPE_GUID(MFVideoFormat_ABGR32, D3DFMT_A8B8G8R8); DEFINE_MEDIATYPE_GUID(MFVideoFormat_ARGB1555, D3DFMT_A1R5G5B5); DEFINE_MEDIATYPE_GUID(MFVideoFormat_ARGB4444, D3DFMT_A4R4G4B4); /* SDK MFVideoFormat_A2R10G10B10 uses D3DFMT_A2B10G10R10, let's name it the other way */ @@ -4748,6 +4750,9 @@ image_size_tests[] = { &MFVideoFormat_ARGB32, 3, 5, 60, 0, 320, 60, 64 }, { &MFVideoFormat_ARGB32, 1, 1, 4, 0, 64, 4, 64 }, { &MFVideoFormat_ARGB32, 320, 240, 307200, 0, 307200, 307200, 1280 }, + { &MFVideoFormat_ABGR32, 3, 5, 60, 0, 320, 60, 64 }, + { &MFVideoFormat_ABGR32, 1, 1, 4, 0, 64, 4, 64 }, + { &MFVideoFormat_ABGR32, 320, 240, 307200, 0, 307200, 307200, 1280 }, { &MFVideoFormat_A2R10G10B10, 3, 5, 60, 0, 320, 60, 64 }, { &MFVideoFormat_A2R10G10B10, 1, 1, 4, 0, 64, 4, 64 }, { &MFVideoFormat_A2R10G10B10, 320, 240, 307200, 0, 307200, 307200, 1280 }, @@ -4910,12 +4915,16 @@ static void test_MFCalculateImageSize(void) /* Those are supported since Win10. */ BOOL is_broken = IsEqualGUID(ptr->subtype, &MFVideoFormat_A16B16G16R16F) || - IsEqualGUID(ptr->subtype, &MFVideoFormat_A2R10G10B10); + IsEqualGUID(ptr->subtype, &MFVideoFormat_A2R10G10B10) || + IsEqualGUID(ptr->subtype, &MFVideoFormat_ABGR32); hr = MFCalculateImageSize(ptr->subtype, ptr->width, ptr->height, &size); - ok(hr == S_OK || (is_broken && hr == E_INVALIDARG), "%u: failed to calculate image size, hr %#lx.\n", i, hr); - ok(size == ptr->size, "%u: unexpected image size %u, expected %u. Size %u x %u, format %s.\n", i, size, ptr->size, - ptr->width, ptr->height, wine_dbgstr_an((char *)&ptr->subtype->Data1, 4)); + ok(hr == S_OK || broken(is_broken && hr == E_INVALIDARG), "%u: failed to calculate image size, hr %#lx.\n", i, hr); + if (hr == S_OK) + { + ok(size == ptr->size, "%u: unexpected image size %u, expected %u. Size %u x %u, format %s.\n", i, size, ptr->size, + ptr->width, ptr->height, wine_dbgstr_an((char *)&ptr->subtype->Data1, 4)); + } } } @@ -6224,6 +6233,8 @@ static void test_MFGetStrideForBitmapInfoHeader(void) { &MFVideoFormat_RGB32, 1, -4 }, { &MFVideoFormat_ARGB32, 3, -12 }, { &MFVideoFormat_ARGB32, 1, -4 }, + { &MFVideoFormat_ABGR32, 3, -12 }, + { &MFVideoFormat_ABGR32, 1, -4 }, { &MFVideoFormat_A2R10G10B10, 3, -12 }, { &MFVideoFormat_A2R10G10B10, 1, -4 }, { &MFVideoFormat_A2B10G10R10, 3, -12 }, @@ -9272,6 +9283,7 @@ static void test_MFMapDXGIFormatToDX9Format(void) { DXGI_FORMAT dxgi_format; DWORD d3d9_format; + BOOL broken; } formats_map[] = { @@ -9304,6 +9316,7 @@ static void test_MFMapDXGIFormatToDX9Format(void) { DXGI_FORMAT_B8G8R8X8_UNORM, D3DFMT_X8R8G8B8 }, { DXGI_FORMAT_B8G8R8A8_UNORM_SRGB, D3DFMT_A8R8G8B8 }, { DXGI_FORMAT_B8G8R8X8_UNORM_SRGB, D3DFMT_X8R8G8B8 }, + { DXGI_FORMAT_R8G8B8A8_UNORM, D3DFMT_A8B8G8R8, .broken = TRUE /* <= w1064v1507 */ }, { DXGI_FORMAT_AYUV, MAKEFOURCC('A','Y','U','V') }, { DXGI_FORMAT_Y410, MAKEFOURCC('Y','4','1','0') }, { DXGI_FORMAT_Y416, MAKEFOURCC('Y','4','1','6') }, @@ -9332,7 +9345,8 @@ static void test_MFMapDXGIFormatToDX9Format(void) for (i = 0; i < ARRAY_SIZE(formats_map); ++i) { format = pMFMapDXGIFormatToDX9Format(formats_map[i].dxgi_format); - ok(format == formats_map[i].d3d9_format, "Unexpected d3d9 format %#lx, dxgi format %#x.\n", format, formats_map[i].dxgi_format); + ok(format == formats_map[i].d3d9_format || broken(formats_map[i].broken && format == 0), + "Unexpected d3d9 format %#lx, dxgi format %#x.\n", format, formats_map[i].dxgi_format); } } @@ -9342,6 +9356,7 @@ static void test_MFMapDX9FormatToDXGIFormat(void) { DXGI_FORMAT dxgi_format; DWORD d3d9_format; + BOOL broken; } formats_map[] = { @@ -9369,6 +9384,7 @@ static void test_MFMapDX9FormatToDXGIFormat(void) { DXGI_FORMAT_BC3_UNORM, D3DFMT_DXT4 }, { DXGI_FORMAT_B8G8R8A8_UNORM, D3DFMT_A8R8G8B8 }, { DXGI_FORMAT_B8G8R8X8_UNORM, D3DFMT_X8R8G8B8 }, + { DXGI_FORMAT_R8G8B8A8_UNORM, D3DFMT_A8B8G8R8, .broken = TRUE }, { DXGI_FORMAT_AYUV, MAKEFOURCC('A','Y','U','V') }, { DXGI_FORMAT_Y410, MAKEFOURCC('Y','4','1','0') }, { DXGI_FORMAT_Y416, MAKEFOURCC('Y','4','1','6') }, @@ -9397,8 +9413,8 @@ static void test_MFMapDX9FormatToDXGIFormat(void) for (i = 0; i < ARRAY_SIZE(formats_map); ++i) { format = pMFMapDX9FormatToDXGIFormat(formats_map[i].d3d9_format); - ok(format == formats_map[i].dxgi_format, "Unexpected DXGI format %#x, d3d9 format %#lx.\n", - format, formats_map[i].d3d9_format); + ok(format == formats_map[i].dxgi_format || broken(formats_map[i].broken && format == 0), + "Unexpected DXGI format %#x, d3d9 format %#lx.\n", format, formats_map[i].d3d9_format); } }
1
0
0
0
Alexandre Julliard : msvcrt: Unify checks for valid C++ exception.
by Alexandre Julliard
17 May '24
17 May '24
Module: wine Branch: master Commit: ea81150e3a02f70c702a7c865156f3653dd95f09 URL:
https://gitlab.winehq.org/wine/wine/-/commit/ea81150e3a02f70c702a7c865156f3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 17 13:00:16 2024 +0200 msvcrt: Unify checks for valid C++ exception. --- dlls/msvcrt/cpp.c | 10 ++-------- dlls/msvcrt/cppexcept.h | 8 ++++++++ dlls/msvcrt/except.c | 15 ++------------- dlls/msvcrt/except_i386.c | 5 +---- 4 files changed, 13 insertions(+), 25 deletions(-) diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c index b4966641204..943f5936a19 100644 --- a/dlls/msvcrt/cpp.c +++ b/dlls/msvcrt/cpp.c @@ -1048,10 +1048,7 @@ int __cdecl _is_exception_typeof(const type_info *ti, EXCEPTION_POINTERS *ep) { EXCEPTION_RECORD *rec = ep->ExceptionRecord; - if (rec->ExceptionCode==CXX_EXCEPTION && rec->NumberParameters==3 && - (rec->ExceptionInformation[0]==CXX_FRAME_MAGIC_VC6 || - rec->ExceptionInformation[0]==CXX_FRAME_MAGIC_VC7 || - rec->ExceptionInformation[0]==CXX_FRAME_MAGIC_VC8)) + if (is_cxx_exception( rec )) { const cxx_type_info_table *tit = ((cxx_exception_type*)rec->ExceptionInformation[2])->type_info_table; int i; @@ -1086,10 +1083,7 @@ int __cdecl _is_exception_typeof(const type_info *ti, EXCEPTION_POINTERS *ep) { EXCEPTION_RECORD *rec = ep->ExceptionRecord; - if (rec->ExceptionCode==CXX_EXCEPTION && rec->NumberParameters==4 && - (rec->ExceptionInformation[0]==CXX_FRAME_MAGIC_VC6 || - rec->ExceptionInformation[0]==CXX_FRAME_MAGIC_VC7 || - rec->ExceptionInformation[0]==CXX_FRAME_MAGIC_VC8)) + if (is_cxx_exception( rec )) { const cxx_exception_type *et = (cxx_exception_type*)rec->ExceptionInformation[2]; const cxx_type_info_table *tit = (const cxx_type_info_table*)(rec->ExceptionInformation[3]+et->type_info_table); diff --git a/dlls/msvcrt/cppexcept.h b/dlls/msvcrt/cppexcept.h index d5ad0f8a0f6..48b370d1be6 100644 --- a/dlls/msvcrt/cppexcept.h +++ b/dlls/msvcrt/cppexcept.h @@ -51,6 +51,14 @@ typedef DWORD (*cxx_exc_custom_handler)( PEXCEPTION_RECORD, struct __cxx_excepti void WINAPI _CxxThrowException(void*,const cxx_exception_type*); int CDECL _XcptFilter(NTSTATUS, PEXCEPTION_POINTERS); +static inline BOOL is_cxx_exception( EXCEPTION_RECORD *rec ) +{ + if (rec->ExceptionCode != CXX_EXCEPTION) return FALSE; + if (rec->NumberParameters != CXX_EXCEPTION_PARAMS) return FALSE; + return (rec->ExceptionInformation[0] >= CXX_FRAME_MAGIC_VC6 && + rec->ExceptionInformation[0] <= CXX_FRAME_MAGIC_VC8); +} + typedef struct { EXCEPTION_RECORD *rec; diff --git a/dlls/msvcrt/except.c b/dlls/msvcrt/except.c index ce1a7525d4a..e61e1e74e54 100644 --- a/dlls/msvcrt/except.c +++ b/dlls/msvcrt/except.c @@ -298,11 +298,7 @@ BOOL CDECL __CxxDetectRethrow(PEXCEPTION_POINTERS ptrs) return FALSE; rec = ptrs->ExceptionRecord; - - if (rec->ExceptionCode == CXX_EXCEPTION && - rec->NumberParameters == CXX_EXCEPTION_PARAMS && - rec->ExceptionInformation[0] == CXX_FRAME_MAGIC_VC6 && - rec->ExceptionInformation[2]) + if (is_cxx_exception( rec ) && rec->ExceptionInformation[2]) { ptrs->ExceptionRecord = msvcrt_get_thread_data()->exc_record; return TRUE; @@ -447,14 +443,7 @@ void CDECL __DestructExceptionObject(EXCEPTION_RECORD *rec) TRACE("(%p)\n", rec); - if (rec->ExceptionCode != CXX_EXCEPTION) return; -#ifndef __x86_64__ - if (rec->NumberParameters != 3) return; -#else - if (rec->NumberParameters != 4) return; -#endif - if (rec->ExceptionInformation[0] < CXX_FRAME_MAGIC_VC6 || - rec->ExceptionInformation[0] > CXX_FRAME_MAGIC_VC8) return; + if (!is_cxx_exception( rec )) return; if (!info || !info->destructor) return; diff --git a/dlls/msvcrt/except_i386.c b/dlls/msvcrt/except_i386.c index 8ae6056ff8f..1bba898d1da 100644 --- a/dlls/msvcrt/except_i386.c +++ b/dlls/msvcrt/except_i386.c @@ -477,10 +477,7 @@ int CDECL __CxxExceptionFilter( PEXCEPTION_POINTERS ptrs, if (!ti) return EXCEPTION_EXECUTE_HANDLER; rec = ptrs->ExceptionRecord; - if (rec->ExceptionCode != CXX_EXCEPTION || rec->NumberParameters != 3 || - rec->ExceptionInformation[0] < CXX_FRAME_MAGIC_VC6 || - rec->ExceptionInformation[0] > CXX_FRAME_MAGIC_VC8) - return EXCEPTION_CONTINUE_SEARCH; + if (!is_cxx_exception( rec )) return EXCEPTION_CONTINUE_SEARCH; if (rec->ExceptionInformation[1] == 0 && rec->ExceptionInformation[2] == 0) {
1
0
0
0
Alexandre Julliard : msvcrt: Unify __CxxDetectRethrow implementations.
by Alexandre Julliard
17 May '24
17 May '24
Module: wine Branch: master Commit: 6945ce6bc37225f691549e1f8114ba681c8e8114 URL:
https://gitlab.winehq.org/wine/wine/-/commit/6945ce6bc37225f691549e1f8114ba…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 17 12:36:30 2024 +0200 msvcrt: Unify __CxxDetectRethrow implementations. --- dlls/msvcrt/cppexcept.h | 6 ++++++ dlls/msvcrt/except.c | 23 +++++++++++++++++++++++ dlls/msvcrt/except_arm.c | 24 ------------------------ dlls/msvcrt/except_arm64.c | 24 ------------------------ dlls/msvcrt/except_arm64ec.c | 24 ------------------------ dlls/msvcrt/except_i386.c | 23 ----------------------- dlls/msvcrt/except_x86_64.c | 24 ------------------------ 7 files changed, 29 insertions(+), 119 deletions(-) diff --git a/dlls/msvcrt/cppexcept.h b/dlls/msvcrt/cppexcept.h index 9760e6222bb..d5ad0f8a0f6 100644 --- a/dlls/msvcrt/cppexcept.h +++ b/dlls/msvcrt/cppexcept.h @@ -28,6 +28,12 @@ #define CXX_FRAME_MAGIC_VC8 0x19930522 #define CXX_EXCEPTION 0xe06d7363 +#ifdef __x86_64__ +#define CXX_EXCEPTION_PARAMS 4 +#else +#define CXX_EXCEPTION_PARAMS 3 +#endif + #define FUNC_DESCR_SYNCHRONOUS 1 /* synchronous exceptions only (built with /EHs and /EHsc) */ #define FUNC_DESCR_NOEXCEPT 4 /* noexcept function */ diff --git a/dlls/msvcrt/except.c b/dlls/msvcrt/except.c index c224c472c55..ce1a7525d4a 100644 --- a/dlls/msvcrt/except.c +++ b/dlls/msvcrt/except.c @@ -287,6 +287,29 @@ int CDECL __CppXcptFilter(NTSTATUS ex, PEXCEPTION_POINTERS ptr) return _XcptFilter(ex, ptr); } +/********************************************************************* + * __CxxDetectRethrow (MSVCRT.@) + */ +BOOL CDECL __CxxDetectRethrow(PEXCEPTION_POINTERS ptrs) +{ + PEXCEPTION_RECORD rec; + + if (!ptrs) + return FALSE; + + rec = ptrs->ExceptionRecord; + + if (rec->ExceptionCode == CXX_EXCEPTION && + rec->NumberParameters == CXX_EXCEPTION_PARAMS && + rec->ExceptionInformation[0] == CXX_FRAME_MAGIC_VC6 && + rec->ExceptionInformation[2]) + { + ptrs->ExceptionRecord = msvcrt_get_thread_data()->exc_record; + return TRUE; + } + return (msvcrt_get_thread_data()->exc_record == rec); +} + /********************************************************************* * __CxxQueryExceptionSize (MSVCRT.@) */ diff --git a/dlls/msvcrt/except_arm.c b/dlls/msvcrt/except_arm.c index 84a2f358213..47194b4e8ae 100644 --- a/dlls/msvcrt/except_arm.c +++ b/dlls/msvcrt/except_arm.c @@ -61,30 +61,6 @@ EXCEPTION_DISPOSITION CDECL __CxxFrameHandler(EXCEPTION_RECORD *rec, DWORD frame } -/********************************************************************* - * __CxxDetectRethrow (MSVCRT.@) - */ -BOOL CDECL __CxxDetectRethrow(PEXCEPTION_POINTERS ptrs) -{ - PEXCEPTION_RECORD rec; - - if (!ptrs) - return FALSE; - - rec = ptrs->ExceptionRecord; - - if (rec->ExceptionCode == CXX_EXCEPTION && - rec->NumberParameters == 3 && - rec->ExceptionInformation[0] == CXX_FRAME_MAGIC_VC6 && - rec->ExceptionInformation[2]) - { - ptrs->ExceptionRecord = msvcrt_get_thread_data()->exc_record; - return TRUE; - } - return (msvcrt_get_thread_data()->exc_record == rec); -} - - /********************************************************************* * _fpieee_flt (MSVCRT.@) */ diff --git a/dlls/msvcrt/except_arm64.c b/dlls/msvcrt/except_arm64.c index fc1af2e2689..bbff0f618cc 100644 --- a/dlls/msvcrt/except_arm64.c +++ b/dlls/msvcrt/except_arm64.c @@ -62,30 +62,6 @@ EXCEPTION_DISPOSITION CDECL __CxxFrameHandler(EXCEPTION_RECORD *rec, ULONG64 fra } -/********************************************************************* - * __CxxDetectRethrow (MSVCRT.@) - */ -BOOL CDECL __CxxDetectRethrow(PEXCEPTION_POINTERS ptrs) -{ - PEXCEPTION_RECORD rec; - - if (!ptrs) - return FALSE; - - rec = ptrs->ExceptionRecord; - - if (rec->ExceptionCode == CXX_EXCEPTION && - rec->NumberParameters == 3 && - rec->ExceptionInformation[0] == CXX_FRAME_MAGIC_VC6 && - rec->ExceptionInformation[2]) - { - ptrs->ExceptionRecord = msvcrt_get_thread_data()->exc_record; - return TRUE; - } - return (msvcrt_get_thread_data()->exc_record == rec); -} - - /******************************************************************* * _setjmp (MSVCRT.@) */ diff --git a/dlls/msvcrt/except_arm64ec.c b/dlls/msvcrt/except_arm64ec.c index 826884f4df4..5ef9dae809b 100644 --- a/dlls/msvcrt/except_arm64ec.c +++ b/dlls/msvcrt/except_arm64ec.c @@ -61,30 +61,6 @@ EXCEPTION_DISPOSITION CDECL __CxxFrameHandler( EXCEPTION_RECORD *rec, ULONG64 fr } -/********************************************************************* - * __CxxDetectRethrow (MSVCRT.@) - */ -BOOL CDECL __CxxDetectRethrow( PEXCEPTION_POINTERS ptrs ) -{ - PEXCEPTION_RECORD rec; - - if (!ptrs) - return FALSE; - - rec = ptrs->ExceptionRecord; - - if (rec->ExceptionCode == CXX_EXCEPTION && - rec->NumberParameters == 3 && - rec->ExceptionInformation[0] == CXX_FRAME_MAGIC_VC6 && - rec->ExceptionInformation[2]) - { - ptrs->ExceptionRecord = msvcrt_get_thread_data()->exc_record; - return TRUE; - } - return (msvcrt_get_thread_data()->exc_record == rec); -} - - /********************************************************************* * _fpieee_flt (MSVCRT.@) */ diff --git a/dlls/msvcrt/except_i386.c b/dlls/msvcrt/except_i386.c index 6ce65fc7122..8ae6056ff8f 100644 --- a/dlls/msvcrt/except_i386.c +++ b/dlls/msvcrt/except_i386.c @@ -689,29 +689,6 @@ void __stdcall __CxxLongjmpUnwind( const _JUMP_BUFFER *buf ) cxx_local_unwind( frame, descr, buf->TryLevel ); } -/********************************************************************* - * __CxxDetectRethrow (MSVCRT.@) - */ -BOOL CDECL __CxxDetectRethrow(PEXCEPTION_POINTERS ptrs) -{ - PEXCEPTION_RECORD rec; - - if (!ptrs) - return FALSE; - - rec = ptrs->ExceptionRecord; - - if (rec->ExceptionCode == CXX_EXCEPTION && - rec->NumberParameters == 3 && - rec->ExceptionInformation[0] == CXX_FRAME_MAGIC_VC6 && - rec->ExceptionInformation[2]) - { - ptrs->ExceptionRecord = msvcrt_get_thread_data()->exc_record; - return TRUE; - } - return (msvcrt_get_thread_data()->exc_record == rec); -} - /********************************************************************* * _EH_prolog (MSVCRT.@) */ diff --git a/dlls/msvcrt/except_x86_64.c b/dlls/msvcrt/except_x86_64.c index a2537c9a549..fee2ec236a1 100644 --- a/dlls/msvcrt/except_x86_64.c +++ b/dlls/msvcrt/except_x86_64.c @@ -655,30 +655,6 @@ EXCEPTION_DISPOSITION CDECL __CxxFrameHandler( EXCEPTION_RECORD *rec, ULONG64 fr } -/********************************************************************* - * __CxxDetectRethrow (MSVCRT.@) - */ -BOOL CDECL __CxxDetectRethrow(PEXCEPTION_POINTERS ptrs) -{ - PEXCEPTION_RECORD rec; - - if (!ptrs) - return FALSE; - - rec = ptrs->ExceptionRecord; - - if (rec->ExceptionCode == CXX_EXCEPTION && - rec->NumberParameters == 4 && - rec->ExceptionInformation[0] == CXX_FRAME_MAGIC_VC6 && - rec->ExceptionInformation[2]) - { - ptrs->ExceptionRecord = msvcrt_get_thread_data()->exc_record; - return TRUE; - } - return (msvcrt_get_thread_data()->exc_record == rec); -} - - /******************************************************************* * longjmp (MSVCRT.@) */
1
0
0
0
Alexandre Julliard : msvcrt: Unify __CxxQueryExceptionSize implementations.
by Alexandre Julliard
17 May '24
17 May '24
Module: wine Branch: master Commit: e5e52a9a9fbc1c552613a8144a608d83489b67bf URL:
https://gitlab.winehq.org/wine/wine/-/commit/e5e52a9a9fbc1c552613a8144a608d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 17 12:32:12 2024 +0200 msvcrt: Unify __CxxQueryExceptionSize implementations. --- dlls/msvcrt/except.c | 8 ++++++++ dlls/msvcrt/except_arm.c | 9 --------- dlls/msvcrt/except_arm64.c | 9 --------- dlls/msvcrt/except_arm64ec.c | 9 --------- dlls/msvcrt/except_i386.c | 9 --------- dlls/msvcrt/except_x86_64.c | 9 --------- 6 files changed, 8 insertions(+), 45 deletions(-) diff --git a/dlls/msvcrt/except.c b/dlls/msvcrt/except.c index ba8a6c6b216..c224c472c55 100644 --- a/dlls/msvcrt/except.c +++ b/dlls/msvcrt/except.c @@ -287,6 +287,14 @@ int CDECL __CppXcptFilter(NTSTATUS ex, PEXCEPTION_POINTERS ptr) return _XcptFilter(ex, ptr); } +/********************************************************************* + * __CxxQueryExceptionSize (MSVCRT.@) + */ +unsigned int CDECL __CxxQueryExceptionSize(void) +{ + return sizeof(cxx_exception_type); +} + /********************************************************************* * _abnormal_termination (MSVCRT.@) */ diff --git a/dlls/msvcrt/except_arm.c b/dlls/msvcrt/except_arm.c index 21173db4925..84a2f358213 100644 --- a/dlls/msvcrt/except_arm.c +++ b/dlls/msvcrt/except_arm.c @@ -85,15 +85,6 @@ BOOL CDECL __CxxDetectRethrow(PEXCEPTION_POINTERS ptrs) } -/********************************************************************* - * __CxxQueryExceptionSize (MSVCRT.@) - */ -unsigned int CDECL __CxxQueryExceptionSize(void) -{ - return sizeof(cxx_exception_type); -} - - /********************************************************************* * _fpieee_flt (MSVCRT.@) */ diff --git a/dlls/msvcrt/except_arm64.c b/dlls/msvcrt/except_arm64.c index 9a7a91a3b2e..fc1af2e2689 100644 --- a/dlls/msvcrt/except_arm64.c +++ b/dlls/msvcrt/except_arm64.c @@ -86,15 +86,6 @@ BOOL CDECL __CxxDetectRethrow(PEXCEPTION_POINTERS ptrs) } -/********************************************************************* - * __CxxQueryExceptionSize (MSVCRT.@) - */ -unsigned int CDECL __CxxQueryExceptionSize(void) -{ - return sizeof(cxx_exception_type); -} - - /******************************************************************* * _setjmp (MSVCRT.@) */ diff --git a/dlls/msvcrt/except_arm64ec.c b/dlls/msvcrt/except_arm64ec.c index f90e3797d05..826884f4df4 100644 --- a/dlls/msvcrt/except_arm64ec.c +++ b/dlls/msvcrt/except_arm64ec.c @@ -85,15 +85,6 @@ BOOL CDECL __CxxDetectRethrow( PEXCEPTION_POINTERS ptrs ) } -/********************************************************************* - * __CxxQueryExceptionSize (MSVCRT.@) - */ -unsigned int CDECL __CxxQueryExceptionSize(void) -{ - return sizeof(cxx_exception_type); -} - - /********************************************************************* * _fpieee_flt (MSVCRT.@) */ diff --git a/dlls/msvcrt/except_i386.c b/dlls/msvcrt/except_i386.c index 98956f2ec48..6ce65fc7122 100644 --- a/dlls/msvcrt/except_i386.c +++ b/dlls/msvcrt/except_i386.c @@ -712,15 +712,6 @@ BOOL CDECL __CxxDetectRethrow(PEXCEPTION_POINTERS ptrs) return (msvcrt_get_thread_data()->exc_record == rec); } -/********************************************************************* - * __CxxQueryExceptionSize (MSVCRT.@) - */ -unsigned int CDECL __CxxQueryExceptionSize(void) -{ - return sizeof(cxx_exception_type); -} - - /********************************************************************* * _EH_prolog (MSVCRT.@) */ diff --git a/dlls/msvcrt/except_x86_64.c b/dlls/msvcrt/except_x86_64.c index b4b49ba9373..a2537c9a549 100644 --- a/dlls/msvcrt/except_x86_64.c +++ b/dlls/msvcrt/except_x86_64.c @@ -679,15 +679,6 @@ BOOL CDECL __CxxDetectRethrow(PEXCEPTION_POINTERS ptrs) } -/********************************************************************* - * __CxxQueryExceptionSize (MSVCRT.@) - */ -unsigned int CDECL __CxxQueryExceptionSize(void) -{ - return sizeof(cxx_exception_type); -} - - /******************************************************************* * longjmp (MSVCRT.@) */
1
0
0
0
Alexandre Julliard : msvcrt: Unify __CppXcptFilter implementations.
by Alexandre Julliard
17 May '24
17 May '24
Module: wine Branch: master Commit: 670e45934669ae89fda4cc5b9324ac0a4c96427f URL:
https://gitlab.winehq.org/wine/wine/-/commit/670e45934669ae89fda4cc5b9324ac…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 17 12:31:49 2024 +0200 msvcrt: Unify __CppXcptFilter implementations. --- dlls/msvcrt/except.c | 10 ++++++++++ dlls/msvcrt/except_arm.c | 11 ----------- dlls/msvcrt/except_arm64.c | 11 ----------- dlls/msvcrt/except_arm64ec.c | 11 ----------- dlls/msvcrt/except_i386.c | 10 ---------- dlls/msvcrt/except_x86_64.c | 11 ----------- 6 files changed, 10 insertions(+), 54 deletions(-) diff --git a/dlls/msvcrt/except.c b/dlls/msvcrt/except.c index a7140a9011f..ba8a6c6b216 100644 --- a/dlls/msvcrt/except.c +++ b/dlls/msvcrt/except.c @@ -277,6 +277,16 @@ int CDECL _XcptFilter(NTSTATUS ex, PEXCEPTION_POINTERS ptr) return msvcrt_exception_filter(ptr); } +/********************************************************************* + * __CppXcptFilter (MSVCRT.@) + */ +int CDECL __CppXcptFilter(NTSTATUS ex, PEXCEPTION_POINTERS ptr) +{ + /* only filter c++ exceptions */ + if (ex != CXX_EXCEPTION) return EXCEPTION_CONTINUE_SEARCH; + return _XcptFilter(ex, ptr); +} + /********************************************************************* * _abnormal_termination (MSVCRT.@) */ diff --git a/dlls/msvcrt/except_arm.c b/dlls/msvcrt/except_arm.c index a79cbe63c44..21173db4925 100644 --- a/dlls/msvcrt/except_arm.c +++ b/dlls/msvcrt/except_arm.c @@ -61,17 +61,6 @@ EXCEPTION_DISPOSITION CDECL __CxxFrameHandler(EXCEPTION_RECORD *rec, DWORD frame } -/********************************************************************* - * __CppXcptFilter (MSVCRT.@) - */ -int CDECL __CppXcptFilter(NTSTATUS ex, PEXCEPTION_POINTERS ptr) -{ - /* only filter c++ exceptions */ - if (ex != CXX_EXCEPTION) return EXCEPTION_CONTINUE_SEARCH; - return _XcptFilter(ex, ptr); -} - - /********************************************************************* * __CxxDetectRethrow (MSVCRT.@) */ diff --git a/dlls/msvcrt/except_arm64.c b/dlls/msvcrt/except_arm64.c index 793c71f3251..9a7a91a3b2e 100644 --- a/dlls/msvcrt/except_arm64.c +++ b/dlls/msvcrt/except_arm64.c @@ -62,17 +62,6 @@ EXCEPTION_DISPOSITION CDECL __CxxFrameHandler(EXCEPTION_RECORD *rec, ULONG64 fra } -/********************************************************************* - * __CppXcptFilter (MSVCRT.@) - */ -int CDECL __CppXcptFilter(NTSTATUS ex, PEXCEPTION_POINTERS ptr) -{ - /* only filter c++ exceptions */ - if (ex != CXX_EXCEPTION) return EXCEPTION_CONTINUE_SEARCH; - return _XcptFilter(ex, ptr); -} - - /********************************************************************* * __CxxDetectRethrow (MSVCRT.@) */ diff --git a/dlls/msvcrt/except_arm64ec.c b/dlls/msvcrt/except_arm64ec.c index d9ea54c4d1c..f90e3797d05 100644 --- a/dlls/msvcrt/except_arm64ec.c +++ b/dlls/msvcrt/except_arm64ec.c @@ -61,17 +61,6 @@ EXCEPTION_DISPOSITION CDECL __CxxFrameHandler( EXCEPTION_RECORD *rec, ULONG64 fr } -/********************************************************************* - * __CppXcptFilter (MSVCRT.@) - */ -int CDECL __CppXcptFilter( NTSTATUS ex, PEXCEPTION_POINTERS ptr ) -{ - /* only filter c++ exceptions */ - if (ex != CXX_EXCEPTION) return EXCEPTION_CONTINUE_SEARCH; - return _XcptFilter(ex, ptr); -} - - /********************************************************************* * __CxxDetectRethrow (MSVCRT.@) */ diff --git a/dlls/msvcrt/except_i386.c b/dlls/msvcrt/except_i386.c index f63d3910e04..98956f2ec48 100644 --- a/dlls/msvcrt/except_i386.c +++ b/dlls/msvcrt/except_i386.c @@ -689,16 +689,6 @@ void __stdcall __CxxLongjmpUnwind( const _JUMP_BUFFER *buf ) cxx_local_unwind( frame, descr, buf->TryLevel ); } -/********************************************************************* - * __CppXcptFilter (MSVCRT.@) - */ -int CDECL __CppXcptFilter(NTSTATUS ex, PEXCEPTION_POINTERS ptr) -{ - /* only filter c++ exceptions */ - if (ex != CXX_EXCEPTION) return EXCEPTION_CONTINUE_SEARCH; - return _XcptFilter( ex, ptr ); -} - /********************************************************************* * __CxxDetectRethrow (MSVCRT.@) */ diff --git a/dlls/msvcrt/except_x86_64.c b/dlls/msvcrt/except_x86_64.c index 3a2e13b3082..b4b49ba9373 100644 --- a/dlls/msvcrt/except_x86_64.c +++ b/dlls/msvcrt/except_x86_64.c @@ -655,17 +655,6 @@ EXCEPTION_DISPOSITION CDECL __CxxFrameHandler( EXCEPTION_RECORD *rec, ULONG64 fr } -/********************************************************************* - * __CppXcptFilter (MSVCRT.@) - */ -int CDECL __CppXcptFilter(NTSTATUS ex, PEXCEPTION_POINTERS ptr) -{ - /* only filter c++ exceptions */ - if (ex != CXX_EXCEPTION) return EXCEPTION_CONTINUE_SEARCH; - return _XcptFilter( ex, ptr ); -} - - /********************************************************************* * __CxxDetectRethrow (MSVCRT.@) */
1
0
0
0
Alexandre Julliard : msvcrt: Resync cxx.h with msvcp90.
by Alexandre Julliard
17 May '24
17 May '24
Module: wine Branch: master Commit: 9680ef7ea99f0aabe9a8fd8a41d41522bafc8e3e URL:
https://gitlab.winehq.org/wine/wine/-/commit/9680ef7ea99f0aabe9a8fd8a41d415…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 17 09:36:19 2024 +0200 msvcrt: Resync cxx.h with msvcp90. --- dlls/concrt140/concrt140.c | 2 +- dlls/concrt140/details.h | 2 +- dlls/msvcp90/cxx.h | 25 +++-- dlls/msvcp90/exception.c | 28 +++--- dlls/msvcrt/concurrency.c | 3 +- dlls/msvcrt/cpp.c | 12 +-- dlls/msvcrt/cppexcept.h | 188 ++++-------------------------------- dlls/msvcrt/cxx.h | 226 ++++++++++++++++++++++++++++++++++++-------- dlls/msvcrt/except_i386.c | 7 +- dlls/msvcrt/exception_ptr.c | 2 +- dlls/msvcrt/handler4.c | 2 - 11 files changed, 239 insertions(+), 258 deletions(-)
1
0
0
0
Nikolay Sivov : vkd3d-shader/fx: Use correct type name when reusing types.
by Alexandre Julliard
16 May '24
16 May '24
Module: vkd3d Branch: master Commit: 9c83caeda652d7968c10e54cca2ae3b7fc18f384 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/9c83caeda652d7968c10e54cca2ae…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Apr 21 20:11:05 2024 +0200 vkd3d-shader/fx: Use correct type name when reusing types. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- libs/vkd3d-shader/fx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libs/vkd3d-shader/fx.c b/libs/vkd3d-shader/fx.c index 9ad33f25..57b4ac24 100644 --- a/libs/vkd3d-shader/fx.c +++ b/libs/vkd3d-shader/fx.c @@ -129,9 +129,11 @@ static void write_pass(struct hlsl_ir_var *var, struct fx_write_context *fx) } static uint32_t write_fx_4_type(const struct hlsl_type *type, struct fx_write_context *fx); +static const char * get_fx_4_type_name(const struct hlsl_type *type); static uint32_t write_type(const struct hlsl_type *type, struct fx_write_context *fx) { + const struct hlsl_type *element_type; struct type_entry *type_entry; unsigned int elements_count; const char *name; @@ -140,15 +142,17 @@ static uint32_t write_type(const struct hlsl_type *type, struct fx_write_context if (type->class == HLSL_CLASS_ARRAY) { - name = hlsl_get_multiarray_element_type(type)->name; elements_count = hlsl_get_multiarray_size(type); + element_type = hlsl_get_multiarray_element_type(type); } else { - name = type->name; elements_count = 0; + element_type = type; } + name = get_fx_4_type_name(element_type); + LIST_FOR_EACH_ENTRY(type_entry, &fx->types, struct type_entry, entry) { if (strcmp(type_entry->name, name))
1
0
0
0
Nikolay Sivov : vkd3d-shader/fx: Implement writing shared buffers.
by Alexandre Julliard
16 May '24
16 May '24
Module: vkd3d Branch: master Commit: a913ac78445e3e700e573f085b44e2aaba6d1bb4 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/a913ac78445e3e700e573f085b44e…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Apr 21 19:06:55 2024 +0200 vkd3d-shader/fx: Implement writing shared buffers. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- libs/vkd3d-shader/fx.c | 70 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 47 insertions(+), 23 deletions(-) diff --git a/libs/vkd3d-shader/fx.c b/libs/vkd3d-shader/fx.c index 6fb2e8a0..9ad33f25 100644 --- a/libs/vkd3d-shader/fx.c +++ b/libs/vkd3d-shader/fx.c @@ -82,7 +82,9 @@ struct fx_write_context uint32_t technique_count; uint32_t group_count; uint32_t buffer_count; + uint32_t shared_buffer_count; uint32_t numeric_variable_count; + uint32_t shared_numeric_variable_count; uint32_t object_variable_count; uint32_t shared_object_count; uint32_t shader_count; @@ -969,11 +971,11 @@ static const struct fx_write_context_ops fx_4_ops = .are_child_effects_supported = true, }; -static void write_fx_4_numeric_variable(struct hlsl_ir_var *var, struct fx_write_context *fx) +static void write_fx_4_numeric_variable(struct hlsl_ir_var *var, bool shared, struct fx_write_context *fx) { struct vkd3d_bytecode_buffer *buffer = &fx->structured; + uint32_t name_offset, type_offset, value_offset; uint32_t semantic_offset, flags = 0; - uint32_t name_offset, type_offset; enum fx_4_numeric_variable_flags { HAS_EXPLICIT_BIND_POINT = 0x4, @@ -993,12 +995,24 @@ static void write_fx_4_numeric_variable(struct hlsl_ir_var *var, struct fx_write semantic_offset = put_u32(buffer, semantic_offset); /* Semantic */ put_u32(buffer, var->buffer_offset); /* Offset in the constant buffer */ - put_u32(buffer, 0); /* FIXME: default value offset */ + value_offset = put_u32(buffer, 0); /* Default value offset */ put_u32(buffer, flags); /* Flags */ - put_u32(buffer, 0); /* Annotations count */ - if (has_annotations(var)) - hlsl_fixme(ctx, &ctx->location, "Writing annotations for numeric variables is not implemented."); + if (shared) + { + fx->shared_numeric_variable_count++; + } + else + { + /* FIXME: write default value */ + set_u32(buffer, value_offset, 0); + + put_u32(buffer, 0); /* Annotations count */ + if (has_annotations(var)) + hlsl_fixme(ctx, &ctx->location, "Writing annotations for numeric variables is not implemented."); + + fx->numeric_variable_count++; + } } struct rhs_named_value @@ -1395,6 +1409,9 @@ static void write_fx_4_buffer(struct hlsl_buffer *b, struct fx_write_context *fx struct hlsl_ctx *ctx = fx->ctx; struct hlsl_ir_var *var; uint32_t count_offset; + bool shared; + + shared = fx->child_effect && b->modifiers & HLSL_STORAGE_SHARED; if (b->reservation.reg_type) bind_point = b->reservation.reg_index; @@ -1411,9 +1428,17 @@ static void write_fx_4_buffer(struct hlsl_buffer *b, struct fx_write_context *fx count_offset = put_u32(buffer, 0); put_u32(buffer, bind_point); /* Bind point */ - put_u32(buffer, 0); /* Annotations count */ - if (b->annotations) - hlsl_fixme(ctx, &b->loc, "Writing annotations for buffers is not implemented."); + if (shared) + { + ++fx->shared_buffer_count; + } + else + { + put_u32(buffer, 0); /* Annotations count */ + if (b->annotations) + hlsl_fixme(ctx, &b->loc, "Writing annotations for buffers is not implemented."); + ++fx->buffer_count; + } count = 0; size = 0; @@ -1422,18 +1447,16 @@ static void write_fx_4_buffer(struct hlsl_buffer *b, struct fx_write_context *fx if (var->buffer != b) continue; - write_fx_4_numeric_variable(var, fx); + write_fx_4_numeric_variable(var, shared, fx); size += get_fx_4_type_size(var->data_type); ++count; } set_u32(buffer, count_offset, count); set_u32(buffer, size_offset, align(size, 16)); - - fx->numeric_variable_count += count; } -static void write_buffers(struct fx_write_context *fx) +static void write_buffers(struct fx_write_context *fx, bool shared) { struct hlsl_buffer *buffer; @@ -1443,9 +1466,10 @@ static void write_buffers(struct fx_write_context *fx) continue; if (!strcmp(buffer->name, "$Params")) continue; + if (fx->child_effect && (shared != !!(buffer->modifiers & HLSL_STORAGE_SHARED))) + continue; write_fx_4_buffer(buffer, fx); - ++fx->buffer_count; } } @@ -1505,9 +1529,9 @@ static int hlsl_fx_4_write(struct hlsl_ctx *ctx, struct vkd3d_shader_code *out) put_u32(&fx.unstructured, 0); /* Empty string placeholder. */ - write_buffers(&fx); + write_buffers(&fx, false); write_objects(&fx, false); - /* TODO: shared buffers */ + write_buffers(&fx, true); write_objects(&fx, true); write_techniques(ctx->globals, &fx); @@ -1516,9 +1540,9 @@ static int hlsl_fx_4_write(struct hlsl_ctx *ctx, struct vkd3d_shader_code *out) put_u32(&buffer, fx.buffer_count); /* Buffer count. */ put_u32(&buffer, fx.numeric_variable_count); /* Numeric variable count. */ put_u32(&buffer, fx.object_variable_count); /* Object variable count. */ - put_u32(&buffer, 0); /* Pool buffer count. */ - put_u32(&buffer, 0); /* Pool variable count. */ - put_u32(&buffer, fx.shared_object_count); /* Shared object count. */ + put_u32(&buffer, fx.shared_buffer_count); + put_u32(&buffer, fx.shared_numeric_variable_count); + put_u32(&buffer, fx.shared_object_count); put_u32(&buffer, fx.technique_count); size_offset = put_u32(&buffer, 0); /* Unstructured size. */ put_u32(&buffer, 0); /* String count. */ @@ -1564,7 +1588,7 @@ static int hlsl_fx_5_write(struct hlsl_ctx *ctx, struct vkd3d_shader_code *out) put_u32(&fx.unstructured, 0); /* Empty string placeholder. */ - write_buffers(&fx); + write_buffers(&fx, false); write_objects(&fx, false); /* TODO: interface variables */ @@ -1574,9 +1598,9 @@ static int hlsl_fx_5_write(struct hlsl_ctx *ctx, struct vkd3d_shader_code *out) put_u32(&buffer, fx.buffer_count); /* Buffer count. */ put_u32(&buffer, fx.numeric_variable_count); /* Numeric variable count. */ put_u32(&buffer, fx.object_variable_count); /* Object variable count. */ - put_u32(&buffer, 0); /* Pool buffer count. */ - put_u32(&buffer, 0); /* Pool variable count. */ - put_u32(&buffer, 0); /* Pool object count. */ + put_u32(&buffer, fx.shared_buffer_count); + put_u32(&buffer, fx.shared_numeric_variable_count); + put_u32(&buffer, fx.shared_object_count); put_u32(&buffer, fx.technique_count); size_offset = put_u32(&buffer, 0); /* Unstructured size. */ put_u32(&buffer, 0); /* String count. */
1
0
0
0
← Newer
1
...
29
30
31
32
33
34
35
...
71
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Results per page:
10
25
50
100
200