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
ca7405a9
Commit
ca7405a9
authored
Nov 30, 2010
by
Travis Athougies
Committed by
Alexandre Julliard
Dec 02, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9_36: Improved constant table parsing.
parent
71beac32
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
shader.c
dlls/d3dx9_36/shader.c
+17
-3
No files found.
dlls/d3dx9_36/shader.c
View file @
ca7405a9
...
@@ -994,10 +994,11 @@ static HRESULT parse_ctab_constant_type(const D3DXSHADER_TYPEINFO *type, ctab_co
...
@@ -994,10 +994,11 @@ static HRESULT parse_ctab_constant_type(const D3DXSHADER_TYPEINFO *type, ctab_co
constant
->
desc
.
Type
=
type
->
Type
;
constant
->
desc
.
Type
=
type
->
Type
;
constant
->
desc
.
Rows
=
type
->
Rows
;
constant
->
desc
.
Rows
=
type
->
Rows
;
constant
->
desc
.
Columns
=
type
->
Columns
;
constant
->
desc
.
Columns
=
type
->
Columns
;
constant
->
desc
.
Elements
=
type
->
Elements
;
constant
->
desc
.
StructMembers
=
type
->
StructMembers
;
constant
->
desc
.
StructMembers
=
type
->
StructMembers
;
TRACE
(
"class = %d, type = %d, rows = %d, columns = %d, struct_members = %d
\n
"
,
TRACE
(
"class = %d, type = %d, rows = %d, columns = %d,
elements = %d,
struct_members = %d
\n
"
,
constant
->
desc
.
Class
,
constant
->
desc
.
Type
,
constant
->
desc
.
Class
,
constant
->
desc
.
Type
,
constant
->
desc
.
Elements
,
constant
->
desc
.
Rows
,
constant
->
desc
.
Columns
,
constant
->
desc
.
StructMembers
);
constant
->
desc
.
Rows
,
constant
->
desc
.
Columns
,
constant
->
desc
.
StructMembers
);
if
((
constant
->
desc
.
Class
==
D3DXPC_STRUCT
)
&&
constant
->
desc
.
StructMembers
)
if
((
constant
->
desc
.
Class
==
D3DXPC_STRUCT
)
&&
constant
->
desc
.
StructMembers
)
...
@@ -1095,11 +1096,24 @@ HRESULT WINAPI D3DXGetShaderConstantTableEx(CONST DWORD* byte_code,
...
@@ -1095,11 +1096,24 @@ HRESULT WINAPI D3DXGetShaderConstantTableEx(CONST DWORD* byte_code,
object
->
constants
[
i
].
desc
.
Name
=
object
->
ctab
+
constant_info
[
i
].
Name
;
object
->
constants
[
i
].
desc
.
Name
=
object
->
ctab
+
constant_info
[
i
].
Name
;
object
->
constants
[
i
].
desc
.
RegisterSet
=
constant_info
[
i
].
RegisterSet
;
object
->
constants
[
i
].
desc
.
RegisterSet
=
constant_info
[
i
].
RegisterSet
;
object
->
constants
[
i
].
desc
.
RegisterIndex
=
constant_info
[
i
].
RegisterIndex
;
object
->
constants
[
i
].
desc
.
RegisterIndex
=
constant_info
[
i
].
RegisterIndex
;
object
->
constants
[
i
].
desc
.
RegisterCount
=
0
;
object
->
constants
[
i
].
desc
.
RegisterCount
=
constant_info
[
i
].
RegisterCount
;
object
->
constants
[
i
].
desc
.
DefaultValue
=
object
->
ctab
+
constant_info
[
i
].
DefaultValue
;
hr
=
parse_ctab_constant_type
((
LPD3DXSHADER_TYPEINFO
)(
object
->
ctab
+
constant_info
[
i
].
TypeInfo
),
hr
=
parse_ctab_constant_type
((
LPD3DXSHADER_TYPEINFO
)(
object
->
ctab
+
constant_info
[
i
].
TypeInfo
),
&
object
->
constants
[
i
]);
&
object
->
constants
[
i
]);
if
(
hr
!=
D3D_OK
)
if
(
hr
!=
D3D_OK
)
goto
error
;
goto
error
;
if
(
constant_info
[
i
].
RegisterSet
!=
D3DXRS_FLOAT4
)
FIXME
(
"Don't know how to calculate Bytes for non D3DXRS_FLOAT4 constants
\n
"
);
/* D3DXRS_FLOAT4 has a base size of 4 (not taking into account dimensions and element count) */
object
->
constants
[
i
].
desc
.
Bytes
=
4
;
/* Take into account dimensions and elements */
object
->
constants
[
i
].
desc
.
Bytes
*=
object
->
constants
[
i
].
desc
.
Elements
;
object
->
constants
[
i
].
desc
.
Bytes
*=
object
->
constants
[
i
].
desc
.
Rows
*
object
->
constants
[
i
].
desc
.
Columns
;
}
}
*
constant_table
=
(
LPD3DXCONSTANTTABLE
)
object
;
*
constant_table
=
(
LPD3DXCONSTANTTABLE
)
object
;
...
...
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