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
c3771434
Commit
c3771434
authored
May 02, 2014
by
Matteo Bruni
Committed by
Alexandre Julliard
May 02, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dcompiler: add_func_parameter is only used in hlsl.y.
parent
d25486fb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
27 deletions
+25
-27
d3dcompiler_private.h
dlls/d3dcompiler_43/d3dcompiler_private.h
+0
-2
hlsl.y
dlls/d3dcompiler_43/hlsl.y
+25
-0
utils.c
dlls/d3dcompiler_43/utils.c
+0
-25
No files found.
dlls/d3dcompiler_43/d3dcompiler_private.h
View file @
c3771434
...
...
@@ -1106,8 +1106,6 @@ static inline struct hlsl_ir_loop *loop_from_node(const struct hlsl_ir_node *nod
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
,
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 @
c3771434
...
...
@@ -808,6 +808,31 @@ static BOOL add_typedef(DWORD modifiers, struct hlsl_type *orig_type, struct lis
return TRUE;
}
static 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));
if (!decl)
{
ERR("Out of memory.\n");
return FALSE;
}
decl->node.type = HLSL_IR_VAR;
decl->node.data_type = param->type;
decl->node.loc = *loc;
decl->name = param->name;
decl->semantic = param->semantic;
decl->modifiers = param->modifiers;
if (!add_declaration(hlsl_ctx.cur_scope, decl, FALSE))
{
free_declaration(decl);
return FALSE;
}
list_add_tail(list, &decl->node.entry);
return TRUE;
}
static const struct hlsl_ir_function_decl *get_overloaded_func(struct wine_rb_tree *funcs, char *name,
struct list *params, BOOL exact_signature)
{
...
...
dlls/d3dcompiler_43/utils.c
View file @
c3771434
...
...
@@ -805,31 +805,6 @@ void free_declaration(struct hlsl_ir_var *decl)
d3dcompiler_free
(
decl
);
}
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
));
if
(
!
decl
)
{
ERR
(
"Out of memory.
\n
"
);
return
FALSE
;
}
decl
->
node
.
type
=
HLSL_IR_VAR
;
decl
->
node
.
data_type
=
param
->
type
;
decl
->
node
.
loc
=
*
loc
;
decl
->
name
=
param
->
name
;
decl
->
semantic
=
param
->
semantic
;
decl
->
modifiers
=
param
->
modifiers
;
if
(
!
add_declaration
(
hlsl_ctx
.
cur_scope
,
decl
,
FALSE
))
{
free_declaration
(
decl
);
return
FALSE
;
}
list_add_tail
(
list
,
&
decl
->
node
.
entry
);
return
TRUE
;
}
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
)
{
...
...
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