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
ddc948b9
Commit
ddc948b9
authored
Jul 15, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Jul 15, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10: Do all effect object parsing in parse_fx10_object().
parent
2dd1b379
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
effect.c
dlls/d3d10/effect.c
+19
-19
No files found.
dlls/d3d10/effect.c
View file @
ddc948b9
...
@@ -248,43 +248,51 @@ static HRESULT parse_shader(struct d3d10_effect_object *o, const char *data)
...
@@ -248,43 +248,51 @@ static HRESULT parse_shader(struct d3d10_effect_object *o, const char *data)
return
parse_dxbc
(
ptr
,
dxbc_size
,
shader_chunk_handler
,
s
);
return
parse_dxbc
(
ptr
,
dxbc_size
,
shader_chunk_handler
,
s
);
}
}
static
HRESULT
parse_fx10_object
(
struct
d3d10_effect_object
*
o
,
const
char
*
data
)
static
HRESULT
parse_fx10_object
(
struct
d3d10_effect_object
*
o
,
const
char
*
*
ptr
,
const
char
*
data
)
{
{
const
char
*
ptr
;
const
char
*
data_
ptr
;
DWORD
offset
;
DWORD
offset
;
HRESULT
hr
;
HRESULT
hr
;
ptr
=
data
+
o
->
idx_offset
;
read_dword
(
ptr
,
&
o
->
type
);
read_dword
(
&
ptr
,
&
offset
);
TRACE
(
"Effect object is of type %#x.
\n
"
,
o
->
type
);
skip_dword_unknown
(
ptr
,
2
);
read_dword
(
ptr
,
&
offset
);
TRACE
(
"Effect object idx is at offset %#x.
\n
"
,
offset
);
data_ptr
=
data
+
offset
;
read_dword
(
&
data_ptr
,
&
offset
);
TRACE
(
"Effect object
of type %#x starts at offset %#x.
\n
"
,
o
->
type
,
offset
);
TRACE
(
"Effect object
starts at offset %#x.
\n
"
,
offset
);
/* FIXME: This probably isn't completely correct. */
/* FIXME: This probably isn't completely correct. */
if
(
offset
==
1
)
if
(
offset
==
1
)
{
{
WARN
(
"Skipping effect object.
\n
"
);
WARN
(
"Skipping effect object.
\n
"
);
ptr
=
NULL
;
data_
ptr
=
NULL
;
}
}
else
else
{
{
ptr
=
data
+
offset
;
data_
ptr
=
data
+
offset
;
}
}
switch
(
o
->
type
)
switch
(
o
->
type
)
{
{
case
D3D10_EOT_VERTEXSHADER
:
case
D3D10_EOT_VERTEXSHADER
:
TRACE
(
"Vertex shader
\n
"
);
TRACE
(
"Vertex shader
\n
"
);
hr
=
parse_shader
(
o
,
ptr
);
hr
=
parse_shader
(
o
,
data_
ptr
);
break
;
break
;
case
D3D10_EOT_PIXELSHADER
:
case
D3D10_EOT_PIXELSHADER
:
TRACE
(
"Pixel shader
\n
"
);
TRACE
(
"Pixel shader
\n
"
);
hr
=
parse_shader
(
o
,
ptr
);
hr
=
parse_shader
(
o
,
data_
ptr
);
break
;
break
;
case
D3D10_EOT_GEOMETRYSHADER
:
case
D3D10_EOT_GEOMETRYSHADER
:
TRACE
(
"Geometry shader
\n
"
);
TRACE
(
"Geometry shader
\n
"
);
hr
=
parse_shader
(
o
,
ptr
);
hr
=
parse_shader
(
o
,
data_
ptr
);
break
;
break
;
default:
default:
...
@@ -331,15 +339,7 @@ static HRESULT parse_fx10_pass(struct d3d10_effect_pass *p, const char **ptr, co
...
@@ -331,15 +339,7 @@ static HRESULT parse_fx10_pass(struct d3d10_effect_pass *p, const char **ptr, co
o
->
pass
=
p
;
o
->
pass
=
p
;
read_dword
(
ptr
,
&
o
->
type
);
hr
=
parse_fx10_object
(
o
,
ptr
,
data
);
TRACE
(
"Effect object %u is of type %#x.
\n
"
,
i
,
o
->
type
);
skip_dword_unknown
(
ptr
,
2
);
read_dword
(
ptr
,
&
o
->
idx_offset
);
TRACE
(
"Effect object %u idx is at offset %#x.
\n
"
,
i
,
o
->
idx_offset
);
hr
=
parse_fx10_object
(
o
,
data
);
if
(
FAILED
(
hr
))
return
hr
;
if
(
FAILED
(
hr
))
return
hr
;
}
}
...
...
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