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
e7021c6a
Commit
e7021c6a
authored
Apr 17, 2016
by
Matteo Bruni
Committed by
Alexandre Julliard
Apr 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Don't complain when overwriting effect object id 0.
Signed-off-by:
Matteo Bruni
<
mbruni@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a6745afc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
effect.c
dlls/d3dx9_36/effect.c
+14
-7
No files found.
dlls/d3dx9_36/effect.c
View file @
e7021c6a
...
...
@@ -4764,10 +4764,17 @@ static HRESULT d3dx9_parse_name(char **name, const char *ptr)
return
D3D_OK
;
}
static
HRESULT
d3dx9_copy_data
(
struct
d3dx
_object
*
object
,
const
char
**
ptr
)
static
HRESULT
d3dx9_copy_data
(
struct
d3dx
9_base_effect
*
base
,
unsigned
int
object_id
,
const
char
**
ptr
)
{
struct
d3dx_object
*
object
=
&
base
->
objects
[
object_id
];
if
(
object
->
size
||
object
->
data
)
FIXME
(
"Object already initialized!
\n
"
);
{
if
(
object_id
)
FIXME
(
"Overwriting object id %u!
\n
"
,
object_id
);
else
TRACE
(
"Overwriting object id 0.
\n
"
);
}
read_dword
(
ptr
,
&
object
->
size
);
TRACE
(
"Data size: %#x
\n
"
,
object
->
size
);
...
...
@@ -5570,7 +5577,7 @@ static HRESULT d3dx9_parse_resource(struct d3dx9_base_effect *base, const char *
case
D3DXPT_VERTEXSHADER
:
case
D3DXPT_PIXELSHADER
:
state
->
type
=
ST_CONSTANT
;
if
(
FAILED
(
hr
=
d3dx9_copy_data
(
&
base
->
objects
[
param
->
object_id
]
,
ptr
)))
if
(
FAILED
(
hr
=
d3dx9_copy_data
(
base
,
param
->
object_id
,
ptr
)))
return
hr
;
if
(
object
->
data
)
...
...
@@ -5586,7 +5593,7 @@ static HRESULT d3dx9_parse_resource(struct d3dx9_base_effect *base, const char *
case
D3DXPT_FLOAT
:
case
D3DXPT_STRING
:
state
->
type
=
ST_FXLC
;
if
(
FAILED
(
hr
=
d3dx9_copy_data
(
&
base
->
objects
[
param
->
object_id
]
,
ptr
)))
if
(
FAILED
(
hr
=
d3dx9_copy_data
(
base
,
param
->
object_id
,
ptr
)))
return
hr
;
d3dx_create_param_eval
(
base
,
object
->
data
,
object
->
size
,
param
->
type
,
&
param
->
param_eval
);
break
;
...
...
@@ -5599,7 +5606,7 @@ static HRESULT d3dx9_parse_resource(struct d3dx9_base_effect *base, const char *
case
1
:
state
->
type
=
ST_PARAMETER
;
if
(
FAILED
(
hr
=
d3dx9_copy_data
(
&
base
->
objects
[
param
->
object_id
]
,
ptr
)))
if
(
FAILED
(
hr
=
d3dx9_copy_data
(
base
,
param
->
object_id
,
ptr
)))
return
hr
;
TRACE
(
"Looking for parameter %s.
\n
"
,
debugstr_a
(
object
->
data
));
...
...
@@ -5627,7 +5634,7 @@ static HRESULT d3dx9_parse_resource(struct d3dx9_base_effect *base, const char *
case
2
:
state
->
type
=
ST_ARRAY_SELECTOR
;
if
(
FAILED
(
hr
=
d3dx9_copy_data
(
object
,
ptr
)))
if
(
FAILED
(
hr
=
d3dx9_copy_data
(
base
,
param
->
object_id
,
ptr
)))
return
hr
;
hr
=
d3dx9_parse_array_selector
(
base
,
param
);
break
;
...
...
@@ -5727,7 +5734,7 @@ static HRESULT d3dx9_parse_effect(struct d3dx9_base_effect *base, const char *da
read_dword
(
&
ptr
,
&
id
);
TRACE
(
"Id: %u
\n
"
,
id
);
if
(
FAILED
(
hr
=
d3dx9_copy_data
(
&
base
->
objects
[
id
]
,
&
ptr
)))
if
(
FAILED
(
hr
=
d3dx9_copy_data
(
base
,
id
,
&
ptr
)))
goto
err_out
;
if
(
base
->
objects
[
id
].
data
)
...
...
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