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
bd4bacba
Commit
bd4bacba
authored
Apr 07, 2010
by
Rico Schüller
Committed by
Alexandre Julliard
Apr 08, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10: Move the effect shader input signature into a separate struct.
parent
ce409fe6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
10 deletions
+16
-10
d3d10_private.h
dlls/d3d10/d3d10_private.h
+7
-2
effect.c
dlls/d3d10/effect.c
+9
-8
No files found.
dlls/d3d10/d3d10_private.h
View file @
bd4bacba
...
...
@@ -62,10 +62,15 @@ struct d3d10_effect_object
void
*
data
;
};
struct
d3d10_effect_shader_signature
{
char
*
signature
;
UINT
signature_size
;
};
struct
d3d10_effect_shader_variable
{
char
*
input_signature
;
UINT
input_signature_size
;
struct
d3d10_effect_shader_signature
input_signature
;
union
{
ID3D10VertexShader
*
vs
;
...
...
dlls/d3d10/effect.c
View file @
bd4bacba
...
...
@@ -237,17 +237,18 @@ static HRESULT shader_chunk_handler(const char *data, DWORD data_size, DWORD tag
{
/* 32 (DXBC header) + 1 * 4 (chunk index) + 2 * 4 (chunk header) + data_size (chunk data) */
UINT
size
=
44
+
data_size
;
struct
d3d10_effect_shader_signature
*
sig
=
&
s
->
input_signature
;
char
*
ptr
;
s
->
input_
signature
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
size
);
if
(
!
s
->
input_
signature
)
s
ig
->
signature
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
size
);
if
(
!
s
ig
->
signature
)
{
ERR
(
"Failed to allocate input signature data
\n
"
);
return
E_OUTOFMEMORY
;
}
s
->
input_
signature_size
=
size
;
s
ig
->
signature_size
=
size
;
ptr
=
s
->
input_
signature
;
ptr
=
s
ig
->
signature
;
write_dword
(
&
ptr
,
TAG_DXBC
);
...
...
@@ -267,7 +268,7 @@ static HRESULT shader_chunk_handler(const char *data, DWORD data_size, DWORD tag
write_dword
(
&
ptr
,
1
);
/* chunk index */
write_dword
(
&
ptr
,
(
ptr
-
s
->
input_
signature
)
+
4
);
write_dword
(
&
ptr
,
(
ptr
-
s
ig
->
signature
)
+
4
);
/* chunk */
write_dword
(
&
ptr
,
TAG_ISGN
);
...
...
@@ -1784,7 +1785,7 @@ static void d3d10_effect_variable_destroy(struct d3d10_effect_variable *v)
case
D3D10_SVT_VERTEXSHADER
:
case
D3D10_SVT_PIXELSHADER
:
case
D3D10_SVT_GEOMETRYSHADER
:
HeapFree
(
GetProcessHeap
(),
0
,
((
struct
d3d10_effect_shader_variable
*
)
v
->
data
)
->
input_signature
);
HeapFree
(
GetProcessHeap
(),
0
,
((
struct
d3d10_effect_shader_variable
*
)
v
->
data
)
->
input_signature
.
signature
);
break
;
default:
...
...
@@ -2387,8 +2388,8 @@ static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_GetDesc(ID3D10EffectPass *ifa
{
struct
d3d10_effect_variable
*
v
=
o
->
data
;
struct
d3d10_effect_shader_variable
*
s
=
v
->
data
;
desc
->
pIAInputSignature
=
(
BYTE
*
)
s
->
input_signature
;
desc
->
IAInputSignatureSize
=
s
->
input_signature_size
;
desc
->
pIAInputSignature
=
(
BYTE
*
)
s
->
input_signature
.
signature
;
desc
->
IAInputSignatureSize
=
s
->
input_signature
.
signature
_size
;
break
;
}
}
...
...
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