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
717225bf
Commit
717225bf
authored
Mar 17, 2017
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 17, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass a context to blit_shader.blit_surface().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ad46b676
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
25 deletions
+17
-25
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+2
-8
surface.c
dlls/wined3d/surface.c
+13
-15
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-2
No files found.
dlls/wined3d/arb_program_shader.c
View file @
717225bf
...
...
@@ -7789,22 +7789,18 @@ static BOOL arbfp_blit_supported(const struct wined3d_gl_info *gl_info,
}
}
static
void
arbfp_blit_surface
(
struct
wined3d_device
*
device
,
enum
wined3d_blit_op
op
,
DWORD
filter
,
static
void
arbfp_blit_surface
(
struct
wined3d_device
*
device
,
enum
wined3d_blit_op
op
,
struct
wined3d_context
*
context
,
struct
wined3d_surface
*
src_surface
,
const
RECT
*
src_rect_in
,
struct
wined3d_surface
*
dst_surface
,
const
RECT
*
dst_rect_in
,
const
struct
wined3d_color_key
*
color_key
)
const
struct
wined3d_color_key
*
color_key
,
enum
wined3d_texture_filter_type
filter
)
{
unsigned
int
dst_sub_resource_idx
=
surface_get_sub_resource_idx
(
dst_surface
);
struct
wined3d_texture
*
src_texture
=
src_surface
->
container
;
struct
wined3d_texture
*
dst_texture
=
dst_surface
->
container
;
struct
wined3d_context
*
context
;
RECT
src_rect
=
*
src_rect_in
;
RECT
dst_rect
=
*
dst_rect_in
;
struct
wined3d_color_key
alpha_test_key
;
/* Activate the destination context, set it up for blitting */
context
=
context_acquire
(
device
,
dst_texture
,
dst_sub_resource_idx
);
/* Now load the surface */
if
(
wined3d_settings
.
offscreen_rendering_mode
!=
ORM_FBO
&&
(
surface_get_sub_resource
(
src_surface
)
->
locations
...
...
@@ -7850,8 +7846,6 @@ static void arbfp_blit_surface(struct wined3d_device *device, enum wined3d_blit_
||
(
dst_texture
->
swapchain
&&
(
dst_texture
->
swapchain
->
front_buffer
==
dst_texture
)))
context
->
gl_info
->
gl_ops
.
gl
.
p_glFlush
();
/* Flush to ensure ordering across contexts. */
context_release
(
context
);
wined3d_texture_validate_location
(
dst_texture
,
dst_sub_resource_idx
,
dst_texture
->
resource
.
draw_binding
);
wined3d_texture_invalidate_location
(
dst_texture
,
dst_sub_resource_idx
,
~
dst_texture
->
resource
.
draw_binding
);
}
...
...
dlls/wined3d/surface.c
View file @
717225bf
...
...
@@ -2780,16 +2780,15 @@ static HRESULT ffp_blit_depth_fill(struct wined3d_device *device,
return
WINED3D_OK
;
}
static
void
ffp_blit_blit_surface
(
struct
wined3d_device
*
device
,
enum
wined3d_blit_op
op
,
DWORD
filter
,
struct
wined3d_surface
*
src_surface
,
const
RECT
*
src_rect
,
static
void
ffp_blit_blit_surface
(
struct
wined3d_device
*
device
,
enum
wined3d_blit_op
op
,
struct
wined3d_
context
*
context
,
struct
wined3d_
surface
*
src_surface
,
const
RECT
*
src_rect
,
struct
wined3d_surface
*
dst_surface
,
const
RECT
*
dst_rect
,
const
struct
wined3d_color_key
*
color_key
)
const
struct
wined3d_color_key
*
color_key
,
enum
wined3d_texture_filter_type
filter
)
{
unsigned
int
dst_sub_resource_idx
=
surface_get_sub_resource_idx
(
dst_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
;
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
/* Blit from offscreen surface to render target */
struct
wined3d_color_key
old_blt_key
=
src_texture
->
async
.
src_blt_color_key
;
...
...
@@ -2799,9 +2798,6 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, enum wined3d_bl
wined3d_texture_set_color_key
(
src_texture
,
WINED3D_CKEY_SRC_BLT
,
color_key
);
context
=
context_acquire
(
device
,
dst_texture
,
dst_sub_resource_idx
);
gl_info
=
context
->
gl_info
;
if
(
op
==
WINED3D_BLIT_OP_COLOR_BLIT_ALPHATEST
)
gl_info
->
gl_ops
.
gl
.
p_glEnable
(
GL_ALPHA_TEST
);
...
...
@@ -2811,8 +2807,6 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, enum wined3d_bl
if
(
op
==
WINED3D_BLIT_OP_COLOR_BLIT_ALPHATEST
)
gl_info
->
gl_ops
.
gl
.
p_glDisable
(
GL_ALPHA_TEST
);
context_release
(
context
);
/* Restore the color key parameters */
wined3d_texture_set_color_key
(
src_texture
,
WINED3D_CKEY_SRC_BLT
,
(
old_color_key_flags
&
WINED3D_CKEY_SRC_BLT
)
?
&
old_blt_key
:
NULL
);
...
...
@@ -3466,10 +3460,10 @@ static HRESULT cpu_blit_depth_fill(struct wined3d_device *device,
&
box
,
NULL
,
0
,
&
src_box
,
WINED3D_BLT_DEPTH_FILL
,
&
fx
,
WINED3D_TEXF_POINT
);
}
static
void
cpu_blit_blit_surface
(
struct
wined3d_device
*
device
,
enum
wined3d_blit_op
op
,
DWORD
filter
,
struct
wined3d_surface
*
src_surface
,
const
RECT
*
src_rect
,
static
void
cpu_blit_blit_surface
(
struct
wined3d_device
*
device
,
enum
wined3d_blit_op
op
,
struct
wined3d_
context
*
context
,
struct
wined3d_
surface
*
src_surface
,
const
RECT
*
src_rect
,
struct
wined3d_surface
*
dst_surface
,
const
RECT
*
dst_rect
,
const
struct
wined3d_color_key
*
color_key
)
const
struct
wined3d_color_key
*
color_key
,
enum
wined3d_texture_filter_type
filter
)
{
/* FIXME: Remove error returns from surface_blt_cpu. */
ERR
(
"Blit method not implemented by cpu_blit.
\n
"
);
...
...
@@ -3761,8 +3755,12 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
dst_rect
,
dst_texture
->
resource
.
usage
,
dst_texture
->
resource
.
pool
,
dst_texture
->
resource
.
format
);
if
(
blitter
)
{
blitter
->
blit_surface
(
device
,
blit_op
,
filter
,
src_surface
,
src_rect
,
dst_surface
,
dst_rect
,
color_key
);
struct
wined3d_context
*
context
;
context
=
context_acquire
(
device
,
dst_texture
,
dst_sub_resource_idx
);
blitter
->
blit_surface
(
device
,
blit_op
,
context
,
src_surface
,
src_rect
,
dst_surface
,
dst_rect
,
color_key
,
filter
);
context_release
(
context
);
return
WINED3D_OK
;
}
}
...
...
dlls/wined3d/wined3d_private.h
View file @
717225bf
...
...
@@ -1880,10 +1880,10 @@ struct blit_shader
const
RECT
*
rect
,
const
struct
wined3d_color
*
color
);
HRESULT
(
*
depth_fill
)(
struct
wined3d_device
*
device
,
struct
wined3d_rendertarget_view
*
view
,
const
RECT
*
rect
,
DWORD
clear_flags
,
float
depth
,
DWORD
stencil
);
void
(
*
blit_surface
)(
struct
wined3d_device
*
device
,
enum
wined3d_blit_op
op
,
DWORD
filter
,
void
(
*
blit_surface
)(
struct
wined3d_device
*
device
,
enum
wined3d_blit_op
op
,
struct
wined3d_context
*
context
,
struct
wined3d_surface
*
src_surface
,
const
RECT
*
src_rect
,
struct
wined3d_surface
*
dst_surface
,
const
RECT
*
dst_rect
,
const
struct
wined3d_color_key
*
color_key
);
const
struct
wined3d_color_key
*
color_key
,
enum
wined3d_texture_filter_type
filter
);
};
extern
const
struct
blit_shader
ffp_blit
DECLSPEC_HIDDEN
;
...
...
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