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
e4a0ef69
Commit
e4a0ef69
authored
Apr 11, 2011
by
Rico Schüller
Committed by
Alexandre Julliard
Apr 12, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Parse effect type D3DXPC_STRUCT.
parent
20dc9729
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
2 deletions
+52
-2
effect.c
dlls/d3dx9_36/effect.c
+52
-2
No files found.
dlls/d3dx9_36/effect.c
View file @
e4a0ef69
...
@@ -132,7 +132,12 @@ static void free_parameter(D3DXHANDLE handle)
...
@@ -132,7 +132,12 @@ static void free_parameter(D3DXHANDLE handle)
if
(
param
->
member_handles
)
if
(
param
->
member_handles
)
{
{
for
(
i
=
0
;
i
<
param
->
element_count
;
++
i
)
unsigned
int
count
;
if
(
param
->
element_count
)
count
=
param
->
element_count
;
else
count
=
param
->
member_count
;
for
(
i
=
0
;
i
<
count
;
++
i
)
{
{
free_parameter
(
param
->
member_handles
[
i
]);
free_parameter
(
param
->
member_handles
[
i
]);
}
}
...
@@ -2444,6 +2449,11 @@ static HRESULT d3dx9_parse_effect_typedef(struct d3dx_parameter *param, const ch
...
@@ -2444,6 +2449,11 @@ static HRESULT d3dx9_parse_effect_typedef(struct d3dx_parameter *param, const ch
param
->
bytes
=
4
*
param
->
rows
*
param
->
columns
;
param
->
bytes
=
4
*
param
->
rows
*
param
->
columns
;
break
;
break
;
case
D3DXPC_STRUCT
:
read_dword
(
ptr
,
&
param
->
member_count
);
TRACE
(
"Members: %u
\n
"
,
param
->
member_count
);
break
;
default:
default:
FIXME
(
"Unhandled class %s
\n
"
,
debug_d3dxparameter_class
(
param
->
class
));
FIXME
(
"Unhandled class %s
\n
"
,
debug_d3dxparameter_class
(
param
->
class
));
break
;
break
;
...
@@ -2502,6 +2512,41 @@ static HRESULT d3dx9_parse_effect_typedef(struct d3dx_parameter *param, const ch
...
@@ -2502,6 +2512,41 @@ static HRESULT d3dx9_parse_effect_typedef(struct d3dx_parameter *param, const ch
param
->
bytes
=
param_bytes
;
param
->
bytes
=
param_bytes
;
}
}
else
if
(
param
->
member_count
)
{
member_handles
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
member_handles
)
*
param
->
member_count
);
if
(
!
member_handles
)
{
ERR
(
"Out of memory
\n
"
);
hr
=
E_OUTOFMEMORY
;
goto
err_out
;
}
for
(
i
=
0
;
i
<
param
->
member_count
;
++
i
)
{
struct
d3dx_parameter
*
member
;
member
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
member
));
if
(
!
member
)
{
ERR
(
"Out of memory
\n
"
);
hr
=
E_OUTOFMEMORY
;
goto
err_out
;
}
member_handles
[
i
]
=
get_parameter_handle
(
member
);
member
->
base
=
param
->
base
;
hr
=
d3dx9_parse_effect_typedef
(
member
,
data
,
ptr
,
NULL
);
if
(
hr
!=
D3D_OK
)
{
WARN
(
"Failed to parse member
\n
"
);
goto
err_out
;
}
param
->
bytes
+=
member
->
bytes
;
}
}
param
->
member_handles
=
member_handles
;
param
->
member_handles
=
member_handles
;
...
@@ -2511,7 +2556,12 @@ err_out:
...
@@ -2511,7 +2556,12 @@ err_out:
if
(
member_handles
)
if
(
member_handles
)
{
{
for
(
i
=
0
;
i
<
param
->
element_count
;
++
i
)
unsigned
int
count
;
if
(
param
->
element_count
)
count
=
param
->
element_count
;
else
count
=
param
->
member_count
;
for
(
i
=
0
;
i
<
count
;
++
i
)
{
{
free_parameter
(
member_handles
[
i
]);
free_parameter
(
member_handles
[
i
]);
}
}
...
...
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