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
1cfba6ce
Commit
1cfba6ce
authored
Jul 18, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Jul 18, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10: Add support for parsing sample masks to parse_fx10_object().
parent
d53ad3ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
+32
-0
d3d10_private.h
dlls/d3d10/d3d10_private.h
+2
-0
effect.c
dlls/d3d10/effect.c
+30
-0
No files found.
dlls/d3d10/d3d10_private.h
View file @
1cfba6ce
...
...
@@ -53,6 +53,7 @@ enum d3d10_effect_object_type
D3D10_EOT_PIXELSHADER
=
0x7
,
D3D10_EOT_GEOMETRYSHADER
=
0x8
,
D3D10_EOT_BLEND_FACTOR
=
0xa
,
D3D10_EOT_SAMPLE_MASK
=
0xb
,
};
enum
d3d10_effect_object_operation
...
...
@@ -158,6 +159,7 @@ struct d3d10_effect_pass
struct
d3d10_effect_object
*
objects
;
struct
d3d10_effect_variable
*
annotations
;
UINT
sample_mask
;
float
blend_factor
[
4
];
};
...
...
dlls/d3d10/effect.c
View file @
1cfba6ce
...
...
@@ -917,6 +917,20 @@ static BOOL read_float_value(DWORD value, D3D_SHADER_VARIABLE_TYPE in_type, floa
}
}
static
BOOL
read_int32_value
(
DWORD
value
,
D3D_SHADER_VARIABLE_TYPE
in_type
,
INT
*
out_data
,
UINT
idx
)
{
switch
(
in_type
)
{
case
D3D10_SVT_INT
:
out_data
[
idx
]
=
value
;
return
TRUE
;
default:
FIXME
(
"Unhandled in_type %#x.
\n
"
,
in_type
);
return
FALSE
;
}
}
static
BOOL
read_value_list
(
const
char
*
ptr
,
D3D_SHADER_VARIABLE_TYPE
out_type
,
UINT
out_size
,
void
*
out_data
)
{
...
...
@@ -944,6 +958,11 @@ static BOOL read_value_list(const char *ptr, D3D_SHADER_VARIABLE_TYPE out_type,
return
FALSE
;
break
;
case
D3D10_SVT_UINT
:
if
(
!
read_int32_value
(
value
,
in_type
,
out_data
,
i
))
return
FALSE
;
break
;
default:
FIXME
(
"Unhandled out_type %#x.
\n
"
,
out_type
);
return
FALSE
;
...
...
@@ -999,6 +1018,16 @@ static HRESULT parse_fx10_object(struct d3d10_effect_object *o, const char **ptr
hr
=
S_OK
;
break
;
case
D3D10_EOT_SAMPLE_MASK
:
if
(
!
read_value_list
(
data
+
offset
,
D3D10_SVT_UINT
,
1
,
&
o
->
pass
->
sample_mask
))
{
FIXME
(
"Failed to read sample mask.
\n
"
);
return
E_FAIL
;
}
hr
=
S_OK
;
break
;
case
D3D10_EOT_BLEND_FACTOR
:
if
(
!
read_value_list
(
data
+
offset
,
D3D10_SVT_FLOAT
,
4
,
&
o
->
pass
->
blend_factor
[
0
]))
{
...
...
@@ -2547,6 +2576,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_GetDesc(ID3D10EffectPass *ifa
}
}
desc
->
SampleMask
=
This
->
sample_mask
;
memcpy
(
desc
->
BlendFactor
,
This
->
blend_factor
,
4
*
sizeof
(
float
));
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