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
134cb5bf
Commit
134cb5bf
authored
Jan 26, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 26, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9_36/tests: COM cleanup for the ID3DXInclude iface.
parent
52bf96fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
14 deletions
+11
-14
asm.c
dlls/d3dx9_36/tests/asm.c
+11
-14
No files found.
dlls/d3dx9_36/tests/asm.c
View file @
134cb5bf
...
...
@@ -17,6 +17,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COBJMACROS
#define CONST_VTABLE
#include "wine/test.h"
#include <d3dx9.h>
...
...
@@ -87,7 +88,7 @@ static const struct ID3DXIncludeVtbl D3DXInclude_Vtbl = {
};
struct
D3DXIncludeImpl
{
const
ID3DXIncludeVtbl
*
lpVtbl
;
ID3DXInclude
ID3DXInclude_iface
;
};
static
void
assembleshader_test
(
void
)
{
...
...
@@ -172,10 +173,9 @@ static void assembleshader_test(void) {
/* pInclude test */
shader
=
NULL
;
messages
=
NULL
;
include
.
lpVtbl
=
&
D3DXInclude_Vtbl
;
hr
=
D3DXAssembleShader
(
testshader
,
strlen
(
testshader
),
NULL
,
(
LPD3DXINCLUDE
)
&
include
,
D3DXSHADER_SKIPVALIDATION
,
&
shader
,
&
messages
);
include
.
ID3DXInclude_iface
.
lpVtbl
=
&
D3DXInclude_Vtbl
;
hr
=
D3DXAssembleShader
(
testshader
,
strlen
(
testshader
),
NULL
,
&
include
.
ID3DXInclude_iface
,
D3DXSHADER_SKIPVALIDATION
,
&
shader
,
&
messages
);
ok
(
hr
==
D3D_OK
,
"pInclude test failed with error 0x%x - %d
\n
"
,
hr
,
hr
&
0x0000FFFF
);
if
(
messages
)
{
trace
(
"D3DXAssembleShader messages:
\n
%s"
,
(
char
*
)
ID3DXBuffer_GetBufferPointer
(
messages
));
...
...
@@ -199,9 +199,8 @@ static void assembleshader_test(void) {
/* recursive #include test */
shader
=
NULL
;
messages
=
NULL
;
hr
=
D3DXAssembleShader
(
testshader2
,
strlen
(
testshader2
),
NULL
,
(
LPD3DXINCLUDE
)
&
include
,
D3DXSHADER_SKIPVALIDATION
,
&
shader
,
&
messages
);
hr
=
D3DXAssembleShader
(
testshader2
,
strlen
(
testshader2
),
NULL
,
&
include
.
ID3DXInclude_iface
,
D3DXSHADER_SKIPVALIDATION
,
&
shader
,
&
messages
);
ok
(
hr
==
D3D_OK
,
"D3DXAssembleShader test failed with error 0x%x - %d
\n
"
,
hr
,
hr
&
0x0000FFFF
);
if
(
messages
)
{
trace
(
"recursive D3DXAssembleShader messages:
\n
%s"
,
(
char
*
)
ID3DXBuffer_GetBufferPointer
(
messages
));
...
...
@@ -229,9 +228,8 @@ static void assembleshader_test(void) {
/* D3DXAssembleShaderFromFile + pInclude test */
shader
=
NULL
;
messages
=
NULL
;
hr
=
D3DXAssembleShaderFromFileA
(
"shader.vsh"
,
NULL
,
(
LPD3DXINCLUDE
)
&
include
,
D3DXSHADER_SKIPVALIDATION
,
&
shader
,
&
messages
);
hr
=
D3DXAssembleShaderFromFileA
(
"shader.vsh"
,
NULL
,
&
include
.
ID3DXInclude_iface
,
D3DXSHADER_SKIPVALIDATION
,
&
shader
,
&
messages
);
ok
(
hr
==
D3D_OK
,
"D3DXAssembleShaderFromFile + pInclude test failed with error 0x%x - %d
\n
"
,
hr
,
hr
&
0x0000FFFF
);
if
(
messages
)
{
trace
(
"D3DXAssembleShader messages:
\n
%s"
,
(
char
*
)
ID3DXBuffer_GetBufferPointer
(
messages
));
...
...
@@ -351,7 +349,7 @@ static void d3dxpreprocess_test(void) {
HRESULT
hr
;
LPD3DXBUFFER
shader
,
messages
;
HRESULT
shader_vsh_res
;
struct
D3DXIncludeImpl
include
=
{
&
D3DXInclude_Vtbl
};
struct
D3DXIncludeImpl
include
=
{
{
&
D3DXInclude_Vtbl
}
};
shader_vsh_res
=
create_file
(
"shader.vsh"
,
testshader
,
sizeof
(
testshader
)
-
1
);
if
(
SUCCEEDED
(
shader_vsh_res
))
{
...
...
@@ -391,8 +389,7 @@ static void d3dxpreprocess_test(void) {
/* D3DXPreprocessShaderFromFile + pInclude test */
shader
=
NULL
;
messages
=
NULL
;
hr
=
D3DXPreprocessShaderFromFileA
(
"shader.vsh"
,
NULL
,
(
LPD3DXINCLUDE
)
&
include
,
hr
=
D3DXPreprocessShaderFromFileA
(
"shader.vsh"
,
NULL
,
&
include
.
ID3DXInclude_iface
,
&
shader
,
&
messages
);
ok
(
hr
==
D3D_OK
,
"D3DXPreprocessShaderFromFile + pInclude test failed with error 0x%x - %d
\n
"
,
hr
,
hr
&
0x0000FFFF
);
if
(
messages
)
{
...
...
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