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
7f1250e5
Commit
7f1250e5
authored
Apr 17, 2003
by
Christian Costa
Committed by
Alexandre Julliard
Apr 17, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle creation of a depth/stencil buffer when creating a device.
Implement IDirect3D8DeviceImpl_GetDepthStencilBuffer.
parent
7d77d77d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
3 deletions
+23
-3
d3d8_private.h
dlls/d3d8/d3d8_private.h
+1
-0
device.c
dlls/d3d8/device.c
+15
-3
directx.c
dlls/d3d8/directx.c
+7
-0
No files found.
dlls/d3d8/d3d8_private.h
View file @
7f1250e5
...
...
@@ -239,6 +239,7 @@ struct IDirect3DDevice8Impl
/* IDirect3DDevice8 fields */
IDirect3D8Impl
*
direct3d8
;
IDirect3DSurface8Impl
*
backBuffer
;
IDirect3DSurface8Impl
*
depthStencilBuffer
;
D3DPRESENT_PARAMETERS
PresentParms
;
D3DDEVICE_CREATION_PARAMETERS
CreateParms
;
...
...
dlls/d3d8/device.c
View file @
7f1250e5
...
...
@@ -828,12 +828,22 @@ SHORT bytesPerPixel(D3DFORMAT fmt) {
SHORT
retVal
;
switch
(
fmt
)
{
/* color buffer */
case
D3DFMT_A4R4G4B4
:
retVal
=
2
;
break
;
case
D3DFMT_A8R8G8B8
:
retVal
=
4
;
break
;
case
D3DFMT_X8R8G8B8
:
retVal
=
4
;
break
;
case
D3DFMT_R8G8B8
:
retVal
=
3
;
break
;
case
D3DFMT_R5G6B5
:
retVal
=
2
;
break
;
case
D3DFMT_A1R5G5B5
:
retVal
=
2
;
break
;
/* depth/stencil buffer */
case
D3DFMT_D16_LOCKABLE
:
retVal
=
2
;
break
;
case
D3DFMT_D32
:
retVal
=
4
;
break
;
case
D3DFMT_D15S1
:
retVal
=
2
;
break
;
case
D3DFMT_D24S8
:
retVal
=
4
;
break
;
case
D3DFMT_D16
:
retVal
=
2
;
break
;
case
D3DFMT_D24X8
:
retVal
=
4
;
break
;
case
D3DFMT_D24X4S4
:
retVal
=
4
;
break
;
/* unknown */
case
D3DFMT_UNKNOWN
:
/* Guess at the highest value of the above */
TRACE
(
"D3DFMT_UNKNOWN - Guessing at 4 bytes/pixel %d
\n
"
,
fmt
);
...
...
@@ -1587,10 +1597,12 @@ HRESULT WINAPI IDirect3DDevice8Impl_GetDepthStencilSurface(LPDIRECT3DDEVICE8 i
ICOM_THIS
(
IDirect3DDevice8Impl
,
iface
);
/* Note inc ref on returned surface *
IDirect3DSurface8Impl_AddRef((LPDIRECT3DSURFACE8) *ppBackBuffer); */
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
ppZStencilSurface
);
/* Note inc ref on returned surface */
IDirect3DSurface8Impl_AddRef
((
LPDIRECT3DSURFACE8
)
This
->
depthStencilBuffer
);
*
ppZStencilSurface
=
(
LPDIRECT3DSURFACE8
)
This
->
depthStencilBuffer
;
FIXME
(
"(%p) : stub
\n
"
,
This
);
return
D3D_OK
;
}
...
...
dlls/d3d8/directx.c
View file @
7f1250e5
...
...
@@ -530,6 +530,13 @@ HRESULT WINAPI IDirect3D8Impl_CreateDevice (LPDIRECT3D8 iface,
pPresentationParameters
->
BackBufferFormat
,
(
LPDIRECT3DSURFACE8
*
)
&
object
->
backBuffer
);
if
(
pPresentationParameters
->
EnableAutoDepthStencil
)
IDirect3DDevice8Impl_CreateImageSurface
((
LPDIRECT3DDEVICE8
)
object
,
pPresentationParameters
->
BackBufferWidth
,
pPresentationParameters
->
BackBufferHeight
,
pPresentationParameters
->
AutoDepthStencilFormat
,
(
LPDIRECT3DSURFACE8
*
)
&
object
->
depthStencilBuffer
);
/* Now override the surface's Flip method (if in double buffering) ?COPIED from DDRAW!?
((x11_ds_private *) surface->private)->opengl_flip = TRUE;
{
...
...
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