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
bf7df851
Commit
bf7df851
authored
Aug 22, 2011
by
Ričardas Barkauskas
Committed by
Alexandre Julliard
Aug 25, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Do not create implicit depth buffer.
parent
e110c08c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
46 deletions
+16
-46
ddraw.c
dlls/ddraw/ddraw.c
+4
-46
d3d.c
dlls/ddraw/tests/d3d.c
+12
-0
No files found.
dlls/ddraw/ddraw.c
View file @
bf7df851
...
...
@@ -2939,8 +2939,8 @@ static HRESULT ddraw_attach_d3d_device(IDirectDrawImpl *ddraw, IDirectDrawSurfac
localParameters
.
SwapEffect
=
WINED3DSWAPEFFECT_COPY
;
localParameters
.
hDeviceWindow
=
window
;
localParameters
.
Windowed
=
!
(
ddraw
->
cooperative_level
&
DDSCL_FULLSCREEN
);
localParameters
.
EnableAutoDepthStencil
=
TRU
E
;
localParameters
.
AutoDepthStencilFormat
=
WINED3DFMT_
D16_UNORM
;
localParameters
.
EnableAutoDepthStencil
=
FALS
E
;
localParameters
.
AutoDepthStencilFormat
=
WINED3DFMT_
UNKNOWN
;
localParameters
.
Flags
=
0
;
localParameters
.
FullScreen_RefreshRateInHz
=
WINED3DPRESENT_RATE_DEFAULT
;
localParameters
.
PresentationInterval
=
WINED3DPRESENT_INTERVAL_DEFAULT
;
...
...
@@ -5923,50 +5923,8 @@ static HRESULT CDECL device_parent_create_depth_stencil(struct wined3d_device_pa
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format
,
WINED3DMULTISAMPLE_TYPE
multisample_type
,
DWORD
multisample_quality
,
BOOL
discard
,
struct
wined3d_surface
**
surface
)
{
struct
IDirectDrawImpl
*
ddraw
=
ddraw_from_device_parent
(
device_parent
);
IDirectDrawSurface7
*
ddraw7
;
IDirectDrawSurfaceImpl
*
ddraw_surface
;
DDSURFACEDESC2
ddsd
;
HRESULT
hr
;
TRACE
(
"device_parent %p, width %u, height %u, format %#x, multisample_type %#x,
\n
"
"
\t
multisample_quality %u, discard %u, surface %p.
\n
"
,
device_parent
,
width
,
height
,
format
,
multisample_type
,
multisample_quality
,
discard
,
surface
);
*
surface
=
NULL
;
/* Create a DirectDraw surface */
memset
(
&
ddsd
,
0
,
sizeof
(
ddsd
));
ddsd
.
dwSize
=
sizeof
(
ddsd
);
ddsd
.
u4
.
ddpfPixelFormat
.
dwSize
=
sizeof
(
DDPIXELFORMAT
);
ddsd
.
dwFlags
=
DDSD_PIXELFORMAT
|
DDSD_WIDTH
|
DDSD_HEIGHT
|
DDSD_CAPS
;
ddsd
.
ddsCaps
.
dwCaps
=
DDSCAPS_OFFSCREENPLAIN
;
ddsd
.
dwHeight
=
height
;
ddsd
.
dwWidth
=
width
;
if
(
format
)
{
PixelFormat_WineD3DtoDD
(
&
ddsd
.
u4
.
ddpfPixelFormat
,
format
);
}
else
{
ddsd
.
dwFlags
^=
DDSD_PIXELFORMAT
;
}
ddraw
->
depthstencil
=
TRUE
;
hr
=
IDirectDraw7_CreateSurface
(
&
ddraw
->
IDirectDraw7_iface
,
&
ddsd
,
&
ddraw7
,
NULL
);
ddraw
->
depthstencil
=
FALSE
;
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to create depth/stencil surface, hr %#x.
\n
"
,
hr
);
return
hr
;
}
ddraw_surface
=
impl_from_IDirectDrawSurface7
(
ddraw7
);
*
surface
=
ddraw_surface
->
wined3d_surface
;
wined3d_surface_incref
(
*
surface
);
IDirectDrawSurface7_Release
(
&
ddraw_surface
->
IDirectDrawSurface7_iface
);
return
D3D_OK
;
ERR
(
"DirectDraw doesn't have and shoudn't try creating implicit depth buffers.
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
CDECL
device_parent_create_volume
(
struct
wined3d_device_parent
*
device_parent
,
...
...
dlls/ddraw/tests/d3d.c
View file @
bf7df851
...
...
@@ -100,11 +100,19 @@ static ULONG getRefcount(IUnknown *iface)
return
IUnknown_Release
(
iface
);
}
static
HRESULT
WINAPI
SurfaceCounter
(
IDirectDrawSurface7
*
surface
,
DDSURFACEDESC2
*
desc
,
void
*
context
)
{
UINT
*
num
=
context
;
(
*
num
)
++
;
IDirectDrawSurface_Release
(
surface
);
return
DDENUMRET_OK
;
}
static
BOOL
CreateDirect3D
(
void
)
{
HRESULT
rc
;
DDSURFACEDESC2
ddsd
;
UINT
num
;
rc
=
pDirectDrawCreateEx
(
NULL
,
(
void
**
)
&
lpDD
,
&
IID_IDirectDraw7
,
NULL
);
...
...
@@ -131,6 +139,10 @@ static BOOL CreateDirect3D(void)
if
(
FAILED
(
rc
))
return
FALSE
;
num
=
0
;
IDirectDraw7_EnumSurfaces
(
lpDD
,
DDENUMSURFACES_ALL
|
DDENUMSURFACES_DOESEXIST
,
NULL
,
&
num
,
SurfaceCounter
);
ok
(
num
==
1
,
"Has %d surfaces, expected 1
\n
"
,
num
);
memset
(
&
ddsd
,
0
,
sizeof
(
ddsd
));
ddsd
.
dwSize
=
sizeof
(
ddsd
);
ddsd
.
dwFlags
=
DDSD_CAPS
|
DDSD_WIDTH
|
DDSD_HEIGHT
|
DDSD_PIXELFORMAT
;
...
...
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