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
c62fe153
Commit
c62fe153
authored
Feb 15, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use wined3d_texture_blt() in resolve_depth_buffer().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9d7221b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
device.c
dlls/wined3d/device.c
+15
-9
No files found.
dlls/wined3d/device.c
View file @
c62fe153
...
...
@@ -2013,20 +2013,26 @@ void CDECL wined3d_device_get_viewport(const struct wined3d_device *device, stru
static
void
resolve_depth_buffer
(
struct
wined3d_state
*
state
)
{
struct
wined3d_texture
*
texture
=
state
->
textures
[
0
];
struct
wined3d_
surface
*
depth_stencil
,
*
surface
;
struct
wined3d_texture
*
dst_
texture
=
state
->
textures
[
0
];
struct
wined3d_
rendertarget_view
*
src_view
;
RECT
src_rect
,
dst_rect
;
if
(
!
texture
||
texture
->
resource
.
type
!=
WINED3D_RTYPE_TEXTURE_2D
||
!
(
texture
->
resource
.
format_flags
&
WINED3DFMT_FLAG_DEPTH
))
if
(
!
dst_texture
||
dst_
texture
->
resource
.
type
!=
WINED3D_RTYPE_TEXTURE_2D
||
!
(
dst_
texture
->
resource
.
format_flags
&
WINED3DFMT_FLAG_DEPTH
))
return
;
surface
=
surface_from_resource
(
texture
->
sub_resources
[
0
]);
if
(
!
(
depth_stencil
=
wined3d_rendertarget_view_get_surface
(
state
->
fb
->
depth_stencil
)))
if
(
!
(
src_view
=
state
->
fb
->
depth_stencil
))
return
;
if
(
src_view
->
resource
->
type
==
WINED3D_RTYPE_BUFFER
)
{
FIXME
(
"Not supported on buffer resources.
\n
"
);
return
;
}
SetRect
(
&
dst_rect
,
0
,
0
,
surface
->
resource
.
width
,
surface
->
resource
.
height
);
SetRect
(
&
src_rect
,
0
,
0
,
depth_stencil
->
resource
.
width
,
depth_stencil
->
resource
.
height
);
wined3d_surface_blt
(
surface
,
&
dst_rect
,
depth_stencil
,
&
src_rect
,
0
,
NULL
,
WINED3D_TEXF_POINT
);
SetRect
(
&
dst_rect
,
0
,
0
,
dst_texture
->
resource
.
width
,
dst_texture
->
resource
.
height
);
SetRect
(
&
src_rect
,
0
,
0
,
src_view
->
width
,
src_view
->
height
);
wined3d_texture_blt
(
dst_texture
,
0
,
&
dst_rect
,
wined3d_texture_from_resource
(
src_view
->
resource
),
src_view
->
sub_resource_idx
,
&
src_rect
,
0
,
NULL
,
WINED3D_TEXF_POINT
);
}
void
CDECL
wined3d_device_set_render_state
(
struct
wined3d_device
*
device
,
...
...
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