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
34e03fc0
Commit
34e03fc0
authored
Sep 18, 2006
by
Louis. Lenders
Committed by
Alexandre Julliard
Sep 20, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: More correct stub for ValidatePixelShader + tests.
parent
adadb5be
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
3 deletions
+64
-3
d3d8_main.c
dlls/d3d8/d3d8_main.c
+23
-3
d3d8_main.c
dlls/d3d8/tests/d3d8_main.c
+41
-0
No files found.
dlls/d3d8/d3d8_main.c
View file @
34e03fc0
...
...
@@ -106,8 +106,28 @@ HRESULT WINAPI ValidateVertexShader(DWORD* vertexshader, DWORD* reserved1, DWORD
* PARAMS
* toto result?
*/
BOOL
WINAPI
ValidatePixelShader
(
LPVOID
pFunction
,
int
param1
,
int
param2
,
LPVOID
toto
)
HRESULT
WINAPI
ValidatePixelShader
(
DWORD
*
pixelshader
,
DWORD
*
reserved1
,
int
bool
,
DWORD
*
toto
)
{
FIXME
(
"(%p %d %d %p): stub
\n
"
,
pFunction
,
param1
,
param2
,
toto
);
return
TRUE
;
HRESULT
ret
;
FIXME
(
"(%p %p %d %p): stub
\n
"
,
pixelshader
,
reserved1
,
bool
,
toto
);
if
(
!
pixelshader
)
return
E_FAIL
;
if
(
reserved1
)
return
E_FAIL
;
switch
(
*
pixelshader
)
{
case
0xFFFF0100
:
case
0xFFFF0101
:
case
0xFFFF0102
:
case
0xFFFF0103
:
case
0xFFFF0104
:
ret
=
S_OK
;
break
;
default:
ERR
(
"pixelshader version mismatch
\n
"
);
ret
=
E_FAIL
;
}
return
ret
;
}
dlls/d3d8/tests/d3d8_main.c
View file @
34e03fc0
...
...
@@ -19,6 +19,7 @@
#include "wine/test.h"
static
HRESULT
(
WINAPI
*
ValidateVertexShader
)(
DWORD
*
,
DWORD
*
,
DWORD
*
,
int
,
DWORD
*
);
static
HRESULT
(
WINAPI
*
ValidatePixelShader
)(
DWORD
*
,
DWORD
*
,
int
,
DWORD
*
);
static
void
test_ValidateVertexShader
(
void
)
{
...
...
@@ -64,9 +65,49 @@ static void test_ValidateVertexShader(void)
ok
(
ret
==
S_OK
,
"ValidateVertexShader returned %lx but expected S_OK
\n
"
,
ret
);
}
static
void
test_ValidatePixelShader
(
void
)
{
HRESULT
ret
;
static
DWORD
simple_ps
[]
=
{
0xFFFF0101
,
/* ps_1_1 */
0x00000051
,
0xA00F0001
,
0x3F800000
,
0x00000000
,
0x00000000
,
0x00000000
,
/* def c1 = 1.0, 0.0, 0.0, 0.0 */
0x00000042
,
0xB00F0000
,
/* tex t0 */
0x00000008
,
0x800F0000
,
0xA0E40001
,
0xA0E40000
,
/* dp3 r0, c1, c0 */
0x00000005
,
0x800F0000
,
0x90E40000
,
0x80E40000
,
/* mul r0, v0, r0 */
0x00000005
,
0x800F0000
,
0xB0E40000
,
0x80E40000
,
/* mul r0, t0, r0 */
0x0000FFFF
};
/* END */
ret
=
ValidatePixelShader
(
0
,
0
,
0
,
0
);
ok
(
ret
==
E_FAIL
,
"ValidatePixelShader returned %lx but expected E_FAIL
\n
"
,
ret
);
ret
=
ValidatePixelShader
(
0
,
0
,
1
,
0
);
ok
(
ret
==
E_FAIL
,
"ValidatePixelShader returned %lx but expected E_FAIL
\n
"
,
ret
);
ret
=
ValidatePixelShader
(
simple_ps
,
0
,
0
,
0
);
ok
(
ret
==
S_OK
,
"ValidatePixelShader returned %lx but expected S_OK
\n
"
,
ret
);
ret
=
ValidatePixelShader
(
simple_ps
,
0
,
1
,
0
);
ok
(
ret
==
S_OK
,
"ValidatePixelShader returned %lx but expected S_OK
\n
"
,
ret
);
/* seems to do some version checking */
*
simple_ps
=
0xFFFF0105
;
/* bogus version */
ret
=
ValidatePixelShader
(
simple_ps
,
0
,
1
,
0
);
ok
(
ret
==
E_FAIL
,
"ValidatePixelShader returned %lx but expected E_FAIL
\n
"
,
ret
);
/* I've seen that applications pass 2nd parameter always as 0;simple test with non-zero parameter */
*
simple_ps
=
0xFFFF0101
;
/* ps_1_1 */
ret
=
ValidatePixelShader
(
simple_ps
,
simple_ps
,
1
,
0
);
ok
(
ret
==
E_FAIL
,
"ValidatePixelShader returned %lx but expected E_FAIL
\n
"
,
ret
);
/* I've seen 3rd parameter is always passed as either 0 or 1, but passing other values doesn't seem to hurt*/
ret
=
ValidatePixelShader
(
simple_ps
,
0
,
12345
,
0
);
ok
(
ret
==
S_OK
,
"ValidatePixelShader returned %lx but expected S_OK
\n
"
,
ret
);
/* What is 4th parameter ???? Following works ok */
ret
=
ValidatePixelShader
(
simple_ps
,
0
,
1
,
simple_ps
);
ok
(
ret
==
S_OK
,
"ValidatePixelShader returned %lx but expected S_OK
\n
"
,
ret
);
}
START_TEST
(
d3d8_main
)
{
HMODULE
d3d8_handle
=
LoadLibraryA
(
"d3d8.dll"
);
ValidateVertexShader
=
(
void
*
)
GetProcAddress
(
d3d8_handle
,
"ValidateVertexShader"
);
ValidatePixelShader
=
(
void
*
)
GetProcAddress
(
d3d8_handle
,
"ValidatePixelShader"
);
test_ValidateVertexShader
();
test_ValidatePixelShader
();
}
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