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
46028b08
Commit
46028b08
authored
Dec 14, 2006
by
Stefan Dösinger
Committed by
Alexandre Julliard
Dec 15, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: D3DRS_ZVISIBLE is not supposed to return an error.
parent
2fe8a41c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
7 deletions
+52
-7
device.c
dlls/d3d8/tests/device.c
+39
-0
d3d.c
dlls/ddraw/tests/d3d.c
+12
-0
device.c
dlls/wined3d/device.c
+1
-7
No files found.
dlls/d3d8/tests/device.c
View file @
46028b08
...
...
@@ -648,6 +648,44 @@ cleanup:
if
(
pDevice
)
IDirect3D8_Release
(
pDevice
);
}
static
void
test_states
(
void
)
{
HRESULT
hr
;
HWND
hwnd
=
NULL
;
IDirect3D8
*
pD3d
=
NULL
;
IDirect3DDevice8
*
pDevice
=
NULL
;
D3DPRESENT_PARAMETERS
d3dpp
;
D3DDISPLAYMODE
d3ddm
;
pD3d
=
pDirect3DCreate8
(
D3D_SDK_VERSION
);
ok
(
pD3d
!=
NULL
,
"Failed to create IDirect3D8 object
\n
"
);
hwnd
=
CreateWindow
(
"static"
,
"d3d8_test"
,
WS_OVERLAPPEDWINDOW
,
100
,
100
,
160
,
160
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
hwnd
!=
NULL
,
"Failed to create window
\n
"
);
if
(
!
pD3d
||
!
hwnd
)
goto
cleanup
;
IDirect3D8_GetAdapterDisplayMode
(
pD3d
,
D3DADAPTER_DEFAULT
,
&
d3ddm
);
ZeroMemory
(
&
d3dpp
,
sizeof
(
d3dpp
)
);
d3dpp
.
Windowed
=
TRUE
;
d3dpp
.
SwapEffect
=
D3DSWAPEFFECT_DISCARD
;
d3dpp
.
BackBufferWidth
=
640
;
d3dpp
.
BackBufferHeight
=
480
;
d3dpp
.
BackBufferFormat
=
d3ddm
.
Format
;
hr
=
IDirect3D8_CreateDevice
(
pD3d
,
D3DADAPTER_DEFAULT
,
D3DDEVTYPE_HAL
/* no NULLREF here */
,
hwnd
,
D3DCREATE_SOFTWARE_VERTEXPROCESSING
,
&
d3dpp
,
&
pDevice
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create IDirect3D8Device (%s)
\n
"
,
DXGetErrorString8
(
hr
));
if
(
FAILED
(
hr
))
goto
cleanup
;
hr
=
IDirect3DDevice8_SetRenderState
(
pDevice
,
D3DRS_ZVISIBLE
,
TRUE
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice8_SetRenderState(D3DRS_ZVISIBLE, TRUE) returned %s
\n
"
,
DXGetErrorString8
(
hr
));
hr
=
IDirect3DDevice8_SetRenderState
(
pDevice
,
D3DRS_ZVISIBLE
,
FALSE
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice8_SetRenderState(D3DRS_ZVISIBLE, FALSE) returned %s
\n
"
,
DXGetErrorString8
(
hr
));
cleanup:
if
(
pD3d
)
IDirect3D8_Release
(
pD3d
);
if
(
pDevice
)
IDirect3D8_Release
(
pDevice
);
}
START_TEST
(
device
)
{
HMODULE
d3d8_handle
=
LoadLibraryA
(
"d3d8.dll"
);
...
...
@@ -659,5 +697,6 @@ START_TEST(device)
test_refcount
();
test_mipmap_levels
();
test_cursor
();
test_states
();
}
}
dlls/ddraw/tests/d3d.c
View file @
46028b08
...
...
@@ -475,6 +475,17 @@ out:
IDirect3DVertexBuffer7_Release
(
lpVBufDest2
);
}
static
void
StateTest
(
void
)
{
HRESULT
rc
;
/* The msdn says its undocumented, does it return an error too? */
rc
=
IDirect3DDevice7_SetRenderState
(
lpD3DDevice
,
D3DRENDERSTATE_ZVISIBLE
,
TRUE
);
ok
(
rc
==
D3D_OK
,
"IDirect3DDevice7_SetRenderState(D3DRENDERSTATE_ZVISIBLE, TRUE) returned %08x
\n
"
,
rc
);
rc
=
IDirect3DDevice7_SetRenderState
(
lpD3DDevice
,
D3DRENDERSTATE_ZVISIBLE
,
FALSE
);
ok
(
rc
==
D3D_OK
,
"IDirect3DDevice7_SetRenderState(D3DRENDERSTATE_ZVISIBLE, FALSE) returned %08x
\n
"
,
rc
);
}
START_TEST
(
d3d
)
{
init_function_pointers
();
...
...
@@ -489,5 +500,6 @@ START_TEST(d3d)
}
LightTest
();
ProcessVerticesTest
();
StateTest
();
ReleaseDirect3D
();
}
dlls/wined3d/device.c
View file @
46028b08
...
...
@@ -3442,16 +3442,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
case
WINED3DRS_SRCBLENDALPHA
:
case
WINED3DRS_DESTBLENDALPHA
:
case
WINED3DRS_BLENDOPALPHA
:
case
WINED3DRS_ZVISIBLE
:
StateTable
[
STATE_RENDER
(
State
)].
apply
(
STATE_RENDER
(
State
),
This
->
stateBlock
);
break
;
/** not supported */
case
WINED3DRS_ZVISIBLE
:
{
LEAVE_GL
();
return
WINED3DERR_INVALIDCALL
;
}
default:
FIXME
(
"(%p)->(%s,%d) unknown state
\n
"
,
This
,
debug_d3drenderstate
(
State
),
Value
);
}
...
...
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