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
8b5cd9ed
Commit
8b5cd9ed
authored
Mar 03, 2014
by
Matteo Bruni
Committed by
Alexandre Julliard
Mar 03, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Always use type->Rows as D3DXPC_MATRIX_ROWS parameters size.
parent
c6fefc20
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
shader.c
dlls/d3dx9_36/shader.c
+4
-4
shader.c
dlls/d3dx9_36/tests/shader.c
+4
-3
No files found.
dlls/d3dx9_36/shader.c
View file @
8b5cd9ed
...
...
@@ -1775,7 +1775,7 @@ static const struct ID3DXConstantTableVtbl ID3DXConstantTable_Vtbl =
};
static
HRESULT
parse_ctab_constant_type
(
const
char
*
ctab
,
DWORD
typeoffset
,
struct
ctab_constant
*
constant
,
BOOL
is_element
,
WORD
index
,
WORD
max
,
DWORD
*
offset
,
DWORD
nameoffset
,
UINT
regset
)
BOOL
is_element
,
WORD
index
,
WORD
max
_index
,
DWORD
*
offset
,
DWORD
nameoffset
,
UINT
regset
)
{
const
D3DXSHADER_TYPEINFO
*
type
=
(
LPD3DXSHADER_TYPEINFO
)(
ctab
+
typeoffset
);
const
D3DXSHADER_STRUCTMEMBERINFO
*
memberinfo
=
NULL
;
...
...
@@ -1824,7 +1824,7 @@ static HRESULT parse_ctab_constant_type(const char *ctab, DWORD typeoffset, stru
for
(
i
=
0
;
i
<
count
;
++
i
)
{
hr
=
parse_ctab_constant_type
(
ctab
,
memberinfo
?
memberinfo
[
i
].
TypeInfo
:
typeoffset
,
&
constant
->
constants
[
i
],
memberinfo
==
NULL
,
index
+
size
,
max
,
offset
,
&
constant
->
constants
[
i
],
memberinfo
==
NULL
,
index
+
size
,
max
_index
,
offset
,
memberinfo
?
memberinfo
[
i
].
Name
:
nameoffset
,
regset
);
if
(
hr
!=
D3D_OK
)
goto
error
;
...
...
@@ -1859,7 +1859,7 @@ static HRESULT parse_ctab_constant_type(const char *ctab, DWORD typeoffset, stru
case
D3DXPC_MATRIX_ROWS
:
offsetdiff
=
type
->
Rows
*
4
;
size
=
is_element
?
type
->
Rows
:
max
(
type
->
Rows
,
type
->
Columns
)
;
size
=
type
->
Rows
;
break
;
case
D3DXPC_MATRIX_COLUMNS
:
...
...
@@ -1893,7 +1893,7 @@ static HRESULT parse_ctab_constant_type(const char *ctab, DWORD typeoffset, stru
if
(
offset
)
*
offset
+=
offsetdiff
*
4
;
}
constant
->
desc
.
RegisterCount
=
max
(
0
,
min
(
max
-
index
,
size
));
constant
->
desc
.
RegisterCount
=
max
(
0
,
min
(
max
_index
-
index
,
size
));
constant
->
desc
.
Bytes
=
4
*
constant
->
desc
.
Elements
*
type
->
Rows
*
type
->
Columns
;
return
D3D_OK
;
...
...
dlls/d3dx9_36/tests/shader.c
View file @
8b5cd9ed
...
...
@@ -120,7 +120,7 @@ static const DWORD ctab_matrices[] = {
0x000000ac
,
0x00000058
,
0x00070002
,
0x00000001
,
0x00000064
,
0x00000000
,
/* Constant 1 desc (fmatrix3x1) */
0x00000074
,
0x00000002
,
0x00000004
,
0x00000080
,
0x00000000
,
/* Constant 2 desc (fmatrix4x4) */
0x00000090
,
0x00040002
,
0x0000000
3
,
0x0000009c
,
0x00000000
,
/* Constant 3 desc (imatrix2x3) */
0x00000090
,
0x00040002
,
0x0000000
2
,
0x0000009c
,
0x00000000
,
/* Constant 3 desc (imatrix2x3) */
0x74616D66
,
0x33786972
,
0xab003178
,
/* Constant 1 name */
0x00030003
,
0x00010003
,
0x00000001
,
0x00000000
,
/* Constant 1 type desc */
0x74616D66
,
0x34786972
,
0xab003478
,
/* Constant 2 name */
...
...
@@ -133,8 +133,9 @@ static const DWORD ctab_matrices[] = {
static
const
D3DXCONSTANT_DESC
ctab_matrices_expected
[]
=
{
{
"fmatrix4x4"
,
D3DXRS_FLOAT4
,
0
,
4
,
D3DXPC_MATRIX_COLUMNS
,
D3DXPT_FLOAT
,
4
,
4
,
1
,
0
,
64
,
NULL
},
{
"imatrix2x3"
,
D3DXRS_FLOAT4
,
4
,
3
,
D3DXPC_MATRIX_ROWS
,
D3DXPT_INT
,
2
,
3
,
1
,
0
,
24
,
NULL
},
{
"fmatrix3x1"
,
D3DXRS_FLOAT4
,
7
,
1
,
D3DXPC_MATRIX_COLUMNS
,
D3DXPT_FLOAT
,
3
,
1
,
1
,
0
,
12
,
NULL
}};
{
"imatrix2x3"
,
D3DXRS_FLOAT4
,
4
,
2
,
D3DXPC_MATRIX_ROWS
,
D3DXPT_INT
,
2
,
3
,
1
,
0
,
24
,
NULL
},
{
"fmatrix3x1"
,
D3DXRS_FLOAT4
,
7
,
1
,
D3DXPC_MATRIX_COLUMNS
,
D3DXPT_FLOAT
,
3
,
1
,
1
,
0
,
12
,
NULL
},
};
static
const
DWORD
ctab_matrices2
[]
=
{
0xfffe0200
,
/* vs_2_0 */
...
...
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