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
dbd8c89e
Commit
dbd8c89e
authored
Mar 22, 2017
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 23, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass the destination location to blit_shader.blit_surface().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
012f9b03
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
10 deletions
+50
-10
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+22
-2
surface.c
dlls/wined3d/surface.c
+27
-7
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/arb_program_shader.c
View file @
dbd8c89e
...
...
@@ -7791,7 +7791,7 @@ 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
,
struct
wined3d_context
*
context
,
struct
wined3d_surface
*
src_surface
,
const
RECT
*
src_rect
,
struct
wined3d_surface
*
dst_surface
,
const
RECT
*
dst_rect
,
struct
wined3d_surface
*
dst_surface
,
DWORD
dst_location
,
const
RECT
*
dst_rect
,
const
struct
wined3d_color_key
*
color_key
,
enum
wined3d_texture_filter_type
filter
)
{
struct
wined3d_texture
*
src_texture
=
src_surface
->
container
;
...
...
@@ -7823,13 +7823,33 @@ static void arbfp_blit_surface(struct wined3d_device *device, enum wined3d_blit_
context_apply_blit_state
(
context
,
device
);
if
(
!
wined3d_resource_is_offscreen
(
&
dst_texture
->
resource
)
)
if
(
dst_location
==
WINED3D_LOCATION_DRAWABLE
)
{
d
=
*
dst_rect
;
surface_translate_drawable_coords
(
dst_surface
,
context
->
win_handle
,
&
d
);
dst_rect
=
&
d
;
}
if
(
wined3d_settings
.
offscreen_rendering_mode
==
ORM_FBO
)
{
GLenum
buffer
;
if
(
dst_location
==
WINED3D_LOCATION_DRAWABLE
)
{
TRACE
(
"Destination surface %p is onscreen.
\n
"
,
dst_surface
);
buffer
=
wined3d_texture_get_gl_buffer
(
dst_texture
);
}
else
{
TRACE
(
"Destination surface %p is offscreen.
\n
"
,
dst_surface
);
buffer
=
GL_COLOR_ATTACHMENT0
;
}
context_apply_fbo_state_blit
(
context
,
GL_DRAW_FRAMEBUFFER
,
dst_surface
,
NULL
,
dst_location
);
context_set_draw_buffer
(
context
,
buffer
);
context_check_fbo_status
(
context
,
GL_DRAW_FRAMEBUFFER
);
context_invalidate_state
(
context
,
STATE_FRAMEBUFFER
);
}
if
(
op
==
WINED3D_BLIT_OP_COLOR_BLIT_ALPHATEST
)
{
const
struct
wined3d_format
*
fmt
=
src_texture
->
resource
.
format
;
...
...
dlls/wined3d/surface.c
View file @
dbd8c89e
...
...
@@ -2345,8 +2345,8 @@ static BOOL surface_load_drawable(struct wined3d_surface *surface,
surface_get_rect
(
surface
,
NULL
,
&
r
);
wined3d_texture_load_location
(
texture
,
sub_resource_idx
,
context
,
WINED3D_LOCATION_TEXTURE_RGB
);
device
->
blitter
->
blit_surface
(
device
,
WINED3D_BLIT_OP_COLOR_BLIT
,
context
,
surface
,
&
r
,
surface
,
&
r
,
NULL
,
WINED3D_TEXF_POINT
);
device
->
blitter
->
blit_surface
(
device
,
WINED3D_BLIT_OP_COLOR_BLIT
,
context
,
surface
,
&
r
,
surface
,
WINED3D_LOCATION_DRAWABLE
,
&
r
,
NULL
,
WINED3D_TEXF_POINT
);
if
(
restore_rt
)
context_restore
(
context
,
restore_rt
);
...
...
@@ -2718,7 +2718,7 @@ static HRESULT ffp_blit_depth_fill(struct wined3d_device *device,
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
,
struct
wined3d_surface
*
dst_surface
,
DWORD
dst_location
,
const
RECT
*
dst_rect
,
const
struct
wined3d_color_key
*
color_key
,
enum
wined3d_texture_filter_type
filter
)
{
struct
wined3d_texture
*
src_texture
=
src_surface
->
container
;
...
...
@@ -2742,13 +2742,33 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, enum wined3d_bl
/* Activate the destination context, set it up for blitting. */
context_apply_blit_state
(
context
,
device
);
if
(
!
wined3d_resource_is_offscreen
(
&
dst_texture
->
resource
)
)
if
(
dst_location
==
WINED3D_LOCATION_DRAWABLE
)
{
r
=
*
dst_rect
;
surface_translate_drawable_coords
(
dst_surface
,
context
->
win_handle
,
&
r
);
dst_rect
=
&
r
;
}
if
(
wined3d_settings
.
offscreen_rendering_mode
==
ORM_FBO
)
{
GLenum
buffer
;
if
(
dst_location
==
WINED3D_LOCATION_DRAWABLE
)
{
TRACE
(
"Destination surface %p is onscreen.
\n
"
,
dst_surface
);
buffer
=
wined3d_texture_get_gl_buffer
(
dst_texture
);
}
else
{
TRACE
(
"Destination surface %p is offscreen.
\n
"
,
dst_surface
);
buffer
=
GL_COLOR_ATTACHMENT0
;
}
context_apply_fbo_state_blit
(
context
,
GL_DRAW_FRAMEBUFFER
,
dst_surface
,
NULL
,
dst_location
);
context_set_draw_buffer
(
context
,
buffer
);
context_check_fbo_status
(
context
,
GL_DRAW_FRAMEBUFFER
);
context_invalidate_state
(
context
,
STATE_FRAMEBUFFER
);
}
ffp_blit_set
(
device
->
blit_priv
,
context
,
src_surface
,
NULL
);
if
(
op
==
WINED3D_BLIT_OP_COLOR_BLIT_ALPHATEST
||
color_key
)
...
...
@@ -3437,7 +3457,7 @@ static HRESULT cpu_blit_depth_fill(struct wined3d_device *device,
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
,
struct
wined3d_surface
*
dst_surface
,
DWORD
dst_location
,
const
RECT
*
dst_rect
,
const
struct
wined3d_color_key
*
color_key
,
enum
wined3d_texture_filter_type
filter
)
{
/* FIXME: Remove error returns from surface_blt_cpu. */
...
...
@@ -3733,8 +3753,8 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
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
);
blitter
->
blit_surface
(
device
,
blit_op
,
context
,
src_surface
,
src_rect
,
dst_surface
,
dst_texture
->
resource
.
draw_binding
,
dst_rect
,
color_key
,
filter
);
context_release
(
context
);
wined3d_texture_validate_location
(
dst_texture
,
dst_sub_resource_idx
,
...
...
dlls/wined3d/wined3d_private.h
View file @
dbd8c89e
...
...
@@ -1881,7 +1881,7 @@ struct blit_shader
const
RECT
*
rect
,
DWORD
clear_flags
,
float
depth
,
DWORD
stencil
);
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
,
struct
wined3d_surface
*
dst_surface
,
DWORD
dst_location
,
const
RECT
*
dst_rect
,
const
struct
wined3d_color_key
*
color_key
,
enum
wined3d_texture_filter_type
filter
);
};
...
...
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