Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
3baeaa2b
Commit
3baeaa2b
authored
Oct 14, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 15, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Recognise SM4 scalar swizzles.
parent
21361d52
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
1 deletion
+27
-1
shader_sm4.c
dlls/wined3d/shader_sm4.c
+27
-1
No files found.
dlls/wined3d/shader_sm4.c
View file @
3baeaa2b
...
...
@@ -51,6 +51,9 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d_bytecode);
#define WINED3D_SM4_REGISTER_TYPE_SHIFT 12
#define WINED3D_SM4_REGISTER_TYPE_MASK (0xf << WINED3D_SM4_REGISTER_TYPE_SHIFT)
#define WINED3D_SM4_SWIZZLE_TYPE_SHIFT 2
#define WINED3D_SM4_SWIZZLE_TYPE_MASK (0x3 << WINED3D_SM4_SWIZZLE_TYPE_SHIFT)
#define WINED3D_SM4_IMMCONST_TYPE_SHIFT 0
#define WINED3D_SM4_IMMCONST_TYPE_MASK (0x3 << WINED3D_SM4_IMMCONST_TYPE_SHIFT)
...
...
@@ -147,6 +150,12 @@ enum wined3d_sm4_input_primitive_type
WINED3D_SM4_INPUT_PT_TRIANGLEADJ
=
0x7
,
};
enum
wined3d_sm4_swizzle_type
{
WINED3D_SM4_SWIZZLE_VEC4
=
0x1
,
WINED3D_SM4_SWIZZLE_SCALAR
=
0x2
,
};
enum
wined3d_sm4_immconst_type
{
WINED3D_SM4_IMMCONST_SCALAR
=
0x1
,
...
...
@@ -609,7 +618,24 @@ static BOOL shader_sm4_read_src_param(struct wined3d_sm4_data *priv, const DWORD
}
else
{
src_param
->
swizzle
=
(
token
&
WINED3D_SM4_SWIZZLE_MASK
)
>>
WINED3D_SM4_SWIZZLE_SHIFT
;
enum
wined3d_sm4_swizzle_type
swizzle_type
=
(
token
&
WINED3D_SM4_SWIZZLE_TYPE_MASK
)
>>
WINED3D_SM4_SWIZZLE_TYPE_SHIFT
;
switch
(
swizzle_type
)
{
case
WINED3D_SM4_SWIZZLE_SCALAR
:
src_param
->
swizzle
=
(
token
&
WINED3D_SM4_SWIZZLE_MASK
)
>>
WINED3D_SM4_SWIZZLE_SHIFT
;
src_param
->
swizzle
=
(
src_param
->
swizzle
&
0x3
)
*
0x55
;
break
;
case
WINED3D_SM4_SWIZZLE_VEC4
:
src_param
->
swizzle
=
(
token
&
WINED3D_SM4_SWIZZLE_MASK
)
>>
WINED3D_SM4_SWIZZLE_SHIFT
;
break
;
default:
FIXME
(
"Unhandled swizzle type %#x.
\n
"
,
swizzle_type
);
break
;
}
}
map_register
(
priv
,
&
src_param
->
reg
);
...
...
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