Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- 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
December 2020
- 68 participants
- 931 messages
[PATCH] ws2_32/tests: Don't fail the test in test_wsaioctl() if only one interface is available.
by Paul Gofman
Fixes test failure on Testbot.
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
---
dlls/ws2_32/tests/sock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 98cc3881853..2b0a7354f4b 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -10530,7 +10530,7 @@ static void test_wsaioctl(void)
ok(size && size != 0xdeadbeef && !(size % sizeof(INTERFACE_INFO)), "Got unexpected size %u.\n", size);
size = 0xdeadbeef;
- ret = WSAIoctl(s, SIO_GET_INTERFACE_LIST, NULL, 0, buffer, sizeof(INTERFACE_INFO), &size, NULL, NULL);
+ ret = WSAIoctl(s, SIO_GET_INTERFACE_LIST, NULL, 0, buffer, sizeof(INTERFACE_INFO) - 1, &size, NULL, NULL);
ok(ret == -1, "Got unexpected ret %d.\n", ret);
ok(WSAGetLastError() == WSAEFAULT, "Got unexpected error %d.\n", WSAGetLastError());
ok(!size, "Got unexpected size %u.\n", size);
--
2.29.2
Dec. 17, 2020
Re: [RFC] Announcing Wayland driver development
by Alexandros Frantzis
On Wed, Dec 16, 2020 at 10:24:43AM +0100, Julian Rüger wrote:
> > FWIW, I recommend looking at the commit history, how past big changes
> > were introduced i.e. the Mac driver, maybe the DIB-Engine (although that
> > was quite long ago and a lot has changed since)
>
> The most recent example of a new driver:
>
> https://source.winehq.org/git/wine.git/?a=search&h=HEAD&st=commit&s=wineusb
Hi Julian,
I really appreciate all the feedback and pointers!
Thanks,
Alexandros
Dec. 17, 2020
[PATCH v2] crypt32/tests: Fix a registerOIDInfo() failure when missing elevated privileges.
by Francois Gouget
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
With my apologies for the previous botched attempt.
dlls/crypt32/tests/oid.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/crypt32/tests/oid.c b/dlls/crypt32/tests/oid.c
index ae03bba90e8..7e7c1310dd2 100644
--- a/dlls/crypt32/tests/oid.c
+++ b/dlls/crypt32/tests/oid.c
@@ -646,7 +646,8 @@ static void test_registerOIDInfo(void)
SetLastError(0xdeadbeef);
ret = CryptUnregisterOIDInfo(&info1);
ok(!ret, "should fail\n");
- ok(GetLastError() == ERROR_FILE_NOT_FOUND, "got %u\n", GetLastError());
+ ok(GetLastError() == ERROR_FILE_NOT_FOUND ||
+ GetLastError() == ERROR_ACCESS_DENIED, "got %u\n", GetLastError());
info2 = CryptFindOIDInfo(CRYPT_OID_INFO_OID_KEY, (void *)test_oid, 0);
ok(!info2, "should fail\n");
--
2.20.1
Dec. 17, 2020
Looking for TestBot help
by Francois Gouget
In these freezing times I'm looking for volunteers to help with three
TestBot related tasks:
* Modify WineTest to detect which tests can be run by running
'xxx_test --list' and automatically detecting and dismissing the
"Missing dll" / "Missing entrypoint" dialogs.
This would fix a lot of issues with tests not being run when they
should:
- Detect and report WineTest's "load errors"
https://bugs.winehq.org/show_bug.cgi?id=48062
- Detect missing entry point errors
https://bugs.winehq.org/show_bug.cgi?id=48208
* Alternatively the same type of change is needed for the TestBot's
TestLauncher where it would replace AllImportedDllsPresent():
https://source.winehq.org/git/tools.git/blob/HEAD:/testbot/src/TestLauncher…
There too it will help with a lot of issues:
- TestLauncher says a required DLL is missing, but the test runs fine
without TestLauncher
https://bugs.winehq.org/show_bug.cgi?id=31609
But I expect that once this is done on one side it will be easy to
port to the other. So the choice of codebase is yours.
* Write or find a Windows tool to automatically take a screenshot every
few seconds and deduplicate identical screenshots. The requirements
are:
- Open-source of course.
- No dependency (so if using an off-the-shelf tool it should not
require installing some language runtime, etc).
- Must support multi-screen configurations, even with slightly
different resolutions.
- Will eventually need to be used by the TestBot through TestAgentd,
either by running this external tool, or be integrated in TestAgentd
itself.
The same functionality will be needed on Unix. If that's not possible
with a Windows tool this may turn into a separate project to do the
same on the Unix side. There I expect some scriptable open-source
tools to already exist but if one tool can do it all that would be
simpler.
- Take live/regular screenshots
https://bugs.winehq.org/show_bug.cgi?id=44709
In the meantime I'll continue refreshing the test VMs, and working on
the website and Engine perl side of things (but if there are volunteers
for that you're welcome too).
--
Francois Gouget <fgouget(a)free.fr> http://fgouget.free.fr/
Theory is where you know everything but nothing works.
Practice is where everything works but nobody knows why.
Sometimes they go hand in hand: nothing works and nobody knows why.
Dec. 17, 2020
Re: TestBot job 83503 results: [PATCH] ws2_32: Fix buffer size check in WSAIoctl() for SIO_GET_INTERFACE_LIST.
by Francois Gouget
On Wed, 16 Dec 2020, Paul Gofman wrote:
> On 12/16/20 12:10, Marvin wrote:
> > ws2_32:
> > sock.c:10534: Test failed: Got unexpected ret 0.
> > sock.c:10535: Test failed: Got unexpected error 6.
> > sock.c:10536: Test failed: Got unexpected size 76.
>
> Can it be that Wine is not getting updated on Testbot? The tests results
> are like the changes to test are applied but ws2_32.dll is unchanged.
The "Show full task log" links show that ws2_32.dll.so was rebuilt.
https://testbot.winehq.org/JobDetails.pl?Key=83503&f401=task.log#k401
https://testbot.winehq.org/JobDetails.pl?Key=83503&f402=task.log#k402
Also, as far as I can tell, the WinePrefix only contains a fake dll so
it does not look like there any way the WinePrefix could use an old
version.
--
Francois Gouget <fgouget(a)codeweavers.com>
Dec. 17, 2020
Re: [PATCH 2/2] widl: open files to write in binary mode
by Steve Lhomme
On 2020-12-16 16:41, Jacek Caban wrote:
> On 16.12.2020 15:35, Steve Lhomme wrote:
>> On 2020-12-16 15:18, Jacek Caban wrote:
>>> Hi Steve,
>>>
>>> On 16.12.2020 10:14, Steve Lhomme wrote:
>>>> When compiled with mingw64 the output files have Windows line
>>>> endings instead
>>>> of UNIX ones.
>>>> ---
>>>> tools/widl/header.c | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/tools/widl/header.c b/tools/widl/header.c
>>>> index 43be8d74cbe..5457185538e 100644
>>>> --- a/tools/widl/header.c
>>>> +++ b/tools/widl/header.c
>>>> @@ -1893,7 +1893,7 @@ void write_header(const statement_list_t *stmts)
>>>> if (!do_header) return;
>>>> - if(!(header = fopen(header_name, "w"))) {
>>>> + if(!(header = fopen(header_name, "wb"))) {
>>>
>>>
>>> There are more places that would need to be fixed for consistency.
>>> Maybe we could use _set_fmode(_O_BINARY) in main() instead?
>>
>> Is this a MS-only thing ? I don't mind having this patch only in
>> mingw-w64-tools (which also have some extra patch as well).
>
>
> Yes, it would need an #ifdef.
OK for me.
>> In general it may not be the proper way to handle this. For writing
>> all files widl generates, it should be fine. But for reading files the
>> "binary" mode is not currently used and it may break reading files
>> that used to be read properly on Windows ?
>
>
> Which files do you mean? The only non-binary files that widl generates
> are headers and C files.
I meant that for generated files it's fine, so I agree with you. I fear
that forcing binary mode for input files as well may break reading some
files with windows line ending on Windows. I don't think that's the case
in mingw-w64 but it may have some side effects elsewhere.
> Generally speaking, widl output is cross platform, so it should generate
> the same output on regardless of host platform used. Windows line ending
> breaks that.
That's a good incentive to fix this.
Dec. 17, 2020
Re: [PATCH] winegcc: allow CROSSCC to have a suffix
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=83537
Your paranoid android.
=== debiant (build log) ===
collect2: error: ld returned 1 exit status
Task: The wow32 Wine build failed
Dec. 17, 2020
[PATCH] winegcc: allow CROSSCC to have a suffix
by Damjan Jovanovic
This allows eg. CROSSCC=i686-w64-mingw32-gcc10.
Does not regenerate ./configure.
Signed-off-by: Damjan Jovanovic <damjan.jov(a)gmail.com>
---
configure.ac | 2 +-
tools/winegcc/Makefile.in | 3 ++-
tools/winegcc/winegcc.c | 5 ++++-
3 files changed, 7 insertions(+), 3 deletions(-)
Dec. 17, 2020
[rebased PATCH v3 2/2] ntdll: Save unwind information in KiUserApcDispatcher() on x64.
by Paul Gofman
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
---
v2:
- fix build for other archs.
dlls/ntdll/tests/exception.c | 53 +++++++++++++++++++++++++++++++++
dlls/ntdll/thread.c | 28 ++++++++++++++++-
dlls/ntdll/unix/signal_x86_64.c | 23 ++++++++++++--
3 files changed, 101 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index 5686e39ab9e..3a0a5ac049c 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -37,6 +37,8 @@ static void *code_mem;
static NTSTATUS (WINAPI *pNtGetContextThread)(HANDLE,CONTEXT*);
static NTSTATUS (WINAPI *pNtSetContextThread)(HANDLE,CONTEXT*);
+static NTSTATUS (WINAPI *pNtQueueApcThread)(HANDLE handle, PNTAPCFUNC func,
+ ULONG_PTR arg1, ULONG_PTR arg2, ULONG_PTR arg3);
static NTSTATUS (WINAPI *pRtlRaiseException)(EXCEPTION_RECORD *rec);
static PVOID (WINAPI *pRtlUnwind)(PVOID, PVOID, PEXCEPTION_RECORD, PVOID);
static VOID (WINAPI *pRtlCaptureContext)(CONTEXT*);
@@ -4061,6 +4063,55 @@ static void test_nested_exception(void)
ok(got_prev_frame_exception, "Did not get nested exception in the previous frame.\n");
}
+static CONTEXT test_unwind_apc_context;
+static BOOL test_unwind_apc_called;
+
+static void CALLBACK test_unwind_apc(ULONG_PTR arg1, ULONG_PTR arg2, ULONG_PTR arg3)
+{
+ EXCEPTION_RECORD rec;
+
+ test_unwind_apc_called = TRUE;
+ memset(&rec, 0, sizeof(rec));
+ pRtlUnwind((void *)test_unwind_apc_context.Rsp, (void *)test_unwind_apc_context.Rip, &rec, (void *)0xdeadbeef);
+ ok(0, "Should not get here.\n");
+}
+
+static void test_unwind_from_apc(void)
+{
+ NTSTATUS status;
+ int pass;
+
+ if (!pNtQueueApcThread)
+ {
+ win_skip("NtQueueApcThread is not available.\n");
+ return;
+ }
+
+ pass = 0;
+ InterlockedIncrement(&pass);
+ RtlCaptureContext(&test_unwind_apc_context);
+ InterlockedIncrement(&pass);
+
+ if (pass == 2)
+ {
+ test_unwind_apc_called = FALSE;
+ status = pNtQueueApcThread(GetCurrentThread(), test_unwind_apc, 0, 0, 0);
+ ok(!status, "Got unexpected status %#x.\n", status);
+ SleepEx(0, TRUE);
+ ok(0, "Should not get here.\n");
+ }
+ if (pass == 3)
+ {
+ ok(test_unwind_apc_called, "Test user APC was not called.\n");
+ test_unwind_apc_called = FALSE;
+ status = pNtQueueApcThread(GetCurrentThread(), test_unwind_apc, 0, 0, 0);
+ ok(!status, "Got unexpected status %#x.\n", status);
+ NtContinue(&test_unwind_apc_context, TRUE );
+ ok(0, "Should not get here.\n");
+ }
+ ok(pass == 4, "Got unexpected pass %d.\n", pass);
+ ok(test_unwind_apc_called, "Test user APC was not called.\n");
+}
#elif defined(__arm__)
static void test_thread_context(void)
@@ -8073,6 +8124,7 @@ START_TEST(exception)
#define X(f) p##f = (void*)GetProcAddress(hntdll, #f)
X(NtGetContextThread);
X(NtSetContextThread);
+ X(NtQueueApcThread);
X(NtReadVirtualMemory);
X(NtClose);
X(RtlUnwind);
@@ -8241,6 +8293,7 @@ START_TEST(exception)
skip( "Dynamic unwind functions not found\n" );
test_extended_context();
test_copy_context();
+ test_unwind_from_apc();
#elif defined(__aarch64__)
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 578c7a5436c..5bf456ec040 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -78,7 +78,7 @@ int __cdecl __wine_dbg_output( const char *str )
/*******************************************************************
* KiUserApcDispatcher (NTDLL.@)
*/
-void WINAPI KiUserApcDispatcher( CONTEXT *context, ULONG_PTR ctx, ULONG_PTR arg1, ULONG_PTR arg2,
+void WINAPI dispatch_apc( CONTEXT *context, ULONG_PTR ctx, ULONG_PTR arg1, ULONG_PTR arg2,
PNTAPCFUNC func )
{
func( ctx, arg1, arg2 );
@@ -86,6 +86,32 @@ void WINAPI KiUserApcDispatcher( CONTEXT *context, ULONG_PTR ctx, ULONG_PTR arg1
}
+#ifdef __x86_64__
+__ASM_GLOBAL_FUNC( KiUserApcDispatcher,
+ "addq $0x8,%rsp\n\t"
+ "mov 0x98(%rcx),%r10\n\t" /* context->Rsp */
+ "mov 0xf8(%rcx),%r11\n\t" /* context->Rip */
+ "mov %r11,-0x8(%r10)\n\t"
+ "mov %rbp,-0x10(%r10)\n\t"
+ "lea -0x10(%r10),%rbp\n\t"
+ __ASM_SEH(".seh_pushreg %rbp\n\t")
+ __ASM_SEH(".seh_setframe %rbp,0\n\t")
+ __ASM_SEH(".seh_endprologue\n\t")
+ __ASM_CFI(".cfi_signal_frame\n\t")
+ __ASM_CFI(".cfi_adjust_cfa_offset 0x10\n\t")
+ __ASM_CFI(".cfi_def_cfa %rbp,0x10\n\t")
+ __ASM_CFI(".cfi_rel_offset %rip,0x8\n\t")
+ __ASM_CFI(".cfi_rel_offset %rbp,0\n\t")
+ "call " __ASM_NAME("dispatch_apc") "\n\t"
+ "int3")
+#else
+void WINAPI KiUserApcDispatcher( CONTEXT *context, ULONG_PTR ctx, ULONG_PTR arg1, ULONG_PTR arg2,
+ PNTAPCFUNC func )
+{
+ dispatch_apc( context, ctx, arg1, arg2, func );
+}
+#endif
+
/***********************************************************************
* RtlExitUserThread (NTDLL.@)
*/
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c
index 3ae3b4c141e..837cd9ed654 100644
--- a/dlls/ntdll/unix/signal_x86_64.c
+++ b/dlls/ntdll/unix/signal_x86_64.c
@@ -2073,9 +2073,28 @@ __ASM_GLOBAL_FUNC( call_user_apc_dispatcher,
"movq %r14,%r9\n" /* arg2 */
"movq $0,0x328(%rbx)\n\t" /* amd64_thread_data()->syscall_frame */
"movq %rsi,0x20(%rsp)\n\t" /* func */
- "movq 0xa0(%rcx),%rbp\n\t" /* context.Rbp */
+ "movq %rdi,%r10\n\t"
+ /* Set nonvolatile regs from context. */
+ "movq 0xa0(%rcx),%rbp\n\t"
+ "movq 0x90(%rcx),%rbx\n\t"
+ "movq 0xa8(%rcx),%rsi\n\t"
+ "movq 0xb0(%rcx),%rdi\n\t"
+ "movq 0xd8(%rcx),%r12\n\t"
+ "movq 0xe0(%rcx),%r13\n\t"
+ "movq 0xe8(%rcx),%r14\n\t"
+ "movq 0xf0(%rcx),%r15\n\t"
+ "movdqa 0x200(%rcx),%xmm6\n\t"
+ "movdqa 0x210(%rcx),%xmm7\n\t"
+ "movdqa 0x220(%rcx),%xmm8\n\t"
+ "movdqa 0x230(%rcx),%xmm9\n\t"
+ "movdqa 0x240(%rcx),%xmm10\n\t"
+ "movdqa 0x250(%rcx),%xmm11\n\t"
+ "movdqa 0x260(%rcx),%xmm12\n\t"
+ "movdqa 0x270(%rcx),%xmm13\n\t"
+ "movdqa 0x280(%rcx),%xmm14\n\t"
+ "movdqa 0x290(%rcx),%xmm15\n\t"
"pushq 0xf8(%rcx)\n\t" /* context.Rip */
- "jmp *%rdi" )
+ "jmp *%r10" )
/***********************************************************************
--
2.29.2
Dec. 16, 2020
[rebased PATCH v3 1/2] ntdll: Always copy context in call_user_apc_dispatcher() on x64.
by Paul Gofman
Currently, if call_user_apc_dispatcher() is called with nonzero context,
there is no guarantee that the provided context is stored above the
rsp = context_ptr->Rsp - (sizeof(CONTEXT) + offsetof(frame,ret_addr))
being set.
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
---
v3:
- properly align / reserve stack for setup_user_apc_dispatcher_stack() call.
dlls/ntdll/unix/signal_x86_64.c | 62 +++++++++++++++++++++++++--------
1 file changed, 48 insertions(+), 14 deletions(-)
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c
index 7181b48728c..3ae3b4c141e 100644
--- a/dlls/ntdll/unix/signal_x86_64.c
+++ b/dlls/ntdll/unix/signal_x86_64.c
@@ -250,6 +250,22 @@ C_ASSERT((offsetof(struct stack_layout, xstate) == sizeof(struct stack_layout)))
C_ASSERT( sizeof(XSTATE) == 0x140 );
C_ASSERT( sizeof(struct stack_layout) == 0x590 ); /* Should match the size in call_user_exception_dispatcher(). */
+/* stack layout when calling an user apc function.
+ * FIXME: match Windows ABI. */
+struct apc_stack_layout
+{
+ ULONG64 save_regs[4];
+ void *func;
+ ULONG64 align;
+ CONTEXT context;
+ ULONG64 rbp;
+ ULONG64 rip;
+};
+
+/* Should match size and offset in call_user_apc_dispatcher(). */
+C_ASSERT( offsetof(struct apc_stack_layout, context) == 0x30 );
+C_ASSERT( sizeof(struct apc_stack_layout) == 0x510 );
+
struct syscall_frame
{
ULONG64 xmm[10 * 2]; /* xmm6-xmm15 */
@@ -266,6 +282,9 @@ struct syscall_frame
ULONG64 ret_addr;
};
+/* Should match the offset in call_user_apc_dispatcher(). */
+C_ASSERT( offsetof( struct syscall_frame, ret_addr ) == 0xf0);
+
struct amd64_thread_data
{
DWORD_PTR dr0; /* 02f0 debug registers */
@@ -2013,31 +2032,46 @@ static void setup_exception( ucontext_t *sigcontext, EXCEPTION_RECORD *rec )
/***********************************************************************
* call_user_apc_dispatcher
*/
+struct apc_stack_layout * WINAPI setup_user_apc_dispatcher_stack( CONTEXT *context, struct apc_stack_layout *stack )
+{
+ CONTEXT c;
+
+ if (!context)
+ {
+ c.ContextFlags = CONTEXT_FULL;
+ NtGetContextThread( GetCurrentThread(), &c );
+ context = &c;
+ }
+ memmove( &stack->context, context, sizeof(stack->context) );
+ return stack;
+}
+
__ASM_GLOBAL_FUNC( call_user_apc_dispatcher,
"movq 0x28(%rsp),%rsi\n\t" /* func */
"movq 0x30(%rsp),%rdi\n\t" /* dispatcher */
"movq %gs:0x30,%rbx\n\t"
- "jrcxz 1f\n\t"
- "movq 0x98(%rcx),%rax\n\t" /* context_ptr->Rsp */
- "leaq -0x5c0(%rax),%rsp\n\t" /* sizeof(CONTEXT) + offsetof(frame,ret_addr) */
- "andq $~15,%rsp\n\t"
- "jmp 2f\n"
- "1:\tmovq 0x328(%rbx),%rax\n\t" /* amd64_thread_data()->syscall_frame */
- "leaq -0x4d0(%rax),%rsp\n\t"
- "andq $~15,%rsp\n\t"
"movq %rdx,%r12\n\t" /* ctx */
"movq %r8,%r13\n\t" /* arg1 */
"movq %r9,%r14\n\t" /* arg2 */
- "movq %rsp,%rdx\n\t" /* context */
- "movl $0x10000b,0x30(%rdx)\n\t" /* context.ContextFlags */
- "movq $~1,%rcx\n\t"
- "call " __ASM_NAME("NtGetContextThread") "\n\t"
- "movq %rsp,%rcx\n\t" /* context */
+ "jrcxz 1f\n\t"
+ "movq 0x98(%rcx),%rdx\n\t" /* context->Rsp */
+ "jmp 2f\n\t"
+ "1:\tmovq 0x328(%rbx),%rax\n\t" /* amd64_thread_data()->syscall_frame */
+ "leaq 0xf0(%rax),%rdx\n\t" /* &amd64_thread_data()->syscall_frame->ret_addr */
+ "2:\tsubq $0x510,%rdx\n\t" /* sizeof(struct apc_stack_layout) */
+ "andq $~0xf,%rdx\n\t"
+ "addq $8,%rsp\n\t" /* pop return address */
+ "cmpq %rsp,%rdx\n\t"
+ "cmovbq %rdx,%rsp\n\t"
+ "subq $0x20,%rsp\n\t"
+ "call " __ASM_NAME("setup_user_apc_dispatcher_stack") "\n\t"
+ "movq %rax,%rsp\n\t"
+ "leaq 0x30(%rsp),%rcx\n\t" /* context */
"movq $0xc0,0x78(%rcx)\n\t" /* context.Rax = STATUS_USER_APC */
"movq %r12,%rdx\n\t" /* ctx */
"movq %r13,%r8\n\t" /* arg1 */
"movq %r14,%r9\n" /* arg2 */
- "2:\tmovq $0,0x328(%rbx)\n\t"
+ "movq $0,0x328(%rbx)\n\t" /* amd64_thread_data()->syscall_frame */
"movq %rsi,0x20(%rsp)\n\t" /* func */
"movq 0xa0(%rcx),%rbp\n\t" /* context.Rbp */
"pushq 0xf8(%rcx)\n\t" /* context.Rip */
--
2.29.2
Dec. 16, 2020
[PATCH 2/2] conhost: Improve get_output_info debug traces.
by Jacek Caban
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
programs/conhost/conhost.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
Dec. 16, 2020
[PATCH 1/2] conhost: Don't create bitmap for hidden windows.
by Jacek Caban
Fixes performance issues in ConEmu.
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
programs/conhost/window.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
Dec. 16, 2020
[PATCH v2] wintrust: Don't fail CryptCATOpen on empty file or invalid data.
by Rémi Bernon
Fixes a regression from 699e0a55ea71e2506917e38fc85cb4ae23a9cd1a,
making "winetricks dotnet30sp1" fail.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49831
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
dlls/wintrust/crypt.c | 14 ++++++++++++--
dlls/wintrust/tests/crypt.c | 12 ++++++------
2 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/dlls/wintrust/crypt.c b/dlls/wintrust/crypt.c
index be869ad8277..fcf419c76d1 100644
--- a/dlls/wintrust/crypt.c
+++ b/dlls/wintrust/crypt.c
@@ -908,6 +908,7 @@ HANDLE WINAPI CryptCATOpen(WCHAR *filename, DWORD flags, HCRYPTPROV hProv,
BYTE *buffer = NULL;
DWORD size, open_mode = OPEN_ALWAYS;
struct cryptcat *cc;
+ BOOL valid;
TRACE("filename %s, flags %#x, provider %#lx, version %#x, type %#x\n",
debugstr_w(filename), flags, hProv, dwPublicVersion, dwEncodingType);
@@ -941,13 +942,15 @@ HANDLE WINAPI CryptCATOpen(WCHAR *filename, DWORD flags, HCRYPTPROV hProv,
HeapFree(GetProcessHeap(), 0, buffer);
return INVALID_HANDLE_VALUE;
}
- if (!ReadFile(file, buffer, size, &size, NULL) || !CryptMsgUpdate(hmsg, buffer, size, TRUE))
+ if (!size) valid = FALSE;
+ else if (!ReadFile(file, buffer, size, &size, NULL))
{
CloseHandle(file);
HeapFree(GetProcessHeap(), 0, buffer);
CryptMsgClose(hmsg);
return INVALID_HANDLE_VALUE;
}
+ else valid = CryptMsgUpdate(hmsg, buffer, size, TRUE);
HeapFree(GetProcessHeap(), 0, buffer);
CloseHandle(file);
@@ -961,7 +964,13 @@ HANDLE WINAPI CryptCATOpen(WCHAR *filename, DWORD flags, HCRYPTPROV hProv,
cc->msg = hmsg;
cc->encoding = dwEncodingType;
- if (CryptMsgGetParam(hmsg, CMSG_ATTR_CERT_COUNT_PARAM, 0, &cc->attr_count, &size))
+ if (!valid)
+ {
+ cc->magic = CRYPTCAT_MAGIC;
+ SetLastError(ERROR_SUCCESS);
+ return cc;
+ }
+ else if (CryptMsgGetParam(hmsg, CMSG_ATTR_CERT_COUNT_PARAM, 0, &cc->attr_count, &size))
{
DWORD i, sum = 0;
BYTE *p;
@@ -1012,6 +1021,7 @@ HANDLE WINAPI CryptCATOpen(WCHAR *filename, DWORD flags, HCRYPTPROV hProv,
return INVALID_HANDLE_VALUE;
}
cc->magic = CRYPTCAT_MAGIC;
+ SetLastError(ERROR_SUCCESS);
return cc;
}
HeapFree(GetProcessHeap(), 0, cc);
diff --git a/dlls/wintrust/tests/crypt.c b/dlls/wintrust/tests/crypt.c
index 1b436e9f4ab..5f9c402e00f 100644
--- a/dlls/wintrust/tests/crypt.c
+++ b/dlls/wintrust/tests/crypt.c
@@ -429,10 +429,10 @@ static void test_CryptCATOpen(void)
}
else
{
- todo_wine ok(cat != INVALID_HANDLE_VALUE, "flags %#x: expected success\n", flags);
- todo_wine ok(!GetLastError(), "flags %#x: got error %u\n", flags, GetLastError());
+ ok(cat != INVALID_HANDLE_VALUE, "flags %#x: expected success\n", flags);
+ ok(!GetLastError(), "flags %#x: got error %u\n", flags, GetLastError());
ret = pCryptCATClose(cat);
- todo_wine ok(ret, "flags %#x: failed to close file\n", flags);
+ ok(ret, "flags %#x: failed to close file\n", flags);
ret = DeleteFileW(filename);
ok(ret, "flags %#x: failed to delete file, error %u\n", flags, GetLastError());
}
@@ -443,10 +443,10 @@ static void test_CryptCATOpen(void)
SetLastError(0xdeadbeef);
cat = pCryptCATOpen(filename, flags, 0, 0, 0);
- todo_wine ok(cat != INVALID_HANDLE_VALUE, "flags %#x: expected success\n", flags);
- todo_wine ok(!GetLastError(), "flags %#x: got error %u\n", flags, GetLastError());
+ ok(cat != INVALID_HANDLE_VALUE, "flags %#x: expected success\n", flags);
+ ok(!GetLastError(), "flags %#x: got error %u\n", flags, GetLastError());
ret = pCryptCATClose(cat);
- todo_wine ok(ret, "flags %#x: failed to close file\n", flags);
+ ok(ret, "flags %#x: failed to close file\n", flags);
file = _wfopen(filename, L"r");
ret = fread(buffer, 1, sizeof(buffer), file);
--
2.29.2
Dec. 16, 2020
Re: [PATCH 1/3] wintrust: Refactor CryptCATOpen error handling.
by Rémi Bernon
On 12/16/20 9:13 PM, Alexandre Julliard wrote:
> Rémi Bernon <rbernon(a)codeweavers.com> writes:
>
>> Make it simpler, handle all errors in the same place.
>
> It would be better to leave that kind of refactoring for after code
> freeze. Any chance you could do more targeted fix just for that bug in
> the meantime?
>
I was afraid it would be the case, I'll send another version, with a
simple diff, but that doesn't make the code simpler.
--
Rémi Bernon <rbernon(a)codeweavers.com>
Dec. 16, 2020
Re: [PATCH 1/3] wintrust: Refactor CryptCATOpen error handling.
by Alexandre Julliard
Rémi Bernon <rbernon(a)codeweavers.com> writes:
> Make it simpler, handle all errors in the same place.
It would be better to leave that kind of refactoring for after code
freeze. Any chance you could do more targeted fix just for that bug in
the meantime?
--
Alexandre Julliard
julliard(a)winehq.org
Dec. 16, 2020
Re: [PATCH] httpapi/tests: Sleep before calling GetOverlappedResult() in test_v2_server().
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=83524
Your paranoid android.
=== w1064 (32 bit report) ===
httpapi:
httpapi.c:307: Test failed: Got SSL connection ID fd00000160000005.
httpapi.c:1375: Test failed: Got SSL connection ID fe00000060000004.
httpapi.c:1378: Test failed: Got request info 0064E40C.
=== w10pro64 (32 bit report) ===
httpapi:
httpapi.c:307: Test failed: Got SSL connection ID ff00000260000001.
httpapi.c:1375: Test failed: Got SSL connection ID fd00000060000001.
httpapi.c:1378: Test failed: Got request info 0064E40C.
=== w1064 (64 bit report) ===
httpapi:
httpapi.c:1375: Test failed: Got SSL connection ID fc00000160000004.
httpapi.c:1378: Test failed: Got request info 000000000064E428.
=== w1064_2qxl (64 bit report) ===
httpapi:
httpapi.c:307: Test failed: Got SSL connection ID ff00000260000001.
httpapi.c:1375: Test failed: Got SSL connection ID ff00000060000011.
httpapi.c:1378: Test failed: Got request info 000000000064E428.
=== w10pro64 (64 bit report) ===
httpapi:
httpapi.c:1375: Test failed: Got SSL connection ID ff0000026000000c.
httpapi.c:1378: Test failed: Got request info 000000000064E428.
=== w10pro64_ar (64 bit report) ===
httpapi:
httpapi.c:1375: Test failed: Got SSL connection ID fd0000016000000d.
httpapi.c:1378: Test failed: Got request info 000000000064E428.
=== w10pro64_he (64 bit report) ===
httpapi:
httpapi.c:307: Test failed: Got SSL connection ID ff00000260000001.
httpapi.c:1375: Test failed: Got SSL connection ID ff00000260000011.
httpapi.c:1378: Test failed: Got request info 000000000064E428.
=== w10pro64_ja (64 bit report) ===
httpapi:
httpapi.c:307: Test failed: Got SSL connection ID ff00000260000001.
httpapi.c:1375: Test failed: Got SSL connection ID ff00000060000015.
httpapi.c:1378: Test failed: Got request info 000000000064E428.
=== w10pro64_zh_CN (64 bit report) ===
httpapi:
httpapi.c:307: Test failed: Got SSL connection ID ff00000260000001.
httpapi.c:1375: Test failed: Got SSL connection ID fd00000160000003.
httpapi.c:1378: Test failed: Got request info 000000000064E428.
Dec. 16, 2020
[PATCH] httpapi/tests: Sleep before calling GetOverlappedResult() in test_v2_server().
by Zebediah Figura
This seems to be a variation of a bug already encountered; here the kernel does
not report the right value in the IOSB until after completion is signaled.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48587
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/httpapi/tests/httpapi.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/dlls/httpapi/tests/httpapi.c b/dlls/httpapi/tests/httpapi.c
index d758dee6b2c..752d008fc6b 100644
--- a/dlls/httpapi/tests/httpapi.c
+++ b/dlls/httpapi/tests/httpapi.c
@@ -233,9 +233,11 @@ static void test_v1_server(void)
ok(ret, "Got error %u.\n", GetLastError());
ok(ret_size > sizeof(*req), "Got size %u.\n", ret_size);
- /* 64-bit Windows 10 version 1507 apparently suffers from a bug where it
- * will report success before completely filling the buffer. Wait for a
- * short interval to work around this. */
+ /* Various versions of Windows (observed on 64-bit Windows 8 and Windows 10
+ * version 1507, but probably affecting others) suffer from a bug where the
+ * kernel will report success before completely filling the buffer or
+ * reporting the correct buffer size. Wait for a short interval to work
+ * around this. */
Sleep(100);
ok(!req->Flags, "Got flags %#x.\n", req->Flags);
@@ -1306,10 +1308,14 @@ static void test_v2_server(void)
ret = send(s, req_text, strlen(req_text), 0);
ok(ret == strlen(req_text), "send() returned %d.\n", ret);
+ ret = WaitForSingleObject(ovl.hEvent, 100);
+ ok(!ret, "Got %u.\n", ret);
+
+ Sleep(100);
+
ret = GetOverlappedResult(queue, &ovl, &ret_size, TRUE);
ok(ret, "Got error %u.\n", GetLastError());
ok(ret_size > sizeof(*req), "Got size %u.\n", ret_size);
- Sleep(100);
ok(!req->Flags, "Got flags %#x.\n", req->Flags);
ok(req->ConnectionId, "Expected nonzero connection ID.\n");
--
2.29.2
Dec. 16, 2020
Re: [RFC] Announcing Wayland driver development
by Zebediah Figura (she/her)
On 12/16/20 2:44 AM, Julian Rüger wrote:
> Hi Alexandros,
>
> first of all, congratulations and thanks for your work, this sounds very
> cool!
>
> Disclaimer:
>
> I'm little more than a curious observer of the larger developments in
> Wine, but I've been around for a while and have picked up a few things.
> Still, you should probably take anything someone who actually
> understands the code says over my ramblings ;)
>
>
>> My first question to the Wine community is how complete the driver
>> should be before being considered for inclusion. Is the current Wayland
>> driver state enough?
>
> The most important and probably trickiest order of business is to
> convince Alexandre you're going the "Right Way" (tm), from an
> architectural standpoint.
> I can't really say if your current progress is enough to gauge that, but
> I think it is.
>
>> If there is interest, I was hoping to get the
>> driver in earlier rather than later, in an experimental capacity, in
>> order to provide a single, official point of development for people
>> wanting to contribute.
>
> You should talk to our tireless and competent staging developers,
> Zebediah Figura and Alistair Leslie-Hughes about that.
That's probably about right. I would like to be sure that a Wayland
driver will be accepted upstream in some form or another before we take
it—I don't want to maintain any patch set in wine-staging forever, but
an entire graphics driver least of all.
In particular I've seen a lot of concerns about the long list of things
Wayland can't support. Window positioning is one, but not the only by
far. See also [1] (not that I can personally verify the veracity of any
of these; I don't work with window managers).
[1] https://bugs.winehq.org/show_bug.cgi?id=42284#c17
>
>> My second question is about the best way to move forward with
>> upstreaming. The code is currently split between just a few commits,
>> mostly as a result of the experimental nature of this effort, and also
>> because I used existing code from winex11 and wineandroid as my starting
>> point. I would like to split this into smaller commits to make it more
>> review-friendly for the mailing list. I was thinking of splitting by
>> user32 function (and internal dependencies), but since this is going to
>> be an artificial split, I am open to other ideas to make reviewers'
>> lives easier.
>
> Again, I'm no expert, but from what I've seen, a good approach would be
> to start with a stubbed skeleton driver and build it up from that, piece
> by piece, in small logical steps.
>
> The rules for commits are basically:
> * leave wine in a consistent and working state after every commit!
> * don't introduce dead code
> * have meaningful commit messages
>
> (* normally tests are very important, though I'm not sure how much that
> applies in this case or how to go about failing tests under your driver)
>
> Read the wiki for more info, notably
> https://wiki.winehq.org/Submitting_Patches
> and most of https://wiki.winehq.org/Wine_Developer%27s_Guide
> though some stuff may be out of date.
>
> FWIW, I recommend looking at the commit history, how past big changes
> were introduced i.e. the Mac driver, maybe the DIB-Engine (although that
> was quite long ago and a lot has changed since)
>
> Better wait for advice from actual developers here ;)
I think you've described our development guidelines pretty well ;-)
It's probably worth pointing out that "leave wine in a working state" is
a bit less important when it comes to things like introducing a new
driver, at least with respect to that driver itself. You definitely
shouldn't break anything when Wayland isn't used, and ideally something
working in Wayland from an earlier patch shouldn't be broken by a later
one (e.g. the style of development that produces lots of "fixup earlier
patch" patches is frowned upon), but of course it's expected that the
driver won't be working on Wayland in every patch.
>
>> Looking forward to your feedback and questions!
>
> I hope that helps a bit, and that when the experts ship in they don't
> have to repeat the basics.
>
> This is about all I know, sorry I can't really be more specific. Please
> correct anything I got wrong!
>
>
> Best,
> Julian
>
>
Dec. 16, 2020
Re: [PATCH 2/2] widl: open files to write in binary mode
by Jacek Caban
On 16.12.2020 15:35, Steve Lhomme wrote:
> On 2020-12-16 15:18, Jacek Caban wrote:
>> Hi Steve,
>>
>> On 16.12.2020 10:14, Steve Lhomme wrote:
>>> When compiled with mingw64 the output files have Windows line
>>> endings instead
>>> of UNIX ones.
>>> ---
>>> tools/widl/header.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/tools/widl/header.c b/tools/widl/header.c
>>> index 43be8d74cbe..5457185538e 100644
>>> --- a/tools/widl/header.c
>>> +++ b/tools/widl/header.c
>>> @@ -1893,7 +1893,7 @@ void write_header(const statement_list_t *stmts)
>>> if (!do_header) return;
>>> - if(!(header = fopen(header_name, "w"))) {
>>> + if(!(header = fopen(header_name, "wb"))) {
>>
>>
>> There are more places that would need to be fixed for consistency.
>> Maybe we could use _set_fmode(_O_BINARY) in main() instead?
>
> Is this a MS-only thing ? I don't mind having this patch only in
> mingw-w64-tools (which also have some extra patch as well).
Yes, it would need an #ifdef.
> In general it may not be the proper way to handle this. For writing
> all files widl generates, it should be fine. But for reading files the
> "binary" mode is not currently used and it may break reading files
> that used to be read properly on Windows ?
Which files do you mean? The only non-binary files that widl generates
are headers and C files.
Generally speaking, widl output is cross platform, so it should generate
the same output on regardless of host platform used. Windows line ending
breaks that.
Jacek
Dec. 16, 2020
[PATCH v2 1/2] widl: don't use local methods when writing async interfaces
by Steve Lhomme
The same entries can have a different call_as between the synchronous and
asynchronous interfaces and shouldn't be mixed up.
---
tools/widl/header.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/widl/header.c b/tools/widl/header.c
index 223ab5c5ca9..e6de236a25f 100644
--- a/tools/widl/header.c
+++ b/tools/widl/header.c
@@ -1614,7 +1614,8 @@ static void write_com_interface_end(FILE *header, type_t *iface)
if (!dispinterface && !winrt_mode)
{
write_method_proto(header, iface);
- write_locals(header, iface, FALSE);
+ if (type_iface_get_async_iface(iface) != iface)
+ write_locals(header, iface, FALSE);
fprintf(header, "\n");
}
fprintf(header, "#endif /* __%s_%sINTERFACE_DEFINED__ */\n", iface->c_name, dispinterface ? "DISP" : "");
--
2.29.2
Dec. 16, 2020
Re: [PATCH 2/2] widl: open files to write in binary mode
by Steve Lhomme
On 2020-12-16 15:18, Jacek Caban wrote:
> Hi Steve,
>
> On 16.12.2020 10:14, Steve Lhomme wrote:
>> When compiled with mingw64 the output files have Windows line endings
>> instead
>> of UNIX ones.
>> ---
>> tools/widl/header.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tools/widl/header.c b/tools/widl/header.c
>> index 43be8d74cbe..5457185538e 100644
>> --- a/tools/widl/header.c
>> +++ b/tools/widl/header.c
>> @@ -1893,7 +1893,7 @@ void write_header(const statement_list_t *stmts)
>> if (!do_header) return;
>> - if(!(header = fopen(header_name, "w"))) {
>> + if(!(header = fopen(header_name, "wb"))) {
>
>
> There are more places that would need to be fixed for consistency. Maybe
> we could use _set_fmode(_O_BINARY) in main() instead?
Is this a MS-only thing ? I don't mind having this patch only in
mingw-w64-tools (which also have some extra patch as well).
In general it may not be the proper way to handle this. For writing all
files widl generates, it should be fine. But for reading files the
"binary" mode is not currently used and it may break reading files that
used to be read properly on Windows ?
Dec. 16, 2020
Re: [PATCH 2/2] widl: open files to write in binary mode
by Jacek Caban
Hi Steve,
On 16.12.2020 10:14, Steve Lhomme wrote:
> When compiled with mingw64 the output files have Windows line endings instead
> of UNIX ones.
> ---
> tools/widl/header.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/widl/header.c b/tools/widl/header.c
> index 43be8d74cbe..5457185538e 100644
> --- a/tools/widl/header.c
> +++ b/tools/widl/header.c
> @@ -1893,7 +1893,7 @@ void write_header(const statement_list_t *stmts)
>
> if (!do_header) return;
>
> - if(!(header = fopen(header_name, "w"))) {
> + if(!(header = fopen(header_name, "wb"))) {
There are more places that would need to be fixed for consistency. Maybe
we could use _set_fmode(_O_BINARY) in main() instead?
Thanks,
Jacek
Dec. 16, 2020
Re: [PATCH 1/2] widl: don't use local methods when writing async interfaces
by Jacek Caban
Hi Steve,
On 16.12.2020 10:14, Steve Lhomme wrote:
> -static void write_com_interface_end(FILE *header, type_t *iface)
> +static void write_com_interface_end(FILE *header, type_t *iface, int as_async)
> {
> int dispinterface = is_attr(iface->attrs, ATTR_DISPINTERFACE);
> const UUID *uuid = get_attrp(iface->attrs, ATTR_UUID);
> @@ -1614,7 +1614,8 @@ static void write_com_interface_end(FILE *header, type_t *iface)
> if (!dispinterface && !winrt_mode)
> {
> write_method_proto(header, iface);
> - write_locals(header, iface, FALSE);
> + if (!as_async)
> + write_locals(header, iface, FALSE);
You could use something like
if (type_iface_get_async_iface(iface) == iface)
to avoid extra as_async argument.
Thanks,
Jacek
Dec. 16, 2020
Re: [RFC] Announcing Wayland driver development
by Alexandros Frantzis
On Wed, Dec 16, 2020 at 06:35:48AM +0200, Damjan Jovanovic wrote:
> On Tue, Dec 15, 2020 at 7:16 PM Alexandros Frantzis <
> alexandros.frantzis(a)collabora.com> wrote:
>
> >
> > What needs more work (or is completely missing):
> >
> > * Minimize
> > * Better z-order and activation handling
> > * Keyboard layout support
> > * Grabs
> > * GTK menu mouse handling bug (cannot click to select items)
> > * Multiple displays
> > * Vulkan. Note that that there is another effort at
> > https://github.com/varmd/wine-wayland/ focusing solely on vulkan.
> > My hope is that we will be able to share efforts going forward.
> >
>
Hi!
> What about:
> Clipboard
> Drag and drop
> Games that change screen resolution / color depth
These are all in my TODO list (I forgot to mention them in the original
list!).
Note that Wayland doesn't allow clients to change the monitor display
mode per se, but we can still get the desired effect by providing to
the game its desired "fullscreen" size window, and instructing the
Wayland compositor to scale the window to match the size of the
real current monitor mode.
> Cross-process window embedding / system tray
I haven't looked into this yet. I'll need to investigate what the
requirements are from the Windows/Wine side, and whether relevant
Wayland extensions ("foreign surfaces") can accommodate those
requirements.
> X11-based XDG standards, eg. startup notifications
I haven't considered support for the XDG standards yet, and we will have
to examine each standard we care about separately, to see what Wayland
supports or could reasonably support.
For startup notifications in particular, Wayland doesn't currently
provide a standard extension, but it has been discussed. For now,
GTK/gnome provides relevant functionality through their own gtk-shell1
extension. One way forward, and until more standard support is provided,
is to use this extension (if present) to at least get startup
notifications on gnome-shell.
Thanks,
Alexandros
Dec. 16, 2020
[PATCH 3/3] wintrust: Don't fail CryptCATOpen if file is empty or its data invalid.
by Rémi Bernon
Fixes a regression from 699e0a55ea71e2506917e38fc85cb4ae23a9cd1a,
making "winetricks dotnet30sp1" fail.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49831
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
Note that sometimes (often?) "winetricks dotnet30sp1" still fails early
because NetFx20SP1_x86.exe fails to install. It's unrelated, and happens
spuriously.
dlls/wintrust/crypt.c | 5 ++++-
dlls/wintrust/tests/crypt.c | 12 ++++++------
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/dlls/wintrust/crypt.c b/dlls/wintrust/crypt.c
index e9a58a84ac4..2a780e57546 100644
--- a/dlls/wintrust/crypt.c
+++ b/dlls/wintrust/crypt.c
@@ -935,7 +935,7 @@ HANDLE WINAPI CryptCATOpen(WCHAR *filename, DWORD flags, HCRYPTPROV hProv,
size = GetFileSize(file, NULL);
if (!(buffer = HeapAlloc(GetProcessHeap(), 0, size))) goto failed_alloc;
- if (!ReadFile(file, buffer, size, &size, NULL) || !CryptMsgUpdate(hmsg, buffer, size, TRUE)) goto failed;
+ if (!ReadFile(file, buffer, size, &size, NULL) || !CryptMsgUpdate(hmsg, buffer, size, TRUE)) goto done;
size = sizeof(DWORD);
if (!CryptMsgGetParam(hmsg, CMSG_ATTR_CERT_COUNT_PARAM, 0, &cc->attr_count, &size)) goto failed;
@@ -955,9 +955,12 @@ HANDLE WINAPI CryptCATOpen(WCHAR *filename, DWORD flags, HCRYPTPROV hProv,
}
cc->inner = decode_inner_content(hmsg, dwEncodingType, &cc->inner_len);
if (!cc->inner || !CryptSIPRetrieveSubjectGuid(filename, NULL, &cc->subject)) goto failed;
+
+done:
cc->magic = CRYPTCAT_MAGIC;
HeapFree(GetProcessHeap(), 0, buffer);
CloseHandle(file);
+ SetLastError(ERROR_SUCCESS);
return cc;
failed_alloc:
diff --git a/dlls/wintrust/tests/crypt.c b/dlls/wintrust/tests/crypt.c
index 1b436e9f4ab..5f9c402e00f 100644
--- a/dlls/wintrust/tests/crypt.c
+++ b/dlls/wintrust/tests/crypt.c
@@ -429,10 +429,10 @@ static void test_CryptCATOpen(void)
}
else
{
- todo_wine ok(cat != INVALID_HANDLE_VALUE, "flags %#x: expected success\n", flags);
- todo_wine ok(!GetLastError(), "flags %#x: got error %u\n", flags, GetLastError());
+ ok(cat != INVALID_HANDLE_VALUE, "flags %#x: expected success\n", flags);
+ ok(!GetLastError(), "flags %#x: got error %u\n", flags, GetLastError());
ret = pCryptCATClose(cat);
- todo_wine ok(ret, "flags %#x: failed to close file\n", flags);
+ ok(ret, "flags %#x: failed to close file\n", flags);
ret = DeleteFileW(filename);
ok(ret, "flags %#x: failed to delete file, error %u\n", flags, GetLastError());
}
@@ -443,10 +443,10 @@ static void test_CryptCATOpen(void)
SetLastError(0xdeadbeef);
cat = pCryptCATOpen(filename, flags, 0, 0, 0);
- todo_wine ok(cat != INVALID_HANDLE_VALUE, "flags %#x: expected success\n", flags);
- todo_wine ok(!GetLastError(), "flags %#x: got error %u\n", flags, GetLastError());
+ ok(cat != INVALID_HANDLE_VALUE, "flags %#x: expected success\n", flags);
+ ok(!GetLastError(), "flags %#x: got error %u\n", flags, GetLastError());
ret = pCryptCATClose(cat);
- todo_wine ok(ret, "flags %#x: failed to close file\n", flags);
+ ok(ret, "flags %#x: failed to close file\n", flags);
file = _wfopen(filename, L"r");
ret = fread(buffer, 1, sizeof(buffer), file);
--
2.29.2
Dec. 16, 2020
[PATCH 2/3] wintrust: Allocate CryptCATOpen objects before reading the file.
by Rémi Bernon
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
dlls/wintrust/crypt.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/wintrust/crypt.c b/dlls/wintrust/crypt.c
index 4fbf75f7e0c..e9a58a84ac4 100644
--- a/dlls/wintrust/crypt.c
+++ b/dlls/wintrust/crypt.c
@@ -928,16 +928,16 @@ HANDLE WINAPI CryptCATOpen(WCHAR *filename, DWORD flags, HCRYPTPROV hProv,
file = CreateFileW(filename, GENERIC_READ, FILE_SHARE_READ, NULL, open_mode, 0, NULL);
if (file == INVALID_HANDLE_VALUE) return INVALID_HANDLE_VALUE;
+ if (!(hmsg = CryptMsgOpenToDecode(dwEncodingType, 0, 0, hProv, NULL, NULL))) goto failed;
+ if (!(cc = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*cc)))) goto failed_alloc;
+ cc->msg = hmsg;
+ cc->encoding = dwEncodingType;
+
size = GetFileSize(file, NULL);
if (!(buffer = HeapAlloc(GetProcessHeap(), 0, size))) goto failed_alloc;
- if (!(hmsg = CryptMsgOpenToDecode(dwEncodingType, 0, 0, hProv, NULL, NULL))) goto failed;
if (!ReadFile(file, buffer, size, &size, NULL) || !CryptMsgUpdate(hmsg, buffer, size, TRUE)) goto failed;
size = sizeof(DWORD);
- if (!(cc = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*cc)))) goto failed_alloc;
-
- cc->msg = hmsg;
- cc->encoding = dwEncodingType;
if (!CryptMsgGetParam(hmsg, CMSG_ATTR_CERT_COUNT_PARAM, 0, &cc->attr_count, &size)) goto failed;
for (i = 0; i < cc->attr_count; i++)
--
2.29.2
Dec. 16, 2020
[PATCH 1/3] wintrust: Refactor CryptCATOpen error handling.
by Rémi Bernon
Make it simpler, handle all errors in the same place.
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
dlls/wintrust/crypt.c | 118 +++++++++++++-----------------------------
1 file changed, 36 insertions(+), 82 deletions(-)
diff --git a/dlls/wintrust/crypt.c b/dlls/wintrust/crypt.c
index be869ad8277..4fbf75f7e0c 100644
--- a/dlls/wintrust/crypt.c
+++ b/dlls/wintrust/crypt.c
@@ -904,10 +904,10 @@ BOOL WINAPI CryptCATPersistStore(HANDLE catalog)
HANDLE WINAPI CryptCATOpen(WCHAR *filename, DWORD flags, HCRYPTPROV hProv,
DWORD dwPublicVersion, DWORD dwEncodingType)
{
- HANDLE file, hmsg;
- BYTE *buffer = NULL;
- DWORD size, open_mode = OPEN_ALWAYS;
- struct cryptcat *cc;
+ HANDLE file, hmsg = NULL;
+ BYTE *buffer = NULL, *p;
+ DWORD i, sum = 0, size, open_mode = OPEN_ALWAYS;
+ struct cryptcat *cc = NULL;
TRACE("filename %s, flags %#x, provider %#lx, version %#x, type %#x\n",
debugstr_w(filename), flags, hProv, dwPublicVersion, dwEncodingType);
@@ -929,92 +929,46 @@ HANDLE WINAPI CryptCATOpen(WCHAR *filename, DWORD flags, HCRYPTPROV hProv,
if (file == INVALID_HANDLE_VALUE) return INVALID_HANDLE_VALUE;
size = GetFileSize(file, NULL);
- if (!(buffer = HeapAlloc(GetProcessHeap(), 0, size)))
- {
- CloseHandle(file);
- SetLastError(ERROR_OUTOFMEMORY);
- return INVALID_HANDLE_VALUE;
- }
- if (!(hmsg = CryptMsgOpenToDecode(dwEncodingType, 0, 0, hProv, NULL, NULL)))
- {
- CloseHandle(file);
- HeapFree(GetProcessHeap(), 0, buffer);
- return INVALID_HANDLE_VALUE;
- }
- if (!ReadFile(file, buffer, size, &size, NULL) || !CryptMsgUpdate(hmsg, buffer, size, TRUE))
- {
- CloseHandle(file);
- HeapFree(GetProcessHeap(), 0, buffer);
- CryptMsgClose(hmsg);
- return INVALID_HANDLE_VALUE;
- }
- HeapFree(GetProcessHeap(), 0, buffer);
- CloseHandle(file);
+ if (!(buffer = HeapAlloc(GetProcessHeap(), 0, size))) goto failed_alloc;
+ if (!(hmsg = CryptMsgOpenToDecode(dwEncodingType, 0, 0, hProv, NULL, NULL))) goto failed;
+ if (!ReadFile(file, buffer, size, &size, NULL) || !CryptMsgUpdate(hmsg, buffer, size, TRUE)) goto failed;
size = sizeof(DWORD);
- if (!(cc = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*cc))))
- {
- CryptMsgClose(hmsg);
- SetLastError(ERROR_OUTOFMEMORY);
- return INVALID_HANDLE_VALUE;
- }
+ if (!(cc = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*cc)))) goto failed_alloc;
cc->msg = hmsg;
cc->encoding = dwEncodingType;
- if (CryptMsgGetParam(hmsg, CMSG_ATTR_CERT_COUNT_PARAM, 0, &cc->attr_count, &size))
- {
- DWORD i, sum = 0;
- BYTE *p;
+ if (!CryptMsgGetParam(hmsg, CMSG_ATTR_CERT_COUNT_PARAM, 0, &cc->attr_count, &size)) goto failed;
- for (i = 0; i < cc->attr_count; i++)
- {
- if (!CryptMsgGetParam(hmsg, CMSG_ATTR_CERT_PARAM, i, NULL, &size))
- {
- CryptMsgClose(hmsg);
- HeapFree(GetProcessHeap(), 0, cc);
- return INVALID_HANDLE_VALUE;
- }
- sum += size;
- }
- if (!(cc->attr = HeapAlloc(GetProcessHeap(), 0, sizeof(*cc->attr) * cc->attr_count + sum)))
- {
- CryptMsgClose(hmsg);
- HeapFree(GetProcessHeap(), 0, cc);
- SetLastError(ERROR_OUTOFMEMORY);
- return INVALID_HANDLE_VALUE;
- }
- p = (BYTE *)(cc->attr + cc->attr_count);
- for (i = 0; i < cc->attr_count; i++)
- {
- if (!CryptMsgGetParam(hmsg, CMSG_ATTR_CERT_PARAM, i, NULL, &size))
- {
- CryptMsgClose(hmsg);
- HeapFree(GetProcessHeap(), 0, cc->attr);
- HeapFree(GetProcessHeap(), 0, cc);
- return INVALID_HANDLE_VALUE;
- }
- if (!CryptMsgGetParam(hmsg, CMSG_ATTR_CERT_PARAM, i, p, &size))
- {
- CryptMsgClose(hmsg);
- HeapFree(GetProcessHeap(), 0, cc->attr);
- HeapFree(GetProcessHeap(), 0, cc);
- return INVALID_HANDLE_VALUE;
- }
- p += size;
- }
- cc->inner = decode_inner_content(hmsg, dwEncodingType, &cc->inner_len);
- if (!cc->inner || !CryptSIPRetrieveSubjectGuid(filename, NULL, &cc->subject))
- {
- CryptMsgClose(hmsg);
- HeapFree(GetProcessHeap(), 0, cc->attr);
- HeapFree(GetProcessHeap(), 0, cc->inner);
- HeapFree(GetProcessHeap(), 0, cc);
- return INVALID_HANDLE_VALUE;
- }
- cc->magic = CRYPTCAT_MAGIC;
- return cc;
+ for (i = 0; i < cc->attr_count; i++)
+ {
+ if (!CryptMsgGetParam(hmsg, CMSG_ATTR_CERT_PARAM, i, NULL, &size)) goto failed;
+ sum += size;
+ }
+ if (!(cc->attr = HeapAlloc(GetProcessHeap(), 0, sizeof(*cc->attr) * cc->attr_count + sum))) goto failed_alloc;
+ p = (BYTE *)(cc->attr + cc->attr_count);
+ for (i = 0; i < cc->attr_count; i++)
+ {
+ if (!CryptMsgGetParam(hmsg, CMSG_ATTR_CERT_PARAM, i, NULL, &size)) goto failed;
+ if (!CryptMsgGetParam(hmsg, CMSG_ATTR_CERT_PARAM, i, p, &size)) goto failed;
+ p += size;
}
+ cc->inner = decode_inner_content(hmsg, dwEncodingType, &cc->inner_len);
+ if (!cc->inner || !CryptSIPRetrieveSubjectGuid(filename, NULL, &cc->subject)) goto failed;
+ cc->magic = CRYPTCAT_MAGIC;
+ HeapFree(GetProcessHeap(), 0, buffer);
+ CloseHandle(file);
+ return cc;
+
+failed_alloc:
+ SetLastError(ERROR_OUTOFMEMORY);
+failed:
+ if (cc) HeapFree(GetProcessHeap(), 0, cc->inner);
+ if (cc) HeapFree(GetProcessHeap(), 0, cc->attr);
HeapFree(GetProcessHeap(), 0, cc);
+ HeapFree(GetProcessHeap(), 0, buffer);
+ CryptMsgClose(hmsg);
+ CloseHandle(file);
return INVALID_HANDLE_VALUE;
}
--
2.29.2
Dec. 16, 2020
[PATCH] wined3d: Do not create Vulkan 2D (array) views for UAVs on 3D resources.
by Henri Verbeet
We should simply create 3D views.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50123
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/wined3d/view.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c
index f2c8ceab461..c3128c9ed4c 100644
--- a/dlls/wined3d/view.c
+++ b/dlls/wined3d/view.c
@@ -688,7 +688,7 @@ static VkBufferView wined3d_view_vk_create_buffer_view(struct wined3d_context_vk
static VkImageView wined3d_view_vk_create_texture_view(struct wined3d_context_vk *context_vk,
const struct wined3d_view_desc *desc, struct wined3d_texture_vk *texture_vk,
- const struct wined3d_format_vk *view_format_vk, struct color_fixup_desc fixup, bool srv)
+ const struct wined3d_format_vk *view_format_vk, struct color_fixup_desc fixup, bool rtv)
{
const struct wined3d_resource *resource = &texture_vk->t.resource;
const struct wined3d_vk_info *vk_info = context_vk->vk_info;
@@ -730,7 +730,7 @@ static VkImageView wined3d_view_vk_create_texture_view(struct wined3d_context_vk
create_info.flags = 0;
create_info.image = texture_vk->vk_image;
create_info.viewType = vk_image_view_type_from_wined3d(resource->type, desc->flags);
- if (!srv && create_info.viewType == VK_IMAGE_VIEW_TYPE_3D)
+ if (rtv && create_info.viewType == VK_IMAGE_VIEW_TYPE_3D)
{
if (desc->u.texture.layer_count > 1)
create_info.viewType = VK_IMAGE_VIEW_TYPE_2D_ARRAY;
@@ -823,7 +823,7 @@ static void wined3d_render_target_view_vk_cs_init(void *object)
context = context_acquire(resource->device, NULL, 0);
view_vk->vk_image_view = wined3d_view_vk_create_texture_view(wined3d_context_vk(context),
- desc, texture_vk, format_vk, COLOR_FIXUP_IDENTITY, false);
+ desc, texture_vk, format_vk, COLOR_FIXUP_IDENTITY, true);
context_release(context);
if (!view_vk->vk_image_view)
@@ -1098,7 +1098,7 @@ static void wined3d_shader_resource_view_vk_cs_init(void *object)
context = context_acquire(resource->device, NULL, 0);
vk_image_view = wined3d_view_vk_create_texture_view(wined3d_context_vk(context),
- desc, texture_vk, wined3d_format_vk(format), format->color_fixup, true);
+ desc, texture_vk, wined3d_format_vk(format), format->color_fixup, false);
context_release(context);
if (!vk_image_view)
--
2.20.1
Dec. 16, 2020
Re: [PATCH 2/2] widl: open files to write in binary mode
by Steve Lhomme
On 2020-12-16 14:13, Henri Verbeet wrote:
> On Wed, 16 Dec 2020 at 12:44, Steve Lhomme <robux4(a)ycbcr.xyz> wrote:
>> When compiled with mingw64 the output files have Windows line endings instead
>> of UNIX ones.
>> ---
> Isn't that what you'd want when building for Windows?
On Windows that would be the mingw-w64 generator and it's expecting
files with only \n (otherwise it makes huge diffs).
I'm not sure if there are other cases where widl would be used to
produce Windows based headers.
Dec. 16, 2020
Re: [PATCH 2/2] widl: open files to write in binary mode
by Henri Verbeet
On Wed, 16 Dec 2020 at 12:44, Steve Lhomme <robux4(a)ycbcr.xyz> wrote:
> When compiled with mingw64 the output files have Windows line endings instead
> of UNIX ones.
> ---
Isn't that what you'd want when building for Windows?
Dec. 16, 2020
Re: [PATCH 4/5] msvcrt: Use __ASM_USE_THISCALL_WRAPPER in cxx.h.
by Piotr Caban
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com>
Dec. 16, 2020
Re: [PATCH 3/5] msvcrt: Use GCC-style assembly on Clang MSVC target.
by Piotr Caban
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com>
Dec. 16, 2020
[PATCH 2/5 v2] msvcrt: Prefix *rot* functions.
by Piotr Caban
From: Jacek Caban <jacek(a)codeweavers.com>
MSVC does not allow overriding those intrinsic functions.
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com>
---
dlls/crtdll/crtdll.spec | 8 ++++----
dlls/msvcr100/msvcr100.spec | 12 ++++++------
dlls/msvcr110/msvcr110.spec | 12 ++++++------
dlls/msvcr120/msvcr120.spec | 12 ++++++------
dlls/msvcr70/msvcr70.spec | 8 ++++----
dlls/msvcr71/msvcr71.spec | 8 ++++----
dlls/msvcr80/msvcr80.spec | 12 ++++++------
dlls/msvcr90/msvcr90.spec | 12 ++++++------
dlls/msvcrt/math.c | 12 ++++++------
dlls/msvcrt/msvcrt.spec | 12 ++++++------
dlls/msvcrtd/msvcrtd.spec | 8 ++++----
dlls/ucrtbase/ucrtbase.spec | 12 ++++++------
12 files changed, 64 insertions(+), 64 deletions(-)
Dec. 16, 2020
[PATCH 1/5 v2] ucrtbase: Improve __intrinsic_abnormal_termination stub.
by Piotr Caban
From: Jacek Caban <jacek(a)codeweavers.com>
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com>
---
v2:
- fix spec files
dlls/crtdll/crtdll.spec | 2 +-
dlls/msvcr100/msvcr100.spec | 2 +-
dlls/msvcr110/msvcr110.spec | 2 +-
dlls/msvcr120/msvcr120.spec | 2 +-
dlls/msvcr70/msvcr70.spec | 2 +-
dlls/msvcr71/msvcr71.spec | 2 +-
dlls/msvcr80/msvcr80.spec | 2 +-
dlls/msvcr90/msvcr90.spec | 2 +-
dlls/msvcrt/except.c | 2 +-
dlls/msvcrt/msvcrt.spec | 2 +-
dlls/msvcrtd/msvcrtd.spec | 2 +-
dlls/ucrtbase/ucrtbase.spec | 2 +-
12 files changed, 12 insertions(+), 12 deletions(-)
Dec. 16, 2020
Re: [RFC] Announcing Wayland driver development
by Julian Rüger
> FWIW, I recommend looking at the commit history, how past big changes
> were introduced i.e. the Mac driver, maybe the DIB-Engine (although that
> was quite long ago and a lot has changed since)
The most recent example of a new driver:
https://source.winehq.org/git/wine.git/?a=search&h=HEAD&st=commit&s=wineusb
Dec. 16, 2020
Re: TestBot job 83503 results: [PATCH] ws2_32: Fix buffer size check in WSAIoctl() for SIO_GET_INTERFACE_LIST.
by Paul Gofman
On 12/16/20 12:10, Marvin wrote:
> ws2_32:
> sock.c:10534: Test failed: Got unexpected ret 0.
> sock.c:10535: Test failed: Got unexpected error 6.
> sock.c:10536: Test failed: Got unexpected size 76.
Can it be that Wine is not getting updated on Testbot? The tests results
are like the changes to test are applied but ws2_32.dll is unchanged.
Dec. 16, 2020
[PATCH 2/2] widl: open files to write in binary mode
by Steve Lhomme
When compiled with mingw64 the output files have Windows line endings instead
of UNIX ones.
---
tools/widl/header.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/widl/header.c b/tools/widl/header.c
index 43be8d74cbe..5457185538e 100644
--- a/tools/widl/header.c
+++ b/tools/widl/header.c
@@ -1893,7 +1893,7 @@ void write_header(const statement_list_t *stmts)
if (!do_header) return;
- if(!(header = fopen(header_name, "w"))) {
+ if(!(header = fopen(header_name, "wb"))) {
error("Could not open %s for output\n", header_name);
return;
}
--
2.29.2
Dec. 16, 2020
[PATCH 1/2] widl: don't use local methods when writing async interfaces
by Steve Lhomme
The same entries can have a different call_as between the synchronous and
asynchronous interfaces and shouldn't be mixed up.
---
tools/widl/header.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tools/widl/header.c b/tools/widl/header.c
index 223ab5c5ca9..43be8d74cbe 100644
--- a/tools/widl/header.c
+++ b/tools/widl/header.c
@@ -1535,7 +1535,7 @@ static void write_com_interface_start(FILE *header, const type_t *iface)
fprintf(header,"#define __%s_%sINTERFACE_DEFINED__\n\n", iface->c_name, dispinterface ? "DISP" : "");
}
-static void write_com_interface_end(FILE *header, type_t *iface)
+static void write_com_interface_end(FILE *header, type_t *iface, int as_async)
{
int dispinterface = is_attr(iface->attrs, ATTR_DISPINTERFACE);
const UUID *uuid = get_attrp(iface->attrs, ATTR_UUID);
@@ -1614,7 +1614,8 @@ static void write_com_interface_end(FILE *header, type_t *iface)
if (!dispinterface && !winrt_mode)
{
write_method_proto(header, iface);
- write_locals(header, iface, FALSE);
+ if (!as_async)
+ write_locals(header, iface, FALSE);
fprintf(header, "\n");
}
fprintf(header, "#endif /* __%s_%sINTERFACE_DEFINED__ */\n", iface->c_name, dispinterface ? "DISP" : "");
@@ -1808,11 +1809,11 @@ static void write_header_stmts(FILE *header, const statement_list_t *stmts, cons
{
write_com_interface_start(header, iface);
write_header_stmts(header, type_iface_get_stmts(iface), stmt->u.type, TRUE);
- write_com_interface_end(header, iface);
+ write_com_interface_end(header, iface, FALSE);
if (async_iface)
{
write_com_interface_start(header, async_iface);
- write_com_interface_end(header, async_iface);
+ write_com_interface_end(header, async_iface, TRUE);
}
}
else
--
2.29.2
Dec. 16, 2020
[PATCH] ws2_32: Fix buffer size check in WSAIoctl() for SIO_GET_INTERFACE_LIST.
by Paul Gofman
Fixes out of bound memory access in Anno 1404 Addon.
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
---
This is not a (recent) regression, but this is out of bound memory acccess andd
the fix is trivial, so suggesting during the code freeze.
dlls/ws2_32/socket.c | 3 ++-
dlls/ws2_32/tests/sock.c | 25 +++++++++++++++++++++++++
2 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 6cb35bcd135..05097ce53b8 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -4618,10 +4618,11 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
if (ptr->IpAddressList.IpAddress.String[0] == '\0')
continue;
- if ((numInt + 1)*sizeof(INTERFACE_INFO)/sizeof(IP_ADAPTER_INFO) > out_size)
+ if ((numInt + 1) * sizeof(INTERFACE_INFO) > out_size)
{
WARN("Buffer too small = %u, out_size = %u\n", numInt + 1, out_size);
status = WSAEFAULT;
+ if (ret_size) *ret_size = 0;
break;
}
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 8711b65fcea..98cc3881853 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -10514,6 +10514,30 @@ static void test_WSCGetProviderPath(void)
ok(len == 256, "Got unexpected len %d.\n", len);
}
+static void test_wsaioctl(void)
+{
+ char buffer[4096];
+ DWORD size;
+ SOCKET s;
+ int ret;
+
+ s = WSASocketW(AF_INET, SOCK_STREAM, IPPROTO_TCP, NULL, 0, WSA_FLAG_OVERLAPPED);
+ ok(s != INVALID_SOCKET, "failed to create socket, error %u\n", WSAGetLastError());
+
+ size = 0xdeadbeef;
+ ret = WSAIoctl(s, SIO_GET_INTERFACE_LIST, NULL, 0, buffer, sizeof(buffer), &size, NULL, NULL);
+ ok(!ret, "Got unexpected ret %d.\n", ret);
+ ok(size && size != 0xdeadbeef && !(size % sizeof(INTERFACE_INFO)), "Got unexpected size %u.\n", size);
+
+ size = 0xdeadbeef;
+ ret = WSAIoctl(s, SIO_GET_INTERFACE_LIST, NULL, 0, buffer, sizeof(INTERFACE_INFO), &size, NULL, NULL);
+ ok(ret == -1, "Got unexpected ret %d.\n", ret);
+ ok(WSAGetLastError() == WSAEFAULT, "Got unexpected error %d.\n", WSAGetLastError());
+ ok(!size, "Got unexpected size %u.\n", size);
+
+ closesocket(s);
+}
+
START_TEST( sock )
{
int i;
@@ -10595,6 +10619,7 @@ START_TEST( sock )
/* this is an io heavy test, do it at the end so the kernel doesn't start dropping packets */
test_send();
test_synchronous_WSAIoctl();
+ test_wsaioctl();
Exit();
}
--
2.29.2
Dec. 16, 2020
Re: [RFC] Announcing Wayland driver development
by Julian Rüger
Hi Alexandros,
first of all, congratulations and thanks for your work, this sounds very
cool!
Disclaimer:
I'm little more than a curious observer of the larger developments in
Wine, but I've been around for a while and have picked up a few things.
Still, you should probably take anything someone who actually
understands the code says over my ramblings ;)
> My first question to the Wine community is how complete the driver
> should be before being considered for inclusion. Is the current Wayland
> driver state enough?
The most important and probably trickiest order of business is to
convince Alexandre you're going the "Right Way" (tm), from an
architectural standpoint.
I can't really say if your current progress is enough to gauge that, but
I think it is.
> If there is interest, I was hoping to get the
> driver in earlier rather than later, in an experimental capacity, in
> order to provide a single, official point of development for people
> wanting to contribute.
You should talk to our tireless and competent staging developers,
Zebediah Figura and Alistair Leslie-Hughes about that.
> My second question is about the best way to move forward with
> upstreaming. The code is currently split between just a few commits,
> mostly as a result of the experimental nature of this effort, and also
> because I used existing code from winex11 and wineandroid as my starting
> point. I would like to split this into smaller commits to make it more
> review-friendly for the mailing list. I was thinking of splitting by
> user32 function (and internal dependencies), but since this is going to
> be an artificial split, I am open to other ideas to make reviewers'
> lives easier.
Again, I'm no expert, but from what I've seen, a good approach would be
to start with a stubbed skeleton driver and build it up from that, piece
by piece, in small logical steps.
The rules for commits are basically:
* leave wine in a consistent and working state after every commit!
* don't introduce dead code
* have meaningful commit messages
(* normally tests are very important, though I'm not sure how much that
applies in this case or how to go about failing tests under your driver)
Read the wiki for more info, notably
https://wiki.winehq.org/Submitting_Patches
and most of https://wiki.winehq.org/Wine_Developer%27s_Guide
though some stuff may be out of date.
FWIW, I recommend looking at the commit history, how past big changes
were introduced i.e. the Mac driver, maybe the DIB-Engine (although that
was quite long ago and a lot has changed since)
Better wait for advice from actual developers here ;)
> Looking forward to your feedback and questions!
I hope that helps a bit, and that when the experts ship in they don't
have to repeat the basics.
This is about all I know, sorry I can't really be more specific. Please
correct anything I got wrong!
Best,
Julian
Dec. 16, 2020
Re: [PATCH] -Add SORT_DIGITSASNUMBERS flag to CompareStringsEx (Fixes FL Studio 20.8 crash on startup)
by john zourlios
Signed-off-by: John Zourlios <john.kinigos(a)gmail.com>
Dec. 16, 2020
Re: [RFC] Announcing Wayland driver development
by Damjan Jovanovic
On Tue, Dec 15, 2020 at 7:16 PM Alexandros Frantzis <
alexandros.frantzis(a)collabora.com> wrote:
>
> What needs more work (or is completely missing):
>
> * Minimize
> * Better z-order and activation handling
> * Keyboard layout support
> * Grabs
> * GTK menu mouse handling bug (cannot click to select items)
> * Multiple displays
> * Vulkan. Note that that there is another effort at
> https://github.com/varmd/wine-wayland/ focusing solely on vulkan.
> My hope is that we will be able to share efforts going forward.
>
That's impressive.
What about:
Clipboard
Drag and drop
Cross-process window embedding / system tray
X11-based XDG standards, eg. startup notifications
Games that change screen resolution / color depth
Damjan
Dec. 16, 2020
[PATCH] po: Update Korean translation.
by Byeongsik Jeon
Signed-off-by: Byeongsik Jeon <bsjeon(a)hanmail.net>
---
po/ko.po | 536 ++++++++++++++++++++-----------------------------------
1 file changed, 189 insertions(+), 347 deletions(-)
diff --git a/po/ko.po b/po/ko.po
index 6beee8a7c15..a8b4f84d583 100644
--- a/po/ko.po
+++ b/po/ko.po
@@ -5,7 +5,7 @@ msgstr ""
"Project-Id-Version: Wine\n"
"Report-Msgid-Bugs-To: https://bugs.winehq.org\n"
"POT-Creation-Date: N/A\n"
-"PO-Revision-Date: 2019-11-01 16:21+0900\n"
+"PO-Revision-Date: 2020-12-16 13:14+0900\n"
"Last-Translator: Byeongsik Jeon <bsjeon(a)hanmail.net>\n"
"Language-Team: Korean\n"
"Language: ko\n"
@@ -702,7 +702,7 @@ msgstr "사용자 정의 색상(&C):"
#: dlls/comdlg32/comdlg32.rc:289
msgid "|S&olid"
-msgstr ""
+msgstr "|단색(&O)"
#: dlls/comdlg32/comdlg32.rc:290
msgid "&Red:"
@@ -739,11 +739,9 @@ msgid "&Define Custom Colors >>"
msgstr "사용자 정의 색상 결정(&D) >>"
#: dlls/comdlg32/comdlg32.rc:312
-#, fuzzy
-#| msgid "&No"
msgctxt "Solid"
msgid "&o"
-msgstr "아니요(&N)"
+msgstr "&O"
#: dlls/comdlg32/comdlg32.rc:318 programs/regedit/regedit.rc:275
#: programs/regedit/regedit.rc:285
@@ -978,7 +976,7 @@ msgstr "파일이 없습니다"
#: dlls/comdlg32/comdlg32.rc:41
msgid "The selection contains a non-folder object"
-msgstr "선택 영역에 폴더가 아닌 객체가 들어 있습니다"
+msgstr "선택 영역에 폴더가 아닌 개체가 들어 있습니다"
#: dlls/comdlg32/comdlg32.rc:46
msgid "Up One Level"
@@ -2292,7 +2290,7 @@ msgstr "용도 추가"
#: dlls/cryptui/cryptui.rc:265
msgid ""
"Add the object identifier (OID) for the certificate purpose you wish to add:"
-msgstr "추가하고자 하는 인증서 용도의 객체 식별자(OID) 추가:"
+msgstr "추가하고자 하는 인증서 용도의 개체 식별자(OID) 추가:"
#: dlls/cryptui/cryptui.rc:273 dlls/cryptui/cryptui.rc:69
msgid "Select Certificate Store"
@@ -2726,7 +2724,7 @@ msgid ""
"The file contains objects that do not match the given criteria. Please "
"select another file."
msgstr ""
-"이 파일에 주어진 기준에 맞지 않는 객체가 있습니다. 다른 파일을 선택하십시오."
+"이 파일에 주어진 기준에 맞지 않는 개체가 있습니다. 다른 파일을 선택하십시오."
#: dlls/cryptui/cryptui.rc:73
msgid "File to Import"
@@ -3126,7 +3124,7 @@ msgstr "행동"
#: dlls/dinput/dinput.rc:29
msgid "Object"
-msgstr "객체"
+msgstr "개체"
#: dlls/dxdiagn/dxdiagn.rc:28
msgid "Regional Setting"
@@ -3723,11 +3721,11 @@ msgstr "게임 컨트롤러"
#: dlls/joy.cpl/joy.rc:32
msgid "Test and configure game controllers."
-msgstr ""
+msgstr "게임 컨트롤러를 테스트하고 구성합니다."
#: dlls/jscript/jscript.rc:28
msgid "Error converting object to primitive type"
-msgstr "객체를 기본 형식으로 변환하는 중에 오류 발생"
+msgstr "개체를 기본 형식으로 변환하는 중에 오류 발생"
#: dlls/jscript/jscript.rc:29 dlls/vbscript/vbscript.rc:29
msgid "Invalid procedure call or argument"
@@ -3738,26 +3736,24 @@ msgid "Subscript out of range"
msgstr "첨자가 범위를 벗어남"
#: dlls/jscript/jscript.rc:31
-#, fuzzy
-#| msgid "Out of paper; "
msgid "Out of stack space"
-msgstr "종이 초과; "
+msgstr "스택 공간이 부족함"
#: dlls/jscript/jscript.rc:32
msgid "Object required"
-msgstr "객체가 필요함"
+msgstr "개체가 필요함"
#: dlls/jscript/jscript.rc:33
msgid "Automation server can't create object"
-msgstr "자동화 서버가 객체를 만들 수 없음"
+msgstr "자동화 서버가 개체를 만들 수 없음"
#: dlls/jscript/jscript.rc:34 dlls/vbscript/vbscript.rc:49
msgid "Object doesn't support this property or method"
-msgstr "객체는 이 속성이나 메소드를 지원하지 않음"
+msgstr "개체는 이 속성이나 메소드를 지원하지 않음"
#: dlls/jscript/jscript.rc:35 dlls/vbscript/vbscript.rc:50
msgid "Object doesn't support this action"
-msgstr "객체는 이 행동을 지원하지 않음"
+msgstr "개체는 이 행동을 지원하지 않음"
#: dlls/jscript/jscript.rc:36
msgid "Argument not optional"
@@ -3809,11 +3805,11 @@ msgstr "루프 바깥에는 'continue'를 사용할 수 없음"
#: dlls/jscript/jscript.rc:48
msgid "Label redefined"
-msgstr "레이블이 중복정의됨"
+msgstr "레이블이 재정의되었습니다"
#: dlls/jscript/jscript.rc:49
msgid "Label not found"
-msgstr "레이블을 찾을 수 없음"
+msgstr "레이블을 찾을 수 없습니다"
#: dlls/jscript/jscript.rc:50
msgid "Expected '@end'"
@@ -3821,7 +3817,7 @@ msgstr "'@end'가 필요합니다"
#: dlls/jscript/jscript.rc:51
msgid "Conditional compilation is turned off"
-msgstr "조건부 컴파일이 해제되어 있음"
+msgstr "조건부 컴파일이 해제되었습니다"
#: dlls/jscript/jscript.rc:52
msgid "Expected '@'"
@@ -3829,17 +3825,15 @@ msgstr "'@'가 필요합니다"
#: dlls/jscript/jscript.rc:78
msgid "Microsoft JScript compilation error"
-msgstr ""
+msgstr "Microsoft JScript 컴파일 오류"
#: dlls/jscript/jscript.rc:79
msgid "Microsoft JScript runtime error"
-msgstr ""
+msgstr "Microsoft JScript 런타임 오류"
#: dlls/jscript/jscript.rc:80 dlls/vbscript/vbscript.rc:64
-#, fuzzy
-#| msgid "Unknown error"
msgid "Unknown runtime error"
-msgstr "알 수 없는 오류"
+msgstr "알 수 없는 런타임 오류"
#: dlls/jscript/jscript.rc:55
msgid "Number expected"
@@ -3851,11 +3845,11 @@ msgstr "함수가 필요합니다"
#: dlls/jscript/jscript.rc:54
msgid "'[object]' is not a date object"
-msgstr "'[object]'가 날짜 객체가 아닙니다"
+msgstr "'[object]'은(는) 날짜 개체가 아닙니다"
#: dlls/jscript/jscript.rc:56
msgid "Object expected"
-msgstr "객체가 필요합니다"
+msgstr "개체가 필요합니다"
#: dlls/jscript/jscript.rc:57
msgid "Illegal assignment"
@@ -3863,43 +3857,39 @@ msgstr "잘못된 할당"
#: dlls/jscript/jscript.rc:58
msgid "'|' is undefined"
-msgstr "'|'가 정의도지 않았습니다"
+msgstr "'|'이(가) 정의되지 않았습니다"
#: dlls/jscript/jscript.rc:59
msgid "Boolean object expected"
-msgstr "볼린 객제가 필요함"
+msgstr "Boolean 개체가 필요합니다"
#: dlls/jscript/jscript.rc:60
msgid "Cannot delete '|'"
-msgstr "'|'를 지울 수 없음"
+msgstr "'|'을(를) 삭제할 수 없습니다"
#: dlls/jscript/jscript.rc:61
msgid "VBArray object expected"
-msgstr "VBArray 갹체가 필요함"
+msgstr "VBArray 개체가 필요합니다"
#: dlls/jscript/jscript.rc:62
msgid "JScript object expected"
-msgstr "JScript 객체가 필요함"
+msgstr "JScript 개체가 필요합니다"
#: dlls/jscript/jscript.rc:63
-#, fuzzy
-#| msgid "Array object expected"
msgid "Enumerator object expected"
-msgstr "배열 객체가 필요합니다"
+msgstr "열거형 개체가 필요합니다"
#: dlls/jscript/jscript.rc:64
-#, fuzzy
-#| msgid "Boolean object expected"
msgid "Regular Expression object expected"
-msgstr "볼린 객제가 필요함"
+msgstr "정규식 개체가 필요합니다"
#: dlls/jscript/jscript.rc:65
msgid "Syntax error in regular expression"
-msgstr "정규 표현식에 문법오류가 있음"
+msgstr "정규식에 구문 오류가 있습니다"
#: dlls/jscript/jscript.rc:66
msgid "Exception thrown and not caught"
-msgstr ""
+msgstr "예외가 발생했지만 catch할 수 없습니다"
#: dlls/jscript/jscript.rc:68
msgid "URI to be encoded contains invalid characters"
@@ -3907,7 +3897,7 @@ msgstr "인코딩할 URI에 올바르지 않은 문자가 들어 있습니다"
#: dlls/jscript/jscript.rc:67
msgid "URI to be decoded is incorrect"
-msgstr "디코딩할 URI가 올바르지 않습니다"
+msgstr "디코딩할 URI가 잘못되었습니다"
#: dlls/jscript/jscript.rc:69
msgid "Number of fraction digits is out of range"
@@ -3919,11 +3909,11 @@ msgstr "정밀도가 범위를 벗어났습니다"
#: dlls/jscript/jscript.rc:71
msgid "Array length must be a finite positive integer"
-msgstr "배열 길이는 유한한 양의 정수이어야 합니다"
+msgstr "배열의 길이는 유한한 양의 정수이어야 합니다"
#: dlls/jscript/jscript.rc:72
msgid "Array object expected"
-msgstr "배열 객체가 필요합니다"
+msgstr "배열 개체가 필요합니다"
#: dlls/jscript/jscript.rc:73
msgid ""
@@ -3934,15 +3924,15 @@ msgstr ""
#: dlls/jscript/jscript.rc:74
msgid "Cannot redefine non-configurable property '|'"
-msgstr "구성되지 않은 요소 '|'를 재처리할 수 없습니다"
+msgstr "구성 가능하지 않은 속성 '|'을(를) 재정의할 수 없습니다"
#: dlls/jscript/jscript.rc:75
msgid "Cannot modify non-writable property '|'"
-msgstr "쓰기 가능하지 않은 요소 '|'를 편집할 수 없습니다"
+msgstr "쓰기 가능하지 않은 속성 '|'을(를) 수정할 수 없습니다"
#: dlls/jscript/jscript.rc:76
msgid "Property cannot have both accessors and a value"
-msgstr "속성은 접근자와 값을 모두 가질 수 없습니다"
+msgstr "속성에 접근자와 값을 둘 다 지정할 수는 없습니다"
#: include/wine/wine_common_ver.rc:129
msgid "Wine kernel DLL"
@@ -5975,7 +5965,7 @@ msgstr "목록상자에는 탭정지가 없음.\n"
#: dlls/kernel32/winerror.mc:2573
msgid "Can't destroy object owned by another thread.\n"
-msgstr "다른 스레드가 소유한 객체를 파괴할 수 없다.\n"
+msgstr "다른 스레드가 소유한 개체를 파괴할 수 없다.\n"
#: dlls/kernel32/winerror.mc:2578
msgid "Child window menus not allowed.\n"
@@ -6303,7 +6293,7 @@ msgstr "올바르지 않은 시간 초과 값.\n"
#: dlls/kernel32/winerror.mc:2983
msgid "Object UUID not found.\n"
-msgstr "UUID 객체를 찾을 수 없습니다.\n"
+msgstr "UUID 개체를 찾을 수 없습니다.\n"
#: dlls/kernel32/winerror.mc:2988
msgid "UUID already registered.\n"
@@ -6479,7 +6469,7 @@ msgstr "더 이상 회원은 없습니다.\n"
#: dlls/kernel32/winerror.mc:3208
msgid "Not all objects unexported.\n"
-msgstr "모든 객체가 내보내지지 못했습니다.\n"
+msgstr "모든 개체가 내보내지지 못했습니다.\n"
#: dlls/kernel32/winerror.mc:3213
msgid "Interface not found.\n"
@@ -6763,7 +6753,7 @@ msgstr "잘못된 스텁 버전.\n"
#: dlls/kernel32/winerror.mc:3563
msgid "Invalid pipe object.\n"
-msgstr "올바르지 않은 파이프 객체.\n"
+msgstr "올바르지 않은 파이프 개체.\n"
#: dlls/kernel32/winerror.mc:3568
msgid "Wrong pipe order.\n"
@@ -6783,7 +6773,7 @@ msgstr "엔드포인트 매퍼 DB를 만들 수 없습니다.\n"
#: dlls/kernel32/winerror.mc:3588
msgid "Invalid object.\n"
-msgstr "올바르지 않은 객체.\n"
+msgstr "올바르지 않은 개체.\n"
#: dlls/kernel32/winerror.mc:3593
msgid "Invalid time.\n"
@@ -6831,7 +6821,7 @@ msgstr "올바르지 않은 드라이버.\n"
#: dlls/kernel32/winerror.mc:3648
msgid "Invalid object resolver set.\n"
-msgstr "잘못된 객체 확인자 세트.\n"
+msgstr "잘못된 개체 확인자 세트.\n"
#: dlls/kernel32/winerror.mc:3653
msgid "Incomplete RPC send.\n"
@@ -6914,49 +6904,41 @@ msgid "Connection reset by peer.\n"
msgstr "피어가 연결을 초기화 했습니다.\n"
#: dlls/kernel32/winerror.mc:3767
-#, fuzzy
-#| msgid "Not implemented"
msgid "Not implemented.\n"
-msgstr "구현되지 않음"
+msgstr "구현되지 않았습니다.\n"
#: dlls/kernel32/winerror.mc:3788
-#, fuzzy
-#| msgid "RPC call failed.\n"
msgid "Call failed.\n"
-msgstr "RPC 호출 실패.\n"
+msgstr "호출이 실패했습니다.\n"
#: dlls/kernel32/winerror.mc:3760
msgid "No Signature found in file.\n"
-msgstr "서명 또는 인증서를 찾을 수 없습니다.\n"
+msgstr "파일에서 서명을 찾을 수 없습니다.\n"
#: dlls/kernel32/winerror.mc:3774
-#, fuzzy
-#| msgid "Invalid level.\n"
msgid "Invalid call.\n"
-msgstr "올바르지 않은 레벨.\n"
+msgstr "올바르지 않은 호출입니다.\n"
#: dlls/kernel32/winerror.mc:3781
-#, fuzzy
-#| msgid "Value is not available.\n"
msgid "Resource is not currently available.\n"
-msgstr "값을 사용할 수 없습니다.\n"
+msgstr "지금은 리소스를 사용할 수 없습니다.\n"
#: dlls/localspl/localspl.rc:31 dlls/localui/localui.rc:31
#: dlls/winspool.drv/winspool.rc:30
msgid "Local Port"
-msgstr "지역 포트"
+msgstr "로컬 포트"
#: dlls/localspl/localspl.rc:32
msgid "Local Monitor"
-msgstr "지역 모니터"
+msgstr "로컬 모니터"
#: dlls/localui/localui.rc:39
msgid "Add a Local Port"
-msgstr "지역 포트 더하기"
+msgstr "로컬 포트 추가"
#: dlls/localui/localui.rc:42
msgid "&Enter the port name to add:"
-msgstr "더할 포트 이름 입력(&E):"
+msgstr "추가할 포트 이름 입력(&E):"
#: dlls/localui/localui.rc:51
msgid "Configure LPT Port"
@@ -6964,11 +6946,11 @@ msgstr "LPT 포트 설정"
#: dlls/localui/localui.rc:54
msgid "Timeout (seconds)"
-msgstr "시간초과(초)"
+msgstr "시간 제한(초)"
#: dlls/localui/localui.rc:55
msgid "&Transmission Retry:"
-msgstr "재 전송 횟수(&T):"
+msgstr "전송 재시도(&T):"
#: dlls/localui/localui.rc:32
msgid "'%s' is not a valid port name"
@@ -6999,10 +6981,8 @@ msgid "Sink has not been finalized.\n"
msgstr "싱크가 완료되지 않았습니다.\n"
#: dlls/mferror/mferror.mc:732
-#, fuzzy
-#| msgid "Sink was already stopped.\n"
msgid "Clock was stopped\n"
-msgstr "싱크가 이미 중지되었습니다.\n"
+msgstr "시계가 중지되었습니다.\n"
#: dlls/mferror/mferror.mc:32
msgid "Media Foundation platform is not initialized.\n"
@@ -7030,7 +7010,7 @@ msgstr "더 이상 입력이 허용되지 않습니다.\n"
#: dlls/mferror/mferror.mc:74
msgid "Object is not initialized.\n"
-msgstr "객체가 초기화되지 않았습니다.\n"
+msgstr "개체가 초기화되지 않았습니다.\n"
#: dlls/mferror/mferror.mc:81
msgid "Representation is not supported.\n"
@@ -7110,7 +7090,7 @@ msgstr "비율(rate) 변경이 선점되었습니다.\n"
#: dlls/mferror/mferror.mc:228
msgid "Object or value wasn't found.\n"
-msgstr "객체 또는 값을 찾을 수 없습니다.\n"
+msgstr "개체 또는 값을 찾을 수 없습니다.\n"
#: dlls/mferror/mferror.mc:235
msgid "Value is not available.\n"
@@ -7381,10 +7361,8 @@ msgid "Clock state was already set.\n"
msgstr "시계 상태가 이미 설정되었습니다.\n"
#: dlls/mferror/mferror.mc:725
-#, fuzzy
-#| msgid "Clock is not available.\n"
msgid "Clock is not simple\n"
-msgstr "시계를 사용할 수 없습니다.\n"
+msgstr "시계가 단순하지 않습니다.\n"
#: dlls/mpr/mpr.rc:35 dlls/wininet/wininet.rc:48
msgid "Enter Network Password"
@@ -8043,7 +8021,7 @@ msgstr "Wine 비디오 1 비디오 코덱"
#: dlls/oleacc/oleacc.rc:31
msgid "unknown object"
-msgstr "알 수 없는 객체"
+msgstr "알 수 없는 개체"
#: dlls/oleacc/oleacc.rc:32
msgid "title bar"
@@ -8478,214 +8456,168 @@ msgid "Off"
msgstr "비작동"
#: dlls/oledb32/version.rc:56
-#, fuzzy
-#| msgid "video"
msgid "Provider"
-msgstr "비디오"
+msgstr "공급자"
#: dlls/oledb32/version.rc:59
-#, fuzzy
-#| msgid "Select the format you want to use:"
msgid "Select the data you want to connect to:"
-msgstr "사용할 파일 형식 선택:"
+msgstr "연결할 데이터 선택:"
#: dlls/oledb32/version.rc:66
-#, fuzzy
-#| msgid "Connections"
msgid "Connection"
msgstr "연결"
#: dlls/oledb32/version.rc:69
-#, fuzzy
-#| msgid "Select the format you want to use:"
msgid "Specify the following to connect to ODBC data:"
-msgstr "사용할 파일 형식 선택:"
+msgstr "ODBC 데이터에 연결하려면 다음을 지정합니다:"
#: dlls/oledb32/version.rc:70
msgid "1. Specify the source of data:"
-msgstr ""
+msgstr "1. 데이터 원본을 지정합니다:"
#: dlls/oledb32/version.rc:71
-#, fuzzy
-#| msgid "Please enter your name"
msgid "Use &data source name"
-msgstr "이름을 입력해 주세요"
+msgstr "데이터 원본 이름 사용(&D)"
#: dlls/oledb32/version.rc:74
-#, fuzzy
-#| msgid "Reset Connections"
msgid "Use c&onnection string"
-msgstr "연결 재설정"
+msgstr "연결 문자열 사용(&O)"
#: dlls/oledb32/version.rc:75
-#, fuzzy
-#| msgid "Connections"
msgid "&Connection string:"
-msgstr "연결"
+msgstr "연결 문자열(&C):"
#: dlls/oledb32/version.rc:77
-#, fuzzy
-#| msgid "A&dd..."
msgid "B&uild..."
-msgstr "추가(&D)..."
+msgstr "빌드(&U)..."
#: dlls/oledb32/version.rc:78
msgid "2. Enter information to log on to the server"
-msgstr ""
+msgstr "2. 서버에 로그온할 정보를 입력합니다"
#: dlls/oledb32/version.rc:79
-#, fuzzy
-#| msgid "&User name:"
msgid "User &name:"
-msgstr "사용자 이름(&U):"
+msgstr "사용자 이름(&N):"
#: dlls/oledb32/version.rc:83
-#, fuzzy
-#| msgid "&Blank page"
msgid "&Blank password"
-msgstr "빈 페이지(&B)"
+msgstr "빈 암호(&B)"
#: dlls/oledb32/version.rc:84
-#, fuzzy
-#| msgid "Wrong password.\n"
msgid "Allow &saving password"
-msgstr "잘못된 암호.\n"
+msgstr "암호 저장 허용(&S)"
#: dlls/oledb32/version.rc:85
msgid "3. Enter the &initial catalog to use:"
-msgstr ""
+msgstr "3. 사용할 초기 카탈로그를 입력합니다(&I):"
#: dlls/oledb32/version.rc:87
-#, fuzzy
-#| msgid "Reset Connections"
msgid "&Test Connection"
-msgstr "연결 재설정"
+msgstr "테스트 연결(&T)"
#: dlls/oledb32/version.rc:92
msgid "Advanced"
-msgstr "중급자"
+msgstr "고급"
#: dlls/oledb32/version.rc:95
-#, fuzzy
-#| msgid "Network share"
msgid "Network settings"
-msgstr "네트워크 공유"
+msgstr "네트워크 설정"
#: dlls/oledb32/version.rc:96
-#, fuzzy
-#| msgid "Bad impersonation level.\n"
msgid "&Impersonation level:"
-msgstr "나쁜 가장 수준.\n"
+msgstr "개인화 수준(&I):"
#: dlls/oledb32/version.rc:98
msgid "P&rotection level:"
-msgstr ""
+msgstr "보호 수준(&R):"
#: dlls/oledb32/version.rc:101
-#, fuzzy
-#| msgid "Connected"
msgid "Connect:"
-msgstr "연결됨"
+msgstr "연결:"
#: dlls/oledb32/version.rc:103
-#, fuzzy
-#| msgid "seconds"
msgid "seconds."
-msgstr "초"
+msgstr "초."
#: dlls/oledb32/version.rc:104
-#, fuzzy
-#| msgid "Success"
msgid "A&ccess:"
-msgstr "성공"
+msgstr "접근(&C):"
#: dlls/oledb32/version.rc:110
-#, fuzzy
-#| msgid "&All"
msgid "All"
-msgstr "모두(&A)"
+msgstr "모두"
#: dlls/oledb32/version.rc:114
msgid ""
"These are the initialization properties for this type of data. To edit a "
"value, select a property, then choose Edit Value below."
msgstr ""
+"이러한 유형의 데이터에 대한 초기화 속성입니다. 값을 편집하려면 속성을 선택한 "
+"다음 아래의 값 편집을 선택합니다."
#: dlls/oledb32/version.rc:115
-#, fuzzy
-#| msgid "&Edit..."
msgid "&Edit Value..."
-msgstr "편집(&E)..."
+msgstr "값 편집(&E)..."
#: dlls/oledb32/version.rc:49
-#, fuzzy
-#| msgid "Properties"
msgid "Data Link Error"
-msgstr "속성"
+msgstr "데이터 링크 오류"
#: dlls/oledb32/version.rc:50
-#, fuzzy
-#| msgid "Please select a file."
msgid "Please select a provider."
-msgstr "파일을 선택하십시오."
+msgstr "공급자를 선택하십시오."
#: dlls/oledb32/version.rc:51
msgid ""
"Provider is no longer available. Ensure that the provider is installed "
"properly."
msgstr ""
+"공급자를 더 이상 사용할 수 없습니다. 공급자가 올바르게 설치되었는지 확인하십"
+"시오."
#: dlls/oledb32/version.rc:36
-#, fuzzy
-#| msgid "Properties"
msgid "Data Link Properties"
-msgstr "속성"
+msgstr "데이터 링크 속성"
#: dlls/oledb32/version.rc:37
msgid "OLE DB Provider(s)"
-msgstr ""
+msgstr "OLE DB 제공자"
#: dlls/oledb32/version.rc:41
-#, fuzzy
-#| msgid "Ready"
msgid "Read"
-msgstr "준비"
+msgstr "읽기"
#: dlls/oledb32/version.rc:42
-#, fuzzy
-#| msgid "Readme:"
msgid "ReadWrite"
-msgstr "주의사항:"
+msgstr "읽기 쓰기"
#: dlls/oledb32/version.rc:43
msgid "Share Deny None"
-msgstr ""
+msgstr "거부 없음을 공유"
#: dlls/oledb32/version.rc:44
msgid "Share Deny Read"
-msgstr ""
+msgstr "읽기 거부를 공유"
#: dlls/oledb32/version.rc:45
msgid "Share Deny Write"
-msgstr ""
+msgstr "쓰기 거부를 공유"
#: dlls/oledb32/version.rc:46
msgid "Share Exclusive"
-msgstr ""
+msgstr "독점적 공유"
#: dlls/oledb32/version.rc:47
-#, fuzzy
-#| msgid "I/O Writes"
msgid "Write"
-msgstr "I/O 쓰기"
+msgstr "쓰기"
#: dlls/oledlg/oledlg.rc:55
msgid "Insert Object"
-msgstr "객체 삽입"
+msgstr "개체 삽입"
#: dlls/oledlg/oledlg.rc:61
msgid "Object Type:"
-msgstr "객체 타입:"
+msgstr "개체 타입:"
#: dlls/oledlg/oledlg.rc:64 dlls/oledlg/oledlg.rc:102
msgid "Result"
@@ -8753,14 +8685,14 @@ msgstr "아이콘 바꾸기(&I)..."
#: dlls/oledlg/oledlg.rc:28
msgid "Insert a new %s object into your document"
-msgstr "새 %s 객체를 문서에 삽입"
+msgstr "새 %s 개체를 문서에 삽입"
#: dlls/oledlg/oledlg.rc:29
msgid ""
"Insert the contents of the file as an object into your document so that you "
"may activate it using the program which created it."
msgstr ""
-"파일 내용을 문서에 객체로 삽입합니다. 파일을 만든 프로그램을 사용하여 활성화"
+"파일 내용을 문서에 개체로 삽입합니다. 파일을 만든 프로그램을 사용하여 활성화"
"합니다."
#: dlls/oledlg/oledlg.rc:30 dlls/shell32/shell32.rc:197
@@ -8784,15 +8716,15 @@ msgstr "변환(&C)..."
#: dlls/oledlg/oledlg.rc:36
msgid "%1 %2 &Object"
-msgstr "%1 %2 객체(&O)"
+msgstr "%1 %2 개체(&O)"
#: dlls/oledlg/oledlg.rc:34
msgid "%1 &Object"
-msgstr "%1 객체(&O)"
+msgstr "%1 개체(&O)"
#: dlls/oledlg/oledlg.rc:33 programs/oleview/oleview.rc:40
msgid "&Object"
-msgstr "객체(&O)"
+msgstr "개체(&O)"
#: dlls/oledlg/oledlg.rc:41
msgid "Inserts the contents of the clipboard into your document as %s."
@@ -8854,7 +8786,7 @@ msgstr "알 수 없는 원본"
#: dlls/oledlg/oledlg.rc:50
msgid "the program which created it"
-msgstr "객체를 만든 프로그램"
+msgstr "개체를 만든 프로그램"
#: dlls/sane.ds/sane.rc:41
msgid "Scanning"
@@ -9228,7 +9160,7 @@ msgstr "Wine 인터넷 익스폴로어"
#: dlls/shdoclc/shdoclc.rc:33
msgid "&w&bPage &p"
-msgstr "&w&b페이지 &p"
+msgstr "&w&b&p쪽"
#: dlls/shell32/shell32.rc:30 dlls/shell32/shell32.rc:45
#: dlls/shell32/shell32.rc:122 dlls/shell32/shell32.rc:162
@@ -9906,16 +9838,12 @@ msgid "Cape Verde Daylight Time"
msgstr "카보베르데 일광 절약 시간"
#: dlls/tzres/tzres.rc:126
-#, fuzzy
-#| msgid "Hawaiian Standard Time"
msgid "Haiti Standard Time"
-msgstr "하와이 표준 시간"
+msgstr "아이티 표준 시간"
#: dlls/tzres/tzres.rc:127
-#, fuzzy
-#| msgid "Hawaiian Daylight Time"
msgid "Haiti Daylight Time"
-msgstr "하와이 일광 절약 시간"
+msgstr "아이티 일광 절약 시간"
#: dlls/tzres/tzres.rc:80
msgid "Central European Standard Time"
@@ -9950,16 +9878,12 @@ msgid "Iran Daylight Time"
msgstr "이란 일광 절약 시간"
#: dlls/tzres/tzres.rc:204
-#, fuzzy
-#| msgid "Hawaiian Standard Time"
msgid "Saint Pierre Standard Time"
-msgstr "하와이 표준 시간"
+msgstr "생피에르 표준 시간"
#: dlls/tzres/tzres.rc:205
-#, fuzzy
-#| msgid "Hawaiian Daylight Time"
msgid "Saint Pierre Daylight Time"
-msgstr "하와이 일광 절약 시간"
+msgstr "생피에르 일광 절약 시간"
#: dlls/tzres/tzres.rc:170
msgid "Namibia Standard Time"
@@ -10002,16 +9926,12 @@ msgid "Central Asia Daylight Time"
msgstr "중앙 아시아 일광 절약 시간"
#: dlls/tzres/tzres.rc:146
-#, fuzzy
-#| msgid "Korea Standard Time"
msgid "Lord Howe Standard Time"
-msgstr "대한민국 표준 시간"
+msgstr "로드하우 표준 시간"
#: dlls/tzres/tzres.rc:147
-#, fuzzy
-#| msgid "Korea Daylight Time"
msgid "Lord Howe Daylight Time"
-msgstr "대한민국 일광 절약 시간"
+msgstr "로드하우 일광 절약 시간"
#: dlls/tzres/tzres.rc:40
msgid "Arabic Standard Time"
@@ -10062,16 +9982,12 @@ msgid "Azerbaijan Daylight Time"
msgstr "아제르바이잔 일광 절약 시간"
#: dlls/tzres/tzres.rc:150
-#, fuzzy
-#| msgid "Magadan Standard Time"
msgid "Magallanes Standard Time"
-msgstr "마가단 표준 시간"
+msgstr "마갈란스 표준 시간"
#: dlls/tzres/tzres.rc:151
-#, fuzzy
-#| msgid "Magadan Daylight Time"
msgid "Magallanes Daylight Time"
-msgstr "마가단 일광 절약 시간"
+msgstr "마갈란스 일광 절약 시간"
#: dlls/tzres/tzres.rc:206
msgid "Samoa Standard Time"
@@ -10122,16 +10038,12 @@ msgid "Line Islands Daylight Time"
msgstr "라인 제도 일광 절약 시간"
#: dlls/tzres/tzres.rc:92
-#, fuzzy
-#| msgid "China Standard Time"
msgid "Cuba Standard Time"
-msgstr "중국 표준 시간"
+msgstr "쿠바 표준 시간"
#: dlls/tzres/tzres.rc:93
-#, fuzzy
-#| msgid "China Daylight Time"
msgid "Cuba Daylight Time"
-msgstr "중국 일광 절약 시간"
+msgstr "쿠바 일광 절약 시간"
#: dlls/tzres/tzres.rc:136
msgid "Jordan Standard Time"
@@ -10174,16 +10086,12 @@ msgid "Argentina Daylight Time"
msgstr "아르헨티나 일광 절약 시간"
#: dlls/tzres/tzres.rc:152
-#, fuzzy
-#| msgid "Mauritius Standard Time"
msgid "Marquesas Standard Time"
-msgstr "모리셔스 표준 시간"
+msgstr "마키저스 표준 시간"
#: dlls/tzres/tzres.rc:153
-#, fuzzy
-#| msgid "Mauritius Daylight Time"
msgid "Marquesas Daylight Time"
-msgstr "모리셔스 일광 절약 시간"
+msgstr "마키저스 일광 절약 시간"
#: dlls/tzres/tzres.rc:166
msgid "Myanmar Standard Time"
@@ -10334,16 +10242,12 @@ msgid "US Eastern Daylight Time"
msgstr "미국 동부 일광 절약 시간"
#: dlls/tzres/tzres.rc:182
-#, fuzzy
-#| msgid "Korea Standard Time"
msgid "North Korea Standard Time"
-msgstr "대한민국 표준 시간"
+msgstr "북한 표준 시간"
#: dlls/tzres/tzres.rc:183
-#, fuzzy
-#| msgid "Korea Daylight Time"
msgid "North Korea Daylight Time"
-msgstr "대한민국 일광 절약 시간"
+msgstr "북한 일광 절약 시간"
#: dlls/tzres/tzres.rc:220
msgid "Tasmania Standard Time"
@@ -10434,16 +10338,12 @@ msgid "Arabian Daylight Time"
msgstr "아라비아 일광 절약 시간"
#: dlls/tzres/tzres.rc:222
-#, fuzzy
-#| msgid "Mountain Standard Time"
msgid "Tocantins Standard Time"
-msgstr "산지 표준 시간"
+msgstr "토칸칭스 표준 시간"
#: dlls/tzres/tzres.rc:223
-#, fuzzy
-#| msgid "Mountain Daylight Time"
msgid "Tocantins Daylight Time"
-msgstr "산지 일광 절약 시간"
+msgstr "토칸칭스 일광 절약 시간"
#: dlls/tzres/tzres.rc:196
msgid "Russian Standard Time"
@@ -10454,14 +10354,10 @@ msgid "Russian Daylight Time"
msgstr "러시아 일광 절약 시간"
#: dlls/tzres/tzres.rc:48
-#, fuzzy
-#| msgid "AUS Central Standard Time"
msgid "Aus Central W. Standard Time"
msgstr "오스트레일리아 중부 표준 시간"
#: dlls/tzres/tzres.rc:49
-#, fuzzy
-#| msgid "AUS Central Daylight Time"
msgid "Aus Central W. Daylight Time"
msgstr "오스트레일리아 중부 일광 절약 시간"
@@ -10594,16 +10490,12 @@ msgid "Venezuela Daylight Time"
msgstr "베네수엘라 일광 절약 시간"
#: dlls/tzres/tzres.rc:62
-#, fuzzy
-#| msgid "Mountain Standard Time"
msgid "Bougainville Standard Time"
-msgstr "산지 표준 시간"
+msgstr "부건빌 표준 시간"
#: dlls/tzres/tzres.rc:63
-#, fuzzy
-#| msgid "Mountain Daylight Time"
msgid "Bougainville Daylight Time"
-msgstr "산지 일광 절약 시간"
+msgstr "부건빌 일광 절약 시간"
#: dlls/tzres/tzres.rc:128
msgid "Hawaiian Standard Time"
@@ -10630,16 +10522,12 @@ msgid "New Zealand Daylight Time"
msgstr "뉴질랜드 일광 절약 시간"
#: dlls/tzres/tzres.rc:34
-#, fuzzy
-#| msgid "Argentina Standard Time"
msgid "Aleutian Standard Time"
-msgstr "아르헨티나 표준 시간"
+msgstr "알류샨 표준 시간"
#: dlls/tzres/tzres.rc:35
-#, fuzzy
-#| msgid "Argentina Daylight Time"
msgid "Aleutian Daylight Time"
-msgstr "아르헨티나 일광 절약 시간"
+msgstr "알류샨 일광 절약 시간"
#: dlls/tzres/tzres.rc:76
msgid "Central Brazilian Standard Time"
@@ -10690,16 +10578,12 @@ msgid "Egypt Daylight Time"
msgstr "이집트 일광 절약 시간"
#: dlls/tzres/tzres.rc:106
-#, fuzzy
-#| msgid "Central Standard Time (Mexico)"
msgid "Eastern Standard Time (Mexico)"
-msgstr "중부 표준 시간 (멕시코)"
+msgstr "동부 표준 시간 (멕시코)"
#: dlls/tzres/tzres.rc:107
-#, fuzzy
-#| msgid "Central Daylight Time (Mexico)"
msgid "Eastern Daylight Time (Mexico)"
-msgstr "중부 일광 절약 시간 (멕시코)"
+msgstr "동부 일광 절약 시간 (멕시코)"
#: dlls/tzres/tzres.rc:154
msgid "Mauritius Standard Time"
@@ -10734,16 +10618,12 @@ msgid "Korea Daylight Time"
msgstr "대한민국 일광 절약 시간"
#: dlls/tzres/tzres.rc:88
-#, fuzzy
-#| msgid "Easter Island Standard Time"
msgid "Chatham Islands Standard Time"
-msgstr "이스터 섬 표준 시간"
+msgstr "채텀 섬 표준 시간"
#: dlls/tzres/tzres.rc:89
-#, fuzzy
-#| msgid "Easter Island Daylight Time"
msgid "Chatham Islands Daylight Time"
-msgstr "이스터 섬 일광 절약 시간"
+msgstr "채텀 섬 일광 절약 시간"
#: dlls/tzres/tzres.rc:96
msgid "E. Africa Standard Time"
@@ -10908,149 +10788,115 @@ msgstr "더 많은 창(&M)..."
#: dlls/vbscript/vbscript.rc:30
msgid "Overflow"
-msgstr ""
+msgstr "오버플로"
#: dlls/vbscript/vbscript.rc:31
-#, fuzzy
-#| msgid "Out of memory."
msgid "Out of memory"
-msgstr "메모리 부족."
+msgstr "메모리 부족"
#: dlls/vbscript/vbscript.rc:33
msgid "This array is fixed or temporarily locked"
-msgstr ""
+msgstr "이 배열은 고정되었거나 일시적으로 잠금 상태입니다"
#: dlls/vbscript/vbscript.rc:34
-#, fuzzy
-#| msgid "Data type mismatch.\n"
msgid "Type mismatch"
-msgstr "데이터 형식이 맞지 않습니다.\n"
+msgstr "형식 불일치"
#: dlls/vbscript/vbscript.rc:36
-#, fuzzy
-#| msgid "I/O device error.\n"
msgid "Device I/O error"
-msgstr "I/O 장치 오류.\n"
+msgstr "장치 I/O 오류"
#: dlls/vbscript/vbscript.rc:37
-#, fuzzy
-#| msgid "File already exists.\n"
msgid "File already exists"
-msgstr "파일이 이미 존재합니다.\n"
+msgstr "파일이 이미 있습니다"
#: dlls/vbscript/vbscript.rc:38
-#, fuzzy
-#| msgid "Disk full.\n"
msgid "Disk full"
-msgstr "디스크가 차 있습니다.\n"
+msgstr "디스크가 가득 찼습니다"
#: dlls/vbscript/vbscript.rc:39
-#, fuzzy
-#| msgid "Too many open files.\n"
msgid "Too many files"
-msgstr "너무 많은 파일 오픈.\n"
+msgstr "파일이 너무 많습니다"
#: dlls/vbscript/vbscript.rc:40
-#, fuzzy
-#| msgid "Access denied.\n"
msgid "Permission denied"
-msgstr "접근 거부.\n"
+msgstr "허가가 거부되었습니다"
#: dlls/vbscript/vbscript.rc:41
msgid "Path/File access error"
-msgstr ""
+msgstr "경로/파일 접근 오류"
#: dlls/vbscript/vbscript.rc:42
-#, fuzzy
-#| msgid "Path not found.\n"
msgid "Path not found"
-msgstr "경로를 찾을 수 없습니다.\n"
+msgstr "경로를 찾을 수 없습니다"
#: dlls/vbscript/vbscript.rc:43
-#, fuzzy
-#| msgid "(value not set)"
msgid "Object variable not set"
-msgstr "(값이 설정되지 않음)"
+msgstr "개체 변수가 설정되어 있지 않습니다"
#: dlls/vbscript/vbscript.rc:44
-#, fuzzy
-#| msgid "Invalid user buffer.\n"
msgid "Invalid use of Null"
-msgstr "올바르지 않은 사용자 버퍼.\n"
+msgstr "올바르지 않은 널 사용"
#: dlls/vbscript/vbscript.rc:45
msgid "Can't create necessary temporary file"
-msgstr ""
+msgstr "필요한 임시 파일을 만들 수 없습니다"
#: dlls/vbscript/vbscript.rc:46
-#, fuzzy
-#| msgid "Automation server can't create object"
msgid "ActiveX component can't create object"
-msgstr "자동화 서버가 객체를 만들 수 없음"
+msgstr "ActiveX 구성 요소는 개체를 만들 수 없습니다"
#: dlls/vbscript/vbscript.rc:47
-#, fuzzy
-#| msgid "Object doesn't support this action"
msgid "Class doesn't support Automation"
-msgstr "객체는 이 행동을 지원하지 않음"
+msgstr "클래스는 자동화를 지원하지 않습니다"
#: dlls/vbscript/vbscript.rc:48
msgid "File name or class name not found during Automation operation"
-msgstr ""
+msgstr "자동화 작업 중에 파일 이름 또는 클래스 이름을 찾을 수 없습니다"
#: dlls/vbscript/vbscript.rc:51
-#, fuzzy
-#| msgid "Object doesn't support this action"
msgid "Object doesn't support named arguments"
-msgstr "객체는 이 행동을 지원하지 않음"
+msgstr "개체는 명명된 인수를 지원하지 않습니다"
#: dlls/vbscript/vbscript.rc:52
-#, fuzzy
-#| msgid "Object doesn't support this action"
msgid "Object doesn't support current locale setting"
-msgstr "객체는 이 행동을 지원하지 않음"
+msgstr "개체는 현재 로캘 설정을 지원하지 않습니다"
#: dlls/vbscript/vbscript.rc:53 dlls/vbscript/vbscript.rc:54
-#, fuzzy
-#| msgid "Element not found.\n"
msgid "Named argument not found"
-msgstr "요소를 찾을 수 없습니다.\n"
+msgstr "명명된 인수를 찾을 수 없습니다"
#: dlls/vbscript/vbscript.rc:55
msgid "Wrong number of arguments or invalid property assignment"
-msgstr ""
+msgstr "인수의 개수나 속성 할당이 잘못되었습니다"
#: dlls/vbscript/vbscript.rc:56
-#, fuzzy
-#| msgid "Object Class Violation"
msgid "Object not a collection"
-msgstr "객체 클래스 위반"
+msgstr "컬렉션이 아닌 개체입니다"
#: dlls/vbscript/vbscript.rc:57
-#, fuzzy
-#| msgid "Specified control was not found in message"
msgid "Specified DLL function not found"
-msgstr "지정한 제어는 메시지에서 발견할 수 없습니다"
+msgstr "지정한 DLL 함수를 찾을 수 없습니다"
#: dlls/vbscript/vbscript.rc:58
msgid "Variable uses an Automation type not supported in VBScript"
-msgstr ""
+msgstr "변수에 VBScript에서 지원하지 않는 자동화 형식이 사용되었습니다"
#: dlls/vbscript/vbscript.rc:59
msgid "The remote server machine does not exist or is unavailable"
-msgstr ""
+msgstr "원격 서버가 없거나 사용할 수 없습니다"
#: dlls/vbscript/vbscript.rc:60
msgid "Invalid or unqualified reference"
-msgstr ""
+msgstr "올바르지 않거나 비정규화된 참조"
#: dlls/vbscript/vbscript.rc:62
msgid "Microsoft VBScript compilation error"
-msgstr ""
+msgstr "Microsoft VBScript 컴파일 오류"
#: dlls/vbscript/vbscript.rc:63
msgid "Microsoft VBScript runtime error"
-msgstr ""
+msgstr "Microsoft VBScript 런타임 오류"
#: dlls/winemac.drv/winemac.rc:33
msgid "Hide %@"
@@ -11147,33 +10993,27 @@ msgstr "인증서에 최소한 하나의 알 수 없는 보안 문제가 있습
#: dlls/wininet/wininet.rc:35
msgid "Effective Date"
-msgstr ""
+msgstr "개시 날짜"
#: dlls/wininet/wininet.rc:37
-#, fuzzy
-#| msgid "Security"
msgid "Security Protocol"
-msgstr "보안"
+msgstr "보안 프로토콜"
#: dlls/wininet/wininet.rc:38
-#, fuzzy
-#| msgid "Signature"
msgid "Signature Type"
-msgstr "서명"
+msgstr "서명 유형"
#: dlls/wininet/wininet.rc:39
-#, fuzzy
-#| msgid "Encrypting File System"
msgid "Encryption Type"
-msgstr "파일 시스템 암호화"
+msgstr "암호화 유형"
#: dlls/wininet/wininet.rc:40
msgid "Privacy Strength"
-msgstr ""
+msgstr "보안 수준"
#: dlls/wininet/wininet.rc:43
msgid "bits"
-msgstr ""
+msgstr "bits"
#: dlls/wininet/winineterror.mc:26
msgid "The request has timed out.\n"
@@ -11918,7 +11758,7 @@ msgstr "잘못된 문법"
#: dlls/wldap32/wldap32.rc:64
msgid "No Such Object"
-msgstr "어떤 객체도 없음"
+msgstr "어떤 개체도 없음"
#: dlls/wldap32/wldap32.rc:65
msgid "Alias Problem"
@@ -11978,7 +11818,7 @@ msgstr "명명 위반"
#: dlls/wldap32/wldap32.rc:97
msgid "Object Class Violation"
-msgstr "객체 클래스 위반"
+msgstr "개체 클래스 위반"
#: dlls/wldap32/wldap32.rc:98
msgid "Not allowed on Non-leaf"
@@ -11994,7 +11834,7 @@ msgstr "이미 존재합니다"
#: dlls/wldap32/wldap32.rc:101
msgid "No Object Class Mods"
-msgstr "어떤 객체 클래스 모드도 없숩니다"
+msgstr "어떤 개체 클래스 모드도 없숩니다"
#: dlls/wldap32/wldap32.rc:102
msgid "Results Too Large"
@@ -13176,6 +13016,9 @@ msgid ""
"\n"
"hardlink hardlink management\n"
msgstr ""
+"- 지원되는 명령 -\n"
+"\n"
+"hardlink 하드링크 관리\n"
#: programs/fsutil/fsutil.mc:35
msgid ""
@@ -13183,10 +13026,13 @@ msgid ""
"\n"
"create create a hardlink\n"
msgstr ""
+"- Hardlink - 지원되는 명령 -\n"
+"\n"
+"create 하드링크 만들기\n"
#: programs/fsutil/fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
-msgstr ""
+msgstr "구문: fsutil hardlink create <new> <existing>\n"
#: programs/hostname/hostname.rc:30
msgid "Usage: hostname\n"
@@ -13817,7 +13663,7 @@ msgstr "C&LSID를 클립보드로 복사"
#: programs/oleview/oleview.rc:57
msgid "Copy &HTML object Tag to clipboard"
-msgstr "&HTML 객체 태그를 클립보드로 복사"
+msgstr "&HTML 개체 태그를 클립보드로 복사"
#: programs/oleview/oleview.rc:63
msgid "&Expert mode"
@@ -13930,7 +13776,7 @@ msgstr "ITypeLib 뷰어"
#: programs/oleview/oleview.rc:99
msgid "OleView - OLE/COM Object Viewer"
-msgstr "OleView - OLE/COM 객체 뷰어"
+msgstr "OleView - OLE/COM 개체 뷰어"
#: programs/oleview/oleview.rc:102
msgid "TypeLib files (*.tlb; *.olb; *.dll; *.ocx; *.exe)"
@@ -13958,15 +13804,15 @@ msgstr "바뀐 것을 저장할지 물어보고 프로그램 끝내기"
#: programs/oleview/oleview.rc:110
msgid "Create an instance of the selected object"
-msgstr "선택된 객체의 인스턴트 만들기"
+msgstr "선택된 개체의 인스턴트 만들기"
#: programs/oleview/oleview.rc:111
msgid "Create an instance of the selected object on a specific machine"
-msgstr "지정한 머신의 선택된 객체의 인스턴트 만들기"
+msgstr "지정한 머신의 선택된 개체의 인스턴트 만들기"
#: programs/oleview/oleview.rc:112
msgid "Release the currently selected object instance"
-msgstr "현재 선택된 객체 인스턴트 해제하기"
+msgstr "현재 선택된 개체 인스턴트 해제하기"
#: programs/oleview/oleview.rc:113
msgid "Copy the GUID of the currently selected item to the clipboard"
@@ -14027,15 +13873,15 @@ msgstr "컴포턴트 분류"
#: programs/oleview/oleview.rc:132
msgid "OLE 1.0 Objects"
-msgstr "OLE 1.0 객체"
+msgstr "OLE 1.0 개체"
#: programs/oleview/oleview.rc:133
msgid "COM Library Objects"
-msgstr "COM 라이브러리 객체"
+msgstr "COM 라이브러리 개체"
#: programs/oleview/oleview.rc:134
msgid "All Objects"
-msgstr "모든 객체"
+msgstr "모든 개체"
#: programs/oleview/oleview.rc:135
msgid "Application IDs"
@@ -15625,7 +15471,7 @@ msgstr "페이지 실패(&F)"
#: programs/taskmgr/taskmgr.rc:537
msgid "&USER Objects"
-msgstr "사용자 객체(&U)"
+msgstr "사용자 개체(&U)"
#: programs/taskmgr/taskmgr.rc:539 programs/taskmgr/taskmgr.rc:281
msgid "I/O Reads"
@@ -15673,7 +15519,7 @@ msgstr "스레드 카운트(&T)"
#: programs/taskmgr/taskmgr.rc:561 programs/taskmgr/taskmgr.rc:292
msgid "GDI Objects"
-msgstr "GDI 객체"
+msgstr "GDI 개체"
#: programs/taskmgr/taskmgr.rc:563 programs/taskmgr/taskmgr.rc:293
msgid "I/O Writes"
@@ -15909,7 +15755,7 @@ msgstr "페이지 실패"
#: programs/taskmgr/taskmgr.rc:280
msgid "USER Objects"
-msgstr "사용자 객체"
+msgstr "사용자 개체"
#: programs/taskmgr/taskmgr.rc:283
msgid "Session ID"
@@ -15937,7 +15783,7 @@ msgstr "NP 풀"
#: programs/taskmgr/taskmgr.rc:289
msgid "Base Pri"
-msgstr "기본 Pri"
+msgstr "기본 우선 순위"
#: programs/taskmgr/taskmgr.rc:301
msgid "Task Manager Warning"
@@ -16983,14 +16829,12 @@ msgid "&Beginner"
msgstr "초보자(&B)"
#: programs/winemine/winemine.rc:45
-#, fuzzy
-#| msgid "Interface"
msgid "&Intermediate"
-msgstr "인터페이스"
+msgstr "중급자(&I)"
#: programs/winemine/winemine.rc:46
msgid "&Expert"
-msgstr "상급자(&E)"
+msgstr "전문가(&E)"
#: programs/winemine/winemine.rc:47
msgid "&Custom..."
@@ -17017,10 +16861,8 @@ msgid "Beginner"
msgstr "초보자"
#: programs/winemine/winemine.rc:65
-#, fuzzy
-#| msgid "Interface"
msgid "Intermediate"
-msgstr "인터페이스"
+msgstr "중급자"
#: programs/winemine/winemine.rc:66
msgid "Expert"
--
2.29.2
Dec. 16, 2020
Re: [RFC] Announcing Wayland driver development
by Aaryaman Vasishta
This is super amazing. Thank you very much for this contribution to WINE! I
can't wait to try this.
Cheers,
Aaryaman
On Wed, Dec 16, 2020 at 2:16 AM Alexandros Frantzis <
alexandros.frantzis(a)collabora.com> wrote:
> Hi all,
>
> For some time now I have been working on a Wayland driver for Wine, and
> it has now reached a good enough state to present it to the wider
> community. This driver allows users to run Windows GDI and OpenGL
> applications directly on Wayland compositors without an intermediate
> layer to translate from X11 to Wayland. This leads to a leaner and more
> efficient stack.
>
> The code currently resides at:
>
> https://gitlab.collabora.com/alf/wine/-/commits/wayland
>
> Get it with:
>
> $ git clone -b wayland https://gitlab.collabora.com/alf/wine/
>
> Configure with (you need the wayland-client and wayland-egl packages):
>
> $ ./configure --with-wayland
>
> To run, ensure there is a Wayland compositor running, unset DISPLAY (so
> that Wayland is picked instead of X11) and set WAYLAND_DISPLAY (if
> needed):
>
> $ DISPLAY= WAYLAND_DISPLAY=wayland-0 ./wine ...
>
> Here is video showcasing a few Windows applications running with the
> Wayland driver on the Weston reference compositor:
>
> https://youtu.be/br2b8gUy5n8
>
> The Wayland protocol is by design more constrained compared to more
> traditional display systems like X11. These constraints add some
> special challenges in the integration of Wayland with Win32.
>
> Since Wayland's window model is not based on a single flat 2D
> co-ordinate space, as X11's was, the Wayland protocol doesn't allow
> applications to control their absolute position on the screen. For Win32
> transient windows (menus, tooltips, etc) the driver tries to work around
> the lack of absolute positioning by "anchoring" them to an owning
> Wayland surface and treating them as subsurfaces of that owner. Screen
> coordinates for such windows are transformed to local coordinates
> relative to the owning surface, allowing correct placement through
> relative subsurface movement, which is supported by Wayland. By using
> heuristics to select the proper owning surface, this approach has led to
> very good results.
>
> Absolute positioning of non-transient top level windows is not supported
> at this time, and will likely require a (possibly controversial) Wayland
> extension if it is to ever be pursued. The lack of absolute positioning
> also has an adverse effect on input handling, when parts of windows
> reside outside the visible windows display space, but are still full
> accessible in the Wayland compositor display space (and thus the user).
> Input events to such areas don't reach their intended coordinates (are
> clamped to Windows display bounds) leaving the user mystified about why
> they are unable to interact with a perfectly visible area in their
> Wayland compositor. The current partial workaround is to force all
> windows at (0,0) windows display coordinates, to maximize the area which
> can be interacted with. With this workaround, and as long as windows
> remain smaller than the display size, input works without issues.
>
> Here what's supported at the moment (modulo bugs):
>
> * GDI apps, including layered/translucent windows
> * OpenGL apps
> * Window resizing
> * Maximized and fullscreen window states
> * Mouse and keyboard (only QWERTY) input
> * Mouse cursors
> * Menus, tooltips, etc
> * Single display
>
> What needs more work (or is completely missing):
>
> * Minimize
> * Better z-order and activation handling
> * Keyboard layout support
> * Grabs
> * GTK menu mouse handling bug (cannot click to select items)
> * Multiple displays
> * Vulkan. Note that that there is another effort at
> https://github.com/varmd/wine-wayland/ focusing solely on vulkan.
> My hope is that we will be able to share efforts going forward.
>
> Programs I have tried and which are working well (again modulo bugs):
>
> * Native Wine/Win32 apps (notepad, regedit etc)
> * Supertuxkart
> * 010Editor
> * Firefox
> * Stellarium
> * Battle For Wesnoth
> * GIMP (except clicking items in GTK menus as noted above)
> * Unigine Valley
>
> My first question to the Wine community is how complete the driver
> should be before being considered for inclusion. Is the current Wayland
> driver state enough? If there is interest, I was hoping to get the
> driver in earlier rather than later, in an experimental capacity, in
> order to provide a single, official point of development for people
> wanting to contribute.
>
> My second question is about the best way to move forward with
> upstreaming. The code is currently split between just a few commits,
> mostly as a result of the experimental nature of this effort, and also
> because I used existing code from winex11 and wineandroid as my starting
> point. I would like to split this into smaller commits to make it more
> review-friendly for the mailing list. I was thinking of splitting by
> user32 function (and internal dependencies), but since this is going to
> be an artificial split, I am open to other ideas to make reviewers'
> lives easier.
>
> Looking forward to your feedback and questions!
>
> Thanks,
> Alexandros
>
>
Dec. 16, 2020
[PATCH vkd3d v3 4/4] vkd3d-shader: Implement #elif.
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
Makefile.am | 1 -
libs/vkd3d-shader/preproc.l | 3 +++
libs/vkd3d-shader/preproc.y | 23 +++++++++++++++++++++++
3 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index bf1d7bfa..514f0506 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -243,7 +243,6 @@ XFAIL_TESTS = \
tests/hlsl-vector-indexing.shader_test \
tests/hlsl-vector-indexing-uniform.shader_test \
tests/math.shader_test \
- tests/preproc-if.shader_test \
tests/preproc-ifdef.shader_test \
tests/preproc-if-expr.shader_test \
tests/preproc-invalid.shader_test \
diff --git a/libs/vkd3d-shader/preproc.l b/libs/vkd3d-shader/preproc.l
index 33860d39..47ad1f13 100644
--- a/libs/vkd3d-shader/preproc.l
+++ b/libs/vkd3d-shader/preproc.l
@@ -100,6 +100,8 @@ IDENTIFIER [A-Za-z_][A-Za-z0-9_]*
for (p = yytext + 1; strchr(" \t", *p); ++p)
;
+ if (!strcmp(p, "elif"))
+ return T_ELIF;
if (!strcmp(p, "else"))
return T_ELSE;
if (!strcmp(p, "endif"))
@@ -189,6 +191,7 @@ int yylex(YYSTYPE *lval, YYLTYPE *lloc, yyscan_t scanner)
{
switch (token)
{
+ case T_ELIF:
case T_ELSE:
case T_ENDIF:
case T_IF:
diff --git a/libs/vkd3d-shader/preproc.y b/libs/vkd3d-shader/preproc.y
index 465a33d2..331dcb18 100644
--- a/libs/vkd3d-shader/preproc.y
+++ b/libs/vkd3d-shader/preproc.y
@@ -139,6 +139,7 @@ static uint32_t preproc_parse_integer(const char *s)
%token T_NEWLINE
+%token T_ELIF "#elif"
%token T_ELSE "#else"
%token T_ENDIF "#endif"
%token T_IF "#if"
@@ -160,6 +161,28 @@ directive
if (!preproc_push_if(ctx, !!$2))
YYABORT;
}
+ | T_ELIF expr T_NEWLINE
+ {
+ if (ctx->if_count)
+ {
+ struct preproc_if_state *state = &ctx->if_stack[ctx->if_count - 1];
+
+ if (state->seen_else)
+ {
+ preproc_warning(ctx, &@$, VKD3D_SHADER_WARNING_PP_INVALID_DIRECTIVE, "Ignoring #elif after #else.");
+ }
+ else
+ {
+ state->current_true = $2 && !state->seen_true && preproc_was_writing(ctx);
+ state->seen_true = $2 || state->seen_true;
+ }
+ }
+ else
+ {
+ preproc_warning(ctx, &@$, VKD3D_SHADER_WARNING_PP_INVALID_DIRECTIVE,
+ "Ignoring #elif without prior #if.");
+ }
+ }
| T_ELSE T_NEWLINE
{
if (ctx->if_count)
--
2.29.2
Dec. 15, 2020
[PATCH vkd3d v3 3/4] vkd3d-shader: Implement #else.
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
libs/vkd3d-shader/preproc.h | 4 ++++
libs/vkd3d-shader/preproc.l | 3 +++
libs/vkd3d-shader/preproc.y | 25 +++++++++++++++++++++++++
3 files changed, 32 insertions(+)
diff --git a/libs/vkd3d-shader/preproc.h b/libs/vkd3d-shader/preproc.h
index 0f494fcd..effcd995 100644
--- a/libs/vkd3d-shader/preproc.h
+++ b/libs/vkd3d-shader/preproc.h
@@ -27,6 +27,10 @@ struct preproc_if_state
{
/* Are we currently in a "true" block? */
bool current_true;
+ /* Have we seen a "true" block in this #if..#endif yet? */
+ bool seen_true;
+ /* Have we seen an #else yet? */
+ bool seen_else;
};
struct preproc_ctx
diff --git a/libs/vkd3d-shader/preproc.l b/libs/vkd3d-shader/preproc.l
index c60970cd..33860d39 100644
--- a/libs/vkd3d-shader/preproc.l
+++ b/libs/vkd3d-shader/preproc.l
@@ -100,6 +100,8 @@ IDENTIFIER [A-Za-z_][A-Za-z0-9_]*
for (p = yytext + 1; strchr(" \t", *p); ++p)
;
+ if (!strcmp(p, "else"))
+ return T_ELSE;
if (!strcmp(p, "endif"))
return T_ENDIF;
if (!strcmp(p, "if"))
@@ -187,6 +189,7 @@ int yylex(YYSTYPE *lval, YYLTYPE *lloc, yyscan_t scanner)
{
switch (token)
{
+ case T_ELSE:
case T_ENDIF:
case T_IF:
ctx->current_directive = token;
diff --git a/libs/vkd3d-shader/preproc.y b/libs/vkd3d-shader/preproc.y
index 024ff4c2..465a33d2 100644
--- a/libs/vkd3d-shader/preproc.y
+++ b/libs/vkd3d-shader/preproc.y
@@ -81,6 +81,8 @@ static bool preproc_push_if(struct preproc_ctx *ctx, bool condition)
return false;
state = &ctx->if_stack[ctx->if_count++];
state->current_true = condition && preproc_was_writing(ctx);
+ state->seen_true = condition;
+ state->seen_else = false;
return true;
}
@@ -137,6 +139,7 @@ static uint32_t preproc_parse_integer(const char *s)
%token T_NEWLINE
+%token T_ELSE "#else"
%token T_ENDIF "#endif"
%token T_IF "#if"
@@ -157,6 +160,28 @@ directive
if (!preproc_push_if(ctx, !!$2))
YYABORT;
}
+ | T_ELSE T_NEWLINE
+ {
+ if (ctx->if_count)
+ {
+ struct preproc_if_state *state = &ctx->if_stack[ctx->if_count - 1];
+
+ if (state->seen_else)
+ {
+ preproc_warning(ctx, &@$, VKD3D_SHADER_WARNING_PP_INVALID_DIRECTIVE, "Ignoring #else after #else.");
+ }
+ else
+ {
+ state->current_true = !state->seen_true && preproc_was_writing(ctx);
+ state->seen_else = true;
+ }
+ }
+ else
+ {
+ preproc_warning(ctx, &@$, VKD3D_SHADER_WARNING_PP_INVALID_DIRECTIVE,
+ "Ignoring #else without prior #if.");
+ }
+ }
| T_ENDIF T_NEWLINE
{
if (ctx->if_count)
--
2.29.2
Dec. 15, 2020
[PATCH vkd3d v3 2/4] vkd3d-shader: Implement basic support for #if and #endif.
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
include/private/vkd3d_memory.h | 11 +++
libs/vkd3d-shader/preproc.h | 17 ++++
libs/vkd3d-shader/preproc.l | 106 +++++++++++++++++++++--
libs/vkd3d-shader/preproc.y | 101 ++++++++++++++++++++-
libs/vkd3d-shader/vkd3d_shader_main.c | 24 +++++
libs/vkd3d-shader/vkd3d_shader_private.h | 6 ++
tests/hlsl_d3d12.c | 2 +-
7 files changed, 257 insertions(+), 10 deletions(-)
diff --git a/include/private/vkd3d_memory.h b/include/private/vkd3d_memory.h
index df93abf5..bd56d30a 100644
--- a/include/private/vkd3d_memory.h
+++ b/include/private/vkd3d_memory.h
@@ -22,6 +22,7 @@
#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>
+#include <string.h>
#include "vkd3d_debug.h"
@@ -54,6 +55,16 @@ static inline void vkd3d_free(void *ptr)
free(ptr);
}
+static inline char *vkd3d_strdup(const char *string)
+{
+ size_t len = strlen(string) + 1;
+ char *ptr;
+
+ if ((ptr = vkd3d_malloc(len)))
+ memcpy(ptr, string, len);
+ return ptr;
+}
+
bool vkd3d_array_reserve(void **elements, size_t *capacity,
size_t element_count, size_t element_size) DECLSPEC_HIDDEN;
diff --git a/libs/vkd3d-shader/preproc.h b/libs/vkd3d-shader/preproc.h
index bd9dfdd3..0f494fcd 100644
--- a/libs/vkd3d-shader/preproc.h
+++ b/libs/vkd3d-shader/preproc.h
@@ -23,6 +23,12 @@
#include "vkd3d_shader_private.h"
+struct preproc_if_state
+{
+ /* Are we currently in a "true" block? */
+ bool current_true;
+};
+
struct preproc_ctx
{
void *scanner;
@@ -31,7 +37,18 @@ struct preproc_ctx
struct vkd3d_string_buffer buffer;
struct vkd3d_shader_location location;
+ struct preproc_if_state *if_stack;
+ size_t if_count, if_stack_size;
+
+ int current_directive;
+
+ bool last_was_newline;
+ bool last_was_eof;
+
bool error;
};
+void preproc_warning(struct preproc_ctx *ctx, const struct vkd3d_shader_location *loc,
+ enum vkd3d_shader_error error, const char *format, ...) VKD3D_PRINTF_FUNC(4, 5) DECLSPEC_HIDDEN;
+
#endif
diff --git a/libs/vkd3d-shader/preproc.l b/libs/vkd3d-shader/preproc.l
index b406af09..c60970cd 100644
--- a/libs/vkd3d-shader/preproc.l
+++ b/libs/vkd3d-shader/preproc.l
@@ -50,6 +50,7 @@ static void update_location(struct preproc_ctx *ctx);
%s C_COMMENT
%s CXX_COMMENT
+NEWLINE \r?\n
WS [ \t]
IDENTIFIER [A-Za-z_][A-Za-z0-9_]*
@@ -57,10 +58,10 @@ IDENTIFIER [A-Za-z_][A-Za-z0-9_]*
<INITIAL>"//" {yy_push_state(CXX_COMMENT, yyscanner);}
<INITIAL>"/*" {yy_push_state(C_COMMENT, yyscanner);}
-<CXX_COMMENT>\\\r?\n {}
+<CXX_COMMENT>\\{NEWLINE} {}
<CXX_COMMENT>\n {
yy_pop_state(yyscanner);
- return T_TEXT;
+ return T_NEWLINE;
}
<C_COMMENT>"*/" {yy_pop_state(yyscanner);}
<C_COMMENT,CXX_COMMENT><<EOF>> {yy_pop_state(yyscanner);}
@@ -68,13 +69,15 @@ IDENTIFIER [A-Za-z_][A-Za-z0-9_]*
<INITIAL>{IDENTIFIER} {return T_TEXT;}
+ /* We have no use for floats, but shouldn't parse them as integers. */
+
<INITIAL>[0-9]*\.[0-9]+([eE][+-]?[0-9]+)?[hHfF]? {return T_TEXT;}
<INITIAL>[0-9]+\.([eE][+-]?[0-9]+)?[hHfF]? {return T_TEXT;}
<INITIAL>[0-9]+([eE][+-]?[0-9]+)?[hHfF] {return T_TEXT;}
<INITIAL>[0-9]+[eE][+-]?[0-9]+ {return T_TEXT;}
-<INITIAL>0[xX][0-9a-fA-f]+[ul]{0,2} {return T_TEXT;}
-<INITIAL>0[0-7]*[ul]{0,2} {return T_TEXT;}
-<INITIAL>[1-9][0-9]*[ul]{0,2} {return T_TEXT;}
+<INITIAL>0[xX][0-9a-fA-f]+[ul]{0,2} {return T_INTEGER;}
+<INITIAL>0[0-7]*[ul]{0,2} {return T_INTEGER;}
+<INITIAL>[1-9][0-9]*[ul]{0,2} {return T_INTEGER;}
<INITIAL>"&&" {return T_TEXT;}
<INITIAL>"||" {return T_TEXT;}
@@ -87,6 +90,29 @@ IDENTIFIER [A-Za-z_][A-Za-z0-9_]*
/* C strings (including escaped quotes). */
<INITIAL>\"([^"\\]|\\.)*\" {return T_TEXT;}
+<INITIAL>#{WS}*{IDENTIFIER} {
+ struct preproc_ctx *ctx = yyget_extra(yyscanner);
+ const char *p;
+
+ if (!ctx->last_was_newline)
+ return T_TEXT;
+
+ for (p = yytext + 1; strchr(" \t", *p); ++p)
+ ;
+
+ if (!strcmp(p, "endif"))
+ return T_ENDIF;
+ if (!strcmp(p, "if"))
+ return T_IF;
+
+ preproc_warning(ctx, yyget_lloc(yyscanner), VKD3D_SHADER_WARNING_PP_UNKNOWN_DIRECTIVE,
+ "Ignoring unknown directive \"%s\".", yytext);
+ return T_TEXT;
+ }
+
+<INITIAL>\\{NEWLINE} {}
+<INITIAL>{NEWLINE} {return T_NEWLINE;}
+
<INITIAL>{WS}+ {}
<INITIAL>. {return T_TEXT;}
@@ -113,6 +139,27 @@ static void update_location(struct preproc_ctx *ctx)
}
}
+static bool preproc_is_writing(struct preproc_ctx *ctx)
+{
+ if (!ctx->if_count)
+ return true;
+ return ctx->if_stack[ctx->if_count - 1].current_true;
+}
+
+static int return_token(int token, YYSTYPE *lval, const char *text)
+{
+ switch (token)
+ {
+ case T_INTEGER:
+ case T_TEXT:
+ if (!(lval->string = vkd3d_strdup(text)))
+ return 0;
+ break;
+ }
+
+ return token;
+}
+
int yylex(YYSTYPE *lval, YYLTYPE *lloc, yyscan_t scanner)
{
struct preproc_ctx *ctx = yyget_extra(scanner);
@@ -122,11 +169,44 @@ int yylex(YYSTYPE *lval, YYLTYPE *lloc, yyscan_t scanner)
const char *text;
int token;
- if (!(token = preproc_lexer_lex(lval, lloc, scanner)))
+ if (ctx->last_was_eof)
return 0;
- text = yyget_text(scanner);
- TRACE("Parsing token %d, line %d, string %s.\n", token, lloc->line, debugstr_a(text));
+ if (!(token = preproc_lexer_lex(lval, lloc, scanner)))
+ {
+ ctx->last_was_eof = true;
+ token = T_NEWLINE;
+ text = "\n";
+ }
+ else
+ {
+ text = yyget_text(scanner);
+ }
+
+ if (ctx->last_was_newline)
+ {
+ switch (token)
+ {
+ case T_ENDIF:
+ case T_IF:
+ ctx->current_directive = token;
+ break;
+
+ default:
+ ctx->current_directive = 0;
+ }
+ }
+
+ ctx->last_was_newline = (token == T_NEWLINE);
+
+ TRACE("Parsing token %d, line %d, in directive %d, string %s.\n",
+ token, lloc->line, ctx->current_directive, debugstr_a(text));
+
+ if (!ctx->current_directive && !preproc_is_writing(ctx))
+ continue;
+
+ if (ctx->current_directive)
+ return return_token(token, lval, text);
vkd3d_string_buffer_printf(&ctx->buffer, "%s ", text);
}
@@ -147,12 +227,22 @@ int preproc_lexer_parse(const struct vkd3d_shader_compile_info *compile_info,
yylex_init_extra(&ctx, &ctx.scanner);
top_buffer = yy_scan_bytes(compile_info->source.code, compile_info->source.size, ctx.scanner);
+ ctx.last_was_newline = true;
preproc_yyparse(ctx.scanner, &ctx);
yy_delete_buffer(top_buffer, ctx.scanner);
yylex_destroy(ctx.scanner);
+ if (ctx.if_count)
+ {
+ const struct vkd3d_shader_location loc = {.source_name = ctx.location.source_name};
+
+ preproc_warning(&ctx, &loc, VKD3D_SHADER_WARNING_PP_UNTERMINATED_IF, "Unterminated #if block.");
+ }
+
+ vkd3d_free(ctx.if_stack);
+
if (ctx.error)
{
WARN("Failed to preprocess.\n");
diff --git a/libs/vkd3d-shader/preproc.y b/libs/vkd3d-shader/preproc.y
index 16b84ea9..024ff4c2 100644
--- a/libs/vkd3d-shader/preproc.y
+++ b/libs/vkd3d-shader/preproc.y
@@ -51,11 +51,70 @@ static void preproc_error(struct preproc_ctx *ctx, const struct vkd3d_shader_loc
ctx->error = true;
}
+void preproc_warning(struct preproc_ctx *ctx, const struct vkd3d_shader_location *loc,
+ enum vkd3d_shader_error error, const char *format, ...)
+{
+ va_list args;
+
+ va_start(args, format);
+ vkd3d_shader_vwarning(ctx->message_context, loc, error, format, args);
+ va_end(args);
+}
+
static void yyerror(const YYLTYPE *loc, void *scanner, struct preproc_ctx *ctx, const char *string)
{
preproc_error(ctx, loc, VKD3D_SHADER_ERROR_PP_INVALID_SYNTAX, "%s", string);
}
+static bool preproc_was_writing(struct preproc_ctx *ctx)
+{
+ if (ctx->if_count < 2)
+ return true;
+ return ctx->if_stack[ctx->if_count - 2].current_true;
+}
+
+static bool preproc_push_if(struct preproc_ctx *ctx, bool condition)
+{
+ struct preproc_if_state *state;
+
+ if (!vkd3d_array_reserve((void **)&ctx->if_stack, &ctx->if_stack_size, ctx->if_count + 1, sizeof(*ctx->if_stack)))
+ return false;
+ state = &ctx->if_stack[ctx->if_count++];
+ state->current_true = condition && preproc_was_writing(ctx);
+ return true;
+}
+
+static int char_to_int(char c)
+{
+ if ('0' <= c && c <= '9')
+ return c - '0';
+ if ('A' <= c && c <= 'F')
+ return c - 'A' + 10;
+ if ('a' <= c && c <= 'f')
+ return c - 'a' + 10;
+ return -1;
+}
+
+static uint32_t preproc_parse_integer(const char *s)
+{
+ uint32_t base = 10, ret = 0;
+ int digit;
+
+ if (s[0] == '0')
+ {
+ base = 8;
+ if (s[1] == 'x' || s[1] == 'X')
+ {
+ base = 16;
+ s += 2;
+ }
+ }
+
+ while ((digit = char_to_int(*s++)) >= 0)
+ ret = ret * base + (uint32_t)digit;
+ return ret;
+}
+
}
%define api.prefix {preproc_yy}
@@ -67,9 +126,49 @@ static void yyerror(const YYLTYPE *loc, void *scanner, struct preproc_ctx *ctx,
%parse-param {void *scanner}
%parse-param {struct preproc_ctx *ctx}
-%token T_TEXT
+%union
+{
+ char *string;
+ uint32_t integer;
+}
+
+%token <string> T_INTEGER
+%token <string> T_TEXT
+
+%token T_NEWLINE
+
+%token T_ENDIF "#endif"
+%token T_IF "#if"
+
+%type <integer> expr
%%
shader_text
: %empty
+ | shader_text directive
+ {
+ vkd3d_string_buffer_printf(&ctx->buffer, "\n");
+ }
+
+directive
+ : T_IF expr T_NEWLINE
+ {
+ if (!preproc_push_if(ctx, !!$2))
+ YYABORT;
+ }
+ | T_ENDIF T_NEWLINE
+ {
+ if (ctx->if_count)
+ --ctx->if_count;
+ else
+ preproc_warning(ctx, &@$, VKD3D_SHADER_WARNING_PP_INVALID_DIRECTIVE,
+ "Ignoring #endif without prior #if.");
+ }
+
+expr
+ : T_INTEGER
+ {
+ $$ = preproc_parse_integer($1);
+ vkd3d_free($1);
+ }
diff --git a/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d-shader/vkd3d_shader_main.c
index 173ff170..df3b1a57 100644
--- a/libs/vkd3d-shader/vkd3d_shader_main.c
+++ b/libs/vkd3d-shader/vkd3d_shader_main.c
@@ -144,6 +144,30 @@ bool vkd3d_shader_message_context_copy_messages(struct vkd3d_shader_message_cont
return true;
}
+void vkd3d_shader_vwarning(struct vkd3d_shader_message_context *context, const struct vkd3d_shader_location *location,
+ enum vkd3d_shader_error error, const char *format, va_list args)
+{
+ if (context->log_level < VKD3D_SHADER_LOG_WARNING)
+ return;
+
+ if (location)
+ {
+ const char *source_name = location->source_name ? location->source_name : "<anonymous>";
+
+ if (location->line)
+ vkd3d_string_buffer_printf(&context->messages, "%s:%u:%u: W%04u: ",
+ source_name, location->line, location->column, error);
+ else
+ vkd3d_string_buffer_printf(&context->messages, "%s: W%04u: ", source_name, error);
+ }
+ else
+ {
+ vkd3d_string_buffer_printf(&context->messages, "W%04u: ", error);
+ }
+ vkd3d_string_buffer_vprintf(&context->messages, format, args);
+ vkd3d_string_buffer_printf(&context->messages, "\n");
+}
+
void vkd3d_shader_verror(struct vkd3d_shader_message_context *context, const struct vkd3d_shader_location *location,
enum vkd3d_shader_error error, const char *format, va_list args)
{
diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h
index 882a8060..b89d20e2 100644
--- a/libs/vkd3d-shader/vkd3d_shader_private.h
+++ b/libs/vkd3d-shader/vkd3d_shader_private.h
@@ -81,6 +81,10 @@ enum vkd3d_shader_error
VKD3D_SHADER_ERROR_RS_MIXED_DESCRIPTOR_RANGE_TYPES = 3004,
VKD3D_SHADER_ERROR_PP_INVALID_SYNTAX = 4000,
+
+ VKD3D_SHADER_WARNING_PP_INVALID_DIRECTIVE = 4301,
+ VKD3D_SHADER_WARNING_PP_UNKNOWN_DIRECTIVE = 4303,
+ VKD3D_SHADER_WARNING_PP_UNTERMINATED_IF = 4305,
};
enum VKD3D_SHADER_INSTRUCTION_HANDLER
@@ -871,6 +875,8 @@ void vkd3d_shader_error(struct vkd3d_shader_message_context *context, const stru
enum vkd3d_shader_error error, const char *format, ...) VKD3D_PRINTF_FUNC(4, 5) DECLSPEC_HIDDEN;
void vkd3d_shader_verror(struct vkd3d_shader_message_context *context, const struct vkd3d_shader_location *location,
enum vkd3d_shader_error error, const char *format, va_list args) DECLSPEC_HIDDEN;
+void vkd3d_shader_vwarning(struct vkd3d_shader_message_context *context, const struct vkd3d_shader_location *location,
+ enum vkd3d_shader_error error, const char *format, va_list args) DECLSPEC_HIDDEN;
int shader_extract_from_dxbc(const void *dxbc, size_t dxbc_length,
struct vkd3d_shader_message_context *message_context, const char *source_name,
diff --git a/tests/hlsl_d3d12.c b/tests/hlsl_d3d12.c
index 61324fa9..77a7ea1a 100644
--- a/tests/hlsl_d3d12.c
+++ b/tests/hlsl_d3d12.c
@@ -414,7 +414,7 @@ static void test_preprocess(void)
hr = D3DPreprocess(test_include_top, strlen(test_include_top), NULL, NULL, &test_include_fail, &blob, &errors);
todo ok(hr == E_FAIL, "Got hr %#x.\n", hr);
todo ok(blob == (ID3D10Blob *)0xdeadbeef, "Expected no compiled shader blob.\n");
- todo ok(!!errors, "Expected non-NULL error blob.\n");
+ ok(!!errors, "Expected non-NULL error blob.\n");
if (errors)
{
if (vkd3d_test_state.debug_level)
--
2.29.2
Dec. 15, 2020
[PATCH vkd3d v3 1/4] vkd3d-shader: Handle preprocessor parsing errors.
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
v3: Use vkd3d_shader_location. In fact, use it also in struct preproc_ctx.
Although there are conceptual reasons not to, for now it's more confusing when
left distinct.
libs/vkd3d-shader/preproc.h | 4 +++
libs/vkd3d-shader/preproc.l | 38 +++++++++++++++++++++++-
libs/vkd3d-shader/preproc.y | 17 ++++++++++-
libs/vkd3d-shader/vkd3d_shader_private.h | 2 ++
4 files changed, 59 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d-shader/preproc.h b/libs/vkd3d-shader/preproc.h
index cbd93229..bd9dfdd3 100644
--- a/libs/vkd3d-shader/preproc.h
+++ b/libs/vkd3d-shader/preproc.h
@@ -27,7 +27,11 @@ struct preproc_ctx
{
void *scanner;
+ struct vkd3d_shader_message_context *message_context;
struct vkd3d_string_buffer buffer;
+ struct vkd3d_shader_location location;
+
+ bool error;
};
#endif
diff --git a/libs/vkd3d-shader/preproc.l b/libs/vkd3d-shader/preproc.l
index 4d809b8f..b406af09 100644
--- a/libs/vkd3d-shader/preproc.l
+++ b/libs/vkd3d-shader/preproc.l
@@ -27,6 +27,10 @@
#define YY_DECL static int preproc_lexer_lex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner)
+static void update_location(struct preproc_ctx *ctx);
+
+#define YY_USER_ACTION update_location(yyget_extra(yyscanner));
+
%}
%option 8bit
@@ -88,6 +92,27 @@ IDENTIFIER [A-Za-z_][A-Za-z0-9_]*
%%
+static void update_location(struct preproc_ctx *ctx)
+{
+ unsigned int i, leng = yyget_leng(ctx->scanner);
+ const char *text = yyget_text(ctx->scanner);
+
+ /* We want to do this here, rather than before calling yylex(), because
+ * some tokens are skipped by the lexer. */
+
+ *yyget_lloc(ctx->scanner) = ctx->location;
+
+ for (i = 0; i < leng; ++i)
+ {
+ ++ctx->location.column;
+ if (text[i] == '\n')
+ {
+ ctx->location.column = 1;
+ ++ctx->location.line;
+ }
+ }
+}
+
int yylex(YYSTYPE *lval, YYLTYPE *lloc, yyscan_t scanner)
{
struct preproc_ctx *ctx = yyget_extra(scanner);
@@ -101,7 +126,7 @@ int yylex(YYSTYPE *lval, YYLTYPE *lloc, yyscan_t scanner)
return 0;
text = yyget_text(scanner);
- TRACE("Parsing token %d, string %s.\n", token, debugstr_a(text));
+ TRACE("Parsing token %d, line %d, string %s.\n", token, lloc->line, debugstr_a(text));
vkd3d_string_buffer_printf(&ctx->buffer, "%s ", text);
}
@@ -115,6 +140,10 @@ int preproc_lexer_parse(const struct vkd3d_shader_compile_info *compile_info,
void *output_code;
vkd3d_string_buffer_init(&ctx.buffer);
+ ctx.message_context = message_context;
+ ctx.location.source_name = compile_info->source_name;
+ ctx.location.line = 1;
+ ctx.location.column = 1;
yylex_init_extra(&ctx, &ctx.scanner);
top_buffer = yy_scan_bytes(compile_info->source.code, compile_info->source.size, ctx.scanner);
@@ -124,6 +153,13 @@ int preproc_lexer_parse(const struct vkd3d_shader_compile_info *compile_info,
yy_delete_buffer(top_buffer, ctx.scanner);
yylex_destroy(ctx.scanner);
+ if (ctx.error)
+ {
+ WARN("Failed to preprocess.\n");
+ vkd3d_string_buffer_cleanup(&ctx.buffer);
+ return VKD3D_ERROR_INVALID_SHADER;
+ }
+
if (!(output_code = vkd3d_malloc(ctx.buffer.content_size)))
{
vkd3d_string_buffer_cleanup(&ctx.buffer);
diff --git a/libs/vkd3d-shader/preproc.y b/libs/vkd3d-shader/preproc.y
index 92448f24..16b84ea9 100644
--- a/libs/vkd3d-shader/preproc.y
+++ b/libs/vkd3d-shader/preproc.y
@@ -24,6 +24,8 @@
#include "vkd3d_shader_private.h"
#include "preproc.h"
+#define PREPROC_YYLTYPE struct vkd3d_shader_location
+
}
%code provides
@@ -36,9 +38,22 @@ int preproc_yylex(PREPROC_YYSTYPE *yylval_param, PREPROC_YYLTYPE *yylloc_param,
%code
{
+#define YYLLOC_DEFAULT(cur, rhs, n) (cur) = YYRHSLOC(rhs, !!n)
+
+static void preproc_error(struct preproc_ctx *ctx, const struct vkd3d_shader_location *loc,
+ enum vkd3d_shader_error error, const char *format, ...)
+{
+ va_list args;
+
+ va_start(args, format);
+ vkd3d_shader_verror(ctx->message_context, loc, error, format, args);
+ va_end(args);
+ ctx->error = true;
+}
+
static void yyerror(const YYLTYPE *loc, void *scanner, struct preproc_ctx *ctx, const char *string)
{
- FIXME("Error reporting is not implemented.\n");
+ preproc_error(ctx, loc, VKD3D_SHADER_ERROR_PP_INVALID_SYNTAX, "%s", string);
}
}
diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h
index e974b928..882a8060 100644
--- a/libs/vkd3d-shader/vkd3d_shader_private.h
+++ b/libs/vkd3d-shader/vkd3d_shader_private.h
@@ -79,6 +79,8 @@ enum vkd3d_shader_error
VKD3D_SHADER_ERROR_RS_INVALID_ROOT_PARAMETER_TYPE = 3002,
VKD3D_SHADER_ERROR_RS_INVALID_DESCRIPTOR_RANGE_TYPE = 3003,
VKD3D_SHADER_ERROR_RS_MIXED_DESCRIPTOR_RANGE_TYPES = 3004,
+
+ VKD3D_SHADER_ERROR_PP_INVALID_SYNTAX = 4000,
};
enum VKD3D_SHADER_INSTRUCTION_HANDLER
--
2.29.2
Dec. 15, 2020
Re: [PATCH vkd3d v2 2/2] vkd3d-shader: Move location tracking out of the vkd3d_shader_message_context structure.
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
Dec. 15, 2020
[PATCH] wine.inf: Store Dynamic DST data for Asia/Tehran as "relative" dates.
by Henri Verbeet
I.e., the "Nth <weekday> of <month>" form. This form is much less convenient
for timezones where the DST change happens on specific dates, but some
applications distribute old versions of Mono that don't bother checking the
"wYear" fields of the SYSTEMTIME fields in the TIME_ZONE_INFORMATION structure
returned by GetTimeZoneInformation(), and instead always convert the presumed
"relative" dates to "absolute" dates. Unsurprisingly, the resulting dates are
invalid, and these applications then end up throwing
"System.NotSupportedException: Can't get timezone name." when run in such a
timezone, typically early during startup.
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
This happens with at least "INSIDE" and "Life is Strange: Before the Storm",
but the issue is much more widespread than that, typically affecting any
application that does anything with times or dates and uses an affected
version of Mono.
loader/wine.inf.in | 90 +++++++++++++++++++++++-----------------------
1 file changed, 45 insertions(+), 45 deletions(-)
diff --git a/loader/wine.inf.in b/loader/wine.inf.in
index 0cbbcb710f6..d5dd2d5b66b 100644
--- a/loader/wine.inf.in
+++ b/loader/wine.inf.in
@@ -3240,53 +3240,53 @@ HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time,"MUI_Dlt",,"@tzres.dll,-55
HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time,"MUI_Std",,"@tzres.dll,-5568"
HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time,"Std",,"Iran Standard Time"
HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time,"TZI",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,00,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,05,00,04,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"1991",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,c7,07,09,00,00,00,16,00,00,00,00,00,00,00,00,00,c7,07,05,00,05,00,03,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"1992",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,c8,07,09,00,02,00,16,00,00,00,00,00,00,00,00,00,c8,07,03,00,00,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"1993",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,c9,07,09,00,03,00,16,00,00,00,00,00,00,00,00,00,c9,07,03,00,01,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"1994",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,ca,07,09,00,04,00,16,00,00,00,00,00,00,00,00,00,ca,07,03,00,02,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"1995",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,cb,07,09,00,05,00,16,00,00,00,00,00,00,00,00,00,cb,07,03,00,03,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"1996",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,cc,07,09,00,06,00,15,00,00,00,00,00,00,00,00,00,cc,07,03,00,04,00,15,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"1997",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,cd,07,09,00,01,00,16,00,00,00,00,00,00,00,00,00,cd,07,03,00,06,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"1998",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,ce,07,09,00,02,00,16,00,00,00,00,00,00,00,00,00,ce,07,03,00,00,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"1999",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,cf,07,09,00,03,00,16,00,00,00,00,00,00,00,00,00,cf,07,03,00,01,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2000",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,d0,07,09,00,04,00,15,00,00,00,00,00,00,00,00,00,d0,07,03,00,02,00,15,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2001",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,d1,07,09,00,06,00,16,00,00,00,00,00,00,00,00,00,d1,07,03,00,04,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2002",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,d2,07,09,00,00,00,16,00,00,00,00,00,00,00,00,00,d2,07,03,00,05,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2003",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,d3,07,09,00,01,00,16,00,00,00,00,00,00,00,00,00,d3,07,03,00,06,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2004",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,d4,07,09,00,02,00,15,00,00,00,00,00,00,00,00,00,d4,07,03,00,00,00,15,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2005",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,d5,07,09,00,04,00,16,00,00,00,00,00,00,00,00,00,d5,07,03,00,02,00,16,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"1991",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,00,00,04,00,00,00,00,00,00,00,00,00,00,00,05,00,05,00,01,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"1992",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,02,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"1993",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,03,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,01,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"1994",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,04,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,02,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"1995",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,05,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,03,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"1996",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,06,00,03,00,00,00,00,00,00,00,00,00,00,00,03,00,04,00,03,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"1997",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,01,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,06,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"1998",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,02,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"1999",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,03,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,01,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2000",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,04,00,03,00,00,00,00,00,00,00,00,00,00,00,03,00,02,00,03,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2001",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,06,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,04,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2002",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,00,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,05,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2003",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,01,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,06,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2004",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,02,00,03,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,03,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2005",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,04,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,02,00,04,00,00,00,00,00,00,00,00,00
HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2006",1,2e,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2007",1,2e,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2008",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,d8,07,09,00,00,00,15,00,00,00,00,00,00,00,00,00,d8,07,03,00,05,00,15,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2009",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,d9,07,09,00,02,00,16,00,00,00,00,00,00,00,00,00,d9,07,03,00,00,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2010",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,da,07,09,00,03,00,16,00,00,00,00,00,00,00,00,00,da,07,03,00,01,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2011",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,db,07,09,00,04,00,16,00,00,00,00,00,00,00,00,00,db,07,03,00,02,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2012",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,dc,07,09,00,05,00,15,00,00,00,00,00,00,00,00,00,dc,07,03,00,03,00,15,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2013",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,dd,07,09,00,00,00,16,00,00,00,00,00,00,00,00,00,dd,07,03,00,05,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2014",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,de,07,09,00,01,00,16,00,00,00,00,00,00,00,00,00,de,07,03,00,06,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2015",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,df,07,09,00,02,00,16,00,00,00,00,00,00,00,00,00,df,07,03,00,00,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2016",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,e0,07,09,00,03,00,15,00,00,00,00,00,00,00,00,00,e0,07,03,00,01,00,15,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2017",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,e1,07,09,00,05,00,16,00,00,00,00,00,00,00,00,00,e1,07,03,00,03,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2018",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,e2,07,09,00,06,00,16,00,00,00,00,00,00,00,00,00,e2,07,03,00,04,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2019",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,e3,07,09,00,00,00,16,00,00,00,00,00,00,00,00,00,e3,07,03,00,05,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2020",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,e4,07,09,00,01,00,15,00,00,00,00,00,00,00,00,00,e4,07,03,00,06,00,15,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2021",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,e5,07,09,00,03,00,16,00,00,00,00,00,00,00,00,00,e5,07,03,00,01,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2022",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,e6,07,09,00,04,00,16,00,00,00,00,00,00,00,00,00,e6,07,03,00,02,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2023",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,e7,07,09,00,05,00,16,00,00,00,00,00,00,00,00,00,e7,07,03,00,03,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2024",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,e8,07,09,00,06,00,15,00,00,00,00,00,00,00,00,00,e8,07,03,00,04,00,15,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2025",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,e9,07,09,00,01,00,16,00,00,00,00,00,00,00,00,00,e9,07,03,00,06,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2026",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,ea,07,09,00,02,00,16,00,00,00,00,00,00,00,00,00,ea,07,03,00,00,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2027",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,eb,07,09,00,03,00,16,00,00,00,00,00,00,00,00,00,eb,07,03,00,01,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2028",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,ec,07,09,00,04,00,15,00,00,00,00,00,00,00,00,00,ec,07,03,00,02,00,15,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2029",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,ed,07,09,00,05,00,15,00,00,00,00,00,00,00,00,00,ed,07,03,00,03,00,15,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2030",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,ee,07,09,00,00,00,16,00,00,00,00,00,00,00,00,00,ee,07,03,00,05,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2031",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,ef,07,09,00,01,00,16,00,00,00,00,00,00,00,00,00,ef,07,03,00,06,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2032",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,f0,07,09,00,02,00,15,00,00,00,00,00,00,00,00,00,f0,07,03,00,00,00,15,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2033",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,f1,07,09,00,03,00,15,00,00,00,00,00,00,00,00,00,f1,07,03,00,01,00,15,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2034",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,f2,07,09,00,05,00,16,00,00,00,00,00,00,00,00,00,f2,07,03,00,03,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2035",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,f3,07,09,00,06,00,16,00,00,00,00,00,00,00,00,00,f3,07,03,00,04,00,16,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2036",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,f4,07,09,00,00,00,15,00,00,00,00,00,00,00,00,00,f4,07,03,00,05,00,15,00,00,00,00,00,00,00,00,00
-HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2037",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,f5,07,09,00,01,00,15,00,00,00,00,00,00,00,00,00,f5,07,03,00,06,00,15,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2008",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,00,00,03,00,00,00,00,00,00,00,00,00,00,00,03,00,05,00,03,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2009",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,02,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2010",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,03,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,01,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2011",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,04,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,02,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2012",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,05,00,03,00,00,00,00,00,00,00,00,00,00,00,03,00,03,00,03,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2013",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,00,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,05,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2014",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,01,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,06,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2015",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,02,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2016",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,03,00,03,00,00,00,00,00,00,00,00,00,00,00,03,00,01,00,03,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2017",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,05,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,03,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2018",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,06,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,04,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2019",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,00,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,05,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2020",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,01,00,03,00,00,00,00,00,00,00,00,00,00,00,03,00,06,00,03,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2021",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,03,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,01,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2022",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,04,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,02,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2023",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,05,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,03,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2024",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,06,00,03,00,00,00,00,00,00,00,00,00,00,00,03,00,04,00,03,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2025",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,01,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,06,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2026",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,02,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2027",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,03,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,01,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2028",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,04,00,03,00,00,00,00,00,00,00,00,00,00,00,03,00,02,00,03,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2029",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,05,00,03,00,00,00,00,00,00,00,00,00,00,00,03,00,03,00,03,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2030",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,00,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,05,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2031",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,01,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,06,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2032",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,02,00,03,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,03,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2033",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,03,00,03,00,00,00,00,00,00,00,00,00,00,00,03,00,01,00,03,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2034",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,05,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,03,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2035",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,06,00,04,00,00,00,00,00,00,00,00,00,00,00,03,00,04,00,04,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2036",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,00,00,03,00,00,00,00,00,00,00,00,00,00,00,03,00,05,00,03,00,00,00,00,00,00,00,00,00
+HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"2037",1,2e,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,09,00,01,00,03,00,00,00,00,00,00,00,00,00,00,00,03,00,06,00,03,00,00,00,00,00,00,00,00,00
HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"FirstEntry",0x10001,1991
HKLM,%CurrentVersionNT%\Time Zones\Iran Standard Time\Dynamic DST,"LastEntry",0x10001,2037
HKLM,%CurrentVersionNT%\Time Zones\Israel Standard Time,"Display",,"Asia/Jerusalem"
--
2.20.1
Dec. 15, 2020
[RFC] Announcing Wayland driver development
by Alexandros Frantzis
Hi all,
For some time now I have been working on a Wayland driver for Wine, and
it has now reached a good enough state to present it to the wider
community. This driver allows users to run Windows GDI and OpenGL
applications directly on Wayland compositors without an intermediate
layer to translate from X11 to Wayland. This leads to a leaner and more
efficient stack.
The code currently resides at:
https://gitlab.collabora.com/alf/wine/-/commits/wayland
Get it with:
$ git clone -b wayland https://gitlab.collabora.com/alf/wine/
Configure with (you need the wayland-client and wayland-egl packages):
$ ./configure --with-wayland
To run, ensure there is a Wayland compositor running, unset DISPLAY (so
that Wayland is picked instead of X11) and set WAYLAND_DISPLAY (if
needed):
$ DISPLAY= WAYLAND_DISPLAY=wayland-0 ./wine ...
Here is video showcasing a few Windows applications running with the
Wayland driver on the Weston reference compositor:
https://youtu.be/br2b8gUy5n8
The Wayland protocol is by design more constrained compared to more
traditional display systems like X11. These constraints add some
special challenges in the integration of Wayland with Win32.
Since Wayland's window model is not based on a single flat 2D
co-ordinate space, as X11's was, the Wayland protocol doesn't allow
applications to control their absolute position on the screen. For Win32
transient windows (menus, tooltips, etc) the driver tries to work around
the lack of absolute positioning by "anchoring" them to an owning
Wayland surface and treating them as subsurfaces of that owner. Screen
coordinates for such windows are transformed to local coordinates
relative to the owning surface, allowing correct placement through
relative subsurface movement, which is supported by Wayland. By using
heuristics to select the proper owning surface, this approach has led to
very good results.
Absolute positioning of non-transient top level windows is not supported
at this time, and will likely require a (possibly controversial) Wayland
extension if it is to ever be pursued. The lack of absolute positioning
also has an adverse effect on input handling, when parts of windows
reside outside the visible windows display space, but are still full
accessible in the Wayland compositor display space (and thus the user).
Input events to such areas don't reach their intended coordinates (are
clamped to Windows display bounds) leaving the user mystified about why
they are unable to interact with a perfectly visible area in their
Wayland compositor. The current partial workaround is to force all
windows at (0,0) windows display coordinates, to maximize the area which
can be interacted with. With this workaround, and as long as windows
remain smaller than the display size, input works without issues.
Here what's supported at the moment (modulo bugs):
* GDI apps, including layered/translucent windows
* OpenGL apps
* Window resizing
* Maximized and fullscreen window states
* Mouse and keyboard (only QWERTY) input
* Mouse cursors
* Menus, tooltips, etc
* Single display
What needs more work (or is completely missing):
* Minimize
* Better z-order and activation handling
* Keyboard layout support
* Grabs
* GTK menu mouse handling bug (cannot click to select items)
* Multiple displays
* Vulkan. Note that that there is another effort at
https://github.com/varmd/wine-wayland/ focusing solely on vulkan.
My hope is that we will be able to share efforts going forward.
Programs I have tried and which are working well (again modulo bugs):
* Native Wine/Win32 apps (notepad, regedit etc)
* Supertuxkart
* 010Editor
* Firefox
* Stellarium
* Battle For Wesnoth
* GIMP (except clicking items in GTK menus as noted above)
* Unigine Valley
My first question to the Wine community is how complete the driver
should be before being considered for inclusion. Is the current Wayland
driver state enough? If there is interest, I was hoping to get the
driver in earlier rather than later, in an experimental capacity, in
order to provide a single, official point of development for people
wanting to contribute.
My second question is about the best way to move forward with
upstreaming. The code is currently split between just a few commits,
mostly as a result of the experimental nature of this effort, and also
because I used existing code from winex11 and wineandroid as my starting
point. I would like to split this into smaller commits to make it more
review-friendly for the mailing list. I was thinking of splitting by
user32 function (and internal dependencies), but since this is going to
be an artificial split, I am open to other ideas to make reviewers'
lives easier.
Looking forward to your feedback and questions!
Thanks,
Alexandros
Dec. 15, 2020
[PATCH vkd3d v2 2/2] vkd3d-shader: Move location tracking out of the vkd3d_shader_message_context structure.
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
v2: Retain source names for shader_extract_from_dxbc().
I still think it's better and easier to get rid of the pointless "<anonymous>"
for signature parsing and compilation, but that functional change can be
reverted as well...
libs/vkd3d-shader/dxbc.c | 63 +++++++++++++-----------
libs/vkd3d-shader/spirv.c | 6 ++-
libs/vkd3d-shader/vkd3d_shader_main.c | 61 ++++++++++++-----------
libs/vkd3d-shader/vkd3d_shader_private.h | 19 ++++---
4 files changed, 83 insertions(+), 66 deletions(-)
diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c
index 9977d1a3..278912d8 100644
--- a/libs/vkd3d-shader/dxbc.c
+++ b/libs/vkd3d-shader/dxbc.c
@@ -2021,9 +2021,11 @@ static const char *shader_get_string(const char *data, size_t data_size, DWORD o
return data + offset;
}
-static int parse_dxbc(const char *data, size_t data_size, struct vkd3d_shader_message_context *message_context,
+static int parse_dxbc(const char *data, size_t data_size,
+ struct vkd3d_shader_message_context *message_context, const char *source_name,
int (*chunk_handler)(const char *data, DWORD data_size, DWORD tag, void *ctx), void *ctx)
{
+ const struct vkd3d_shader_location location = {.source_name = source_name};
uint32_t checksum[4], calculated_checksum[4];
const char *ptr = data;
int ret = VKD3D_OK;
@@ -2036,7 +2038,7 @@ static int parse_dxbc(const char *data, size_t data_size, struct vkd3d_shader_me
if (data_size < VKD3D_DXBC_HEADER_SIZE)
{
WARN("Invalid data size %zu.\n", data_size);
- vkd3d_shader_error(message_context, VKD3D_SHADER_ERROR_DXBC_INVALID_SIZE,
+ vkd3d_shader_error(message_context, &location, VKD3D_SHADER_ERROR_DXBC_INVALID_SIZE,
"DXBC size %zu is smaller than the DXBC header size.", data_size);
return VKD3D_ERROR_INVALID_ARGUMENT;
}
@@ -2047,7 +2049,7 @@ static int parse_dxbc(const char *data, size_t data_size, struct vkd3d_shader_me
if (tag != TAG_DXBC)
{
WARN("Wrong tag.\n");
- vkd3d_shader_error(message_context, VKD3D_SHADER_ERROR_DXBC_INVALID_MAGIC, "Invalid DXBC magic.");
+ vkd3d_shader_error(message_context, &location, VKD3D_SHADER_ERROR_DXBC_INVALID_MAGIC, "Invalid DXBC magic.");
return VKD3D_ERROR_INVALID_ARGUMENT;
}
@@ -2063,7 +2065,8 @@ static int parse_dxbc(const char *data, size_t data_size, struct vkd3d_shader_me
checksum[0], checksum[1], checksum[2], checksum[3],
calculated_checksum[0], calculated_checksum[1],
calculated_checksum[2], calculated_checksum[3]);
- vkd3d_shader_error(message_context, VKD3D_SHADER_ERROR_DXBC_INVALID_CHECKSUM, "Invalid DXBC checksum.");
+ vkd3d_shader_error(message_context, &location, VKD3D_SHADER_ERROR_DXBC_INVALID_CHECKSUM,
+ "Invalid DXBC checksum.");
return VKD3D_ERROR_INVALID_ARGUMENT;
}
@@ -2072,7 +2075,7 @@ static int parse_dxbc(const char *data, size_t data_size, struct vkd3d_shader_me
if (version != 0x00000001)
{
WARN("Got unexpected DXBC version %#x.\n", version);
- vkd3d_shader_error(message_context, VKD3D_SHADER_ERROR_DXBC_INVALID_VERSION,
+ vkd3d_shader_error(message_context, &location, VKD3D_SHADER_ERROR_DXBC_INVALID_VERSION,
"DXBC version %#x is not supported.", version);
return VKD3D_ERROR_INVALID_ARGUMENT;
}
@@ -2095,7 +2098,7 @@ static int parse_dxbc(const char *data, size_t data_size, struct vkd3d_shader_me
if (chunk_offset >= data_size || !require_space(chunk_offset, 2, sizeof(DWORD), data_size))
{
WARN("Invalid chunk offset %#x (data size %zu).\n", chunk_offset, data_size);
- vkd3d_shader_error(message_context, VKD3D_SHADER_ERROR_DXBC_INVALID_CHUNK_OFFSET,
+ vkd3d_shader_error(message_context, &location, VKD3D_SHADER_ERROR_DXBC_INVALID_CHUNK_OFFSET,
"DXBC chunk %u has invalid offset %#x (data size %#zx).", i, chunk_offset, data_size);
return VKD3D_ERROR_INVALID_ARGUMENT;
}
@@ -2109,7 +2112,7 @@ static int parse_dxbc(const char *data, size_t data_size, struct vkd3d_shader_me
{
WARN("Invalid chunk size %#x (data size %zu, chunk offset %#x).\n",
chunk_size, data_size, chunk_offset);
- vkd3d_shader_error(message_context, VKD3D_SHADER_ERROR_DXBC_INVALID_CHUNK_SIZE,
+ vkd3d_shader_error(message_context, &location, VKD3D_SHADER_ERROR_DXBC_INVALID_CHUNK_SIZE,
"DXBC chunk %u has invalid size %#x (data size %#zx, chunk offset %#x).",
i, chunk_offset, data_size, chunk_offset);
return VKD3D_ERROR_INVALID_ARGUMENT;
@@ -2229,7 +2232,7 @@ int shader_parse_input_signature(const void *dxbc, size_t dxbc_length,
int ret;
memset(signature, 0, sizeof(*signature));
- if ((ret = parse_dxbc(dxbc, dxbc_length, message_context, isgn_handler, signature)) < 0)
+ if ((ret = parse_dxbc(dxbc, dxbc_length, message_context, NULL, isgn_handler, signature)) < 0)
ERR("Failed to parse input signature.\n");
return ret;
@@ -2304,7 +2307,7 @@ void free_shader_desc(struct vkd3d_shader_desc *desc)
}
int shader_extract_from_dxbc(const void *dxbc, size_t dxbc_length,
- struct vkd3d_shader_message_context *message_context, struct vkd3d_shader_desc *desc)
+ struct vkd3d_shader_message_context *message_context, const char *source_name, struct vkd3d_shader_desc *desc)
{
int ret;
@@ -2314,7 +2317,7 @@ int shader_extract_from_dxbc(const void *dxbc, size_t dxbc_length,
memset(&desc->output_signature, 0, sizeof(desc->output_signature));
memset(&desc->patch_constant_signature, 0, sizeof(desc->patch_constant_signature));
- ret = parse_dxbc(dxbc, dxbc_length, message_context, shdr_handler, desc);
+ ret = parse_dxbc(dxbc, dxbc_length, message_context, source_name, shdr_handler, desc);
if (!desc->byte_code)
ret = VKD3D_ERROR_INVALID_ARGUMENT;
@@ -2781,9 +2784,9 @@ int vkd3d_shader_parse_root_signature(const struct vkd3d_shader_code *dxbc,
memset(root_signature, 0, sizeof(*root_signature));
if (messages)
*messages = NULL;
- vkd3d_shader_message_context_init(&message_context, VKD3D_SHADER_LOG_INFO, NULL);
+ vkd3d_shader_message_context_init(&message_context, VKD3D_SHADER_LOG_INFO);
- ret = parse_dxbc(dxbc->code, dxbc->size, &message_context, rts0_handler, root_signature);
+ ret = parse_dxbc(dxbc->code, dxbc->size, &message_context, NULL, rts0_handler, root_signature);
vkd3d_shader_message_context_trace_messages(&message_context);
if (!vkd3d_shader_message_context_copy_messages(&message_context, messages))
ret = VKD3D_ERROR_OUT_OF_MEMORY;
@@ -2935,7 +2938,7 @@ static int shader_write_root_signature_header(struct root_signature_writer_conte
return VKD3D_OK;
fail:
- vkd3d_shader_error(&context->message_context, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
+ vkd3d_shader_error(&context->message_context, NULL, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
"Out of memory while writing root signature header.");
return VKD3D_ERROR_OUT_OF_MEMORY;
}
@@ -2963,7 +2966,7 @@ static int shader_write_descriptor_ranges(struct root_signature_writer_context *
return VKD3D_OK;
fail:
- vkd3d_shader_error(&context->message_context, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
+ vkd3d_shader_error(&context->message_context, NULL, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
"Out of memory while writing root signature descriptor ranges.");
return VKD3D_ERROR_OUT_OF_MEMORY;
}
@@ -2993,7 +2996,7 @@ static int shader_write_descriptor_ranges1(struct root_signature_writer_context
return VKD3D_OK;
fail:
- vkd3d_shader_error(&context->message_context, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
+ vkd3d_shader_error(&context->message_context, NULL, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
"Out of memory while writing root signature descriptor ranges.");
return VKD3D_ERROR_OUT_OF_MEMORY;
}
@@ -3009,7 +3012,7 @@ static int shader_write_descriptor_table(struct root_signature_writer_context *c
return shader_write_descriptor_ranges(context, table);
fail:
- vkd3d_shader_error(&context->message_context, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
+ vkd3d_shader_error(&context->message_context, NULL, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
"Out of memory while writing root signature root descriptor table.");
return VKD3D_ERROR_OUT_OF_MEMORY;
}
@@ -3025,7 +3028,7 @@ static int shader_write_descriptor_table1(struct root_signature_writer_context *
return shader_write_descriptor_ranges1(context, table);
fail:
- vkd3d_shader_error(&context->message_context, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
+ vkd3d_shader_error(&context->message_context, NULL, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
"Out of memory while writing root signature root descriptor table.");
return VKD3D_ERROR_OUT_OF_MEMORY;
}
@@ -3043,7 +3046,7 @@ static int shader_write_root_constants(struct root_signature_writer_context *con
return VKD3D_OK;
fail:
- vkd3d_shader_error(&context->message_context, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
+ vkd3d_shader_error(&context->message_context, NULL, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
"Out of memory while writing root signature root constants.");
return VKD3D_ERROR_OUT_OF_MEMORY;
}
@@ -3059,7 +3062,7 @@ static int shader_write_root_descriptor(struct root_signature_writer_context *co
return VKD3D_OK;
fail:
- vkd3d_shader_error(&context->message_context, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
+ vkd3d_shader_error(&context->message_context, NULL, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
"Out of memory while writing root signature root descriptor.");
return VKD3D_ERROR_OUT_OF_MEMORY;
}
@@ -3077,7 +3080,7 @@ static int shader_write_root_descriptor1(struct root_signature_writer_context *c
return VKD3D_OK;
fail:
- vkd3d_shader_error(&context->message_context, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
+ vkd3d_shader_error(&context->message_context, NULL, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
"Out of memory while writing root signature root descriptor.");
return VKD3D_ERROR_OUT_OF_MEMORY;
}
@@ -3126,7 +3129,7 @@ static int shader_write_root_parameters(struct root_signature_writer_context *co
break;
default:
FIXME("Unrecognized type %#x.\n", versioned_root_signature_get_parameter_type(desc, i));
- vkd3d_shader_error(&context->message_context, VKD3D_SHADER_ERROR_RS_INVALID_ROOT_PARAMETER_TYPE,
+ vkd3d_shader_error(&context->message_context, NULL, VKD3D_SHADER_ERROR_RS_INVALID_ROOT_PARAMETER_TYPE,
"Invalid/unrecognised root signature root parameter type %#x.",
versioned_root_signature_get_parameter_type(desc, i));
return VKD3D_ERROR_INVALID_ARGUMENT;
@@ -3139,7 +3142,7 @@ static int shader_write_root_parameters(struct root_signature_writer_context *co
return VKD3D_OK;
fail:
- vkd3d_shader_error(&context->message_context, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
+ vkd3d_shader_error(&context->message_context, NULL, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
"Out of memory while writing root signature root parameters.");
return VKD3D_ERROR_OUT_OF_MEMORY;
}
@@ -3183,7 +3186,7 @@ static int shader_write_static_samplers(struct root_signature_writer_context *co
return VKD3D_OK;
fail:
- vkd3d_shader_error(&context->message_context, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
+ vkd3d_shader_error(&context->message_context, NULL, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
"Out of memory while writing root signature static samplers.");
return VKD3D_ERROR_OUT_OF_MEMORY;
}
@@ -3218,7 +3221,7 @@ static int shader_write_root_signature(struct root_signature_writer_context *con
return shader_write_static_samplers(context, desc);
fail:
- vkd3d_shader_error(&context->message_context, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
+ vkd3d_shader_error(&context->message_context, NULL, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
"Out of memory while writing root signature.");
return VKD3D_ERROR_OUT_OF_MEMORY;
}
@@ -3247,7 +3250,7 @@ static int validate_descriptor_table_v_1_0(const struct vkd3d_shader_root_descri
else
{
WARN("Invalid descriptor range type %#x.\n", r->range_type);
- vkd3d_shader_error(message_context, VKD3D_SHADER_ERROR_RS_INVALID_DESCRIPTOR_RANGE_TYPE,
+ vkd3d_shader_error(message_context, NULL, VKD3D_SHADER_ERROR_RS_INVALID_DESCRIPTOR_RANGE_TYPE,
"Invalid root signature descriptor range type %#x.", r->range_type);
return VKD3D_ERROR_INVALID_ARGUMENT;
}
@@ -3256,7 +3259,7 @@ static int validate_descriptor_table_v_1_0(const struct vkd3d_shader_root_descri
if (have_srv_uav_cbv && have_sampler)
{
WARN("Samplers cannot be mixed with CBVs/SRVs/UAVs in descriptor tables.\n");
- vkd3d_shader_error(message_context, VKD3D_SHADER_ERROR_RS_MIXED_DESCRIPTOR_RANGE_TYPES,
+ vkd3d_shader_error(message_context, NULL, VKD3D_SHADER_ERROR_RS_MIXED_DESCRIPTOR_RANGE_TYPES,
"Encountered both CBV/SRV/UAV and sampler descriptor ranges in the same root descriptor table.");
return VKD3D_ERROR_INVALID_ARGUMENT;
}
@@ -3288,7 +3291,7 @@ static int validate_descriptor_table_v_1_1(const struct vkd3d_shader_root_descri
else
{
WARN("Invalid descriptor range type %#x.\n", r->range_type);
- vkd3d_shader_error(message_context, VKD3D_SHADER_ERROR_RS_INVALID_DESCRIPTOR_RANGE_TYPE,
+ vkd3d_shader_error(message_context, NULL, VKD3D_SHADER_ERROR_RS_INVALID_DESCRIPTOR_RANGE_TYPE,
"Invalid root signature descriptor range type %#x.", r->range_type);
return VKD3D_ERROR_INVALID_ARGUMENT;
}
@@ -3297,7 +3300,7 @@ static int validate_descriptor_table_v_1_1(const struct vkd3d_shader_root_descri
if (have_srv_uav_cbv && have_sampler)
{
WARN("Samplers cannot be mixed with CBVs/SRVs/UAVs in descriptor tables.\n");
- vkd3d_shader_error(message_context, VKD3D_SHADER_ERROR_RS_MIXED_DESCRIPTOR_RANGE_TYPES,
+ vkd3d_shader_error(message_context, NULL, VKD3D_SHADER_ERROR_RS_MIXED_DESCRIPTOR_RANGE_TYPES,
"Encountered both CBV/SRV/UAV and sampler descriptor ranges in the same root descriptor table.");
return VKD3D_ERROR_INVALID_ARGUMENT;
}
@@ -3345,14 +3348,14 @@ int vkd3d_shader_serialize_root_signature(const struct vkd3d_shader_versioned_ro
*messages = NULL;
memset(&context, 0, sizeof(context));
- vkd3d_shader_message_context_init(&context.message_context, VKD3D_SHADER_LOG_INFO, NULL);
+ vkd3d_shader_message_context_init(&context.message_context, VKD3D_SHADER_LOG_INFO);
if (root_signature->version != VKD3D_SHADER_ROOT_SIGNATURE_VERSION_1_0
&& root_signature->version != VKD3D_SHADER_ROOT_SIGNATURE_VERSION_1_1)
{
ret = VKD3D_ERROR_INVALID_ARGUMENT;
WARN("Root signature version %#x not supported.\n", root_signature->version);
- vkd3d_shader_error(&context.message_context, VKD3D_SHADER_ERROR_RS_INVALID_VERSION,
+ vkd3d_shader_error(&context.message_context, NULL, VKD3D_SHADER_ERROR_RS_INVALID_VERSION,
"Root signature version %#x is not supported.", root_signature->version);
goto done;
}
diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c
index cb9c7a12..61d0d472 100644
--- a/libs/vkd3d-shader/spirv.c
+++ b/libs/vkd3d-shader/spirv.c
@@ -2155,6 +2155,7 @@ struct vkd3d_dxbc_compiler
struct vkd3d_spirv_builder spirv_builder;
struct vkd3d_shader_message_context *message_context;
+ struct vkd3d_shader_location location;
bool failed;
bool strip_debug;
@@ -2245,6 +2246,8 @@ struct vkd3d_dxbc_compiler *vkd3d_dxbc_compiler_create(const struct vkd3d_shader
memset(compiler, 0, sizeof(*compiler));
compiler->message_context = message_context;
+ compiler->location.source_name = compile_info->source_name;
+ compiler->location.line = 2; /* Line 1 is the version token. */
if ((target_info = vkd3d_find_struct(compile_info->next, SPIRV_TARGET_INFO)))
{
@@ -2452,7 +2455,7 @@ static void VKD3D_PRINTF_FUNC(3, 4) vkd3d_dxbc_compiler_error(struct vkd3d_dxbc_
va_list args;
va_start(args, format);
- vkd3d_shader_verror(compiler->message_context, error, format, args);
+ vkd3d_shader_verror(compiler->message_context, &compiler->location, error, format, args);
va_end(args);
compiler->failed = true;
}
@@ -9194,6 +9197,7 @@ int vkd3d_dxbc_compiler_handle_instruction(struct vkd3d_dxbc_compiler *compiler,
FIXME("Unhandled instruction %#x.\n", instruction->handler_idx);
}
+ ++compiler->location.line;
return ret;
}
diff --git a/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d-shader/vkd3d_shader_main.c
index 2ea233bb..173ff170 100644
--- a/libs/vkd3d-shader/vkd3d_shader_main.c
+++ b/libs/vkd3d-shader/vkd3d_shader_main.c
@@ -108,13 +108,9 @@ void vkd3d_string_buffer_trace_(const struct vkd3d_string_buffer *buffer, const
}
void vkd3d_shader_message_context_init(struct vkd3d_shader_message_context *context,
- enum vkd3d_shader_log_level log_level, const char *source_name)
+ enum vkd3d_shader_log_level log_level)
{
context->log_level = log_level;
- context->source_name = source_name ? source_name : "<anonymous>";
- context->line = 0;
- context->column = 0;
-
vkd3d_string_buffer_init(&context->messages);
}
@@ -148,28 +144,37 @@ bool vkd3d_shader_message_context_copy_messages(struct vkd3d_shader_message_cont
return true;
}
-void vkd3d_shader_verror(struct vkd3d_shader_message_context *context,
+void vkd3d_shader_verror(struct vkd3d_shader_message_context *context, const struct vkd3d_shader_location *location,
enum vkd3d_shader_error error, const char *format, va_list args)
{
if (context->log_level < VKD3D_SHADER_LOG_ERROR)
return;
- if (context->line)
- vkd3d_string_buffer_printf(&context->messages, "%s:%u:%u: E%04u: ",
- context->source_name, context->line, context->column, error);
+ if (location)
+ {
+ const char *source_name = location->source_name ? location->source_name : "<anonymous>";
+
+ if (location->line)
+ vkd3d_string_buffer_printf(&context->messages, "%s:%u:%u: E%04u: ",
+ source_name, location->line, location->column, error);
+ else
+ vkd3d_string_buffer_printf(&context->messages, "%s: E%04u: ", source_name, error);
+ }
else
- vkd3d_string_buffer_printf(&context->messages, "%s: E%04u: ", context->source_name, error);
+ {
+ vkd3d_string_buffer_printf(&context->messages, "E%04u: ", error);
+ }
vkd3d_string_buffer_vprintf(&context->messages, format, args);
vkd3d_string_buffer_printf(&context->messages, "\n");
}
-void vkd3d_shader_error(struct vkd3d_shader_message_context *context,
+void vkd3d_shader_error(struct vkd3d_shader_message_context *context, const struct vkd3d_shader_location *location,
enum vkd3d_shader_error error, const char *format, ...)
{
va_list args;
va_start(args, format);
- vkd3d_shader_verror(context, error, format, args);
+ vkd3d_shader_verror(context, location, error, format, args);
va_end(args);
}
@@ -222,12 +227,13 @@ struct vkd3d_shader_parser
};
static int vkd3d_shader_parser_init(struct vkd3d_shader_parser *parser,
- const struct vkd3d_shader_code *dxbc, struct vkd3d_shader_message_context *message_context)
+ const struct vkd3d_shader_compile_info *compile_info, struct vkd3d_shader_message_context *message_context)
{
struct vkd3d_shader_desc *shader_desc = &parser->shader_desc;
int ret;
- if ((ret = shader_extract_from_dxbc(dxbc->code, dxbc->size, message_context, shader_desc)) < 0)
+ if ((ret = shader_extract_from_dxbc(compile_info->source.code, compile_info->source.size,
+ message_context, compile_info->source_name, shader_desc)) < 0)
{
WARN("Failed to extract shader, vkd3d result %d.\n", ret);
return ret;
@@ -307,6 +313,7 @@ struct vkd3d_shader_scan_context
size_t descriptors_size;
struct vkd3d_shader_message_context *message_context;
+ struct vkd3d_shader_location location;
struct vkd3d_shader_cf_info
{
@@ -332,12 +339,15 @@ struct vkd3d_shader_scan_context
};
static void vkd3d_shader_scan_context_init(struct vkd3d_shader_scan_context *context,
+ const struct vkd3d_shader_compile_info *compile_info,
struct vkd3d_shader_scan_descriptor_info *scan_descriptor_info,
struct vkd3d_shader_message_context *message_context)
{
memset(context, 0, sizeof(*context));
context->scan_descriptor_info = scan_descriptor_info;
context->message_context = message_context;
+ context->location.source_name = compile_info->source_name;
+ context->location.line = 2; /* Line 1 is the version token. */
}
static void vkd3d_shader_scan_context_cleanup(struct vkd3d_shader_scan_context *context)
@@ -606,7 +616,7 @@ static void vkd3d_shader_scan_error(struct vkd3d_shader_scan_context *context,
va_list args;
va_start(args, format);
- vkd3d_shader_verror(context->message_context, error, format, args);
+ vkd3d_shader_verror(context->message_context, &context->location, error, format, args);
va_end(args);
}
@@ -774,6 +784,7 @@ static int vkd3d_shader_scan_instruction(struct vkd3d_shader_scan_context *conte
if (vkd3d_shader_instruction_is_uav_counter(instruction))
vkd3d_shader_scan_record_uav_counter(context, &instruction->src[0].reg);
+ ++context->location.line;
return VKD3D_OK;
}
@@ -792,9 +803,9 @@ static int scan_dxbc(const struct vkd3d_shader_compile_info *compile_info,
scan_descriptor_info->descriptor_count = 0;
}
- vkd3d_shader_scan_context_init(&context, scan_descriptor_info, message_context);
+ vkd3d_shader_scan_context_init(&context, compile_info, scan_descriptor_info, message_context);
- if ((ret = vkd3d_shader_parser_init(&parser, &compile_info->source, message_context)) < 0)
+ if ((ret = vkd3d_shader_parser_init(&parser, compile_info, message_context)) < 0)
{
vkd3d_shader_scan_context_cleanup(&context);
return ret;
@@ -803,8 +814,6 @@ static int scan_dxbc(const struct vkd3d_shader_compile_info *compile_info,
if (TRACE_ON())
vkd3d_shader_trace(parser.data);
- message_context->line = 2; /* Line 1 is the version token. */
- message_context->column = 1;
while (!shader_sm4_is_end(parser.data, &parser.ptr))
{
shader_sm4_read_instruction(parser.data, &parser.ptr, &instruction);
@@ -824,7 +833,6 @@ static int scan_dxbc(const struct vkd3d_shader_compile_info *compile_info,
vkd3d_shader_free_scan_descriptor_info(scan_descriptor_info);
goto done;
}
- ++message_context->line;
}
ret = VKD3D_OK;
@@ -848,7 +856,7 @@ int vkd3d_shader_scan(const struct vkd3d_shader_compile_info *compile_info, char
if ((ret = vkd3d_shader_validate_compile_info(compile_info, true)) < 0)
return ret;
- vkd3d_shader_message_context_init(&message_context, compile_info->log_level, compile_info->source_name);
+ vkd3d_shader_message_context_init(&message_context, compile_info->log_level);
ret = scan_dxbc(compile_info, &message_context);
@@ -877,7 +885,7 @@ static int compile_dxbc_tpf(const struct vkd3d_shader_compile_info *compile_info
if ((ret = scan_dxbc(&scan_info, message_context)) < 0)
return ret;
- if ((ret = vkd3d_shader_parser_init(&parser, &compile_info->source, message_context)) < 0)
+ if ((ret = vkd3d_shader_parser_init(&parser, compile_info, message_context)) < 0)
{
vkd3d_shader_free_scan_descriptor_info(&scan_descriptor_info);
return ret;
@@ -902,8 +910,6 @@ static int compile_dxbc_tpf(const struct vkd3d_shader_compile_info *compile_info
return VKD3D_ERROR;
}
- message_context->line = 2; /* Line 1 is the version token. */
- message_context->column = 1;
while (!shader_sm4_is_end(parser.data, &parser.ptr))
{
shader_sm4_read_instruction(parser.data, &parser.ptr, &instruction);
@@ -917,7 +923,6 @@ static int compile_dxbc_tpf(const struct vkd3d_shader_compile_info *compile_info
if ((ret = vkd3d_dxbc_compiler_handle_instruction(spirv_compiler, &instruction)) < 0)
break;
- ++message_context->line;
}
if (ret >= 0)
@@ -949,7 +954,7 @@ int vkd3d_shader_compile(const struct vkd3d_shader_compile_info *compile_info,
if ((ret = vkd3d_shader_validate_compile_info(compile_info, true)) < 0)
return ret;
- vkd3d_shader_message_context_init(&message_context, compile_info->log_level, compile_info->source_name);
+ vkd3d_shader_message_context_init(&message_context, compile_info->log_level);
switch (compile_info->source_type)
{
@@ -1051,7 +1056,7 @@ int vkd3d_shader_parse_input_signature(const struct vkd3d_shader_code *dxbc,
if (messages)
*messages = NULL;
- vkd3d_shader_message_context_init(&message_context, VKD3D_SHADER_LOG_INFO, NULL);
+ vkd3d_shader_message_context_init(&message_context, VKD3D_SHADER_LOG_INFO);
ret = shader_parse_input_signature(dxbc->code, dxbc->size, &message_context, signature);
vkd3d_shader_message_context_trace_messages(&message_context);
@@ -1174,7 +1179,7 @@ int vkd3d_shader_preprocess(const struct vkd3d_shader_compile_info *compile_info
if ((ret = vkd3d_shader_validate_compile_info(compile_info, false)) < 0)
return ret;
- vkd3d_shader_message_context_init(&message_context, compile_info->log_level, compile_info->source_name);
+ vkd3d_shader_message_context_init(&message_context, compile_info->log_level);
ret = preproc_lexer_parse(compile_info, out, &message_context);
diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h
index 83038384..e974b928 100644
--- a/libs/vkd3d-shader/vkd3d_shader_private.h
+++ b/libs/vkd3d-shader/vkd3d_shader_private.h
@@ -844,11 +844,15 @@ int vkd3d_string_buffer_printf(struct vkd3d_string_buffer *buffer,
void vkd3d_string_buffer_trace_(const struct vkd3d_string_buffer *buffer, const char *function) DECLSPEC_HIDDEN;
int vkd3d_string_buffer_vprintf(struct vkd3d_string_buffer *buffer, const char *format, va_list args) DECLSPEC_HIDDEN;
-struct vkd3d_shader_message_context
+struct vkd3d_shader_location
{
- enum vkd3d_shader_log_level log_level;
const char *source_name;
unsigned int line, column;
+};
+
+struct vkd3d_shader_message_context
+{
+ enum vkd3d_shader_log_level log_level;
struct vkd3d_string_buffer messages;
};
@@ -856,18 +860,19 @@ void vkd3d_shader_message_context_cleanup(struct vkd3d_shader_message_context *c
bool vkd3d_shader_message_context_copy_messages(struct vkd3d_shader_message_context *context,
char **out) DECLSPEC_HIDDEN;
void vkd3d_shader_message_context_init(struct vkd3d_shader_message_context *context,
- enum vkd3d_shader_log_level log_level, const char *source_name) DECLSPEC_HIDDEN;
+ enum vkd3d_shader_log_level log_level) DECLSPEC_HIDDEN;
void vkd3d_shader_message_context_trace_messages_(const struct vkd3d_shader_message_context *context,
const char *function) DECLSPEC_HIDDEN;
#define vkd3d_shader_message_context_trace_messages(context) \
vkd3d_shader_message_context_trace_messages_(context, __FUNCTION__)
-void vkd3d_shader_error(struct vkd3d_shader_message_context *context, enum vkd3d_shader_error error,
- const char *format, ...) VKD3D_PRINTF_FUNC(3, 4) DECLSPEC_HIDDEN;
-void vkd3d_shader_verror(struct vkd3d_shader_message_context *context,
+void vkd3d_shader_error(struct vkd3d_shader_message_context *context, const struct vkd3d_shader_location *location,
+ enum vkd3d_shader_error error, const char *format, ...) VKD3D_PRINTF_FUNC(4, 5) DECLSPEC_HIDDEN;
+void vkd3d_shader_verror(struct vkd3d_shader_message_context *context, const struct vkd3d_shader_location *location,
enum vkd3d_shader_error error, const char *format, va_list args) DECLSPEC_HIDDEN;
int shader_extract_from_dxbc(const void *dxbc, size_t dxbc_length,
- struct vkd3d_shader_message_context *message_context, struct vkd3d_shader_desc *desc) DECLSPEC_HIDDEN;
+ struct vkd3d_shader_message_context *message_context, const char *source_name,
+ struct vkd3d_shader_desc *desc) DECLSPEC_HIDDEN;
void free_shader_desc(struct vkd3d_shader_desc *desc) DECLSPEC_HIDDEN;
int shader_parse_input_signature(const void *dxbc, size_t dxbc_length,
--
2.29.2
Dec. 15, 2020
Re: [PATCH vkd3d 1/2] vkd3d-shader: Introduce a helper to report errors while scanning.
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
Dec. 15, 2020
Re: [PATCH vkd3d] build: Create object directories before running bison or flex.
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
Dec. 15, 2020
Re: [PATCH vkd3d 2/2] vkd3d-shader: Move location tracking out of the vkd3d_shader_message_context structure.
by Henri Verbeet
On Tue, 15 Dec 2020 at 08:19, Zebediah Figura <zfigura(a)codeweavers.com> wrote:
>
> Includes a slight change in behaviour: parse_dxbc() and
> vkd3d_shader_serialize_root_signature() now print nothing instead of
> "<anonymous>".
>
It does a bit more than that. E.g., before this patch:
$ vkd3d-compiler -b d3d-asm invalid.dxbc
invalid.dxbc: E0003: Invalid DXBC checksum.
Failed to compile shader, ret -3.
After this patch, parse_dxbc() doesn't print source names at all.
Dec. 15, 2020
Re: TestBot news
by Francois Gouget
On Mon, 7 Dec 2020, Francois Gouget wrote:
[...]
> vm3 SSD
> -------
>
> The SSD of the vm3 host died last week so I moved its VMs to vm1 and
> vm4. That's part of why the TestBot was slow at the start of the week.
> The other reasons are:
[...]
> vm4's SSD is also on the brink of death according to smartctl so they'll
> both get new and bigger SSDs soon.
vm3 has a new SSD and is fully operational again. I moved the w1064 VM
back to it which will give a bit of breathing room to vm1.
vm4 also has a new SSD. It is also back on the 4.19 kernel + QEmu 3.1
[1] which matches the configuration of the other VM hosts . To do so I
had to change the pc-q35-5.0 machine to pc-q35-3.1 on w10pro64. As far
as I can tell this makes no difference to the guest.
I will certainly move back to QEmu 5.0 one day but for now it did not
seem to have any benefit. So sticking to QEmu 3.1 will avoid the "no
Spice client" audio bug [2] and avoid any issue when moving VMs created
on vm4 to the other hosts.
I also inadvertantly confirmed that the ntdll:exception crash is related
to the kernel version: it happens with 4.19.0-8 but not with 4.19.0-13.
Also this only impacts Windows 10: w7u never had any problem even with
4.19.0-8!
And while checking the WineTest results I noticed some getting this
error:
C:\Users\Public\Documents>winetest64-latest.exe -q -s exe64.report
The system cannot execute the specified program.
https://testbot.winehq.org/JobDetails.pl?Key=83433&f101=task.log#k101
https://testbot.winehq.org/JobDetails.pl?Key=83455&f101=task.log#k101
Yet Windows successfully ran WineTest just before. As far as I can tell
this only happens on Windows 10 so I suspect Windows Defender since it
does not seem possible to completely disable it on the recent versions.
But this is not systematic so it's going to be hard to confirm.
It also happened last week so it's not related to the latest vm3 and vm4
update.
[1] Instead of kernel 5.8 + QEmu 5.0
[2] https://www.winehq.org/pipermail/wine-devel/2020-November/177510.html
--
Francois Gouget <fgouget(a)codeweavers.com>
Dec. 15, 2020
[PATCH] po: Update Japanese translation.
by Akihiro Sagawa
Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com>
---
po/ja.po | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
Dec. 15, 2020
[PATCH 2/2] wined3d: Avoid referencing empty command buffers in wined3d_query_event_vk_issue().
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
This fixes a deadlock in "Ryse: Son of Rome" when starting a new campaign.
dlls/wined3d/query.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
index 9e0e22b32e5..4670bbfddff 100644
--- a/dlls/wined3d/query.c
+++ b/dlls/wined3d/query.c
@@ -1720,6 +1720,14 @@ static BOOL wined3d_query_event_vk_issue(struct wined3d_query *query, uint32_t f
{
context_vk = wined3d_context_vk(context_acquire(&device_vk->d, NULL, 0));
wined3d_context_vk_reference_query(context_vk, query_vk);
+ /* Because we don't actually submit any commands to the command buffer
+ * for event queries, the context's current command buffer may still
+ * be empty, and we should wait on the preceding command buffer
+ * instead. That's not merely an optimisation; if the command buffer
+ * referenced by the query is still empty by the time the application
+ * waits for it, that wait will never complete. */
+ if (!context_vk->current_command_buffer.vk_command_buffer)
+ --query_vk->command_buffer_id;
context_release(&context_vk->c);
return TRUE;
--
2.20.1
Dec. 15, 2020
[PATCH 1/2] wined3d: Zero-initialise context_vk in wined3d_context_vk_init().
by Henri Verbeet
wined3d_context_vk_init() assumes zero-initialised memory, but that's not
necessarily true in case we previously went through an
adapter_vk_init_3d()/adapter_vk_uninit_3d() pair.
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
This fixes a crash on startup with the Vulkan backend in Batman: Arkham
Origins.
dlls/wined3d/context_vk.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/wined3d/context_vk.c b/dlls/wined3d/context_vk.c
index 9db363172f1..2d80c59ca32 100644
--- a/dlls/wined3d/context_vk.c
+++ b/dlls/wined3d/context_vk.c
@@ -3158,6 +3158,7 @@ HRESULT wined3d_context_vk_init(struct wined3d_context_vk *context_vk, struct wi
TRACE("context_vk %p, swapchain %p.\n", context_vk, swapchain);
+ memset(context_vk, 0, sizeof(*context_vk));
wined3d_context_init(&context_vk->c, swapchain);
device_vk = wined3d_device_vk(swapchain->device);
adapter_vk = wined3d_adapter_vk(device_vk->d.adapter);
--
2.20.1
Dec. 15, 2020
[PATCH v2 4/4] fonts: Correct default glyph index for MS Sans Serif font to match Windows.
by Dmitry Timoshkov
This one doesn't depend on previous patches in the sequence.
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
fonts/ms_sans_serif.sfd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fonts/ms_sans_serif.sfd b/fonts/ms_sans_serif.sfd
index 751b35d064..e8c720b528 100644
--- a/fonts/ms_sans_serif.sfd
+++ b/fonts/ms_sans_serif.sfd
@@ -4,7 +4,7 @@ FullName: MS Sans Serif
FamilyName: MS Sans Serif
Weight: Medium
Copyright: Copyright (C) 2004 Huw D M Davies, Dmitry Timoshkov
-UComments: "#pragma makedep font ssee1255.fon -d 129 13,1255,5 16,1255,7 20,1255,8+AAoA#pragma makedep font ssee1256.fon -d 129 13,1256,5 16,1256,7 20,1256,8+AAoA#pragma makedep font ssee1257.fon -d 129 13,1257,5 16,1257,7 20,1257,8+AAoA#pragma makedep font ssee874.fon -d 129 13,874,5 16,874,7 20,874,8+AAoA#pragma makedep font ssef1255.fon -d 129 -r 120 16,1255,7 20,1255,8+AAoA#pragma makedep font ssef1256.fon -d 129 -r 120 16,1256,7 20,1256,8+AAoA#pragma makedep font ssef1257.fon -d 129 -r 120 16,1257,7 20,1257,8+AAoA#pragma makedep font ssef874.fon -d 129 -r 120 16,874,7 20,874,8+AAoA#pragma makedep font sserife.fon -d 129 13,1252,5 16,1252,7 20,1252,8+AAoA#pragma makedep font sserifee.fon -d 129 13,1250,5 16,1250,7+AAoA#pragma makedep font sserifeg.fon -d 129 13,1253,5 16,1253,7 20,1253,8 +AAoA#pragma makedep font sserifer.fon -d 129 13,1251,5 16,1251,7 20,1251,8+AAoA#pragma makedep font sserifet.fon -d 129 13,1254,5 16,1254,7 20,1254,8+AAoA#pragma makedep font sseriff.fon -d 129 -r 120 16,1252,7 20,1252,8+AAoA#pragma makedep font sseriffe.fon -d 129 -r 120 16,1250,7+AAoA#pragma makedep font sseriffg.fon -d 129 -r 120 16,1253,7 20,1253,8 +AAoA#pragma makedep font sseriffr.fon -d 129 -r 120 16,1251,7 20,1251,8+AAoA#pragma makedep font sserifft.fon -d 129 -r 120 16,1254,7 20,1254,8"
+UComments: "#pragma makedep font ssee1255.fon -d 129 13,1255,5 16,1255,7 20,1255,8+AAoA#pragma makedep font ssee1256.fon -d 129 13,1256,5 16,1256,7 20,1256,8+AAoA#pragma makedep font ssee1257.fon -d 128 13,1257,5 16,1257,7 20,1257,8+AAoA#pragma makedep font ssee874.fon -d 129 13,874,5 16,874,7 20,874,8+AAoA#pragma makedep font ssef1255.fon -d 129 -r 120 16,1255,7 20,1255,8+AAoA#pragma makedep font ssef1256.fon -d 129 -r 120 16,1256,7 20,1256,8+AAoA#pragma makedep font ssef1257.fon -d 128 -r 120 16,1257,7 20,1257,8+AAoA#pragma makedep font ssef874.fon -d 129 -r 120 16,874,7 20,874,8+AAoA#pragma makedep font sserife.fon -d 129 13,1252,5 16,1252,7 20,1252,8+AAoA#pragma makedep font sserifee.fon -d 128 13,1250,5 16,1250,7+AAoA#pragma makedep font sserifeg.fon -d 129 13,1253,5 16,1253,7 20,1253,8 +AAoA#pragma makedep font sserifer.fon -d 127 13,1251,5 16,1251,7 20,1251,8+AAoA#pragma makedep font sserifet.fon -d 129 13,1254,5 16,1254,7 20,1254,8+AAoA#pragma makedep font sseriff.fon -d 129 -r 120 16,1252,7 20,1252,8+AAoA#pragma makedep font sseriffe.fon -d 128 -r 120 16,1250,7+AAoA#pragma makedep font sseriffg.fon -d 129 -r 120 16,1253,7 20,1253,8 +AAoA#pragma makedep font sseriffr.fon -d 127 -r 120 16,1251,7 20,1251,8+AAoA#pragma makedep font sserifft.fon -d 129 -r 120 16,1254,7 20,1254,8"
Version: 001.000
ItalicAngle: 0
UnderlinePosition: -15753.8
--
2.29.2
Dec. 15, 2020
[PATCH v2 3/4] gdi32: Avoid best fit chars when mapping unicode character to a glyph index.
by Dmitry Timoshkov
This part fixes drawing text.
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/gdi32/font.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c
index 9380d3efbe..850bbaab19 100644
--- a/dlls/gdi32/font.c
+++ b/dlls/gdi32/font.c
@@ -2910,11 +2910,11 @@ static UINT get_glyph_index( struct gdi_font *font, UINT glyph )
glyph = get_glyph_index_symbol( font, wc );
if (!glyph)
{
- if (WideCharToMultiByte( CP_ACP, 0, &wc, 1, &ch, 1, NULL, NULL ))
+ if (WideCharToMultiByte( CP_ACP, WC_NO_BEST_FIT_CHARS, &wc, 1, &ch, 1, NULL, NULL ))
glyph = get_glyph_index_symbol( font, (unsigned char)ch );
}
}
- else if (WideCharToMultiByte( font->codepage, 0, &wc, 1, &ch, 1, NULL, &used ) && !used)
+ else if (WideCharToMultiByte( font->codepage, WC_NO_BEST_FIT_CHARS, &wc, 1, &ch, 1, NULL, &used ) && !used)
{
glyph = (unsigned char)ch;
font_funcs->get_glyph_index( font, &glyph, FALSE );
--
2.29.2
Dec. 15, 2020
[PATCH v2 2/4] gdi32: Avoid best fit chars when mapping unicode character to a glyph index.
by Dmitry Timoshkov
This part fixes GetGlyphIndices.
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/gdi32/font.c | 2 +-
dlls/gdi32/tests/font.c | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c
index 00bbeb0a11..9380d3efbe 100644
--- a/dlls/gdi32/font.c
+++ b/dlls/gdi32/font.c
@@ -3223,7 +3223,7 @@ static DWORD CDECL font_GetGlyphIndices( PHYSDEV dev, const WCHAR *str, INT coun
if (str[i] >= 0xf020 && str[i] <= 0xf100) glyph = str[i] - 0xf000;
else if (str[i] < 0x100) glyph = str[i];
}
- else if (WideCharToMultiByte( physdev->font->codepage, 0, &str[i], 1,
+ else if (WideCharToMultiByte( physdev->font->codepage, WC_NO_BEST_FIT_CHARS, &str[i], 1,
&ch, 1, NULL, &used ) && !used)
glyph = (unsigned char)ch;
}
diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c
index c630b65e5e..5eb069bf31 100644
--- a/dlls/gdi32/tests/font.c
+++ b/dlls/gdi32/tests/font.c
@@ -1690,14 +1690,12 @@ static void test_GetGlyphIndices(void)
charcount = GetGlyphIndicesW(hdc, c, ARRAY_SIZE(c), glyphs, GGI_MARK_NONEXISTING_GLYPHS);
ok(charcount == ARRAY_SIZE(c), "got %u\n", charcount);
ok(glyphs[0] == 0x001f || glyphs[0] == 0xffff /* Vista */, "got %#x\n", glyphs[0]);
-todo_wine
ok(glyphs[1] == 0x001f || glyphs[1] == 0xffff /* Vista */, "got %#x\n", glyphs[1]);
glyphs[0] = glyphs[1] = 0;
charcount = GetGlyphIndicesW(hdc, c, ARRAY_SIZE(c), glyphs, 0);
ok(charcount == ARRAY_SIZE(c), "got %u\n", charcount);
ok(glyphs[0] == textm.tmDefaultChar || glyphs[0] == 0x20 /* CJK Windows */, "got %#x\n", glyphs[0]);
-todo_wine
ok(glyphs[1] == textm.tmDefaultChar || glyphs[1] == 0x20 /* CJK Windows */, "got %#x\n", glyphs[1]);
DeleteObject(SelectObject(hdc, hOldFont));
--
2.29.2
Dec. 15, 2020
[PATCH v2 1/4] gdi32/tests: Add some tests to show that GetGlyphIndices() should avoid best fit chars.
by Dmitry Timoshkov
v2: Fix test failures under CJK Windows versions.
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/gdi32/tests/font.c | 41 ++++++++++++++++++++++++++++++++++++-----
1 file changed, 36 insertions(+), 5 deletions(-)
diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c
index 86ccddd05e..c630b65e5e 100644
--- a/dlls/gdi32/tests/font.c
+++ b/dlls/gdi32/tests/font.c
@@ -1634,6 +1634,7 @@ static void test_GetGlyphIndices(void)
LOGFONTA lf;
DWORD flags = 0;
WCHAR testtext[] = {'T','e','s','t',0xffff,0};
+ WCHAR c[] = { 0x25bc /* Black Down-Pointing Triangle */, 0x212a /* Kelvin Sign */ };
WORD glyphs[(sizeof(testtext)/2)-1];
TEXTMETRICA textm;
HFONT hOldFont;
@@ -1655,8 +1656,9 @@ static void test_GetGlyphIndices(void)
lf.lfCharSet = ANSI_CHARSET;
hfont = CreateFontIndirectA(&lf);
- ok(hfont != 0, "CreateFontIndirectEx failed\n");
- ok(GetTextMetricsA(hdc, &textm), "GetTextMetric failed\n");
+ ok(hfont != 0, "CreateFontIndirect failed\n");
+ hOldFont = SelectObject(hdc, hfont);
+ ok(GetTextMetricsA(hdc, &textm), "GetTextMetrics failed\n");
if (textm.tmCharSet == ANSI_CHARSET)
{
flags |= GGI_MARK_NONEXISTING_GLYPHS;
@@ -1666,16 +1668,44 @@ static void test_GetGlyphIndices(void)
flags = 0;
charcount = pGetGlyphIndicesW(hdc, testtext, (sizeof(testtext)/2)-1, glyphs, flags);
ok(charcount == 5, "GetGlyphIndicesW count of glyphs should = 5 not %d\n", charcount);
- ok(glyphs[4] == textm.tmDefaultChar, "GetGlyphIndicesW should have returned a %04x not %04x\n",
- textm.tmDefaultChar, glyphs[4]);
+ ok(glyphs[4] == textm.tmDefaultChar || glyphs[4] == 0x20 /* CJK Windows */,
+ "GetGlyphIndicesW should have returned a %04x not %04x\n", textm.tmDefaultChar, glyphs[4]);
}
else
/* FIXME: Write tests for non-ANSI charsets. */
skip("GetGlyphIndices System font tests only for ANSI_CHARSET\n");
+ DeleteObject(SelectObject(hdc, hOldFont));
+
+ memset(&lf, 0, sizeof(lf));
+ strcpy(lf.lfFaceName, "MS Sans Serif");
+ lf.lfHeight = -13;
+ lf.lfCharSet = DEFAULT_CHARSET;
+ hfont = CreateFontIndirectA(&lf);
+ ok(hfont != 0, "CreateFontIndirect failed\n");
+ hOldFont = SelectObject(hdc, hfont);
+ ok(GetTextMetricsA(hdc, &textm), "GetTextMetrics failed\n");
+
+ glyphs[0] = glyphs[1] = 0;
+ charcount = GetGlyphIndicesW(hdc, c, ARRAY_SIZE(c), glyphs, GGI_MARK_NONEXISTING_GLYPHS);
+ ok(charcount == ARRAY_SIZE(c), "got %u\n", charcount);
+ ok(glyphs[0] == 0x001f || glyphs[0] == 0xffff /* Vista */, "got %#x\n", glyphs[0]);
+todo_wine
+ ok(glyphs[1] == 0x001f || glyphs[1] == 0xffff /* Vista */, "got %#x\n", glyphs[1]);
+
+ glyphs[0] = glyphs[1] = 0;
+ charcount = GetGlyphIndicesW(hdc, c, ARRAY_SIZE(c), glyphs, 0);
+ ok(charcount == ARRAY_SIZE(c), "got %u\n", charcount);
+ ok(glyphs[0] == textm.tmDefaultChar || glyphs[0] == 0x20 /* CJK Windows */, "got %#x\n", glyphs[0]);
+todo_wine
+ ok(glyphs[1] == textm.tmDefaultChar || glyphs[1] == 0x20 /* CJK Windows */, "got %#x\n", glyphs[1]);
+
+ DeleteObject(SelectObject(hdc, hOldFont));
+
if(!is_font_installed("Tahoma"))
{
skip("Tahoma is not installed so skipping this test\n");
+ ReleaseDC(0, hdc);
return;
}
memset(&lf, 0, sizeof(lf));
@@ -1720,12 +1750,13 @@ static void test_GetGlyphIndices(void)
ok(glyphs[4] == 0, "GetGlyphIndicesW should have returned 0 not %04x\n", glyphs[4]);
DeleteObject(SelectObject(hdc, hOldFont));
+ ReleaseDC(0, hdc);
+
ret = pRemoveFontMemResourceEx(rsrc);
ok(ret, "RemoveFontMemResourceEx error %d\n", GetLastError());
free_font(font);
ret = DeleteFileA(ttf_name);
ok(ret, "Failed to delete font file, %d.\n", GetLastError());
-
}
static void test_GetKerningPairs(void)
--
2.29.2
Dec. 15, 2020
[PATCH v3 2/2] ntdll: Save unwind information in KiUserApcDispatcher() on x64.
by Paul Gofman
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
---
v2:
- fix build for other archs.
dlls/ntdll/tests/exception.c | 53 +++++++++++++++++++++++++++++++++
dlls/ntdll/thread.c | 28 ++++++++++++++++-
dlls/ntdll/unix/signal_x86_64.c | 23 ++++++++++++--
3 files changed, 101 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index 5686e39ab9e..3a0a5ac049c 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -37,6 +37,8 @@ static void *code_mem;
static NTSTATUS (WINAPI *pNtGetContextThread)(HANDLE,CONTEXT*);
static NTSTATUS (WINAPI *pNtSetContextThread)(HANDLE,CONTEXT*);
+static NTSTATUS (WINAPI *pNtQueueApcThread)(HANDLE handle, PNTAPCFUNC func,
+ ULONG_PTR arg1, ULONG_PTR arg2, ULONG_PTR arg3);
static NTSTATUS (WINAPI *pRtlRaiseException)(EXCEPTION_RECORD *rec);
static PVOID (WINAPI *pRtlUnwind)(PVOID, PVOID, PEXCEPTION_RECORD, PVOID);
static VOID (WINAPI *pRtlCaptureContext)(CONTEXT*);
@@ -4061,6 +4063,55 @@ static void test_nested_exception(void)
ok(got_prev_frame_exception, "Did not get nested exception in the previous frame.\n");
}
+static CONTEXT test_unwind_apc_context;
+static BOOL test_unwind_apc_called;
+
+static void CALLBACK test_unwind_apc(ULONG_PTR arg1, ULONG_PTR arg2, ULONG_PTR arg3)
+{
+ EXCEPTION_RECORD rec;
+
+ test_unwind_apc_called = TRUE;
+ memset(&rec, 0, sizeof(rec));
+ pRtlUnwind((void *)test_unwind_apc_context.Rsp, (void *)test_unwind_apc_context.Rip, &rec, (void *)0xdeadbeef);
+ ok(0, "Should not get here.\n");
+}
+
+static void test_unwind_from_apc(void)
+{
+ NTSTATUS status;
+ int pass;
+
+ if (!pNtQueueApcThread)
+ {
+ win_skip("NtQueueApcThread is not available.\n");
+ return;
+ }
+
+ pass = 0;
+ InterlockedIncrement(&pass);
+ RtlCaptureContext(&test_unwind_apc_context);
+ InterlockedIncrement(&pass);
+
+ if (pass == 2)
+ {
+ test_unwind_apc_called = FALSE;
+ status = pNtQueueApcThread(GetCurrentThread(), test_unwind_apc, 0, 0, 0);
+ ok(!status, "Got unexpected status %#x.\n", status);
+ SleepEx(0, TRUE);
+ ok(0, "Should not get here.\n");
+ }
+ if (pass == 3)
+ {
+ ok(test_unwind_apc_called, "Test user APC was not called.\n");
+ test_unwind_apc_called = FALSE;
+ status = pNtQueueApcThread(GetCurrentThread(), test_unwind_apc, 0, 0, 0);
+ ok(!status, "Got unexpected status %#x.\n", status);
+ NtContinue(&test_unwind_apc_context, TRUE );
+ ok(0, "Should not get here.\n");
+ }
+ ok(pass == 4, "Got unexpected pass %d.\n", pass);
+ ok(test_unwind_apc_called, "Test user APC was not called.\n");
+}
#elif defined(__arm__)
static void test_thread_context(void)
@@ -8073,6 +8124,7 @@ START_TEST(exception)
#define X(f) p##f = (void*)GetProcAddress(hntdll, #f)
X(NtGetContextThread);
X(NtSetContextThread);
+ X(NtQueueApcThread);
X(NtReadVirtualMemory);
X(NtClose);
X(RtlUnwind);
@@ -8241,6 +8293,7 @@ START_TEST(exception)
skip( "Dynamic unwind functions not found\n" );
test_extended_context();
test_copy_context();
+ test_unwind_from_apc();
#elif defined(__aarch64__)
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 578c7a5436c..5bf456ec040 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -78,7 +78,7 @@ int __cdecl __wine_dbg_output( const char *str )
/*******************************************************************
* KiUserApcDispatcher (NTDLL.@)
*/
-void WINAPI KiUserApcDispatcher( CONTEXT *context, ULONG_PTR ctx, ULONG_PTR arg1, ULONG_PTR arg2,
+void WINAPI dispatch_apc( CONTEXT *context, ULONG_PTR ctx, ULONG_PTR arg1, ULONG_PTR arg2,
PNTAPCFUNC func )
{
func( ctx, arg1, arg2 );
@@ -86,6 +86,32 @@ void WINAPI KiUserApcDispatcher( CONTEXT *context, ULONG_PTR ctx, ULONG_PTR arg1
}
+#ifdef __x86_64__
+__ASM_GLOBAL_FUNC( KiUserApcDispatcher,
+ "addq $0x8,%rsp\n\t"
+ "mov 0x98(%rcx),%r10\n\t" /* context->Rsp */
+ "mov 0xf8(%rcx),%r11\n\t" /* context->Rip */
+ "mov %r11,-0x8(%r10)\n\t"
+ "mov %rbp,-0x10(%r10)\n\t"
+ "lea -0x10(%r10),%rbp\n\t"
+ __ASM_SEH(".seh_pushreg %rbp\n\t")
+ __ASM_SEH(".seh_setframe %rbp,0\n\t")
+ __ASM_SEH(".seh_endprologue\n\t")
+ __ASM_CFI(".cfi_signal_frame\n\t")
+ __ASM_CFI(".cfi_adjust_cfa_offset 0x10\n\t")
+ __ASM_CFI(".cfi_def_cfa %rbp,0x10\n\t")
+ __ASM_CFI(".cfi_rel_offset %rip,0x8\n\t")
+ __ASM_CFI(".cfi_rel_offset %rbp,0\n\t")
+ "call " __ASM_NAME("dispatch_apc") "\n\t"
+ "int3")
+#else
+void WINAPI KiUserApcDispatcher( CONTEXT *context, ULONG_PTR ctx, ULONG_PTR arg1, ULONG_PTR arg2,
+ PNTAPCFUNC func )
+{
+ dispatch_apc( context, ctx, arg1, arg2, func );
+}
+#endif
+
/***********************************************************************
* RtlExitUserThread (NTDLL.@)
*/
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c
index 0fc7ad69584..290e275a86e 100644
--- a/dlls/ntdll/unix/signal_x86_64.c
+++ b/dlls/ntdll/unix/signal_x86_64.c
@@ -2077,9 +2077,28 @@ __ASM_GLOBAL_FUNC( call_user_apc_dispatcher,
"movq %r14,%r9\n" /* arg2 */
"movq $0,0x328(%rbx)\n\t" /* amd64_thread_data()->syscall_frame */
"movq %rsi,0x20(%rsp)\n\t" /* func */
- "movq 0xa0(%rcx),%rbp\n\t" /* context.Rbp */
+ "movq %rdi,%r10\n\t"
+ /* Set nonvolatile regs from context. */
+ "movq 0xa0(%rcx),%rbp\n\t"
+ "movq 0x90(%rcx),%rbx\n\t"
+ "movq 0xa8(%rcx),%rsi\n\t"
+ "movq 0xb0(%rcx),%rdi\n\t"
+ "movq 0xd8(%rcx),%r12\n\t"
+ "movq 0xe0(%rcx),%r13\n\t"
+ "movq 0xe8(%rcx),%r14\n\t"
+ "movq 0xf0(%rcx),%r15\n\t"
+ "movdqa 0x200(%rcx),%xmm6\n\t"
+ "movdqa 0x210(%rcx),%xmm7\n\t"
+ "movdqa 0x220(%rcx),%xmm8\n\t"
+ "movdqa 0x230(%rcx),%xmm9\n\t"
+ "movdqa 0x240(%rcx),%xmm10\n\t"
+ "movdqa 0x250(%rcx),%xmm11\n\t"
+ "movdqa 0x260(%rcx),%xmm12\n\t"
+ "movdqa 0x270(%rcx),%xmm13\n\t"
+ "movdqa 0x280(%rcx),%xmm14\n\t"
+ "movdqa 0x290(%rcx),%xmm15\n\t"
"pushq 0xf8(%rcx)\n\t" /* context.Rip */
- "jmp *%rdi" )
+ "jmp *%r10" )
/***********************************************************************
--
2.29.2
Dec. 15, 2020
[PATCH v3 1/2] ntdll: Always copy context in call_user_apc_dispatcher() on x64.
by Paul Gofman
Currently, if call_user_apc_dispatcher() is called with nonzero context,
there is no guarantee that the provided context is stored above the
rsp = context_ptr->Rsp - (sizeof(CONTEXT) + offsetof(frame,ret_addr))
being set.
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
---
v3:
- properly align / reserve stack for setup_user_apc_dispatcher_stack() call.
dlls/ntdll/unix/signal_x86_64.c | 62 +++++++++++++++++++++++++--------
1 file changed, 48 insertions(+), 14 deletions(-)
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c
index 359f2d7c361..0fc7ad69584 100644
--- a/dlls/ntdll/unix/signal_x86_64.c
+++ b/dlls/ntdll/unix/signal_x86_64.c
@@ -254,6 +254,22 @@ C_ASSERT((offsetof(struct stack_layout, xstate) == sizeof(struct stack_layout)))
C_ASSERT( sizeof(XSTATE) == 0x140 );
C_ASSERT( sizeof(struct stack_layout) == 0x5b0 ); /* Should match the size in call_user_exception_dispatcher(). */
+/* stack layout when calling an user apc function.
+ * FIXME: match Windows ABI. */
+struct apc_stack_layout
+{
+ ULONG64 save_regs[4];
+ void *func;
+ ULONG64 align;
+ CONTEXT context;
+ ULONG64 rbp;
+ ULONG64 rip;
+};
+
+/* Should match size and offset in call_user_apc_dispatcher(). */
+C_ASSERT( offsetof(struct apc_stack_layout, context) == 0x30 );
+C_ASSERT( sizeof(struct apc_stack_layout) == 0x510 );
+
struct syscall_frame
{
ULONG64 xmm[10 * 2]; /* xmm6-xmm15 */
@@ -270,6 +286,9 @@ struct syscall_frame
ULONG64 ret_addr;
};
+/* Should match the offset in call_user_apc_dispatcher(). */
+C_ASSERT( offsetof( struct syscall_frame, ret_addr ) == 0xf0);
+
struct amd64_thread_data
{
DWORD_PTR dr0; /* 02f0 debug registers */
@@ -2017,31 +2036,46 @@ static void setup_exception( ucontext_t *sigcontext, EXCEPTION_RECORD *rec )
/***********************************************************************
* call_user_apc_dispatcher
*/
+struct apc_stack_layout * WINAPI setup_user_apc_dispatcher_stack( CONTEXT *context, struct apc_stack_layout *stack )
+{
+ CONTEXT c;
+
+ if (!context)
+ {
+ c.ContextFlags = CONTEXT_FULL;
+ NtGetContextThread( GetCurrentThread(), &c );
+ context = &c;
+ }
+ memmove( &stack->context, context, sizeof(stack->context) );
+ return stack;
+}
+
__ASM_GLOBAL_FUNC( call_user_apc_dispatcher,
"movq 0x28(%rsp),%rsi\n\t" /* func */
"movq 0x30(%rsp),%rdi\n\t" /* dispatcher */
"movq %gs:0x30,%rbx\n\t"
- "jrcxz 1f\n\t"
- "movq 0x98(%rcx),%rax\n\t" /* context_ptr->Rsp */
- "leaq -0x5c0(%rax),%rsp\n\t" /* sizeof(CONTEXT) + offsetof(frame,ret_addr) */
- "andq $~15,%rsp\n\t"
- "jmp 2f\n"
- "1:\tmovq 0x328(%rbx),%rax\n\t" /* amd64_thread_data()->syscall_frame */
- "leaq -0x4d0(%rax),%rsp\n\t"
- "andq $~15,%rsp\n\t"
"movq %rdx,%r12\n\t" /* ctx */
"movq %r8,%r13\n\t" /* arg1 */
"movq %r9,%r14\n\t" /* arg2 */
- "movq %rsp,%rdx\n\t" /* context */
- "movl $0x10000b,0x30(%rdx)\n\t" /* context.ContextFlags */
- "movq $~1,%rcx\n\t"
- "call " __ASM_NAME("NtGetContextThread") "\n\t"
- "movq %rsp,%rcx\n\t" /* context */
+ "jrcxz 1f\n\t"
+ "movq 0x98(%rcx),%rdx\n\t" /* context->Rsp */
+ "jmp 2f\n\t"
+ "1:\tmovq 0x328(%rbx),%rax\n\t" /* amd64_thread_data()->syscall_frame */
+ "leaq 0xf0(%rax),%rdx\n\t" /* &amd64_thread_data()->syscall_frame->ret_addr */
+ "2:\tsubq $0x510,%rdx\n\t" /* sizeof(struct apc_stack_layout) */
+ "andq $~0xf,%rdx\n\t"
+ "addq $8,%rsp\n\t" /* pop return address */
+ "cmpq %rsp,%rdx\n\t"
+ "cmovbq %rdx,%rsp\n\t"
+ "subq $0x20,%rsp\n\t"
+ "call " __ASM_NAME("setup_user_apc_dispatcher_stack") "\n\t"
+ "movq %rax,%rsp\n\t"
+ "leaq 0x30(%rsp),%rcx\n\t" /* context */
"movq $0xc0,0x78(%rcx)\n\t" /* context.Rax = STATUS_USER_APC */
"movq %r12,%rdx\n\t" /* ctx */
"movq %r13,%r8\n\t" /* arg1 */
"movq %r14,%r9\n" /* arg2 */
- "2:\tmovq $0,0x328(%rbx)\n\t"
+ "movq $0,0x328(%rbx)\n\t" /* amd64_thread_data()->syscall_frame */
"movq %rsi,0x20(%rsp)\n\t" /* func */
"movq 0xa0(%rcx),%rbp\n\t" /* context.Rbp */
"pushq 0xf8(%rcx)\n\t" /* context.Rip */
--
2.29.2
Dec. 15, 2020
Re: [PATCH 2/3] gdi32: Avoid best fit chars when mapping unicode character to a glyph index.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=83438
Your paranoid android.
=== w10pro64_ja (64 bit report) ===
gdi32:
font.c:1671: Test failed: GetGlyphIndicesW should have returned a 0081 not 0020
font.c:1698: Test failed: got 0x20
font.c:1700: Test failed: got 0x20
=== w10pro64_zh_CN (64 bit report) ===
gdi32:
font.c:1698: Test failed: got 0x20
font.c:1700: Test failed: got 0x20
Dec. 15, 2020
Re: [PATCH 1/3] gdi32/tests: Add some tests to show that GetGlyphIndices() should avoid best fit chars.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=83437
Your paranoid android.
=== w10pro64_ja (64 bit report) ===
gdi32:
font.c:1671: Test failed: GetGlyphIndicesW should have returned a 0081 not 0020
font.c:1700: Test failed: got 0x20
font.c:1702: Test failed: got 0x20
=== w10pro64_zh_CN (64 bit report) ===
gdi32:
font.c:1700: Test failed: got 0x20
font.c:1702: Test failed: got 0x20
Dec. 15, 2020
Dec. 15, 2020
Dec. 15, 2020
Dec. 15, 2020
[PATCH 3/3] fonts: Correct default glyph index for MS Sans Serif font to match Windows.
by Dmitry Timoshkov
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
fonts/ms_sans_serif.sfd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fonts/ms_sans_serif.sfd b/fonts/ms_sans_serif.sfd
index 751b35d064..e8c720b528 100644
--- a/fonts/ms_sans_serif.sfd
+++ b/fonts/ms_sans_serif.sfd
@@ -4,7 +4,7 @@ FullName: MS Sans Serif
FamilyName: MS Sans Serif
Weight: Medium
Copyright: Copyright (C) 2004 Huw D M Davies, Dmitry Timoshkov
-UComments: "#pragma makedep font ssee1255.fon -d 129 13,1255,5 16,1255,7 20,1255,8+AAoA#pragma makedep font ssee1256.fon -d 129 13,1256,5 16,1256,7 20,1256,8+AAoA#pragma makedep font ssee1257.fon -d 129 13,1257,5 16,1257,7 20,1257,8+AAoA#pragma makedep font ssee874.fon -d 129 13,874,5 16,874,7 20,874,8+AAoA#pragma makedep font ssef1255.fon -d 129 -r 120 16,1255,7 20,1255,8+AAoA#pragma makedep font ssef1256.fon -d 129 -r 120 16,1256,7 20,1256,8+AAoA#pragma makedep font ssef1257.fon -d 129 -r 120 16,1257,7 20,1257,8+AAoA#pragma makedep font ssef874.fon -d 129 -r 120 16,874,7 20,874,8+AAoA#pragma makedep font sserife.fon -d 129 13,1252,5 16,1252,7 20,1252,8+AAoA#pragma makedep font sserifee.fon -d 129 13,1250,5 16,1250,7+AAoA#pragma makedep font sserifeg.fon -d 129 13,1253,5 16,1253,7 20,1253,8 +AAoA#pragma makedep font sserifer.fon -d 129 13,1251,5 16,1251,7 20,1251,8+AAoA#pragma makedep font sserifet.fon -d 129 13,1254,5 16,1254,7 20,1254,8+AAoA#pragma makedep font sseriff.fon -d 129 -r 120 16,1252,7 20,1252,8+AAoA#pragma makedep font sseriffe.fon -d 129 -r 120 16,1250,7+AAoA#pragma makedep font sseriffg.fon -d 129 -r 120 16,1253,7 20,1253,8 +AAoA#pragma makedep font sseriffr.fon -d 129 -r 120 16,1251,7 20,1251,8+AAoA#pragma makedep font sserifft.fon -d 129 -r 120 16,1254,7 20,1254,8"
+UComments: "#pragma makedep font ssee1255.fon -d 129 13,1255,5 16,1255,7 20,1255,8+AAoA#pragma makedep font ssee1256.fon -d 129 13,1256,5 16,1256,7 20,1256,8+AAoA#pragma makedep font ssee1257.fon -d 128 13,1257,5 16,1257,7 20,1257,8+AAoA#pragma makedep font ssee874.fon -d 129 13,874,5 16,874,7 20,874,8+AAoA#pragma makedep font ssef1255.fon -d 129 -r 120 16,1255,7 20,1255,8+AAoA#pragma makedep font ssef1256.fon -d 129 -r 120 16,1256,7 20,1256,8+AAoA#pragma makedep font ssef1257.fon -d 128 -r 120 16,1257,7 20,1257,8+AAoA#pragma makedep font ssef874.fon -d 129 -r 120 16,874,7 20,874,8+AAoA#pragma makedep font sserife.fon -d 129 13,1252,5 16,1252,7 20,1252,8+AAoA#pragma makedep font sserifee.fon -d 128 13,1250,5 16,1250,7+AAoA#pragma makedep font sserifeg.fon -d 129 13,1253,5 16,1253,7 20,1253,8 +AAoA#pragma makedep font sserifer.fon -d 127 13,1251,5 16,1251,7 20,1251,8+AAoA#pragma makedep font sserifet.fon -d 129 13,1254,5 16,1254,7 20,1254,8+AAoA#pragma makedep font sseriff.fon -d 129 -r 120 16,1252,7 20,1252,8+AAoA#pragma makedep font sseriffe.fon -d 128 -r 120 16,1250,7+AAoA#pragma makedep font sseriffg.fon -d 129 -r 120 16,1253,7 20,1253,8 +AAoA#pragma makedep font sseriffr.fon -d 127 -r 120 16,1251,7 20,1251,8+AAoA#pragma makedep font sserifft.fon -d 129 -r 120 16,1254,7 20,1254,8"
Version: 001.000
ItalicAngle: 0
UnderlinePosition: -15753.8
--
2.29.2
Dec. 15, 2020
[PATCH 2/3] gdi32: Avoid best fit chars when mapping unicode character to a glyph index.
by Dmitry Timoshkov
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/gdi32/font.c | 4 ++--
dlls/gdi32/tests/font.c | 2 --
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c
index 00bbeb0a11..b8ba4258e9 100644
--- a/dlls/gdi32/font.c
+++ b/dlls/gdi32/font.c
@@ -2910,11 +2910,11 @@ static UINT get_glyph_index( struct gdi_font *font, UINT glyph )
glyph = get_glyph_index_symbol( font, wc );
if (!glyph)
{
- if (WideCharToMultiByte( CP_ACP, 0, &wc, 1, &ch, 1, NULL, NULL ))
+ if (WideCharToMultiByte( CP_ACP, WC_NO_BEST_FIT_CHARS, &wc, 1, &ch, 1, NULL, NULL ))
glyph = get_glyph_index_symbol( font, (unsigned char)ch );
}
}
- else if (WideCharToMultiByte( font->codepage, 0, &wc, 1, &ch, 1, NULL, &used ) && !used)
+ else if (WideCharToMultiByte( font->codepage, WC_NO_BEST_FIT_CHARS, &wc, 1, &ch, 1, NULL, &used ) && !used)
{
glyph = (unsigned char)ch;
font_funcs->get_glyph_index( font, &glyph, FALSE );
diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c
index dde41b501a..f6d2a49c91 100644
--- a/dlls/gdi32/tests/font.c
+++ b/dlls/gdi32/tests/font.c
@@ -1689,9 +1689,7 @@ static void test_GetGlyphIndices(void)
glyphs[0] = glyphs[1] = 0;
charcount = GetGlyphIndicesW(hdc, c, ARRAY_SIZE(c), glyphs, GGI_MARK_NONEXISTING_GLYPHS);
ok(charcount == ARRAY_SIZE(c), "got %u\n", charcount);
-todo_wine
ok(glyphs[0] == 0x001f || glyphs[0] == 0xffff /* Vista */, "got %#x\n", glyphs[0]);
-todo_wine
ok(glyphs[1] == 0x001f || glyphs[0] == 0xffff /* Vista */, "got %#x\n", glyphs[1]);
glyphs[0] = glyphs[1] = 0;
--
2.29.2
Dec. 15, 2020
[PATCH 1/3] gdi32/tests: Add some tests to show that GetGlyphIndices() should avoid best fit chars.
by Dmitry Timoshkov
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/gdi32/tests/font.c | 38 +++++++++++++++++++++++++++++++++++---
1 file changed, 35 insertions(+), 3 deletions(-)
diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c
index 86ccddd05e..dde41b501a 100644
--- a/dlls/gdi32/tests/font.c
+++ b/dlls/gdi32/tests/font.c
@@ -1634,6 +1634,7 @@ static void test_GetGlyphIndices(void)
LOGFONTA lf;
DWORD flags = 0;
WCHAR testtext[] = {'T','e','s','t',0xffff,0};
+ WCHAR c[] = { 0x25bc /* Black Down-Pointing Triangle */, 0x212a /* Kelvin Sign */ };
WORD glyphs[(sizeof(testtext)/2)-1];
TEXTMETRICA textm;
HFONT hOldFont;
@@ -1655,8 +1656,9 @@ static void test_GetGlyphIndices(void)
lf.lfCharSet = ANSI_CHARSET;
hfont = CreateFontIndirectA(&lf);
- ok(hfont != 0, "CreateFontIndirectEx failed\n");
- ok(GetTextMetricsA(hdc, &textm), "GetTextMetric failed\n");
+ ok(hfont != 0, "CreateFontIndirect failed\n");
+ hOldFont = SelectObject(hdc, hfont);
+ ok(GetTextMetricsA(hdc, &textm), "GetTextMetrics failed\n");
if (textm.tmCharSet == ANSI_CHARSET)
{
flags |= GGI_MARK_NONEXISTING_GLYPHS;
@@ -1673,9 +1675,38 @@ static void test_GetGlyphIndices(void)
/* FIXME: Write tests for non-ANSI charsets. */
skip("GetGlyphIndices System font tests only for ANSI_CHARSET\n");
+ DeleteObject(SelectObject(hdc, hOldFont));
+
+ memset(&lf, 0, sizeof(lf));
+ strcpy(lf.lfFaceName, "MS Sans Serif");
+ lf.lfHeight = -13;
+ lf.lfCharSet = DEFAULT_CHARSET;
+ hfont = CreateFontIndirectA(&lf);
+ ok(hfont != 0, "CreateFontIndirect failed\n");
+ hOldFont = SelectObject(hdc, hfont);
+ ok(GetTextMetricsA(hdc, &textm), "GetTextMetrics failed\n");
+
+ glyphs[0] = glyphs[1] = 0;
+ charcount = GetGlyphIndicesW(hdc, c, ARRAY_SIZE(c), glyphs, GGI_MARK_NONEXISTING_GLYPHS);
+ ok(charcount == ARRAY_SIZE(c), "got %u\n", charcount);
+todo_wine
+ ok(glyphs[0] == 0x001f || glyphs[0] == 0xffff /* Vista */, "got %#x\n", glyphs[0]);
+todo_wine
+ ok(glyphs[1] == 0x001f || glyphs[0] == 0xffff /* Vista */, "got %#x\n", glyphs[1]);
+
+ glyphs[0] = glyphs[1] = 0;
+ charcount = GetGlyphIndicesW(hdc, c, ARRAY_SIZE(c), glyphs, 0);
+ ok(charcount == ARRAY_SIZE(c), "got %u\n", charcount);
+ ok(glyphs[0] == textm.tmDefaultChar, "got %#x\n", glyphs[0]);
+todo_wine
+ ok(glyphs[1] == textm.tmDefaultChar, "got %#x\n", glyphs[1]);
+
+ DeleteObject(SelectObject(hdc, hOldFont));
+
if(!is_font_installed("Tahoma"))
{
skip("Tahoma is not installed so skipping this test\n");
+ ReleaseDC(0, hdc);
return;
}
memset(&lf, 0, sizeof(lf));
@@ -1720,12 +1751,13 @@ static void test_GetGlyphIndices(void)
ok(glyphs[4] == 0, "GetGlyphIndicesW should have returned 0 not %04x\n", glyphs[4]);
DeleteObject(SelectObject(hdc, hOldFont));
+ ReleaseDC(0, hdc);
+
ret = pRemoveFontMemResourceEx(rsrc);
ok(ret, "RemoveFontMemResourceEx error %d\n", GetLastError());
free_font(font);
ret = DeleteFileA(ttf_name);
ok(ret, "Failed to delete font file, %d.\n", GetLastError());
-
}
static void test_GetKerningPairs(void)
--
2.29.2
Dec. 15, 2020
[PATCH] po: Update Simplified Chinese translation.
by Jactry Zeng
Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com>
---
po/zh_CN.po | 228 ++++++++++++++++------------------------------------
1 file changed, 70 insertions(+), 158 deletions(-)
diff --git a/po/zh_CN.po b/po/zh_CN.po
index ae0d24b32c6..14771308488 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -5,14 +5,14 @@ msgstr ""
"Project-Id-Version: Wine\n"
"Report-Msgid-Bugs-To: https://bugs.winehq.org\n"
"POT-Creation-Date: N/A\n"
-"PO-Revision-Date: 2019-06-04 19:24-0600\n"
-"Last-Translator: Zixing Liu <liushuyu011(a)gmail.com>\n"
+"PO-Revision-Date: 2020-12-15 16:24+0800\n"
+"Last-Translator: Jactry Zeng <jzeng(a)codeweavers.com>\n"
"Language-Team: Chinese (PRC)\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 2.2.1\n"
+"X-Generator: Poedit 2.4.2\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: dlls/appwiz.cpl/appwiz.rc:58
@@ -3686,7 +3686,7 @@ msgstr "游戏控制器"
#: dlls/joy.cpl/joy.rc:32
msgid "Test and configure game controllers."
-msgstr ""
+msgstr "测试和配置游戏控制器。"
#: dlls/jscript/jscript.rc:28
msgid "Error converting object to primitive type"
@@ -3701,10 +3701,8 @@ msgid "Subscript out of range"
msgstr "标记越界"
#: dlls/jscript/jscript.rc:31
-#, fuzzy
-#| msgid "Out of paper; "
msgid "Out of stack space"
-msgstr "缺纸;"
+msgstr "堆栈空间不足"
#: dlls/jscript/jscript.rc:32
msgid "Object required"
@@ -3843,16 +3841,12 @@ msgid "JScript object expected"
msgstr "期望得到 JScript 对象"
#: dlls/jscript/jscript.rc:63
-#, fuzzy
-#| msgid "Array object expected"
msgid "Enumerator object expected"
-msgstr "期望得到 Array 对象"
+msgstr "期望得到枚举器对象"
#: dlls/jscript/jscript.rc:64
-#, fuzzy
-#| msgid "Boolean object expected"
msgid "Regular Expression object expected"
-msgstr "期望得到布尔型对象"
+msgstr "期望得到正则表达式对象"
#: dlls/jscript/jscript.rc:65
msgid "Syntax error in regular expression"
@@ -6874,32 +6868,24 @@ msgid "Connection reset by peer.\n"
msgstr "连接被重置。\n"
#: dlls/kernel32/winerror.mc:3767
-#, fuzzy
-#| msgid "Not implemented"
msgid "Not implemented.\n"
-msgstr "尚未实现"
+msgstr "尚未实现。\n"
#: dlls/kernel32/winerror.mc:3788
-#, fuzzy
-#| msgid "RPC call failed.\n"
msgid "Call failed.\n"
-msgstr "RPC 调用失败。\n"
+msgstr "调用失败。\n"
#: dlls/kernel32/winerror.mc:3760
msgid "No Signature found in file.\n"
msgstr "未在文件内找到签名。\n"
#: dlls/kernel32/winerror.mc:3774
-#, fuzzy
-#| msgid "Invalid level.\n"
msgid "Invalid call.\n"
-msgstr "无效的级别。\n"
+msgstr "无效调用。\n"
#: dlls/kernel32/winerror.mc:3781
-#, fuzzy
-#| msgid "Value is not available.\n"
msgid "Resource is not currently available.\n"
-msgstr "值不可用。\n"
+msgstr "资源当前不可用。\n"
#: dlls/localspl/localspl.rc:31 dlls/localui/localui.rc:31
#: dlls/winspool.drv/winspool.rc:30
@@ -9838,16 +9824,12 @@ msgid "Iran Daylight Time"
msgstr "伊朗夏令时"
#: dlls/tzres/tzres.rc:204
-#, fuzzy
-#| msgid "Haiti Standard Time"
msgid "Saint Pierre Standard Time"
-msgstr "海地标准时间"
+msgstr "圣皮埃尔标准时间"
#: dlls/tzres/tzres.rc:205
-#, fuzzy
-#| msgid "Haiti Daylight Time"
msgid "Saint Pierre Daylight Time"
-msgstr "海地夏令时"
+msgstr "圣皮埃尔夏令时"
#: dlls/tzres/tzres.rc:170
msgid "Namibia Standard Time"
@@ -9890,16 +9872,12 @@ msgid "Central Asia Daylight Time"
msgstr "中亚夏令时"
#: dlls/tzres/tzres.rc:146
-#, fuzzy
-#| msgid "Korea Standard Time"
msgid "Lord Howe Standard Time"
-msgstr "韩国标准时间"
+msgstr "豪勋爵标准时间"
#: dlls/tzres/tzres.rc:147
-#, fuzzy
-#| msgid "Korea Daylight Time"
msgid "Lord Howe Daylight Time"
-msgstr "韩国夏令时"
+msgstr "豪勋爵夏令时"
#: dlls/tzres/tzres.rc:40
msgid "Arabic Standard Time"
@@ -9950,16 +9928,12 @@ msgid "Azerbaijan Daylight Time"
msgstr "阿塞拜疆夏令时"
#: dlls/tzres/tzres.rc:150
-#, fuzzy
-#| msgid "Magadan Standard Time"
msgid "Magallanes Standard Time"
-msgstr "马加丹标准时间"
+msgstr "麦哲伦标准时间"
#: dlls/tzres/tzres.rc:151
-#, fuzzy
-#| msgid "Magadan Daylight Time"
msgid "Magallanes Daylight Time"
-msgstr "马加丹夏令时"
+msgstr "麦哲伦夏令时"
#: dlls/tzres/tzres.rc:206
msgid "Samoa Standard Time"
@@ -10010,16 +9984,12 @@ msgid "Line Islands Daylight Time"
msgstr "莱恩群岛夏令时"
#: dlls/tzres/tzres.rc:92
-#, fuzzy
-#| msgid "China Standard Time"
msgid "Cuba Standard Time"
-msgstr "中国标准时间"
+msgstr "古巴标准时间"
#: dlls/tzres/tzres.rc:93
-#, fuzzy
-#| msgid "China Daylight Time"
msgid "Cuba Daylight Time"
-msgstr "中国夏令时"
+msgstr "古巴夏令时"
#: dlls/tzres/tzres.rc:136
msgid "Jordan Standard Time"
@@ -10218,16 +10188,12 @@ msgid "US Eastern Daylight Time"
msgstr "美国东部夏令时"
#: dlls/tzres/tzres.rc:182
-#, fuzzy
-#| msgid "Korea Standard Time"
msgid "North Korea Standard Time"
-msgstr "韩国标准时间"
+msgstr "朝鲜标准时间"
#: dlls/tzres/tzres.rc:183
-#, fuzzy
-#| msgid "Korea Daylight Time"
msgid "North Korea Daylight Time"
-msgstr "韩国夏令时"
+msgstr "朝鲜夏令时"
#: dlls/tzres/tzres.rc:220
msgid "Tasmania Standard Time"
@@ -10318,16 +10284,12 @@ msgid "Arabian Daylight Time"
msgstr "阿拉伯夏令时"
#: dlls/tzres/tzres.rc:222
-#, fuzzy
-#| msgid "Mountain Standard Time"
msgid "Tocantins Standard Time"
-msgstr "山地标准时间"
+msgstr "托坎廷斯标准时间"
#: dlls/tzres/tzres.rc:223
-#, fuzzy
-#| msgid "Mountain Daylight Time"
msgid "Tocantins Daylight Time"
-msgstr "山地夏令时"
+msgstr "托坎廷斯夏令时"
#: dlls/tzres/tzres.rc:196
msgid "Russian Standard Time"
@@ -10338,16 +10300,12 @@ msgid "Russian Daylight Time"
msgstr "俄罗斯夏令时"
#: dlls/tzres/tzres.rc:48
-#, fuzzy
-#| msgid "AUS Central Standard Time"
msgid "Aus Central W. Standard Time"
-msgstr "澳大利亚中部标准时间"
+msgstr "澳大利亚中西部标准时间"
#: dlls/tzres/tzres.rc:49
-#, fuzzy
-#| msgid "AUS Central Daylight Time"
msgid "Aus Central W. Daylight Time"
-msgstr "澳大利亚中部夏令时"
+msgstr "澳大利亚中西部夏令时"
#: dlls/tzres/tzres.rc:194
msgid "Romance Standard Time"
@@ -10566,16 +10524,12 @@ msgid "Egypt Daylight Time"
msgstr "埃及夏令时"
#: dlls/tzres/tzres.rc:106
-#, fuzzy
-#| msgid "Central Standard Time (Mexico)"
msgid "Eastern Standard Time (Mexico)"
-msgstr "中部标准时间(墨西哥)"
+msgstr "东部标准时间(墨西哥)"
#: dlls/tzres/tzres.rc:107
-#, fuzzy
-#| msgid "Central Daylight Time (Mexico)"
msgid "Eastern Daylight Time (Mexico)"
-msgstr "中部夏令时(墨西哥)"
+msgstr "东部夏令时(墨西哥)"
#: dlls/tzres/tzres.rc:154
msgid "Mauritius Standard Time"
@@ -10780,153 +10734,115 @@ msgstr "更多窗口(&M)..."
#: dlls/vbscript/vbscript.rc:30
msgid "Overflow"
-msgstr ""
+msgstr "溢出"
#: dlls/vbscript/vbscript.rc:31
-#, fuzzy
-#| msgid "Out of memory."
msgid "Out of memory"
-msgstr "内存不足。"
+msgstr "内存不足"
#: dlls/vbscript/vbscript.rc:33
msgid "This array is fixed or temporarily locked"
-msgstr ""
+msgstr "该数组为固定数组或已被临时锁定"
#: dlls/vbscript/vbscript.rc:34
-#, fuzzy
-#| msgid "Data type mismatch.\n"
msgid "Type mismatch"
-msgstr "数据类型不匹配。\n"
+msgstr "类型不匹配"
#: dlls/vbscript/vbscript.rc:36
-#, fuzzy
-#| msgid "I/O device error.\n"
msgid "Device I/O error"
-msgstr "I/O 设备错误。\n"
+msgstr "设备 I/O 错误"
#: dlls/vbscript/vbscript.rc:37
-#, fuzzy
-#| msgid "File already exists.\n"
msgid "File already exists"
-msgstr "文件已存在。\n"
+msgstr "文件已存在"
#: dlls/vbscript/vbscript.rc:38
-#, fuzzy
-#| msgid "Disk full.\n"
msgid "Disk full"
-msgstr "磁盘满。\n"
+msgstr "磁盘已满"
#: dlls/vbscript/vbscript.rc:39
-#, fuzzy
-#| msgid "Too many open files.\n"
msgid "Too many files"
-msgstr "太多打开的文件。\n"
+msgstr "太多文件"
#: dlls/vbscript/vbscript.rc:40
-#, fuzzy
-#| msgid "Access denied.\n"
msgid "Permission denied"
-msgstr "访问被拒绝。\n"
+msgstr "没有权限"
#: dlls/vbscript/vbscript.rc:41
msgid "Path/File access error"
-msgstr ""
+msgstr "路径/文件访问出错"
#: dlls/vbscript/vbscript.rc:42
-#, fuzzy
-#| msgid "Path not found.\n"
msgid "Path not found"
-msgstr "找不到路径。\n"
+msgstr "找不到路径"
#: dlls/vbscript/vbscript.rc:43
-#, fuzzy
-#| msgid "(value not set)"
msgid "Object variable not set"
-msgstr "(没有设值)"
+msgstr "未设置对象变量"
#: dlls/vbscript/vbscript.rc:44
-#, fuzzy
-#| msgid "Invalid user buffer.\n"
msgid "Invalid use of Null"
-msgstr "用户缓冲区无效。\n"
+msgstr "Null 使用无效"
#: dlls/vbscript/vbscript.rc:45
msgid "Can't create necessary temporary file"
-msgstr ""
+msgstr "无法创建必要的临时文件"
#: dlls/vbscript/vbscript.rc:46
-#, fuzzy
-#| msgid "Automation server can't create object"
msgid "ActiveX component can't create object"
-msgstr "自动化服务器无法创建对象"
+msgstr "ActiveX 组件无法创建对象"
#: dlls/vbscript/vbscript.rc:47
-#, fuzzy
-#| msgid "Object doesn't support this action"
msgid "Class doesn't support Automation"
-msgstr "对象不支持此动作"
+msgstr "类不支持自动化"
#: dlls/vbscript/vbscript.rc:48
msgid "File name or class name not found during Automation operation"
-msgstr ""
+msgstr "自动化操作期间无法找到文件名或类名"
#: dlls/vbscript/vbscript.rc:51
-#, fuzzy
-#| msgid "Object doesn't support this action"
msgid "Object doesn't support named arguments"
-msgstr "对象不支持此动作"
+msgstr "对象不支持命名参数"
#: dlls/vbscript/vbscript.rc:52
-#, fuzzy
-#| msgid "Object doesn't support this action"
msgid "Object doesn't support current locale setting"
-msgstr "对象不支持此动作"
+msgstr "对象不支持当前 locale 设置"
#: dlls/vbscript/vbscript.rc:53 dlls/vbscript/vbscript.rc:54
-#, fuzzy
-#| msgid "Element not found.\n"
msgid "Named argument not found"
-msgstr "找不到元素。\n"
+msgstr "未找到命名参数"
#: dlls/vbscript/vbscript.rc:55
msgid "Wrong number of arguments or invalid property assignment"
-msgstr ""
+msgstr "参数数量错误或无效的指定属性"
#: dlls/vbscript/vbscript.rc:56
-#, fuzzy
-#| msgid "Object Class Violation"
msgid "Object not a collection"
-msgstr "对象类冲突"
+msgstr "对象不是集合"
#: dlls/vbscript/vbscript.rc:57
-#, fuzzy
-#| msgid "Specified control was not found in message"
msgid "Specified DLL function not found"
-msgstr "消息中找不到指定的控制"
+msgstr "未找到指定的 DLL 函数"
#: dlls/vbscript/vbscript.rc:58
msgid "Variable uses an Automation type not supported in VBScript"
-msgstr ""
+msgstr "变量使用了 VBScript 中不支持的自动化类型"
#: dlls/vbscript/vbscript.rc:59
msgid "The remote server machine does not exist or is unavailable"
-msgstr ""
+msgstr "远程服务器不存在或不可用"
#: dlls/vbscript/vbscript.rc:60
msgid "Invalid or unqualified reference"
-msgstr ""
+msgstr "无效或不合格引用"
#: dlls/vbscript/vbscript.rc:62
-#, fuzzy
-#| msgid "Microsoft JScript compilation error"
msgid "Microsoft VBScript compilation error"
-msgstr "Microsoft JScript 编译错误"
+msgstr "Microsoft VBScript 编译错误"
#: dlls/vbscript/vbscript.rc:63
-#, fuzzy
-#| msgid "Microsoft JScript runtime error"
msgid "Microsoft VBScript runtime error"
-msgstr "Microsoft JScript 运行时错误"
+msgstr "Microsoft VBScript 运行时错误"
#: dlls/winemac.drv/winemac.rc:33
msgid "Hide %@"
@@ -11023,33 +10939,27 @@ msgstr "证书至少带有一个不明安全问题。"
#: dlls/wininet/wininet.rc:35
msgid "Effective Date"
-msgstr ""
+msgstr "生效日期"
#: dlls/wininet/wininet.rc:37
-#, fuzzy
-#| msgid "Security"
msgid "Security Protocol"
-msgstr "安全"
+msgstr "安全协议"
#: dlls/wininet/wininet.rc:38
-#, fuzzy
-#| msgid "Signature"
msgid "Signature Type"
-msgstr "签名"
+msgstr "签名类型"
#: dlls/wininet/wininet.rc:39
-#, fuzzy
-#| msgid "Encrypting File System"
msgid "Encryption Type"
-msgstr "正在加密文件系統"
+msgstr "加密类型"
#: dlls/wininet/wininet.rc:40
msgid "Privacy Strength"
-msgstr ""
+msgstr "隐私级别"
#: dlls/wininet/wininet.rc:43
msgid "bits"
-msgstr ""
+msgstr "bits"
#: dlls/wininet/winineterror.mc:26
msgid "The request has timed out.\n"
@@ -12937,6 +12847,9 @@ msgid ""
"\n"
"hardlink hardlink management\n"
msgstr ""
+"- 支持命令 -\n"
+"\n"
+"hardlink 硬链接管理\n"
#: programs/fsutil/fsutil.mc:35
msgid ""
@@ -12944,10 +12857,13 @@ msgid ""
"\n"
"create create a hardlink\n"
msgstr ""
+"- Hardlink - 支持命令 -\n"
+"\n"
+"create 创建硬链接\n"
#: programs/fsutil/fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
-msgstr ""
+msgstr "语法:fsutil hardlink create <new> <existing>\n"
#: programs/hostname/hostname.rc:30
msgid "Usage: hostname\n"
@@ -16713,10 +16629,8 @@ msgid "&Beginner"
msgstr "初学者(&B)"
#: programs/winemine/winemine.rc:45
-#, fuzzy
-#| msgid "Interface"
msgid "&Intermediate"
-msgstr "接口"
+msgstr "&中等"
#: programs/winemine/winemine.rc:46
msgid "&Expert"
@@ -16747,10 +16661,8 @@ msgid "Beginner"
msgstr "初学者"
#: programs/winemine/winemine.rc:65
-#, fuzzy
-#| msgid "Interface"
msgid "Intermediate"
-msgstr "接口"
+msgstr "中等"
#: programs/winemine/winemine.rc:66
msgid "Expert"
--
2.29.2
Dec. 15, 2020
Re: [PATCH] qcap/tests: Use wide-char string literals.
by Zebediah Figura (she/her)
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
Dec. 15, 2020
[PATCH vkd3d 2/2] vkd3d-shader: Move location tracking out of the vkd3d_shader_message_context structure.
by Zebediah Figura
Includes a slight change in behaviour: parse_dxbc() and
vkd3d_shader_serialize_root_signature() now print nothing instead of
"<anonymous>".
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
libs/vkd3d-shader/dxbc.c | 50 ++++++++++++------------
libs/vkd3d-shader/spirv.c | 6 ++-
libs/vkd3d-shader/vkd3d_shader_main.c | 41 +++++++++----------
libs/vkd3d-shader/vkd3d_shader_private.h | 16 +++++---
4 files changed, 58 insertions(+), 55 deletions(-)
diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c
index 9977d1a3..df9245de 100644
--- a/libs/vkd3d-shader/dxbc.c
+++ b/libs/vkd3d-shader/dxbc.c
@@ -2036,7 +2036,7 @@ static int parse_dxbc(const char *data, size_t data_size, struct vkd3d_shader_me
if (data_size < VKD3D_DXBC_HEADER_SIZE)
{
WARN("Invalid data size %zu.\n", data_size);
- vkd3d_shader_error(message_context, VKD3D_SHADER_ERROR_DXBC_INVALID_SIZE,
+ vkd3d_shader_error(message_context, NULL, VKD3D_SHADER_ERROR_DXBC_INVALID_SIZE,
"DXBC size %zu is smaller than the DXBC header size.", data_size);
return VKD3D_ERROR_INVALID_ARGUMENT;
}
@@ -2047,7 +2047,7 @@ static int parse_dxbc(const char *data, size_t data_size, struct vkd3d_shader_me
if (tag != TAG_DXBC)
{
WARN("Wrong tag.\n");
- vkd3d_shader_error(message_context, VKD3D_SHADER_ERROR_DXBC_INVALID_MAGIC, "Invalid DXBC magic.");
+ vkd3d_shader_error(message_context, NULL, VKD3D_SHADER_ERROR_DXBC_INVALID_MAGIC, "Invalid DXBC magic.");
return VKD3D_ERROR_INVALID_ARGUMENT;
}
@@ -2063,7 +2063,7 @@ static int parse_dxbc(const char *data, size_t data_size, struct vkd3d_shader_me
checksum[0], checksum[1], checksum[2], checksum[3],
calculated_checksum[0], calculated_checksum[1],
calculated_checksum[2], calculated_checksum[3]);
- vkd3d_shader_error(message_context, VKD3D_SHADER_ERROR_DXBC_INVALID_CHECKSUM, "Invalid DXBC checksum.");
+ vkd3d_shader_error(message_context, NULL, VKD3D_SHADER_ERROR_DXBC_INVALID_CHECKSUM, "Invalid DXBC checksum.");
return VKD3D_ERROR_INVALID_ARGUMENT;
}
@@ -2072,7 +2072,7 @@ static int parse_dxbc(const char *data, size_t data_size, struct vkd3d_shader_me
if (version != 0x00000001)
{
WARN("Got unexpected DXBC version %#x.\n", version);
- vkd3d_shader_error(message_context, VKD3D_SHADER_ERROR_DXBC_INVALID_VERSION,
+ vkd3d_shader_error(message_context, NULL, VKD3D_SHADER_ERROR_DXBC_INVALID_VERSION,
"DXBC version %#x is not supported.", version);
return VKD3D_ERROR_INVALID_ARGUMENT;
}
@@ -2095,7 +2095,7 @@ static int parse_dxbc(const char *data, size_t data_size, struct vkd3d_shader_me
if (chunk_offset >= data_size || !require_space(chunk_offset, 2, sizeof(DWORD), data_size))
{
WARN("Invalid chunk offset %#x (data size %zu).\n", chunk_offset, data_size);
- vkd3d_shader_error(message_context, VKD3D_SHADER_ERROR_DXBC_INVALID_CHUNK_OFFSET,
+ vkd3d_shader_error(message_context, NULL, VKD3D_SHADER_ERROR_DXBC_INVALID_CHUNK_OFFSET,
"DXBC chunk %u has invalid offset %#x (data size %#zx).", i, chunk_offset, data_size);
return VKD3D_ERROR_INVALID_ARGUMENT;
}
@@ -2109,7 +2109,7 @@ static int parse_dxbc(const char *data, size_t data_size, struct vkd3d_shader_me
{
WARN("Invalid chunk size %#x (data size %zu, chunk offset %#x).\n",
chunk_size, data_size, chunk_offset);
- vkd3d_shader_error(message_context, VKD3D_SHADER_ERROR_DXBC_INVALID_CHUNK_SIZE,
+ vkd3d_shader_error(message_context, NULL, VKD3D_SHADER_ERROR_DXBC_INVALID_CHUNK_SIZE,
"DXBC chunk %u has invalid size %#x (data size %#zx, chunk offset %#x).",
i, chunk_offset, data_size, chunk_offset);
return VKD3D_ERROR_INVALID_ARGUMENT;
@@ -2781,7 +2781,7 @@ int vkd3d_shader_parse_root_signature(const struct vkd3d_shader_code *dxbc,
memset(root_signature, 0, sizeof(*root_signature));
if (messages)
*messages = NULL;
- vkd3d_shader_message_context_init(&message_context, VKD3D_SHADER_LOG_INFO, NULL);
+ vkd3d_shader_message_context_init(&message_context, VKD3D_SHADER_LOG_INFO);
ret = parse_dxbc(dxbc->code, dxbc->size, &message_context, rts0_handler, root_signature);
vkd3d_shader_message_context_trace_messages(&message_context);
@@ -2935,7 +2935,7 @@ static int shader_write_root_signature_header(struct root_signature_writer_conte
return VKD3D_OK;
fail:
- vkd3d_shader_error(&context->message_context, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
+ vkd3d_shader_error(&context->message_context, NULL, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
"Out of memory while writing root signature header.");
return VKD3D_ERROR_OUT_OF_MEMORY;
}
@@ -2963,7 +2963,7 @@ static int shader_write_descriptor_ranges(struct root_signature_writer_context *
return VKD3D_OK;
fail:
- vkd3d_shader_error(&context->message_context, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
+ vkd3d_shader_error(&context->message_context, NULL, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
"Out of memory while writing root signature descriptor ranges.");
return VKD3D_ERROR_OUT_OF_MEMORY;
}
@@ -2993,7 +2993,7 @@ static int shader_write_descriptor_ranges1(struct root_signature_writer_context
return VKD3D_OK;
fail:
- vkd3d_shader_error(&context->message_context, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
+ vkd3d_shader_error(&context->message_context, NULL, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
"Out of memory while writing root signature descriptor ranges.");
return VKD3D_ERROR_OUT_OF_MEMORY;
}
@@ -3009,7 +3009,7 @@ static int shader_write_descriptor_table(struct root_signature_writer_context *c
return shader_write_descriptor_ranges(context, table);
fail:
- vkd3d_shader_error(&context->message_context, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
+ vkd3d_shader_error(&context->message_context, NULL, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
"Out of memory while writing root signature root descriptor table.");
return VKD3D_ERROR_OUT_OF_MEMORY;
}
@@ -3025,7 +3025,7 @@ static int shader_write_descriptor_table1(struct root_signature_writer_context *
return shader_write_descriptor_ranges1(context, table);
fail:
- vkd3d_shader_error(&context->message_context, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
+ vkd3d_shader_error(&context->message_context, NULL, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
"Out of memory while writing root signature root descriptor table.");
return VKD3D_ERROR_OUT_OF_MEMORY;
}
@@ -3043,7 +3043,7 @@ static int shader_write_root_constants(struct root_signature_writer_context *con
return VKD3D_OK;
fail:
- vkd3d_shader_error(&context->message_context, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
+ vkd3d_shader_error(&context->message_context, NULL, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
"Out of memory while writing root signature root constants.");
return VKD3D_ERROR_OUT_OF_MEMORY;
}
@@ -3059,7 +3059,7 @@ static int shader_write_root_descriptor(struct root_signature_writer_context *co
return VKD3D_OK;
fail:
- vkd3d_shader_error(&context->message_context, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
+ vkd3d_shader_error(&context->message_context, NULL, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
"Out of memory while writing root signature root descriptor.");
return VKD3D_ERROR_OUT_OF_MEMORY;
}
@@ -3077,7 +3077,7 @@ static int shader_write_root_descriptor1(struct root_signature_writer_context *c
return VKD3D_OK;
fail:
- vkd3d_shader_error(&context->message_context, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
+ vkd3d_shader_error(&context->message_context, NULL, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
"Out of memory while writing root signature root descriptor.");
return VKD3D_ERROR_OUT_OF_MEMORY;
}
@@ -3126,7 +3126,7 @@ static int shader_write_root_parameters(struct root_signature_writer_context *co
break;
default:
FIXME("Unrecognized type %#x.\n", versioned_root_signature_get_parameter_type(desc, i));
- vkd3d_shader_error(&context->message_context, VKD3D_SHADER_ERROR_RS_INVALID_ROOT_PARAMETER_TYPE,
+ vkd3d_shader_error(&context->message_context, NULL, VKD3D_SHADER_ERROR_RS_INVALID_ROOT_PARAMETER_TYPE,
"Invalid/unrecognised root signature root parameter type %#x.",
versioned_root_signature_get_parameter_type(desc, i));
return VKD3D_ERROR_INVALID_ARGUMENT;
@@ -3139,7 +3139,7 @@ static int shader_write_root_parameters(struct root_signature_writer_context *co
return VKD3D_OK;
fail:
- vkd3d_shader_error(&context->message_context, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
+ vkd3d_shader_error(&context->message_context, NULL, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
"Out of memory while writing root signature root parameters.");
return VKD3D_ERROR_OUT_OF_MEMORY;
}
@@ -3183,7 +3183,7 @@ static int shader_write_static_samplers(struct root_signature_writer_context *co
return VKD3D_OK;
fail:
- vkd3d_shader_error(&context->message_context, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
+ vkd3d_shader_error(&context->message_context, NULL, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
"Out of memory while writing root signature static samplers.");
return VKD3D_ERROR_OUT_OF_MEMORY;
}
@@ -3218,7 +3218,7 @@ static int shader_write_root_signature(struct root_signature_writer_context *con
return shader_write_static_samplers(context, desc);
fail:
- vkd3d_shader_error(&context->message_context, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
+ vkd3d_shader_error(&context->message_context, NULL, VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY,
"Out of memory while writing root signature.");
return VKD3D_ERROR_OUT_OF_MEMORY;
}
@@ -3247,7 +3247,7 @@ static int validate_descriptor_table_v_1_0(const struct vkd3d_shader_root_descri
else
{
WARN("Invalid descriptor range type %#x.\n", r->range_type);
- vkd3d_shader_error(message_context, VKD3D_SHADER_ERROR_RS_INVALID_DESCRIPTOR_RANGE_TYPE,
+ vkd3d_shader_error(message_context, NULL, VKD3D_SHADER_ERROR_RS_INVALID_DESCRIPTOR_RANGE_TYPE,
"Invalid root signature descriptor range type %#x.", r->range_type);
return VKD3D_ERROR_INVALID_ARGUMENT;
}
@@ -3256,7 +3256,7 @@ static int validate_descriptor_table_v_1_0(const struct vkd3d_shader_root_descri
if (have_srv_uav_cbv && have_sampler)
{
WARN("Samplers cannot be mixed with CBVs/SRVs/UAVs in descriptor tables.\n");
- vkd3d_shader_error(message_context, VKD3D_SHADER_ERROR_RS_MIXED_DESCRIPTOR_RANGE_TYPES,
+ vkd3d_shader_error(message_context, NULL, VKD3D_SHADER_ERROR_RS_MIXED_DESCRIPTOR_RANGE_TYPES,
"Encountered both CBV/SRV/UAV and sampler descriptor ranges in the same root descriptor table.");
return VKD3D_ERROR_INVALID_ARGUMENT;
}
@@ -3288,7 +3288,7 @@ static int validate_descriptor_table_v_1_1(const struct vkd3d_shader_root_descri
else
{
WARN("Invalid descriptor range type %#x.\n", r->range_type);
- vkd3d_shader_error(message_context, VKD3D_SHADER_ERROR_RS_INVALID_DESCRIPTOR_RANGE_TYPE,
+ vkd3d_shader_error(message_context, NULL, VKD3D_SHADER_ERROR_RS_INVALID_DESCRIPTOR_RANGE_TYPE,
"Invalid root signature descriptor range type %#x.", r->range_type);
return VKD3D_ERROR_INVALID_ARGUMENT;
}
@@ -3297,7 +3297,7 @@ static int validate_descriptor_table_v_1_1(const struct vkd3d_shader_root_descri
if (have_srv_uav_cbv && have_sampler)
{
WARN("Samplers cannot be mixed with CBVs/SRVs/UAVs in descriptor tables.\n");
- vkd3d_shader_error(message_context, VKD3D_SHADER_ERROR_RS_MIXED_DESCRIPTOR_RANGE_TYPES,
+ vkd3d_shader_error(message_context, NULL, VKD3D_SHADER_ERROR_RS_MIXED_DESCRIPTOR_RANGE_TYPES,
"Encountered both CBV/SRV/UAV and sampler descriptor ranges in the same root descriptor table.");
return VKD3D_ERROR_INVALID_ARGUMENT;
}
@@ -3345,14 +3345,14 @@ int vkd3d_shader_serialize_root_signature(const struct vkd3d_shader_versioned_ro
*messages = NULL;
memset(&context, 0, sizeof(context));
- vkd3d_shader_message_context_init(&context.message_context, VKD3D_SHADER_LOG_INFO, NULL);
+ vkd3d_shader_message_context_init(&context.message_context, VKD3D_SHADER_LOG_INFO);
if (root_signature->version != VKD3D_SHADER_ROOT_SIGNATURE_VERSION_1_0
&& root_signature->version != VKD3D_SHADER_ROOT_SIGNATURE_VERSION_1_1)
{
ret = VKD3D_ERROR_INVALID_ARGUMENT;
WARN("Root signature version %#x not supported.\n", root_signature->version);
- vkd3d_shader_error(&context.message_context, VKD3D_SHADER_ERROR_RS_INVALID_VERSION,
+ vkd3d_shader_error(&context.message_context, NULL, VKD3D_SHADER_ERROR_RS_INVALID_VERSION,
"Root signature version %#x is not supported.", root_signature->version);
goto done;
}
diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c
index cb9c7a12..61d0d472 100644
--- a/libs/vkd3d-shader/spirv.c
+++ b/libs/vkd3d-shader/spirv.c
@@ -2155,6 +2155,7 @@ struct vkd3d_dxbc_compiler
struct vkd3d_spirv_builder spirv_builder;
struct vkd3d_shader_message_context *message_context;
+ struct vkd3d_shader_location location;
bool failed;
bool strip_debug;
@@ -2245,6 +2246,8 @@ struct vkd3d_dxbc_compiler *vkd3d_dxbc_compiler_create(const struct vkd3d_shader
memset(compiler, 0, sizeof(*compiler));
compiler->message_context = message_context;
+ compiler->location.source_name = compile_info->source_name;
+ compiler->location.line = 2; /* Line 1 is the version token. */
if ((target_info = vkd3d_find_struct(compile_info->next, SPIRV_TARGET_INFO)))
{
@@ -2452,7 +2455,7 @@ static void VKD3D_PRINTF_FUNC(3, 4) vkd3d_dxbc_compiler_error(struct vkd3d_dxbc_
va_list args;
va_start(args, format);
- vkd3d_shader_verror(compiler->message_context, error, format, args);
+ vkd3d_shader_verror(compiler->message_context, &compiler->location, error, format, args);
va_end(args);
compiler->failed = true;
}
@@ -9194,6 +9197,7 @@ int vkd3d_dxbc_compiler_handle_instruction(struct vkd3d_dxbc_compiler *compiler,
FIXME("Unhandled instruction %#x.\n", instruction->handler_idx);
}
+ ++compiler->location.line;
return ret;
}
diff --git a/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d-shader/vkd3d_shader_main.c
index 2ea233bb..53e22789 100644
--- a/libs/vkd3d-shader/vkd3d_shader_main.c
+++ b/libs/vkd3d-shader/vkd3d_shader_main.c
@@ -108,13 +108,9 @@ void vkd3d_string_buffer_trace_(const struct vkd3d_string_buffer *buffer, const
}
void vkd3d_shader_message_context_init(struct vkd3d_shader_message_context *context,
- enum vkd3d_shader_log_level log_level, const char *source_name)
+ enum vkd3d_shader_log_level log_level)
{
context->log_level = log_level;
- context->source_name = source_name ? source_name : "<anonymous>";
- context->line = 0;
- context->column = 0;
-
vkd3d_string_buffer_init(&context->messages);
}
@@ -148,28 +144,28 @@ bool vkd3d_shader_message_context_copy_messages(struct vkd3d_shader_message_cont
return true;
}
-void vkd3d_shader_verror(struct vkd3d_shader_message_context *context,
+void vkd3d_shader_verror(struct vkd3d_shader_message_context *context, const struct vkd3d_shader_location *location,
enum vkd3d_shader_error error, const char *format, va_list args)
{
if (context->log_level < VKD3D_SHADER_LOG_ERROR)
return;
- if (context->line)
+ if (location)
vkd3d_string_buffer_printf(&context->messages, "%s:%u:%u: E%04u: ",
- context->source_name, context->line, context->column, error);
+ location->source_name ? location->source_name : "<anonymous>", location->line, location->column, error);
else
- vkd3d_string_buffer_printf(&context->messages, "%s: E%04u: ", context->source_name, error);
+ vkd3d_string_buffer_printf(&context->messages, "E%04u: ", error);
vkd3d_string_buffer_vprintf(&context->messages, format, args);
vkd3d_string_buffer_printf(&context->messages, "\n");
}
-void vkd3d_shader_error(struct vkd3d_shader_message_context *context,
+void vkd3d_shader_error(struct vkd3d_shader_message_context *context, const struct vkd3d_shader_location *location,
enum vkd3d_shader_error error, const char *format, ...)
{
va_list args;
va_start(args, format);
- vkd3d_shader_verror(context, error, format, args);
+ vkd3d_shader_verror(context, location, error, format, args);
va_end(args);
}
@@ -307,6 +303,7 @@ struct vkd3d_shader_scan_context
size_t descriptors_size;
struct vkd3d_shader_message_context *message_context;
+ struct vkd3d_shader_location location;
struct vkd3d_shader_cf_info
{
@@ -332,12 +329,15 @@ struct vkd3d_shader_scan_context
};
static void vkd3d_shader_scan_context_init(struct vkd3d_shader_scan_context *context,
+ const struct vkd3d_shader_compile_info *compile_info,
struct vkd3d_shader_scan_descriptor_info *scan_descriptor_info,
struct vkd3d_shader_message_context *message_context)
{
memset(context, 0, sizeof(*context));
context->scan_descriptor_info = scan_descriptor_info;
context->message_context = message_context;
+ context->location.source_name = compile_info->source_name;
+ context->location.line = 2; /* Line 1 is the version token. */
}
static void vkd3d_shader_scan_context_cleanup(struct vkd3d_shader_scan_context *context)
@@ -606,7 +606,7 @@ static void vkd3d_shader_scan_error(struct vkd3d_shader_scan_context *context,
va_list args;
va_start(args, format);
- vkd3d_shader_verror(context->message_context, error, format, args);
+ vkd3d_shader_verror(context->message_context, &context->location, error, format, args);
va_end(args);
}
@@ -774,6 +774,7 @@ static int vkd3d_shader_scan_instruction(struct vkd3d_shader_scan_context *conte
if (vkd3d_shader_instruction_is_uav_counter(instruction))
vkd3d_shader_scan_record_uav_counter(context, &instruction->src[0].reg);
+ ++context->location.line;
return VKD3D_OK;
}
@@ -792,7 +793,7 @@ static int scan_dxbc(const struct vkd3d_shader_compile_info *compile_info,
scan_descriptor_info->descriptor_count = 0;
}
- vkd3d_shader_scan_context_init(&context, scan_descriptor_info, message_context);
+ vkd3d_shader_scan_context_init(&context, compile_info, scan_descriptor_info, message_context);
if ((ret = vkd3d_shader_parser_init(&parser, &compile_info->source, message_context)) < 0)
{
@@ -803,8 +804,6 @@ static int scan_dxbc(const struct vkd3d_shader_compile_info *compile_info,
if (TRACE_ON())
vkd3d_shader_trace(parser.data);
- message_context->line = 2; /* Line 1 is the version token. */
- message_context->column = 1;
while (!shader_sm4_is_end(parser.data, &parser.ptr))
{
shader_sm4_read_instruction(parser.data, &parser.ptr, &instruction);
@@ -824,7 +823,6 @@ static int scan_dxbc(const struct vkd3d_shader_compile_info *compile_info,
vkd3d_shader_free_scan_descriptor_info(scan_descriptor_info);
goto done;
}
- ++message_context->line;
}
ret = VKD3D_OK;
@@ -848,7 +846,7 @@ int vkd3d_shader_scan(const struct vkd3d_shader_compile_info *compile_info, char
if ((ret = vkd3d_shader_validate_compile_info(compile_info, true)) < 0)
return ret;
- vkd3d_shader_message_context_init(&message_context, compile_info->log_level, compile_info->source_name);
+ vkd3d_shader_message_context_init(&message_context, compile_info->log_level);
ret = scan_dxbc(compile_info, &message_context);
@@ -902,8 +900,6 @@ static int compile_dxbc_tpf(const struct vkd3d_shader_compile_info *compile_info
return VKD3D_ERROR;
}
- message_context->line = 2; /* Line 1 is the version token. */
- message_context->column = 1;
while (!shader_sm4_is_end(parser.data, &parser.ptr))
{
shader_sm4_read_instruction(parser.data, &parser.ptr, &instruction);
@@ -917,7 +913,6 @@ static int compile_dxbc_tpf(const struct vkd3d_shader_compile_info *compile_info
if ((ret = vkd3d_dxbc_compiler_handle_instruction(spirv_compiler, &instruction)) < 0)
break;
- ++message_context->line;
}
if (ret >= 0)
@@ -949,7 +944,7 @@ int vkd3d_shader_compile(const struct vkd3d_shader_compile_info *compile_info,
if ((ret = vkd3d_shader_validate_compile_info(compile_info, true)) < 0)
return ret;
- vkd3d_shader_message_context_init(&message_context, compile_info->log_level, compile_info->source_name);
+ vkd3d_shader_message_context_init(&message_context, compile_info->log_level);
switch (compile_info->source_type)
{
@@ -1051,7 +1046,7 @@ int vkd3d_shader_parse_input_signature(const struct vkd3d_shader_code *dxbc,
if (messages)
*messages = NULL;
- vkd3d_shader_message_context_init(&message_context, VKD3D_SHADER_LOG_INFO, NULL);
+ vkd3d_shader_message_context_init(&message_context, VKD3D_SHADER_LOG_INFO);
ret = shader_parse_input_signature(dxbc->code, dxbc->size, &message_context, signature);
vkd3d_shader_message_context_trace_messages(&message_context);
@@ -1174,7 +1169,7 @@ int vkd3d_shader_preprocess(const struct vkd3d_shader_compile_info *compile_info
if ((ret = vkd3d_shader_validate_compile_info(compile_info, false)) < 0)
return ret;
- vkd3d_shader_message_context_init(&message_context, compile_info->log_level, compile_info->source_name);
+ vkd3d_shader_message_context_init(&message_context, compile_info->log_level);
ret = preproc_lexer_parse(compile_info, out, &message_context);
diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h
index 83038384..7b0e0fc0 100644
--- a/libs/vkd3d-shader/vkd3d_shader_private.h
+++ b/libs/vkd3d-shader/vkd3d_shader_private.h
@@ -844,11 +844,15 @@ int vkd3d_string_buffer_printf(struct vkd3d_string_buffer *buffer,
void vkd3d_string_buffer_trace_(const struct vkd3d_string_buffer *buffer, const char *function) DECLSPEC_HIDDEN;
int vkd3d_string_buffer_vprintf(struct vkd3d_string_buffer *buffer, const char *format, va_list args) DECLSPEC_HIDDEN;
-struct vkd3d_shader_message_context
+struct vkd3d_shader_location
{
- enum vkd3d_shader_log_level log_level;
const char *source_name;
unsigned int line, column;
+};
+
+struct vkd3d_shader_message_context
+{
+ enum vkd3d_shader_log_level log_level;
struct vkd3d_string_buffer messages;
};
@@ -856,14 +860,14 @@ void vkd3d_shader_message_context_cleanup(struct vkd3d_shader_message_context *c
bool vkd3d_shader_message_context_copy_messages(struct vkd3d_shader_message_context *context,
char **out) DECLSPEC_HIDDEN;
void vkd3d_shader_message_context_init(struct vkd3d_shader_message_context *context,
- enum vkd3d_shader_log_level log_level, const char *source_name) DECLSPEC_HIDDEN;
+ enum vkd3d_shader_log_level log_level) DECLSPEC_HIDDEN;
void vkd3d_shader_message_context_trace_messages_(const struct vkd3d_shader_message_context *context,
const char *function) DECLSPEC_HIDDEN;
#define vkd3d_shader_message_context_trace_messages(context) \
vkd3d_shader_message_context_trace_messages_(context, __FUNCTION__)
-void vkd3d_shader_error(struct vkd3d_shader_message_context *context, enum vkd3d_shader_error error,
- const char *format, ...) VKD3D_PRINTF_FUNC(3, 4) DECLSPEC_HIDDEN;
-void vkd3d_shader_verror(struct vkd3d_shader_message_context *context,
+void vkd3d_shader_error(struct vkd3d_shader_message_context *context, const struct vkd3d_shader_location *location,
+ enum vkd3d_shader_error error, const char *format, ...) VKD3D_PRINTF_FUNC(4, 5) DECLSPEC_HIDDEN;
+void vkd3d_shader_verror(struct vkd3d_shader_message_context *context, const struct vkd3d_shader_location *location,
enum vkd3d_shader_error error, const char *format, va_list args) DECLSPEC_HIDDEN;
int shader_extract_from_dxbc(const void *dxbc, size_t dxbc_length,
--
2.29.2
Dec. 15, 2020
[PATCH vkd3d 1/2] vkd3d-shader: Introduce a helper to report errors while scanning.
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
libs/vkd3d-shader/vkd3d_shader_main.c | 32 ++++++++++++++++++---------
1 file changed, 21 insertions(+), 11 deletions(-)
diff --git a/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d-shader/vkd3d_shader_main.c
index eed0316c..2ea233bb 100644
--- a/libs/vkd3d-shader/vkd3d_shader_main.c
+++ b/libs/vkd3d-shader/vkd3d_shader_main.c
@@ -600,6 +600,16 @@ static void vkd3d_shader_scan_typed_resource_declaration(struct vkd3d_shader_sca
semantic->resource_type, resource_data_type);
}
+static void vkd3d_shader_scan_error(struct vkd3d_shader_scan_context *context,
+ enum vkd3d_shader_error error, const char *format, ...)
+{
+ va_list args;
+
+ va_start(args, format);
+ vkd3d_shader_verror(context->message_context, error, format, args);
+ va_end(args);
+}
+
static int vkd3d_shader_scan_instruction(struct vkd3d_shader_scan_context *context,
const struct vkd3d_shader_instruction *instruction)
{
@@ -636,7 +646,7 @@ static int vkd3d_shader_scan_instruction(struct vkd3d_shader_scan_context *conte
case VKD3DSIH_ELSE:
if (!(cf_info = vkd3d_shader_scan_get_current_cf_info(context)) || cf_info->type != VKD3D_SHADER_BLOCK_IF)
{
- vkd3d_shader_error(context->message_context, VKD3D_SHADER_ERROR_TPF_MISMATCHED_CF,
+ vkd3d_shader_scan_error(context, VKD3D_SHADER_ERROR_TPF_MISMATCHED_CF,
"Encountered ‘else’ instruction without corresponding ‘if’ block.");
return VKD3D_ERROR_INVALID_SHADER;
}
@@ -645,7 +655,7 @@ static int vkd3d_shader_scan_instruction(struct vkd3d_shader_scan_context *conte
case VKD3DSIH_ENDIF:
if (!(cf_info = vkd3d_shader_scan_get_current_cf_info(context)) || cf_info->type != VKD3D_SHADER_BLOCK_IF)
{
- vkd3d_shader_error(context->message_context, VKD3D_SHADER_ERROR_TPF_MISMATCHED_CF,
+ vkd3d_shader_scan_error(context, VKD3D_SHADER_ERROR_TPF_MISMATCHED_CF,
"Encountered ‘endif’ instruction without corresponding ‘if’ block.");
return VKD3D_ERROR_INVALID_SHADER;
}
@@ -658,7 +668,7 @@ static int vkd3d_shader_scan_instruction(struct vkd3d_shader_scan_context *conte
case VKD3DSIH_ENDLOOP:
if (!(cf_info = vkd3d_shader_scan_get_current_cf_info(context)) || cf_info->type != VKD3D_SHADER_BLOCK_LOOP)
{
- vkd3d_shader_error(context->message_context, VKD3D_SHADER_ERROR_TPF_MISMATCHED_CF,
+ vkd3d_shader_scan_error(context, VKD3D_SHADER_ERROR_TPF_MISMATCHED_CF,
"Encountered ‘endloop’ instruction without corresponding ‘loop’ block.");
return VKD3D_ERROR_INVALID_SHADER;
}
@@ -672,7 +682,7 @@ static int vkd3d_shader_scan_instruction(struct vkd3d_shader_scan_context *conte
if (!(cf_info = vkd3d_shader_scan_get_current_cf_info(context))
|| cf_info->type != VKD3D_SHADER_BLOCK_SWITCH || cf_info->inside_block)
{
- vkd3d_shader_error(context->message_context, VKD3D_SHADER_ERROR_TPF_MISMATCHED_CF,
+ vkd3d_shader_scan_error(context, VKD3D_SHADER_ERROR_TPF_MISMATCHED_CF,
"Encountered ‘endswitch’ instruction without corresponding ‘switch’ block.");
return VKD3D_ERROR_INVALID_SHADER;
}
@@ -682,7 +692,7 @@ static int vkd3d_shader_scan_instruction(struct vkd3d_shader_scan_context *conte
if (!(cf_info = vkd3d_shader_scan_get_current_cf_info(context))
|| cf_info->type != VKD3D_SHADER_BLOCK_SWITCH)
{
- vkd3d_shader_error(context->message_context, VKD3D_SHADER_ERROR_TPF_MISMATCHED_CF,
+ vkd3d_shader_scan_error(context, VKD3D_SHADER_ERROR_TPF_MISMATCHED_CF,
"Encountered ‘case’ instruction outside switch block.");
return VKD3D_ERROR_INVALID_SHADER;
}
@@ -692,13 +702,13 @@ static int vkd3d_shader_scan_instruction(struct vkd3d_shader_scan_context *conte
if (!(cf_info = vkd3d_shader_scan_get_current_cf_info(context))
|| cf_info->type != VKD3D_SHADER_BLOCK_SWITCH)
{
- vkd3d_shader_error(context->message_context, VKD3D_SHADER_ERROR_TPF_MISMATCHED_CF,
+ vkd3d_shader_scan_error(context, VKD3D_SHADER_ERROR_TPF_MISMATCHED_CF,
"Encountered ‘default’ instruction outside switch block.");
return VKD3D_ERROR_INVALID_SHADER;
}
if (cf_info->has_default)
{
- vkd3d_shader_error(context->message_context, VKD3D_SHADER_ERROR_TPF_MISMATCHED_CF,
+ vkd3d_shader_scan_error(context, VKD3D_SHADER_ERROR_TPF_MISMATCHED_CF,
"Encountered duplicate ‘default’ instruction inside the current switch block.");
return VKD3D_ERROR_INVALID_SHADER;
}
@@ -708,7 +718,7 @@ static int vkd3d_shader_scan_instruction(struct vkd3d_shader_scan_context *conte
case VKD3DSIH_BREAK:
if (!(cf_info = vkd3d_shader_scan_find_innermost_breakable_cf_info(context)))
{
- vkd3d_shader_error(context->message_context, VKD3D_SHADER_ERROR_TPF_MISMATCHED_CF,
+ vkd3d_shader_scan_error(context, VKD3D_SHADER_ERROR_TPF_MISMATCHED_CF,
"Encountered ‘break’ instruction outside breakable block.");
return VKD3D_ERROR_INVALID_SHADER;
}
@@ -717,7 +727,7 @@ static int vkd3d_shader_scan_instruction(struct vkd3d_shader_scan_context *conte
case VKD3DSIH_BREAKP:
if (!(cf_info = vkd3d_shader_scan_find_innermost_loop_cf_info(context)))
{
- vkd3d_shader_error(context->message_context, VKD3D_SHADER_ERROR_TPF_MISMATCHED_CF,
+ vkd3d_shader_scan_error(context, VKD3D_SHADER_ERROR_TPF_MISMATCHED_CF,
"Encountered ‘breakp’ instruction outside loop.");
return VKD3D_ERROR_INVALID_SHADER;
}
@@ -725,7 +735,7 @@ static int vkd3d_shader_scan_instruction(struct vkd3d_shader_scan_context *conte
case VKD3DSIH_CONTINUE:
if (!(cf_info = vkd3d_shader_scan_find_innermost_loop_cf_info(context)))
{
- vkd3d_shader_error(context->message_context, VKD3D_SHADER_ERROR_TPF_MISMATCHED_CF,
+ vkd3d_shader_scan_error(context, VKD3D_SHADER_ERROR_TPF_MISMATCHED_CF,
"Encountered ‘continue’ instruction outside loop.");
return VKD3D_ERROR_INVALID_SHADER;
}
@@ -734,7 +744,7 @@ static int vkd3d_shader_scan_instruction(struct vkd3d_shader_scan_context *conte
case VKD3DSIH_CONTINUEP:
if (!(cf_info = vkd3d_shader_scan_find_innermost_loop_cf_info(context)))
{
- vkd3d_shader_error(context->message_context, VKD3D_SHADER_ERROR_TPF_MISMATCHED_CF,
+ vkd3d_shader_scan_error(context, VKD3D_SHADER_ERROR_TPF_MISMATCHED_CF,
"Encountered ‘continue’ instruction outside loop.");
return VKD3D_ERROR_INVALID_SHADER;
}
--
2.29.2
Dec. 15, 2020
[PATCH vkd3d] build: Create object directories before running bison or flex.
by Zebediah Figura
Vkd3d-Bug: https://bugs.winehq.org/show_bug.cgi?id=50334
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
Makefile.am | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Makefile.am b/Makefile.am
index 32c8777f..bf1d7bfa 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -119,9 +119,11 @@ vkd3d_v_bison_0 = @echo " BISON " $@;
vkd3d_v_bison_1 =
libs/vkd3d-shader/preproc.yy.c: libs/vkd3d-shader/preproc.l
+ @$(MKDIR_P) libs/vkd3d-shader
$(VKD3D_V_FLEX)$(FLEX) $(LFLAGS) -o $@ $<
libs/vkd3d-shader/preproc.tab.c libs/vkd3d-shader/preproc.tab.h &: libs/vkd3d-shader/preproc.y
+ @$(MKDIR_P) libs/vkd3d-shader
$(VKD3D_V_BISON)$(BISON) $(YFLAGS) -d -o libs/vkd3d-shader/preproc.tab.c $<
BUILT_SOURCES += libs/vkd3d-shader/preproc.tab.h
--
2.29.2
Dec. 15, 2020
[PATCH] qcap/tests: Use wide-char string literals.
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/qcap/tests/audiorecord.c | 9 ++----
dlls/qcap/tests/avico.c | 54 +++++++++++++-------------------
dlls/qcap/tests/avimux.c | 31 +++++++++---------
dlls/qcap/tests/smartteefilter.c | 36 ++++++++++-----------
4 files changed, 55 insertions(+), 75 deletions(-)
diff --git a/dlls/qcap/tests/audiorecord.c b/dlls/qcap/tests/audiorecord.c
index dc74c3cfc15..350ae986b44 100644
--- a/dlls/qcap/tests/audiorecord.c
+++ b/dlls/qcap/tests/audiorecord.c
@@ -176,18 +176,15 @@ static ULONG WINAPI property_bag_Release(IPropertyBag *iface)
ok(0, "Unexpected call.\n");
return 1;
}
-
-static const WCHAR waveinidW[] = {'W','a','v','e','I','n','I','d',0};
-static const WCHAR usemixerW[] = {'U','s','e','M','i','x','e','r',0};
static int ppb_id;
static unsigned int ppb_got_read;
static HRESULT WINAPI property_bag_Read(IPropertyBag *iface, const WCHAR *name, VARIANT *var, IErrorLog *log)
{
- if (!lstrcmpW(name, usemixerW))
+ if (!lstrcmpW(name, L"UseMixer"))
return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
- todo_wine ok(!lstrcmpW(name, waveinidW), "Got unexpected name %s.\n", wine_dbgstr_w(name));
+ todo_wine ok(!lstrcmpW(name, L"WaveInId"), "Got unexpected name %s.\n", wine_dbgstr_w(name));
ok(V_VT(var) == VT_I4, "Got unexpected type %u.\n", V_VT(var));
ok(!log, "Got unexpected error log %p.\n", log);
ppb_got_read++;
@@ -222,7 +219,7 @@ static void test_property_bag(IMoniker *mon)
ok(hr == S_OK, "Got hr %#x.\n", hr);
VariantInit(&var);
- hr = IPropertyBag_Read(devenum_bag, waveinidW, &var, NULL);
+ hr = IPropertyBag_Read(devenum_bag, L"WaveInId", &var, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ppb_id = V_I4(&var);
diff --git a/dlls/qcap/tests/avico.c b/dlls/qcap/tests/avico.c
index b4f52f10210..332ca5a8e7d 100644
--- a/dlls/qcap/tests/avico.c
+++ b/dlls/qcap/tests/avico.c
@@ -23,11 +23,6 @@
#include "vfw.h"
#include "wine/test.h"
-static const WCHAR sink_id[] = {'I','n',0};
-static const WCHAR source_id[] = {'O','u','t',0};
-static const WCHAR sink_name[] = {'I','n','p','u','t',0};
-static const WCHAR source_name[] = {'O','u','t','p','u','t',0};
-
static const DWORD test_fourcc = mmioFOURCC('w','t','s','t');
#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c)
@@ -74,7 +69,7 @@ static void test_interfaces(IBaseFilter *filter)
check_interface(filter, &IID_IReferenceClock, FALSE);
check_interface(filter, &IID_IVideoWindow, FALSE);
- IBaseFilter_FindPin(filter, sink_id, &pin);
+ IBaseFilter_FindPin(filter, L"In", &pin);
check_interface(pin, &IID_IMemInputPin, TRUE);
check_interface(pin, &IID_IPin, TRUE);
@@ -85,7 +80,7 @@ static void test_interfaces(IBaseFilter *filter)
check_interface(pin, &IID_IMediaSeeking, FALSE);
IPin_Release(pin);
- IBaseFilter_FindPin(filter, source_id, &pin);
+ IBaseFilter_FindPin(filter, L"Out", &pin);
todo_wine check_interface(pin, &IID_IMediaPosition, TRUE);
todo_wine check_interface(pin, &IID_IMediaSeeking, TRUE);
@@ -319,7 +314,7 @@ static void test_find_pin(IBaseFilter *filter)
hr = IBaseFilter_EnumPins(filter, &enum_pins);
ok(hr == S_OK, "Got hr %#x.\n", hr);
- hr = IBaseFilter_FindPin(filter, sink_id, &pin);
+ hr = IBaseFilter_FindPin(filter, L"In", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
@@ -327,7 +322,7 @@ static void test_find_pin(IBaseFilter *filter)
IPin_Release(pin);
IPin_Release(pin2);
- hr = IBaseFilter_FindPin(filter, source_id, &pin);
+ hr = IBaseFilter_FindPin(filter, L"Out", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
@@ -335,9 +330,9 @@ static void test_find_pin(IBaseFilter *filter)
IPin_Release(pin);
IPin_Release(pin2);
- hr = IBaseFilter_FindPin(filter, sink_name, &pin);
+ hr = IBaseFilter_FindPin(filter, L"Input", &pin);
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
- hr = IBaseFilter_FindPin(filter, source_name, &pin);
+ hr = IBaseFilter_FindPin(filter, L"Output", &pin);
ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
IEnumPins_Release(enum_pins);
@@ -351,14 +346,14 @@ static void test_pin_info(IBaseFilter *filter)
WCHAR *id;
IPin *pin;
- hr = IBaseFilter_FindPin(filter, sink_id, &pin);
+ hr = IBaseFilter_FindPin(filter, L"In", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IPin_QueryPinInfo(pin, &info);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir);
- todo_wine ok(!lstrcmpW(info.achName, sink_name), "Got name %s.\n", wine_dbgstr_w(info.achName));
+ todo_wine ok(!lstrcmpW(info.achName, L"Input"), "Got name %s.\n", wine_dbgstr_w(info.achName));
IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir);
@@ -367,19 +362,19 @@ static void test_pin_info(IBaseFilter *filter)
hr = IPin_QueryId(pin, &id);
ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(!lstrcmpW(id, sink_id), "Got id %s.\n", wine_dbgstr_w(id));
+ ok(!lstrcmpW(id, L"In"), "Got id %s.\n", wine_dbgstr_w(id));
CoTaskMemFree(id);
IPin_Release(pin);
- hr = IBaseFilter_FindPin(filter, source_id, &pin);
+ hr = IBaseFilter_FindPin(filter, L"Out", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IPin_QueryPinInfo(pin, &info);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
ok(info.dir == PINDIR_OUTPUT, "Got direction %d.\n", info.dir);
- todo_wine ok(!lstrcmpW(info.achName, source_name), "Got name %s.\n", wine_dbgstr_w(info.achName));
+ todo_wine ok(!lstrcmpW(info.achName, L"Output"), "Got name %s.\n", wine_dbgstr_w(info.achName));
IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir);
@@ -388,7 +383,7 @@ static void test_pin_info(IBaseFilter *filter)
hr = IPin_QueryId(pin, &id);
ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(!lstrcmpW(id, source_id), "Got id %s.\n", wine_dbgstr_w(id));
+ ok(!lstrcmpW(id, L"Out"), "Got id %s.\n", wine_dbgstr_w(id));
CoTaskMemFree(id);
IPin_Release(pin);
@@ -397,7 +392,6 @@ static void test_pin_info(IBaseFilter *filter)
static LRESULT CALLBACK driver_proc(DWORD_PTR id, HDRVR driver, UINT msg,
LPARAM lparam1, LPARAM lparam2)
{
- static const WCHAR nameW[] = {'f','o','o',0};
if (winetest_debug > 1) trace("msg %#x, lparam1 %#lx, lparam2 %#lx.\n", msg, lparam1, lparam2);
switch (msg)
@@ -415,8 +409,8 @@ static LRESULT CALLBACK driver_proc(DWORD_PTR id, HDRVR driver, UINT msg,
info->dwFlags = VIDCF_TEMPORAL;
info->dwVersion = 0x10101;
info->dwVersionICM = ICVERSION;
- lstrcpyW(info->szName, nameW);
- lstrcpyW(info->szDescription, nameW);
+ lstrcpyW(info->szName, L"foo");
+ lstrcpyW(info->szDescription, L"foo");
return sizeof(ICINFO);
}
case ICM_COMPRESS_QUERY:
@@ -446,14 +440,12 @@ static ULONG WINAPI property_bag_Release(IPropertyBag *iface)
ok(0, "Unexpected call.\n");
return 1;
}
-
-static const WCHAR fcchandlerW[] = {'F','c','c','H','a','n','d','l','e','r',0};
static BSTR ppb_handler;
static unsigned int ppb_got_read;
static HRESULT WINAPI property_bag_Read(IPropertyBag *iface, const WCHAR *name, VARIANT *var, IErrorLog *log)
{
- ok(!lstrcmpW(name, fcchandlerW), "Got unexpected name %s.\n", wine_dbgstr_w(name));
+ ok(!lstrcmpW(name, L"FccHandler"), "Got unexpected name %s.\n", wine_dbgstr_w(name));
ok(V_VT(var) == VT_BSTR, "Got unexpected type %u.\n", V_VT(var));
ok(!log, "Got unexpected error log %p.\n", log);
V_BSTR(var) = SysAllocString(ppb_handler);
@@ -489,7 +481,7 @@ static void test_property_bag(IMoniker *mon)
ok(hr == S_OK, "Got hr %#x.\n", hr);
VariantInit(&var);
- hr = IPropertyBag_Read(devenum_bag, fcchandlerW, &var, NULL);
+ hr = IPropertyBag_Read(devenum_bag, L"FccHandler", &var, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ppb_handler = V_BSTR(&var);
@@ -525,7 +517,7 @@ static void test_media_types(IBaseFilter *filter)
HRESULT hr;
IPin *pin;
- IBaseFilter_FindPin(filter, sink_id, &pin);
+ IBaseFilter_FindPin(filter, L"In", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt);
ok(hr == S_OK, "Got hr %#x.\n", hr);
@@ -572,7 +564,7 @@ static void test_media_types(IBaseFilter *filter)
IPin_Release(pin);
- IBaseFilter_FindPin(filter, source_id, &pin);
+ IBaseFilter_FindPin(filter, L"Out", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt);
ok(hr == S_OK, "Got hr %#x.\n", hr);
@@ -592,7 +584,7 @@ static void test_enum_media_types(IBaseFilter *filter)
HRESULT hr;
IPin *pin;
- IBaseFilter_FindPin(filter, sink_id, &pin);
+ IBaseFilter_FindPin(filter, L"In", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1);
ok(hr == S_OK, "Got hr %#x.\n", hr);
@@ -623,7 +615,7 @@ static void test_enum_media_types(IBaseFilter *filter)
IEnumMediaTypes_Release(enum2);
IPin_Release(pin);
- IBaseFilter_FindPin(filter, source_id, &pin);
+ IBaseFilter_FindPin(filter, L"Out", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1);
ok(hr == S_OK, "Got hr %#x.\n", hr);
@@ -709,10 +701,8 @@ static void test_unconnected_filter_state(IBaseFilter *filter)
START_TEST(avico)
{
- static const WCHAR test_display_name[] = {'@','d','e','v','i','c','e',':',
- 'c','m',':','{','3','3','D','9','A','7','6','0','-','9','0','C','8',
- '-','1','1','D','0','-','B','D','4','3','-','0','0','A','0','C','9',
- '1','1','C','E','8','6','}','\\','w','t','s','t',0};
+ static const WCHAR test_display_name[] =
+ L"@device:cm:{33D9A760-90C8-11D0-BD43-00A0C911CE86}\\wtst";
ICreateDevEnum *devenum;
IEnumMoniker *enummon;
IBaseFilter *filter;
diff --git a/dlls/qcap/tests/avimux.c b/dlls/qcap/tests/avimux.c
index d1a67a01a11..3f43ff569cf 100644
--- a/dlls/qcap/tests/avimux.c
+++ b/dlls/qcap/tests/avimux.c
@@ -23,9 +23,6 @@
#include "vfw.h"
#include "wine/test.h"
-static const WCHAR source_id[] = {'A','V','I',' ','O','u','t',0};
-static const WCHAR sink0_id[] = {'I','n','p','u','t',' ','0','1',0};
-
static const GUID testguid = {0xfacade};
static IBaseFilter *create_avi_mux(void)
@@ -86,7 +83,7 @@ static void test_interfaces(void)
check_interface(filter, &IID_IReferenceClock, FALSE);
check_interface(filter, &IID_IVideoWindow, FALSE);
- IBaseFilter_FindPin(filter, source_id, &pin);
+ IBaseFilter_FindPin(filter, L"AVI Out", &pin);
check_interface(pin, &IID_IPin, TRUE);
check_interface(pin, &IID_IQualityControl, TRUE);
@@ -99,7 +96,7 @@ static void test_interfaces(void)
IPin_Release(pin);
- IBaseFilter_FindPin(filter, sink0_id, &pin);
+ IBaseFilter_FindPin(filter, L"Input 01", &pin);
check_interface(pin, &IID_IAMStreamControl, TRUE);
check_interface(pin, &IID_IMemInputPin, TRUE);
@@ -343,7 +340,7 @@ static void test_find_pin(void)
hr = IBaseFilter_EnumPins(filter, &enum_pins);
ok(hr == S_OK, "Got hr %#x.\n", hr);
- hr = IBaseFilter_FindPin(filter, source_id, &pin);
+ hr = IBaseFilter_FindPin(filter, L"AVI Out", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
@@ -351,7 +348,7 @@ static void test_find_pin(void)
IPin_Release(pin);
IPin_Release(pin2);
- hr = IBaseFilter_FindPin(filter, sink0_id, &pin);
+ hr = IBaseFilter_FindPin(filter, L"Input 01", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
@@ -374,7 +371,7 @@ static void test_pin_info(void)
ULONG ref;
IPin *pin;
- hr = IBaseFilter_FindPin(filter, source_id, &pin);
+ hr = IBaseFilter_FindPin(filter, L"AVI Out", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ref = get_refcount(filter);
ok(ref == 2, "Got unexpected refcount %d.\n", ref);
@@ -385,7 +382,7 @@ static void test_pin_info(void)
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
ok(info.dir == PINDIR_OUTPUT, "Got direction %d.\n", info.dir);
- ok(!lstrcmpW(info.achName, source_id), "Got name %s.\n", wine_dbgstr_w(info.achName));
+ ok(!lstrcmpW(info.achName, L"AVI Out"), "Got name %s.\n", wine_dbgstr_w(info.achName));
ref = get_refcount(filter);
ok(ref == 3, "Got unexpected refcount %d.\n", ref);
ref = get_refcount(pin);
@@ -398,7 +395,7 @@ static void test_pin_info(void)
hr = IPin_QueryId(pin, &id);
ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(!lstrcmpW(id, source_id), "Got id %s.\n", wine_dbgstr_w(id));
+ ok(!lstrcmpW(id, L"AVI Out"), "Got id %s.\n", wine_dbgstr_w(id));
CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, NULL);
@@ -406,14 +403,14 @@ static void test_pin_info(void)
IPin_Release(pin);
- hr = IBaseFilter_FindPin(filter, sink0_id, &pin);
+ hr = IBaseFilter_FindPin(filter, L"Input 01", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IPin_QueryPinInfo(pin, &info);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir);
- ok(!lstrcmpW(info.achName, sink0_id), "Got name %s.\n", wine_dbgstr_w(info.achName));
+ ok(!lstrcmpW(info.achName, L"Input 01"), "Got name %s.\n", wine_dbgstr_w(info.achName));
IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir);
@@ -422,7 +419,7 @@ static void test_pin_info(void)
hr = IPin_QueryId(pin, &id);
ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(!lstrcmpW(id, sink0_id), "Got id %s.\n", wine_dbgstr_w(id));
+ ok(!lstrcmpW(id, L"Input 01"), "Got id %s.\n", wine_dbgstr_w(id));
CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, NULL);
@@ -445,7 +442,7 @@ static void test_media_types(void)
ULONG ref;
IPin *pin;
- IBaseFilter_FindPin(filter, source_id, &pin);
+ IBaseFilter_FindPin(filter, L"AVI Out", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt);
ok(hr == S_OK, "Got hr %#x.\n", hr);
@@ -498,7 +495,7 @@ static void test_media_types(void)
IEnumMediaTypes_Release(enummt);
IPin_Release(pin);
- IBaseFilter_FindPin(filter, sink0_id, &pin);
+ IBaseFilter_FindPin(filter, L"Input 01", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt);
ok(hr == S_OK, "Got hr %#x.\n", hr);
@@ -565,7 +562,7 @@ static void test_enum_media_types(void)
HRESULT hr;
IPin *pin;
- IBaseFilter_FindPin(filter, source_id, &pin);
+ IBaseFilter_FindPin(filter, L"AVI Out", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1);
ok(hr == S_OK, "Got hr %#x.\n", hr);
@@ -629,7 +626,7 @@ static void test_enum_media_types(void)
IEnumMediaTypes_Release(enum2);
IPin_Release(pin);
- IBaseFilter_FindPin(filter, sink0_id, &pin);
+ IBaseFilter_FindPin(filter, L"Input 01", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1);
ok(hr == S_OK, "Got hr %#x.\n", hr);
diff --git a/dlls/qcap/tests/smartteefilter.c b/dlls/qcap/tests/smartteefilter.c
index df741ba1284..e5ae66ff2d3 100644
--- a/dlls/qcap/tests/smartteefilter.c
+++ b/dlls/qcap/tests/smartteefilter.c
@@ -23,10 +23,6 @@
#include "wine/strmbase.h"
#include "wine/test.h"
-static const WCHAR sink_id[] = {'I','n','p','u','t',0};
-static const WCHAR capture_id[] = {'C','a','p','t','u','r','e',0};
-static const WCHAR preview_id[] = {'P','r','e','v','i','e','w',0};
-
static HANDLE event;
static IBaseFilter *create_smart_tee(void)
@@ -90,7 +86,7 @@ static void test_interfaces(void)
check_interface(filter, &IID_IReferenceClock, FALSE);
check_interface(filter, &IID_IVideoWindow, FALSE);
- IBaseFilter_FindPin(filter, sink_id, &pin);
+ IBaseFilter_FindPin(filter, L"Input", &pin);
check_interface(pin, &IID_IMemInputPin, TRUE);
check_interface(pin, &IID_IPin, TRUE);
@@ -106,7 +102,7 @@ static void test_interfaces(void)
IPin_Release(pin);
- IBaseFilter_FindPin(filter, capture_id, &pin);
+ IBaseFilter_FindPin(filter, L"Capture", &pin);
todo_wine check_interface(pin, &IID_IAMStreamControl, TRUE);
check_interface(pin, &IID_IPin, TRUE);
@@ -122,7 +118,7 @@ static void test_interfaces(void)
IPin_Release(pin);
- IBaseFilter_FindPin(filter, preview_id, &pin);
+ IBaseFilter_FindPin(filter, L"Preview", &pin);
todo_wine check_interface(pin, &IID_IAMStreamControl, TRUE);
check_interface(pin, &IID_IPin, TRUE);
@@ -387,7 +383,7 @@ static void test_find_pin(void)
hr = IBaseFilter_EnumPins(filter, &enum_pins);
ok(hr == S_OK, "Got hr %#x.\n", hr);
- hr = IBaseFilter_FindPin(filter, sink_id, &pin);
+ hr = IBaseFilter_FindPin(filter, L"Input", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
@@ -395,7 +391,7 @@ static void test_find_pin(void)
IPin_Release(pin2);
IPin_Release(pin);
- hr = IBaseFilter_FindPin(filter, capture_id, &pin);
+ hr = IBaseFilter_FindPin(filter, L"Capture", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
@@ -403,7 +399,7 @@ static void test_find_pin(void)
IPin_Release(pin2);
IPin_Release(pin);
- hr = IBaseFilter_FindPin(filter, preview_id, &pin);
+ hr = IBaseFilter_FindPin(filter, L"Preview", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
@@ -427,7 +423,7 @@ static void test_pin_info(void)
ULONG ref;
IPin *pin;
- hr = IBaseFilter_FindPin(filter, sink_id, &pin);
+ hr = IBaseFilter_FindPin(filter, L"Input", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ref = get_refcount(filter);
ok(ref == 2, "Got unexpected refcount %d.\n", ref);
@@ -438,7 +434,7 @@ static void test_pin_info(void)
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir);
- ok(!lstrcmpW(info.achName, sink_id), "Got name %s.\n", wine_dbgstr_w(info.achName));
+ ok(!lstrcmpW(info.achName, L"Input"), "Got name %s.\n", wine_dbgstr_w(info.achName));
ref = get_refcount(filter);
ok(ref == 3, "Got unexpected refcount %d.\n", ref);
ref = get_refcount(pin);
@@ -451,7 +447,7 @@ static void test_pin_info(void)
hr = IPin_QueryId(pin, &id);
ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(!lstrcmpW(id, sink_id), "Got id %s.\n", wine_dbgstr_w(id));
+ ok(!lstrcmpW(id, L"Input"), "Got id %s.\n", wine_dbgstr_w(id));
CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, &count);
@@ -459,14 +455,14 @@ static void test_pin_info(void)
IPin_Release(pin);
- hr = IBaseFilter_FindPin(filter, capture_id, &pin);
+ hr = IBaseFilter_FindPin(filter, L"Capture", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IPin_QueryPinInfo(pin, &info);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
ok(info.dir == PINDIR_OUTPUT, "Got direction %d.\n", info.dir);
- ok(!lstrcmpW(info.achName, capture_id), "Got name %s.\n", wine_dbgstr_w(info.achName));
+ ok(!lstrcmpW(info.achName, L"Capture"), "Got name %s.\n", wine_dbgstr_w(info.achName));
ref = get_refcount(filter);
ok(ref == 3, "Got unexpected refcount %d.\n", ref);
ref = get_refcount(pin);
@@ -479,7 +475,7 @@ static void test_pin_info(void)
hr = IPin_QueryId(pin, &id);
ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(!lstrcmpW(id, capture_id), "Got id %s.\n", wine_dbgstr_w(id));
+ ok(!lstrcmpW(id, L"Capture"), "Got id %s.\n", wine_dbgstr_w(id));
CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, &count);
@@ -487,14 +483,14 @@ static void test_pin_info(void)
IPin_Release(pin);
- hr = IBaseFilter_FindPin(filter, preview_id, &pin);
+ hr = IBaseFilter_FindPin(filter, L"Preview", &pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IPin_QueryPinInfo(pin, &info);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
ok(info.dir == PINDIR_OUTPUT, "Got direction %d.\n", info.dir);
- ok(!lstrcmpW(info.achName, preview_id), "Got name %s.\n", wine_dbgstr_w(info.achName));
+ ok(!lstrcmpW(info.achName, L"Preview"), "Got name %s.\n", wine_dbgstr_w(info.achName));
ref = get_refcount(filter);
ok(ref == 3, "Got unexpected refcount %d.\n", ref);
ref = get_refcount(pin);
@@ -507,7 +503,7 @@ static void test_pin_info(void)
hr = IPin_QueryId(pin, &id);
ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(!lstrcmpW(id, preview_id), "Got id %s.\n", wine_dbgstr_w(id));
+ ok(!lstrcmpW(id, L"Preview"), "Got id %s.\n", wine_dbgstr_w(id));
CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, &count);
@@ -528,7 +524,7 @@ static void test_enum_media_types(void)
HRESULT hr;
IPin *pin;
- IBaseFilter_FindPin(filter, sink_id, &pin);
+ IBaseFilter_FindPin(filter, L"Input", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1);
ok(hr == S_OK, "Got hr %#x.\n", hr);
--
2.26.2
Dec. 14, 2020
[PATCH] -Add SORT_DIGITSASNUMBERS flag to CompareStringsEx (Fixes FL Studio 20.8 crash on startup)
by John Zourlios
---
dlls/kernelbase/locale.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/kernelbase/locale.c b/dlls/kernelbase/locale.c
index c60b796aa48..51085f4377a 100644
--- a/dlls/kernelbase/locale.c
+++ b/dlls/kernelbase/locale.c
@@ -3021,7 +3021,7 @@ INT WINAPI CompareStringEx( const WCHAR *locale, DWORD flags, const WCHAR *str1,
{
DWORD supported_flags = NORM_IGNORECASE | NORM_IGNORENONSPACE | NORM_IGNORESYMBOLS | SORT_STRINGSORT |
NORM_IGNOREKANATYPE | NORM_IGNOREWIDTH | LOCALE_USE_CP_ACP;
- DWORD semistub_flags = NORM_LINGUISTIC_CASING | LINGUISTIC_IGNORECASE | 0x10000000;
+ DWORD semistub_flags = NORM_LINGUISTIC_CASING | LINGUISTIC_IGNORECASE | 0x10000000 | SORT_DIGITSASNUMBERS;
/* 0x10000000 is related to diacritics in Arabic, Japanese, and Hebrew */
INT ret;
static int once;
--
2.29.2
Dec. 14, 2020
Re: [PATCH v2 vkd3d 2/4] vkd3d-shader: Implement basic support for #if and #endif.
by Zebediah Figura (she/her)
On 12/14/20 9:26 AM, Henri Verbeet wrote:
> On Sat, 12 Dec 2020 at 01:57, Zebediah Figura (she/her)
> <zfigura(a)codeweavers.com> wrote:
>> On 12/11/20 12:11 PM, Henri Verbeet wrote:
>>> Is reusing enum vkd3d_shader_error for warnings instead of introducing
>>> a separate enumeration here intentional?
>>>
>>
>> It was intentional, though of course not necessary. I guess my reasoning
>> was that there's no reason to let any numerical values coincide, and
>> hence no reason to bother separating the enumerations...
>
> Fair enough, although it does look a bit odd to pass an enum
> vkd3d_shader_error to vkd3d_shader_warning(). We may want to consider
> starting the preprocessor warning range at e.g. 4200 or 4300 in that
> case though; if we were to add VKD3D_SHADER_LOG_WARNING and
> VKD3D_SHADER_LOG_INFO ranges for all the existing
> VKD3D_SHADER_LOG_ERROR ranges using the current allocation scheme,
> 4-digit error codes would already be insufficient. (And there are
> still some sources/targets we may potentially add; HLSL of course, but
> also GLSL, perhaps MSL, probably DXIL, D3D shader model 1-3 bytecode.)
>
I hadn't thought about keeping error codes four digits long; that makes
sense to me. I'll adjust the numerical values.
Dec. 14, 2020
Re: [PATCH v2 vkd3d 1/4] vkd3d-shader: Handle preprocessor parsing errors.
by Zebediah Figura (she/her)
On 12/14/20 9:26 AM, Henri Verbeet wrote:
> On Sat, 12 Dec 2020 at 01:52, Zebediah Figura (she/her)
> <zfigura(a)codeweavers.com> wrote:
>>
>> On 12/11/20 12:11 PM, Henri Verbeet wrote:
>>> On Fri, 11 Dec 2020 at 00:27, Zebediah Figura <zfigura(a)codeweavers.com> wrote:
>>>> +struct preproc_location
>>>> +{
>>>> + const char *filename;
>>>> + unsigned int first_line, first_column;
>>>> +};
>>>> +
>>>> struct preproc_ctx
>>>> {
>>>> void *scanner;
>>>>
>>>> + struct vkd3d_shader_message_context *message_context;
>>>> struct vkd3d_string_buffer buffer;
>>>> + unsigned int line, column;
>>>> + const char *source_name;
>>>> +
>>>> + bool error;
>>>> };
>>>>
>>> There seems to be some duplication of location information between
>>> struct vkd3d_shader_message_context, struct preproc_ctx, and struct
>>> preproc_location. Is that intentional? If it is, would it make sense
>>> to introduce e.g. a struct vkd3d_shader_source_location instead of
>>> struct preproc_location, and then use that structure in both struct
>>> vkd3d_shader_message_context and struct preproc_ctx?
>>
>> Wrt the vkd3d_shader_message_context part—the current structure
>> definitely isn't a great fit for the preprocessor or HLSL parser (i.e.
>> the parts that use yacc) because the location tracking means that we'll
>> be setting a new location on every error call. (And of course most of
>> the other parsers we have don't really have a meaningful concept of
>> line/column locations...) But I wasn't sure enough to actually try to
>> redesign those parts, and it seemed like something that could be
>> deferred, so I just left it alone...
>>
> I probably haven't looked at this series in enough detail, so I may be
> missing something obvious, but is the issue that we're getting an
> explicit location in yyerror() that may not match the location stored
> in struct preproc_ctx? I think it would be fine to pass an explicit
> location to vkd3d_shader_error() and similar functions as well, and
> moving location tracking out of struct vkd3d_shader_message_context.
yyerror() is one example where we need to preserve a location that's not
the "current" one, but it actually ends up being most errors.
In the case of the HLSL compiler, except for a scant few errors
generated by the lexer, pretty much everything has a location attached
that doesn't match the lexer's current location. This is partly because
of lookahead (e.g. we want to complain about variable attributes on a
function, and have the caret point toward the invalid attribute, but we
don't know which one we've parsed yet), partly because bison makes no
guarantees about where the lexer actually is when a given rule is
parsed, and partly because we report some errors *after* having parsed
the whole file [which we do by saving the locations of code that caused
us to generate instructions and other IR objects].
In the case of the preprocessor, it's a bit odd, because most errors can
be blamed on a malformed or misplaced directive [and so even including
the column in the first place doesn't necessarily make a lot of sense].
It'd be arguably possible to always pass the current line and file name,
except that it'd actually need to be the previous line and file name,
since we've already parsed a newline at that point. But this is also
sort of depending on bison internals that I don't think are guaranteed.
> That probably doesn't need to delay this series, but if that change is
> what we want, it seems easier to make it sooner rather than later.
Well, I did add preproc_error() as a helper (and there are already
similar helpers for the HLSL compiler) so that it wouldn't be too much
of a problem. But it is of course nice to not punt the problem, and it's
not too hard...
>
> It does look like we'd want a struct vkd3d_shader_source_location
> instead of struct preproc_location in that case.
>
>> Wrt preproc_location vs preproc_ctx—part of the rub here is that {line,
>> column} is a bit different from {first_line, first_column}; i.e. if we
>> were to add {last_line, last_column}, that wouldn't be a part of
>> preproc_ctx.
>>
> Hmm, right.
>
Dec. 14, 2020
[PATCH] dbghelp: Fetch version info only for PE modules in minidumps.
by Jacek Caban
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
dlls/dbghelp/minidump.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Dec. 14, 2020
Re: [PATCH] gdi32/tests: Add tests for zero-width control characters.
by Nikolay Sivov
On 12/14/20 5:53 PM, Sven Baars wrote:
> Signed-off-by: Sven Baars <sbaars(a)codeweavers.com>
> ---
> Some tests with zero-width control characters for inconsistent behavior
> that I observed while trying to fix the ID3DXFont implementation. In our
> implementation these functions all use the same internal function, but on
> Windows none of them seem to do exactly the same.
Have you tried with different fonts? Especially with fonts not shipped
with Windows.
As I remember certain system fonts were updated in Windows 10 to have
empty glyphs for control characters. So what you see and this whole test
might be unnecessary tailored for Tahoma (including broken parts
reflecting font changes across windows releases).
Easy way to test is to use some modified Noto font to see when metrics
are used and when metrics are ignored for certain characters.
Dec. 14, 2020
[PATCH 5/5] winapi: Use __alignof__ on clang.
by Jacek Caban
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
dlls/gdi32/tests/generated.c | 2 +-
dlls/kernel32/tests/generated.c | 2 +-
dlls/ntdll/tests/generated.c | 2 +-
dlls/rpcrt4/tests/generated.c | 2 +-
dlls/shell32/tests/generated.c | 2 +-
dlls/shlwapi/tests/generated.c | 2 +-
dlls/urlmon/tests/generated.c | 90 +--------------------------------
dlls/user32/tests/generated.c | 2 +-
dlls/wininet/tests/generated.c | 2 +-
dlls/winmm/tests/generated.c | 2 +-
tools/winapi/winapi_test | 2 +-
11 files changed, 11 insertions(+), 99 deletions(-)
Dec. 14, 2020
[PATCH 4/5] msvcrt: Use __ASM_USE_THISCALL_WRAPPER in cxx.h.
by Jacek Caban
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
dlls/msvcrt/cxx.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Dec. 14, 2020
[PATCH 3/5] msvcrt: Use GCC-style assembly on Clang MSVC target.
by Jacek Caban
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
dlls/msvcrt/math.c | 14 +++++++-------
dlls/msvcrt/misc.c | 6 +++---
2 files changed, 10 insertions(+), 10 deletions(-)
Dec. 14, 2020
[PATCH 2/5] msvcrt: Prefix *rot* functions.
by Jacek Caban
MSVC does not allow overriding those intrinsic functions.
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
dlls/crtdll/crtdll.spec | 8 ++++----
dlls/msvcr100/msvcr100.spec | 12 ++++++------
dlls/msvcr110/msvcr110.spec | 12 ++++++------
dlls/msvcr120/msvcr120.spec | 12 ++++++------
dlls/msvcr70/msvcr70.spec | 8 ++++----
dlls/msvcr71/msvcr71.spec | 8 ++++----
dlls/msvcr80/msvcr80.spec | 12 ++++++------
dlls/msvcr90/msvcr90.spec | 12 ++++++------
dlls/msvcrt/math.c | 12 ++++++------
dlls/msvcrt/msvcrt.spec | 12 ++++++------
dlls/msvcrtd/msvcrtd.spec | 8 ++++----
dlls/ucrtbase/ucrtbase.spec | 12 ++++++------
12 files changed, 64 insertions(+), 64 deletions(-)
Dec. 14, 2020
[PATCH 1/5] ucrtbase: Improve __intrinsic_abnormal_termination stub.
by Jacek Caban
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
The real motivation is renaming _abnormal_termination, which is not
allowed on MSVC.
dlls/crtdll/crtdll.spec | 2 +-
dlls/msvcr100/msvcr100.spec | 2 +-
dlls/msvcr110/msvcr110.spec | 2 +-
dlls/msvcr120/msvcr120.spec | 2 +-
dlls/msvcr70/msvcr70.spec | 2 +-
dlls/msvcr71/msvcr71.spec | 2 +-
dlls/msvcr80/msvcr80.spec | 2 +-
dlls/msvcr90/msvcr90.spec | 2 +-
dlls/msvcrt/except.c | 2 +-
dlls/msvcrt/msvcrt.spec | 2 +-
dlls/msvcrtd/msvcrtd.spec | 2 +-
dlls/ucrtbase/ucrtbase.spec | 2 +-
12 files changed, 12 insertions(+), 12 deletions(-)
Dec. 14, 2020
Re: [PATCH] crypt32/tests: Fix a registerOIDInfo() failure when missing elevated privileges.
by Francois Gouget
On Mon, 14 Dec 2020, Dmitry Timoshkov wrote:
[...]
> If the intent to add is_process_elevated() checks to every place where
> ERROR_ACCESS_DENIED error returned then it's not justified.
Ok.
> > > > @@ -645,7 +661,11 @@ static void test_registerOIDInfo(void)
> > > > info1.pszOID = test_oid;
> > > > SetLastError(0xdeadbeef);
> > > > ret = CryptUnregisterOIDInfo(&info1);
> > > > - ok(!ret, "should fail\n");
> > > > + if (!ret && GetLastError() == ERROR_ACCESS_DENIED && !is_process_elevated())
> > > > + {
> > > > + skip("Need admin rights FIXME\n");
> > > > + return;
> > > > + } ok(!ret, "should fail\n");
> > >
> > > This change doesn't look right. Most likely it's not needed here.
> >
> > It is needed:
> > https://test.winehq.org/data/3acb0b3326c4120ea0c4c6076bd03c9cfe82c744/win10…
>
> In addition to broken indentation and strange skip message the test bot
> results seem not related, in both cases !ret is the only accepted value.
Oh, right. I missed the cleanup step and mixed it up with the fix
for another test too. I will resubmit it.
--
Francois Gouget <fgouget(a)codeweavers.com>
Dec. 14, 2020
[PATCH v2 2/2] ntdll: Save unwind information in KiUserApcDispatcher() on x64.
by Paul Gofman
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
---
v2:
- fix build for other archs.
dlls/ntdll/tests/exception.c | 53 +++++++++++++++++++++++++++++++++
dlls/ntdll/thread.c | 28 ++++++++++++++++-
dlls/ntdll/unix/signal_x86_64.c | 23 ++++++++++++--
3 files changed, 101 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index 5686e39ab9e..3a0a5ac049c 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -37,6 +37,8 @@ static void *code_mem;
static NTSTATUS (WINAPI *pNtGetContextThread)(HANDLE,CONTEXT*);
static NTSTATUS (WINAPI *pNtSetContextThread)(HANDLE,CONTEXT*);
+static NTSTATUS (WINAPI *pNtQueueApcThread)(HANDLE handle, PNTAPCFUNC func,
+ ULONG_PTR arg1, ULONG_PTR arg2, ULONG_PTR arg3);
static NTSTATUS (WINAPI *pRtlRaiseException)(EXCEPTION_RECORD *rec);
static PVOID (WINAPI *pRtlUnwind)(PVOID, PVOID, PEXCEPTION_RECORD, PVOID);
static VOID (WINAPI *pRtlCaptureContext)(CONTEXT*);
@@ -4061,6 +4063,55 @@ static void test_nested_exception(void)
ok(got_prev_frame_exception, "Did not get nested exception in the previous frame.\n");
}
+static CONTEXT test_unwind_apc_context;
+static BOOL test_unwind_apc_called;
+
+static void CALLBACK test_unwind_apc(ULONG_PTR arg1, ULONG_PTR arg2, ULONG_PTR arg3)
+{
+ EXCEPTION_RECORD rec;
+
+ test_unwind_apc_called = TRUE;
+ memset(&rec, 0, sizeof(rec));
+ pRtlUnwind((void *)test_unwind_apc_context.Rsp, (void *)test_unwind_apc_context.Rip, &rec, (void *)0xdeadbeef);
+ ok(0, "Should not get here.\n");
+}
+
+static void test_unwind_from_apc(void)
+{
+ NTSTATUS status;
+ int pass;
+
+ if (!pNtQueueApcThread)
+ {
+ win_skip("NtQueueApcThread is not available.\n");
+ return;
+ }
+
+ pass = 0;
+ InterlockedIncrement(&pass);
+ RtlCaptureContext(&test_unwind_apc_context);
+ InterlockedIncrement(&pass);
+
+ if (pass == 2)
+ {
+ test_unwind_apc_called = FALSE;
+ status = pNtQueueApcThread(GetCurrentThread(), test_unwind_apc, 0, 0, 0);
+ ok(!status, "Got unexpected status %#x.\n", status);
+ SleepEx(0, TRUE);
+ ok(0, "Should not get here.\n");
+ }
+ if (pass == 3)
+ {
+ ok(test_unwind_apc_called, "Test user APC was not called.\n");
+ test_unwind_apc_called = FALSE;
+ status = pNtQueueApcThread(GetCurrentThread(), test_unwind_apc, 0, 0, 0);
+ ok(!status, "Got unexpected status %#x.\n", status);
+ NtContinue(&test_unwind_apc_context, TRUE );
+ ok(0, "Should not get here.\n");
+ }
+ ok(pass == 4, "Got unexpected pass %d.\n", pass);
+ ok(test_unwind_apc_called, "Test user APC was not called.\n");
+}
#elif defined(__arm__)
static void test_thread_context(void)
@@ -8073,6 +8124,7 @@ START_TEST(exception)
#define X(f) p##f = (void*)GetProcAddress(hntdll, #f)
X(NtGetContextThread);
X(NtSetContextThread);
+ X(NtQueueApcThread);
X(NtReadVirtualMemory);
X(NtClose);
X(RtlUnwind);
@@ -8241,6 +8293,7 @@ START_TEST(exception)
skip( "Dynamic unwind functions not found\n" );
test_extended_context();
test_copy_context();
+ test_unwind_from_apc();
#elif defined(__aarch64__)
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 578c7a5436c..5bf456ec040 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -78,7 +78,7 @@ int __cdecl __wine_dbg_output( const char *str )
/*******************************************************************
* KiUserApcDispatcher (NTDLL.@)
*/
-void WINAPI KiUserApcDispatcher( CONTEXT *context, ULONG_PTR ctx, ULONG_PTR arg1, ULONG_PTR arg2,
+void WINAPI dispatch_apc( CONTEXT *context, ULONG_PTR ctx, ULONG_PTR arg1, ULONG_PTR arg2,
PNTAPCFUNC func )
{
func( ctx, arg1, arg2 );
@@ -86,6 +86,32 @@ void WINAPI KiUserApcDispatcher( CONTEXT *context, ULONG_PTR ctx, ULONG_PTR arg1
}
+#ifdef __x86_64__
+__ASM_GLOBAL_FUNC( KiUserApcDispatcher,
+ "addq $0x8,%rsp\n\t"
+ "mov 0x98(%rcx),%r10\n\t" /* context->Rsp */
+ "mov 0xf8(%rcx),%r11\n\t" /* context->Rip */
+ "mov %r11,-0x8(%r10)\n\t"
+ "mov %rbp,-0x10(%r10)\n\t"
+ "lea -0x10(%r10),%rbp\n\t"
+ __ASM_SEH(".seh_pushreg %rbp\n\t")
+ __ASM_SEH(".seh_setframe %rbp,0\n\t")
+ __ASM_SEH(".seh_endprologue\n\t")
+ __ASM_CFI(".cfi_signal_frame\n\t")
+ __ASM_CFI(".cfi_adjust_cfa_offset 0x10\n\t")
+ __ASM_CFI(".cfi_def_cfa %rbp,0x10\n\t")
+ __ASM_CFI(".cfi_rel_offset %rip,0x8\n\t")
+ __ASM_CFI(".cfi_rel_offset %rbp,0\n\t")
+ "call " __ASM_NAME("dispatch_apc") "\n\t"
+ "int3")
+#else
+void WINAPI KiUserApcDispatcher( CONTEXT *context, ULONG_PTR ctx, ULONG_PTR arg1, ULONG_PTR arg2,
+ PNTAPCFUNC func )
+{
+ dispatch_apc( context, ctx, arg1, arg2, func );
+}
+#endif
+
/***********************************************************************
* RtlExitUserThread (NTDLL.@)
*/
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c
index 09088b75750..4a03f3b3bac 100644
--- a/dlls/ntdll/unix/signal_x86_64.c
+++ b/dlls/ntdll/unix/signal_x86_64.c
@@ -2076,9 +2076,28 @@ __ASM_GLOBAL_FUNC( call_user_apc_dispatcher,
"movq %r14,%r9\n" /* arg2 */
"movq $0,0x328(%rbx)\n\t" /* amd64_thread_data()->syscall_frame */
"movq %rsi,0x20(%rsp)\n\t" /* func */
- "movq 0xa0(%rcx),%rbp\n\t" /* context.Rbp */
+ "movq %rdi,%r10\n\t"
+ /* Set nonvolatile regs from context. */
+ "movq 0xa0(%rcx),%rbp\n\t"
+ "movq 0x90(%rcx),%rbx\n\t"
+ "movq 0xa8(%rcx),%rsi\n\t"
+ "movq 0xb0(%rcx),%rdi\n\t"
+ "movq 0xd8(%rcx),%r12\n\t"
+ "movq 0xe0(%rcx),%r13\n\t"
+ "movq 0xe8(%rcx),%r14\n\t"
+ "movq 0xf0(%rcx),%r15\n\t"
+ "movdqa 0x200(%rcx),%xmm6\n\t"
+ "movdqa 0x210(%rcx),%xmm7\n\t"
+ "movdqa 0x220(%rcx),%xmm8\n\t"
+ "movdqa 0x230(%rcx),%xmm9\n\t"
+ "movdqa 0x240(%rcx),%xmm10\n\t"
+ "movdqa 0x250(%rcx),%xmm11\n\t"
+ "movdqa 0x260(%rcx),%xmm12\n\t"
+ "movdqa 0x270(%rcx),%xmm13\n\t"
+ "movdqa 0x280(%rcx),%xmm14\n\t"
+ "movdqa 0x290(%rcx),%xmm15\n\t"
"pushq 0xf8(%rcx)\n\t" /* context.Rip */
- "jmp *%rdi" )
+ "jmp *%r10" )
/***********************************************************************
--
2.29.2
Dec. 14, 2020
[PATCH v2 1/2] ntdll: Always copy context in call_user_apc_dispatcher() on x64.
by Paul Gofman
Currently, if call_user_apc_dispatcher() is called with nonzero context,
there is no guarantee that the provided context is stored above the
rsp = context_ptr->Rsp - (sizeof(CONTEXT) + offsetof(frame,ret_addr))
being set.
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
---
dlls/ntdll/unix/signal_x86_64.c | 61 +++++++++++++++++++++++++--------
1 file changed, 47 insertions(+), 14 deletions(-)
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c
index 359f2d7c361..09088b75750 100644
--- a/dlls/ntdll/unix/signal_x86_64.c
+++ b/dlls/ntdll/unix/signal_x86_64.c
@@ -254,6 +254,22 @@ C_ASSERT((offsetof(struct stack_layout, xstate) == sizeof(struct stack_layout)))
C_ASSERT( sizeof(XSTATE) == 0x140 );
C_ASSERT( sizeof(struct stack_layout) == 0x5b0 ); /* Should match the size in call_user_exception_dispatcher(). */
+/* stack layout when calling an user apc function.
+ * FIXME: match Windows ABI. */
+struct apc_stack_layout
+{
+ ULONG64 save_regs[4];
+ void *func;
+ ULONG64 align;
+ CONTEXT context;
+ ULONG64 rbp;
+ ULONG64 rip;
+};
+
+/* Should match size and offset in call_user_apc_dispatcher(). */
+C_ASSERT( offsetof(struct apc_stack_layout, context) == 0x30 );
+C_ASSERT( sizeof(struct apc_stack_layout) == 0x510 );
+
struct syscall_frame
{
ULONG64 xmm[10 * 2]; /* xmm6-xmm15 */
@@ -270,6 +286,9 @@ struct syscall_frame
ULONG64 ret_addr;
};
+/* Should match the offset in call_user_apc_dispatcher(). */
+C_ASSERT( offsetof( struct syscall_frame, ret_addr ) == 0xf0);
+
struct amd64_thread_data
{
DWORD_PTR dr0; /* 02f0 debug registers */
@@ -2017,31 +2036,45 @@ static void setup_exception( ucontext_t *sigcontext, EXCEPTION_RECORD *rec )
/***********************************************************************
* call_user_apc_dispatcher
*/
+struct apc_stack_layout * WINAPI setup_user_apc_dispatcher_stack( CONTEXT *context, struct apc_stack_layout *stack )
+{
+ CONTEXT c;
+
+ if (!context)
+ {
+ c.ContextFlags = CONTEXT_FULL;
+ NtGetContextThread( GetCurrentThread(), &c );
+ context = &c;
+ }
+ memmove( &stack->context, context, sizeof(stack->context) );
+ return stack;
+}
+
__ASM_GLOBAL_FUNC( call_user_apc_dispatcher,
"movq 0x28(%rsp),%rsi\n\t" /* func */
"movq 0x30(%rsp),%rdi\n\t" /* dispatcher */
"movq %gs:0x30,%rbx\n\t"
- "jrcxz 1f\n\t"
- "movq 0x98(%rcx),%rax\n\t" /* context_ptr->Rsp */
- "leaq -0x5c0(%rax),%rsp\n\t" /* sizeof(CONTEXT) + offsetof(frame,ret_addr) */
- "andq $~15,%rsp\n\t"
- "jmp 2f\n"
- "1:\tmovq 0x328(%rbx),%rax\n\t" /* amd64_thread_data()->syscall_frame */
- "leaq -0x4d0(%rax),%rsp\n\t"
- "andq $~15,%rsp\n\t"
"movq %rdx,%r12\n\t" /* ctx */
"movq %r8,%r13\n\t" /* arg1 */
"movq %r9,%r14\n\t" /* arg2 */
- "movq %rsp,%rdx\n\t" /* context */
- "movl $0x10000b,0x30(%rdx)\n\t" /* context.ContextFlags */
- "movq $~1,%rcx\n\t"
- "call " __ASM_NAME("NtGetContextThread") "\n\t"
- "movq %rsp,%rcx\n\t" /* context */
+ "jrcxz 1f\n\t"
+ "movq 0x98(%rcx),%rdx\n\t" /* context->Rsp */
+ "jmp 2f\n\t"
+ "1:\tmovq 0x328(%rbx),%rax\n\t" /* amd64_thread_data()->syscall_frame */
+ "leaq 0xf0(%rax),%rdx\n\t" /* &amd64_thread_data()->syscall_frame->ret_addr */
+ "2:\tsubq $0x510,%rdx\n\t" /* sizeof(struct apc_stack_layout) */
+ "andq $~0xf,%rdx\n\t"
+ "cmpq %rsp,%rdx\n\t"
+ "cmovbq %rdx,%rsp\n\t"
+ "subq $0x18,%rsp\n\t"
+ "call " __ASM_NAME("setup_user_apc_dispatcher_stack") "\n\t"
+ "movq %rax,%rsp\n\t"
+ "leaq 0x30(%rsp),%rcx\n\t" /* context */
"movq $0xc0,0x78(%rcx)\n\t" /* context.Rax = STATUS_USER_APC */
"movq %r12,%rdx\n\t" /* ctx */
"movq %r13,%r8\n\t" /* arg1 */
"movq %r14,%r9\n" /* arg2 */
- "2:\tmovq $0,0x328(%rbx)\n\t"
+ "movq $0,0x328(%rbx)\n\t" /* amd64_thread_data()->syscall_frame */
"movq %rsi,0x20(%rsp)\n\t" /* func */
"movq 0xa0(%rcx),%rbp\n\t" /* context.Rbp */
"pushq 0xf8(%rcx)\n\t" /* context.Rip */
--
2.29.2
Dec. 14, 2020
Re: [PATCH 2/2] ntdll: Save unwind information in KiUserApcDispatcher() on x64.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=83408
Your paranoid android.
=== debiant (build log) ===
../wine/dlls/ntdll/thread.c:111:5: error: too few arguments to function ‘dispatch_apc’
Task: The win32 Wine build failed
=== debiant (build log) ===
../wine/dlls/ntdll/thread.c:111:5: error: too few arguments to function ‘dispatch_apc’
Task: The wow32 Wine build failed
Dec. 14, 2020
[PATCH 2/2] ntdll: Save unwind information in KiUserApcDispatcher() on x64.
by Paul Gofman
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
---
dlls/ntdll/tests/exception.c | 53 +++++++++++++++++++++++++++++++++
dlls/ntdll/thread.c | 28 ++++++++++++++++-
dlls/ntdll/unix/signal_x86_64.c | 23 ++++++++++++--
3 files changed, 101 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index 5686e39ab9e..3a0a5ac049c 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -37,6 +37,8 @@ static void *code_mem;
static NTSTATUS (WINAPI *pNtGetContextThread)(HANDLE,CONTEXT*);
static NTSTATUS (WINAPI *pNtSetContextThread)(HANDLE,CONTEXT*);
+static NTSTATUS (WINAPI *pNtQueueApcThread)(HANDLE handle, PNTAPCFUNC func,
+ ULONG_PTR arg1, ULONG_PTR arg2, ULONG_PTR arg3);
static NTSTATUS (WINAPI *pRtlRaiseException)(EXCEPTION_RECORD *rec);
static PVOID (WINAPI *pRtlUnwind)(PVOID, PVOID, PEXCEPTION_RECORD, PVOID);
static VOID (WINAPI *pRtlCaptureContext)(CONTEXT*);
@@ -4061,6 +4063,55 @@ static void test_nested_exception(void)
ok(got_prev_frame_exception, "Did not get nested exception in the previous frame.\n");
}
+static CONTEXT test_unwind_apc_context;
+static BOOL test_unwind_apc_called;
+
+static void CALLBACK test_unwind_apc(ULONG_PTR arg1, ULONG_PTR arg2, ULONG_PTR arg3)
+{
+ EXCEPTION_RECORD rec;
+
+ test_unwind_apc_called = TRUE;
+ memset(&rec, 0, sizeof(rec));
+ pRtlUnwind((void *)test_unwind_apc_context.Rsp, (void *)test_unwind_apc_context.Rip, &rec, (void *)0xdeadbeef);
+ ok(0, "Should not get here.\n");
+}
+
+static void test_unwind_from_apc(void)
+{
+ NTSTATUS status;
+ int pass;
+
+ if (!pNtQueueApcThread)
+ {
+ win_skip("NtQueueApcThread is not available.\n");
+ return;
+ }
+
+ pass = 0;
+ InterlockedIncrement(&pass);
+ RtlCaptureContext(&test_unwind_apc_context);
+ InterlockedIncrement(&pass);
+
+ if (pass == 2)
+ {
+ test_unwind_apc_called = FALSE;
+ status = pNtQueueApcThread(GetCurrentThread(), test_unwind_apc, 0, 0, 0);
+ ok(!status, "Got unexpected status %#x.\n", status);
+ SleepEx(0, TRUE);
+ ok(0, "Should not get here.\n");
+ }
+ if (pass == 3)
+ {
+ ok(test_unwind_apc_called, "Test user APC was not called.\n");
+ test_unwind_apc_called = FALSE;
+ status = pNtQueueApcThread(GetCurrentThread(), test_unwind_apc, 0, 0, 0);
+ ok(!status, "Got unexpected status %#x.\n", status);
+ NtContinue(&test_unwind_apc_context, TRUE );
+ ok(0, "Should not get here.\n");
+ }
+ ok(pass == 4, "Got unexpected pass %d.\n", pass);
+ ok(test_unwind_apc_called, "Test user APC was not called.\n");
+}
#elif defined(__arm__)
static void test_thread_context(void)
@@ -8073,6 +8124,7 @@ START_TEST(exception)
#define X(f) p##f = (void*)GetProcAddress(hntdll, #f)
X(NtGetContextThread);
X(NtSetContextThread);
+ X(NtQueueApcThread);
X(NtReadVirtualMemory);
X(NtClose);
X(RtlUnwind);
@@ -8241,6 +8293,7 @@ START_TEST(exception)
skip( "Dynamic unwind functions not found\n" );
test_extended_context();
test_copy_context();
+ test_unwind_from_apc();
#elif defined(__aarch64__)
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 578c7a5436c..c5dcb931ba5 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -78,7 +78,7 @@ int __cdecl __wine_dbg_output( const char *str )
/*******************************************************************
* KiUserApcDispatcher (NTDLL.@)
*/
-void WINAPI KiUserApcDispatcher( CONTEXT *context, ULONG_PTR ctx, ULONG_PTR arg1, ULONG_PTR arg2,
+void WINAPI dispatch_apc( CONTEXT *context, ULONG_PTR ctx, ULONG_PTR arg1, ULONG_PTR arg2,
PNTAPCFUNC func )
{
func( ctx, arg1, arg2 );
@@ -86,6 +86,32 @@ void WINAPI KiUserApcDispatcher( CONTEXT *context, ULONG_PTR ctx, ULONG_PTR arg1
}
+#ifdef __x86_64__
+__ASM_GLOBAL_FUNC( KiUserApcDispatcher,
+ "addq $0x8,%rsp\n\t"
+ "mov 0x98(%rcx),%r10\n\t" /* context->Rsp */
+ "mov 0xf8(%rcx),%r11\n\t" /* context->Rip */
+ "mov %r11,-0x8(%r10)\n\t"
+ "mov %rbp,-0x10(%r10)\n\t"
+ "lea -0x10(%r10),%rbp\n\t"
+ __ASM_SEH(".seh_pushreg %rbp\n\t")
+ __ASM_SEH(".seh_setframe %rbp,0\n\t")
+ __ASM_SEH(".seh_endprologue\n\t")
+ __ASM_CFI(".cfi_signal_frame\n\t")
+ __ASM_CFI(".cfi_adjust_cfa_offset 0x10\n\t")
+ __ASM_CFI(".cfi_def_cfa %rbp,0x10\n\t")
+ __ASM_CFI(".cfi_rel_offset %rip,0x8\n\t")
+ __ASM_CFI(".cfi_rel_offset %rbp,0\n\t")
+ "call " __ASM_NAME("dispatch_apc") "\n\t"
+ "int3")
+#else
+void WINAPI KiUserApcDispatcher( CONTEXT *context, ULONG_PTR ctx, ULONG_PTR arg1, ULONG_PTR arg2,
+ PNTAPCFUNC func )
+{
+ dispatch_apc();
+}
+#endif
+
/***********************************************************************
* RtlExitUserThread (NTDLL.@)
*/
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c
index 09088b75750..4a03f3b3bac 100644
--- a/dlls/ntdll/unix/signal_x86_64.c
+++ b/dlls/ntdll/unix/signal_x86_64.c
@@ -2076,9 +2076,28 @@ __ASM_GLOBAL_FUNC( call_user_apc_dispatcher,
"movq %r14,%r9\n" /* arg2 */
"movq $0,0x328(%rbx)\n\t" /* amd64_thread_data()->syscall_frame */
"movq %rsi,0x20(%rsp)\n\t" /* func */
- "movq 0xa0(%rcx),%rbp\n\t" /* context.Rbp */
+ "movq %rdi,%r10\n\t"
+ /* Set nonvolatile regs from context. */
+ "movq 0xa0(%rcx),%rbp\n\t"
+ "movq 0x90(%rcx),%rbx\n\t"
+ "movq 0xa8(%rcx),%rsi\n\t"
+ "movq 0xb0(%rcx),%rdi\n\t"
+ "movq 0xd8(%rcx),%r12\n\t"
+ "movq 0xe0(%rcx),%r13\n\t"
+ "movq 0xe8(%rcx),%r14\n\t"
+ "movq 0xf0(%rcx),%r15\n\t"
+ "movdqa 0x200(%rcx),%xmm6\n\t"
+ "movdqa 0x210(%rcx),%xmm7\n\t"
+ "movdqa 0x220(%rcx),%xmm8\n\t"
+ "movdqa 0x230(%rcx),%xmm9\n\t"
+ "movdqa 0x240(%rcx),%xmm10\n\t"
+ "movdqa 0x250(%rcx),%xmm11\n\t"
+ "movdqa 0x260(%rcx),%xmm12\n\t"
+ "movdqa 0x270(%rcx),%xmm13\n\t"
+ "movdqa 0x280(%rcx),%xmm14\n\t"
+ "movdqa 0x290(%rcx),%xmm15\n\t"
"pushq 0xf8(%rcx)\n\t" /* context.Rip */
- "jmp *%rdi" )
+ "jmp *%r10" )
/***********************************************************************
--
2.29.2
Dec. 14, 2020
[PATCH 1/2] ntdll: Always copy context in call_user_apc_dispatcher() on x64.
by Paul Gofman
Currently, if call_user_apc_dispatcher() is called with nonzero context,
there is no guarantee that the provided context is stored above the
rsp = context_ptr->Rsp - (sizeof(CONTEXT) + offsetof(frame,ret_addr))
being set.
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
---
dlls/ntdll/unix/signal_x86_64.c | 61 +++++++++++++++++++++++++--------
1 file changed, 47 insertions(+), 14 deletions(-)
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c
index 359f2d7c361..09088b75750 100644
--- a/dlls/ntdll/unix/signal_x86_64.c
+++ b/dlls/ntdll/unix/signal_x86_64.c
@@ -254,6 +254,22 @@ C_ASSERT((offsetof(struct stack_layout, xstate) == sizeof(struct stack_layout)))
C_ASSERT( sizeof(XSTATE) == 0x140 );
C_ASSERT( sizeof(struct stack_layout) == 0x5b0 ); /* Should match the size in call_user_exception_dispatcher(). */
+/* stack layout when calling an user apc function.
+ * FIXME: match Windows ABI. */
+struct apc_stack_layout
+{
+ ULONG64 save_regs[4];
+ void *func;
+ ULONG64 align;
+ CONTEXT context;
+ ULONG64 rbp;
+ ULONG64 rip;
+};
+
+/* Should match size and offset in call_user_apc_dispatcher(). */
+C_ASSERT( offsetof(struct apc_stack_layout, context) == 0x30 );
+C_ASSERT( sizeof(struct apc_stack_layout) == 0x510 );
+
struct syscall_frame
{
ULONG64 xmm[10 * 2]; /* xmm6-xmm15 */
@@ -270,6 +286,9 @@ struct syscall_frame
ULONG64 ret_addr;
};
+/* Should match the offset in call_user_apc_dispatcher(). */
+C_ASSERT( offsetof( struct syscall_frame, ret_addr ) == 0xf0);
+
struct amd64_thread_data
{
DWORD_PTR dr0; /* 02f0 debug registers */
@@ -2017,31 +2036,45 @@ static void setup_exception( ucontext_t *sigcontext, EXCEPTION_RECORD *rec )
/***********************************************************************
* call_user_apc_dispatcher
*/
+struct apc_stack_layout * WINAPI setup_user_apc_dispatcher_stack( CONTEXT *context, struct apc_stack_layout *stack )
+{
+ CONTEXT c;
+
+ if (!context)
+ {
+ c.ContextFlags = CONTEXT_FULL;
+ NtGetContextThread( GetCurrentThread(), &c );
+ context = &c;
+ }
+ memmove( &stack->context, context, sizeof(stack->context) );
+ return stack;
+}
+
__ASM_GLOBAL_FUNC( call_user_apc_dispatcher,
"movq 0x28(%rsp),%rsi\n\t" /* func */
"movq 0x30(%rsp),%rdi\n\t" /* dispatcher */
"movq %gs:0x30,%rbx\n\t"
- "jrcxz 1f\n\t"
- "movq 0x98(%rcx),%rax\n\t" /* context_ptr->Rsp */
- "leaq -0x5c0(%rax),%rsp\n\t" /* sizeof(CONTEXT) + offsetof(frame,ret_addr) */
- "andq $~15,%rsp\n\t"
- "jmp 2f\n"
- "1:\tmovq 0x328(%rbx),%rax\n\t" /* amd64_thread_data()->syscall_frame */
- "leaq -0x4d0(%rax),%rsp\n\t"
- "andq $~15,%rsp\n\t"
"movq %rdx,%r12\n\t" /* ctx */
"movq %r8,%r13\n\t" /* arg1 */
"movq %r9,%r14\n\t" /* arg2 */
- "movq %rsp,%rdx\n\t" /* context */
- "movl $0x10000b,0x30(%rdx)\n\t" /* context.ContextFlags */
- "movq $~1,%rcx\n\t"
- "call " __ASM_NAME("NtGetContextThread") "\n\t"
- "movq %rsp,%rcx\n\t" /* context */
+ "jrcxz 1f\n\t"
+ "movq 0x98(%rcx),%rdx\n\t" /* context->Rsp */
+ "jmp 2f\n\t"
+ "1:\tmovq 0x328(%rbx),%rax\n\t" /* amd64_thread_data()->syscall_frame */
+ "leaq 0xf0(%rax),%rdx\n\t" /* &amd64_thread_data()->syscall_frame->ret_addr */
+ "2:\tsubq $0x510,%rdx\n\t" /* sizeof(struct apc_stack_layout) */
+ "andq $~0xf,%rdx\n\t"
+ "cmpq %rsp,%rdx\n\t"
+ "cmovbq %rdx,%rsp\n\t"
+ "subq $0x18,%rsp\n\t"
+ "call " __ASM_NAME("setup_user_apc_dispatcher_stack") "\n\t"
+ "movq %rax,%rsp\n\t"
+ "leaq 0x30(%rsp),%rcx\n\t" /* context */
"movq $0xc0,0x78(%rcx)\n\t" /* context.Rax = STATUS_USER_APC */
"movq %r12,%rdx\n\t" /* ctx */
"movq %r13,%r8\n\t" /* arg1 */
"movq %r14,%r9\n" /* arg2 */
- "2:\tmovq $0,0x328(%rbx)\n\t"
+ "movq $0,0x328(%rbx)\n\t" /* amd64_thread_data()->syscall_frame */
"movq %rsi,0x20(%rsp)\n\t" /* func */
"movq 0xa0(%rcx),%rbp\n\t" /* context.Rbp */
"pushq 0xf8(%rcx)\n\t" /* context.Rip */
--
2.29.2
Dec. 14, 2020
Re: [PATCH] crypt32/tests: Fix a registerOIDInfo() failure when missing elevated privileges.
by Dmitry Timoshkov
Francois Gouget <fgouget(a)codeweavers.com> wrote:
> > > @@ -499,7 +515,7 @@ static void test_getDefaultOIDFunctionAddress(void)
> > > SetLastError(0xdeadbeef);
> > > ret = CryptRegisterDefaultOIDFunction(0, "CertDllOpenStoreProv", 0,
> > > bogusDll);
> > > - if (!ret && GetLastError() == ERROR_ACCESS_DENIED)
> > > + if (!ret && GetLastError() == ERROR_ACCESS_DENIED && !is_process_elevated())
> > > skip("Need admin rights\n");
> > > else
> > > ok(ret, "CryptRegisterDefaultOIDFunction failed: %08x\n", GetLastError());
> >
> > In which cases the changes above are needed? It seems that this only
> > complicates things without a reason and could potentially slow down
> > the tests execution.
>
> These are not strictly needed. Rather the goal is to verify that we only
> get ERROR_ACCESS_DENIED when missing elevated privileges rather than
> blindly assuming the access denied error is justified.
If the intent to add is_process_elevated() checks to every place where
ERROR_ACCESS_DENIED error returned then it's not justified.
> > > @@ -645,7 +661,11 @@ static void test_registerOIDInfo(void)
> > > info1.pszOID = test_oid;
> > > SetLastError(0xdeadbeef);
> > > ret = CryptUnregisterOIDInfo(&info1);
> > > - ok(!ret, "should fail\n");
> > > + if (!ret && GetLastError() == ERROR_ACCESS_DENIED && !is_process_elevated())
> > > + {
> > > + skip("Need admin rights FIXME\n");
> > > + return;
> > > + } ok(!ret, "should fail\n");
> >
> > This change doesn't look right. Most likely it's not needed here.
>
> It is needed:
> https://test.winehq.org/data/3acb0b3326c4120ea0c4c6076bd03c9cfe82c744/win10…
In addition to broken indentation and strange skip message the test bot
results seem not related, in both cases !ret is the only accepted value.
--
Dmitry.
Dec. 14, 2020
Re: [PATCH v2 vkd3d 2/4] vkd3d-shader: Implement basic support for #if and #endif.
by Henri Verbeet
On Sat, 12 Dec 2020 at 01:57, Zebediah Figura (she/her)
<zfigura(a)codeweavers.com> wrote:
> On 12/11/20 12:11 PM, Henri Verbeet wrote:
> > Is reusing enum vkd3d_shader_error for warnings instead of introducing
> > a separate enumeration here intentional?
> >
>
> It was intentional, though of course not necessary. I guess my reasoning
> was that there's no reason to let any numerical values coincide, and
> hence no reason to bother separating the enumerations...
Fair enough, although it does look a bit odd to pass an enum
vkd3d_shader_error to vkd3d_shader_warning(). We may want to consider
starting the preprocessor warning range at e.g. 4200 or 4300 in that
case though; if we were to add VKD3D_SHADER_LOG_WARNING and
VKD3D_SHADER_LOG_INFO ranges for all the existing
VKD3D_SHADER_LOG_ERROR ranges using the current allocation scheme,
4-digit error codes would already be insufficient. (And there are
still some sources/targets we may potentially add; HLSL of course, but
also GLSL, perhaps MSL, probably DXIL, D3D shader model 1-3 bytecode.)
Dec. 14, 2020
Re: [PATCH v2 vkd3d 1/4] vkd3d-shader: Handle preprocessor parsing errors.
by Henri Verbeet
On Sat, 12 Dec 2020 at 01:52, Zebediah Figura (she/her)
<zfigura(a)codeweavers.com> wrote:
>
> On 12/11/20 12:11 PM, Henri Verbeet wrote:
> > On Fri, 11 Dec 2020 at 00:27, Zebediah Figura <zfigura(a)codeweavers.com> wrote:
> >> +struct preproc_location
> >> +{
> >> + const char *filename;
> >> + unsigned int first_line, first_column;
> >> +};
> >> +
> >> struct preproc_ctx
> >> {
> >> void *scanner;
> >>
> >> + struct vkd3d_shader_message_context *message_context;
> >> struct vkd3d_string_buffer buffer;
> >> + unsigned int line, column;
> >> + const char *source_name;
> >> +
> >> + bool error;
> >> };
> >>
> > There seems to be some duplication of location information between
> > struct vkd3d_shader_message_context, struct preproc_ctx, and struct
> > preproc_location. Is that intentional? If it is, would it make sense
> > to introduce e.g. a struct vkd3d_shader_source_location instead of
> > struct preproc_location, and then use that structure in both struct
> > vkd3d_shader_message_context and struct preproc_ctx?
>
> Wrt the vkd3d_shader_message_context part—the current structure
> definitely isn't a great fit for the preprocessor or HLSL parser (i.e.
> the parts that use yacc) because the location tracking means that we'll
> be setting a new location on every error call. (And of course most of
> the other parsers we have don't really have a meaningful concept of
> line/column locations...) But I wasn't sure enough to actually try to
> redesign those parts, and it seemed like something that could be
> deferred, so I just left it alone...
>
I probably haven't looked at this series in enough detail, so I may be
missing something obvious, but is the issue that we're getting an
explicit location in yyerror() that may not match the location stored
in struct preproc_ctx? I think it would be fine to pass an explicit
location to vkd3d_shader_error() and similar functions as well, and
moving location tracking out of struct vkd3d_shader_message_context.
That probably doesn't need to delay this series, but if that change is
what we want, it seems easier to make it sooner rather than later.
It does look like we'd want a struct vkd3d_shader_source_location
instead of struct preproc_location in that case.
> Wrt preproc_location vs preproc_ctx—part of the rub here is that {line,
> column} is a bit different from {first_line, first_column}; i.e. if we
> were to add {last_line, last_column}, that wouldn't be a part of
> preproc_ctx.
>
Hmm, right.
Dec. 14, 2020
Re: [PATCH] crypt32/tests: Fix a registerOIDInfo() failure when missing elevated privileges.
by Francois Gouget
On Mon, 14 Dec 2020, Dmitry Timoshkov wrote:
> Francois Gouget <fgouget(a)codeweavers.com> wrote:
>
> > @@ -314,7 +330,7 @@ static void test_registerOIDFunction(void)
> > SetLastError(0xdeadbeef);
> > ret = CryptRegisterOIDFunction(X509_ASN_ENCODING, "CryptDllEncodeObject",
> > "1.2.3.4.5.6.7.8.9.10", bogusDll, NULL);
> > - if (!ret && GetLastError() == ERROR_ACCESS_DENIED)
> > + if (!ret && GetLastError() == ERROR_ACCESS_DENIED && !is_process_elevated())
> > {
> > skip("Need admin rights\n");
> > return;
> > @@ -393,7 +409,7 @@ static void test_registerDefaultOIDFunction(void)
> > SetLastError(0xdeadbeef);
> > ret = CryptRegisterDefaultOIDFunction(0, "CertDllOpenStoreProv", 0,
> > bogusDll);
> > - if (!ret && GetLastError() == ERROR_ACCESS_DENIED)
> > + if (!ret && GetLastError() == ERROR_ACCESS_DENIED && !is_process_elevated())
> > {
> > skip("Need admin rights\n");
> > return;
> > @@ -499,7 +515,7 @@ static void test_getDefaultOIDFunctionAddress(void)
> > SetLastError(0xdeadbeef);
> > ret = CryptRegisterDefaultOIDFunction(0, "CertDllOpenStoreProv", 0,
> > bogusDll);
> > - if (!ret && GetLastError() == ERROR_ACCESS_DENIED)
> > + if (!ret && GetLastError() == ERROR_ACCESS_DENIED && !is_process_elevated())
> > skip("Need admin rights\n");
> > else
> > ok(ret, "CryptRegisterDefaultOIDFunction failed: %08x\n", GetLastError());
>
> In which cases the changes above are needed? It seems that this only
> complicates things without a reason and could potentially slow down
> the tests execution.
These are not strictly needed. Rather the goal is to verify that we only
get ERROR_ACCESS_DENIED when missing elevated privileges rather than
blindly assuming the access denied error is justified.
> > @@ -645,7 +661,11 @@ static void test_registerOIDInfo(void)
> > info1.pszOID = test_oid;
> > SetLastError(0xdeadbeef);
> > ret = CryptUnregisterOIDInfo(&info1);
> > - ok(!ret, "should fail\n");
> > + if (!ret && GetLastError() == ERROR_ACCESS_DENIED && !is_process_elevated())
> > + {
> > + skip("Need admin rights FIXME\n");
> > + return;
> > + } ok(!ret, "should fail\n");
>
> This change doesn't look right. Most likely it's not needed here.
It is needed:
https://test.winehq.org/data/3acb0b3326c4120ea0c4c6076bd03c9cfe82c744/win10…
--
Francois Gouget <fgouget(a)codeweavers.com>
Dec. 14, 2020