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
23b4b3cd
Commit
23b4b3cd
authored
Mar 12, 2018
by
Matteo Bruni
Committed by
Alexandre Julliard
Mar 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass a wined3d_context structure to texture2d_depth_blt_fbo().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9a00e032
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
16 deletions
+3
-16
surface.c
dlls/wined3d/surface.c
+3
-16
No files found.
dlls/wined3d/surface.c
View file @
23b4b3cd
...
@@ -259,13 +259,12 @@ static BOOL texture2d_is_full_rect(const struct wined3d_texture *texture, unsign
...
@@ -259,13 +259,12 @@ static BOOL texture2d_is_full_rect(const struct wined3d_texture *texture, unsign
return
TRUE
;
return
TRUE
;
}
}
static
void
texture2d_depth_blt_fbo
(
const
struct
wined3d_device
*
device
,
static
void
texture2d_depth_blt_fbo
(
const
struct
wined3d_device
*
device
,
struct
wined3d_context
*
context
,
struct
wined3d_texture
*
src_texture
,
unsigned
int
src_sub_resource_idx
,
DWORD
src_location
,
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
,
const
RECT
*
src_rect
,
struct
wined3d_texture
*
dst_texture
,
unsigned
int
dst_sub_resource_idx
,
DWORD
dst_location
,
const
RECT
*
dst_rect
)
DWORD
dst_location
,
const
RECT
*
dst_rect
)
{
{
const
struct
wined3d_gl_info
*
gl_info
;
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
struct
wined3d_context
*
context
;
DWORD
src_mask
,
dst_mask
;
DWORD
src_mask
,
dst_mask
;
GLbitfield
gl_mask
;
GLbitfield
gl_mask
;
...
@@ -298,14 +297,6 @@ static void texture2d_depth_blt_fbo(const struct wined3d_device *device,
...
@@ -298,14 +297,6 @@ static void texture2d_depth_blt_fbo(const struct wined3d_device *device,
if
(
src_mask
&
WINED3DFMT_FLAG_STENCIL
)
if
(
src_mask
&
WINED3DFMT_FLAG_STENCIL
)
gl_mask
|=
GL_STENCIL_BUFFER_BIT
;
gl_mask
|=
GL_STENCIL_BUFFER_BIT
;
context
=
context_acquire
(
device
,
NULL
,
0
);
if
(
!
context
->
valid
)
{
context_release
(
context
);
WARN
(
"Invalid context, skipping blit.
\n
"
);
return
;
}
/* Make sure the locations are up-to-date. Loading the destination
/* Make sure the locations are up-to-date. Loading the destination
* surface isn't required if the entire surface is overwritten. */
* surface isn't required if the entire surface is overwritten. */
wined3d_texture_load_location
(
src_texture
,
src_sub_resource_idx
,
context
,
src_location
);
wined3d_texture_load_location
(
src_texture
,
src_sub_resource_idx
,
context
,
src_location
);
...
@@ -314,8 +305,6 @@ static void texture2d_depth_blt_fbo(const struct wined3d_device *device,
...
@@ -314,8 +305,6 @@ static void texture2d_depth_blt_fbo(const struct wined3d_device *device,
else
else
wined3d_texture_prepare_location
(
dst_texture
,
dst_sub_resource_idx
,
context
,
dst_location
);
wined3d_texture_prepare_location
(
dst_texture
,
dst_sub_resource_idx
,
context
,
dst_location
);
gl_info
=
context
->
gl_info
;
context_apply_fbo_state_blit
(
context
,
GL_READ_FRAMEBUFFER
,
NULL
,
0
,
context_apply_fbo_state_blit
(
context
,
GL_READ_FRAMEBUFFER
,
NULL
,
0
,
&
src_texture
->
resource
,
src_sub_resource_idx
,
src_location
);
&
src_texture
->
resource
,
src_sub_resource_idx
,
src_location
);
context_check_fbo_status
(
context
,
GL_READ_FRAMEBUFFER
);
context_check_fbo_status
(
context
,
GL_READ_FRAMEBUFFER
);
...
@@ -351,8 +340,6 @@ static void texture2d_depth_blt_fbo(const struct wined3d_device *device,
...
@@ -351,8 +340,6 @@ static void texture2d_depth_blt_fbo(const struct wined3d_device *device,
if
(
wined3d_settings
.
strict_draw_ordering
)
if
(
wined3d_settings
.
strict_draw_ordering
)
gl_info
->
gl_ops
.
gl
.
p_glFlush
();
/* Flush to ensure ordering across contexts. */
gl_info
->
gl_ops
.
gl
.
p_glFlush
();
/* Flush to ensure ordering across contexts. */
context_release
(
context
);
}
}
static
BOOL
is_multisample_location
(
const
struct
wined3d_texture
*
texture
,
DWORD
location
)
static
BOOL
is_multisample_location
(
const
struct
wined3d_texture
*
texture
,
DWORD
location
)
...
@@ -2422,7 +2409,7 @@ static DWORD fbo_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_blit
...
@@ -2422,7 +2409,7 @@ static DWORD fbo_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_blit
if
(
blit_op
==
WINED3D_BLIT_OP_DEPTH_BLIT
)
if
(
blit_op
==
WINED3D_BLIT_OP_DEPTH_BLIT
)
{
{
TRACE
(
"Depth/stencil blit.
\n
"
);
TRACE
(
"Depth/stencil blit.
\n
"
);
texture2d_depth_blt_fbo
(
device
,
src_surface
->
container
,
surface_get_sub_resource_idx
(
src_surface
),
texture2d_depth_blt_fbo
(
device
,
context
,
src_surface
->
container
,
surface_get_sub_resource_idx
(
src_surface
),
src_location
,
src_rect
,
dst_surface
->
container
,
surface_get_sub_resource_idx
(
dst_surface
),
src_location
,
src_rect
,
dst_surface
->
container
,
surface_get_sub_resource_idx
(
dst_surface
),
dst_location
,
dst_rect
);
dst_location
,
dst_rect
);
return
dst_location
;
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