winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
July 2012
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
712 discussions
Start a n
N
ew thread
Matteo Bruni : d3dcompiler: Use location information in add_modifier().
by Alexandre Julliard
12 Jul '12
12 Jul '12
Module: wine Branch: master Commit: 2b2b8501060e6594424700bf543a99aea50a3704 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2b2b8501060e6594424700bf5…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Thu Jul 12 16:01:36 2012 +0200 d3dcompiler: Use location information in add_modifier(). --- dlls/d3dcompiler_43/hlsl.y | 60 ++++++++++++++++++++++---------------------- 1 files changed, 30 insertions(+), 30 deletions(-) diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y index cadcfc9..cf0c7b5 100644 --- a/dlls/d3dcompiler_43/hlsl.y +++ b/dlls/d3dcompiler_43/hlsl.y @@ -146,25 +146,7 @@ static BOOL declare_variable(struct hlsl_ir_var *decl, BOOL local) return TRUE; } -static DWORD add_modifier(DWORD modifiers, DWORD mod) -{ - if (modifiers & mod) - { - hlsl_message("Line %u: modifier '%s' already specified.\n", - hlsl_ctx.line_no, debug_modifiers(mod)); - set_parse_status(&hlsl_ctx.status, PARSE_ERR); - return modifiers; - } - if (mod & (HLSL_MODIFIER_ROW_MAJOR | HLSL_MODIFIER_COLUMN_MAJOR) - && modifiers & (HLSL_MODIFIER_ROW_MAJOR | HLSL_MODIFIER_COLUMN_MAJOR)) - { - hlsl_message("Line %u: more than one matrix majority keyword.\n", - hlsl_ctx.line_no); - set_parse_status(&hlsl_ctx.status, PARSE_ERR); - return modifiers; - } - return modifiers | mod; -} +static DWORD add_modifier(DWORD modifiers, DWORD mod, const struct YYLTYPE *loc); static unsigned int components_count_expr_list(struct list *list) { @@ -691,47 +673,47 @@ var_modifiers: /* Empty */ } | KW_EXTERN var_modifiers { - $$ = add_modifier($2, HLSL_STORAGE_EXTERN); + $$ = add_modifier($2, HLSL_STORAGE_EXTERN, &@1); } | KW_NOINTERPOLATION var_modifiers { - $$ = add_modifier($2, HLSL_STORAGE_NOINTERPOLATION); + $$ = add_modifier($2, HLSL_STORAGE_NOINTERPOLATION, &@1); } | KW_PRECISE var_modifiers { - $$ = add_modifier($2, HLSL_MODIFIER_PRECISE); + $$ = add_modifier($2, HLSL_MODIFIER_PRECISE, &@1); } | KW_SHARED var_modifiers { - $$ = add_modifier($2, HLSL_STORAGE_SHARED); + $$ = add_modifier($2, HLSL_STORAGE_SHARED, &@1); } | KW_GROUPSHARED var_modifiers { - $$ = add_modifier($2, HLSL_STORAGE_GROUPSHARED); + $$ = add_modifier($2, HLSL_STORAGE_GROUPSHARED, &@1); } | KW_STATIC var_modifiers { - $$ = add_modifier($2, HLSL_STORAGE_STATIC); + $$ = add_modifier($2, HLSL_STORAGE_STATIC, &@1); } | KW_UNIFORM var_modifiers { - $$ = add_modifier($2, HLSL_STORAGE_UNIFORM); + $$ = add_modifier($2, HLSL_STORAGE_UNIFORM, &@1); } | KW_VOLATILE var_modifiers { - $$ = add_modifier($2, HLSL_STORAGE_VOLATILE); + $$ = add_modifier($2, HLSL_STORAGE_VOLATILE, &@1); } | KW_CONST var_modifiers { - $$ = add_modifier($2, HLSL_MODIFIER_CONST); + $$ = add_modifier($2, HLSL_MODIFIER_CONST, &@1); } | KW_ROW_MAJOR var_modifiers { - $$ = add_modifier($2, HLSL_MODIFIER_ROW_MAJOR); + $$ = add_modifier($2, HLSL_MODIFIER_ROW_MAJOR, &@1); } | KW_COLUMN_MAJOR var_modifiers { - $$ = add_modifier($2, HLSL_MODIFIER_COLUMN_MAJOR); + $$ = add_modifier($2, HLSL_MODIFIER_COLUMN_MAJOR, &@1); } complex_initializer: initializer_expr @@ -995,6 +977,24 @@ static void set_location(struct source_location *loc, const struct YYLTYPE *l) loc->col = l->first_column; } +static DWORD add_modifier(DWORD modifiers, DWORD mod, const struct YYLTYPE *loc) +{ + if (modifiers & mod) + { + hlsl_report_message(hlsl_ctx.source_file, loc->first_line, loc->first_column, HLSL_LEVEL_ERROR, + "modifier '%s' already specified", debug_modifiers(mod)); + return modifiers; + } + if (mod & (HLSL_MODIFIER_ROW_MAJOR | HLSL_MODIFIER_COLUMN_MAJOR) + && modifiers & (HLSL_MODIFIER_ROW_MAJOR | HLSL_MODIFIER_COLUMN_MAJOR)) + { + hlsl_report_message(hlsl_ctx.source_file, loc->first_line, loc->first_column, HLSL_LEVEL_ERROR, + "more than one matrix majority keyword"); + return modifiers; + } + return modifiers | mod; +} + struct bwriter_shader *parse_hlsl(enum shader_type type, DWORD major, DWORD minor, const char *entrypoint, char **messages) {
1
0
0
0
Matteo Bruni : d3dcompiler: Store (and begin to use) location information for variables.
by Alexandre Julliard
12 Jul '12
12 Jul '12
Module: wine Branch: master Commit: a84784e0577c26e0fd7741cde4cdc5809cd927a3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a84784e0577c26e0fd7741cde…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Thu Jul 12 16:01:35 2012 +0200 d3dcompiler: Store (and begin to use) location information for variables. --- dlls/d3dcompiler_43/d3dcompiler_private.h | 2 ++ dlls/d3dcompiler_43/hlsl.y | 26 +++++++++++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/dlls/d3dcompiler_43/d3dcompiler_private.h b/dlls/d3dcompiler_43/d3dcompiler_private.h index 5bb74f0..194ed25 100644 --- a/dlls/d3dcompiler_43/d3dcompiler_private.h +++ b/dlls/d3dcompiler_43/d3dcompiler_private.h @@ -820,6 +820,8 @@ struct parse_parameter struct parse_variable_def { struct list entry; + struct source_location loc; + char *name; unsigned int array_size; char *semantic; diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y index f4afd48..cadcfc9 100644 --- a/dlls/d3dcompiler_43/hlsl.y +++ b/dlls/d3dcompiler_43/hlsl.y @@ -32,6 +32,9 @@ int hlsl_lex(void); struct hlsl_parse_ctx hlsl_ctx; +struct YYLTYPE; +static void set_location(struct source_location *loc, const struct YYLTYPE *l); + void hlsl_message(const char *fmt, ...) { va_list args; @@ -125,9 +128,8 @@ static BOOL declare_variable(struct hlsl_ir_var *decl, BOOL local) | HLSL_STORAGE_GROUPSHARED | HLSL_STORAGE_UNIFORM); if (invalid) { - hlsl_message("Line %u: modifier '%s' invalid for local variables.\n", - hlsl_ctx.line_no, debug_modifiers(invalid)); - set_parse_status(&hlsl_ctx.status, PARSE_ERR); + hlsl_report_message(decl->node.loc.file, decl->node.loc.line, decl->node.loc.col, HLSL_LEVEL_ERROR, + "modifier '%s' invalid for local variables", debug_modifiers(invalid)); } } ret = add_declaration(hlsl_ctx.cur_scope, decl, local); @@ -135,9 +137,10 @@ static BOOL declare_variable(struct hlsl_ir_var *decl, BOOL local) { struct hlsl_ir_var *old = get_variable(hlsl_ctx.cur_scope, decl->name); - hlsl_message("Line %u: \"%s\" already declared.\n", hlsl_ctx.line_no, decl->name); - hlsl_message("Line %u: \"%s\" was previously declared here.\n", old->node.loc.line, decl->name); - set_parse_status(&hlsl_ctx.status, PARSE_ERR); + hlsl_report_message(decl->node.loc.file, decl->node.loc.line, decl->node.loc.col, HLSL_LEVEL_ERROR, + "\"%s\" already declared", decl->name); + hlsl_report_message(old->node.loc.file, old->node.loc.line, old->node.loc.col, HLSL_LEVEL_NOTE, + "\"%s\" was previously declared here", old->name); return FALSE; } return TRUE; @@ -613,10 +616,10 @@ declaration: var_modifiers type variables_def ';' var->node.data_type = new_array_type($2, v->array_size); else var->node.data_type = $2; + var->node.loc = v->loc; var->name = v->name; var->modifiers = $1; var->semantic = v->semantic; - var->node.loc.line = hlsl_ctx.line_no; if (v->initializer) { FIXME("Variable with an initializer.\n"); @@ -655,6 +658,7 @@ variables_def: variable_def variable_def: any_identifier array semantic { $$ = d3dcompiler_alloc(sizeof(*$$)); + set_location(&$$->loc, &@1); $$->name = $1; $$->array_size = $2; $$->semantic = $3; @@ -663,6 +667,7 @@ variable_def: any_identifier array semantic { TRACE("Declaration with initializer.\n"); $$ = d3dcompiler_alloc(sizeof(*$$)); + set_location(&$$->loc, &@1); $$->name = $1; $$->array_size = $2; $$->semantic = $3; @@ -983,6 +988,13 @@ expr: assignment_expr %% +static void set_location(struct source_location *loc, const struct YYLTYPE *l) +{ + loc->file = hlsl_ctx.source_file; + loc->line = l->first_line; + loc->col = l->first_column; +} + struct bwriter_shader *parse_hlsl(enum shader_type type, DWORD major, DWORD minor, const char *entrypoint, char **messages) {
1
0
0
0
Matteo Bruni : d3dcompiler: Introduce source_location structure.
by Alexandre Julliard
12 Jul '12
12 Jul '12
Module: wine Branch: master Commit: 5bcf8de8cfd171bf77b088c79c143048b22c6255 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5bcf8de8cfd171bf77b088c79…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Thu Jul 12 16:01:34 2012 +0200 d3dcompiler: Introduce source_location structure. --- dlls/d3dcompiler_43/d3dcompiler_private.h | 11 ++++++++--- dlls/d3dcompiler_43/hlsl.y | 4 ++-- dlls/d3dcompiler_43/utils.c | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/dlls/d3dcompiler_43/d3dcompiler_private.h b/dlls/d3dcompiler_43/d3dcompiler_private.h index 1286f00..5bb74f0 100644 --- a/dlls/d3dcompiler_43/d3dcompiler_private.h +++ b/dlls/d3dcompiler_43/d3dcompiler_private.h @@ -690,6 +690,13 @@ struct hlsl_struct_field DWORD modifiers; }; +struct source_location +{ + const char *file; + unsigned int line; + unsigned int col; +}; + enum hlsl_ir_node_type { HLSL_IR_VAR = 0, @@ -705,9 +712,7 @@ struct hlsl_ir_node enum hlsl_ir_node_type type; struct hlsl_type *data_type; - const char *source_file; - unsigned int line; - unsigned int column; + struct source_location loc; }; #define HLSL_STORAGE_EXTERN 0x00000001 diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y index 48c43a2..f4afd48 100644 --- a/dlls/d3dcompiler_43/hlsl.y +++ b/dlls/d3dcompiler_43/hlsl.y @@ -136,7 +136,7 @@ static BOOL declare_variable(struct hlsl_ir_var *decl, BOOL local) struct hlsl_ir_var *old = get_variable(hlsl_ctx.cur_scope, decl->name); hlsl_message("Line %u: \"%s\" already declared.\n", hlsl_ctx.line_no, decl->name); - hlsl_message("Line %u: \"%s\" was previously declared here.\n", old->node.line, decl->name); + hlsl_message("Line %u: \"%s\" was previously declared here.\n", old->node.loc.line, decl->name); set_parse_status(&hlsl_ctx.status, PARSE_ERR); return FALSE; } @@ -616,7 +616,7 @@ declaration: var_modifiers type variables_def ';' var->name = v->name; var->modifiers = $1; var->semantic = v->semantic; - var->node.line = hlsl_ctx.line_no; + var->node.loc.line = hlsl_ctx.line_no; if (v->initializer) { FIXME("Variable with an initializer.\n"); diff --git a/dlls/d3dcompiler_43/utils.c b/dlls/d3dcompiler_43/utils.c index 2d4eefb..c4dd2e8 100644 --- a/dlls/d3dcompiler_43/utils.c +++ b/dlls/d3dcompiler_43/utils.c @@ -816,7 +816,7 @@ BOOL add_func_parameter(struct list *list, struct parse_parameter *param, unsign } decl->node.type = HLSL_IR_VAR; decl->node.data_type = param->type; - decl->node.line = line; + decl->node.loc.line = line; decl->name = param->name; decl->semantic = param->semantic; decl->modifiers = param->modifiers;
1
0
0
0
Matteo Bruni : d3dcompiler: Track the location of each lexer token.
by Alexandre Julliard
12 Jul '12
12 Jul '12
Module: wine Branch: master Commit: 40cbcabc0b3c9e1c6e78e206d6531d24c517d172 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=40cbcabc0b3c9e1c6e78e206d…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Thu Jul 12 16:01:33 2012 +0200 d3dcompiler: Track the location of each lexer token. --- dlls/d3dcompiler_43/d3dcompiler_private.h | 7 ++++- dlls/d3dcompiler_43/hlsl.l | 9 ++++++++ dlls/d3dcompiler_43/hlsl.y | 30 ++++++++++++++++++++++++---- 3 files changed, 39 insertions(+), 7 deletions(-) diff --git a/dlls/d3dcompiler_43/d3dcompiler_private.h b/dlls/d3dcompiler_43/d3dcompiler_private.h index aa02eb9..1286f00 100644 --- a/dlls/d3dcompiler_43/d3dcompiler_private.h +++ b/dlls/d3dcompiler_43/d3dcompiler_private.h @@ -705,7 +705,7 @@ struct hlsl_ir_node enum hlsl_ir_node_type type; struct hlsl_type *data_type; - char *source_file; + const char *source_file; unsigned int line; unsigned int column; }; @@ -823,8 +823,11 @@ struct parse_variable_def struct hlsl_parse_ctx { - char *source_file; + const char **source_files; + unsigned int source_files_count; + const char *source_file; unsigned int line_no; + unsigned int column; enum parse_status status; struct compilation_messages messages; diff --git a/dlls/d3dcompiler_43/hlsl.l b/dlls/d3dcompiler_43/hlsl.l index 55b6b63..1e3b4a9 100644 --- a/dlls/d3dcompiler_43/hlsl.l +++ b/dlls/d3dcompiler_43/hlsl.l @@ -29,6 +29,14 @@ #include "hlsl.tab.h" WINE_DEFAULT_DEBUG_CHANNEL(hlsl_parser); + +#define YY_USER_ACTION \ + do { \ + hlsl_lloc.first_column = hlsl_ctx.column; \ + hlsl_lloc.first_line = hlsl_ctx.line_no; \ + hlsl_ctx.column += yyleng; \ + } while(0); + %} %option noyywrap nounput noinput @@ -206,6 +214,7 @@ row_major {return KW_ROW_MAJOR; } {WS}+ {} {NEWLINE} { hlsl_ctx.line_no++; + hlsl_ctx.column = 1; } ^# { diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y index 240eaaf..48c43a2 100644 --- a/dlls/d3dcompiler_43/hlsl.y +++ b/dlls/d3dcompiler_43/hlsl.y @@ -95,7 +95,7 @@ void hlsl_report_message(const char *filename, DWORD line, DWORD column, static void hlsl_error(const char *s) { - hlsl_report_message(hlsl_ctx.source_file, hlsl_ctx.line_no, 1, HLSL_LEVEL_ERROR, "%s", s); + hlsl_report_message(hlsl_ctx.source_file, hlsl_ctx.line_no, hlsl_ctx.column, HLSL_LEVEL_ERROR, "%s", s); } static void debug_dump_decl(struct hlsl_type *type, DWORD modifiers, const char *declname, unsigned int line_no) @@ -177,6 +177,7 @@ static unsigned int components_count_expr_list(struct list *list) %} +%locations %error-verbose %union @@ -360,8 +361,19 @@ preproc_directive: PRE_LINE STRING { TRACE("Updating line information to file %s, line %u\n", debugstr_a($2), $1); hlsl_ctx.line_no = $1; - d3dcompiler_free(hlsl_ctx.source_file); - hlsl_ctx.source_file = $2; + if (strcmp($2, hlsl_ctx.source_file)) + { + const char **new_array; + + hlsl_ctx.source_file = $2; + new_array = d3dcompiler_realloc(hlsl_ctx.source_files, + sizeof(*hlsl_ctx.source_files) * hlsl_ctx.source_files_count + 1); + if (new_array) + { + hlsl_ctx.source_files = new_array; + hlsl_ctx.source_files[hlsl_ctx.source_files_count++] = $2; + } + } } any_identifier: VAR_IDENTIFIER @@ -978,11 +990,16 @@ struct bwriter_shader *parse_hlsl(enum shader_type type, DWORD major, DWORD mino struct hlsl_scope *scope, *next_scope; struct hlsl_type *hlsl_type, *next_type; struct hlsl_ir_var *var, *next_var; + unsigned int i; hlsl_ctx.status = PARSE_SUCCESS; hlsl_ctx.messages.size = hlsl_ctx.messages.capacity = 0; - hlsl_ctx.line_no = 1; + hlsl_ctx.line_no = hlsl_ctx.column = 1; hlsl_ctx.source_file = d3dcompiler_strdup(""); + hlsl_ctx.source_files = d3dcompiler_alloc(sizeof(*hlsl_ctx.source_files)); + if (hlsl_ctx.source_files) + hlsl_ctx.source_files[0] = hlsl_ctx.source_file; + hlsl_ctx.source_files_count = 1; hlsl_ctx.cur_scope = NULL; hlsl_ctx.matrix_majority = HLSL_COLUMN_MAJOR; list_init(&hlsl_ctx.scopes); @@ -1020,7 +1037,10 @@ struct bwriter_shader *parse_hlsl(enum shader_type type, DWORD major, DWORD mino d3dcompiler_free(hlsl_ctx.messages.string); } - d3dcompiler_free(hlsl_ctx.source_file); + for (i = 0; i < hlsl_ctx.source_files_count; ++i) + d3dcompiler_free((void *)hlsl_ctx.source_files[i]); + d3dcompiler_free(hlsl_ctx.source_files); + TRACE("Freeing functions IR.\n"); LIST_FOR_EACH_ENTRY(function, &hlsl_ctx.functions, struct hlsl_ir_function_decl, node.entry) free_function(function);
1
0
0
0
Matteo Bruni : d3dcompiler: Add hlsl_report_message function to standardize error messages.
by Alexandre Julliard
12 Jul '12
12 Jul '12
Module: wine Branch: master Commit: 632703d8cfdaefc9dffeb124970e28d20471a535 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=632703d8cfdaefc9dffeb1249…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Thu Jul 12 16:01:32 2012 +0200 d3dcompiler: Add hlsl_report_message function to standardize error messages. --- dlls/d3dcompiler_43/d3dcompiler_private.h | 9 +++++ dlls/d3dcompiler_43/hlsl.y | 55 +++++++++++++++++++++++++++- 2 files changed, 62 insertions(+), 2 deletions(-) diff --git a/dlls/d3dcompiler_43/d3dcompiler_private.h b/dlls/d3dcompiler_43/d3dcompiler_private.h index ccac936..aa02eb9 100644 --- a/dlls/d3dcompiler_43/d3dcompiler_private.h +++ b/dlls/d3dcompiler_43/d3dcompiler_private.h @@ -840,7 +840,16 @@ struct hlsl_parse_ctx extern struct hlsl_parse_ctx hlsl_ctx DECLSPEC_HIDDEN; +enum hlsl_error_level +{ + HLSL_LEVEL_ERROR = 0, + HLSL_LEVEL_WARNING, + HLSL_LEVEL_NOTE, +}; + void hlsl_message(const char *fmt, ...) PRINTF_ATTR(1,2) DECLSPEC_HIDDEN; +void hlsl_report_message(const char *filename, DWORD line, DWORD column, + enum hlsl_error_level level, const char *fmt, ...) PRINTF_ATTR(5,6) DECLSPEC_HIDDEN; static inline struct hlsl_ir_deref *deref_from_node(const struct hlsl_ir_node *node) { diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y index 03aa4eb..240eaaf 100644 --- a/dlls/d3dcompiler_43/hlsl.y +++ b/dlls/d3dcompiler_43/hlsl.y @@ -41,10 +41,61 @@ void hlsl_message(const char *fmt, ...) va_end(args); } +static const char *hlsl_get_error_level_name(enum hlsl_error_level level) +{ + const char *names[] = + { + "error", + "warning", + "note", + }; + return names[level]; +} + +void hlsl_report_message(const char *filename, DWORD line, DWORD column, + enum hlsl_error_level level, const char *fmt, ...) +{ + va_list args; + char *string = NULL; + int rc, size = 0; + + while (1) + { + va_start(args, fmt); + rc = vsnprintf(string, size, fmt, args); + va_end(args); + + if (rc >= 0 && rc < size) + break; + + if (rc >= size) + size = rc + 1; + else + size = size ? size * 2 : 32; + + if (!string) + string = d3dcompiler_alloc(size); + else + string = d3dcompiler_realloc(string, size); + if (!string) + { + ERR("Error reallocating memory for a string.\n"); + return; + } + } + + hlsl_message("%s:%u:%u: %s: %s\n", filename, line, column, hlsl_get_error_level_name(level), string); + d3dcompiler_free(string); + + if (level == HLSL_LEVEL_ERROR) + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + else if (level == HLSL_LEVEL_WARNING) + set_parse_status(&hlsl_ctx.status, PARSE_WARN); +} + static void hlsl_error(const char *s) { - hlsl_message("Line %u: %s\n", hlsl_ctx.line_no, s); - set_parse_status(&hlsl_ctx.status, PARSE_ERR); + hlsl_report_message(hlsl_ctx.source_file, hlsl_ctx.line_no, 1, HLSL_LEVEL_ERROR, "%s", s); } static void debug_dump_decl(struct hlsl_type *type, DWORD modifiers, const char *declname, unsigned int line_no)
1
0
0
0
Jacek Caban : mshtml: Don't store outer window in nsChannelBSC.
by Alexandre Julliard
12 Jul '12
12 Jul '12
Module: wine Branch: master Commit: 5fecc4896f81d4b373125c392e4e17faaa27e070 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5fecc4896f81d4b373125c392…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jul 12 14:26:13 2012 +0200 mshtml: Don't store outer window in nsChannelBSC. --- dlls/mshtml/binding.h | 5 +-- dlls/mshtml/htmlwindow.c | 2 - dlls/mshtml/mshtml_private.h | 2 +- dlls/mshtml/navigate.c | 60 ++++++++++++++++++++++------------------- dlls/mshtml/nsio.c | 4 +- dlls/mshtml/persist.c | 4 +- 6 files changed, 39 insertions(+), 38 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=5fecc4896f81d4b373125…
1
0
0
0
Jacek Caban : mshtml: Use per-inner window task_magic for binding.
by Alexandre Julliard
12 Jul '12
12 Jul '12
Module: wine Branch: master Commit: bbaa307fdf9904aa90ff870079d508f0ebb1c564 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bbaa307fdf9904aa90ff87007…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jul 12 14:25:58 2012 +0200 mshtml: Use per-inner window task_magic for binding. --- dlls/mshtml/htmlwindow.c | 3 +++ dlls/mshtml/mshtml_private.h | 2 ++ dlls/mshtml/navigate.c | 9 ++++----- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 0ced93d..491a453 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -235,6 +235,7 @@ static void release_inner_window(HTMLInnerWindow *This) TRACE("%p\n", This); + remove_target_tasks(This->task_magic); abort_window_bindings(This); release_script_hosts(This); @@ -2622,6 +2623,8 @@ static HRESULT create_inner_window(HTMLOuterWindow *outer_window, HTMLInnerWindo init_dispex(&window->dispex, (IUnknown*)&window->base.IHTMLWindow2_iface, &HTMLWindow_dispex); + window->task_magic = get_task_target_magic(); + *ret = window; return S_OK; } diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index f0dde6c..430b744 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -361,6 +361,8 @@ struct HTMLInnerWindow { DWORD global_prop_cnt; DWORD global_prop_size; + LONG task_magic; + nsChannelBSC *bscallback; struct list bindings; }; diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c index 1fe4f9d..bfc8671 100644 --- a/dlls/mshtml/navigate.c +++ b/dlls/mshtml/navigate.c @@ -1325,7 +1325,7 @@ static HRESULT async_stop_request(nsChannelBSC *This) IBindStatusCallback_AddRef(&This->bsc.IBindStatusCallback_iface); task->bsc = This; - push_task(&task->header, stop_request_proc, stop_request_task_destr, This->window->doc_obj->basedoc.task_magic); + push_task(&task->header, stop_request_proc, stop_request_task_destr, This->bsc.window->task_magic); return S_OK; } @@ -1679,7 +1679,7 @@ HRESULT async_start_doc_binding(HTMLOuterWindow *window, HTMLInnerWindow *pendin task->pending_window = pending_window; IHTMLWindow2_AddRef(&pending_window->base.IHTMLWindow2_iface); - push_task(&task->header, start_doc_binding_proc, start_doc_binding_task_destr, window->task_magic); + push_task(&task->header, start_doc_binding_proc, start_doc_binding_task_destr, pending_window->task_magic); return S_OK; } @@ -1687,6 +1687,8 @@ void abort_window_bindings(HTMLInnerWindow *window) { BSCallback *iter; + remove_target_tasks(window->task_magic); + while(!list_empty(&window->bindings)) { iter = LIST_ENTRY(window->bindings.next, BSCallback, entry); @@ -1694,9 +1696,6 @@ void abort_window_bindings(HTMLInnerWindow *window) IBindStatusCallback_AddRef(&iter->IBindStatusCallback_iface); - if(iter->window && iter->window->doc) - remove_target_tasks(iter->window->doc->basedoc.task_magic); - if(iter->binding) IBinding_Abort(iter->binding); else
1
0
0
0
Jacek Caban : mshtml: Create inner window early in binding process and use it to store current binding callback .
by Alexandre Julliard
12 Jul '12
12 Jul '12
Module: wine Branch: master Commit: 25c5082f90e181beb83258ed7d8542822220233b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=25c5082f90e181beb83258ed7…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jul 12 14:25:43 2012 +0200 mshtml: Create inner window early in binding process and use it to store current binding callback. --- dlls/mshtml/binding.h | 2 +- dlls/mshtml/htmlwindow.c | 114 ++++++++++++++++++++++++++---------------- dlls/mshtml/mshtml_private.h | 9 ++-- dlls/mshtml/navigate.c | 79 ++++++++++++----------------- dlls/mshtml/nsio.c | 7 ++- dlls/mshtml/persist.c | 10 ++-- 6 files changed, 120 insertions(+), 101 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=25c5082f90e181beb8325…
1
0
0
0
Henri Verbeet : d3d10core: Implement d3d10_texture2d_Map().
by Alexandre Julliard
12 Jul '12
12 Jul '12
Module: wine Branch: master Commit: 7e2999e70f90144cc9147823de917de3f2ddbf9b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7e2999e70f90144cc9147823d…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Jul 12 13:44:23 2012 +0200 d3d10core: Implement d3d10_texture2d_Map(). --- dlls/d3d10core/texture.c | 27 +++++++++++++++++++++++---- 1 files changed, 23 insertions(+), 4 deletions(-) diff --git a/dlls/d3d10core/texture.c b/dlls/d3d10core/texture.c index 5908cd0..718d019 100644 --- a/dlls/d3d10core/texture.c +++ b/dlls/d3d10core/texture.c @@ -150,13 +150,32 @@ static UINT STDMETHODCALLTYPE d3d10_texture2d_GetEvictionPriority(ID3D10Texture2 /* ID3D10Texture2D methods */ -static HRESULT STDMETHODCALLTYPE d3d10_texture2d_Map(ID3D10Texture2D *iface, UINT sub_resource, +static HRESULT STDMETHODCALLTYPE d3d10_texture2d_Map(ID3D10Texture2D *iface, UINT sub_resource_idx, D3D10_MAP map_type, UINT map_flags, D3D10_MAPPED_TEXTURE2D *mapped_texture) { - FIXME("iface %p, sub_resource %u, map_type %u, map_flags %#x, mapped_texture %p stub!\n", - iface, sub_resource, map_type, map_flags, mapped_texture); + struct d3d10_texture2d *texture = impl_from_ID3D10Texture2D(iface); + struct wined3d_map_desc wined3d_map_desc; + struct wined3d_resource *sub_resource; + HRESULT hr; - return E_NOTIMPL; + TRACE("iface %p, sub_resource_idx %u, map_type %u, map_flags %#x, mapped_texture %p.\n", + iface, sub_resource_idx, map_type, map_flags, mapped_texture); + + if (map_type != D3D10_MAP_READ_WRITE) + FIXME("Ignoring map_type %#x.\n", map_type); + if (map_flags) + FIXME("Ignoring map_flags %#x.\n", map_flags); + + if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, sub_resource_idx))) + hr = E_INVALIDARG; + else if (SUCCEEDED(hr = wined3d_surface_map(wined3d_surface_from_resource(sub_resource), + &wined3d_map_desc, NULL, 0))) + { + mapped_texture->pData = wined3d_map_desc.data; + mapped_texture->RowPitch = wined3d_map_desc.row_pitch; + } + + return hr; } static void STDMETHODCALLTYPE d3d10_texture2d_Unmap(ID3D10Texture2D *iface, UINT sub_resource_idx)
1
0
0
0
Henri Verbeet : d3d10core: Implement d3d10_texture2d_Unmap().
by Alexandre Julliard
12 Jul '12
12 Jul '12
Module: wine Branch: master Commit: 21a7b18311e6423ccccfcd8f3f17950000be1206 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=21a7b18311e6423ccccfcd8f3…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Jul 12 13:44:22 2012 +0200 d3d10core: Implement d3d10_texture2d_Unmap(). --- dlls/d3d10core/texture.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dlls/d3d10core/texture.c b/dlls/d3d10core/texture.c index 1126e87..5908cd0 100644 --- a/dlls/d3d10core/texture.c +++ b/dlls/d3d10core/texture.c @@ -159,9 +159,17 @@ static HRESULT STDMETHODCALLTYPE d3d10_texture2d_Map(ID3D10Texture2D *iface, UIN return E_NOTIMPL; } -static void STDMETHODCALLTYPE d3d10_texture2d_Unmap(ID3D10Texture2D *iface, UINT sub_resource) +static void STDMETHODCALLTYPE d3d10_texture2d_Unmap(ID3D10Texture2D *iface, UINT sub_resource_idx) { - FIXME("iface %p, sub_resource %u stub!\n", iface, sub_resource); + struct d3d10_texture2d *texture = impl_from_ID3D10Texture2D(iface); + struct wined3d_resource *sub_resource; + + TRACE("iface %p, sub_resource_idx %u.\n", iface, sub_resource_idx); + + if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, sub_resource_idx))) + return; + + wined3d_surface_unmap(wined3d_surface_from_resource(sub_resource)); } static void STDMETHODCALLTYPE d3d10_texture2d_GetDesc(ID3D10Texture2D *iface, D3D10_TEXTURE2D_DESC *desc)
1
0
0
0
← Newer
1
...
47
48
49
50
51
52
53
...
72
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Results per page:
10
25
50
100
200