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
243e2ddf
Commit
243e2ddf
authored
Mar 07, 2018
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass a texture and sub-resource index to surface_depth_blt_fbo().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
433ac881
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
surface.c
dlls/wined3d/surface.c
+15
-15
No files found.
dlls/wined3d/surface.c
View file @
243e2ddf
...
...
@@ -259,24 +259,20 @@ static BOOL texture2d_is_full_rect(const struct wined3d_texture *texture, unsign
return
TRUE
;
}
static
void
surface_depth_blt_fbo
(
const
struct
wined3d_device
*
device
,
struct
wined3d_surface
*
src_surface
,
DWORD
src_location
,
const
RECT
*
src_rect
,
struct
wined3d_surface
*
dst_surface
,
DWORD
dst_location
,
const
RECT
*
dst_rect
)
static
void
texture2d_depth_blt_fbo
(
const
struct
wined3d_device
*
device
,
struct
wined3d_texture
*
src_texture
,
unsigned
int
src_sub_resource_idx
,
DWORD
src_location
,
const
RECT
*
src_rect
,
struct
wined3d_texture
*
dst_texture
,
unsigned
int
dst_sub_resource_idx
,
DWORD
dst_location
,
const
RECT
*
dst_rect
)
{
unsigned
int
dst_sub_resource_idx
=
surface_get_sub_resource_idx
(
dst_surface
);
unsigned
int
src_sub_resource_idx
=
surface_get_sub_resource_idx
(
src_surface
);
struct
wined3d_texture
*
dst_texture
=
dst_surface
->
container
;
struct
wined3d_texture
*
src_texture
=
src_surface
->
container
;
const
struct
wined3d_gl_info
*
gl_info
;
struct
wined3d_context
*
context
;
DWORD
src_mask
,
dst_mask
;
GLbitfield
gl_mask
;
TRACE
(
"device %p
\n
"
,
device
);
TRACE
(
"src_surface %p, src_location %s, src_rect %s,
\n
"
,
src_surface
,
wined3d_debug_location
(
src_location
),
wine_dbgstr_rect
(
src_rect
));
TRACE
(
"dst_surface %p, dst_location %s, dst_rect %s.
\n
"
,
dst_surface
,
wined3d_debug_location
(
dst_location
),
wine_dbgstr_rect
(
dst_rect
));
TRACE
(
"device %p, src_texture %p, src_sub_resource_idx %u, src_location %s, src_rect %s, "
"dst_texture %p, dst_sub_resource_idx %u, dst_location %s, dst_rect %s.
\n
"
,
device
,
src_texture
,
src_sub_resource_idx
,
wined3d_debug_location
(
src_location
),
wine_dbgstr_rect
(
src_rect
),
dst_texture
,
dst_sub_resource_idx
,
wined3d_debug_location
(
dst_location
),
wine_dbgstr_rect
(
dst_rect
));
src_mask
=
src_texture
->
resource
.
format_flags
&
(
WINED3DFMT_FLAG_DEPTH
|
WINED3DFMT_FLAG_STENCIL
);
dst_mask
=
dst_texture
->
resource
.
format_flags
&
(
WINED3DFMT_FLAG_DEPTH
|
WINED3DFMT_FLAG_STENCIL
);
...
...
@@ -320,10 +316,12 @@ static void surface_depth_blt_fbo(const struct wined3d_device *device,
gl_info
=
context
->
gl_info
;
context_apply_fbo_state_blit
(
context
,
GL_READ_FRAMEBUFFER
,
NULL
,
src_surface
,
src_location
);
context_apply_fbo_state_blit
(
context
,
GL_READ_FRAMEBUFFER
,
NULL
,
src_texture
->
sub_resources
[
src_sub_resource_idx
].
u
.
surface
,
src_location
);
context_check_fbo_status
(
context
,
GL_READ_FRAMEBUFFER
);
context_apply_fbo_state_blit
(
context
,
GL_DRAW_FRAMEBUFFER
,
NULL
,
dst_surface
,
dst_location
);
context_apply_fbo_state_blit
(
context
,
GL_DRAW_FRAMEBUFFER
,
NULL
,
dst_texture
->
sub_resources
[
dst_sub_resource_idx
].
u
.
surface
,
dst_location
);
context_set_draw_buffer
(
context
,
GL_NONE
);
context_check_fbo_status
(
context
,
GL_DRAW_FRAMEBUFFER
);
context_invalidate_state
(
context
,
STATE_FRAMEBUFFER
);
...
...
@@ -2418,7 +2416,9 @@ static DWORD fbo_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_blit
if
(
blit_op
==
WINED3D_BLIT_OP_DEPTH_BLIT
)
{
TRACE
(
"Depth/stencil blit.
\n
"
);
surface_depth_blt_fbo
(
device
,
src_surface
,
src_location
,
src_rect
,
dst_surface
,
dst_location
,
dst_rect
);
texture2d_depth_blt_fbo
(
device
,
src_surface
->
container
,
surface_get_sub_resource_idx
(
src_surface
),
src_location
,
src_rect
,
dst_surface
->
container
,
surface_get_sub_resource_idx
(
dst_surface
),
dst_location
,
dst_rect
);
return
dst_location
;
}
...
...
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