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
2b17e291
Commit
2b17e291
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: Implement ID3DEffectVariable::GetOutputSignatureElementDesc().
parent
055a0f0d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
4 deletions
+57
-4
d3d10_private.h
dlls/d3d10/d3d10_private.h
+1
-0
effect.c
dlls/d3d10/effect.c
+56
-4
No files found.
dlls/d3d10/d3d10_private.h
View file @
2b17e291
...
@@ -80,6 +80,7 @@ struct d3d10_effect_shader_signature
...
@@ -80,6 +80,7 @@ struct d3d10_effect_shader_signature
struct
d3d10_effect_shader_variable
struct
d3d10_effect_shader_variable
{
{
struct
d3d10_effect_shader_signature
input_signature
;
struct
d3d10_effect_shader_signature
input_signature
;
struct
d3d10_effect_shader_signature
output_signature
;
union
union
{
{
ID3D10VertexShader
*
vs
;
ID3D10VertexShader
*
vs
;
...
...
dlls/d3d10/effect.c
View file @
2b17e291
...
@@ -31,6 +31,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d10);
...
@@ -31,6 +31,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d10);
#define TAG_DXBC MAKE_TAG('D', 'X', 'B', 'C')
#define TAG_DXBC MAKE_TAG('D', 'X', 'B', 'C')
#define TAG_FX10 MAKE_TAG('F', 'X', '1', '0')
#define TAG_FX10 MAKE_TAG('F', 'X', '1', '0')
#define TAG_ISGN MAKE_TAG('I', 'S', 'G', 'N')
#define TAG_ISGN MAKE_TAG('I', 'S', 'G', 'N')
#define TAG_OSGN MAKE_TAG('O', 'S', 'G', 'N')
#define D3D10_FX10_TYPE_COLUMN_SHIFT 11
#define D3D10_FX10_TYPE_COLUMN_SHIFT 11
#define D3D10_FX10_TYPE_COLUMN_MASK (0x7 << D3D10_FX10_TYPE_COLUMN_SHIFT)
#define D3D10_FX10_TYPE_COLUMN_MASK (0x7 << D3D10_FX10_TYPE_COLUMN_SHIFT)
...
@@ -288,12 +289,16 @@ static HRESULT shader_chunk_handler(const char *data, DWORD data_size, DWORD tag
...
@@ -288,12 +289,16 @@ static HRESULT shader_chunk_handler(const char *data, DWORD data_size, DWORD tag
switch
(
tag
)
switch
(
tag
)
{
{
case
TAG_ISGN
:
case
TAG_ISGN
:
case
TAG_OSGN
:
{
{
/* 32 (DXBC header) + 1 * 4 (chunk index) + 2 * 4 (chunk header) + data_size (chunk data) */
/* 32 (DXBC header) + 1 * 4 (chunk index) + 2 * 4 (chunk header) + data_size (chunk data) */
UINT
size
=
44
+
data_size
;
UINT
size
=
44
+
data_size
;
struct
d3d10_effect_shader_signature
*
sig
=
&
s
->
input_signature
;
struct
d3d10_effect_shader_signature
*
sig
;
char
*
ptr
;
char
*
ptr
;
if
(
tag
==
TAG_ISGN
)
sig
=
&
s
->
input_signature
;
else
sig
=
&
s
->
output_signature
;
sig
->
signature
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
size
);
sig
->
signature
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
size
);
if
(
!
sig
->
signature
)
if
(
!
sig
->
signature
)
{
{
...
@@ -325,7 +330,7 @@ static HRESULT shader_chunk_handler(const char *data, DWORD data_size, DWORD tag
...
@@ -325,7 +330,7 @@ static HRESULT shader_chunk_handler(const char *data, DWORD data_size, DWORD tag
write_dword
(
&
ptr
,
(
ptr
-
sig
->
signature
)
+
4
);
write_dword
(
&
ptr
,
(
ptr
-
sig
->
signature
)
+
4
);
/* chunk */
/* chunk */
write_dword
(
&
ptr
,
TAG_ISGN
);
write_dword
(
&
ptr
,
tag
);
write_dword
(
&
ptr
,
data_size
);
write_dword
(
&
ptr
,
data_size
);
memcpy
(
ptr
,
data
,
data_size
);
memcpy
(
ptr
,
data
,
data_size
);
...
@@ -1864,6 +1869,7 @@ static void d3d10_effect_variable_destroy(struct d3d10_effect_variable *v)
...
@@ -1864,6 +1869,7 @@ static void d3d10_effect_variable_destroy(struct d3d10_effect_variable *v)
case
D3D10_SVT_PIXELSHADER
:
case
D3D10_SVT_PIXELSHADER
:
case
D3D10_SVT_GEOMETRYSHADER
:
case
D3D10_SVT_GEOMETRYSHADER
:
shader_free_signature
(
&
((
struct
d3d10_effect_shader_variable
*
)
v
->
data
)
->
input_signature
);
shader_free_signature
(
&
((
struct
d3d10_effect_shader_variable
*
)
v
->
data
)
->
input_signature
);
shader_free_signature
(
&
((
struct
d3d10_effect_shader_variable
*
)
v
->
data
)
->
output_signature
);
break
;
break
;
default:
default:
...
@@ -5296,10 +5302,56 @@ static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetOutputSignature
...
@@ -5296,10 +5302,56 @@ static HRESULT STDMETHODCALLTYPE d3d10_effect_shader_variable_GetOutputSignature
ID3D10EffectShaderVariable
*
iface
,
UINT
shader_index
,
UINT
element_index
,
ID3D10EffectShaderVariable
*
iface
,
UINT
shader_index
,
UINT
element_index
,
D3D10_SIGNATURE_PARAMETER_DESC
*
desc
)
D3D10_SIGNATURE_PARAMETER_DESC
*
desc
)
{
{
FIXME
(
"iface %p, shader_index %u, element_index %u, desc %p stub!
\n
"
,
struct
d3d10_effect_variable
*
This
=
(
struct
d3d10_effect_variable
*
)
iface
;
struct
d3d10_effect_shader_variable
*
s
;
D3D10_SIGNATURE_PARAMETER_DESC
*
d
;
TRACE
(
"iface %p, shader_index %u, element_index %u, desc %p
\n
"
,
iface
,
shader_index
,
element_index
,
desc
);
iface
,
shader_index
,
element_index
,
desc
);
return
E_NOTIMPL
;
if
(
!
iface
->
lpVtbl
->
IsValid
(
iface
))
{
WARN
(
"Null variable specified
\n
"
);
return
E_FAIL
;
}
/* Check shader_index, this crashes on W7/DX10 */
if
(
shader_index
>=
This
->
effect
->
used_shader_count
)
{
WARN
(
"This should crash on W7/DX10!
\n
"
);
return
E_FAIL
;
}
s
=
This
->
effect
->
used_shaders
[
shader_index
]
->
data
;
if
(
!
s
->
output_signature
.
signature
)
{
WARN
(
"No shader signature
\n
"
);
return
D3DERR_INVALIDCALL
;
}
/* Check desc for NULL, this crashes on W7/DX10 */
if
(
!
desc
)
{
WARN
(
"This should crash on W7/DX10!
\n
"
);
return
E_FAIL
;
}
if
(
element_index
>=
s
->
output_signature
.
element_count
)
{
WARN
(
"Invalid element index specified
\n
"
);
return
E_INVALIDARG
;
}
d
=
&
s
->
output_signature
.
elements
[
element_index
];
desc
->
SemanticName
=
d
->
SemanticName
;
desc
->
SemanticIndex
=
d
->
SemanticIndex
;
desc
->
SystemValueType
=
d
->
SystemValueType
;
desc
->
ComponentType
=
d
->
ComponentType
;
desc
->
Register
=
d
->
Register
;
desc
->
ReadWriteMask
=
d
->
ReadWriteMask
;
desc
->
Mask
=
d
->
Mask
;
return
S_OK
;
}
}
...
...
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