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
51f4f013
Commit
51f4f013
authored
Aug 21, 2012
by
Józef Kucia
Committed by
Alexandre Julliard
Aug 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Implement ID3DXConstantTable::SetMatrixTranspose.
parent
edbd09fb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
2 deletions
+51
-2
shader.c
dlls/d3dx9_36/shader.c
+2
-2
shader.c
dlls/d3dx9_36/tests/shader.c
+49
-0
No files found.
dlls/d3dx9_36/shader.c
View file @
51f4f013
...
...
@@ -1252,9 +1252,9 @@ static HRESULT WINAPI ID3DXConstantTableImpl_SetMatrixTranspose(ID3DXConstantTab
{
struct
ID3DXConstantTableImpl
*
This
=
impl_from_ID3DXConstantTable
(
iface
);
FIXME
(
"(%p)->(%p, %p, %p): stub
\n
"
,
This
,
device
,
constant
,
matrix
);
TRACE
(
"(%p)->(%p, %p, %p)
\n
"
,
This
,
device
,
constant
,
matrix
);
return
E_NOTIMPL
;
return
set_matrix_array
(
iface
,
device
,
constant
,
matrix
,
1
,
D3DXPC_MATRIX_COLUMNS
,
D3DXPT_FLOAT
,
4
,
4
)
;
}
static
HRESULT
WINAPI
ID3DXConstantTableImpl_SetMatrixTransposeArray
(
ID3DXConstantTable
*
iface
,
LPDIRECT3DDEVICE9
device
,
...
...
dlls/d3dx9_36/tests/shader.c
View file @
51f4f013
...
...
@@ -649,6 +649,7 @@ static void test_setting_basic_table(IDirect3DDevice9 *device)
/* Clear registers */
memset
(
out
,
0
,
sizeof
(
out
));
IDirect3DDevice9_SetVertexShaderConstantF
(
device
,
0
,
out
,
4
);
IDirect3DDevice9_SetVertexShaderConstantF
(
device
,
6
,
out
,
1
);
IDirect3DDevice9_SetVertexShaderConstantF
(
device
,
7
,
out
,
1
);
/* SetVector shouldn't change the value of a matrix constant */
...
...
@@ -693,6 +694,24 @@ static void test_setting_basic_table(IDirect3DDevice9 *device)
"got {%f, %f, %f, %f}, should be all 0.0f
\n
"
,
out
[
0
],
out
[
1
],
out
[
2
],
out
[
3
]);
res
=
ID3DXConstantTable_SetMatrixTranspose
(
ctable
,
device
,
"f"
,
&
mvp
);
ok
(
res
==
D3D_OK
,
"ID3DXConstantTable_SetMatrixTranspose failed on variable f: 0x%08x
\n
"
,
res
);
IDirect3DDevice9_GetVertexShaderConstantF
(
device
,
6
,
out
,
1
);
ok
(
out
[
0
]
==
U
(
S
(
mvp
)).
_11
&&
out
[
1
]
==
0
.
0
f
&&
out
[
2
]
==
0
.
0
f
&&
out
[
3
]
==
0
.
0
f
,
"The variable f was not set correctly by ID3DXConstantTable_SetMatrixTranspose, got %f, should be %f
\n
"
,
out
[
0
],
U
(
S
(
mvp
)).
_11
);
res
=
ID3DXConstantTable_SetMatrixTranspose
(
ctable
,
device
,
"f4"
,
&
mvp
);
ok
(
res
==
D3D_OK
,
"ID3DXConstantTable_SetMatrixTranspose failed on variable f4: 0x%08x
\n
"
,
res
);
IDirect3DDevice9_GetVertexShaderConstantF
(
device
,
7
,
out
,
1
);
todo_wine
ok
(
out
[
0
]
==
S
(
U
(
mvp
)).
_11
&&
out
[
1
]
==
S
(
U
(
mvp
)).
_21
&&
out
[
2
]
==
S
(
U
(
mvp
)).
_31
&&
out
[
3
]
==
S
(
U
(
mvp
)).
_41
,
"The variable f4 was not set correctly by ID3DXConstantTable_SetMatrixTranspose, "
"got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}
\n
"
,
out
[
0
],
out
[
1
],
out
[
2
],
out
[
3
],
S
(
U
(
mvp
)).
_11
,
S
(
U
(
mvp
)).
_21
,
S
(
U
(
mvp
)).
_31
,
S
(
U
(
mvp
)).
_41
);
refcnt
=
ID3DXConstantTable_Release
(
ctable
);
ok
(
refcnt
==
0
,
"The constant table reference count was %u, should be 0
\n
"
,
refcnt
);
}
...
...
@@ -741,6 +760,7 @@ static void test_setting_matrices_table(IDirect3DDevice9 *device)
res
=
D3DXGetShaderConstantTable
(
ctab_matrices2
,
&
ctable
);
ok
(
res
==
D3D_OK
,
"D3DXGetShaderConstantTable failed: got %#x
\n
"
,
res
);
/* SetMatrix */
res
=
ID3DXConstantTable_SetMatrix
(
ctable
,
device
,
"c2x3"
,
&
fmatrix
);
ok
(
res
==
D3D_OK
,
"ID3DXConstantTable_SetMatrix failed on variable c2x3: got %#x
\n
"
,
res
);
...
...
@@ -826,6 +846,35 @@ static void test_setting_matrices_table(IDirect3DDevice9 *device)
S
(
U
(
fmatrix
)).
_31
,
S
(
U
(
fmatrix
)).
_32
,
S
(
U
(
fmatrix
)).
_33
,
S
(
U
(
fmatrix
)).
_34
,
S
(
U
(
fmatrix
)).
_41
,
S
(
U
(
fmatrix
)).
_42
,
S
(
U
(
fmatrix
)).
_43
,
S
(
U
(
fmatrix
)).
_44
);
/* SetMatrixTranspose */
res
=
ID3DXConstantTable_SetMatrixTranspose
(
ctable
,
device
,
"c2x3"
,
&
fmatrix
);
ok
(
res
==
D3D_OK
,
"ID3DXConstantTable_SetMatrixTranspose failed on variable c2x3: got %#x
\n
"
,
res
);
res
=
ID3DXConstantTable_SetMatrixTranspose
(
ctable
,
device
,
"r2x3"
,
&
fmatrix
);
ok
(
res
==
D3D_OK
,
"ID3DXConstantTable_SetMatrixTranspose failed on variable r2x3: got %#x
\n
"
,
res
);
IDirect3DDevice9_GetVertexShaderConstantF
(
device
,
7
,
out
,
3
);
ok
(
out
[
0
]
==
S
(
U
(
fmatrix
)).
_11
&&
out
[
1
]
==
S
(
U
(
fmatrix
)).
_12
&&
out
[
2
]
==
0
.
0
f
&&
out
[
3
]
==
0
.
0
f
&&
out
[
4
]
==
S
(
U
(
fmatrix
)).
_21
&&
out
[
5
]
==
S
(
U
(
fmatrix
)).
_22
&&
out
[
6
]
==
0
.
0
f
&&
out
[
7
]
==
0
.
0
f
&&
out
[
8
]
==
S
(
U
(
fmatrix
)).
_31
&&
out
[
9
]
==
S
(
U
(
fmatrix
)).
_32
&&
out
[
10
]
==
0
.
0
f
&&
out
[
11
]
==
0
.
0
f
,
"The variable c2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}, "
"should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}
\n
"
,
out
[
0
],
out
[
1
],
out
[
2
],
out
[
3
],
out
[
4
],
out
[
5
],
out
[
6
],
out
[
7
],
out
[
8
],
out
[
9
],
out
[
10
],
out
[
11
],
S
(
U
(
fmatrix
)).
_11
,
S
(
U
(
fmatrix
)).
_12
,
0
.
0
f
,
0
.
0
f
,
S
(
U
(
fmatrix
)).
_21
,
S
(
U
(
fmatrix
)).
_22
,
0
.
0
f
,
0
.
0
f
,
S
(
U
(
fmatrix
)).
_31
,
S
(
U
(
fmatrix
)).
_32
,
0
.
0
f
,
0
.
0
f
);
IDirect3DDevice9_GetVertexShaderConstantF
(
device
,
15
,
out
,
2
);
ok
(
out
[
0
]
==
S
(
U
(
fmatrix
)).
_11
&&
out
[
1
]
==
S
(
U
(
fmatrix
)).
_21
&&
out
[
2
]
==
S
(
U
(
fmatrix
)).
_31
&&
out
[
3
]
==
0
.
0
f
&&
out
[
4
]
==
S
(
U
(
fmatrix
)).
_12
&&
out
[
5
]
==
S
(
U
(
fmatrix
)).
_22
&&
out
[
6
]
==
S
(
U
(
fmatrix
)).
_32
&&
out
[
7
]
==
0
.
0
f
,
"The variable r2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f}, "
"should be {%f, %f, %f, %f; %f, %f, %f, %f}
\n
"
,
out
[
0
],
out
[
1
],
out
[
2
],
out
[
3
],
out
[
4
],
out
[
5
],
out
[
6
],
out
[
7
],
S
(
U
(
fmatrix
)).
_11
,
S
(
U
(
fmatrix
)).
_21
,
S
(
U
(
fmatrix
)).
_31
,
0
.
0
f
,
S
(
U
(
fmatrix
)).
_12
,
S
(
U
(
fmatrix
)).
_22
,
S
(
U
(
fmatrix
)).
_32
,
0
.
0
f
);
ID3DXConstantTable_Release
(
ctable
);
}
...
...
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