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
340643af
Commit
340643af
authored
Jul 13, 2011
by
Rico Schüller
Committed by
Alexandre Julliard
Jul 13, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Parse elements in d3dx9_parse_resource().
parent
9d94b1d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
effect.c
dlls/d3dx9_36/effect.c
+15
-3
No files found.
dlls/d3dx9_36/effect.c
View file @
340643af
...
...
@@ -4737,7 +4737,7 @@ err_out:
static
HRESULT
d3dx9_parse_resource
(
struct
ID3DXBaseEffectImpl
*
base
,
const
char
*
data
,
const
char
**
ptr
)
{
DWORD
technique_index
;
DWORD
index
,
state_index
,
usage
;
DWORD
index
,
state_index
,
usage
,
element_index
;
struct
d3dx_state
*
state
;
struct
d3dx_parameter
*
param
;
HRESULT
hr
=
E_FAIL
;
...
...
@@ -4748,10 +4748,11 @@ static HRESULT d3dx9_parse_resource(struct ID3DXBaseEffectImpl *base, const char
read_dword
(
ptr
,
&
index
);
TRACE
(
"index: %u
\n
"
,
index
);
skip_dword_unknown
(
ptr
,
1
);
read_dword
(
ptr
,
&
element_index
);
TRACE
(
"element_index: %u
\n
"
,
element_index
);
read_dword
(
ptr
,
&
state_index
);
TRACE
(
"state: %u
\n
"
,
state_index
);
TRACE
(
"state
_index
: %u
\n
"
,
state_index
);
read_dword
(
ptr
,
&
usage
);
TRACE
(
"usage: %u
\n
"
,
usage
);
...
...
@@ -4768,6 +4769,17 @@ static HRESULT d3dx9_parse_resource(struct ID3DXBaseEffectImpl *base, const char
}
parameter
=
get_parameter_struct
(
base
->
parameter_handles
[
index
]);
if
(
element_index
!=
0xffffffff
)
{
if
(
element_index
>=
parameter
->
element_count
&&
parameter
->
element_count
!=
0
)
{
FIXME
(
"Index out of bounds: element_index %u >= element_count %u
\n
"
,
element_index
,
parameter
->
element_count
);
return
E_FAIL
;
}
if
(
parameter
->
element_count
!=
0
)
parameter
=
get_parameter_struct
(
parameter
->
member_handles
[
element_index
]);
}
sampler
=
parameter
->
data
;
if
(
state_index
>=
sampler
->
state_count
)
{
...
...
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