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
3f04448d
Commit
3f04448d
authored
Feb 27, 2011
by
Rico Schüller
Committed by
Alexandre Julliard
Feb 28, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dcompiler: Fix SystemValueType for pixelshader output signature.
parent
39497ff4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
5 deletions
+23
-5
reflection.c
dlls/d3dcompiler_43/reflection.c
+22
-4
reflection.c
dlls/d3dcompiler_43/tests/reflection.c
+1
-1
No files found.
dlls/d3dcompiler_43/reflection.c
View file @
3f04448d
...
...
@@ -1315,7 +1315,7 @@ err_out:
return
hr
;
}
HRESULT
d3dcompiler_parse_signature
(
struct
d3dcompiler_shader_signature
*
s
,
struct
dxbc_section
*
section
)
static
HRESULT
d3dcompiler_parse_signature
(
struct
d3dcompiler_shader_signature
*
s
,
struct
dxbc_section
*
section
,
DWORD
target
)
{
D3D11_SIGNATURE_PARAMETER_DESC
*
d
;
unsigned
int
string_data_offset
;
...
...
@@ -1393,6 +1393,24 @@ HRESULT d3dcompiler_parse_signature(struct d3dcompiler_shader_signature *s, stru
d
[
i
].
ReadWriteMask
=
(
mask
>>
8
)
&
0xff
;
d
[
i
].
Mask
=
mask
&
0xff
;
/* pixel shaders have a special handling for SystemValueType in the output signature */
if
(((
target
&
0xffff0000
)
==
0xffff0000
)
&&
(
section
->
tag
==
TAG_OSG5
||
section
->
tag
==
TAG_OSGN
))
{
TRACE
(
"Pixelshader output signature fixup.
\n
"
);
if
(
d
[
i
].
Register
==
0xffffffff
)
{
if
(
!
strcasecmp
(
d
[
i
].
SemanticName
,
"sv_depth"
))
d
[
i
].
SystemValueType
=
D3D_NAME_DEPTH
;
if
(
!
strcasecmp
(
d
[
i
].
SemanticName
,
"sv_coverage"
))
d
[
i
].
SystemValueType
=
D3D_NAME_COVERAGE
;
if
(
!
strcasecmp
(
d
[
i
].
SemanticName
,
"sv_depthgreaterequal"
))
d
[
i
].
SystemValueType
=
D3D_NAME_DEPTH_GREATER_EQUAL
;
if
(
!
strcasecmp
(
d
[
i
].
SemanticName
,
"sv_depthlessequal"
))
d
[
i
].
SystemValueType
=
D3D_NAME_DEPTH_LESS_EQUAL
;
}
else
{
d
[
i
].
SystemValueType
=
D3D_NAME_TARGET
;
}
}
TRACE
(
"semantic: %s, semantic idx: %u, sysval_semantic %#x, "
"type %u, register idx: %u, use_mask %#x, input_mask %#x, stream %u
\n
"
,
debugstr_a
(
d
[
i
].
SemanticName
),
d
[
i
].
SemanticIndex
,
d
[
i
].
SystemValueType
,
...
...
@@ -1484,7 +1502,7 @@ HRESULT d3dcompiler_shader_reflection_init(struct d3dcompiler_shader_reflection
goto
err_out
;
}
hr
=
d3dcompiler_parse_signature
(
reflection
->
isgn
,
section
);
hr
=
d3dcompiler_parse_signature
(
reflection
->
isgn
,
section
,
reflection
->
target
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to parse section ISGN.
\n
"
);
...
...
@@ -1502,7 +1520,7 @@ HRESULT d3dcompiler_shader_reflection_init(struct d3dcompiler_shader_reflection
goto
err_out
;
}
hr
=
d3dcompiler_parse_signature
(
reflection
->
osgn
,
section
);
hr
=
d3dcompiler_parse_signature
(
reflection
->
osgn
,
section
,
reflection
->
target
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to parse section OSGN.
\n
"
);
...
...
@@ -1519,7 +1537,7 @@ HRESULT d3dcompiler_shader_reflection_init(struct d3dcompiler_shader_reflection
goto
err_out
;
}
hr
=
d3dcompiler_parse_signature
(
reflection
->
pcsg
,
section
);
hr
=
d3dcompiler_parse_signature
(
reflection
->
pcsg
,
section
,
reflection
->
target
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to parse section PCSG.
\n
"
);
...
...
dlls/d3dcompiler_43/tests/reflection.c
View file @
3f04448d
...
...
@@ -694,7 +694,7 @@ static void test_reflection_desc_ps(void)
i
,
desc
.
SemanticIndex
,
pdesc
->
SemanticIndex
);
ok
(
desc
.
Register
==
pdesc
->
Register
,
"GetOutputParameterDesc(%u) Register failed, got %u, expected %u
\n
"
,
i
,
desc
.
Register
,
pdesc
->
Register
);
todo_wine
ok
(
desc
.
SystemValueType
==
pdesc
->
SystemValueType
,
"GetOutputParameterDesc(%u) SystemValueType failed, got %x, expected %x
\n
"
,
ok
(
desc
.
SystemValueType
==
pdesc
->
SystemValueType
,
"GetOutputParameterDesc(%u) SystemValueType failed, got %x, expected %x
\n
"
,
i
,
desc
.
SystemValueType
,
pdesc
->
SystemValueType
);
ok
(
desc
.
ComponentType
==
pdesc
->
ComponentType
,
"GetOutputParameterDesc(%u) ComponentType failed, got %x, expected %x
\n
"
,
i
,
desc
.
ComponentType
,
pdesc
->
ComponentType
);
...
...
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