Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
7ebab8c4
Commit
7ebab8c4
authored
Jul 16, 2012
by
Matteo Bruni
Committed by
Alexandre Julliard
Jul 17, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dcompiler: Pass the complete location to add_func_parameter().
parent
be350b0b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
8 deletions
+14
-8
d3dcompiler_private.h
dlls/d3dcompiler_43/d3dcompiler_private.h
+2
-1
hlsl.y
dlls/d3dcompiler_43/hlsl.y
+10
-5
utils.c
dlls/d3dcompiler_43/utils.c
+2
-2
No files found.
dlls/d3dcompiler_43/d3dcompiler_private.h
View file @
7ebab8c4
...
...
@@ -882,7 +882,8 @@ static inline struct hlsl_ir_constructor *constructor_from_node(const struct hls
BOOL
add_declaration
(
struct
hlsl_scope
*
scope
,
struct
hlsl_ir_var
*
decl
,
BOOL
local_var
)
DECLSPEC_HIDDEN
;
struct
hlsl_ir_var
*
get_variable
(
struct
hlsl_scope
*
scope
,
const
char
*
name
)
DECLSPEC_HIDDEN
;
void
free_declaration
(
struct
hlsl_ir_var
*
decl
)
DECLSPEC_HIDDEN
;
BOOL
add_func_parameter
(
struct
list
*
list
,
struct
parse_parameter
*
param
,
unsigned
int
line
)
DECLSPEC_HIDDEN
;
BOOL
add_func_parameter
(
struct
list
*
list
,
struct
parse_parameter
*
param
,
const
struct
source_location
*
loc
)
DECLSPEC_HIDDEN
;
struct
hlsl_type
*
new_hlsl_type
(
const
char
*
name
,
enum
hlsl_type_class
type_class
,
enum
hlsl_base_type
base_type
,
unsigned
dimx
,
unsigned
dimy
)
DECLSPEC_HIDDEN
;
struct
hlsl_type
*
new_array_type
(
struct
hlsl_type
*
basic_type
,
unsigned
int
array_size
)
DECLSPEC_HIDDEN
;
...
...
dlls/d3dcompiler_43/hlsl.y
View file @
7ebab8c4
...
...
@@ -430,9 +430,12 @@ parameters: scope_start
param_list: parameter
{
struct source_location loc;
$$ = d3dcompiler_alloc(sizeof(*$$));
list_init($$);
if (!add_func_parameter($$, &$1, hlsl_ctx.line_no))
set_location(&loc, &@1);
if (!add_func_parameter($$, &$1, &loc))
{
ERR("Error adding function parameter %s.\n", $1.name);
set_parse_status(&hlsl_ctx.status, PARSE_ERR);
...
...
@@ -441,12 +444,14 @@ param_list: parameter
}
| param_list ',' parameter
{
struct source_location loc;
$$ = $1;
if (!add_func_parameter($$, &$3, hlsl_ctx.line_no))
set_location(&loc, &@3);
if (!add_func_parameter($$, &$3, &loc))
{
hlsl_message("Line %u: duplicate parameter %s.\n",
hlsl_ctx.line_no, $3.name);
set_parse_status(&hlsl_ctx.status, PARSE_ERR);
hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR,
"duplicate parameter %s", $3.name);
return 1;
}
}
...
...
dlls/d3dcompiler_43/utils.c
View file @
7ebab8c4
...
...
@@ -805,7 +805,7 @@ void free_declaration(struct hlsl_ir_var *decl)
d3dcompiler_free
(
decl
);
}
BOOL
add_func_parameter
(
struct
list
*
list
,
struct
parse_parameter
*
param
,
unsigned
int
line
)
BOOL
add_func_parameter
(
struct
list
*
list
,
struct
parse_parameter
*
param
,
const
struct
source_location
*
loc
)
{
struct
hlsl_ir_var
*
decl
=
d3dcompiler_alloc
(
sizeof
(
*
decl
));
...
...
@@ -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
.
loc
.
line
=
line
;
decl
->
node
.
loc
=
*
loc
;
decl
->
name
=
param
->
name
;
decl
->
semantic
=
param
->
semantic
;
decl
->
modifiers
=
param
->
modifiers
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment