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
Re: [PATCH vkd3d v3 5/5] vkd3d-shader: Implement basic support for #if and #endif.
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=83192
Your paranoid android.
=== debiant (build log) ===
error: patch failed: configure.ac:30
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: configure.ac:30
Task: Patch failed to apply
Dec. 7, 2020
Re: [PATCH vkd3d v3 4/5] vkd3d-shader: Handle preprocessor parsing errors.
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=83191
Your paranoid android.
=== debiant (build log) ===
error: patch failed: configure.ac:30
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: configure.ac:30
Task: Patch failed to apply
Dec. 7, 2020
Re: [PATCH vkd3d v3 3/5] vkd3d-shader: Preserve some tokens verbatim for HLSL.
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=83190
Your paranoid android.
=== debiant (build log) ===
error: patch failed: configure.ac:30
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: configure.ac:30
Task: Patch failed to apply
Dec. 7, 2020
Re: [PATCH vkd3d v3 2/5] vkd3d-shader: Parse comments in the preprocessor.
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=83189
Your paranoid android.
=== debiant (build log) ===
error: patch failed: configure.ac:30
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: configure.ac:30
Task: Patch failed to apply
Dec. 7, 2020
Re: [PATCH vkd3d v3 1/5] vkd3d-shader: Implement an initial pass-through HLSL preprocessor.
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=83188
Your paranoid android.
=== debiant (build log) ===
error: patch failed: configure.ac:30
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: configure.ac:30
Task: Patch failed to apply
Dec. 7, 2020
TestBot news
by Francois Gouget
Summary:
* New w1064 VM with all Windows 10 fall releases.
* Rebuilt w7u VM with dual-screen and some languages.
* Cleaned up wvista VM.
* The cw-rx460 Linux results are back.
* The vm3 SSD died, will be replaced soon.
* Test PCI-passthrough VM on the development TestBot.
w1064
-----
This is essentially the same as the w10pro64 VM but with test
configurations for 1507, 1607, 1709, 1809, 1909 and the latest 2009.
The goal is to spread the testing load across two VM hosts. So w10pro64
will handle all (or most of) the languages, while w1064 will handle the
older Windows 10 releases and a few extra configurations like
dual-screen and test without elevated privileges (not yet present), etc.
I will try to update w10pro64 to the latest spring Windows releases
while I will keep adding fall releases to w1064. So they should each get
updated once a year.
w7u
---
I rebuilt this VM from scratch to get it on more recent QEMu virtual
hardware; and only kept the latest configuration.
Here is the base configuration summary:
[CPU:2*IvyBridge-IBRS RAM:2GB disk:scsi-unmap eth:e1000-metered snd:ich9
GPU:vga display:spice virtio:0.1.185 testagentd:1.8]
The most annoying part is getting Windows Update to work because the
servers now require SHA2 but Windows 7 does not support it out of the
box. So I had to find and manually install the right KB fix to get it
going. Then Windows Update ran out of memory so I installed another KB
fix so it would just take forever to install a measly ~160 updates.
So to summarize I installed SP1 manually, added KB4474419 to add SHA2
support, KB3050265 to prevent Windows Update from running out of memory,
KB2852386 to get winsxs disk cleanup options, and finally installed all
updates up to 2020-11-25.
Then I added a dual screen test configuration, a non-elevated privileges
configuration and a few European languages.
I avoided languages with tricky scripts because I was not sure if
Windows 7 would support them right (Vista does not). And I decided to
pick a set that does not overlap with the ones the Windows 10 VM is
already testing. Let me know if you need a different set of languages.
wvista
------
I flattened all the snapshots to only keep the latest version, that is
all updates up to 2014-04-21.
Note that Vista runs into the same Windows Update issue as Windows 7:
SHA2 support is required by the servers. But there's no way to get SHA2
support on Vista which means Vista has no Windows Update support at all.
I also tweaked the hardware configuration and updated the QEmu drivers.
[CPU:1*SandyBridge-IBRS RAM:2GB disk:scsi-unmap eth:e1000 snd:ac97
GPU:vga display:spice virtio:0.1.185 testagentd:1.8]
The new configuration seems to be working pretty well except for
test_driver4() in ntoskrnl.exe:ntoskrnl which crashes Vista. So I only
run WineTest without elevated privileges which forces a skip of that
test. But you can still run the tests with elevated privileges if you
manually submit a job.
cw-rx460 Linux results
----------------------
cw-rx460 is not a TestBot VM but does run WineTest daily and has the
advantage of running on real hardware. For a long time it failed to
reliably submit WineTest results. Now it works again (the issue was in
the wt-bot script).
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:
* The Debian VM which is bloated and which I'm working on updating with
a new libX11,
* The couple older Debian configurations which I removed.
* Too many VMs on vm1 (I moved some to vm4).
vm4's SSD is also on the brink of death according to smartctl so they'll
both get new and bigger SSDs soon.
PCI-passthrough
---------------
I also set up a new Windows 10 Pro VM on my development TestBot
environment and added a configuration with an RX550 graphics card to it
using PCI-passthrough.
That seems to be working [1] so far, by which I mostly mean that besides
actually running its TestBot tasks the graphics card has not locked up
and required a host reboot yet.
What's annoying is that this VM crashes when it runs ntdll:exception so
which prevents it from submitting its test results. That is however
totally unrelated to the RX550 since it also happens with QEmu's
built-in vga graphics card (a test configuration which has never seen
the RX550 in any shape or form).
Another thing that's missing is support for screenshots but I figure
that can come later (it would be great if someone wanted to tackle bug
44709).
There are many PCI-passthrough recipes online, but here's mine, just for
adding the passthrough to an existing Windows VM (i.e. it assumes you've
configured the host already):
* While still using QEmu's built-in vga card, install TightVNC (or
equivalent).
I prefer to avoid Windows' RDP because that uses a separate desktop
with its own graphics driver, changes the resolution, and disables
sound. All that means I wouldn't really know what's going on with the
actual graphics card.
* Then power off and virsh edit to:
- replace the <domain...> line with
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
- add these lines before the closing </domain>
(in fact it's likely fine anywhere)
<qemu:commandline>
<qemu:arg value='-set'/>
<qemu:arg value='device.hostdev0.x-vga=on'/>
</qemu:commandline>
* Remove the Display (Spice), Video (VGA), Tablet (USB|Virtio), and
Sound (ich9) devices. Add the graphics card's two PCI devices (GPU +
audio).
* Boot up, connect using VNC, install the graphics driver, reboot again.
* All done.
[1] One side effect is that whenever the RX550 configuration powers up
it messes the colors of my desktop, as if it switched some palette.
Fortunately all I have to do is to switch the focus to another
window to fix it so I'm just putting up with it.
--
Francois Gouget <fgouget(a)codeweavers.com>
Dec. 7, 2020
[PATCH vkd3d v3 5/5] vkd3d-shader: Implement basic support for #if and #endif.
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
v3: avoid YYerror which is only available since bison 3.6
include/private/vkd3d_memory.h | 11 +++
libs/vkd3d-shader/preproc.h | 16 ++++
libs/vkd3d-shader/preproc.l | 94 ++++++++++++++++++--
libs/vkd3d-shader/preproc.y | 106 ++++++++++++++++++++++-
libs/vkd3d-shader/vkd3d_shader_main.c | 15 ++++
libs/vkd3d-shader/vkd3d_shader_private.h | 6 ++
tests/hlsl_d3d12.c | 2 +-
7 files changed, 242 insertions(+), 8 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 769b8c23..29fbbd02 100644
--- a/libs/vkd3d-shader/preproc.h
+++ b/libs/vkd3d-shader/preproc.h
@@ -29,6 +29,12 @@ struct preproc_location
unsigned int first_line, first_column;
};
+struct preproc_if_state
+{
+ /* Are we currently in a "true" block? */
+ bool current_true;
+};
+
struct preproc_ctx
{
void *scanner;
@@ -38,7 +44,17 @@ struct preproc_ctx
unsigned int line, column;
const char *source_name;
+ struct preproc_if_state *if_stack;
+ size_t if_count, if_stack_size;
+
+ int current_directive;
+
+ bool last_was_newline;
+
bool error;
};
+void preproc_warning(struct preproc_ctx *ctx, const struct preproc_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 116a7ed5..1b0d771d 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;}
@@ -114,6 +140,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);
@@ -127,7 +174,32 @@ int yylex(YYSTYPE *lval, YYLTYPE *lloc, yyscan_t scanner)
return 0;
text = yyget_text(scanner);
- TRACE("Parsing token %d, line %d, string %s.\n", token, lloc->first_line, debugstr_a(text));
+ lloc->filename = ctx->source_name;
+
+ 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->first_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);
}
@@ -148,12 +220,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 preproc_location loc = {.filename = ctx.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 88b855c6..4353d10c 100644
--- a/libs/vkd3d-shader/preproc.y
+++ b/libs/vkd3d-shader/preproc.y
@@ -72,11 +72,71 @@ static void preproc_error(struct preproc_ctx *ctx, const struct preproc_location
ctx->error = true;
}
+void preproc_warning(struct preproc_ctx *ctx, const struct preproc_location *loc,
+ enum vkd3d_shader_error error, const char *format, ...)
+{
+ va_list args;
+
+ set_location(ctx, loc);
+ va_start(args, format);
+ vkd3d_shader_vwarning(ctx->message_context, 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.location.type {struct preproc_location}
@@ -89,9 +149,53 @@ 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 newline
+ {
+ if (!preproc_push_if(ctx, !!$2))
+ YYABORT;
+ }
+ | T_ENDIF newline
+ {
+ if (ctx->if_count)
+ --ctx->if_count;
+ else
+ preproc_warning(ctx, &@$, VKD3D_SHADER_WARNING_PP_INVALID_DIRECTIVE,
+ "Ignoring #endif without prior #if.");
+ }
+
+newline
+ : T_NEWLINE
+ | YYEOF
+
+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 eed0316c..ad456133 100644
--- a/libs/vkd3d-shader/vkd3d_shader_main.c
+++ b/libs/vkd3d-shader/vkd3d_shader_main.c
@@ -148,6 +148,21 @@ bool vkd3d_shader_message_context_copy_messages(struct vkd3d_shader_message_cont
return true;
}
+void vkd3d_shader_vwarning(struct vkd3d_shader_message_context *context,
+ enum vkd3d_shader_error error, const char *format, va_list args)
+{
+ if (context->log_level < VKD3D_SHADER_LOG_WARNING)
+ return;
+
+ if (context->line)
+ vkd3d_string_buffer_printf(&context->messages, "%s:%u:%u: W%04u: ",
+ context->source_name, context->line, context->column, error);
+ else
+ vkd3d_string_buffer_printf(&context->messages, "%s: W%04u: ", context->source_name, 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,
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 5a022708..01a74ede 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 = 5001,
+ VKD3D_SHADER_WARNING_PP_UNKNOWN_DIRECTIVE = 5003,
+ VKD3D_SHADER_WARNING_PP_UNTERMINATED_IF = 5005,
};
enum VKD3D_SHADER_INSTRUCTION_HANDLER
@@ -867,6 +871,8 @@ void vkd3d_shader_error(struct vkd3d_shader_message_context *context, enum vkd3d
const char *format, ...) VKD3D_PRINTF_FUNC(3, 4) DECLSPEC_HIDDEN;
void vkd3d_shader_verror(struct vkd3d_shader_message_context *context,
enum vkd3d_shader_error error, const char *format, va_list args) DECLSPEC_HIDDEN;
+void vkd3d_shader_vwarning(struct vkd3d_shader_message_context *context,
+ 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;
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. 7, 2020
[PATCH vkd3d v3 4/5] vkd3d-shader: Handle preprocessor parsing errors.
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
libs/vkd3d-shader/preproc.h | 11 +++++++
libs/vkd3d-shader/preproc.l | 39 +++++++++++++++++++++++-
libs/vkd3d-shader/preproc.y | 39 +++++++++++++++++++++++-
libs/vkd3d-shader/vkd3d_shader_private.h | 2 ++
4 files changed, 89 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d-shader/preproc.h b/libs/vkd3d-shader/preproc.h
index cbd93229..769b8c23 100644
--- a/libs/vkd3d-shader/preproc.h
+++ b/libs/vkd3d-shader/preproc.h
@@ -23,11 +23,22 @@
#include "vkd3d_shader_private.h"
+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;
};
#endif
diff --git a/libs/vkd3d-shader/preproc.l b/libs/vkd3d-shader/preproc.l
index 4d809b8f..116a7ed5 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,28 @@ 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)->first_line = ctx->line;
+ yyget_lloc(ctx->scanner)->first_column = ctx->column;
+
+ for (i = 0; i < leng; ++i)
+ {
+ ++ctx->column;
+ if (text[i] == '\n')
+ {
+ ctx->column = 1;
+ ++ctx->line;
+ }
+ }
+}
+
int yylex(YYSTYPE *lval, YYLTYPE *lloc, yyscan_t scanner)
{
struct preproc_ctx *ctx = yyget_extra(scanner);
@@ -101,7 +127,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->first_line, debugstr_a(text));
vkd3d_string_buffer_printf(&ctx->buffer, "%s ", text);
}
@@ -115,6 +141,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.source_name = compile_info->source_name ? compile_info->source_name : "<anonymous>";
+ ctx.line = 1;
+ ctx.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 +154,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..88b855c6 100644
--- a/libs/vkd3d-shader/preproc.y
+++ b/libs/vkd3d-shader/preproc.y
@@ -36,13 +36,50 @@ int preproc_yylex(PREPROC_YYSTYPE *yylval_param, PREPROC_YYLTYPE *yylloc_param,
%code
{
+#define YYLLOC_DEFAULT(cur, rhs, n) \
+ do \
+ { \
+ if (n) \
+ { \
+ (cur).filename = YYRHSLOC(rhs, 1).filename; \
+ (cur).first_line = YYRHSLOC(rhs, 1).first_line; \
+ (cur).first_column = YYRHSLOC(rhs, 1).first_column; \
+ } \
+ else \
+ { \
+ (cur).filename = YYRHSLOC(rhs, 0).filename; \
+ (cur).first_line = YYRHSLOC(rhs, 0).first_line; \
+ (cur).first_column = YYRHSLOC(rhs, 0).first_column; \
+ } \
+ } while (0)
+
+static void set_location(struct preproc_ctx *ctx, const struct preproc_location *loc)
+{
+ ctx->message_context->source_name = loc->filename;
+ ctx->message_context->line = loc->first_line;
+ ctx->message_context->column = loc->first_column;
+}
+
+static void preproc_error(struct preproc_ctx *ctx, const struct preproc_location *loc,
+ enum vkd3d_shader_error error, const char *format, ...)
+{
+ va_list args;
+
+ set_location(ctx, loc);
+ va_start(args, format);
+ vkd3d_shader_verror(ctx->message_context, 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);
}
}
+%define api.location.type {struct preproc_location}
%define api.prefix {preproc_yy}
%define api.pure full
%define parse.error verbose
diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h
index 83038384..5a022708 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. 7, 2020
[PATCH vkd3d v3 3/5] vkd3d-shader: Preserve some tokens verbatim for HLSL.
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
libs/vkd3d-shader/preproc.l | 22 ++++++++++++++++++++++
tests/hlsl_d3d12.c | 15 +++++++++------
2 files changed, 31 insertions(+), 6 deletions(-)
diff --git a/libs/vkd3d-shader/preproc.l b/libs/vkd3d-shader/preproc.l
index 89a4f606..4d809b8f 100644
--- a/libs/vkd3d-shader/preproc.l
+++ b/libs/vkd3d-shader/preproc.l
@@ -47,6 +47,7 @@
%s CXX_COMMENT
WS [ \t]
+IDENTIFIER [A-Za-z_][A-Za-z0-9_]*
%%
@@ -61,6 +62,27 @@ WS [ \t]
<C_COMMENT,CXX_COMMENT><<EOF>> {yy_pop_state(yyscanner);}
<C_COMMENT,CXX_COMMENT>. {}
+<INITIAL>{IDENTIFIER} {return T_TEXT;}
+
+<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>"&&" {return T_TEXT;}
+<INITIAL>"||" {return T_TEXT;}
+<INITIAL>"++" {return T_TEXT;}
+<INITIAL>"--" {return T_TEXT;}
+<INITIAL>"<<"=? {return T_TEXT;}
+<INITIAL>">>"=? {return T_TEXT;}
+<INITIAL>[-+*/%&|^=><!]= {return T_TEXT;}
+
+ /* C strings (including escaped quotes). */
+<INITIAL>\"([^"\\]|\\.)*\" {return T_TEXT;}
+
<INITIAL>{WS}+ {}
<INITIAL>. {return T_TEXT;}
diff --git a/tests/hlsl_d3d12.c b/tests/hlsl_d3d12.c
index 787355ba..61324fa9 100644
--- a/tests/hlsl_d3d12.c
+++ b/tests/hlsl_d3d12.c
@@ -43,7 +43,7 @@ static void check_preprocess_(int line, const char *source, const D3D_SHADER_MAC
ok_(line)(vkd3d_memmem(code, size, present, strlen(present)),
"\"%s\" not found in preprocessed shader.\n", present);
if (absent)
- assert_that_(line)(!vkd3d_memmem(code, size, absent, strlen(absent)),
+ ok_(line)(!vkd3d_memmem(code, size, absent, strlen(absent)),
"\"%s\" found in preprocessed shader.\n", absent);
ID3D10Blob_Release(blob);
}
@@ -349,8 +349,10 @@ static void test_preprocess(void)
for (i = 0; i < ARRAY_SIZE(tests); ++i)
{
+ if (i == 43)
+ continue;
vkd3d_test_set_context("Source \"%s\"", tests[i].source);
- todo_if (i != 5 && i != 8 && i != 42)
+ todo_if (i <= 4 || (i >= 9 && i <= 14))
check_preprocess(tests[i].source, NULL, NULL, tests[i].present, tests[i].absent);
}
vkd3d_test_set_context(NULL);
@@ -361,10 +363,10 @@ static void test_preprocess(void)
macros[1].Definition = NULL;
todo check_preprocess("KEY", macros, NULL, "value", "KEY");
- todo check_preprocess("#undef KEY\nKEY", macros, NULL, "KEY", "value");
+ check_preprocess("#undef KEY\nKEY", macros, NULL, "KEY", "value");
macros[0].Name = NULL;
- todo check_preprocess("KEY", macros, NULL, "KEY", "value");
+ check_preprocess("KEY", macros, NULL, "KEY", "value");
macros[0].Name = "KEY";
macros[0].Definition = NULL;
@@ -376,7 +378,7 @@ static void test_preprocess(void)
macros[0].Name = "KEY(a)";
macros[0].Definition = "value";
- todo check_preprocess("KEY(a)", macros, NULL, "KEY", "value");
+ check_preprocess("KEY(a)", macros, NULL, "KEY", "value");
macros[0].Name = "KEY";
macros[0].Definition = "value1";
@@ -398,7 +400,8 @@ static void test_preprocess(void)
macros[1].Definition = "KEY2";
todo check_preprocess("KEY", macros, NULL, "value", NULL);
- todo check_preprocess(test_include_top, NULL, &test_include, "pass", "fail");
+ if (0)
+ todo check_preprocess(test_include_top, NULL, &test_include, "pass", "fail");
ok(!refcount_file1, "Got %d references to file1.\n", refcount_file1);
ok(!refcount_file2, "Got %d references to file1.\n", refcount_file2);
ok(!refcount_file3, "Got %d references to file1.\n", refcount_file3);
--
2.29.2
Dec. 7, 2020
[PATCH vkd3d v3 2/5] vkd3d-shader: Parse comments in the preprocessor.
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
libs/vkd3d-shader/preproc.l | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d-shader/preproc.l b/libs/vkd3d-shader/preproc.l
index 656ad674..89a4f606 100644
--- a/libs/vkd3d-shader/preproc.l
+++ b/libs/vkd3d-shader/preproc.l
@@ -36,16 +36,33 @@
%option never-interactive
%option noinput
%option nounput
+%option noyy_top_state
%option noyywrap
%option prefix="preproc_yy"
%option reentrant
+%option stack
+
+ /* Because these can both be terminated by EOF, we need states for them. */
+%s C_COMMENT
+%s CXX_COMMENT
WS [ \t]
%%
-{WS}+ {}
-. {return T_TEXT;}
+<INITIAL>"//" {yy_push_state(CXX_COMMENT, yyscanner);}
+<INITIAL>"/*" {yy_push_state(C_COMMENT, yyscanner);}
+<CXX_COMMENT>\\\r?\n {}
+<CXX_COMMENT>\n {
+ yy_pop_state(yyscanner);
+ return T_TEXT;
+ }
+<C_COMMENT>"*/" {yy_pop_state(yyscanner);}
+<C_COMMENT,CXX_COMMENT><<EOF>> {yy_pop_state(yyscanner);}
+<C_COMMENT,CXX_COMMENT>. {}
+
+<INITIAL>{WS}+ {}
+<INITIAL>. {return T_TEXT;}
%%
--
2.29.2
Dec. 7, 2020
[PATCH vkd3d v3 1/5] vkd3d-shader: Implement an initial pass-through HLSL preprocessor.
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
v3: add the generated flex/bison files to CLEANFILES; avoid a bison warning by
always setting the output file to preproc.tab.c; avoid YYEOF which is only
available since bison 3.6
.gitignore | 3 +
Makefile.am | 31 +++++++-
configure.ac | 6 ++
libs/vkd3d-shader/preproc.h | 33 ++++++++
libs/vkd3d-shader/preproc.l | 99 ++++++++++++++++++++++++
libs/vkd3d-shader/preproc.y | 60 ++++++++++++++
libs/vkd3d-shader/vkd3d_shader_main.c | 16 +++-
libs/vkd3d-shader/vkd3d_shader_private.h | 8 ++
tests/hlsl_d3d12.c | 31 ++++----
9 files changed, 265 insertions(+), 22 deletions(-)
create mode 100644 libs/vkd3d-shader/preproc.h
create mode 100644 libs/vkd3d-shader/preproc.l
create mode 100644 libs/vkd3d-shader/preproc.y
diff --git a/.gitignore b/.gitignore
index 63a9ffc6..b6d29d19 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,7 +19,10 @@ vkd3d-*.tar.xz
*.log
*.o
*.pc
+*.tab.c
+*.tab.h
*.trs
+*.yy.c
*~
.deps
diff --git a/Makefile.am b/Makefile.am
index 5a6e4dc9..32c8777f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -108,6 +108,33 @@ libvkd3d_common_la_SOURCES = \
lib_LTLIBRARIES = libvkd3d-shader.la libvkd3d.la libvkd3d-utils.la
+VKD3D_V_FLEX = $(vkd3d_v_flex_(a)AM_V@)
+vkd3d_v_flex_ = $(vkd3d_v_flex_(a)AM_DEFAULT_V@)
+vkd3d_v_flex_0 = @echo " FLEX " $@;
+vkd3d_v_flex_1 =
+
+VKD3D_V_BISON = $(vkd3d_v_bison_(a)AM_V@)
+vkd3d_v_bison_ = $(vkd3d_v_bison_(a)AM_DEFAULT_V@)
+vkd3d_v_bison_0 = @echo " BISON " $@;
+vkd3d_v_bison_1 =
+
+libs/vkd3d-shader/preproc.yy.c: libs/vkd3d-shader/preproc.l
+ $(VKD3D_V_FLEX)$(FLEX) $(LFLAGS) -o $@ $<
+
+libs/vkd3d-shader/preproc.tab.c libs/vkd3d-shader/preproc.tab.h &: libs/vkd3d-shader/preproc.y
+ $(VKD3D_V_BISON)$(BISON) $(YFLAGS) -d -o libs/vkd3d-shader/preproc.tab.c $<
+
+BUILT_SOURCES += libs/vkd3d-shader/preproc.tab.h
+
+vkd3d_shader_yyfiles = \
+ libs/vkd3d-shader/preproc.tab.c \
+ libs/vkd3d-shader/preproc.tab.h \
+ libs/vkd3d-shader/preproc.yy.c
+
+CLEANFILES = $(vkd3d_shader_yyfiles)
+
+nodist_libvkd3d_shader_la_SOURCES = $(vkd3d_shader_yyfiles)
+
libvkd3d_shader_la_SOURCES = \
include/private/list.h \
include/private/rbtree.h \
@@ -122,7 +149,7 @@ libvkd3d_shader_la_SOURCES = \
libs/vkd3d-shader/vkd3d_shader.map \
libs/vkd3d-shader/vkd3d_shader_main.c \
libs/vkd3d-shader/vkd3d_shader_private.h
-libvkd3d_shader_la_CFLAGS = $(AM_CFLAGS) @SPIRV_TOOLS_CFLAGS@
+libvkd3d_shader_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/libs/vkd3d-shader @SPIRV_TOOLS_CFLAGS@
libvkd3d_shader_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0
libvkd3d_shader_la_LIBADD = libvkd3d-common.la @SPIRV_TOOLS_LIBS@
if HAVE_LD_VERSION_SCRIPT
@@ -173,7 +200,7 @@ EXTRA_DIST = ANNOUNCE LICENSE
pkgconfigdir = $(libdir)/pkgconfig
pkginclude_HEADERS = $(vkd3d_public_headers)
nodist_pkgconfig_DATA = libvkd3d.pc libvkd3d-shader.pc libvkd3d-utils.pc
-CLEANFILES = libvkd3d.pc libvkd3d-shader.pc libvkd3d-utils.pc
+CLEANFILES += libvkd3d.pc libvkd3d-shader.pc libvkd3d-utils.pc
EXTRA_DIST += \
libs/vkd3d/libvkd3d.pc.in \
libs/vkd3d-shader/libvkd3d-shader.pc.in \
diff --git a/configure.ac b/configure.ac
index 2f22b05f..b7902b63 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,6 +30,12 @@ AC_PROG_MKDIR_P
VKD3D_PROG_WIDL(3, 20)
AS_IF([test "x$WIDL" = "xno"], [AC_MSG_WARN([widl is required to build header files.])])
+AC_CHECK_PROGS([FLEX], [flex], [none])
+AS_IF([test "$FLEX" = "none"], [AC_MSG_ERROR([no suitable flex found. Please install the 'flex' package.])])
+
+AC_CHECK_PROGS([BISON], [bison], [none])
+AS_IF([test "$BISON" = "none"], [AC_MSG_ERROR([no suitable bison found. Please install the 'bison' package.])])
+
DX_PS_FEATURE([OFF])
DX_INIT_DOXYGEN([vkd3d], [Doxyfile], [doc])
AC_CONFIG_FILES([Doxyfile])
diff --git a/libs/vkd3d-shader/preproc.h b/libs/vkd3d-shader/preproc.h
new file mode 100644
index 00000000..cbd93229
--- /dev/null
+++ b/libs/vkd3d-shader/preproc.h
@@ -0,0 +1,33 @@
+/*
+ * HLSL preprocessor
+ *
+ * Copyright 2020 Zebediah Figura for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef __VKD3D_SHADER_PREPROC_H
+#define __VKD3D_SHADER_PREPROC_H
+
+#include "vkd3d_shader_private.h"
+
+struct preproc_ctx
+{
+ void *scanner;
+
+ struct vkd3d_string_buffer buffer;
+};
+
+#endif
diff --git a/libs/vkd3d-shader/preproc.l b/libs/vkd3d-shader/preproc.l
new file mode 100644
index 00000000..656ad674
--- /dev/null
+++ b/libs/vkd3d-shader/preproc.l
@@ -0,0 +1,99 @@
+/*
+ * HLSL preprocessor
+ *
+ * Copyright 2020 Zebediah Figura for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+%{
+
+#include "preproc.tab.h"
+
+#define YYSTYPE PREPROC_YYSTYPE
+#define YYLTYPE PREPROC_YYLTYPE
+
+#define YY_DECL static int preproc_lexer_lex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner)
+
+%}
+
+%option 8bit
+%option bison-bridge
+%option bison-locations
+%option extra-type="struct preproc_ctx *"
+%option never-interactive
+%option noinput
+%option nounput
+%option noyywrap
+%option prefix="preproc_yy"
+%option reentrant
+
+WS [ \t]
+
+%%
+
+{WS}+ {}
+. {return T_TEXT;}
+
+%%
+
+int yylex(YYSTYPE *lval, YYLTYPE *lloc, yyscan_t scanner)
+{
+ struct preproc_ctx *ctx = yyget_extra(scanner);
+
+ for (;;)
+ {
+ const char *text;
+ int token;
+
+ if (!(token = preproc_lexer_lex(lval, lloc, scanner)))
+ return 0;
+ text = yyget_text(scanner);
+
+ TRACE("Parsing token %d, string %s.\n", token, debugstr_a(text));
+
+ vkd3d_string_buffer_printf(&ctx->buffer, "%s ", text);
+ }
+}
+
+int preproc_lexer_parse(const struct vkd3d_shader_compile_info *compile_info,
+ struct vkd3d_shader_code *out, struct vkd3d_shader_message_context *message_context)
+{
+ struct preproc_ctx ctx = {0};
+ YY_BUFFER_STATE top_buffer;
+ void *output_code;
+
+ vkd3d_string_buffer_init(&ctx.buffer);
+
+ yylex_init_extra(&ctx, &ctx.scanner);
+ top_buffer = yy_scan_bytes(compile_info->source.code, compile_info->source.size, ctx.scanner);
+
+ preproc_yyparse(ctx.scanner, &ctx);
+
+ yy_delete_buffer(top_buffer, ctx.scanner);
+ yylex_destroy(ctx.scanner);
+
+ if (!(output_code = vkd3d_malloc(ctx.buffer.content_size)))
+ {
+ vkd3d_string_buffer_cleanup(&ctx.buffer);
+ return VKD3D_ERROR_OUT_OF_MEMORY;
+ }
+ memcpy(output_code, ctx.buffer.buffer, ctx.buffer.content_size);
+ out->size = ctx.buffer.content_size;
+ out->code = output_code;
+ vkd3d_string_buffer_trace(&ctx.buffer);
+ vkd3d_string_buffer_cleanup(&ctx.buffer);
+ return VKD3D_OK;
+}
diff --git a/libs/vkd3d-shader/preproc.y b/libs/vkd3d-shader/preproc.y
new file mode 100644
index 00000000..92448f24
--- /dev/null
+++ b/libs/vkd3d-shader/preproc.y
@@ -0,0 +1,60 @@
+/*
+ * HLSL preprocessor
+ *
+ * Copyright 2020 Zebediah Figura for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+%code requires
+{
+
+#include "vkd3d_shader_private.h"
+#include "preproc.h"
+
+}
+
+%code provides
+{
+
+int preproc_yylex(PREPROC_YYSTYPE *yylval_param, PREPROC_YYLTYPE *yylloc_param, void *scanner);
+
+}
+
+%code
+{
+
+static void yyerror(const YYLTYPE *loc, void *scanner, struct preproc_ctx *ctx, const char *string)
+{
+ FIXME("Error reporting is not implemented.\n");
+}
+
+}
+
+%define api.prefix {preproc_yy}
+%define api.pure full
+%define parse.error verbose
+%expect 0
+%locations
+%lex-param {yyscan_t scanner}
+%parse-param {void *scanner}
+%parse-param {struct preproc_ctx *ctx}
+
+%token T_TEXT
+
+%%
+
+shader_text
+ : %empty
diff --git a/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d-shader/vkd3d_shader_main.c
index 1a029246..eed0316c 100644
--- a/libs/vkd3d-shader/vkd3d_shader_main.c
+++ b/libs/vkd3d-shader/vkd3d_shader_main.c
@@ -78,8 +78,7 @@ int vkd3d_string_buffer_vprintf(struct vkd3d_string_buffer *buffer, const char *
}
}
-static int VKD3D_PRINTF_FUNC(2, 3) vkd3d_string_buffer_printf(struct vkd3d_string_buffer *buffer,
- const char *format, ...)
+int vkd3d_string_buffer_printf(struct vkd3d_string_buffer *buffer, const char *format, ...)
{
va_list args;
int ret;
@@ -91,7 +90,7 @@ static int VKD3D_PRINTF_FUNC(2, 3) vkd3d_string_buffer_printf(struct vkd3d_strin
return ret;
}
-static void vkd3d_string_buffer_trace_(const struct vkd3d_string_buffer *buffer, const char *function)
+void vkd3d_string_buffer_trace_(const struct vkd3d_string_buffer *buffer, const char *function)
{
const char *p, *q, *end = buffer->buffer + buffer->content_size;
@@ -1154,6 +1153,7 @@ const enum vkd3d_shader_target_type *vkd3d_shader_get_supported_target_types(
int vkd3d_shader_preprocess(const struct vkd3d_shader_compile_info *compile_info,
struct vkd3d_shader_code *out, char **messages)
{
+ struct vkd3d_shader_message_context message_context;
int ret;
TRACE("compile_info %p, out %p, messages %p.\n", compile_info, out, messages);
@@ -1164,5 +1164,13 @@ 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;
- return VKD3D_ERROR_NOT_IMPLEMENTED;
+ vkd3d_shader_message_context_init(&message_context, compile_info->log_level, compile_info->source_name);
+
+ ret = preproc_lexer_parse(compile_info, out, &message_context);
+
+ vkd3d_shader_message_context_trace_messages(&message_context);
+ if (!vkd3d_shader_message_context_copy_messages(&message_context, messages))
+ ret = VKD3D_ERROR_OUT_OF_MEMORY;
+ vkd3d_shader_message_context_cleanup(&message_context);
+ return ret;
}
diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h
index 5ae5724a..83038384 100644
--- a/libs/vkd3d-shader/vkd3d_shader_private.h
+++ b/libs/vkd3d-shader/vkd3d_shader_private.h
@@ -837,6 +837,11 @@ struct vkd3d_string_buffer
enum vkd3d_result vkd3d_dxbc_binary_to_text(void *data, struct vkd3d_shader_code *out) DECLSPEC_HIDDEN;
void vkd3d_string_buffer_cleanup(struct vkd3d_string_buffer *buffer) DECLSPEC_HIDDEN;
void vkd3d_string_buffer_init(struct vkd3d_string_buffer *buffer) DECLSPEC_HIDDEN;
+int vkd3d_string_buffer_printf(struct vkd3d_string_buffer *buffer,
+ const char *format, ...) VKD3D_PRINTF_FUNC(2, 3) DECLSPEC_HIDDEN;
+#define vkd3d_string_buffer_trace(buffer) \
+ vkd3d_string_buffer_trace_(buffer, __FUNCTION__)
+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
@@ -882,6 +887,9 @@ void vkd3d_dxbc_compiler_destroy(struct vkd3d_dxbc_compiler *compiler) DECLSPEC_
void vkd3d_compute_dxbc_checksum(const void *dxbc, size_t size, uint32_t checksum[4]) DECLSPEC_HIDDEN;
+int preproc_lexer_parse(const struct vkd3d_shader_compile_info *compile_info,
+ struct vkd3d_shader_code *out, struct vkd3d_shader_message_context *message_context) DECLSPEC_HIDDEN;
+
static inline enum vkd3d_shader_component_type vkd3d_component_type_from_data_type(
enum vkd3d_data_type data_type)
{
diff --git a/tests/hlsl_d3d12.c b/tests/hlsl_d3d12.c
index 4f4cc37f..787355ba 100644
--- a/tests/hlsl_d3d12.c
+++ b/tests/hlsl_d3d12.c
@@ -30,22 +30,20 @@ static void check_preprocess_(int line, const char *source, const D3D_SHADER_MAC
HRESULT hr;
hr = D3DPreprocess(source, strlen(source), NULL, macros, include, &blob, &errors);
- todo ok_(line)(hr == S_OK, "Failed to preprocess shader, hr %#x.\n", hr);
+ assert_that_(line)(hr == S_OK, "Failed to preprocess shader, hr %#x.\n", hr);
if (errors)
{
if (vkd3d_test_state.debug_level)
trace_(line)("%s\n", (char *)ID3D10Blob_GetBufferPointer(errors));
ID3D10Blob_Release(errors);
}
- if (hr != S_OK)
- return;
code = ID3D10Blob_GetBufferPointer(blob);
size = ID3D10Blob_GetBufferSize(blob);
if (present)
ok_(line)(vkd3d_memmem(code, size, present, strlen(present)),
"\"%s\" not found in preprocessed shader.\n", present);
if (absent)
- ok_(line)(!vkd3d_memmem(code, size, absent, strlen(absent)),
+ assert_that_(line)(!vkd3d_memmem(code, size, absent, strlen(absent)),
"\"%s\" found in preprocessed shader.\n", absent);
ID3D10Blob_Release(blob);
}
@@ -352,7 +350,8 @@ static void test_preprocess(void)
for (i = 0; i < ARRAY_SIZE(tests); ++i)
{
vkd3d_test_set_context("Source \"%s\"", tests[i].source);
- check_preprocess(tests[i].source, NULL, NULL, tests[i].present, tests[i].absent);
+ todo_if (i != 5 && i != 8 && i != 42)
+ check_preprocess(tests[i].source, NULL, NULL, tests[i].present, tests[i].absent);
}
vkd3d_test_set_context(NULL);
@@ -360,16 +359,16 @@ static void test_preprocess(void)
macros[0].Definition = "value";
macros[1].Name = NULL;
macros[1].Definition = NULL;
- check_preprocess("KEY", macros, NULL, "value", "KEY");
+ todo check_preprocess("KEY", macros, NULL, "value", "KEY");
- check_preprocess("#undef KEY\nKEY", macros, NULL, "KEY", "value");
+ todo check_preprocess("#undef KEY\nKEY", macros, NULL, "KEY", "value");
macros[0].Name = NULL;
- check_preprocess("KEY", macros, NULL, "KEY", "value");
+ todo check_preprocess("KEY", macros, NULL, "KEY", "value");
macros[0].Name = "KEY";
macros[0].Definition = NULL;
- check_preprocess("KEY", macros, NULL, NULL, "KEY");
+ todo check_preprocess("KEY", macros, NULL, NULL, "KEY");
macros[0].Name = "0";
macros[0].Definition = "value";
@@ -377,7 +376,7 @@ static void test_preprocess(void)
macros[0].Name = "KEY(a)";
macros[0].Definition = "value";
- check_preprocess("KEY(a)", macros, NULL, "KEY", "value");
+ todo check_preprocess("KEY(a)", macros, NULL, "KEY", "value");
macros[0].Name = "KEY";
macros[0].Definition = "value1";
@@ -385,33 +384,33 @@ static void test_preprocess(void)
macros[1].Definition = "value2";
macros[2].Name = NULL;
macros[2].Definition = NULL;
- check_preprocess("KEY", macros, NULL, "value2", NULL);
+ todo check_preprocess("KEY", macros, NULL, "value2", NULL);
macros[0].Name = "KEY";
macros[0].Definition = "KEY2";
macros[1].Name = "KEY2";
macros[1].Definition = "value";
- check_preprocess("KEY", macros, NULL, "value", NULL);
+ todo check_preprocess("KEY", macros, NULL, "value", NULL);
macros[0].Name = "KEY2";
macros[0].Definition = "value";
macros[1].Name = "KEY";
macros[1].Definition = "KEY2";
- check_preprocess("KEY", macros, NULL, "value", NULL);
+ todo check_preprocess("KEY", macros, NULL, "value", NULL);
- check_preprocess(test_include_top, NULL, &test_include, "pass", "fail");
+ todo check_preprocess(test_include_top, NULL, &test_include, "pass", "fail");
ok(!refcount_file1, "Got %d references to file1.\n", refcount_file1);
ok(!refcount_file2, "Got %d references to file1.\n", refcount_file2);
ok(!refcount_file3, "Got %d references to file1.\n", refcount_file3);
todo ok(include_count_file2 == 2, "file2 was included %u times.\n", include_count_file2);
/* Macro invocation spread across multiple files. */
- check_preprocess(test_include2_top, NULL, &test_include, "pass", NULL);
+ todo check_preprocess(test_include2_top, NULL, &test_include, "pass", NULL);
blob = errors = (ID3D10Blob *)0xdeadbeef;
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);
- ok(blob == (ID3D10Blob *)0xdeadbeef, "Expected no compiled shader blob.\n");
+ todo ok(blob == (ID3D10Blob *)0xdeadbeef, "Expected no compiled shader blob.\n");
todo ok(!!errors, "Expected non-NULL error blob.\n");
if (errors)
{
--
2.29.2
Dec. 7, 2020
[PATCH] setupapi: Handle NULL source filename in build_filepathsW.
by Hans Leidekker
Source filename is NULL for files to be deleted.
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/setupapi/queue.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/setupapi/queue.c b/dlls/setupapi/queue.c
index 7ed66c298d3..dc718cc66fc 100644
--- a/dlls/setupapi/queue.c
+++ b/dlls/setupapi/queue.c
@@ -152,7 +152,7 @@ static BOOL build_filepathsW( const struct file_op *op, FILEPATHS_W *paths )
unsigned int src_len = 1, dst_len = 1;
WCHAR *source = (PWSTR)paths->Source, *target = (PWSTR)paths->Target;
- if (op->src_file[0] != '@')
+ if (!op->src_file || op->src_file[0] != '@')
{
if (op->media) src_len += lstrlenW(op->media->root) + 1;
if (op->src_path) src_len += lstrlenW(op->src_path) + 1;
@@ -174,7 +174,7 @@ static BOOL build_filepathsW( const struct file_op *op, FILEPATHS_W *paths )
paths->Target = target = HeapAlloc( GetProcessHeap(), 0, dst_len );
}
if (!source || !target) return FALSE;
- if (op->src_file[0] != '@')
+ if (!op->src_file || op->src_file[0] != '@')
concat_W( source, op->media ? op->media->root : NULL, op->src_path, op->src_file );
else
lstrcpyW( source, op->src_file );
--
2.20.1
Dec. 7, 2020
Re: ntdll:exception crashes some Windows 10
by Paul Gofman
On 12/7/20 17:07, Francois Gouget wrote:
> So I have a problem with ntdll:exception: it crashes the Windows 10 VM I
> set up on my development TestBot machine. I'd appreciate any insight you
> may have.
>
> The VM is Windows 10 Pro 64-bit [1] with all updates all the way to
> 2020-11-03. And the following exception.c lines cause it to crash:
>
> dreg_test.dr0 = 0x42424240;
> dreg_test.dr2 = 0x126bb070;
> dreg_test.dr3 = 0x0badbad0;
> dreg_test.dr7 = 0xffff0115;
> run_exception_test(dreg_handler, &dreg_test, &segfault_code, sizeof(segfault_code), 0);
>
> Same thing for the next dreg_handler test a few lines down.
> None of the TestBot's Windows 10 VMs crash when running that code :-(
>
> More data:
> * The crash is 100% reproducible.
>
> * I get a BSOD saying KERNEL_SECURITY_CHECK_FAILURE
>
> * Looking in the event log I found the following:
>
> The computer has rebooted from a bugcheck. The bugcheck was:
> 0x00000139 (0x0000000000000004, 0xffff9f019bff5010,
> 0xffff9f019bff4f68, 0x0000000000000000). A dump was saved in:
> C:\Windows\MEMORY.DMP. Report Id: fb52dedb-eb5e-4010-b0ac-d17284efc806.
>
> * 0x139 does match KERNEL_SECURITY_CHECK_FAILURE. If I understand
> correctly its type is 0x4, i.e. reserved, which is not very helpful.
> https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/bug-chec…
>
> * The online resources are really not helpful. They suggest to:
> - Check the memory (in a VM? did so anyway, found nothing)
> - Run chkdsk /f c: (nothing)
> - Run sfc /scannow (found nothing)
> - Get the latest drivers. I use the QEmu 0.1.185 drivers (stable
> branch, same as the TestBot).
> - Disable the hyper-v network adapter. I use an e1000e network card
> (like in the official TestBot).
>
> * I use qemu 1:5.0-14~bpo10+1, like vm4 which runs w10pro64.
>
> * I use the same hardware configuration as the TestBot except for the
> CPU (Haswell-noTSX-IBRS instead of IvyBridge-IBRS) and 4 cores instead
> of 3.
>
>
>
> [1] Installed from Win10_2009_English_x64.19042.iso
>
While it looks like a definite VM bug, it is maybe interesting to know
for a start what exactly triggers the error. Is it possible to see if
disabling the setting of the debug registers in dreg_handler() above
(lines context->Dr<n> = test->dr<n>;) avoids the crash, and if yes,
which exactly register(s) setting trigger that. That is, disable setting
all the registers, then check if setting dr7 alone still crashes it
(setting dr7 enables HW breakpoints), and if no, leave dr7 enabled and
enable the others one at a time to see which will trigger the crash.
Dec. 7, 2020
ntdll:exception crashes some Windows 10
by Francois Gouget
So I have a problem with ntdll:exception: it crashes the Windows 10 VM I
set up on my development TestBot machine. I'd appreciate any insight you
may have.
The VM is Windows 10 Pro 64-bit [1] with all updates all the way to
2020-11-03. And the following exception.c lines cause it to crash:
dreg_test.dr0 = 0x42424240;
dreg_test.dr2 = 0x126bb070;
dreg_test.dr3 = 0x0badbad0;
dreg_test.dr7 = 0xffff0115;
run_exception_test(dreg_handler, &dreg_test, &segfault_code, sizeof(segfault_code), 0);
Same thing for the next dreg_handler test a few lines down.
None of the TestBot's Windows 10 VMs crash when running that code :-(
More data:
* The crash is 100% reproducible.
* I get a BSOD saying KERNEL_SECURITY_CHECK_FAILURE
* Looking in the event log I found the following:
The computer has rebooted from a bugcheck. The bugcheck was:
0x00000139 (0x0000000000000004, 0xffff9f019bff5010,
0xffff9f019bff4f68, 0x0000000000000000). A dump was saved in:
C:\Windows\MEMORY.DMP. Report Id: fb52dedb-eb5e-4010-b0ac-d17284efc806.
* 0x139 does match KERNEL_SECURITY_CHECK_FAILURE. If I understand
correctly its type is 0x4, i.e. reserved, which is not very helpful.
https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/bug-chec…
* The online resources are really not helpful. They suggest to:
- Check the memory (in a VM? did so anyway, found nothing)
- Run chkdsk /f c: (nothing)
- Run sfc /scannow (found nothing)
- Get the latest drivers. I use the QEmu 0.1.185 drivers (stable
branch, same as the TestBot).
- Disable the hyper-v network adapter. I use an e1000e network card
(like in the official TestBot).
* I use qemu 1:5.0-14~bpo10+1, like vm4 which runs w10pro64.
* I use the same hardware configuration as the TestBot except for the
CPU (Haswell-noTSX-IBRS instead of IvyBridge-IBRS) and 4 cores instead
of 3.
[1] Installed from Win10_2009_English_x64.19042.iso
--
Francois Gouget <fgouget(a)codeweavers.com>
Dec. 7, 2020
Re: [PATCH] ntdll/tests: Add a broken result for Win7u in test_extended_context().
by Francois Gouget
On Mon, 7 Dec 2020, Paul Gofman wrote:
> Fixes test failures on w7u testbot machines.
Thank you!
That was a bit puzzling.
--
Francois Gouget <fgouget(a)codeweavers.com>
Dec. 7, 2020
[PATCH] ntdll/tests: Add a broken result for Win7u in test_extended_context().
by Paul Gofman
Fixes test failures on w7u testbot machines.
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
---
dlls/ntdll/tests/exception.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index 89ffe98f0ad..5686e39ab9e 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -7675,9 +7675,10 @@ static void test_extended_context(void)
memset(&xs->YmmContext, 0xcc, sizeof(xs->YmmContext));
bret = GetThreadContext(thread, context);
ok(bret, "Got unexpected bret %#x, GetLastError() %u.\n", bret, GetLastError());
- ok(xs->Mask == (sizeof(void *) == 4 ? 4 : 0), "Got unexpected Mask %s.\n", wine_dbgstr_longlong(xs->Mask));
+ ok(xs->Mask == (sizeof(void *) == 4 ? 4 : 0) || broken(sizeof(void *) == 4 && !xs->Mask) /* Win7u */,
+ "Got unexpected Mask %s.\n", wine_dbgstr_longlong(xs->Mask));
for (i = 0; i < 16 * 4; ++i)
- ok(((ULONG *)&xs->YmmContext)[i] == (sizeof(void *) == 4 ? (i < 8 * 4 ? 0 : 0x48484848) : 0xcccccccc),
+ ok(((ULONG *)&xs->YmmContext)[i] == (xs->Mask ? (i < 8 * 4 ? 0 : 0x48484848) : 0xcccccccc),
"Got unexpected value %#x, i %u.\n", ((ULONG *)&xs->YmmContext)[i], i);
bret = ResumeThread(thread);
--
2.28.0
Dec. 7, 2020
[PATCH] ntdll: Restore non-volatile registers in call_user_exception_dispatcher() on x86_64.
by Paul Gofman
Required to correctly restore non-volatile registers during unwind.
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
---
dlls/ntdll/tests/exception.c | 58 ++++++++++++++++++++++++++++-----
dlls/ntdll/unix/signal_x86_64.c | 57 +++++++++++++++++++++++---------
2 files changed, 91 insertions(+), 24 deletions(-)
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index 3451a7d6465..89ffe98f0ad 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -56,6 +56,7 @@ static void * (WINAPI *pRtlLocateExtendedFeature)(CONTEXT_EX *context_ex, ULO
static void * (WINAPI *pRtlLocateLegacyContext)(CONTEXT_EX *context_ex, ULONG *length);
static void (WINAPI *pRtlSetExtendedFeaturesMask)(CONTEXT_EX *context_ex, ULONG64 feature_mask);
static ULONG64 (WINAPI *pRtlGetExtendedFeaturesMask)(CONTEXT_EX *context_ex);
+static NTSTATUS (WINAPI *pNtRaiseException)(EXCEPTION_RECORD *rec, CONTEXT *context, BOOL first_chance);
static NTSTATUS (WINAPI *pNtReadVirtualMemory)(HANDLE, const void*, void*, SIZE_T, SIZE_T*);
static NTSTATUS (WINAPI *pNtTerminateProcess)(HANDLE handle, LONG exit_code);
static NTSTATUS (WINAPI *pNtQueryInformationProcess)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG, PULONG);
@@ -1828,7 +1829,7 @@ static LONG WINAPI dbg_except_continue_vectored_handler(struct _EXCEPTION_POINTE
}
/* Use CDECL to leave arguments on stack. */
-void CDECL hook_KiUserExceptionDispatcher(EXCEPTION_RECORD *rec, CONTEXT *context)
+static void CDECL hook_KiUserExceptionDispatcher(EXCEPTION_RECORD *rec, CONTEXT *context)
{
trace("rec %p, context %p.\n", rec, context);
trace("context->Eip %#x, context->Esp %#x, ContextFlags %#x.\n",
@@ -3716,6 +3717,8 @@ static struct
}
test_kiuserexceptiondispatcher_regs;
+static ULONG64 test_kiuserexceptiondispatcher_saved_r12;
+
static DWORD dbg_except_continue_handler(EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher)
{
@@ -3738,6 +3741,13 @@ static LONG WINAPI dbg_except_continue_vectored_handler(struct _EXCEPTION_POINTE
trace("dbg_except_continue_vectored_handler, code %#x, Rip %#lx.\n", rec->ExceptionCode, context->Rip);
+ if (rec->ExceptionCode == 0xceadbeef)
+ {
+ ok(context->P1Home == (ULONG64)0xdeadbeeffeedcafe, "Got unexpected context->P1Home %#lx.\n", context->P1Home);
+ context->R12 = test_kiuserexceptiondispatcher_saved_r12;
+ return EXCEPTION_CONTINUE_EXECUTION;
+ }
+
ok(rec->ExceptionCode == 0x80000003, "Got unexpected exception code %#x.\n", rec->ExceptionCode);
got_exception = 1;
@@ -3752,7 +3762,7 @@ static LONG WINAPI dbg_except_continue_vectored_handler(struct _EXCEPTION_POINTE
return EXCEPTION_CONTINUE_EXECUTION;
}
-void WINAPI hook_KiUserExceptionDispatcher(EXCEPTION_RECORD *rec, CONTEXT *context)
+static void WINAPI hook_KiUserExceptionDispatcher(EXCEPTION_RECORD *rec, CONTEXT *context)
{
trace("rec %p, context %p.\n", rec, context);
trace("context->Rip %#lx, context->Rsp %#lx, ContextFlags %#lx.\n",
@@ -3760,7 +3770,7 @@ void WINAPI hook_KiUserExceptionDispatcher(EXCEPTION_RECORD *rec, CONTEXT *conte
hook_called = TRUE;
/* Broken on Win2008, probably rec offset in stack is different. */
- ok(rec->ExceptionCode == 0x80000003 || broken(!rec->ExceptionCode),
+ ok(rec->ExceptionCode == 0x80000003 || rec->ExceptionCode == 0xceadbeef || broken(!rec->ExceptionCode),
"Got unexpected ExceptionCode %#x.\n", rec->ExceptionCode);
hook_KiUserExceptionDispatcher_rip = (void *)context->Rip;
@@ -3810,15 +3820,15 @@ static void test_kiuserexceptiondispatcher(void)
0x48, 0x89, 0xe2, /* mov %rsp,%rdx */
0x48, 0x8d, 0x8c, 0x24, 0xf0, 0x04, 0x00, 0x00,
/* lea 0x4f0(%rsp),%rcx */
-
+ 0x4c, 0x89, 0x22, /* mov %r12,(%rdx) */
0xff, 0x14, 0x25,
- /* offset: 14 bytes */
+ /* offset: 17 bytes */
0x00, 0x00, 0x00, 0x00, /* callq *addr */ /* call hook implementation. */
0x48, 0x31, 0xc9, /* xor %rcx, %rcx */
0x48, 0x31, 0xd2, /* xor %rdx, %rdx */
0xff, 0x24, 0x25,
- /* offset: 27 bytes */
+ /* offset: 30 bytes */
0x00, 0x00, 0x00, 0x00, /* jmpq *addr */ /* jump to original function. */
};
@@ -3827,6 +3837,8 @@ static void test_kiuserexceptiondispatcher(void)
DWORD old_protect1, old_protect2;
EXCEPTION_RECORD record;
void *bpt_address;
+ CONTEXT ctx;
+ LONG pass;
BYTE *ptr;
BOOL ret;
@@ -3845,8 +3857,8 @@ static void test_kiuserexceptiondispatcher(void)
ok(((ULONG64)&pKiUserExceptionDispatcher & 0xffffffff) == ((ULONG64)&pKiUserExceptionDispatcher),
"Address is too long.\n");
- *(unsigned int *)(hook_trampoline + 14) = (unsigned int)(ULONG_PTR)&phook_KiUserExceptionDispatcher;
- *(unsigned int *)(hook_trampoline + 27) = (unsigned int)(ULONG_PTR)&pKiUserExceptionDispatcher;
+ *(unsigned int *)(hook_trampoline + 17) = (unsigned int)(ULONG_PTR)&phook_KiUserExceptionDispatcher;
+ *(unsigned int *)(hook_trampoline + 30) = (unsigned int)(ULONG_PTR)&pKiUserExceptionDispatcher;
ret = VirtualProtect(hook_trampoline, ARRAY_SIZE(hook_trampoline), PAGE_EXECUTE_READWRITE, &old_protect1);
ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
@@ -3954,6 +3966,35 @@ static void test_kiuserexceptiondispatcher(void)
NtCurrentTeb()->Peb->BeingDebugged = 0;
+ vectored_handler = AddVectoredExceptionHandler(TRUE, dbg_except_continue_vectored_handler);
+ pass = 0;
+ InterlockedIncrement(&pass);
+ pRtlCaptureContext(&ctx);
+ if (InterlockedIncrement(&pass) == 2) /* interlocked to prevent compiler from moving before capture */
+ {
+ memcpy(pKiUserExceptionDispatcher, patched_KiUserExceptionDispatcher_bytes,
+ sizeof(patched_KiUserExceptionDispatcher_bytes));
+ got_exception = 0;
+ hook_called = FALSE;
+
+ record.ExceptionCode = 0xceadbeef;
+ test_kiuserexceptiondispatcher_saved_r12 = ctx.R12;
+ ctx.R12 = (ULONG64)0xdeadbeeffeedcafe;
+
+#ifdef __GNUC__
+ /* Spoil r12 value to make sure it doesn't come from the current userspace registers. */
+ __asm__ volatile("movq $0xdeadcafe, %%r12" : : : "%r12");
+#endif
+ pNtRaiseException(&record, &ctx, TRUE);
+ ok(0, "Shouldn't be reached.\n");
+ }
+ else
+ {
+ ok(pass == 3, "Got unexpected pass %d.\n", pass);
+ }
+ ok(hook_called, "Hook was not called.\n");
+ RemoveVectoredExceptionHandler(vectored_handler);
+
ret = VirtualProtect(pKiUserExceptionDispatcher, sizeof(saved_KiUserExceptionDispatcher_bytes),
old_protect2, &old_protect2);
ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
@@ -8046,6 +8087,7 @@ START_TEST(exception)
X(NtQueryInformationThread);
X(NtSetInformationProcess);
X(NtSuspendProcess);
+ X(NtRaiseException);
X(NtResumeProcess);
X(RtlGetUnloadEventTrace);
X(RtlGetUnloadEventTraceEx);
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c
index 124032714c7..d049cc8b3f0 100644
--- a/dlls/ntdll/unix/signal_x86_64.c
+++ b/dlls/ntdll/unix/signal_x86_64.c
@@ -1551,6 +1551,34 @@ static void restore_context( const struct xcontext *xcontext, ucontext_t *sigcon
}
+/***********************************************************************
+ * set_nonvolatile_regs_from_context
+ *
+ * Set the non-volatile registers from CPU context.
+ */
+extern void WINAPI set_nonvolatile_regs_from_context( const CONTEXT *context );
+__ASM_GLOBAL_FUNC( 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"
+ "ret" );
+
+
/***********************************************************************
* set_full_cpu_context
*
@@ -2081,19 +2109,7 @@ __ASM_GLOBAL_FUNC( call_raise_user_exception_dispatcher,
/***********************************************************************
* call_user_exception_dispatcher
*/
-
-extern void WINAPI user_exception_dispatcher_trampoline( struct stack_layout *stack,
- void *pKiUserExceptionDispatcher );
-
-__ASM_GLOBAL_FUNC( user_exception_dispatcher_trampoline,
- "movq %rcx,%rsp\n\t"
- "movq 0x98(%rsp),%rcx\n\t" /* context->Rsp */
- "movq 0xa0(%rsp),%rbp\n\t"
- "movq 0xa8(%rsp),%rsi\n\t"
- "movq 0xb0(%rsp),%rdi\n\t"
- "jmpq *%rdx")
-
-void WINAPI do_call_user_exception_dispatcher( EXCEPTION_RECORD *rec, CONTEXT *context,
+struct stack_layout * WINAPI setup_user_exception_dispatcher_stack( EXCEPTION_RECORD *rec, CONTEXT *context,
NTSTATUS (WINAPI *dispatcher)(EXCEPTION_RECORD*,CONTEXT*),
struct stack_layout *stack )
{
@@ -2127,8 +2143,7 @@ void WINAPI do_call_user_exception_dispatcher( EXCEPTION_RECORD *rec, CONTEXT *c
/* fix up instruction pointer in context for EXCEPTION_BREAKPOINT */
if (stack->rec.ExceptionCode == EXCEPTION_BREAKPOINT) stack->context.Rip--;
- amd64_thread_data()->syscall_frame = NULL;
- user_exception_dispatcher_trampoline( stack, dispatcher );
+ return stack;
}
__ASM_GLOBAL_FUNC( call_user_exception_dispatcher,
@@ -2141,7 +2156,17 @@ __ASM_GLOBAL_FUNC( call_user_exception_dispatcher,
"1:\tsubq $0x5b0,%r9\n\t" /* sizeof(struct stack_layout) */
"cmpq %rsp,%r9\n\t"
"cmovbq %r9,%rsp\n\t"
- "jmp " __ASM_NAME("do_call_user_exception_dispatcher") "\n\t")
+ "pushq %r8\n\t"
+ "subq $0x20,%rsp\n\t"
+ "call " __ASM_NAME("setup_user_exception_dispatcher_stack") "\n\t"
+ "mov %rax,%rcx\n\t"
+ "call " __ASM_NAME("set_nonvolatile_regs_from_context") "\n\t"
+ "addq $0x20,%rsp\n\t"
+ "popq %r8\n\t"
+ "mov %rcx,%rsp\n\t"
+ "movq %gs:0x30,%rax\n\t"
+ "movq $0,0x328(%rax)\n\t" /* amd64_thread_data()->syscall_frame */
+ "jmpq *%r8")
/***********************************************************************
* is_privileged_instr
--
2.28.0
Dec. 7, 2020
[RFC PATCH 4/4] winex11.drv: Dump keysyms and translations for all keys.
by Giovanni Mascellani
Dump all we can see about the user keyboard, so that their +keyboard
logs can be used to fix layout tables.
Signed-off-by: Giovanni Mascellani <gmascellani(a)codeweavers.com>
---
dlls/winex11.drv/keyboard.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c
index fe4a29c4b06..281cd1b1b1a 100644
--- a/dlls/winex11.drv/keyboard.c
+++ b/dlls/winex11.drv/keyboard.c
@@ -1477,6 +1477,19 @@ X11DRV_KEYBOARD_DetectLayout( Display *display )
for (i = 0; i < syms; i++) {
if (!(keysym = keycode_to_keysym (display, keyc, i))) continue;
ckey[keyc][i] = keysym_to_char(keysym);
+ if (TRACE_ON(keyboard))
+ {
+ char buf[32];
+ WCHAR bufW[32];
+ int len, lenW;
+ KeySym orig_keysym = keysym;
+ len = XkbTranslateKeySym(display, &keysym, 0, buf, sizeof(buf), NULL);
+ lenW = MultiByteToWideChar(CP_UNIXCP, 0, buf, len, bufW, ARRAY_SIZE(bufW));
+ if (lenW < ARRAY_SIZE(bufW))
+ bufW[lenW] = 0;
+ TRACE("keycode %u, index %d, orig_keysym 0x%04lx, keysym 0x%04lx, buf %s, bufW %s\n",
+ keyc, i, orig_keysym, keysym, debugstr_a(buf), debugstr_w(bufW));
+ }
}
}
--
2.29.2
Dec. 7, 2020
[RFC PATCH 3/4] winex11drv: Recognize the keyboard in a locale-independent way.
by Giovanni Mascellani
Try to recognize the keyboard comparing keysyms instead of converting
them to multibyte strings, which makes the process locale-dependent and
therefore more fragile.
Unfortunately this means that the layout tables might need to be
updated. However, this change is known to fix the recognitions of a few
keys in the French layout.
---
dlls/winex11.drv/keyboard.c | 64 ++++++++++++++++++-------------------
1 file changed, 31 insertions(+), 33 deletions(-)
This is the meaty patch in the series, and the one about which I would
especially like to gather some feedback. I believe the current
mechanism for detecting keys is broken, because sometimes it
translates keys to (locale-dependent) encodings, sometimes it just
use the last byte in the keysym. I believe the right space to run
the key detection algorithm is KeySym, because it is really meant to
indicate what label is written on the physical keys.
The full solution would be to just use keysyms, without touching them.
However, this would completely invalidate current layout tables.
Instead, my patch contains an intermediate solution: instead of the
keysym, use its last byte. I don't understand all the details of
the current matching filter, but I think current layout tables
should largely remain valid.
diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c
index d9a6879ee04..fe4a29c4b06 100644
--- a/dlls/winex11.drv/keyboard.c
+++ b/dlls/winex11.drv/keyboard.c
@@ -1417,6 +1417,35 @@ BOOL X11DRV_KeyEvent( HWND hwnd, XEvent *xev )
return TRUE;
}
+/* From the point of view of this function there are two types of
+ * keys: those for which the mapping to vkey and scancode depends on
+ * the keyboard layout (i.e., letters, numbers, punctuation) and those
+ * for which it doesn't (control keys); since this function is used to
+ * recognize the keyboard layout and map keysyms to vkeys and
+ * scancodes, we are only concerned about the first type, and map
+ * everything in the second type to zero.
+ */
+static char keysym_to_char( KeySym keysym )
+{
+ /* Dead keys */
+ if (0xfe50 <= keysym && keysym < 0xfed0)
+ return KEYBOARD_MapDeadKeysym( keysym );
+
+ /* Control keys (there is nothing allocated below 0xfc00, but I
+ take some margin in case something is added in the future) */
+ if (0xf000 <= keysym && keysym < 0x10000)
+ return 0;
+
+ /* XFree86 vendor keys */
+ if (0x10000000 <= keysym)
+ return 0;
+
+ /* "Normal" keys: return last octet, because our tables don't have
+ more than that; it would be better to extend the tables and
+ compare the whole keysym, but it's a lot of work... */
+ return keysym & 0xff;
+}
+
/**********************************************************************
* X11DRV_KEYBOARD_DetectLayout
*
@@ -1447,24 +1476,7 @@ X11DRV_KEYBOARD_DetectLayout( Display *display )
/* get data for keycode from X server */
for (i = 0; i < syms; i++) {
if (!(keysym = keycode_to_keysym (display, keyc, i))) continue;
- /* Allow both one-byte and two-byte national keysyms */
- if ((keysym < 0x8000) && (keysym != ' '))
- {
-#ifdef HAVE_XKB
- if (!use_xkb || !XkbTranslateKeySym(display, &keysym, 0, &ckey[keyc][i], 1, NULL))
-#endif
- {
- TRACE("XKB could not translate keysym %04lx\n", keysym);
- /* FIXME: query what keysym is used as Mode_switch, fill XKeyEvent
- * with appropriate ShiftMask and Mode_switch, use XLookupString
- * to get character in the local encoding.
- */
- ckey[keyc][i] = keysym & 0xFF;
- }
- }
- else {
- ckey[keyc][i] = KEYBOARD_MapDeadKeysym(keysym);
- }
+ ckey[keyc][i] = keysym_to_char(keysym);
}
}
@@ -1713,21 +1725,7 @@ void X11DRV_InitKeyboard( Display *display )
int maxlen=0,maxval=-1,ok;
for (i=0; i<syms; i++) {
keysym = keycode_to_keysym(display, keyc, i);
- if ((keysym<0x8000) && (keysym!=' '))
- {
-#ifdef HAVE_XKB
- if (!use_xkb || !XkbTranslateKeySym(display, &keysym, 0, &ckey[i], 1, NULL))
-#endif
- {
- /* FIXME: query what keysym is used as Mode_switch, fill XKeyEvent
- * with appropriate ShiftMask and Mode_switch, use XLookupString
- * to get character in the local encoding.
- */
- ckey[i] = (keysym <= 0x7F) ? keysym : 0;
- }
- } else {
- ckey[i] = KEYBOARD_MapDeadKeysym(keysym);
- }
+ ckey[i] = keysym_to_char(keysym);
}
/* find key with longest match streak */
for (keyn=0; keyn<MAIN_LEN; keyn++) {
--
2.29.2
Dec. 7, 2020
[RFC PATCH 2/4] winex11.drv: Do not pollute logs with misencoded bytes.
by Giovanni Mascellani
Signed-off-by: Giovanni Mascellani <gmascellani(a)codeweavers.com>
---
dlls/winex11.drv/keyboard.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c
index e92d2bf35f2..d9a6879ee04 100644
--- a/dlls/winex11.drv/keyboard.c
+++ b/dlls/winex11.drv/keyboard.c
@@ -1506,7 +1506,7 @@ X11DRV_KEYBOARD_DetectLayout( Display *display )
char str[5];
for (i = 0; i < 4; i++) str[i] = ckey[keyc][i] ? ckey[keyc][i] : ' ';
str[4] = 0;
- TRACE_(key)("mismatch for keycode %u, got %s\n", keyc, str);
+ TRACE_(key)("mismatch for keycode %u, got %s\n", keyc, debugstr_a(str));
mismatch++;
score -= syms;
}
--
2.29.2
Dec. 7, 2020
[RFC PATCH 1/4] winex11.drv: Allow keyboard score to be negative.
by Giovanni Mascellani
Signed-off-by: Giovanni Mascellani <gmascellani(a)codeweavers.com>
---
dlls/winex11.drv/keyboard.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c
index 48da12c0292..e92d2bf35f2 100644
--- a/dlls/winex11.drv/keyboard.c
+++ b/dlls/winex11.drv/keyboard.c
@@ -1433,7 +1433,7 @@ X11DRV_KEYBOARD_DetectLayout( Display *display )
KeySym keysym = 0;
const char (*lkey)[MAIN_LEN][4];
unsigned max_seq = 0;
- int max_score = 0, ismatch = 0;
+ int max_score = INT_MIN, ismatch = 0;
char ckey[256][4];
syms = keysyms_per_keycode;
--
2.29.2
Dec. 7, 2020
[PATCH] sxs: Query context that contains the GUID in SxsLookupClrGuid().
by Nikolay Sivov
This restores pre-2cfc85dc55d403a7fcb885a62bb28f8d73498c2d logic;
activation/deactivation still happens, and user context in this case is
returned from FindActCtxSectionGuid().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50139
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/sxs/sxs.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/dlls/sxs/sxs.c b/dlls/sxs/sxs.c
index 7150f55c33e..cd1d0f7bb56 100644
--- a/dlls/sxs/sxs.c
+++ b/dlls/sxs/sxs.c
@@ -135,14 +135,20 @@ BOOL WINAPI SxsLookupClrGuid(DWORD flags, GUID *clsid, HANDLE actctx, void *buff
if (flags & SXS_LOOKUP_CLR_GUID_FIND_SURROGATE)
{
- if ((retval = FindActCtxSectionGuid(0, NULL, ACTIVATION_CONTEXT_SECTION_CLR_SURROGATES, clsid, &guid_info)))
+ if ((retval = FindActCtxSectionGuid(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX, NULL,
+ ACTIVATION_CONTEXT_SECTION_CLR_SURROGATES, clsid, &guid_info)))
+ {
flags &= ~SXS_LOOKUP_CLR_GUID_FIND_CLR_CLASS;
+ }
}
if (!retval && (flags & SXS_LOOKUP_CLR_GUID_FIND_CLR_CLASS))
{
- if ((retval = FindActCtxSectionGuid(0, NULL, ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION, clsid, &guid_info)))
+ if ((retval = FindActCtxSectionGuid(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX, NULL,
+ ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION, clsid, &guid_info)))
+ {
flags &= ~SXS_LOOKUP_CLR_GUID_FIND_SURROGATE;
+ }
}
if (!retval)
@@ -151,7 +157,7 @@ BOOL WINAPI SxsLookupClrGuid(DWORD flags, GUID *clsid, HANDLE actctx, void *buff
goto out;
}
- retval = QueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX, NULL, &guid_info.ulAssemblyRosterIndex,
+ retval = QueryActCtxW(0, guid_info.hActCtx, &guid_info.ulAssemblyRosterIndex,
AssemblyDetailedInformationInActivationContext, NULL, 0, &bytes_assembly_info);
if (!retval && GetLastError() != ERROR_INSUFFICIENT_BUFFER)
{
@@ -159,7 +165,7 @@ BOOL WINAPI SxsLookupClrGuid(DWORD flags, GUID *clsid, HANDLE actctx, void *buff
}
assembly_info = heap_alloc(bytes_assembly_info);
- if (!(retval = QueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX, NULL, &guid_info.ulAssemblyRosterIndex,
+ if (!(retval = QueryActCtxW(0, guid_info.hActCtx, &guid_info.ulAssemblyRosterIndex,
AssemblyDetailedInformationInActivationContext, assembly_info,
bytes_assembly_info, &bytes_assembly_info)))
{
@@ -225,6 +231,7 @@ BOOL WINAPI SxsLookupClrGuid(DWORD flags, GUID *clsid, HANDLE actctx, void *buff
SetLastError(0);
out:
+ ReleaseActCtx(guid_info.hActCtx);
if (flags & SXS_LOOKUP_CLR_GUID_USE_ACTCTX)
DeactivateActCtx(0, cookie);
--
2.29.2
Dec. 7, 2020
[PATCH] ntdll: Only build Linux-specific functions on Linux
by Gerald Pfeifer
logical_proc_info_add_by_id, logical_proc_info_add_cache,
logical_proc_info_add_group, and logical_proc_info_add_numa_node
are only useful and invoked on Linux, so disable their build
elsewhere.
(Without this compilers will, rightfully, warn about unused functions.
GCC definitely does.)
Signed-off-by: Gerald Pfeifer <gerald(a)pfeifer.com>
---
dlls/ntdll/unix/system.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c
index a889b2e020c..5130b4c18ba 100644
--- a/dlls/ntdll/unix/system.c
+++ b/dlls/ntdll/unix/system.c
@@ -506,6 +506,8 @@ void init_cpu_info(void)
cpu_info.Architecture, cpu_info.Level, cpu_info.Revision, cpu_info.FeatureSet );
}
+#ifdef linux
+
static BOOL grow_logical_proc_buf( SYSTEM_LOGICAL_PROCESSOR_INFORMATION **pdata, DWORD *max_len )
{
SYSTEM_LOGICAL_PROCESSOR_INFORMATION *new_data;
@@ -752,6 +754,8 @@ static BOOL logical_proc_info_add_group( SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX
return TRUE;
}
+#endif
+
#ifdef linux
/* Helper function for counting bitmap values as commonly used by the Linux kernel
--
2.28.0
Dec. 6, 2020
Re: [PATCH] gameux/tests: Use wide-char string literals.
by Michael Stefaniuc
Pre-existing failures
https://test.winehq.org/data/842b38e29166a429d59331be40761335807c85d2/win10…
Probably not detected by the WTB as I've fixed one of the message en passant.
bye
michael
On 12/6/20 4:09 PM, Marvin wrote:
> 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=83160
>
> Your paranoid android.
>
>
> === w1064v1809 (32 bit report) ===
>
> gameux:
> gamestatistics.c:215: Test failed: setting category title failed: Category0
> gamestatistics.c:216: Test failed: setting category title failed: Category1
> gamestatistics.c:217: Test failed: setting category title failed: Category2
> gamestatistics.c:248: Test failed: setting statistic failed: name=Statistic00, value=Value00
> gamestatistics.c:250: Test failed: setting statistic failed: name=Statistic01, value=Value01
> gamestatistics.c:252: Test failed: setting statistic failed: name=Statistic10, value=Value10
> gamestatistics.c:254: Test failed: setting statistic failed: name=Statistic11, value=Value11
> gamestatistics.c:256: Test failed: setting statistic failed: name=Statistic20, value=Value20
> gamestatistics.c:258: Test failed: setting statistic failed: name=Statistic21, value=Value21
> gamestatistics.c:268: Test failed: setting category title failed: Category0a
>
> === w1064 (32 bit report) ===
>
> gameux:
> gamestatistics.c:215: Test failed: setting category title failed: Category0
> gamestatistics.c:216: Test failed: setting category title failed: Category1
> gamestatistics.c:217: Test failed: setting category title failed: Category2
> gamestatistics.c:248: Test failed: setting statistic failed: name=Statistic00, value=Value00
> gamestatistics.c:250: Test failed: setting statistic failed: name=Statistic01, value=Value01
> gamestatistics.c:252: Test failed: setting statistic failed: name=Statistic10, value=Value10
> gamestatistics.c:254: Test failed: setting statistic failed: name=Statistic11, value=Value11
> gamestatistics.c:256: Test failed: setting statistic failed: name=Statistic20, value=Value20
> gamestatistics.c:258: Test failed: setting statistic failed: name=Statistic21, value=Value21
> gamestatistics.c:268: Test failed: setting category title failed: Category0a
>
> === w10pro64 (32 bit report) ===
>
> gameux:
> gamestatistics.c:215: Test failed: setting category title failed: Category0
> gamestatistics.c:216: Test failed: setting category title failed: Category1
> gamestatistics.c:217: Test failed: setting category title failed: Category2
> gamestatistics.c:248: Test failed: setting statistic failed: name=Statistic00, value=Value00
> gamestatistics.c:250: Test failed: setting statistic failed: name=Statistic01, value=Value01
> gamestatistics.c:252: Test failed: setting statistic failed: name=Statistic10, value=Value10
> gamestatistics.c:254: Test failed: setting statistic failed: name=Statistic11, value=Value11
> gamestatistics.c:256: Test failed: setting statistic failed: name=Statistic20, value=Value20
> gamestatistics.c:258: Test failed: setting statistic failed: name=Statistic21, value=Value21
> gamestatistics.c:268: Test failed: setting category title failed: Category0a
>
> === w1064v1809 (64 bit report) ===
>
> gameux:
> gamestatistics.c:215: Test failed: setting category title failed: Category0
> gamestatistics.c:216: Test failed: setting category title failed: Category1
> gamestatistics.c:217: Test failed: setting category title failed: Category2
> gamestatistics.c:248: Test failed: setting statistic failed: name=Statistic00, value=Value00
> gamestatistics.c:250: Test failed: setting statistic failed: name=Statistic01, value=Value01
> gamestatistics.c:252: Test failed: setting statistic failed: name=Statistic10, value=Value10
> gamestatistics.c:254: Test failed: setting statistic failed: name=Statistic11, value=Value11
> gamestatistics.c:256: Test failed: setting statistic failed: name=Statistic20, value=Value20
> gamestatistics.c:258: Test failed: setting statistic failed: name=Statistic21, value=Value21
> gamestatistics.c:268: Test failed: setting category title failed: Category0a
>
> === w1064 (64 bit report) ===
>
> gameux:
> gamestatistics.c:215: Test failed: setting category title failed: Category0
> gamestatistics.c:216: Test failed: setting category title failed: Category1
> gamestatistics.c:217: Test failed: setting category title failed: Category2
> gamestatistics.c:248: Test failed: setting statistic failed: name=Statistic00, value=Value00
> gamestatistics.c:250: Test failed: setting statistic failed: name=Statistic01, value=Value01
> gamestatistics.c:252: Test failed: setting statistic failed: name=Statistic10, value=Value10
> gamestatistics.c:254: Test failed: setting statistic failed: name=Statistic11, value=Value11
> gamestatistics.c:256: Test failed: setting statistic failed: name=Statistic20, value=Value20
> gamestatistics.c:258: Test failed: setting statistic failed: name=Statistic21, value=Value21
> gamestatistics.c:268: Test failed: setting category title failed: Category0a
>
> === w1064_2qxl (64 bit report) ===
>
> gameux:
> gamestatistics.c:215: Test failed: setting category title failed: Category0
> gamestatistics.c:216: Test failed: setting category title failed: Category1
> gamestatistics.c:217: Test failed: setting category title failed: Category2
> gamestatistics.c:248: Test failed: setting statistic failed: name=Statistic00, value=Value00
> gamestatistics.c:250: Test failed: setting statistic failed: name=Statistic01, value=Value01
> gamestatistics.c:252: Test failed: setting statistic failed: name=Statistic10, value=Value10
> gamestatistics.c:254: Test failed: setting statistic failed: name=Statistic11, value=Value11
> gamestatistics.c:256: Test failed: setting statistic failed: name=Statistic20, value=Value20
> gamestatistics.c:258: Test failed: setting statistic failed: name=Statistic21, value=Value21
> gamestatistics.c:268: Test failed: setting category title failed: Category0a
>
> === w10pro64 (64 bit report) ===
>
> gameux:
> gamestatistics.c:215: Test failed: setting category title failed: Category0
> gamestatistics.c:216: Test failed: setting category title failed: Category1
> gamestatistics.c:217: Test failed: setting category title failed: Category2
> gamestatistics.c:248: Test failed: setting statistic failed: name=Statistic00, value=Value00
> gamestatistics.c:250: Test failed: setting statistic failed: name=Statistic01, value=Value01
> gamestatistics.c:252: Test failed: setting statistic failed: name=Statistic10, value=Value10
> gamestatistics.c:254: Test failed: setting statistic failed: name=Statistic11, value=Value11
> gamestatistics.c:256: Test failed: setting statistic failed: name=Statistic20, value=Value20
> gamestatistics.c:258: Test failed: setting statistic failed: name=Statistic21, value=Value21
> gamestatistics.c:268: Test failed: setting category title failed: Category0a
>
> === w10pro64_ar (64 bit report) ===
>
> gameux:
> gamestatistics.c:215: Test failed: setting category title failed: Category0
> gamestatistics.c:216: Test failed: setting category title failed: Category1
> gamestatistics.c:217: Test failed: setting category title failed: Category2
> gamestatistics.c:248: Test failed: setting statistic failed: name=Statistic00, value=Value00
> gamestatistics.c:250: Test failed: setting statistic failed: name=Statistic01, value=Value01
> gamestatistics.c:252: Test failed: setting statistic failed: name=Statistic10, value=Value10
> gamestatistics.c:254: Test failed: setting statistic failed: name=Statistic11, value=Value11
> gamestatistics.c:256: Test failed: setting statistic failed: name=Statistic20, value=Value20
> gamestatistics.c:258: Test failed: setting statistic failed: name=Statistic21, value=Value21
> gamestatistics.c:268: Test failed: setting category title failed: Category0a
>
> === w10pro64_he (64 bit report) ===
>
> gameux:
> gamestatistics.c:215: Test failed: setting category title failed: Category0
> gamestatistics.c:216: Test failed: setting category title failed: Category1
> gamestatistics.c:217: Test failed: setting category title failed: Category2
> gamestatistics.c:248: Test failed: setting statistic failed: name=Statistic00, value=Value00
> gamestatistics.c:250: Test failed: setting statistic failed: name=Statistic01, value=Value01
> gamestatistics.c:252: Test failed: setting statistic failed: name=Statistic10, value=Value10
> gamestatistics.c:254: Test failed: setting statistic failed: name=Statistic11, value=Value11
> gamestatistics.c:256: Test failed: setting statistic failed: name=Statistic20, value=Value20
> gamestatistics.c:258: Test failed: setting statistic failed: name=Statistic21, value=Value21
> gamestatistics.c:268: Test failed: setting category title failed: Category0a
>
> === w10pro64_ja (64 bit report) ===
>
> gameux:
> gamestatistics.c:215: Test failed: setting category title failed: Category0
> gamestatistics.c:216: Test failed: setting category title failed: Category1
> gamestatistics.c:217: Test failed: setting category title failed: Category2
> gamestatistics.c:248: Test failed: setting statistic failed: name=Statistic00, value=Value00
> gamestatistics.c:250: Test failed: setting statistic failed: name=Statistic01, value=Value01
> gamestatistics.c:252: Test failed: setting statistic failed: name=Statistic10, value=Value10
> gamestatistics.c:254: Test failed: setting statistic failed: name=Statistic11, value=Value11
> gamestatistics.c:256: Test failed: setting statistic failed: name=Statistic20, value=Value20
> gamestatistics.c:258: Test failed: setting statistic failed: name=Statistic21, value=Value21
> gamestatistics.c:268: Test failed: setting category title failed: Category0a
>
> === w10pro64_zh_CN (64 bit report) ===
>
> gameux:
> gamestatistics.c:215: Test failed: setting category title failed: Category0
> gamestatistics.c:216: Test failed: setting category title failed: Category1
> gamestatistics.c:217: Test failed: setting category title failed: Category2
> gamestatistics.c:248: Test failed: setting statistic failed: name=Statistic00, value=Value00
> gamestatistics.c:250: Test failed: setting statistic failed: name=Statistic01, value=Value01
> gamestatistics.c:252: Test failed: setting statistic failed: name=Statistic10, value=Value10
> gamestatistics.c:254: Test failed: setting statistic failed: name=Statistic11, value=Value11
> gamestatistics.c:256: Test failed: setting statistic failed: name=Statistic20, value=Value20
> gamestatistics.c:258: Test failed: setting statistic failed: name=Statistic21, value=Value21
> gamestatistics.c:268: Test failed: setting category title failed: Category0a
>
Dec. 6, 2020
[PATCH] Revert "winegstreamer: Avoid performing color matrix conversions in videoconvert."
by Zebediah Figura
This reverts commit fd25ba65e0eb9fedfb2cdfa2b7a4b16e0401dfdf.
The relevant commit breaks visual correctness in many applications, for the sake
of performance. As such I am rather inclined to revert it for 6.0, especially as
a full solution will probably involve a revert of this patch along with upstream
changes to GStreamer.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49535
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/winegstreamer/gstdemux.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index e227ed9331d..77204bc55a2 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -1024,9 +1024,6 @@ static void init_new_decoded_pad(GstElement *bin, GstPad *pad, struct gstdemux *
goto out;
}
- /* Avoid expensive color matrix conversions. */
- gst_util_set_object_arg(G_OBJECT(vconv), "matrix-mode", "none");
-
/* GStreamer outputs RGB video top-down, but DirectShow expects bottom-up. */
if (!(flip = gst_element_factory_make("videoflip", NULL)))
{
--
2.29.2
Dec. 6, 2020
Re: [PATCH] gameux/tests: Use wide-char string literals.
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=83160
Your paranoid android.
=== w1064v1809 (32 bit report) ===
gameux:
gamestatistics.c:215: Test failed: setting category title failed: Category0
gamestatistics.c:216: Test failed: setting category title failed: Category1
gamestatistics.c:217: Test failed: setting category title failed: Category2
gamestatistics.c:248: Test failed: setting statistic failed: name=Statistic00, value=Value00
gamestatistics.c:250: Test failed: setting statistic failed: name=Statistic01, value=Value01
gamestatistics.c:252: Test failed: setting statistic failed: name=Statistic10, value=Value10
gamestatistics.c:254: Test failed: setting statistic failed: name=Statistic11, value=Value11
gamestatistics.c:256: Test failed: setting statistic failed: name=Statistic20, value=Value20
gamestatistics.c:258: Test failed: setting statistic failed: name=Statistic21, value=Value21
gamestatistics.c:268: Test failed: setting category title failed: Category0a
=== w1064 (32 bit report) ===
gameux:
gamestatistics.c:215: Test failed: setting category title failed: Category0
gamestatistics.c:216: Test failed: setting category title failed: Category1
gamestatistics.c:217: Test failed: setting category title failed: Category2
gamestatistics.c:248: Test failed: setting statistic failed: name=Statistic00, value=Value00
gamestatistics.c:250: Test failed: setting statistic failed: name=Statistic01, value=Value01
gamestatistics.c:252: Test failed: setting statistic failed: name=Statistic10, value=Value10
gamestatistics.c:254: Test failed: setting statistic failed: name=Statistic11, value=Value11
gamestatistics.c:256: Test failed: setting statistic failed: name=Statistic20, value=Value20
gamestatistics.c:258: Test failed: setting statistic failed: name=Statistic21, value=Value21
gamestatistics.c:268: Test failed: setting category title failed: Category0a
=== w10pro64 (32 bit report) ===
gameux:
gamestatistics.c:215: Test failed: setting category title failed: Category0
gamestatistics.c:216: Test failed: setting category title failed: Category1
gamestatistics.c:217: Test failed: setting category title failed: Category2
gamestatistics.c:248: Test failed: setting statistic failed: name=Statistic00, value=Value00
gamestatistics.c:250: Test failed: setting statistic failed: name=Statistic01, value=Value01
gamestatistics.c:252: Test failed: setting statistic failed: name=Statistic10, value=Value10
gamestatistics.c:254: Test failed: setting statistic failed: name=Statistic11, value=Value11
gamestatistics.c:256: Test failed: setting statistic failed: name=Statistic20, value=Value20
gamestatistics.c:258: Test failed: setting statistic failed: name=Statistic21, value=Value21
gamestatistics.c:268: Test failed: setting category title failed: Category0a
=== w1064v1809 (64 bit report) ===
gameux:
gamestatistics.c:215: Test failed: setting category title failed: Category0
gamestatistics.c:216: Test failed: setting category title failed: Category1
gamestatistics.c:217: Test failed: setting category title failed: Category2
gamestatistics.c:248: Test failed: setting statistic failed: name=Statistic00, value=Value00
gamestatistics.c:250: Test failed: setting statistic failed: name=Statistic01, value=Value01
gamestatistics.c:252: Test failed: setting statistic failed: name=Statistic10, value=Value10
gamestatistics.c:254: Test failed: setting statistic failed: name=Statistic11, value=Value11
gamestatistics.c:256: Test failed: setting statistic failed: name=Statistic20, value=Value20
gamestatistics.c:258: Test failed: setting statistic failed: name=Statistic21, value=Value21
gamestatistics.c:268: Test failed: setting category title failed: Category0a
=== w1064 (64 bit report) ===
gameux:
gamestatistics.c:215: Test failed: setting category title failed: Category0
gamestatistics.c:216: Test failed: setting category title failed: Category1
gamestatistics.c:217: Test failed: setting category title failed: Category2
gamestatistics.c:248: Test failed: setting statistic failed: name=Statistic00, value=Value00
gamestatistics.c:250: Test failed: setting statistic failed: name=Statistic01, value=Value01
gamestatistics.c:252: Test failed: setting statistic failed: name=Statistic10, value=Value10
gamestatistics.c:254: Test failed: setting statistic failed: name=Statistic11, value=Value11
gamestatistics.c:256: Test failed: setting statistic failed: name=Statistic20, value=Value20
gamestatistics.c:258: Test failed: setting statistic failed: name=Statistic21, value=Value21
gamestatistics.c:268: Test failed: setting category title failed: Category0a
=== w1064_2qxl (64 bit report) ===
gameux:
gamestatistics.c:215: Test failed: setting category title failed: Category0
gamestatistics.c:216: Test failed: setting category title failed: Category1
gamestatistics.c:217: Test failed: setting category title failed: Category2
gamestatistics.c:248: Test failed: setting statistic failed: name=Statistic00, value=Value00
gamestatistics.c:250: Test failed: setting statistic failed: name=Statistic01, value=Value01
gamestatistics.c:252: Test failed: setting statistic failed: name=Statistic10, value=Value10
gamestatistics.c:254: Test failed: setting statistic failed: name=Statistic11, value=Value11
gamestatistics.c:256: Test failed: setting statistic failed: name=Statistic20, value=Value20
gamestatistics.c:258: Test failed: setting statistic failed: name=Statistic21, value=Value21
gamestatistics.c:268: Test failed: setting category title failed: Category0a
=== w10pro64 (64 bit report) ===
gameux:
gamestatistics.c:215: Test failed: setting category title failed: Category0
gamestatistics.c:216: Test failed: setting category title failed: Category1
gamestatistics.c:217: Test failed: setting category title failed: Category2
gamestatistics.c:248: Test failed: setting statistic failed: name=Statistic00, value=Value00
gamestatistics.c:250: Test failed: setting statistic failed: name=Statistic01, value=Value01
gamestatistics.c:252: Test failed: setting statistic failed: name=Statistic10, value=Value10
gamestatistics.c:254: Test failed: setting statistic failed: name=Statistic11, value=Value11
gamestatistics.c:256: Test failed: setting statistic failed: name=Statistic20, value=Value20
gamestatistics.c:258: Test failed: setting statistic failed: name=Statistic21, value=Value21
gamestatistics.c:268: Test failed: setting category title failed: Category0a
=== w10pro64_ar (64 bit report) ===
gameux:
gamestatistics.c:215: Test failed: setting category title failed: Category0
gamestatistics.c:216: Test failed: setting category title failed: Category1
gamestatistics.c:217: Test failed: setting category title failed: Category2
gamestatistics.c:248: Test failed: setting statistic failed: name=Statistic00, value=Value00
gamestatistics.c:250: Test failed: setting statistic failed: name=Statistic01, value=Value01
gamestatistics.c:252: Test failed: setting statistic failed: name=Statistic10, value=Value10
gamestatistics.c:254: Test failed: setting statistic failed: name=Statistic11, value=Value11
gamestatistics.c:256: Test failed: setting statistic failed: name=Statistic20, value=Value20
gamestatistics.c:258: Test failed: setting statistic failed: name=Statistic21, value=Value21
gamestatistics.c:268: Test failed: setting category title failed: Category0a
=== w10pro64_he (64 bit report) ===
gameux:
gamestatistics.c:215: Test failed: setting category title failed: Category0
gamestatistics.c:216: Test failed: setting category title failed: Category1
gamestatistics.c:217: Test failed: setting category title failed: Category2
gamestatistics.c:248: Test failed: setting statistic failed: name=Statistic00, value=Value00
gamestatistics.c:250: Test failed: setting statistic failed: name=Statistic01, value=Value01
gamestatistics.c:252: Test failed: setting statistic failed: name=Statistic10, value=Value10
gamestatistics.c:254: Test failed: setting statistic failed: name=Statistic11, value=Value11
gamestatistics.c:256: Test failed: setting statistic failed: name=Statistic20, value=Value20
gamestatistics.c:258: Test failed: setting statistic failed: name=Statistic21, value=Value21
gamestatistics.c:268: Test failed: setting category title failed: Category0a
=== w10pro64_ja (64 bit report) ===
gameux:
gamestatistics.c:215: Test failed: setting category title failed: Category0
gamestatistics.c:216: Test failed: setting category title failed: Category1
gamestatistics.c:217: Test failed: setting category title failed: Category2
gamestatistics.c:248: Test failed: setting statistic failed: name=Statistic00, value=Value00
gamestatistics.c:250: Test failed: setting statistic failed: name=Statistic01, value=Value01
gamestatistics.c:252: Test failed: setting statistic failed: name=Statistic10, value=Value10
gamestatistics.c:254: Test failed: setting statistic failed: name=Statistic11, value=Value11
gamestatistics.c:256: Test failed: setting statistic failed: name=Statistic20, value=Value20
gamestatistics.c:258: Test failed: setting statistic failed: name=Statistic21, value=Value21
gamestatistics.c:268: Test failed: setting category title failed: Category0a
=== w10pro64_zh_CN (64 bit report) ===
gameux:
gamestatistics.c:215: Test failed: setting category title failed: Category0
gamestatistics.c:216: Test failed: setting category title failed: Category1
gamestatistics.c:217: Test failed: setting category title failed: Category2
gamestatistics.c:248: Test failed: setting statistic failed: name=Statistic00, value=Value00
gamestatistics.c:250: Test failed: setting statistic failed: name=Statistic01, value=Value01
gamestatistics.c:252: Test failed: setting statistic failed: name=Statistic10, value=Value10
gamestatistics.c:254: Test failed: setting statistic failed: name=Statistic11, value=Value11
gamestatistics.c:256: Test failed: setting statistic failed: name=Statistic20, value=Value20
gamestatistics.c:258: Test failed: setting statistic failed: name=Statistic21, value=Value21
gamestatistics.c:268: Test failed: setting category title failed: Category0a
Dec. 6, 2020
[PATCH] jscript/tests: Use wide-char string literals.
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/jscript/tests/jscript.c | 5 +----
dlls/jscript/tests/run.c | 29 +++++++++++++----------------
2 files changed, 14 insertions(+), 20 deletions(-)
diff --git a/dlls/jscript/tests/jscript.c b/dlls/jscript/tests/jscript.c
index c1b83d47799..e96127fbc5e 100644
--- a/dlls/jscript/tests/jscript.c
+++ b/dlls/jscript/tests/jscript.c
@@ -828,9 +828,6 @@ static void test_jscript_uninitializing(void)
ULONG ref;
HRESULT hres;
- static const WCHAR script_textW[] =
- {'f','u','n','c','t','i','o','n',' ','f','(',')',' ','{','}',0};
-
script = create_jscript();
hres = IActiveScript_QueryInterface(script, &IID_IActiveScriptParse, (void**)&parse);
@@ -850,7 +847,7 @@ static void test_jscript_uninitializing(void)
test_state(script, SCRIPTSTATE_INITIALIZED);
- hres = IActiveScriptParse_ParseScriptText(parse, script_textW, NULL, NULL, NULL, 0, 1, 0x42, NULL, NULL);
+ hres = IActiveScriptParse_ParseScriptText(parse, L"function f() {}", NULL, NULL, NULL, 0, 1, 0x42, NULL, NULL);
ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
hres = IActiveScript_SetScriptSite(script, &ActiveScriptSite);
diff --git a/dlls/jscript/tests/run.c b/dlls/jscript/tests/run.c
index 7cd0755497c..1deb460f715 100644
--- a/dlls/jscript/tests/run.c
+++ b/dlls/jscript/tests/run.c
@@ -2484,9 +2484,6 @@ static void test_isvisible(BOOL global_members)
IActiveScript *engine;
HRESULT hres;
- static const WCHAR script_textW[] =
- {'v','a','r',' ','v',' ','=',' ','t','e','s','t','V','a','l',';',0};
-
engine = create_script();
if(!engine)
return;
@@ -2519,12 +2516,12 @@ static void test_isvisible(BOOL global_members)
if(!global_members)
SET_EXPECT(GetItemInfo_testVal);
- hres = IActiveScriptParse_ParseScriptText(parser, script_textW, NULL, NULL, NULL, 0, 0, 0, NULL, NULL);
+ hres = IActiveScriptParse_ParseScriptText(parser, L"var v = testVal;", NULL, NULL, NULL, 0, 0, 0, NULL, NULL);
ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
if(!global_members)
CHECK_CALLED(GetItemInfo_testVal);
- hres = IActiveScriptParse_ParseScriptText(parser, script_textW, NULL, NULL, NULL, 0, 0, 0, NULL, NULL);
+ hres = IActiveScriptParse_ParseScriptText(parser, L"var v = testVal;", NULL, NULL, NULL, 0, 0, 0, NULL, NULL);
ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres);
IActiveScript_Release(engine);
@@ -3035,17 +3032,17 @@ static void run_bom_tests(void)
int i;
HRESULT hres;
struct bom_test bom_tests[] = {
- {{'v','a','r',' ','a',' ','=',' ','1',';',' ','r','e','p','o','r','t','S','u','c','c','e','s','s','(',')',';','\0'}, S_OK},
- {{0xFEFF,'v','a','r',' ','a',' ','=',' ','1',';',' ','r','e','p','o','r','t','S','u','c','c','e','s','s','(',')',';','\0'}, S_OK},
- {{'v',0xFEFF,'a','r',' ','a',' ','=',' ','1',';',' ','r','e','p','o','r','t','S','u','c','c','e','s','s','(',')',';','\0'}, JS_E_OUT_OF_MEMORY},
- {{'v','a','r',0xFEFF,' ','a',' ','=',' ','1',';',' ','r','e','p','o','r','t','S','u','c','c','e','s','s','(',')',';','\0'}, S_OK},
- {{'v','a','r',' ','a',' ','=',' ','1',';',' ',0xFEFF,'r','e','p','o','r','t','S','u','c','c','e','s','s','(',')',';','\0'}, S_OK},
- {{'v','a','r',' ','a',' ','=',' ','1',';',' ','r','e','p','o','r','t',0xFEFF,'S','u','c','c','e','s','s','(',')',';','\0'}, JS_E_OUT_OF_MEMORY},
- {{'v','a','r',' ','a',' ','=',' ','1',';',' ','r','e','p','o','r','t','S','u','c','c','e','s','s',0xFEFF,'(',')',';','\0'}, S_OK},
- {{'v','a','r',' ','a',' ','=',' ','1',';',' ','r','e','p','o','r','t','S','u','c','c','e','s','s','(',0xFEFF,')',';','\0'}, S_OK},
- {{'v','a','r',' ','a',' ','=',0xFEFF,' ','1',';',' ','r','e','p','o','r','t','S','u','c','c','e','s','s','(',0xFEFF,')',';','\0'}, S_OK},
- {{0xFEFF,'v','a','r',' ','a',' ','=',0xFEFF,0xFEFF,' ','1',';',' ','r','e','p','o','r','t','S','u','c','c','e','s','s','(',0xFEFF,')',';','\0'}, S_OK},
- {{0}}
+ {L"var a = 1; reportSuccess();", S_OK},
+ {L"\xfeffvar a = 1; reportSuccess();", S_OK},
+ {L"v\xfeff" "ar a = 1; reportSuccess();", JS_E_OUT_OF_MEMORY},
+ {L"var\xfeff a = 1; reportSuccess();", S_OK},
+ {L"var a = 1; \xfeffreportSuccess();", S_OK},
+ {L"var a = 1; report\xfeffSuccess();", JS_E_OUT_OF_MEMORY},
+ {L"var a = 1; reportSuccess\xfeff();", S_OK},
+ {L"var a = 1; reportSuccess(\xfeff);", S_OK},
+ {L"var a =\xfeff 1; reportSuccess(\xfeff);", S_OK},
+ {L"\xfeffvar a =\xfeff\xfeff 1; reportSuccess(\xfeff);", S_OK},
+ {L""}
};
engine_clsid = &CLSID_JScript;
--
2.26.2
Dec. 6, 2020
[PATCH] ieframe/tests: Use wide-char string literals.
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/ieframe/tests/intshcut.c | 12 ++++--------
dlls/ieframe/tests/webbrowser.c | 16 +++++-----------
2 files changed, 9 insertions(+), 19 deletions(-)
diff --git a/dlls/ieframe/tests/intshcut.c b/dlls/ieframe/tests/intshcut.c
index 803e7ec60e9..d2135d0ebb3 100644
--- a/dlls/ieframe/tests/intshcut.c
+++ b/dlls/ieframe/tests/intshcut.c
@@ -171,9 +171,7 @@ static void test_ReadAndWriteProperties(void)
IUniformResourceLocatorA *urlA;
IUniformResourceLocatorA *urlAFromFile;
WCHAR fileNameW[MAX_PATH];
-
- static const WCHAR shortcutW[] = {'t','e','s','t','s','h','o','r','t','c','u','t','.','u','r','l',0};
- WCHAR iconPath[] = {'f','i','l','e',':','/','/','/','C',':','/','a','r','b','i','t','r','a','r','y','/','i','c','o','n','/','p','a','t','h',0};
+ static WCHAR iconPath[] = L"file:///C:/arbitrary/icon/path";
char testurl[] = "http://some/bogus/url.html";
ps[0].ulKind = PRSPEC_PROPID;
@@ -183,7 +181,7 @@ static void test_ReadAndWriteProperties(void)
/* Make sure we have a valid temporary directory */
GetTempPathW(MAX_PATH, fileNameW);
- lstrcatW(fileNameW, shortcutW);
+ lstrcatW(fileNameW, L"testshortcut.url");
hr = CoCreateInstance(&CLSID_InternetShortcut, NULL, CLSCTX_ALL, &IID_IUniformResourceLocatorA, (void**)&urlA);
ok(hr == S_OK, "Could not create CLSID_InternetShortcut instance: %08x\n", hr);
@@ -208,7 +206,7 @@ static void test_ReadAndWriteProperties(void)
IPersistFile_Release(pf);
pv[0].vt = VT_LPWSTR;
- U(pv[0]).pwszVal = (void *) iconPath;
+ U(pv[0]).pwszVal = iconPath;
pv[1].vt = VT_I4;
U(pv[1]).lVal = iconIndex;
hr = urlA->lpVtbl->QueryInterface(urlA, &IID_IPropertySetStorage, (void **) &pPropSetStg);
@@ -326,10 +324,8 @@ static void test_Load(void)
HANDLE file;
HRESULT hres;
- static const WCHAR test_urlW[] = {'t','e','s','t','.','u','r','l',0};
-
GetTempPathW(MAX_PATH, file_path);
- lstrcatW(file_path, test_urlW);
+ lstrcatW(file_path, L"test.url");
for(test = load_tests; test < load_tests + ARRAY_SIZE(load_tests); test++) {
IPropertySetStorage *propsetstorage;
diff --git a/dlls/ieframe/tests/webbrowser.c b/dlls/ieframe/tests/webbrowser.c
index 9c2c393aafe..52d1f707357 100644
--- a/dlls/ieframe/tests/webbrowser.c
+++ b/dlls/ieframe/tests/webbrowser.c
@@ -160,8 +160,6 @@ DEFINE_EXPECT(GetExternal);
DEFINE_EXPECT(outer_QI_test);
DEFINE_EXPECT(Advise_OnClose);
-static const WCHAR wszItem[] = {'i','t','e','m',0};
-
static VARIANT_BOOL exvb;
static IWebBrowser2 *wb;
@@ -1268,7 +1266,7 @@ static HRESULT WINAPI InPlaceUIWindow_SetActiveObject(IOleInPlaceFrame *iface,
CHECK_EXPECT(UIWindow_SetActiveObject);
if(!test_close && !test_hide) {
ok(pActiveObject != NULL, "pActiveObject = NULL\n");
- ok(!lstrcmpW(pszObjName, wszItem), "unexpected pszObjName\n");
+ ok(!lstrcmpW(pszObjName, L"item"), "unexpected pszObjName\n");
} else {
ok(!pActiveObject, "pActiveObject != NULL\n");
ok(!pszObjName, "pszObjName != NULL\n");
@@ -1282,7 +1280,7 @@ static HRESULT WINAPI InPlaceFrame_SetActiveObject(IOleInPlaceFrame *iface,
CHECK_EXPECT(Frame_SetActiveObject);
if(!test_close && !test_hide) {
ok(pActiveObject != NULL, "pActiveObject = NULL\n");
- ok(!lstrcmpW(pszObjName, wszItem), "unexpected pszObjName\n");
+ ok(!lstrcmpW(pszObjName, L"item"), "unexpected pszObjName\n");
} else {
ok(!pActiveObject, "pActiveObject != NULL\n");
ok(!pszObjName, "pszObjName != NULL\n");
@@ -1817,19 +1815,17 @@ static LRESULT WINAPI wnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam
static HWND create_container_window(void)
{
- static const WCHAR wszWebBrowserContainer[] =
- {'W','e','b','B','r','o','w','s','e','r','C','o','n','t','a','i','n','e','r',0};
static WNDCLASSEXW wndclass = {
sizeof(WNDCLASSEXW),
0,
wnd_proc,
0, 0, NULL, NULL, NULL, NULL, NULL,
- wszWebBrowserContainer,
+ L"WebBrowserContainer",
NULL
};
RegisterClassExW(&wndclass);
- return CreateWindowW(wszWebBrowserContainer, wszWebBrowserContainer,
+ return CreateWindowW(L"WebBrowserContainer", L"WebBrowserContainer",
WS_OVERLAPPEDWINDOW, 10, 10, 600, 600, NULL, NULL, NULL, NULL);
}
@@ -1942,9 +1938,7 @@ static void test_SetHostNames(IOleObject *oleobj)
{
HRESULT hres;
- static const WCHAR test_appW[] = {'t','e','s','t',' ','a','p','p',0};
-
- hres = IOleObject_SetHostNames(oleobj, test_appW, (void*)0xdeadbeef);
+ hres = IOleObject_SetHostNames(oleobj, L"test app", (void*)0xdeadbeef);
ok(hres == S_OK, "SetHostNames failed: %08x\n", hres);
}
--
2.26.2
Dec. 6, 2020
[PATCH] gameux/tests: Use wide-char string literals.
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/gameux/tests/gamestatistics.c | 101 +++++++++++++----------------
1 file changed, 44 insertions(+), 57 deletions(-)
diff --git a/dlls/gameux/tests/gamestatistics.c b/dlls/gameux/tests/gamestatistics.c
index 192a245e096..c29c6b44470 100644
--- a/dlls/gameux/tests/gamestatistics.c
+++ b/dlls/gameux/tests/gamestatistics.c
@@ -89,12 +89,6 @@ static void test_unregister_game(IGameExplorer *ge)
*/
static HRESULT _buildStatisticsFilePath(LPCGUID guidApplicationId, LPWSTR *lpStatisticsFile)
{
- static const WCHAR sBackslash[] = {'\\',0};
- static const WCHAR sStatisticsDir[] = {'\\','M','i','c','r','o','s','o','f','t',
- '\\','W','i','n','d','o','w','s','\\','G','a','m','e','E','x','p',
- 'l','o','r','e','r','\\','G','a','m','e','S','t','a','t','i','s',
- 't','i','c','s','\\',0};
- static const WCHAR sDotGamestats[] = {'.','g','a','m','e','s','t','a','t','s',0};
HRESULT hr;
WCHAR sGuid[49], sPath[MAX_PATH];
@@ -105,11 +99,11 @@ static HRESULT _buildStatisticsFilePath(LPCGUID guidApplicationId, LPWSTR *lpSta
if(SUCCEEDED(hr))
{
- lstrcatW(sPath, sStatisticsDir);
+ lstrcatW(sPath, L"\\Microsoft\\Windows\\GameExplorer\\GameStatistics\\");
lstrcatW(sPath, sGuid);
- lstrcatW(sPath, sBackslash);
+ lstrcatW(sPath, L"\\");
lstrcatW(sPath, sGuid);
- lstrcatW(sPath, sDotGamestats);
+ lstrcatW(sPath, L".gamestats");
*lpStatisticsFile = CoTaskMemAlloc((lstrlenW(sPath)+1)*sizeof(WCHAR));
if(!*lpStatisticsFile) hr = E_OUTOFMEMORY;
@@ -145,22 +139,6 @@ static BOOL _isFileExists(LPCWSTR lpFile)
static void test_gamestatisticsmgr( void )
{
static const GUID guidApplicationId = { 0x17A6558E, 0x60BE, 0x4078, { 0xB6, 0x6F, 0x9C, 0x3A, 0xDA, 0x2A, 0x32, 0xE6 } };
- static const WCHAR sCategory0[] = {'C','a','t','e','g','o','r','y','0',0};
- static const WCHAR sCategory1[] = {'C','a','t','e','g','o','r','y','1',0};
- static const WCHAR sCategory2[] = {'C','a','t','e','g','o','r','y','2',0};
- static const WCHAR sCategory0a[] = {'C','a','t','e','g','o','r','y','0','a',0};
- static const WCHAR sStatistic00[] = {'S','t','a','t','i','s','t','i','c','0','0',0};
- static const WCHAR sStatistic01[] = {'S','t','a','t','i','s','t','i','c','0','1',0};
- static const WCHAR sStatistic10[] = {'S','t','a','t','i','s','t','i','c','1','0',0};
- static const WCHAR sStatistic11[] = {'S','t','a','t','i','s','t','i','c','1','1',0};
- static const WCHAR sStatistic20[] = {'S','t','a','t','i','s','t','i','c','2','0',0};
- static const WCHAR sStatistic21[] = {'S','t','a','t','i','s','t','i','c','2','1',0};
- static const WCHAR sValue00[] = {'V','a','l','u','e','0','0',0};
- static const WCHAR sValue01[] = {'V','a','l','u','e','0','1',0};
- static const WCHAR sValue10[] = {'V','a','l','u','e','1','0',0};
- static const WCHAR sValue11[] = {'V','a','l','u','e','1','1',0};
- static const WCHAR sValue20[] = {'V','a','l','u','e','2','0',0};
- static const WCHAR sValue21[] = {'V','a','l','u','e','2','1',0};
HRESULT hr;
DWORD dwOpenResult;
@@ -221,7 +199,7 @@ static void test_gamestatisticsmgr( void )
hr = IGameStatistics_SetCategoryTitle(gs, wMaxCategories, NULL);
ok(hr==E_INVALIDARG, "setting category title invalid value: 0x%x\n", hr);
- hr = IGameStatistics_SetCategoryTitle(gs, wMaxCategories, sCategory0);
+ hr = IGameStatistics_SetCategoryTitle(gs, wMaxCategories, L"Category0");
ok(hr==E_INVALIDARG, "setting category title invalid value: 0x%x\n", hr);
/* check what happen if string is too long */
@@ -234,45 +212,51 @@ static void test_gamestatisticsmgr( void )
ok(hr==S_FALSE, "setting category title invalid result: 0x%x\n", hr);
CoTaskMemFree(sTooLongString);
- ok(IGameStatistics_SetCategoryTitle(gs, 0, sCategory0)==S_OK, "setting category title failed: %s\n", wine_dbgstr_w(sCategory0));
- ok(IGameStatistics_SetCategoryTitle(gs, 1, sCategory1)==S_OK, "setting category title failed: %s\n", wine_dbgstr_w(sCategory1));
- ok(IGameStatistics_SetCategoryTitle(gs, 2, sCategory2)==S_OK, "setting category title failed: %s\n", wine_dbgstr_w(sCategory1));
+ ok(IGameStatistics_SetCategoryTitle(gs, 0, L"Category0")==S_OK, "setting category title failed: Category0\n");
+ ok(IGameStatistics_SetCategoryTitle(gs, 1, L"Category1")==S_OK, "setting category title failed: Category1\n");
+ ok(IGameStatistics_SetCategoryTitle(gs, 2, L"Category2")==S_OK, "setting category title failed: Category2\n");
/* check what happen if any string is NULL */
- hr = IGameStatistics_SetStatistic(gs, 0, 0, NULL, sValue00);
+ hr = IGameStatistics_SetStatistic(gs, 0, 0, NULL, L"Value00");
ok(hr == S_FALSE, "setting statistic returned unexpected value: 0x%x)\n", hr);
- hr = IGameStatistics_SetStatistic(gs, 0, 0, sStatistic00, NULL);
+ hr = IGameStatistics_SetStatistic(gs, 0, 0, L"Statistic00", NULL);
ok(hr == S_OK, "setting statistic returned unexpected value: 0x%x)\n", hr);
/* check what happen if any string is too long */
sTooLongString = CoTaskMemAlloc(sizeof(WCHAR)*(uMaxNameLength+2));
memset(sTooLongString, 'a', sizeof(WCHAR)*(uMaxNameLength+1));
sTooLongString[uMaxNameLength+1]=0;
- hr = IGameStatistics_SetStatistic(gs, 0, 0, sTooLongString, sValue00);
+ hr = IGameStatistics_SetStatistic(gs, 0, 0, sTooLongString, L"Value00");
ok(hr == S_FALSE, "setting statistic returned unexpected value: 0x%x)\n", hr);
CoTaskMemFree(sTooLongString);
sTooLongString = CoTaskMemAlloc(sizeof(WCHAR)*(uMaxValueLength+2));
memset(sTooLongString, 'a', sizeof(WCHAR)*(uMaxValueLength+1));
sTooLongString[uMaxValueLength+1]=0;
- hr = IGameStatistics_SetStatistic(gs, 0, 0, sStatistic00, sTooLongString);
+ hr = IGameStatistics_SetStatistic(gs, 0, 0, L"Statistic00", sTooLongString);
ok(hr == S_FALSE, "setting statistic returned unexpected value: 0x%x)\n", hr);
CoTaskMemFree(sTooLongString);
/* check what happen on too big index of category or statistic */
- hr = IGameStatistics_SetStatistic(gs, wMaxCategories, 0, sStatistic00, sValue00);
+ hr = IGameStatistics_SetStatistic(gs, wMaxCategories, 0, L"Statistic00", L"Value00");
ok(hr == E_INVALIDARG, "setting statistic returned unexpected value: 0x%x)\n", hr);
- hr = IGameStatistics_SetStatistic(gs, 0, wMaxStatsPerCategory, sStatistic00, sValue00);
+ hr = IGameStatistics_SetStatistic(gs, 0, wMaxStatsPerCategory, L"Statistic00", L"Value00");
ok(hr == E_INVALIDARG, "setting statistic returned unexpected value: 0x%x)\n", hr);
- ok(IGameStatistics_SetStatistic(gs, 0, 0, sStatistic00, sValue00)==S_OK, "setting statistic failed: name=%s, value=%s\n", wine_dbgstr_w(sStatistic00), wine_dbgstr_w(sValue00));
- ok(IGameStatistics_SetStatistic(gs, 0, 1, sStatistic01, sValue01)==S_OK, "setting statistic failed: name=%s, value=%s\n", wine_dbgstr_w(sStatistic01), wine_dbgstr_w(sValue01));
- ok(IGameStatistics_SetStatistic(gs, 1, 0, sStatistic10, sValue10)==S_OK, "setting statistic failed: name=%s, value=%s\n", wine_dbgstr_w(sStatistic10), wine_dbgstr_w(sValue10));
- ok(IGameStatistics_SetStatistic(gs, 1, 1, sStatistic11, sValue11)==S_OK, "setting statistic failed: name=%s, value=%s\n", wine_dbgstr_w(sStatistic11), wine_dbgstr_w(sValue11));
- ok(IGameStatistics_SetStatistic(gs, 2, 0, sStatistic20, sValue20)==S_OK, "setting statistic failed: name=%s, value=%s\n", wine_dbgstr_w(sStatistic20), wine_dbgstr_w(sValue20));
- ok(IGameStatistics_SetStatistic(gs, 2, 1, sStatistic21, sValue21)==S_OK, "setting statistic failed: name=%s, value=%s\n", wine_dbgstr_w(sStatistic21), wine_dbgstr_w(sValue21));
+ ok(IGameStatistics_SetStatistic(gs, 0, 0, L"Statistic00", L"Value00")==S_OK,
+ "setting statistic failed: name=Statistic00, value=Value00\n");
+ ok(IGameStatistics_SetStatistic(gs, 0, 1, L"Statistic01", L"Value01")==S_OK,
+ "setting statistic failed: name=Statistic01, value=Value01\n");
+ ok(IGameStatistics_SetStatistic(gs, 1, 0, L"Statistic10", L"Value10")==S_OK,
+ "setting statistic failed: name=Statistic10, value=Value10\n");
+ ok(IGameStatistics_SetStatistic(gs, 1, 1, L"Statistic11", L"Value11")==S_OK,
+ "setting statistic failed: name=Statistic11, value=Value11\n");
+ ok(IGameStatistics_SetStatistic(gs, 2, 0, L"Statistic20", L"Value20")==S_OK,
+ "setting statistic failed: name=Statistic20, value=Value20\n");
+ ok(IGameStatistics_SetStatistic(gs, 2, 1, L"Statistic21", L"Value21")==S_OK,
+ "setting statistic failed: name=Statistic21, value=Value21\n");
ok(_isFileExists(lpStatisticsFile) == FALSE, "statistics file %s already exists\n", wine_dbgstr_w(lpStatisticsFile));
@@ -281,7 +265,7 @@ static void test_gamestatisticsmgr( void )
ok(_isFileExists(lpStatisticsFile) == TRUE, "statistics file %s does not exists\n", wine_dbgstr_w(lpStatisticsFile));
/* this value should not be stored in storage, we need it only to test is it not saved */
- ok(IGameStatistics_SetCategoryTitle(gs, 0, sCategory0a)==S_OK, "setting category title failed: %s\n", wine_dbgstr_w(sCategory0a));
+ ok(IGameStatistics_SetCategoryTitle(gs, 0, L"Category0a")==S_OK, "setting category title failed: Category0a\n");
hr = IGameStatistics_Release(gs);
ok(SUCCEEDED(hr), "releasing IGameStatistics returned error: 0x%08x\n", hr);
@@ -295,17 +279,20 @@ static void test_gamestatisticsmgr( void )
/* verify values with these which we stored before*/
hr = IGameStatistics_GetCategoryTitle(gs, 0, &lpName);
ok(hr == S_OK, "getting category title failed\n");
- ok(lstrcmpW(lpName, sCategory0)==0, "getting category title returned invalid string %s\n", wine_dbgstr_w(lpName));
+ ok(lstrcmpW(lpName, L"Category0")==0, "getting category title returned invalid string %s\n",
+ wine_dbgstr_w(lpName));
CoTaskMemFree(lpName);
hr = IGameStatistics_GetCategoryTitle(gs, 1, &lpName);
ok(hr == S_OK, "getting category title failed\n");
- ok(lstrcmpW(lpName, sCategory1)==0, "getting category title returned invalid string %s\n", wine_dbgstr_w(lpName));
+ ok(lstrcmpW(lpName, L"Category1")==0, "getting category title returned invalid string %s\n",
+ wine_dbgstr_w(lpName));
CoTaskMemFree(lpName);
hr = IGameStatistics_GetCategoryTitle(gs, 2, &lpName);
ok(hr == S_OK, "getting category title failed\n");
- ok(lstrcmpW(lpName, sCategory2)==0, "getting category title returned invalid string %s\n", wine_dbgstr_w(lpName));
+ ok(lstrcmpW(lpName, L"Category2")==0, "getting category title returned invalid string %s\n",
+ wine_dbgstr_w(lpName));
CoTaskMemFree(lpName);
/* check result if category doesn't exists */
@@ -316,43 +303,43 @@ static void test_gamestatisticsmgr( void )
hr = IGameStatistics_GetStatistic(gs, 0, 0, &lpName, &lpValue);
ok(hr == S_OK, "getting statistic failed\n");
- ok(lstrcmpW(lpName, sStatistic00)==0, "getting statistic returned invalid name\n");
- ok(lstrcmpW(lpValue, sValue00)==0, "getting statistic returned invalid value\n");
+ ok(lstrcmpW(lpName, L"Statistic00")==0, "getting statistic returned invalid name\n");
+ ok(lstrcmpW(lpValue, L"Value00")==0, "getting statistic returned invalid value\n");
CoTaskMemFree(lpName);
CoTaskMemFree(lpValue);
hr = IGameStatistics_GetStatistic(gs, 0, 1, &lpName, &lpValue);
ok(hr == S_OK, "getting statistic failed\n");
- ok(lstrcmpW(lpName, sStatistic01)==0, "getting statistic returned invalid name\n");
- ok(lstrcmpW(lpValue, sValue01)==0, "getting statistic returned invalid value\n");
+ ok(lstrcmpW(lpName, L"Statistic01")==0, "getting statistic returned invalid name\n");
+ ok(lstrcmpW(lpValue, L"Value01")==0, "getting statistic returned invalid value\n");
CoTaskMemFree(lpName);
CoTaskMemFree(lpValue);
hr = IGameStatistics_GetStatistic(gs, 1, 0, &lpName, &lpValue);
ok(hr == S_OK, "getting statistic failed\n");
- ok(lstrcmpW(lpName, sStatistic10)==0, "getting statistic returned invalid name\n");
- ok(lstrcmpW(lpValue, sValue10)==0, "getting statistic returned invalid value\n");
+ ok(lstrcmpW(lpName, L"Statistic10")==0, "getting statistic returned invalid name\n");
+ ok(lstrcmpW(lpValue, L"Value10")==0, "getting statistic returned invalid value\n");
CoTaskMemFree(lpName);
CoTaskMemFree(lpValue);
hr = IGameStatistics_GetStatistic(gs, 1, 1, &lpName, &lpValue);
ok(hr == S_OK, "getting statistic failed\n");
- ok(lstrcmpW(lpName, sStatistic11)==0, "getting statistic returned invalid name\n");
- ok(lstrcmpW(lpValue, sValue11)==0, "getting statistic returned invalid value\n");
+ ok(lstrcmpW(lpName, L"Statistic11")==0, "getting statistic returned invalid name\n");
+ ok(lstrcmpW(lpValue, L"Value11")==0, "getting statistic returned invalid value\n");
CoTaskMemFree(lpName);
CoTaskMemFree(lpValue);
hr = IGameStatistics_GetStatistic(gs, 2, 0, &lpName, &lpValue);
ok(hr == S_OK, "getting statistic failed\n");
- ok(lstrcmpW(lpName, sStatistic20)==0, "getting statistic returned invalid name\n");
- ok(lstrcmpW(lpValue, sValue20)==0, "getting statistic returned invalid value\n");
+ ok(lstrcmpW(lpName, L"Statistic20")==0, "getting statistic returned invalid name\n");
+ ok(lstrcmpW(lpValue, L"Value20")==0, "getting statistic returned invalid value\n");
CoTaskMemFree(lpName);
CoTaskMemFree(lpValue);
hr = IGameStatistics_GetStatistic(gs, 2, 1, &lpName, &lpValue);
ok(hr == S_OK, "getting statistic failed\n");
- ok(lstrcmpW(lpName, sStatistic21)==0, "getting statistic returned invalid name\n");
- ok(lstrcmpW(lpValue, sValue21)==0, "getting statistic returned invalid value\n");
+ ok(lstrcmpW(lpName, L"Statistic21")==0, "getting statistic returned invalid name\n");
+ ok(lstrcmpW(lpValue, L"Value21")==0, "getting statistic returned invalid value\n");
CoTaskMemFree(lpName);
CoTaskMemFree(lpValue);
--
2.26.2
Dec. 6, 2020
Re: FOSDEM 21 emulator devroom
by Marcus Meissner
Hi,
FOSDEM 2021 will be fully virtual... so no need for travel nor belgian beer hangovers ;)
Ciao, Marcus
On Sun, Dec 06, 2020 at 01:31:29PM +0300, Stefan Dösinger wrote:
> That sounds very interesting indeed! I was thinking of giving a talk about Hangover, Apple 32 bit etc last year but missed the registration deadline.
>
> I probably won't make it to FOSDEM physically this year, if there's even an in-person FOSDEM.
>
> > Am 06.12.2020 um 12:45 schrieb Austin English <austinenglish(a)gmail.com>:
> >
> >
> >
> > ---------- Forwarded message ---------
> > From: Mahmoud Abdelghany <blackbeard334(a)protonmail.com <mailto:blackbeard334(a)protonmail.com>>
> > Date: Thu, Dec 3, 2020 at 8:44 AM
> > Subject: FOSDEM 21 emulator devroom
> > To: press(a)winehq.org <mailto:press(a)winehq.org> <press(a)winehq.org <mailto:press(a)winehq.org>>
> > Cc: christophecreeten(a)hotmail.com <mailto:christophecreeten(a)hotmail.com> <christophecreeten(a)hotmail.com <mailto:christophecreeten(a)hotmail.com>>
> >
> >
> > Hey guys,
> >
> > We're hosting an emulator development room at FOSDEM 21, and were wondering if you guys would be interested in sharing some of your knowledge with the community.
> >
> > If the answer is yes :D, please let us know.
> >
> > You can find more info here:
> > https://github.com/blackbeard334/fosdem21-emulator-devroom-cfp <https://github.com/blackbeard334/fosdem21-emulator-devroom-cfp>
> >
> >
> > Regards,
> >
> > Christophe Creeten & Mahmoud Abdelghany
> >
> > Sent with ProtonMail Secure Email.
> >
> >
> > --
> > -Austin
> > GPG: 267B CC1F 053F 0749 (expires 2021/02/18)
>
Dec. 6, 2020
Re: FOSDEM 21 emulator devroom
by Stefan Dösinger
That sounds very interesting indeed! I was thinking of giving a talk about Hangover, Apple 32 bit etc last year but missed the registration deadline.
I probably won't make it to FOSDEM physically this year, if there's even an in-person FOSDEM.
> Am 06.12.2020 um 12:45 schrieb Austin English <austinenglish(a)gmail.com>:
>
>
>
> ---------- Forwarded message ---------
> From: Mahmoud Abdelghany <blackbeard334(a)protonmail.com <mailto:blackbeard334(a)protonmail.com>>
> Date: Thu, Dec 3, 2020 at 8:44 AM
> Subject: FOSDEM 21 emulator devroom
> To: press(a)winehq.org <mailto:press(a)winehq.org> <press(a)winehq.org <mailto:press(a)winehq.org>>
> Cc: christophecreeten(a)hotmail.com <mailto:christophecreeten(a)hotmail.com> <christophecreeten(a)hotmail.com <mailto:christophecreeten(a)hotmail.com>>
>
>
> Hey guys,
>
> We're hosting an emulator development room at FOSDEM 21, and were wondering if you guys would be interested in sharing some of your knowledge with the community.
>
> If the answer is yes :D, please let us know.
>
> You can find more info here:
> https://github.com/blackbeard334/fosdem21-emulator-devroom-cfp <https://github.com/blackbeard334/fosdem21-emulator-devroom-cfp>
>
>
> Regards,
>
> Christophe Creeten & Mahmoud Abdelghany
>
> Sent with ProtonMail Secure Email.
>
>
> --
> -Austin
> GPG: 267B CC1F 053F 0749 (expires 2021/02/18)
Dec. 6, 2020
Fwd: FOSDEM 21 emulator devroom
by Austin English
---------- Forwarded message ---------
From: Mahmoud Abdelghany <blackbeard334(a)protonmail.com>
Date: Thu, Dec 3, 2020 at 8:44 AM
Subject: FOSDEM 21 emulator devroom
To: press(a)winehq.org <press(a)winehq.org>
Cc: christophecreeten(a)hotmail.com <christophecreeten(a)hotmail.com>
Hey guys,
We're hosting an emulator development room at FOSDEM 21, and were wondering
if you guys would be interested in sharing some of your knowledge with the
community.
If the answer is yes :D, please let us know.
You can find more info here:
https://github.com/blackbeard334/fosdem21-emulator-devroom-cfp
Regards,
Christophe Creeten & Mahmoud Abdelghany
Sent with ProtonMail Secure Email.
--
-Austin
GPG: 267B CC1F 053F 0749 (expires 2021/02/18)
Dec. 6, 2020
[PATCH v3] odbccp32: Implement SQLWriteDSNToIni/W
by Alistair Leslie-Hughes
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=50150
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
dlls/odbccp32/odbccp32.c | 96 +++++++++++++++++++++++++++++++--
dlls/odbccp32/tests/misc.c | 108 +++++++++++++++++++++++++++++++++++++
2 files changed, 199 insertions(+), 5 deletions(-)
diff --git a/dlls/odbccp32/odbccp32.c b/dlls/odbccp32/odbccp32.c
index 420f206b700..53ca70c0b9f 100644
--- a/dlls/odbccp32/odbccp32.c
+++ b/dlls/odbccp32/odbccp32.c
@@ -1691,16 +1691,102 @@ BOOL WINAPI SQLValidDSN(LPCSTR lpszDSN)
BOOL WINAPI SQLWriteDSNToIniW(LPCWSTR lpszDSN, LPCWSTR lpszDriver)
{
+ BOOL ret = FALSE;
+ HKEY hkey, hkeydriver;
+ WCHAR *filename = NULL;
+ DWORD size = 0, type;
+
+ TRACE("%s %s\n", debugstr_w(lpszDSN), debugstr_w(lpszDriver));
+
clear_errors();
- FIXME("%s %s\n", debugstr_w(lpszDSN), debugstr_w(lpszDriver));
- return TRUE;
+
+ if (!SQLValidDSNW(lpszDSN))
+ {
+ push_error(ODBC_ERROR_INVALID_DSN, odbc_error_invalid_dsn);
+ return FALSE;
+ }
+
+ /* It doesn't matter if we cannot find the driver, windows just writes a blank value. */
+ if ((ret = RegOpenKeyW(HKEY_LOCAL_MACHINE, odbcini, &hkey)) == ERROR_SUCCESS)
+ {
+ HKEY hkeydriver;
+
+ if ((ret = RegOpenKeyW(hkey, lpszDriver, &hkeydriver)) == ERROR_SUCCESS)
+ {
+ ret = RegGetValueW(hkeydriver, NULL, L"driver", RRF_RT_REG_SZ, &type, NULL, &size);
+ /* Windows ignores the fact the driver key is missing */
+ if(ret == ERROR_SUCCESS && type == REG_SZ && size)
+ {
+ filename = HeapAlloc(GetProcessHeap(), 0, size);
+ if(!filename)
+ {
+ RegCloseKey(hkeydriver);
+ RegCloseKey(hkey);
+ push_error(ODBC_ERROR_OUT_OF_MEM, odbc_error_out_of_mem);
+
+ return FALSE;
+ }
+ ret = RegGetValueW(hkeydriver, NULL, L"driver", RRF_RT_REG_SZ, &type, filename, &size);
+ }
+
+ RegCloseKey(hkeydriver);
+ }
+
+ RegCloseKey(hkey);
+ }
+
+ if (RegCreateKeyW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\ODBC\\ODBC.INI", &hkey) == ERROR_SUCCESS)
+ {
+ HKEY sources;
+
+ if (RegCreateKeyW(hkey, L"ODBC Data Sources", &sources) == ERROR_SUCCESS)
+ {
+ RegSetValueExW(sources, lpszDSN, 0, REG_SZ, (BYTE*)lpszDriver, (lstrlenW(lpszDriver)+1)*sizeof(WCHAR));
+ RegCloseKey(sources);
+ }
+
+ RegDeleteTreeW(hkey, lpszDSN);
+
+ if (RegCreateKeyW(hkey, lpszDSN, &hkeydriver) == ERROR_SUCCESS)
+ {
+ if (filename)
+ RegSetValueExW(sources, L"driver", 0, REG_SZ, (BYTE*)filename, (lstrlenW(filename)+1)*sizeof(WCHAR));
+ else
+ RegSetValueExW(sources, L"driver", 0, REG_SZ, (BYTE*)L"", sizeof(L""));
+
+ RegCloseKey(hkeydriver);
+ ret = TRUE;
+ }
+
+ RegCloseKey(hkey);
+ }
+
+ if (!ret)
+ push_error(ODBC_ERROR_REQUEST_FAILED, odbc_error_request_failed);
+
+ heap_free(filename);
+
+ return ret;
}
BOOL WINAPI SQLWriteDSNToIni(LPCSTR lpszDSN, LPCSTR lpszDriver)
{
- clear_errors();
- FIXME("%s %s\n", debugstr_a(lpszDSN), debugstr_a(lpszDriver));
- return TRUE;
+ BOOL ret = FALSE;
+ WCHAR *dsn, *driver;
+
+ TRACE("%s %s\n", debugstr_a(lpszDSN), debugstr_a(lpszDriver));
+
+ dsn = SQLInstall_strdup(lpszDSN);
+ driver = SQLInstall_strdup(lpszDriver);
+ if (dsn && driver)
+ ret = SQLWriteDSNToIniW(dsn, driver);
+ else
+ push_error(ODBC_ERROR_OUT_OF_MEM, odbc_error_out_of_mem);
+
+ heap_free(dsn);
+ heap_free(driver);
+
+ return ret;
}
BOOL WINAPI SQLWriteFileDSNW(LPCWSTR lpszFileName, LPCWSTR lpszAppName,
diff --git a/dlls/odbccp32/tests/misc.c b/dlls/odbccp32/tests/misc.c
index 0120504227d..f52dcee7acd 100644
--- a/dlls/odbccp32/tests/misc.c
+++ b/dlls/odbccp32/tests/misc.c
@@ -771,6 +771,113 @@ static void test_SQLConfigDataSource(void)
check_error(ODBC_ERROR_COMPONENT_NOT_FOUND);
}
+static void test_SQLWriteDSNToIni(void)
+{
+ BOOL ret;
+ char buffer[MAX_PATH];
+ char path[MAX_PATH];
+ DWORD type, size;
+
+ SQLSetConfigMode(ODBC_SYSTEM_DSN);
+
+ ret = SQLWriteDSNToIni("wine_dbs", "SQL Server");
+ if (!ret)
+ {
+ win_skip("Doesn't have permission to write a System DSN\n");
+ return;
+ }
+
+ if(ret)
+ {
+ HKEY hkey;
+ LONG res;
+
+ res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\ODBC\\ODBC.INI\\ODBC Data Sources", 0,
+ KEY_READ, &hkey);
+ ok(res == ERROR_SUCCESS, "RegOpenKeyExW failed\n");
+ if (res == ERROR_SUCCESS)
+ {
+ type = 0xdeadbeef;
+ size = MAX_PATH;
+
+ memset(buffer, 0, sizeof(buffer));
+ res = RegQueryValueExA(hkey, "wine_dbs", NULL, &type, (BYTE *)buffer, &size);
+ ok(res == ERROR_SUCCESS, "RegGetValueA failed\n");
+ ok(type == REG_SZ, "got %u\n", type);
+ ok(!strcmp(buffer, "SQL Server"), "incorrect string '%s'\n", buffer);
+
+ RegCloseKey(hkey);
+ }
+
+ res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\ODBC\\ODBC.INI\\wine_dbs", 0,
+ KEY_READ, &hkey);
+ ok(res == ERROR_SUCCESS, "RegOpenKeyExW failed\n");
+ if (res == ERROR_SUCCESS)
+ {
+ type = 0xdeadbeef;
+ size = MAX_PATH;
+
+ memset(path, 0, sizeof(path));
+ res = RegQueryValueExA(hkey, "driver", NULL, &type, (BYTE *)path, &size);
+ ok(res == ERROR_SUCCESS, "RegGetValueA failed\n");
+ ok(type == REG_SZ, "got %u\n", type);
+ /* WINE doesn't have a 'SQL Server' driver available */
+ todo_wine ok(strlen(path) != 0, "Invalid value\n");
+
+ RegCloseKey(hkey);
+ }
+
+ ret = SQLRemoveDSNFromIni("wine_dbs");
+ ok(ret, "got %d\n", ret);
+ }
+
+ /* Show that values are writen, even though an invalid driver was specified. */
+ ret = SQLWriteDSNToIni("wine_mis", "Missing Access Driver (*.mis)");
+ ok(ret, "got %d\n", ret);
+ if(ret)
+ {
+ HKEY hkey;
+ LONG res;
+
+ res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\ODBC\\ODBC.INI\\ODBC Data Sources", 0,
+ KEY_READ, &hkey);
+ ok(res == ERROR_SUCCESS, "RegOpenKeyExW failed\n");
+ if (res == ERROR_SUCCESS)
+ {
+ type = 0xdeadbeef;
+ size = MAX_PATH;
+
+ memset(buffer, 0, sizeof(buffer));
+ res = RegQueryValueExA(hkey, "wine_mis", NULL, &type, (BYTE *)buffer, &size);
+ ok(res == ERROR_SUCCESS, "RegGetValueA failed\n");
+ ok(type == REG_SZ, "got %u\n", type);
+ ok(!strcmp(buffer, "Missing Access Driver (*.mis)"), "incorrect string '%s'\n", buffer);
+
+ RegCloseKey(hkey);
+ }
+
+ res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\ODBC\\ODBC.INI\\wine_mis", 0,
+ KEY_READ, &hkey);
+ ok(res == ERROR_SUCCESS, "RegOpenKeyExW failed\n");
+ if (res == ERROR_SUCCESS)
+ {
+ type = 0xdeadbeef;
+ size = MAX_PATH;
+
+ memset(path, 0, sizeof(path));
+ res = RegQueryValueExA(hkey, "driver", NULL, &type, (BYTE *)path, &size);
+ ok(res == ERROR_SUCCESS, "RegGetValueA failed\n");
+ ok(type == REG_SZ, "got %u\n", type);
+ ok(strlen(path) == 0, "Invalid value\n");
+
+ RegCloseKey(hkey);
+ }
+
+ ret = SQLRemoveDSNFromIni("wine_mis");
+ ok(ret, "got %d\n", ret);
+ }
+}
+
START_TEST(misc)
{
test_SQLConfigMode();
@@ -785,4 +892,5 @@ START_TEST(misc)
test_SQLValidDSN();
test_SQLValidDSNW();
test_SQLConfigDataSource();
+ test_SQLWriteDSNToIni();
}
--
2.29.2
Dec. 6, 2020
Re: Wine staging 5.19 release
by Zebediah Figura (she/her)
On 12/4/20 8:44 AM, Gerald Pfeifer wrote:
> On Sat, 24 Oct 2020, Gerald Pfeifer wrote:
>> Here is a patch on top (of the Wine Staging patchset) that is required.
>>
>> Can you please include that? Thank you!
>
> Thanks to (I believe Zebediah) for addressing those issues!
>
> I have to confess there is one snippet I missed. With the additional
> patch below Wine 5.22 + Staging patchset builds on FreeBSD 11 out of
> the box.
>
> Thank you for considering that; for now I'm carrying it as part of
> the FreeBSD emulators/wine-devel port.
Thanks for the report; this should hopefully be fixed by
2dc013940d2aae1b2e9de887d9ddb490e8a7a6fc.
>
> Gerald
>
>
> --- dlls/ntdll/unix/file.c.orig 2020-11-07 09:33:27.083812000 +0000
> +++ dlls/ntdll/unix/file.c 2020-11-07 09:53:55.641522000 +0000
> @@ -394,6 +394,18 @@
> #define XATTR_USER_PREFIX_LEN (sizeof(XATTR_USER_PREFIX) - 1)
> #endif
>
> +#ifdef HAVE_SYS_EXTATTR_H
> +static inline int xattr_valid_namespace( const char *name )
> +{
> + if (strncmp( XATTR_USER_PREFIX, name, XATTR_USER_PREFIX_LEN ) != 0)
> + {
> + errno = EPERM;
> + return 0;
> + }
> + return 1;
> +}
> +#endif
> +
> static int xattr_fremove( int filedes, const char *name )
> {
> #if defined(XATTR_ADDITIONAL_OPTIONS)
>
Dec. 6, 2020
[PATCH] kernelbase: Add rudimentary mui resource support to loader.c
by Craig Schulstad
Signed-off-by: Craig Schulstad <craigaschulstad(a)gmail.com>
---
dlls/kernelbase/loader.c | 169 +++++++++++++++++++++++++++++++++++++--
1 file changed, 164 insertions(+), 5 deletions(-)
diff --git a/dlls/kernelbase/loader.c b/dlls/kernelbase/loader.c
index fc9b0ce0083..0fbe9bcd9e8 100644
--- a/dlls/kernelbase/loader.c
+++ b/dlls/kernelbase/loader.c
@@ -48,6 +48,9 @@ struct exclusive_datafile
};
static struct list exclusive_datafile_list = LIST_INIT( exclusive_datafile_list );
+static WCHAR mui_locale[LOCALE_NAME_MAX_LENGTH];
+static BOOL locale_found = 0;
+static BOOL recursion_flag = 0;
/***********************************************************************
* Modules
@@ -1011,11 +1014,122 @@ BOOL WINAPI DECLSPEC_HOTPATCH EnumResourceTypesExW( HMODULE module, ENUMRESTYPEP
return ret;
}
+/***********************************************************************/
+/* get_mui - Acquire an MUI module for the associated resource */
+/***********************************************************************/
+
+HMODULE get_mui(HMODULE module)
+
+{
+
+ HMODULE mui_module = NULL;
+
+ WCHAR module_name[MAX_PATH], mui_name[MAX_PATH];
+
+ INT i, j, k, l;
+
+ /* Initialize the work strings */
+
+ for (i = 0; i < MAX_PATH; i++) {
+ module_name[i] = 0;
+ mui_name[i] = 0;
+ }
+
+ /* Note - the reference to the Windows file name for an "MUI" file has a structure such as */
+ /* "C:\Program Files\Application Directory\xx-XX\Application.exe.mui"; however, in testing */
+ /* out the usage of the "GetModuleFileNameW" function, it was determined that it works with */
+ /* a relative Linux file structure such as "xx-XX/Application.exe.mui". */
+
+ /* Acquire the base resource file name */
+
+ if (!(GetModuleFileNameW(module, module_name, MAX_PATH))) return module;
+
+ /* Stay with the original module reference if this file is not an executable file. */
+
+ if (!(wcsstr(module_name, L".exe"))) return module;
+
+ /* Acquire the locale name using LCIDToLocaleName. Since this function utilizes the FindResourceExW function, this */
+ /* sets up a recursive call to this function. In order to avoid a stack overflow condition that would be caused by */
+ /* repeated calls, a flag will be set on to return back to the FindResourceExW function without again calling the */
+ /* locale acquisition function. */
+
+ if (!(locale_found)) {
+
+ if (recursion_flag) return module;
+
+ recursion_flag = 1;
+
+ LCIDToLocaleName( GetUserDefaultLCID(), mui_locale, LOCALE_NAME_MAX_LENGTH, 0 );
+
+ recursion_flag = 0;
+
+ locale_found = 1;
+
+ }
+
+ /* Locate the position of the final backslash in the retrieved executable file. */
+
+ j = 0;
+
+ for (i = 0; i < MAX_PATH; i++) {
+
+ if (module_name[i] == 0) break;
+
+ if (module_name[i] == '\\') j = i;
+ }
+
+ /* Set up the work index that will be used to extract just the executable file from the fully qualified file name. */
+
+ k = 0;
+
+ for (i = 0; i < MAX_PATH; i++) {
+
+ if (module_name[i] == 0) break;
+
+ /* If work index "j" has been set to -1, then the file portion of the qualified name has been reached and will */
+ /* be copied to the "MUI" file reference. */
+
+ if (j < 0) {
+ mui_name[k] = module_name[i];
+ k++;
+ }
+
+ /* When the position of the final backslash has been reached, add the locale name as the folder/directory */
+ /* containing the "MUI" file and reset work index "j" to -1. */
+
+ if (i >= j && j > 0) {
+ for (l = 0; l < 5; l++) {
+ mui_name[k] = mui_locale[l];
+ k++;
+ }
+ mui_name[k] = '/';
+ k++;
+ j = -1;
+ }
+ }
+
+ /* Finally, append the literal ".mui" onto the file reference. */
+
+ wcscat(mui_name, L".mui");
+
+ /* Now, see if there is an associated "MUI" file and if so use its handle for the module handle. */
+
+ mui_module = LoadLibraryExW(mui_name, 0, 0);
+
+ if (mui_module) {
+ return mui_module;
+ } else {
+ return module;
+ }
+
+}
+
+/***********************************************************************/
+/* get_res_handle - Isolated call of the LdrFindResource function */
+/***********************************************************************/
+
+HRSRC get_res_handle(HMODULE module, LPCWSTR type, LPCWSTR name, WORD lang)
-/**********************************************************************
- * FindResourceExW (kernelbase.@)
- */
-HRSRC WINAPI DECLSPEC_HOTPATCH FindResourceExW( HMODULE module, LPCWSTR type, LPCWSTR name, WORD lang )
{
NTSTATUS status;
UNICODE_STRING nameW, typeW;
@@ -1024,7 +1138,6 @@ HRSRC WINAPI DECLSPEC_HOTPATCH FindResourceExW( HMODULE module, LPCWSTR type, LP
TRACE( "%p %s %s %04x\n", module, debugstr_w(type), debugstr_w(name), lang );
- if (!module) module = GetModuleHandleW( 0 );
nameW.Buffer = typeW.Buffer = NULL;
__TRY
@@ -1046,7 +1159,41 @@ HRSRC WINAPI DECLSPEC_HOTPATCH FindResourceExW( HMODULE module, LPCWSTR type, LP
if (!IS_INTRESOURCE(nameW.Buffer)) HeapFree( GetProcessHeap(), 0, nameW.Buffer );
if (!IS_INTRESOURCE(typeW.Buffer)) HeapFree( GetProcessHeap(), 0, typeW.Buffer );
+
return (HRSRC)entry;
+
+}
+
+/**********************************************************************
+ * FindResourceExW (kernelbase.@)
+ */
+HRSRC WINAPI DECLSPEC_HOTPATCH FindResourceExW( HMODULE module, LPCWSTR type, LPCWSTR name, WORD lang )
+{
+
+ HRSRC rsrc;
+
+ TRACE( "%p %s %s %04x\n", module, debugstr_w(type), debugstr_w(name), lang );
+
+ if (!module) module = GetModuleHandleW( 0 );
+
+ rsrc = get_res_handle(module, type, name, lang);
+
+ if (rsrc) {
+
+ return rsrc;
+
+ } else {
+
+ /* If a resource retrieval failed using the initial module value, attempt to */
+ /* locate an associated MUI file and retry the resource retrieval. */
+
+ module = get_mui(module);
+
+ rsrc = get_res_handle(module, type, name, lang);
+
+ return rsrc;
+
+ }
}
@@ -1074,11 +1221,23 @@ BOOL WINAPI DECLSPEC_HOTPATCH FreeResource( HGLOBAL handle )
HGLOBAL WINAPI DECLSPEC_HOTPATCH LoadResource( HINSTANCE module, HRSRC rsrc )
{
void *ret;
+ HMODULE mui_module = NULL;
TRACE( "%p %p\n", module, rsrc );
if (!rsrc) return 0;
if (!module) module = GetModuleHandleW( 0 );
+
+
+ /* Only check for an MUI reference if the resource handle value is less than the module value, */
+ /* or if an MUI reference was found and the MUI reference and handle value are larger than the */
+ /* module value for the executable file. That is a signal that the resource handle is to be */
+ /* associated with the MUI file instead of the executable file. */
+
+ mui_module = get_mui(module);
+
+ if (((HMODULE)rsrc < module) || ((mui_module > module) && ((HMODULE)rsrc > mui_module))) module = mui_module;
+
if (!set_ntstatus( LdrAccessResource( module, (IMAGE_RESOURCE_DATA_ENTRY *)rsrc, &ret, NULL )))
return 0;
return ret;
--
2.17.1
Dec. 5, 2020
[PATCH] winegstreamer: Clean up a newly allocated buffer on error in bytestream_wrapper_pull().
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/winegstreamer/media_source.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
index d411bbd1de2..ffbf8041ed8 100644
--- a/dlls/winegstreamer/media_source.c
+++ b/dlls/winegstreamer/media_source.c
@@ -443,6 +443,7 @@ GstFlowReturn bytestream_wrapper_pull(GstPad *pad, GstObject *parent, guint64 of
{
struct media_source *source = gst_pad_get_element_private(pad);
IMFByteStream *byte_stream = source->byte_stream;
+ GstBuffer *new_buffer = NULL;
ULONG bytes_read;
GstMapInfo info;
BOOL is_eof;
@@ -463,7 +464,7 @@ GstFlowReturn bytestream_wrapper_pull(GstPad *pad, GstObject *parent, guint64 of
return GST_FLOW_EOS;
if (!(*buf))
- *buf = gst_buffer_new_and_alloc(len);
+ *buf = new_buffer = gst_buffer_new_and_alloc(len);
gst_buffer_map(*buf, &info, GST_MAP_WRITE);
hr = IMFByteStream_Read(byte_stream, info.data, len, &bytes_read);
gst_buffer_unmap(*buf, &info);
@@ -471,7 +472,11 @@ GstFlowReturn bytestream_wrapper_pull(GstPad *pad, GstObject *parent, guint64 of
gst_buffer_set_size(*buf, bytes_read);
if (FAILED(hr))
+ {
+ if (new_buffer)
+ gst_buffer_unref(new_buffer);
return GST_FLOW_ERROR;
+ }
return GST_FLOW_OK;
}
--
2.29.2
Dec. 5, 2020
[PATCH v2] msctf/tests: Use wide-char string literals.
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
v2: Missed to commit a line break.
dlls/msctf/tests/inputprocessor.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/dlls/msctf/tests/inputprocessor.c b/dlls/msctf/tests/inputprocessor.c
index 1c97d2c5d1c..55a6ab6c34c 100644
--- a/dlls/msctf/tests/inputprocessor.c
+++ b/dlls/msctf/tests/inputprocessor.c
@@ -1112,9 +1112,6 @@ static void test_Register(void)
{
HRESULT hr;
- static const WCHAR szDesc[] = {'F','a','k','e',' ','W','i','n','e',' ','S','e','r','v','i','c','e',0};
- static const WCHAR szFile[] = {'F','a','k','e',' ','W','i','n','e',' ','S','e','r','v','i','c','e',' ','F','i','l','e',0};
-
hr = ITfInputProcessorProfiles_GetCurrentLanguage(g_ipp,&gLangid);
ok(SUCCEEDED(hr),"Unable to get current language id\n");
trace("Current Language %x\n",gLangid);
@@ -1124,7 +1121,8 @@ static void test_Register(void)
hr = ITfInputProcessorProfiles_Register(g_ipp, &CLSID_FakeService);
ok(SUCCEEDED(hr),"Unable to register text service(%x)\n",hr);
hr = ITfInputProcessorProfiles_AddLanguageProfile(g_ipp, &CLSID_FakeService, gLangid,
- &CLSID_FakeService, szDesc, ARRAY_SIZE(szDesc), szFile, ARRAY_SIZE(szFile), 1);
+ &CLSID_FakeService, L"Fake Wine Service", ARRAY_SIZE(L"Fake Wine Service"),
+ L"Fake Wine Service File", ARRAY_SIZE(L"Fake Wine Service File"), 1);
ok(SUCCEEDED(hr),"Unable to add Language Profile (%x)\n",hr);
}
@@ -2071,12 +2069,11 @@ static void test_InsertAtSelection(TfEditCookie ec, ITfContext *cxt)
HRESULT hr;
ITfInsertAtSelection *iis;
ITfRange *range=NULL;
- static const WCHAR txt[] = {'H','e','l','l','o',' ','W','o','r','l','d',0};
hr = ITfContext_QueryInterface(cxt, &IID_ITfInsertAtSelection , (LPVOID*)&iis);
ok(SUCCEEDED(hr),"Failed to get ITfInsertAtSelection interface\n");
test_ACP_InsertTextAtSelection = SINK_EXPECTED;
- hr = ITfInsertAtSelection_InsertTextAtSelection(iis, ec, 0, txt, 11, &range);
+ hr = ITfInsertAtSelection_InsertTextAtSelection(iis, ec, 0, L"Hello World", 11, &range);
ok(SUCCEEDED(hr),"ITfInsertAtSelection_InsertTextAtSelection failed %x\n",hr);
sink_check_ok(&test_ACP_InsertTextAtSelection,"InsertTextAtSelection");
ok(range != NULL,"No range returned\n");
--
2.26.2
Dec. 5, 2020
Re: Re: Wine staging 5.19 release
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=83152
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/ntdll/unix/file.c:394
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/ntdll/unix/file.c:394
Task: Patch failed to apply
Dec. 5, 2020
Wine staging 6.0rc1 release
by Alistair Leslie-Hughes
Binary packages for various distributions will be available from:
https://www.winehq.org/download
Summary since last release
* Rebased to current wine 6.0rc1 (740 patches are applied to wine vanilla)
Upstreamed (Either directly from staging or fixed with a similar patch).
* HACK: Switch between all selection streams on MF_SOURCE_READER_ANY_STREAM.
* msctf: Added ITfActiveLanguageProfileNotifySink support in ITfSource.
* winebuild: Call __wine_syscall_dispatcher through the fixed address.
* mf/topoloader: Add partial topology resolution tests.
* mf/topoloader: Move node connection responsibility to connection function.
* mf/topoloader: Implement source node to sink node branch resolver.
* mf/topoloader: Unstub IMFTopologyLoader::Load.
* winegstreamer: Implement ::SetInputType for audio conversion transform.
* winegstreamer: Implement ::SetOutputType for audio conversion transform.
* winegstreamer: Implement Get(Input/Output)CurrentType functions for
audio converter transform.
Added:
* [40262] Correct order of windows messages.
* [46070] Basemark Web 3.0 Desktop Launcher crashes.
Updated:
* msvcrt-Math_Precision
* mfplat-streaming-support
* ntdll-Junction_Points
* widl-winrt-support
Where can you help
* Run Steam/Battle.net/GOG/UPlay/Epic
* Test your favorite game.
* Test your favorite applications.
* Improve staging patches and get them accepted upstream.
As always, if you find a bug, please report it via
https://bugs.winehq.org
Best Regards
Alistair.
Dec. 5, 2020
Re: [PATCH] ntdll: Fix memchr implementation.
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=83142
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/msvcrt/string.c:2621
error: patch failed: dlls/ntdll/string.c:72
error: patch failed: dlls/ntdll/tests/string.c:65
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/msvcrt/string.c:2621
error: patch failed: dlls/ntdll/string.c:72
error: patch failed: dlls/ntdll/tests/string.c:65
Task: Patch failed to apply
Dec. 4, 2020
Re: [PATCH v2 17/17] winegstreamer: Implement Get(Input/Output)CurrentType functions for color converter transform.
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=83139
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/audioconvert.c:18
error: patch failed: dlls/winegstreamer/audioconvert.c:38
error: patch failed: dlls/winegstreamer/audioconvert.c:295
error: patch failed: dlls/winegstreamer/audioconvert.c:87
error: patch failed: dlls/winegstreamer/audioconvert.c:495
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/audioconvert.c:18
error: patch failed: dlls/winegstreamer/audioconvert.c:38
error: patch failed: dlls/winegstreamer/audioconvert.c:295
error: patch failed: dlls/winegstreamer/audioconvert.c:87
error: patch failed: dlls/winegstreamer/audioconvert.c:495
Task: Patch failed to apply
Dec. 4, 2020
Re: [PATCH v2 16/17] winegstreamer: Semi-stub Get*Attributes functions for color converter transform.
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=83138
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/audioconvert.c:18
error: patch failed: dlls/winegstreamer/audioconvert.c:38
error: patch failed: dlls/winegstreamer/audioconvert.c:295
error: patch failed: dlls/winegstreamer/audioconvert.c:87
error: patch failed: dlls/winegstreamer/audioconvert.c:495
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/audioconvert.c:18
error: patch failed: dlls/winegstreamer/audioconvert.c:38
error: patch failed: dlls/winegstreamer/audioconvert.c:295
error: patch failed: dlls/winegstreamer/audioconvert.c:87
error: patch failed: dlls/winegstreamer/audioconvert.c:495
Task: Patch failed to apply
Dec. 4, 2020
Re: [PATCH v2 15/17] winegstreamer: Implement ::Get(Input/Output)StreamInfo for color conversion transform.
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=83137
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/audioconvert.c:18
error: patch failed: dlls/winegstreamer/audioconvert.c:38
error: patch failed: dlls/winegstreamer/audioconvert.c:295
error: patch failed: dlls/winegstreamer/audioconvert.c:87
error: patch failed: dlls/winegstreamer/audioconvert.c:495
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/audioconvert.c:18
error: patch failed: dlls/winegstreamer/audioconvert.c:38
error: patch failed: dlls/winegstreamer/audioconvert.c:295
error: patch failed: dlls/winegstreamer/audioconvert.c:87
error: patch failed: dlls/winegstreamer/audioconvert.c:495
Task: Patch failed to apply
Dec. 4, 2020
Re: [PATCH v2 14/17] winegstreamer: Implement ::ProcessMessage for color conversion MFT.
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=83136
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/audioconvert.c:18
error: patch failed: dlls/winegstreamer/audioconvert.c:38
error: patch failed: dlls/winegstreamer/audioconvert.c:295
error: patch failed: dlls/winegstreamer/audioconvert.c:87
error: patch failed: dlls/winegstreamer/audioconvert.c:495
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/audioconvert.c:18
error: patch failed: dlls/winegstreamer/audioconvert.c:38
error: patch failed: dlls/winegstreamer/audioconvert.c:295
error: patch failed: dlls/winegstreamer/audioconvert.c:87
error: patch failed: dlls/winegstreamer/audioconvert.c:495
Task: Patch failed to apply
Dec. 4, 2020
Re: [PATCH v2 13/17] winegstreamer: Implement ::Process(Input/Output) for color conversion transform.
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=83135
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/audioconvert.c:18
error: patch failed: dlls/winegstreamer/audioconvert.c:38
error: patch failed: dlls/winegstreamer/audioconvert.c:295
error: patch failed: dlls/winegstreamer/audioconvert.c:87
error: patch failed: dlls/winegstreamer/audioconvert.c:495
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/audioconvert.c:18
error: patch failed: dlls/winegstreamer/audioconvert.c:38
error: patch failed: dlls/winegstreamer/audioconvert.c:295
error: patch failed: dlls/winegstreamer/audioconvert.c:87
error: patch failed: dlls/winegstreamer/audioconvert.c:495
Task: Patch failed to apply
Dec. 4, 2020
Re: [PATCH v2 12/17] winegstreamer: Implement ::SetOutputType for color conversion transform.
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=83134
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/audioconvert.c:18
error: patch failed: dlls/winegstreamer/audioconvert.c:38
error: patch failed: dlls/winegstreamer/audioconvert.c:295
error: patch failed: dlls/winegstreamer/audioconvert.c:87
error: patch failed: dlls/winegstreamer/audioconvert.c:495
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/audioconvert.c:18
error: patch failed: dlls/winegstreamer/audioconvert.c:38
error: patch failed: dlls/winegstreamer/audioconvert.c:295
error: patch failed: dlls/winegstreamer/audioconvert.c:87
error: patch failed: dlls/winegstreamer/audioconvert.c:495
Task: Patch failed to apply
Dec. 4, 2020
Re: [PATCH v2 11/17] winegstreamer: Implement ::GetOutputAvailableType for color conversion transform.
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=83133
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/audioconvert.c:18
error: patch failed: dlls/winegstreamer/audioconvert.c:38
error: patch failed: dlls/winegstreamer/audioconvert.c:295
error: patch failed: dlls/winegstreamer/audioconvert.c:87
error: patch failed: dlls/winegstreamer/audioconvert.c:495
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/audioconvert.c:18
error: patch failed: dlls/winegstreamer/audioconvert.c:38
error: patch failed: dlls/winegstreamer/audioconvert.c:295
error: patch failed: dlls/winegstreamer/audioconvert.c:87
error: patch failed: dlls/winegstreamer/audioconvert.c:495
Task: Patch failed to apply
Dec. 4, 2020
Re: [PATCH v2 10/17] winegstreamer: Implement ::SetInputType for color conversion transform.
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=83132
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/audioconvert.c:18
error: patch failed: dlls/winegstreamer/audioconvert.c:38
error: patch failed: dlls/winegstreamer/audioconvert.c:295
error: patch failed: dlls/winegstreamer/audioconvert.c:87
error: patch failed: dlls/winegstreamer/audioconvert.c:495
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/audioconvert.c:18
error: patch failed: dlls/winegstreamer/audioconvert.c:38
error: patch failed: dlls/winegstreamer/audioconvert.c:295
error: patch failed: dlls/winegstreamer/audioconvert.c:87
error: patch failed: dlls/winegstreamer/audioconvert.c:495
Task: Patch failed to apply
Dec. 4, 2020
Re: [PATCH v2 09/17] winegstreamer: Implement ::GetInputAvailableType for color conversion transform.
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=83131
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/audioconvert.c:18
error: patch failed: dlls/winegstreamer/audioconvert.c:38
error: patch failed: dlls/winegstreamer/audioconvert.c:295
error: patch failed: dlls/winegstreamer/audioconvert.c:87
error: patch failed: dlls/winegstreamer/audioconvert.c:495
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/audioconvert.c:18
error: patch failed: dlls/winegstreamer/audioconvert.c:38
error: patch failed: dlls/winegstreamer/audioconvert.c:295
error: patch failed: dlls/winegstreamer/audioconvert.c:87
error: patch failed: dlls/winegstreamer/audioconvert.c:495
Task: Patch failed to apply
Dec. 4, 2020
Re: [PATCH v2 08/17] winegstreamer: Register the color conversion transform.
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=83130
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/audioconvert.c:18
error: patch failed: dlls/winegstreamer/audioconvert.c:38
error: patch failed: dlls/winegstreamer/audioconvert.c:295
error: patch failed: dlls/winegstreamer/audioconvert.c:87
error: patch failed: dlls/winegstreamer/audioconvert.c:495
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/audioconvert.c:18
error: patch failed: dlls/winegstreamer/audioconvert.c:38
error: patch failed: dlls/winegstreamer/audioconvert.c:295
error: patch failed: dlls/winegstreamer/audioconvert.c:87
error: patch failed: dlls/winegstreamer/audioconvert.c:495
Task: Patch failed to apply
Dec. 4, 2020