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
57a7479f
Commit
57a7479f
authored
Jul 18, 2012
by
Matteo Bruni
Committed by
Alexandre Julliard
Jul 18, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dcompiler: Parse multiplicative expressions.
parent
7293c1c0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
0 deletions
+66
-0
d3dcompiler_private.h
dlls/d3dcompiler_43/d3dcompiler_private.h
+6
-0
hlsl.y
dlls/d3dcompiler_43/hlsl.y
+21
-0
utils.c
dlls/d3dcompiler_43/utils.c
+39
-0
No files found.
dlls/d3dcompiler_43/d3dcompiler_private.h
View file @
57a7479f
...
...
@@ -974,6 +974,12 @@ BOOL find_function(const char *name) DECLSPEC_HIDDEN;
unsigned
int
components_count_type
(
struct
hlsl_type
*
type
)
DECLSPEC_HIDDEN
;
struct
hlsl_ir_expr
*
new_expr
(
enum
hlsl_ir_expr_op
op
,
struct
hlsl_ir_node
**
operands
,
struct
source_location
*
loc
)
DECLSPEC_HIDDEN
;
struct
hlsl_ir_expr
*
hlsl_mul
(
struct
hlsl_ir_node
*
op1
,
struct
hlsl_ir_node
*
op2
,
struct
source_location
*
loc
)
DECLSPEC_HIDDEN
;
struct
hlsl_ir_expr
*
hlsl_div
(
struct
hlsl_ir_node
*
op1
,
struct
hlsl_ir_node
*
op2
,
struct
source_location
*
loc
)
DECLSPEC_HIDDEN
;
struct
hlsl_ir_expr
*
hlsl_mod
(
struct
hlsl_ir_node
*
op1
,
struct
hlsl_ir_node
*
op2
,
struct
source_location
*
loc
)
DECLSPEC_HIDDEN
;
struct
hlsl_ir_expr
*
hlsl_add
(
struct
hlsl_ir_node
*
op1
,
struct
hlsl_ir_node
*
op2
,
struct
source_location
*
loc
)
DECLSPEC_HIDDEN
;
struct
hlsl_ir_expr
*
hlsl_sub
(
struct
hlsl_ir_node
*
op1
,
struct
hlsl_ir_node
*
op2
,
...
...
dlls/d3dcompiler_43/hlsl.y
View file @
57a7479f
...
...
@@ -967,6 +967,27 @@ mul_expr: unary_expr
{
$$ = $1;
}
| mul_expr '*' unary_expr
{
struct source_location loc;
set_location(&loc, &@2);
$$ = &hlsl_mul($1, $3, &loc)->node;
}
| mul_expr '/' unary_expr
{
struct source_location loc;
set_location(&loc, &@2);
$$ = &hlsl_div($1, $3, &loc)->node;
}
| mul_expr '%' unary_expr
{
struct source_location loc;
set_location(&loc, &@2);
$$ = &hlsl_mod($1, $3, &loc)->node;
}
add_expr: mul_expr
{
...
...
dlls/d3dcompiler_43/utils.c
View file @
57a7479f
...
...
@@ -1181,6 +1181,45 @@ struct hlsl_ir_expr *new_expr(enum hlsl_ir_expr_op op, struct hlsl_ir_node **ope
return
expr
;
}
struct
hlsl_ir_expr
*
hlsl_mul
(
struct
hlsl_ir_node
*
op1
,
struct
hlsl_ir_node
*
op2
,
struct
source_location
*
loc
)
{
struct
hlsl_ir_expr
*
expr
;
struct
hlsl_ir_node
*
ops
[
3
];
ops
[
0
]
=
op1
;
ops
[
1
]
=
op2
;
ops
[
2
]
=
NULL
;
expr
=
new_expr
(
HLSL_IR_BINOP_MUL
,
ops
,
loc
);
return
expr
;
}
struct
hlsl_ir_expr
*
hlsl_div
(
struct
hlsl_ir_node
*
op1
,
struct
hlsl_ir_node
*
op2
,
struct
source_location
*
loc
)
{
struct
hlsl_ir_expr
*
expr
;
struct
hlsl_ir_node
*
ops
[
3
];
ops
[
0
]
=
op1
;
ops
[
1
]
=
op2
;
ops
[
2
]
=
NULL
;
expr
=
new_expr
(
HLSL_IR_BINOP_DIV
,
ops
,
loc
);
return
expr
;
}
struct
hlsl_ir_expr
*
hlsl_mod
(
struct
hlsl_ir_node
*
op1
,
struct
hlsl_ir_node
*
op2
,
struct
source_location
*
loc
)
{
struct
hlsl_ir_expr
*
expr
;
struct
hlsl_ir_node
*
ops
[
3
];
ops
[
0
]
=
op1
;
ops
[
1
]
=
op2
;
ops
[
2
]
=
NULL
;
expr
=
new_expr
(
HLSL_IR_BINOP_MOD
,
ops
,
loc
);
return
expr
;
}
struct
hlsl_ir_expr
*
hlsl_add
(
struct
hlsl_ir_node
*
op1
,
struct
hlsl_ir_node
*
op2
,
struct
source_location
*
loc
)
{
...
...
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