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
April 2023
----- 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
817 discussions
Start a n
N
ew thread
Rémi Bernon : imm32: Don't hide/show IME UI window in ImmSetCompositionWindow.
by Alexandre Julliard
27 Apr '23
27 Apr '23
Module: wine Branch: master Commit: 2fda6abfc4ecd1ddbac658fd59b3a4d85d516a2d URL:
https://gitlab.winehq.org/wine/wine/-/commit/2fda6abfc4ecd1ddbac658fd59b3a4…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Apr 14 09:17:17 2023 +0200 imm32: Don't hide/show IME UI window in ImmSetCompositionWindow. --- dlls/imm32/imm.c | 10 ---------- dlls/imm32/tests/imm32.c | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c index 2fd247f36c7..554cc00b457 100644 --- a/dlls/imm32/imm.c +++ b/dlls/imm32/imm.c @@ -2629,9 +2629,7 @@ BOOL WINAPI ImmSetCompositionStringW( */ BOOL WINAPI ImmSetCompositionWindow( HIMC himc, COMPOSITIONFORM *composition ) { - BOOL reshow = FALSE; INPUTCONTEXT *ctx; - HWND ui_hwnd; TRACE( "himc %p, composition %s\n", himc, debugstr_composition( composition ) ); @@ -2641,14 +2639,6 @@ BOOL WINAPI ImmSetCompositionWindow( HIMC himc, COMPOSITIONFORM *composition ) ctx->cfCompForm = *composition; ctx->fdwInit |= INIT_COMPFORM; - if ((ui_hwnd = get_ime_ui_window()) && IsWindowVisible( ui_hwnd )) - { - reshow = TRUE; - ShowWindow( ui_hwnd, SW_HIDE ); - } - - if (ui_hwnd && reshow) ShowWindow( ui_hwnd, SW_SHOWNOACTIVATE ); - ImmNotifyIME( himc, NI_CONTEXTUPDATED, 0, IMC_SETCOMPOSITIONWINDOW ); SendMessageW( ctx->hWnd, WM_IME_NOTIFY, IMN_SETCOMPOSITIONWINDOW, 0 ); diff --git a/dlls/imm32/tests/imm32.c b/dlls/imm32/tests/imm32.c index 92b59b7d005..9857583fafa 100644 --- a/dlls/imm32/tests/imm32.c +++ b/dlls/imm32/tests/imm32.c @@ -6221,7 +6221,7 @@ static void test_ImmSetCompositionWindow(void) memset( &comp_form, 0xcd, sizeof(comp_form) ); ok_ret( 1, ImmSetCompositionWindow( himc, &comp_form ) ); process_messages(); - todo_wine ok_seq( set_composition_window_0_seq ); + ok_seq( set_composition_window_0_seq ); ok_eq( INIT_COMPFORM, ctx->fdwInit, UINT, "%u" ); check_composition_form( &ctx->cfCompForm, &comp_form ); ok_ret( 1, IsWindowVisible( ime_windows.ime_ui_hwnd ) );
1
0
0
0
Stefan Dösinger : d3dcompiler: Make D3DAssemble a private export.
by Alexandre Julliard
27 Apr '23
27 Apr '23
Module: wine Branch: master Commit: 3a9e237bdf309450debfc4c11214ad53a241e072 URL:
https://gitlab.winehq.org/wine/wine/-/commit/3a9e237bdf309450debfc4c11214ad…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Wed Apr 19 12:48:14 2023 +0300 d3dcompiler: Make D3DAssemble a private export. --- dlls/d3dcompiler_41/d3dcompiler_41.spec | 2 +- dlls/d3dcompiler_42/d3dcompiler_42.spec | 2 +- dlls/d3dcompiler_43/d3dcompiler_43.spec | 2 +- dlls/d3dcompiler_46/d3dcompiler_46.spec | 2 +- dlls/d3dcompiler_47/d3dcompiler_47.spec | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/d3dcompiler_41/d3dcompiler_41.spec b/dlls/d3dcompiler_41/d3dcompiler_41.spec index e5127bc4ab9..604c7748cf3 100644 --- a/dlls/d3dcompiler_41/d3dcompiler_41.spec +++ b/dlls/d3dcompiler_41/d3dcompiler_41.spec @@ -1,4 +1,4 @@ -@ stdcall D3DAssemble(ptr long str ptr ptr long ptr ptr) +@ stdcall -private D3DAssemble(ptr long str ptr ptr long ptr ptr) @ stub DebugSetMute @ stdcall D3DCompile(ptr long str ptr ptr str str long long ptr ptr) @ stub D3DDisassemble10Effect(ptr long ptr) diff --git a/dlls/d3dcompiler_42/d3dcompiler_42.spec b/dlls/d3dcompiler_42/d3dcompiler_42.spec index e5127bc4ab9..604c7748cf3 100644 --- a/dlls/d3dcompiler_42/d3dcompiler_42.spec +++ b/dlls/d3dcompiler_42/d3dcompiler_42.spec @@ -1,4 +1,4 @@ -@ stdcall D3DAssemble(ptr long str ptr ptr long ptr ptr) +@ stdcall -private D3DAssemble(ptr long str ptr ptr long ptr ptr) @ stub DebugSetMute @ stdcall D3DCompile(ptr long str ptr ptr str str long long ptr ptr) @ stub D3DDisassemble10Effect(ptr long ptr) diff --git a/dlls/d3dcompiler_43/d3dcompiler_43.spec b/dlls/d3dcompiler_43/d3dcompiler_43.spec index ab6cfa04aff..7e2d0411b4e 100644 --- a/dlls/d3dcompiler_43/d3dcompiler_43.spec +++ b/dlls/d3dcompiler_43/d3dcompiler_43.spec @@ -1,4 +1,4 @@ -@ stdcall D3DAssemble(ptr long str ptr ptr long ptr ptr) +@ stdcall -private D3DAssemble(ptr long str ptr ptr long ptr ptr) @ stub DebugSetMute @ stdcall D3DCompile(ptr long str ptr ptr str str long long ptr ptr) @ stub D3DCompressShaders diff --git a/dlls/d3dcompiler_46/d3dcompiler_46.spec b/dlls/d3dcompiler_46/d3dcompiler_46.spec index b069779db06..d6742566502 100644 --- a/dlls/d3dcompiler_46/d3dcompiler_46.spec +++ b/dlls/d3dcompiler_46/d3dcompiler_46.spec @@ -1,4 +1,4 @@ -@ stdcall D3DAssemble(ptr long str ptr ptr long ptr ptr) +@ stdcall -private D3DAssemble(ptr long str ptr ptr long ptr ptr) @ stdcall D3DCompile(ptr long str ptr ptr str str long long ptr ptr) @ stdcall D3DCompile2(ptr long str ptr ptr str str long long long ptr long ptr ptr) @ stdcall D3DCompileFromFile(wstr ptr ptr str str long long ptr ptr) diff --git a/dlls/d3dcompiler_47/d3dcompiler_47.spec b/dlls/d3dcompiler_47/d3dcompiler_47.spec index 38ae8960dc5..ca132979565 100644 --- a/dlls/d3dcompiler_47/d3dcompiler_47.spec +++ b/dlls/d3dcompiler_47/d3dcompiler_47.spec @@ -1,4 +1,4 @@ -@ stdcall D3DAssemble(ptr long str ptr ptr long ptr ptr) +@ stdcall -private D3DAssemble(ptr long str ptr ptr long ptr ptr) @ stdcall D3DCompile(ptr long str ptr ptr str str long long ptr ptr) @ stdcall D3DCompile2(ptr long str ptr ptr str str long long long ptr long ptr ptr) @ stdcall D3DCompileFromFile(wstr ptr ptr str str long long ptr ptr)
1
0
0
0
Stefan Dösinger : d3dcompiler/tests: Load D3DAssemble via GetProcAddress.
by Alexandre Julliard
27 Apr '23
27 Apr '23
Module: wine Branch: master Commit: 3d6569a8b4a61c5ecefb1bf542adf999e411e8b9 URL:
https://gitlab.winehq.org/wine/wine/-/commit/3d6569a8b4a61c5ecefb1bf542adf9…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Wed Apr 19 15:06:49 2023 +0300 d3dcompiler/tests: Load D3DAssemble via GetProcAddress. --- dlls/d3dcompiler_43/tests/asm.c | 23 +++++++++++++++-------- dlls/d3dcompiler_43/tests/hlsl_d3d9.c | 9 +++++++-- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/dlls/d3dcompiler_43/tests/asm.c b/dlls/d3dcompiler_43/tests/asm.c index 6c22eae66c8..6d3e7013017 100644 --- a/dlls/d3dcompiler_43/tests/asm.c +++ b/dlls/d3dcompiler_43/tests/asm.c @@ -27,7 +27,7 @@ perhaps with a different name? */ #define D3DXERR_INVALIDDATA 0x88760b59 -HRESULT WINAPI D3DAssemble(const void *data, SIZE_T datasize, const char *filename, +static HRESULT (WINAPI *pD3DAssemble)(const void *data, SIZE_T datasize, const char *filename, const D3D_SHADER_MACRO *defines, ID3DInclude *include, UINT flags, ID3DBlob **shader, ID3DBlob **error_messages); @@ -57,7 +57,7 @@ static void exec_tests(const char *name, struct shader_test tests[], unsigned in for(i = 0; i < count; i++) { /* D3DAssemble sets messages to 0 if there aren't error messages */ messages = NULL; - hr = D3DAssemble(tests[i].text, strlen(tests[i].text), NULL, NULL, + hr = pD3DAssemble(tests[i].text, strlen(tests[i].text), NULL, NULL, NULL, D3DCOMPILE_SKIP_VALIDATION, &shader, &messages); ok(hr == S_OK, "Test %s, shader %u: D3DAssemble failed with error %#lx - %ld.\n", name, i, hr, hr & 0xffff); if(messages) { @@ -1431,7 +1431,7 @@ static void failure_test(void) { { shader = NULL; messages = NULL; - hr = D3DAssemble(tests[i], strlen(tests[i]), NULL, NULL, NULL, D3DCOMPILE_SKIP_VALIDATION, &shader, &messages); + hr = pD3DAssemble(tests[i], strlen(tests[i]), NULL, NULL, NULL, D3DCOMPILE_SKIP_VALIDATION, &shader, &messages); ok(hr == D3DXERR_INVALIDDATA, "Test %u: Got unexpected hr %#lx.\n", i, hr); if (messages) { @@ -1556,7 +1556,7 @@ static void assembleshader_test(void) { /* defines test */ shader = NULL; messages = NULL; - hr = D3DAssemble(test1, strlen(test1), NULL, defines, NULL, D3DCOMPILE_SKIP_VALIDATION, &shader, &messages); + hr = pD3DAssemble(test1, strlen(test1), NULL, defines, NULL, D3DCOMPILE_SKIP_VALIDATION, &shader, &messages); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); if (messages) { @@ -1567,14 +1567,14 @@ static void assembleshader_test(void) { /* NULL messages test */ shader = NULL; - hr = D3DAssemble(test1, strlen(test1), NULL, defines, NULL, D3DCOMPILE_SKIP_VALIDATION, &shader, NULL); + hr = pD3DAssemble(test1, strlen(test1), NULL, defines, NULL, D3DCOMPILE_SKIP_VALIDATION, &shader, NULL); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); if (shader) ID3D10Blob_Release(shader); /* NULL shader test */ messages = NULL; - hr = D3DAssemble(test1, strlen(test1), NULL, defines, NULL, D3DCOMPILE_SKIP_VALIDATION, NULL, &messages); + hr = pD3DAssemble(test1, strlen(test1), NULL, defines, NULL, D3DCOMPILE_SKIP_VALIDATION, NULL, &messages); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); if (messages) { @@ -1586,7 +1586,7 @@ static void assembleshader_test(void) { shader = NULL; messages = NULL; include.ID3DInclude_iface.lpVtbl = &D3DInclude_Vtbl; - hr = D3DAssemble(testshader, strlen(testshader), NULL, NULL, + hr = pD3DAssemble(testshader, strlen(testshader), NULL, NULL, &include.ID3DInclude_iface, D3DCOMPILE_SKIP_VALIDATION, &shader, &messages); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); if (messages) @@ -1599,7 +1599,7 @@ static void assembleshader_test(void) { /* NULL shader tests */ shader = NULL; messages = NULL; - hr = D3DAssemble(NULL, 0, NULL, NULL, NULL, D3DCOMPILE_SKIP_VALIDATION, &shader, &messages); + hr = pD3DAssemble(NULL, 0, NULL, NULL, NULL, D3DCOMPILE_SKIP_VALIDATION, &shader, &messages); ok(hr == D3DXERR_INVALIDDATA, "Got unexpected hr %#lx.\n", hr); if (messages) { @@ -1762,6 +1762,13 @@ static void test_disassemble_shader(void) START_TEST(asm) { + HMODULE d3dcompiler; + char buffer[20]; + + sprintf(buffer, "d3dcompiler_%d", D3D_COMPILER_VERSION); + d3dcompiler = GetModuleHandleA(buffer); + pD3DAssemble = (void *)GetProcAddress(d3dcompiler, "D3DAssemble"); + preproc_test(); ps_1_1_test(); vs_1_1_test(); diff --git a/dlls/d3dcompiler_43/tests/hlsl_d3d9.c b/dlls/d3dcompiler_43/tests/hlsl_d3d9.c index 4fef301a721..f99aba87753 100644 --- a/dlls/d3dcompiler_43/tests/hlsl_d3d9.c +++ b/dlls/d3dcompiler_43/tests/hlsl_d3d9.c @@ -26,7 +26,7 @@ #define D3DXERR_INVALIDDATA 0x88760b59 -HRESULT WINAPI D3DAssemble(const void *data, SIZE_T datasize, const char *filename, +static HRESULT (WINAPI *pD3DAssemble)(const void *data, SIZE_T datasize, const char *filename, const D3D_SHADER_MACRO *defines, ID3DInclude *include, UINT flags, ID3DBlob **shader, ID3DBlob **error_messages); @@ -1499,7 +1499,7 @@ static HRESULT call_D3DAssemble(const char *source_name, ID3DInclude *include, I "#include \"include\\include3.h\"\n" "mov oC0, c0"; - return D3DAssemble(ps_code, sizeof(ps_code), source_name, NULL, include, 0, blob, errors); + return pD3DAssemble(ps_code, sizeof(ps_code), source_name, NULL, include, 0, blob, errors); } static HRESULT call_D3DCompile(const char *source_name, ID3DInclude *include, ID3D10Blob **blob, ID3D10Blob **errors) @@ -1761,6 +1761,7 @@ static void test_no_output_blob(void) START_TEST(hlsl_d3d9) { + char buffer[20]; HMODULE mod; if (!(mod = LoadLibraryA("d3dx9_36.dll"))) @@ -1770,6 +1771,10 @@ START_TEST(hlsl_d3d9) } pD3DXGetShaderConstantTable = (void *)GetProcAddress(mod, "D3DXGetShaderConstantTable"); + sprintf(buffer, "d3dcompiler_%d", D3D_COMPILER_VERSION); + mod = GetModuleHandleA(buffer); + pD3DAssemble = (void *)GetProcAddress(mod, "D3DAssemble"); + test_swizzle(); test_math(); test_conditionals();
1
0
0
0
Stefan Dösinger : d3dx9: Load D3DAssemble via GetProcAddress.
by Alexandre Julliard
27 Apr '23
27 Apr '23
Module: wine Branch: master Commit: 6d41756ce10430ae4fbe18d70312ca66ccbfd883 URL:
https://gitlab.winehq.org/wine/wine/-/commit/6d41756ce10430ae4fbe18d70312ca…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Tue Apr 18 16:50:27 2023 +0300 d3dx9: Load D3DAssemble via GetProcAddress. This allows linking our d3dx9.dll to Microsoft's d3dcompiler.lib implib. --- dlls/d3dx9_36/shader.c | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c index 1aa75d64dc5..7d06090aa15 100644 --- a/dlls/d3dx9_36/shader.c +++ b/dlls/d3dx9_36/shader.c @@ -26,11 +26,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3dx); -/* This function is not declared in the SDK headers yet. */ -HRESULT WINAPI D3DAssemble(const void *data, SIZE_T datasize, const char *filename, - const D3D_SHADER_MACRO *defines, ID3DInclude *include, UINT flags, - ID3DBlob **shader, ID3DBlob **error_messages); - static inline BOOL is_valid_bytecode(DWORD token) { return (token & 0xfffe0000) == 0xfffe0000; @@ -193,19 +188,41 @@ HRESULT WINAPI D3DXFindShaderComment(const DWORD *byte_code, DWORD fourcc, const return S_FALSE; } +static BOOL WINAPI load_d3dassemble_once(INIT_ONCE *once, void *param, void **context) +{ + /* FIXME: This assumes that d3dcompiler.h and dlls/d3dcompiler_XX/Makefile.in stay + * in sync regarding which library creates the unnumbered d3dcompiler.lib implib. + * GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, D3DCompile) would + * be nice, but "D3DCompile" will point to the IAT stub, not d3dcompiler_xy.dll */ + HMODULE mod = GetModuleHandleW(D3DCOMPILER_DLL_W); + void **assemble = param; + + if (!mod) + ERR("%s not found - which d3dcompiler are we linked against?\n", D3DCOMPILER_DLL_A); + + *assemble = (void *)GetProcAddress(mod, "D3DAssemble"); + return TRUE; +} + HRESULT WINAPI D3DXAssembleShader(const char *data, UINT data_len, const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages) { + static HRESULT (WINAPI *pD3DAssemble)(const void *data, SIZE_T datasize, const char *filename, + const D3D_SHADER_MACRO * defines, ID3DInclude * include, UINT flags, + ID3DBlob * *shader, ID3DBlob * *error_messages); + static INIT_ONCE init_once = INIT_ONCE_STATIC_INIT; HRESULT hr; TRACE("data %p, data_len %u, defines %p, include %p, flags %#lx, shader %p, error_messages %p.\n", data, data_len, defines, include, flags, shader, error_messages); + InitOnceExecuteOnce(&init_once, load_d3dassemble_once, &pD3DAssemble, NULL); + /* Forward to d3dcompiler: the parameter types aren't really different, the actual data types are equivalent */ - hr = D3DAssemble(data, data_len, NULL, (D3D_SHADER_MACRO *)defines, - (ID3DInclude *)include, flags, (ID3DBlob **)shader, - (ID3DBlob **)error_messages); + hr = pD3DAssemble(data, data_len, NULL, (D3D_SHADER_MACRO *)defines, + (ID3DInclude *)include, flags, (ID3DBlob **)shader, + (ID3DBlob **)error_messages); if(hr == E_FAIL) hr = D3DXERR_INVALIDDATA; return hr;
1
0
0
0
Piotr Caban : gdi32: Add GdiIsMetaPrintDC implementation.
by Alexandre Julliard
27 Apr '23
27 Apr '23
Module: wine Branch: master Commit: e0513f4dd1371e831acbf1bbf6a5f383d56fc4bb URL:
https://gitlab.winehq.org/wine/wine/-/commit/e0513f4dd1371e831acbf1bbf6a5f3…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Apr 27 11:49:57 2023 +0200 gdi32: Add GdiIsMetaPrintDC implementation. --- dlls/gdi32/dc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index 459d0dfb8c1..011bded3523 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -2408,8 +2408,12 @@ INT WINAPI SetICMMode( HDC hdc, INT mode ) */ BOOL WINAPI GdiIsMetaPrintDC( HDC hdc ) { - FIXME( "%p\n", hdc ); - return FALSE; + DC_ATTR *dc_attr; + + TRACE( "%p\n", hdc ); + + if (!(dc_attr = get_dc_attr( hdc ))) return FALSE; + return dc_attr->print && dc_attr->emf; } /***********************************************************************
1
0
0
0
Piotr Caban : gdi32: Add support for creating EMF spool files.
by Alexandre Julliard
27 Apr '23
27 Apr '23
Module: wine Branch: master Commit: ca66b3eb8440db53fb110b559d29c6783be61e42 URL:
https://gitlab.winehq.org/wine/wine/-/commit/ca66b3eb8440db53fb110b559d29c6…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Apr 26 19:26:21 2023 +0200 gdi32: Add support for creating EMF spool files. --- dlls/gdi32/dc.c | 43 +++++++++++ dlls/gdi32/emfdc.c | 181 +++++++++++++++++++++++++++++++++++++++++++++++ dlls/gdi32/gdi_private.h | 7 ++ 3 files changed, 231 insertions(+)
1
0
0
0
Piotr Caban : gdi32: Factor out emf_create helper.
by Alexandre Julliard
27 Apr '23
27 Apr '23
Module: wine Branch: master Commit: f79c9f3568934e01bdad64b56d031f51a4f0226b URL:
https://gitlab.winehq.org/wine/wine/-/commit/f79c9f3568934e01bdad64b56d031f…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Apr 26 19:23:46 2023 +0200 gdi32: Factor out emf_create helper. --- dlls/gdi32/emfdc.c | 140 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 83 insertions(+), 57 deletions(-) diff --git a/dlls/gdi32/emfdc.c b/dlls/gdi32/emfdc.c index 2e4b0a85de6..e483b6a3498 100644 --- a/dlls/gdi32/emfdc.c +++ b/dlls/gdi32/emfdc.c @@ -2460,61 +2460,20 @@ HDC WINAPI CreateEnhMetaFileA( HDC hdc, const char *filename, const RECT *rect, return ret; } -/********************************************************************** - * CreateEnhMetaFileW (GDI32.@) - */ -HDC WINAPI CreateEnhMetaFileW( HDC hdc, const WCHAR *filename, const RECT *rect, - const WCHAR *description ) +static void emf_reset( DC_ATTR *dc_attr, const RECT *rect ) { - HDC ret; - struct emf *emf; - DC_ATTR *dc_attr; - HANDLE file; - DWORD size = 0, length = 0; - - TRACE( "(%p %s %s %s)\n", hdc, debugstr_w(filename), wine_dbgstr_rect(rect), - debugstr_w(description) ); - - if (!(ret = NtGdiCreateMetafileDC( hdc ))) return 0; - - if (!(dc_attr = get_dc_attr( ret )) || !(emf = HeapAlloc( GetProcessHeap(), 0, sizeof(*emf) ))) - { - DeleteDC( ret ); - return 0; - } - - emf->dc_attr = dc_attr; - dc_attr->emf = (UINT_PTR)emf; - - if (description) /* App name\0Title\0\0 */ - { - length = lstrlenW( description ); - length += lstrlenW( description + length + 1 ); - length += 3; - length *= 2; - } - size = sizeof(ENHMETAHEADER) + (length + 3) / 4 * 4; - - if (!(emf->emh = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, size))) - { - DeleteDC( ret ); - return 0; - } + struct emf *emf = get_dc_emf( dc_attr ); + HDC hdc = dc_attr_handle( dc_attr ); - emf->handles = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, - HANDLE_LIST_INC * sizeof(emf->handles[0]) ); - emf->handles_size = HANDLE_LIST_INC; + memset( emf->handles, 0, emf->handles_size * sizeof(emf->handles[0]) ); emf->cur_handles = 1; emf->file = 0; + if (emf->dc_brush) DeleteObject( emf->dc_brush ); emf->dc_brush = 0; + if (emf->dc_pen) DeleteObject( emf->dc_pen ); emf->dc_pen = 0; emf->path = FALSE; - emf->palette_size = 0; emf->palette_used = 0; - emf->palette = NULL; - - emf->emh->iType = EMR_HEADER; - emf->emh->nSize = size; dc_attr->emf_bounds.left = dc_attr->emf_bounds.top = 0; dc_attr->emf_bounds.right = dc_attr->emf_bounds.bottom = -1; @@ -2538,28 +2497,95 @@ HDC WINAPI CreateEnhMetaFileW( HDC hdc, const WCHAR *filename, const RECT *rect, emf->emh->nBytes = emf->emh->nSize; emf->emh->nRecords = 1; emf->emh->nHandles = 1; - emf->emh->sReserved = 0; /* According to docs, this is reserved and must be 0 */ - emf->emh->nDescription = length / 2; - - emf->emh->offDescription = length ? sizeof(ENHMETAHEADER) : 0; - - emf->emh->nPalEntries = 0; /* I guess this should start at 0 */ + emf->emh->nPalEntries = 0; /* Size in pixels */ - emf->emh->szlDevice.cx = GetDeviceCaps( ret, HORZRES ); - emf->emh->szlDevice.cy = GetDeviceCaps( ret, VERTRES ); + emf->emh->szlDevice.cx = GetDeviceCaps( hdc, HORZRES ); + emf->emh->szlDevice.cy = GetDeviceCaps( hdc, VERTRES ); /* Size in millimeters */ - emf->emh->szlMillimeters.cx = GetDeviceCaps( ret, HORZSIZE ); - emf->emh->szlMillimeters.cy = GetDeviceCaps( ret, VERTSIZE ); + emf->emh->szlMillimeters.cx = GetDeviceCaps( hdc, HORZSIZE ); + emf->emh->szlMillimeters.cy = GetDeviceCaps( hdc, VERTSIZE ); + + emf->emh->cbPixelFormat = 0; + emf->emh->offPixelFormat = 0; + emf->emh->bOpenGL = 0; /* Size in micrometers */ emf->emh->szlMicrometers.cx = emf->emh->szlMillimeters.cx * 1000; emf->emh->szlMicrometers.cy = emf->emh->szlMillimeters.cy * 1000; +} + +static struct emf *emf_create( HDC hdc, const RECT *rect, const WCHAR *description ) +{ + DWORD size = 0, length = 0; + DC_ATTR *dc_attr; + struct emf *emf; + + if (!(dc_attr = get_dc_attr( hdc )) || !(emf = HeapAlloc( GetProcessHeap(), 0, sizeof(*emf) ))) + return NULL; + + if (description) /* App name\0Title\0\0 */ + { + length = lstrlenW( description ); + length += lstrlenW( description + length + 1 ); + length += 3; + length *= 2; + } + size = sizeof(ENHMETAHEADER) + (length + 3) / 4 * 4; + + if (!(emf->emh = HeapAlloc( GetProcessHeap(), 0, size )) || + !(emf->handles = HeapAlloc( GetProcessHeap(), 0, + HANDLE_LIST_INC * sizeof(emf->handles[0]) ))) + { + HeapFree( GetProcessHeap(), 0, emf->emh ); + HeapFree( GetProcessHeap(), 0, emf ); + return NULL; + } + + emf->dc_attr = dc_attr; + dc_attr->emf = (UINT_PTR)emf; + + emf->handles_size = HANDLE_LIST_INC; + emf->dc_brush = 0; + emf->dc_pen = 0; + emf->palette_size = 0; + emf->palette = NULL; + + emf->emh->iType = EMR_HEADER; + emf->emh->nSize = size; + emf->emh->nDescription = length / 2; + emf->emh->offDescription = length ? sizeof(ENHMETAHEADER) : 0; memcpy( (char *)emf->emh + sizeof(ENHMETAHEADER), description, length ); + emf_reset( dc_attr, rect ); + return emf; +} + +/********************************************************************** + * CreateEnhMetaFileW (GDI32.@) + */ +HDC WINAPI CreateEnhMetaFileW( HDC hdc, const WCHAR *filename, const RECT *rect, + const WCHAR *description ) +{ + struct emf *emf; + HANDLE file; + HDC ret; + + TRACE( "(%p %s %s %s)\n", hdc, debugstr_w(filename), wine_dbgstr_rect(rect), + debugstr_w(description) ); + + if (!(ret = NtGdiCreateMetafileDC( hdc ))) return 0; + + emf = emf_create( ret, rect, description ); + if (!emf) + { + DeleteDC( ret ); + return 0; + } + if (filename) /* disk based metafile */ { if ((file = CreateFileW( filename, GENERIC_WRITE | GENERIC_READ, 0,
1
0
0
0
Piotr Caban : gdi32: Factor out emf_eof helper.
by Alexandre Julliard
27 Apr '23
27 Apr '23
Module: wine Branch: master Commit: 16b951ccbf6029cd64d0376811f83602551a8d55 URL:
https://gitlab.winehq.org/wine/wine/-/commit/16b951ccbf6029cd64d0376811f836…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Apr 26 19:22:15 2023 +0200 gdi32: Factor out emf_eof helper. --- dlls/gdi32/emfdc.c | 57 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/dlls/gdi32/emfdc.c b/dlls/gdi32/emfdc.c index 47f48bef9d3..2e4b0a85de6 100644 --- a/dlls/gdi32/emfdc.c +++ b/dlls/gdi32/emfdc.c @@ -2575,35 +2575,16 @@ HDC WINAPI CreateEnhMetaFileW( HDC hdc, const WCHAR *filename, const RECT *rect, return ret; } -/****************************************************************** - * CloseEnhMetaFile (GDI32.@) - */ -HENHMETAFILE WINAPI CloseEnhMetaFile( HDC hdc ) +static BOOL emf_eof( DC_ATTR *dc_attr ) { + struct emf *emf = get_dc_emf( dc_attr ); UINT size, palette_size; - HENHMETAFILE hmf; - struct emf *emf; - DC_ATTR *dc_attr; EMREOF *emr; - HANDLE mapping = 0; - - TRACE("(%p)\n", hdc ); - - if (!(dc_attr = get_dc_attr( hdc )) || !get_dc_emf( dc_attr )) return 0; - emf = get_dc_emf( dc_attr ); + BOOL ret; palette_size = emf->palette_used * sizeof(*emf->palette); size = sizeof(*emr) + palette_size; - if (!(emr = HeapAlloc( GetProcessHeap(), 0, size ))) return 0; - - if (dc_attr->save_level) - RestoreDC( hdc, 1 ); - - if (emf->dc_brush) DeleteObject( emf->dc_brush ); - emf->dc_brush = 0; - if (emf->dc_pen) DeleteObject( emf->dc_pen ); - emf->dc_pen = 0; - + if (!(emr = HeapAlloc( GetProcessHeap(), 0, size ))) return FALSE; emr->emr.iType = EMR_EOF; emr->emr.nSize = size; @@ -2612,8 +2593,9 @@ HENHMETAFILE WINAPI CloseEnhMetaFile( HDC hdc ) memcpy( (BYTE *)emr + emr->offPalEntries, emf->palette, palette_size ); /* Set nSizeLast */ ((DWORD *)((BYTE *)emr + size))[-1] = size; - emfdc_record( emf, &emr->emr ); + ret = emfdc_record( emf, &emr->emr ); HeapFree( GetProcessHeap(), 0, emr ); + if (!ret) return FALSE; emf->emh->rclBounds = dc_attr->emf_bounds; @@ -2629,6 +2611,33 @@ HENHMETAFILE WINAPI CloseEnhMetaFile( HDC hdc ) emf->emh->rclFrame.bottom = emf->emh->rclBounds.bottom * emf->emh->szlMillimeters.cy * 100 / emf->emh->szlDevice.cy; } + return TRUE; +} + +/****************************************************************** + * CloseEnhMetaFile (GDI32.@) + */ +HENHMETAFILE WINAPI CloseEnhMetaFile( HDC hdc ) +{ + HENHMETAFILE hmf; + struct emf *emf; + DC_ATTR *dc_attr; + HANDLE mapping = 0; + + TRACE("(%p)\n", hdc ); + + if (!(dc_attr = get_dc_attr( hdc )) || !get_dc_emf( dc_attr )) return 0; + emf = get_dc_emf( dc_attr ); + + if (dc_attr->save_level) + RestoreDC( hdc, 1 ); + + if (emf->dc_brush) DeleteObject( emf->dc_brush ); + emf->dc_brush = 0; + if (emf->dc_pen) DeleteObject( emf->dc_pen ); + emf->dc_pen = 0; + + if (!emf_eof( dc_attr )) return 0; if (emf->file) /* disk based metafile */ {
1
0
0
0
Piotr Caban : gdi32: Improve EMF DC cleanup when CloseEnhMetafile is not called.
by Alexandre Julliard
27 Apr '23
27 Apr '23
Module: wine Branch: master Commit: acbccf177e76272248f91dec58749f623a2c5de9 URL:
https://gitlab.winehq.org/wine/wine/-/commit/acbccf177e76272248f91dec58749f…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Apr 26 19:17:15 2023 +0200 gdi32: Improve EMF DC cleanup when CloseEnhMetafile is not called. --- dlls/gdi32/emfdc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/gdi32/emfdc.c b/dlls/gdi32/emfdc.c index 42330a22861..47f48bef9d3 100644 --- a/dlls/gdi32/emfdc.c +++ b/dlls/gdi32/emfdc.c @@ -2384,6 +2384,9 @@ void EMFDC_DeleteDC( DC_ATTR *dc_attr ) struct emf *emf = get_dc_emf( dc_attr ); UINT index; + if (emf->dc_brush) DeleteObject( emf->dc_brush ); + if (emf->dc_pen) DeleteObject( emf->dc_pen ); + CloseHandle( emf->file ); HeapFree( GetProcessHeap(), 0, emf->palette ); HeapFree( GetProcessHeap(), 0, emf->emh ); for (index = 0; index < emf->handles_size; index++) @@ -2597,7 +2600,9 @@ HENHMETAFILE WINAPI CloseEnhMetaFile( HDC hdc ) RestoreDC( hdc, 1 ); if (emf->dc_brush) DeleteObject( emf->dc_brush ); + emf->dc_brush = 0; if (emf->dc_pen) DeleteObject( emf->dc_pen ); + emf->dc_pen = 0; emr->emr.iType = EMR_EOF; @@ -2630,6 +2635,7 @@ HENHMETAFILE WINAPI CloseEnhMetaFile( HDC hdc ) if (!WriteFile( emf->file, emf->emh, emf->emh->nBytes, NULL, NULL )) { CloseHandle( emf->file ); + emf->file = 0; return 0; } HeapFree( GetProcessHeap(), 0, emf->emh ); @@ -2642,6 +2648,7 @@ HENHMETAFILE WINAPI CloseEnhMetaFile( HDC hdc ) } hmf = EMF_Create_HENHMETAFILE( emf->emh, emf->emh->nBytes, emf->file != 0 ); + emf->file = 0; emf->emh = NULL; /* So it won't be deleted */ DeleteDC( hdc ); return hmf;
1
0
0
0
Piotr Caban : gdi32: Store the printer info in a structure.
by Alexandre Julliard
27 Apr '23
27 Apr '23
Module: wine Branch: master Commit: d317db91f2423d4a6b0eb0285be9d0fedbd9e251 URL:
https://gitlab.winehq.org/wine/wine/-/commit/d317db91f2423d4a6b0eb0285be9d0…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Apr 25 17:22:50 2023 +0200 gdi32: Store the printer info in a structure. --- dlls/gdi32/dc.c | 45 ++++++++++++++++++++++++++++++++++++--------- include/ntgdi.h | 3 +-- 2 files changed, 37 insertions(+), 11 deletions(-) diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index 8fa30884baf..6a5bb86d4f1 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -51,6 +51,11 @@ struct graphics_driver driver_entry_point entry_point; }; +struct print +{ + HANDLE printer; + WCHAR *output; +}; DC_ATTR *get_dc_attr( HDC hdc ) { @@ -200,6 +205,7 @@ HDC WINAPI CreateDCW( LPCWSTR driver, LPCWSTR device, LPCWSTR output, driver_entry_point entry_point = NULL; const WCHAR *display = NULL, *p; WCHAR buf[300], *port = NULL; + struct print *print = NULL; BOOL is_display = FALSE; HANDLE hspool = NULL; DC_ATTR *dc_attr; @@ -249,6 +255,11 @@ HDC WINAPI CreateDCW( LPCWSTR driver, LPCWSTR device, LPCWSTR output, ClosePrinter( hspool ); return 0; } + else if (!(print = HeapAlloc( GetProcessHeap(), 0, sizeof(*print) ))) + { + ClosePrinter( hspool ); + HeapFree( GetProcessHeap(), 0, port ); + } if (display) { @@ -275,13 +286,15 @@ HDC WINAPI CreateDCW( LPCWSTR driver, LPCWSTR device, LPCWSTR output, memcpy( port, output, output_str.Length ); port[output_str.Length / sizeof(WCHAR)] = 0; } - dc_attr->hspool = HandleToULong( hspool ); - dc_attr->output = (ULONG_PTR)port; + print->printer = hspool; + print->output = port; + dc_attr->print = (UINT_PTR)print; } else if (hspool) { ClosePrinter( hspool ); HeapFree( GetProcessHeap(), 0, port ); + HeapFree( GetProcessHeap(), 0, print ); } return ret; @@ -392,6 +405,21 @@ DEVMODEW *WINAPI GdiConvertToDevmodeW( const DEVMODEA *dmA ) return dmW; } +static inline struct print *get_dc_print( DC_ATTR *dc_attr ) +{ + return (struct print *)(UINT_PTR)dc_attr->print; +} + +static void delete_print_dc( DC_ATTR *dc_attr ) +{ + struct print *print = get_dc_print( dc_attr ); + + ClosePrinter( print->printer ); + HeapFree( GetProcessHeap(), 0, print->output ); + HeapFree( GetProcessHeap(), 0, print ); + dc_attr->print = 0; +} + /*********************************************************************** * DeleteDC (GDI32.@) */ @@ -401,10 +429,7 @@ BOOL WINAPI DeleteDC( HDC hdc ) if (is_meta_dc( hdc )) return METADC_DeleteDC( hdc ); if (!(dc_attr = get_dc_attr( hdc ))) return FALSE; - HeapFree( GetProcessHeap(), 0, (WCHAR *)(ULONG_PTR)dc_attr->output ); - dc_attr->output = 0; - if (dc_attr->hspool) ClosePrinter( ULongToHandle(dc_attr->hspool) ); - dc_attr->hspool = 0; + if (dc_attr->print) delete_print_dc( dc_attr ); if (dc_attr->emf) EMFDC_DeleteDC( dc_attr ); return NtGdiDeleteObjectApp( hdc ); } @@ -2192,6 +2217,7 @@ BOOL WINAPI CancelDC(HDC hdc) INT WINAPI StartDocW( HDC hdc, const DOCINFOW *doc ) { WCHAR *output = NULL; + struct print *print; DC_ATTR *dc_attr; ABORTPROC proc; DOCINFOW info; @@ -2218,10 +2244,11 @@ INT WINAPI StartDocW( HDC hdc, const DOCINFOW *doc ) proc = (ABORTPROC)(UINT_PTR)dc_attr->abort_proc; if (proc && !proc( hdc, 0 )) return 0; - if (dc_attr->hspool) + print = get_dc_print( dc_attr ); + if (print) { - if (!info.lpszOutput) info.lpszOutput = (const WCHAR *)(ULONG_PTR)dc_attr->output; - output = StartDocDlgW( ULongToHandle( dc_attr->hspool ), &info ); + if (!info.lpszOutput) info.lpszOutput = print->output; + output = StartDocDlgW( print->printer, &info ); if (output) info.lpszOutput = output; } diff --git a/include/ntgdi.h b/include/ntgdi.h index 1aa5cad468f..7d00ced2d19 100644 --- a/include/ntgdi.h +++ b/include/ntgdi.h @@ -198,8 +198,7 @@ typedef struct DC_ATTR RECTL emf_bounds; UINT64 emf; /* client EMF record pointer */ UINT64 abort_proc; /* AbortProc for printing */ - UINT64 hspool; - UINT64 output; + UINT64 print; /* client printer info pointer */ } DC_ATTR; struct font_enum_entry
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
82
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
72
73
74
75
76
77
78
79
80
81
82
Results per page:
10
25
50
100
200