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
22d8fc08
Commit
22d8fc08
authored
Oct 25, 2009
by
Rico Schüller
Committed by
Alexandre Julliard
Oct 26, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10: Add matrix column major parsing.
parent
0da0fa7e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
effect.c
dlls/d3d10/effect.c
+7
-4
No files found.
dlls/d3d10/effect.c
View file @
22d8fc08
...
...
@@ -43,6 +43,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d10);
#define D3D10_FX10_TYPE_CLASS_SHIFT 0
#define D3D10_FX10_TYPE_CLASS_MASK (0x7 << D3D10_FX10_TYPE_CLASS_SHIFT)
#define D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK 0x4000
static
const
struct
ID3D10EffectTechniqueVtbl
d3d10_effect_technique_vtbl
;
static
const
struct
ID3D10EffectPassVtbl
d3d10_effect_pass_vtbl
;
static
const
struct
ID3D10EffectVariableVtbl
d3d10_effect_variable_vtbl
;
...
...
@@ -286,13 +288,14 @@ static HRESULT parse_shader(struct d3d10_effect_object *o, const char *data)
return
parse_dxbc
(
ptr
,
dxbc_size
,
shader_chunk_handler
,
s
);
}
static
D3D10_SHADER_VARIABLE_CLASS
d3d10_variable_class
(
DWORD
c
)
static
D3D10_SHADER_VARIABLE_CLASS
d3d10_variable_class
(
DWORD
c
,
BOOL
is_column_major
)
{
switch
(
c
)
{
case
1
:
return
D3D10_SVC_SCALAR
;
case
2
:
return
D3D10_SVC_VECTOR
;
case
3
:
return
D3D10_SVC_MATRIX_ROWS
;
case
3
:
if
(
is_column_major
)
return
D3D10_SVC_MATRIX_COLUMNS
;
else
return
D3D10_SVC_MATRIX_ROWS
;
default:
FIXME
(
"Unknown variable class %#x.
\n
"
,
c
);
return
0
;
...
...
@@ -385,7 +388,7 @@ static HRESULT parse_fx10_type(struct d3d10_effect_type *t, const char *ptr, con
t
->
column_count
=
(
tmp
&
D3D10_FX10_TYPE_COLUMN_MASK
)
>>
D3D10_FX10_TYPE_COLUMN_SHIFT
;
t
->
row_count
=
(
tmp
&
D3D10_FX10_TYPE_ROW_MASK
)
>>
D3D10_FX10_TYPE_ROW_SHIFT
;
t
->
basetype
=
d3d10_variable_type
((
tmp
&
D3D10_FX10_TYPE_BASETYPE_MASK
)
>>
D3D10_FX10_TYPE_BASETYPE_SHIFT
,
FALSE
);
t
->
type_class
=
d3d10_variable_class
((
tmp
&
D3D10_FX10_TYPE_CLASS_MASK
)
>>
D3D10_FX10_TYPE_CLASS_SHIFT
);
t
->
type_class
=
d3d10_variable_class
((
tmp
&
D3D10_FX10_TYPE_CLASS_MASK
)
>>
D3D10_FX10_TYPE_CLASS_SHIFT
,
tmp
&
D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK
);
TRACE
(
"Type description: %#x.
\n
"
,
tmp
);
TRACE
(
"
\t
columns: %u.
\n
"
,
t
->
column_count
);
...
...
@@ -393,7 +396,7 @@ static HRESULT parse_fx10_type(struct d3d10_effect_type *t, const char *ptr, con
TRACE
(
"
\t
basetype: %s.
\n
"
,
debug_d3d10_shader_variable_type
(
t
->
basetype
));
TRACE
(
"
\t
class: %s.
\n
"
,
debug_d3d10_shader_variable_class
(
t
->
type_class
));
TRACE
(
"
\t
unknown bits: %#x.
\n
"
,
tmp
&
~
(
D3D10_FX10_TYPE_COLUMN_MASK
|
D3D10_FX10_TYPE_ROW_MASK
|
D3D10_FX10_TYPE_BASETYPE_MASK
|
D3D10_FX10_TYPE_CLASS_MASK
));
|
D3D10_FX10_TYPE_BASETYPE_MASK
|
D3D10_FX10_TYPE_CLASS_MASK
|
D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK
));
}
else
if
(
unknown0
==
3
)
{
...
...
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