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
033eb8d7
Commit
033eb8d7
authored
Aug 20, 2009
by
Rico Schüller
Committed by
Alexandre Julliard
Aug 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10: Add annotation skipping.
parent
174d5c1e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
4 deletions
+34
-4
d3d10_private.h
dlls/d3d10/d3d10_private.h
+4
-0
effect.c
dlls/d3d10/effect.c
+30
-4
No files found.
dlls/d3d10/d3d10_private.h
View file @
033eb8d7
...
@@ -65,6 +65,7 @@ struct d3d10_effect_variable
...
@@ -65,6 +65,7 @@ struct d3d10_effect_variable
char
*
name
;
char
*
name
;
DWORD
buffer_offset
;
DWORD
buffer_offset
;
DWORD
annotation_count
;
};
};
struct
d3d10_effect_local_buffer
struct
d3d10_effect_local_buffer
...
@@ -72,6 +73,7 @@ struct d3d10_effect_local_buffer
...
@@ -72,6 +73,7 @@ struct d3d10_effect_local_buffer
char
*
name
;
char
*
name
;
DWORD
data_size
;
DWORD
data_size
;
DWORD
variable_count
;
DWORD
variable_count
;
DWORD
annotation_count
;
struct
d3d10_effect_variable
*
variables
;
struct
d3d10_effect_variable
*
variables
;
};
};
...
@@ -84,6 +86,7 @@ struct d3d10_effect_pass
...
@@ -84,6 +86,7 @@ struct d3d10_effect_pass
char
*
name
;
char
*
name
;
DWORD
start
;
DWORD
start
;
DWORD
object_count
;
DWORD
object_count
;
DWORD
annotation_count
;
struct
d3d10_effect_object
*
objects
;
struct
d3d10_effect_object
*
objects
;
};
};
...
@@ -95,6 +98,7 @@ struct d3d10_effect_technique
...
@@ -95,6 +98,7 @@ struct d3d10_effect_technique
struct
d3d10_effect
*
effect
;
struct
d3d10_effect
*
effect
;
char
*
name
;
char
*
name
;
DWORD
pass_count
;
DWORD
pass_count
;
DWORD
annotation_count
;
struct
d3d10_effect_pass
*
passes
;
struct
d3d10_effect_pass
*
passes
;
};
};
...
...
dlls/d3d10/effect.c
View file @
033eb8d7
...
@@ -249,6 +249,11 @@ static HRESULT parse_shader(struct d3d10_effect_object *o, const char *data)
...
@@ -249,6 +249,11 @@ 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
void
parse_fx10_annotation
(
const
char
**
ptr
)
{
skip_dword_unknown
(
ptr
,
3
);
}
static
HRESULT
parse_fx10_object
(
struct
d3d10_effect_object
*
o
,
const
char
**
ptr
,
const
char
*
data
)
static
HRESULT
parse_fx10_object
(
struct
d3d10_effect_object
*
o
,
const
char
**
ptr
,
const
char
*
data
)
{
{
const
char
*
data_ptr
;
const
char
*
data_ptr
;
...
@@ -325,7 +330,11 @@ static HRESULT parse_fx10_pass(struct d3d10_effect_pass *p, const char **ptr, co
...
@@ -325,7 +330,11 @@ static HRESULT parse_fx10_pass(struct d3d10_effect_pass *p, const char **ptr, co
read_dword
(
ptr
,
&
p
->
object_count
);
read_dword
(
ptr
,
&
p
->
object_count
);
TRACE
(
"Pass has %u effect objects.
\n
"
,
p
->
object_count
);
TRACE
(
"Pass has %u effect objects.
\n
"
,
p
->
object_count
);
skip_dword_unknown
(
ptr
,
1
);
read_dword
(
ptr
,
&
p
->
annotation_count
);
for
(
i
=
0
;
i
<
p
->
annotation_count
;
++
i
)
{
parse_fx10_annotation
(
ptr
);
}
p
->
objects
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
p
->
object_count
*
sizeof
(
*
p
->
objects
));
p
->
objects
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
p
->
object_count
*
sizeof
(
*
p
->
objects
));
if
(
!
p
->
objects
)
if
(
!
p
->
objects
)
...
@@ -366,7 +375,11 @@ static HRESULT parse_fx10_technique(struct d3d10_effect_technique *t, const char
...
@@ -366,7 +375,11 @@ static HRESULT parse_fx10_technique(struct d3d10_effect_technique *t, const char
read_dword
(
ptr
,
&
t
->
pass_count
);
read_dword
(
ptr
,
&
t
->
pass_count
);
TRACE
(
"Technique has %u passes
\n
"
,
t
->
pass_count
);
TRACE
(
"Technique has %u passes
\n
"
,
t
->
pass_count
);
skip_dword_unknown
(
ptr
,
1
);
read_dword
(
ptr
,
&
t
->
annotation_count
);
for
(
i
=
0
;
i
<
t
->
annotation_count
;
++
i
)
{
parse_fx10_annotation
(
ptr
);
}
t
->
passes
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
t
->
pass_count
*
sizeof
(
*
t
->
passes
));
t
->
passes
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
t
->
pass_count
*
sizeof
(
*
t
->
passes
));
if
(
!
t
->
passes
)
if
(
!
t
->
passes
)
...
@@ -393,6 +406,7 @@ static HRESULT parse_fx10_technique(struct d3d10_effect_technique *t, const char
...
@@ -393,6 +406,7 @@ static HRESULT parse_fx10_technique(struct d3d10_effect_technique *t, const char
static
HRESULT
parse_fx10_variable
(
struct
d3d10_effect_variable
*
v
,
const
char
**
ptr
,
const
char
*
data
)
static
HRESULT
parse_fx10_variable
(
struct
d3d10_effect_variable
*
v
,
const
char
**
ptr
,
const
char
*
data
)
{
{
DWORD
offset
;
DWORD
offset
;
unsigned
int
i
;
read_dword
(
ptr
,
&
offset
);
read_dword
(
ptr
,
&
offset
);
TRACE
(
"Variable name at offset %#x.
\n
"
,
offset
);
TRACE
(
"Variable name at offset %#x.
\n
"
,
offset
);
...
@@ -413,7 +427,13 @@ static HRESULT parse_fx10_variable(struct d3d10_effect_variable *v, const char *
...
@@ -413,7 +427,13 @@ static HRESULT parse_fx10_variable(struct d3d10_effect_variable *v, const char *
read_dword
(
ptr
,
&
v
->
buffer_offset
);
read_dword
(
ptr
,
&
v
->
buffer_offset
);
TRACE
(
"Variable offset in buffer: %#x.
\n
"
,
v
->
buffer_offset
);
TRACE
(
"Variable offset in buffer: %#x.
\n
"
,
v
->
buffer_offset
);
skip_dword_unknown
(
ptr
,
3
);
skip_dword_unknown
(
ptr
,
2
);
read_dword
(
ptr
,
&
v
->
annotation_count
);
for
(
i
=
0
;
i
<
v
->
annotation_count
;
++
i
)
{
parse_fx10_annotation
(
ptr
);
}
return
S_OK
;
return
S_OK
;
}
}
...
@@ -442,7 +462,13 @@ static HRESULT parse_fx10_local_buffer(struct d3d10_effect_local_buffer *l, cons
...
@@ -442,7 +462,13 @@ static HRESULT parse_fx10_local_buffer(struct d3d10_effect_local_buffer *l, cons
read_dword
(
ptr
,
&
l
->
variable_count
);
read_dword
(
ptr
,
&
l
->
variable_count
);
TRACE
(
"Local buffer variable count: %#x.
\n
"
,
l
->
variable_count
);
TRACE
(
"Local buffer variable count: %#x.
\n
"
,
l
->
variable_count
);
skip_dword_unknown
(
ptr
,
2
);
skip_dword_unknown
(
ptr
,
1
);
read_dword
(
ptr
,
&
l
->
annotation_count
);
for
(
i
=
0
;
i
<
l
->
annotation_count
;
++
i
)
{
parse_fx10_annotation
(
ptr
);
}
l
->
variables
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
l
->
variable_count
*
sizeof
(
*
l
->
variables
));
l
->
variables
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
l
->
variable_count
*
sizeof
(
*
l
->
variables
));
if
(
!
l
->
variables
)
if
(
!
l
->
variables
)
...
...
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