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
d97a8b3e
Commit
d97a8b3e
authored
Jun 07, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 07, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Create textures for swapchain surfaces.
parent
e6359524
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
8 deletions
+27
-8
device.c
dlls/d3d8/device.c
+27
-8
No files found.
dlls/d3d8/device.c
View file @
d97a8b3e
...
...
@@ -571,6 +571,21 @@ static HRESULT CDECL reset_enum_callback(struct wined3d_resource *resource)
{
struct
d3d8_surface
*
surface
;
if
(
desc
.
resource_type
==
WINED3D_RTYPE_TEXTURE
)
{
IUnknown
*
parent
=
wined3d_resource_get_parent
(
resource
);
IDirect3DBaseTexture8
*
texture
;
if
(
SUCCEEDED
(
IUnknown_QueryInterface
(
parent
,
&
IID_IDirect3DBaseTexture8
,
(
void
**
)
&
texture
)))
{
IDirect3DBaseTexture8_Release
(
texture
);
WARN
(
"Texture %p (resource %p) in pool D3DPOOL_DEFAULT blocks the Reset call.
\n
"
,
texture
,
resource
);
return
D3DERR_DEVICELOST
;
}
return
D3D_OK
;
}
if
(
desc
.
resource_type
!=
WINED3D_RTYPE_SURFACE
)
{
WARN
(
"Resource %p in pool D3DPOOL_DEFAULT blocks the Reset call.
\n
"
,
resource
);
...
...
@@ -2917,26 +2932,30 @@ static HRESULT CDECL device_parent_create_swapchain_surface(struct wined3d_devic
void
*
container_parent
,
const
struct
wined3d_resource_desc
*
desc
,
struct
wined3d_surface
**
surface
)
{
struct
d3d8_device
*
device
=
device_from_device_parent
(
device_parent
);
struct
wined3d_resource_desc
texture_desc
;
struct
d3d8_surface
*
d3d_surface
;
struct
wined3d_texture
*
texture
;
HRESULT
hr
;
TRACE
(
"device_parent %p, container_parent %p, desc %p, surface %p.
\n
"
,
device_parent
,
container_parent
,
desc
,
surface
);
if
(
FAILED
(
hr
=
d3d8_device_create_surface
(
device
,
desc
->
width
,
desc
->
height
,
d3dformat_from_wined3dformat
(
desc
->
format
),
WINED3D_SURFACE_MAPPABLE
,
(
IDirect3DSurface8
**
)
&
d3d_surface
,
desc
->
usage
,
desc
->
pool
,
desc
->
multisample_type
,
desc
->
multisample_quality
)))
texture_desc
=
*
desc
;
texture_desc
.
resource_type
=
WINED3D_RTYPE_TEXTURE
;
if
(
FAILED
(
hr
=
wined3d_texture_create_2d
(
device
->
wined3d_device
,
&
texture_desc
,
1
,
WINED3D_SURFACE_MAPPABLE
,
&
device
->
IDirect3DDevice8_iface
,
&
d3d8_null_wined3d_parent_ops
,
&
texture
)))
{
WARN
(
"Failed to create
surfac
e, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to create
textur
e, hr %#x.
\n
"
,
hr
);
return
hr
;
}
*
surface
=
d3d_surface
->
wined3d_surface
;
*
surface
=
wined3d_surface_from_resource
(
wined3d_texture_get_sub_resource
(
texture
,
0
))
;
wined3d_surface_incref
(
*
surface
);
wined3d_texture_decref
(
texture
);
d3d_surface
->
container
=
(
IUnknown
*
)
&
device
->
IDirect3DDevice8_iface
;
/* Implicit surfaces are created with an refcount of 0 */
IDirect3DSurface8_Release
(
&
d3d_surface
->
IDirect3DSurface8_iface
)
;
d3d_surface
=
wined3d_surface_get_parent
(
*
surface
)
;
d3d_surface
->
forwardReference
=
NULL
;
d3d_surface
->
parent_device
=
&
device
->
IDirect3DDevice8_iface
;
return
hr
;
}
...
...
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