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
13a38e8d
Commit
13a38e8d
authored
Jun 04, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 04, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass a wined3d_resource_desc structure to device_parent_create_swapchain_surface().
parent
a4d2660c
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
75 additions
and
64 deletions
+75
-64
device.c
dlls/d3d10core/device.c
+8
-11
device.c
dlls/d3d8/device.c
+6
-9
device.c
dlls/d3d9/device.c
+6
-9
ddraw.c
dlls/ddraw/ddraw.c
+5
-8
device.c
dlls/dxgi/device.c
+14
-6
device.c
dlls/wined3d/device.c
+14
-4
swapchain.c
dlls/wined3d/swapchain.c
+21
-14
wined3d.h
include/wine/wined3d.h
+1
-3
No files found.
dlls/d3d10core/device.c
View file @
13a38e8d
...
@@ -1845,8 +1845,7 @@ static HRESULT CDECL device_parent_create_texture_surface(struct wined3d_device_
...
@@ -1845,8 +1845,7 @@ static HRESULT CDECL device_parent_create_texture_surface(struct wined3d_device_
}
}
static
HRESULT
CDECL
device_parent_create_swapchain_surface
(
struct
wined3d_device_parent
*
device_parent
,
static
HRESULT
CDECL
device_parent_create_swapchain_surface
(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format_id
,
DWORD
usage
,
void
*
container_parent
,
const
struct
wined3d_resource_desc
*
wined3d_desc
,
struct
wined3d_surface
**
surface
)
enum
wined3d_multisample_type
multisample_type
,
DWORD
multisample_quality
,
struct
wined3d_surface
**
surface
)
{
{
struct
d3d10_device
*
device
=
device_from_wined3d_device_parent
(
device_parent
);
struct
d3d10_device
*
device
=
device_from_wined3d_device_parent
(
device_parent
);
struct
wined3d_resource
*
sub_resource
;
struct
wined3d_resource
*
sub_resource
;
...
@@ -1854,20 +1853,18 @@ static HRESULT CDECL device_parent_create_swapchain_surface(struct wined3d_devic
...
@@ -1854,20 +1853,18 @@ static HRESULT CDECL device_parent_create_swapchain_surface(struct wined3d_devic
D3D10_TEXTURE2D_DESC
desc
;
D3D10_TEXTURE2D_DESC
desc
;
HRESULT
hr
;
HRESULT
hr
;
FIXME
(
"device_parent %p, container_parent %p, width %u, height %u, format_id %#x, usage %#x,
\n
"
FIXME
(
"device_parent %p, container_parent %p, wined3d_desc %p, surface %p partial stub!
\n
"
,
"
\t
multisample_type %#x, multisample_quality %u, surface %p partial stub!
\n
"
,
device_parent
,
container_parent
,
wined3d_desc
,
surface
);
device_parent
,
container_parent
,
width
,
height
,
format_id
,
usage
,
multisample_type
,
multisample_quality
,
surface
);
FIXME
(
"Implement DXGI<->wined3d usage conversion
\n
"
);
FIXME
(
"Implement DXGI<->wined3d usage conversion
\n
"
);
desc
.
Width
=
width
;
desc
.
Width
=
wi
ned3d_desc
->
wi
dth
;
desc
.
Height
=
height
;
desc
.
Height
=
wined3d_desc
->
height
;
desc
.
MipLevels
=
1
;
desc
.
MipLevels
=
1
;
desc
.
ArraySize
=
1
;
desc
.
ArraySize
=
1
;
desc
.
Format
=
dxgi_format_from_wined3dformat
(
format_id
);
desc
.
Format
=
dxgi_format_from_wined3dformat
(
wined3d_desc
->
format
);
desc
.
SampleDesc
.
Count
=
multisample_type
?
multisample_type
:
1
;
desc
.
SampleDesc
.
Count
=
wined3d_desc
->
multisample_type
?
wined3d_desc
->
multisample_type
:
1
;
desc
.
SampleDesc
.
Quality
=
multisample_quality
;
desc
.
SampleDesc
.
Quality
=
wined3d_desc
->
multisample_quality
;
desc
.
Usage
=
D3D10_USAGE_DEFAULT
;
desc
.
Usage
=
D3D10_USAGE_DEFAULT
;
desc
.
BindFlags
=
D3D10_BIND_RENDER_TARGET
;
desc
.
BindFlags
=
D3D10_BIND_RENDER_TARGET
;
desc
.
CPUAccessFlags
=
0
;
desc
.
CPUAccessFlags
=
0
;
...
...
dlls/d3d8/device.c
View file @
13a38e8d
...
@@ -2914,21 +2914,18 @@ static HRESULT CDECL device_parent_create_texture_surface(struct wined3d_device_
...
@@ -2914,21 +2914,18 @@ static HRESULT CDECL device_parent_create_texture_surface(struct wined3d_device_
}
}
static
HRESULT
CDECL
device_parent_create_swapchain_surface
(
struct
wined3d_device_parent
*
device_parent
,
static
HRESULT
CDECL
device_parent_create_swapchain_surface
(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format_id
,
DWORD
usage
,
void
*
container_parent
,
const
struct
wined3d_resource_desc
*
desc
,
struct
wined3d_surface
**
surface
)
enum
wined3d_multisample_type
multisample_type
,
DWORD
multisample_quality
,
struct
wined3d_surface
**
surface
)
{
{
struct
d3d8_device
*
device
=
device_from_device_parent
(
device_parent
);
struct
d3d8_device
*
device
=
device_from_device_parent
(
device_parent
);
struct
d3d8_surface
*
d3d_surface
;
struct
d3d8_surface
*
d3d_surface
;
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"device_parent %p, container_parent %p, width %u, height %u, format_id %#x, usage %#x,
\n
"
TRACE
(
"device_parent %p, container_parent %p, desc %p, surface %p.
\n
"
,
"
\t
multisample_type %#x, multisample_quality %u, surface %p.
\n
"
,
device_parent
,
container_parent
,
desc
,
surface
);
device_parent
,
container_parent
,
width
,
height
,
format_id
,
usage
,
multisample_type
,
multisample_quality
,
surface
);
if
(
FAILED
(
hr
=
d3d8_device_create_surface
(
device
,
width
,
height
,
d3dformat_from_wined3dformat
(
format_id
)
,
if
(
FAILED
(
hr
=
d3d8_device_create_surface
(
device
,
desc
->
width
,
desc
->
height
,
TRUE
,
FALSE
,
(
IDirect3DSurface8
**
)
&
d3d_surface
,
usage
,
D3DPOOL_DEFAULT
,
multisample_typ
e
,
d3dformat_from_wined3dformat
(
desc
->
format
),
TRUE
,
FALSE
,
(
IDirect3DSurface8
**
)
&
d3d_surfac
e
,
multisample_quality
)))
desc
->
usage
,
desc
->
pool
,
desc
->
multisample_type
,
desc
->
multisample_quality
)))
{
{
WARN
(
"Failed to create surface, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to create surface, hr %#x.
\n
"
,
hr
);
return
hr
;
return
hr
;
...
...
dlls/d3d9/device.c
View file @
13a38e8d
...
@@ -3295,21 +3295,18 @@ static HRESULT CDECL device_parent_create_texture_surface(struct wined3d_device_
...
@@ -3295,21 +3295,18 @@ static HRESULT CDECL device_parent_create_texture_surface(struct wined3d_device_
}
}
static
HRESULT
CDECL
device_parent_create_swapchain_surface
(
struct
wined3d_device_parent
*
device_parent
,
static
HRESULT
CDECL
device_parent_create_swapchain_surface
(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format_id
,
DWORD
usage
,
void
*
container_parent
,
const
struct
wined3d_resource_desc
*
desc
,
struct
wined3d_surface
**
surface
)
enum
wined3d_multisample_type
multisample_type
,
DWORD
multisample_quality
,
struct
wined3d_surface
**
surface
)
{
{
struct
d3d9_device
*
device
=
device_from_device_parent
(
device_parent
);
struct
d3d9_device
*
device
=
device_from_device_parent
(
device_parent
);
struct
d3d9_surface
*
d3d_surface
;
struct
d3d9_surface
*
d3d_surface
;
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"device_parent %p, container_parent %p, width %u, height %u, format_id %#x, usage %#x,
\n
"
TRACE
(
"device_parent %p, container_parent %p, desc %p, surface %p.
\n
"
,
"
\t
multisample_type %#x, multisample_quality %u, surface %p.
\n
"
,
device_parent
,
container_parent
,
desc
,
surface
);
device_parent
,
container_parent
,
width
,
height
,
format_id
,
usage
,
multisample_type
,
multisample_quality
,
surface
);
if
(
FAILED
(
hr
=
d3d9_device_create_surface
(
device
,
width
,
height
,
d3dformat_from_wined3dformat
(
format_id
)
,
if
(
FAILED
(
hr
=
d3d9_device_create_surface
(
device
,
desc
->
width
,
desc
->
height
,
TRUE
,
FALSE
,
(
IDirect3DSurface9
**
)
&
d3d_surface
,
usage
,
D3DPOOL_DEFAULT
,
multisample_typ
e
,
d3dformat_from_wined3dformat
(
desc
->
format
),
TRUE
,
FALSE
,
(
IDirect3DSurface9
**
)
&
d3d_surfac
e
,
multisample_quality
)))
desc
->
usage
,
desc
->
pool
,
desc
->
multisample_type
,
desc
->
multisample_quality
)))
{
{
WARN
(
"Failed to create surface, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to create surface, hr %#x.
\n
"
,
hr
);
return
hr
;
return
hr
;
...
...
dlls/ddraw/ddraw.c
View file @
13a38e8d
...
@@ -5139,16 +5139,13 @@ static const struct wined3d_parent_ops ddraw_frontbuffer_parent_ops =
...
@@ -5139,16 +5139,13 @@ static const struct wined3d_parent_ops ddraw_frontbuffer_parent_ops =
};
};
static
HRESULT
CDECL
device_parent_create_swapchain_surface
(
struct
wined3d_device_parent
*
device_parent
,
static
HRESULT
CDECL
device_parent_create_swapchain_surface
(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format_id
,
DWORD
usage
,
void
*
container_parent
,
const
struct
wined3d_resource_desc
*
desc
,
struct
wined3d_surface
**
surface
)
enum
wined3d_multisample_type
multisample_type
,
DWORD
multisample_quality
,
struct
wined3d_surface
**
surface
)
{
{
struct
ddraw
*
ddraw
=
ddraw_from_device_parent
(
device_parent
);
struct
ddraw
*
ddraw
=
ddraw_from_device_parent
(
device_parent
);
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"device_parent %p, container_parent %p, width %u, height %u, format_id %#x, usage %#x,
\n
"
TRACE
(
"device_parent %p, container_parent %p, desc %p, surface %p.
\n
"
,
"
\t
multisample_type %#x, multisample_quality %u, surface %p.
\n
"
,
device_parent
,
container_parent
,
desc
,
surface
);
device_parent
,
container_parent
,
width
,
height
,
format_id
,
usage
,
multisample_type
,
multisample_quality
,
surface
);
if
(
ddraw
->
wined3d_frontbuffer
)
if
(
ddraw
->
wined3d_frontbuffer
)
{
{
...
@@ -5156,8 +5153,8 @@ static HRESULT CDECL device_parent_create_swapchain_surface(struct wined3d_devic
...
@@ -5156,8 +5153,8 @@ static HRESULT CDECL device_parent_create_swapchain_surface(struct wined3d_devic
return
E_FAIL
;
return
E_FAIL
;
}
}
if
(
SUCCEEDED
(
hr
=
wined3d_surface_create
(
ddraw
->
wined3d_device
,
width
,
height
,
format_id
,
usage
,
if
(
SUCCEEDED
(
hr
=
wined3d_surface_create
(
ddraw
->
wined3d_device
,
desc
->
width
,
desc
->
height
,
desc
->
format
,
WINED3D_POOL_DEFAULT
,
multisample_type
,
multisample_quality
,
WINED3D_SURFACE_MAPPABLE
,
desc
->
usage
,
desc
->
pool
,
desc
->
multisample_type
,
desc
->
multisample_quality
,
WINED3D_SURFACE_MAPPABLE
,
ddraw
,
&
ddraw_frontbuffer_parent_ops
,
surface
)))
ddraw
,
&
ddraw_frontbuffer_parent_ops
,
surface
)))
ddraw
->
wined3d_frontbuffer
=
*
surface
;
ddraw
->
wined3d_frontbuffer
=
*
surface
;
...
...
dlls/dxgi/device.c
View file @
13a38e8d
...
@@ -156,6 +156,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_CreateSurface(IWineDXGIDevice *ifac
...
@@ -156,6 +156,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_CreateSurface(IWineDXGIDevice *ifac
const
DXGI_SHARED_RESOURCE
*
shared_resource
,
IDXGISurface
**
surface
)
const
DXGI_SHARED_RESOURCE
*
shared_resource
,
IDXGISurface
**
surface
)
{
{
struct
wined3d_device_parent
*
device_parent
;
struct
wined3d_device_parent
*
device_parent
;
struct
wined3d_resource_desc
surface_desc
;
IWineDXGIDeviceParent
*
dxgi_device_parent
;
IWineDXGIDeviceParent
*
dxgi_device_parent
;
HRESULT
hr
;
HRESULT
hr
;
UINT
i
;
UINT
i
;
...
@@ -174,6 +175,16 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_CreateSurface(IWineDXGIDevice *ifac
...
@@ -174,6 +175,16 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_CreateSurface(IWineDXGIDevice *ifac
device_parent
=
IWineDXGIDeviceParent_get_wined3d_device_parent
(
dxgi_device_parent
);
device_parent
=
IWineDXGIDeviceParent_get_wined3d_device_parent
(
dxgi_device_parent
);
FIXME
(
"Implement DXGI<->wined3d usage conversion
\n
"
);
FIXME
(
"Implement DXGI<->wined3d usage conversion
\n
"
);
surface_desc
.
resource_type
=
WINED3D_RTYPE_SURFACE
;
surface_desc
.
format
=
wined3dformat_from_dxgi_format
(
desc
->
Format
);
surface_desc
.
multisample_type
=
desc
->
SampleDesc
.
Count
>
1
?
desc
->
SampleDesc
.
Count
:
WINED3D_MULTISAMPLE_NONE
;
surface_desc
.
multisample_quality
=
desc
->
SampleDesc
.
Quality
;
surface_desc
.
usage
=
usage
;
surface_desc
.
pool
=
WINED3D_POOL_DEFAULT
;
surface_desc
.
width
=
desc
->
Width
;
surface_desc
.
height
=
desc
->
Height
;
surface_desc
.
depth
=
1
;
surface_desc
.
size
=
0
;
memset
(
surface
,
0
,
surface_count
*
sizeof
(
*
surface
));
memset
(
surface
,
0
,
surface_count
*
sizeof
(
*
surface
));
for
(
i
=
0
;
i
<
surface_count
;
++
i
)
for
(
i
=
0
;
i
<
surface_count
;
++
i
)
...
@@ -181,13 +192,10 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_CreateSurface(IWineDXGIDevice *ifac
...
@@ -181,13 +192,10 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_CreateSurface(IWineDXGIDevice *ifac
struct
wined3d_surface
*
wined3d_surface
;
struct
wined3d_surface
*
wined3d_surface
;
IUnknown
*
parent
;
IUnknown
*
parent
;
hr
=
device_parent
->
ops
->
create_swapchain_surface
(
device_parent
,
NULL
,
if
(
FAILED
(
hr
=
device_parent
->
ops
->
create_swapchain_surface
(
device_parent
,
desc
->
Width
,
desc
->
Height
,
wined3dformat_from_dxgi_format
(
desc
->
Format
),
usage
,
NULL
,
&
surface_desc
,
&
wined3d_surface
)))
desc
->
SampleDesc
.
Count
>
1
?
desc
->
SampleDesc
.
Count
:
WINED3D_MULTISAMPLE_NONE
,
desc
->
SampleDesc
.
Quality
,
&
wined3d_surface
);
if
(
FAILED
(
hr
))
{
{
ERR
(
"
CreateSurface failed, returning %#x
\n
"
,
hr
);
ERR
(
"
Failed to create surface, hr %#x.
\n
"
,
hr
);
goto
fail
;
goto
fail
;
}
}
...
...
dlls/wined3d/device.c
View file @
13a38e8d
...
@@ -5002,13 +5002,23 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
...
@@ -5002,13 +5002,23 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
if
(
swapchain_desc
->
enable_auto_depth_stencil
&&
!
device
->
auto_depth_stencil
)
if
(
swapchain_desc
->
enable_auto_depth_stencil
&&
!
device
->
auto_depth_stencil
)
{
{
struct
wined3d_resource_desc
surface_desc
;
TRACE
(
"Creating the depth stencil buffer
\n
"
);
TRACE
(
"Creating the depth stencil buffer
\n
"
);
surface_desc
.
resource_type
=
WINED3D_RTYPE_SURFACE
;
surface_desc
.
format
=
swapchain_desc
->
auto_depth_stencil_format
;
surface_desc
.
multisample_type
=
swapchain_desc
->
multisample_type
;
surface_desc
.
multisample_quality
=
swapchain_desc
->
multisample_quality
;
surface_desc
.
usage
=
WINED3DUSAGE_DEPTHSTENCIL
;
surface_desc
.
pool
=
WINED3D_POOL_DEFAULT
;
surface_desc
.
width
=
swapchain_desc
->
backbuffer_width
;
surface_desc
.
height
=
swapchain_desc
->
backbuffer_height
;
surface_desc
.
depth
=
1
;
surface_desc
.
size
=
0
;
if
(
FAILED
(
hr
=
device
->
device_parent
->
ops
->
create_swapchain_surface
(
device
->
device_parent
,
if
(
FAILED
(
hr
=
device
->
device_parent
->
ops
->
create_swapchain_surface
(
device
->
device_parent
,
device
->
device_parent
,
swapchain_desc
->
backbuffer_width
,
swapchain_desc
->
backbuffer_height
,
device
->
device_parent
,
&
surface_desc
,
&
device
->
auto_depth_stencil
)))
swapchain_desc
->
auto_depth_stencil_format
,
WINED3DUSAGE_DEPTHSTENCIL
,
swapchain_desc
->
multisample_type
,
swapchain_desc
->
multisample_quality
,
&
device
->
auto_depth_stencil
)))
{
{
ERR
(
"Failed to create the depth stencil buffer, hr %#x.
\n
"
,
hr
);
ERR
(
"Failed to create the depth stencil buffer, hr %#x.
\n
"
,
hr
);
return
WINED3DERR_INVALIDCALL
;
return
WINED3DERR_INVALIDCALL
;
...
...
dlls/wined3d/swapchain.c
View file @
13a38e8d
...
@@ -817,6 +817,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
...
@@ -817,6 +817,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
struct
wined3d_swapchain_desc
*
desc
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
struct
wined3d_swapchain_desc
*
desc
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
{
const
struct
wined3d_adapter
*
adapter
=
device
->
adapter
;
const
struct
wined3d_adapter
*
adapter
=
device
->
adapter
;
struct
wined3d_resource_desc
surface_desc
;
const
struct
wined3d_format
*
format
;
const
struct
wined3d_format
*
format
;
struct
wined3d_display_mode
mode
;
struct
wined3d_display_mode
mode
;
BOOL
displaymode_set
=
FALSE
;
BOOL
displaymode_set
=
FALSE
;
...
@@ -886,11 +887,20 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
...
@@ -886,11 +887,20 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
swapchain_update_render_to_fbo
(
swapchain
);
swapchain_update_render_to_fbo
(
swapchain
);
TRACE
(
"Creating front buffer.
\n
"
);
TRACE
(
"Creating front buffer.
\n
"
);
if
(
FAILED
(
hr
=
device
->
device_parent
->
ops
->
create_swapchain_surface
(
device
->
device_parent
,
parent
,
swapchain
->
desc
.
backbuffer_width
,
swapchain
->
desc
.
backbuffer_height
,
surface_desc
.
resource_type
=
WINED3D_RTYPE_SURFACE
;
swapchain
->
desc
.
backbuffer_format
,
WINED3DUSAGE_RENDERTARGET
,
surface_desc
.
format
=
swapchain
->
desc
.
backbuffer_format
;
swapchain
->
desc
.
multisample_type
,
swapchain
->
desc
.
multisample_quality
,
surface_desc
.
multisample_type
=
swapchain
->
desc
.
multisample_type
;
&
swapchain
->
front_buffer
)))
surface_desc
.
multisample_quality
=
swapchain
->
desc
.
multisample_quality
;
surface_desc
.
usage
=
WINED3DUSAGE_RENDERTARGET
;
surface_desc
.
pool
=
WINED3D_POOL_DEFAULT
;
surface_desc
.
width
=
swapchain
->
desc
.
backbuffer_width
;
surface_desc
.
height
=
swapchain
->
desc
.
backbuffer_height
;
surface_desc
.
depth
=
1
;
surface_desc
.
size
=
0
;
if
(
FAILED
(
hr
=
device
->
device_parent
->
ops
->
create_swapchain_surface
(
device
->
device_parent
,
parent
,
&
surface_desc
,
&
swapchain
->
front_buffer
)))
{
{
WARN
(
"Failed to create front buffer, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to create front buffer, hr %#x.
\n
"
,
hr
);
goto
err
;
goto
err
;
...
@@ -995,11 +1005,8 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
...
@@ -995,11 +1005,8 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
for
(
i
=
0
;
i
<
swapchain
->
desc
.
backbuffer_count
;
++
i
)
for
(
i
=
0
;
i
<
swapchain
->
desc
.
backbuffer_count
;
++
i
)
{
{
TRACE
(
"Creating back buffer %u.
\n
"
,
i
);
TRACE
(
"Creating back buffer %u.
\n
"
,
i
);
if
(
FAILED
(
hr
=
device
->
device_parent
->
ops
->
create_swapchain_surface
(
device
->
device_parent
,
parent
,
if
(
FAILED
(
hr
=
device
->
device_parent
->
ops
->
create_swapchain_surface
(
device
->
device_parent
,
swapchain
->
desc
.
backbuffer_width
,
swapchain
->
desc
.
backbuffer_height
,
parent
,
&
surface_desc
,
&
swapchain
->
back_buffers
[
i
])))
swapchain
->
desc
.
backbuffer_format
,
WINED3DUSAGE_RENDERTARGET
,
swapchain
->
desc
.
multisample_type
,
swapchain
->
desc
.
multisample_quality
,
&
swapchain
->
back_buffers
[
i
])))
{
{
WARN
(
"Failed to create back buffer %u, hr %#x.
\n
"
,
i
,
hr
);
WARN
(
"Failed to create back buffer %u, hr %#x.
\n
"
,
i
,
hr
);
goto
err
;
goto
err
;
...
@@ -1014,11 +1021,11 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
...
@@ -1014,11 +1021,11 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
TRACE
(
"Creating depth/stencil buffer.
\n
"
);
TRACE
(
"Creating depth/stencil buffer.
\n
"
);
if
(
!
device
->
auto_depth_stencil
)
if
(
!
device
->
auto_depth_stencil
)
{
{
surface_desc
.
format
=
swapchain
->
desc
.
auto_depth_stencil_format
;
surface_desc
.
usage
=
WINED3DUSAGE_DEPTHSTENCIL
;
if
(
FAILED
(
hr
=
device
->
device_parent
->
ops
->
create_swapchain_surface
(
device
->
device_parent
,
if
(
FAILED
(
hr
=
device
->
device_parent
->
ops
->
create_swapchain_surface
(
device
->
device_parent
,
device
->
device_parent
,
swapchain
->
desc
.
backbuffer_width
,
swapchain
->
desc
.
backbuffer_height
,
device
->
device_parent
,
&
surface_desc
,
&
device
->
auto_depth_stencil
)))
swapchain
->
desc
.
auto_depth_stencil_format
,
WINED3DUSAGE_DEPTHSTENCIL
,
swapchain
->
desc
.
multisample_type
,
swapchain
->
desc
.
multisample_quality
,
&
device
->
auto_depth_stencil
)))
{
{
WARN
(
"Failed to create the auto depth stencil, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to create the auto depth stencil, hr %#x.
\n
"
,
hr
);
goto
err
;
goto
err
;
...
...
include/wine/wined3d.h
View file @
13a38e8d
...
@@ -1982,9 +1982,7 @@ struct wined3d_device_parent_ops
...
@@ -1982,9 +1982,7 @@ struct wined3d_device_parent_ops
void
(
__cdecl
*
wined3d_device_created
)(
struct
wined3d_device_parent
*
device_parent
,
struct
wined3d_device
*
device
);
void
(
__cdecl
*
wined3d_device_created
)(
struct
wined3d_device_parent
*
device_parent
,
struct
wined3d_device
*
device
);
void
(
__cdecl
*
mode_changed
)(
struct
wined3d_device_parent
*
device_parent
);
void
(
__cdecl
*
mode_changed
)(
struct
wined3d_device_parent
*
device_parent
);
HRESULT
(
__cdecl
*
create_swapchain_surface
)(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
HRESULT
(
__cdecl
*
create_swapchain_surface
)(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format_id
,
DWORD
usage
,
const
struct
wined3d_resource_desc
*
desc
,
struct
wined3d_surface
**
surface
);
enum
wined3d_multisample_type
multisample_type
,
DWORD
multisample_quality
,
struct
wined3d_surface
**
surface
);
HRESULT
(
__cdecl
*
create_texture_surface
)(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
HRESULT
(
__cdecl
*
create_texture_surface
)(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
const
struct
wined3d_resource_desc
*
desc
,
UINT
sub_resource_idx
,
struct
wined3d_surface
**
surface
);
const
struct
wined3d_resource_desc
*
desc
,
UINT
sub_resource_idx
,
struct
wined3d_surface
**
surface
);
HRESULT
(
__cdecl
*
create_volume
)(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
HRESULT
(
__cdecl
*
create_volume
)(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
...
...
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