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
9002468c
Commit
9002468c
authored
Sep 10, 2006
by
Louis. Lenders
Committed by
Alexandre Julliard
Sep 11, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Better stub for ValidateVertexShader + tests.
parent
abecd9e3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
98 additions
and
6 deletions
+98
-6
d3d8.spec
dlls/d3d8/d3d8.spec
+1
-1
d3d8_main.c
dlls/d3d8/d3d8_main.c
+24
-5
Makefile.in
dlls/d3d8/tests/Makefile.in
+1
-0
d3d8_main.c
dlls/d3d8/tests/d3d8_main.c
+72
-0
No files found.
dlls/d3d8/d3d8.spec
View file @
9002468c
...
...
@@ -2,4 +2,4 @@
@ stdcall DebugSetMute()
@ stdcall Direct3DCreate8(long)
@ stdcall ValidatePixelShader(ptr long long ptr)
@ stdcall ValidateVertexShader(ptr
long
long ptr)
@ stdcall ValidateVertexShader(ptr
ptr ptr
long ptr)
dlls/d3d8/d3d8_main.c
View file @
9002468c
...
...
@@ -72,13 +72,32 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) {
/***********************************************************************
* ValidateVertexShader (D3D8.@)
*
* PARAMS
* I've seen reserved1 and reserved2 always passed as 0's
* bool seems always passed as 0 or 1, but other values work as well....
* toto result?
*/
BOOL
WINAPI
ValidateVertexShader
(
LPVOID
pFunction
,
int
param1
,
int
param2
,
LPVOID
toto
)
{
FIXME
(
"(%p %d %d %p): stub
\n
"
,
pFunction
,
param1
,
param2
,
toto
);
return
TRUE
;
HRESULT
WINAPI
ValidateVertexShader
(
DWORD
*
vertexshader
,
DWORD
*
reserved1
,
DWORD
*
reserved2
,
int
bool
,
DWORD
*
toto
)
{
HRESULT
ret
;
FIXME
(
"(%p %p %p %d %p): stub
\n
"
,
vertexshader
,
reserved1
,
reserved2
,
bool
,
toto
);
if
(
!
vertexshader
)
return
E_FAIL
;
if
(
reserved1
||
reserved2
)
return
E_FAIL
;
switch
(
*
vertexshader
)
{
case
0xFFFE0101
:
case
0xFFFE0100
:
ret
=
S_OK
;
break
;
default:
ERR
(
"vertexshader version mismatch
\n
"
);
ret
=
E_FAIL
;
}
return
ret
;
}
/***********************************************************************
...
...
dlls/d3d8/tests/Makefile.in
View file @
9002468c
...
...
@@ -7,6 +7,7 @@ IMPORTS = user32 kernel32
EXTRALIBS
=
-ldxerr8
CTESTS
=
\
d3d8_main.c
\
device.c
@MAKE_TEST_RULES@
...
...
dlls/d3d8/tests/d3d8_main.c
0 → 100644
View file @
9002468c
/*
* Copyright (C) 2006 Louis Lenders
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wine/test.h"
static
HRESULT
(
WINAPI
*
ValidateVertexShader
)(
DWORD
*
,
DWORD
*
,
DWORD
*
,
int
,
DWORD
*
);
static
void
test_ValidateVertexShader
(
void
)
{
HRESULT
ret
;
static
DWORD
simple_vs
[]
=
{
0xFFFE0101
,
/* vs_1_1 */
0x00000009
,
0xC0010000
,
0x90E40000
,
0xA0E40000
,
/* dp4 oPos.x, v0, c0 */
0x00000009
,
0xC0020000
,
0x90E40000
,
0xA0E40001
,
/* dp4 oPos.y, v0, c1 */
0x00000009
,
0xC0040000
,
0x90E40000
,
0xA0E40002
,
/* dp4 oPos.z, v0, c2 */
0x00000009
,
0xC0080000
,
0x90E40000
,
0xA0E40003
,
/* dp4 oPos.w, v0, c3 */
0x0000FFFF
};
ret
=
ValidateVertexShader
(
0
,
0
,
0
,
0
,
0
);
ok
(
ret
==
E_FAIL
,
"ValidateVertexShader returned %lx but expected E_FAIL
\n
"
,
ret
);
ret
=
ValidateVertexShader
(
0
,
0
,
0
,
1
,
0
);
ok
(
ret
==
E_FAIL
,
"ValidateVertexShader returned %lx but expected E_FAIL
\n
"
,
ret
);
ret
=
ValidateVertexShader
(
simple_vs
,
0
,
0
,
0
,
0
);
ok
(
ret
==
S_OK
,
"ValidateVertexShader returned %lx but expected S_OK
\n
"
,
ret
);
ret
=
ValidateVertexShader
(
simple_vs
,
0
,
0
,
1
,
0
);
ok
(
ret
==
S_OK
,
"ValidateVertexShader returned %lx but expected S_OK
\n
"
,
ret
);
/* seems to do some version checking */
*
simple_vs
=
0xFFFE0100
;
/* vs_1_0 */
ret
=
ValidateVertexShader
(
simple_vs
,
0
,
0
,
0
,
0
);
ok
(
ret
==
S_OK
,
"ValidateVertexShader returned %lx but expected S_OK
\n
"
,
ret
);
*
simple_vs
=
0xFFFE0102
;
/* bogus version */
ret
=
ValidateVertexShader
(
simple_vs
,
0
,
0
,
1
,
0
);
ok
(
ret
==
E_FAIL
,
"ValidateVertexShader returned %lx but expected E_FAIL
\n
"
,
ret
);
/* I've seen that applications pass 2nd and 3rd parameter always as 0;simple test with non-zero parameters */
*
simple_vs
=
0xFFFE0101
;
/* vs_1_1 */
ret
=
ValidateVertexShader
(
simple_vs
,
simple_vs
,
0
,
1
,
0
);
ok
(
ret
==
E_FAIL
,
"ValidateVertexShader returned %lx but expected E_FAIL
\n
"
,
ret
);
ret
=
ValidateVertexShader
(
simple_vs
,
0
,
simple_vs
,
1
,
0
);
ok
(
ret
==
E_FAIL
,
"ValidateVertexShader returned %lx but expected E_FAIL
\n
"
,
ret
);
/* I've seen 4th parameter is always passed as either 0 or 1, but passing other values doesn't seem to hurt*/
ret
=
ValidateVertexShader
(
simple_vs
,
0
,
0
,
12345
,
0
);
ok
(
ret
==
S_OK
,
"ValidateVertexShader returned %lx but expected S_OK
\n
"
,
ret
);
/* What is 5th parameter ???? Following works ok */
ret
=
ValidateVertexShader
(
simple_vs
,
0
,
0
,
1
,
simple_vs
);
ok
(
ret
==
S_OK
,
"ValidateVertexShader returned %lx but expected S_OK
\n
"
,
ret
);
}
START_TEST
(
d3d8_main
)
{
HMODULE
d3d8_handle
=
LoadLibraryA
(
"d3d8.dll"
);
ValidateVertexShader
=
(
void
*
)
GetProcAddress
(
d3d8_handle
,
"ValidateVertexShader"
);
test_ValidateVertexShader
();
}
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