Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
76525af7
Commit
76525af7
authored
Sep 21, 2012
by
Matteo Bruni
Committed by
Alexandre Julliard
Sep 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dcompiler: Allow casts to arrays.
parent
1acf5a04
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
3 deletions
+19
-3
hlsl.y
dlls/d3dcompiler_43/hlsl.y
+4
-1
utils.c
dlls/d3dcompiler_43/utils.c
+15
-2
No files found.
dlls/d3dcompiler_43/hlsl.y
View file @
76525af7
...
@@ -1488,7 +1488,10 @@ unary_expr: postfix_expr
...
@@ -1488,7 +1488,10 @@ unary_expr: postfix_expr
return 1;
return 1;
}
}
dst_type = $3;
if ($4)
dst_type = new_array_type($3, $4);
else
dst_type = $3;
if (!compatible_data_types(src_type, dst_type))
if (!compatible_data_types(src_type, dst_type))
{
{
...
...
dlls/d3dcompiler_43/utils.c
View file @
76525af7
...
@@ -854,8 +854,15 @@ struct hlsl_type *new_hlsl_type(const char *name, enum hlsl_type_class type_clas
...
@@ -854,8 +854,15 @@ struct hlsl_type *new_hlsl_type(const char *name, enum hlsl_type_class type_clas
struct
hlsl_type
*
new_array_type
(
struct
hlsl_type
*
basic_type
,
unsigned
int
array_size
)
struct
hlsl_type
*
new_array_type
(
struct
hlsl_type
*
basic_type
,
unsigned
int
array_size
)
{
{
FIXME
(
"stub.
\n
"
);
struct
hlsl_type
*
type
=
new_hlsl_type
(
NULL
,
HLSL_CLASS_ARRAY
,
HLSL_TYPE_FLOAT
,
1
,
1
);
return
NULL
;
if
(
!
type
)
return
NULL
;
type
->
modifiers
=
basic_type
->
modifiers
;
type
->
e
.
array
.
elements_count
=
array_size
;
type
->
e
.
array
.
type
=
basic_type
;
return
type
;
}
}
struct
hlsl_type
*
get_type
(
struct
hlsl_scope
*
scope
,
const
char
*
name
,
BOOL
recursive
)
struct
hlsl_type
*
get_type
(
struct
hlsl_scope
*
scope
,
const
char
*
name
,
BOOL
recursive
)
...
@@ -1791,6 +1798,12 @@ const char *debug_hlsl_type(const struct hlsl_type *type)
...
@@ -1791,6 +1798,12 @@ const char *debug_hlsl_type(const struct hlsl_type *type)
if
(
type
->
type
==
HLSL_CLASS_STRUCT
)
if
(
type
->
type
==
HLSL_CLASS_STRUCT
)
return
"<anonymous struct>"
;
return
"<anonymous struct>"
;
if
(
type
->
type
==
HLSL_CLASS_ARRAY
)
{
name
=
debug_base_type
(
type
->
e
.
array
.
type
);
return
wine_dbg_sprintf
(
"%s[%u]"
,
name
,
type
->
e
.
array
.
elements_count
);
}
name
=
debug_base_type
(
type
);
name
=
debug_base_type
(
type
);
if
(
type
->
type
==
HLSL_CLASS_SCALAR
)
if
(
type
->
type
==
HLSL_CLASS_SCALAR
)
...
...
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