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
c526188b
Commit
c526188b
authored
Mar 22, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 23, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get resource info from the texture in surface_blt_to_drawable().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3c7ca3d5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
surface.c
dlls/wined3d/surface.c
+7
-6
No files found.
dlls/wined3d/surface.c
View file @
c526188b
...
...
@@ -2512,6 +2512,8 @@ static void surface_blt_to_drawable(const struct wined3d_device *device,
struct
wined3d_surface
*
src_surface
,
const
RECT
*
src_rect_in
,
struct
wined3d_surface
*
dst_surface
,
const
RECT
*
dst_rect_in
)
{
struct
wined3d_texture
*
src_texture
=
src_surface
->
container
;
struct
wined3d_texture
*
dst_texture
=
dst_surface
->
container
;
const
struct
wined3d_gl_info
*
gl_info
;
struct
wined3d_context
*
context
=
old_ctx
;
struct
wined3d_surface
*
restore_rt
=
NULL
;
...
...
@@ -2532,12 +2534,12 @@ static void surface_blt_to_drawable(const struct wined3d_device *device,
/* Make sure the surface is up-to-date. This should probably use
* surface_load_location() and worry about the destination surface too,
* unless we're overwriting it completely. */
wined3d_texture_load
(
src_
surface
->
container
,
context
,
FALSE
);
wined3d_texture_load
(
src_
texture
,
context
,
FALSE
);
/* Activate the destination context, set it up for blitting */
context_apply_blit_state
(
context
,
device
);
if
(
!
wined3d_resource_is_offscreen
(
&
dst_
surface
->
container
->
resource
))
if
(
!
wined3d_resource_is_offscreen
(
&
dst_
texture
->
resource
))
surface_translate_drawable_coords
(
dst_surface
,
context
->
win_handle
,
&
dst_rect
);
device
->
blitter
->
set_shader
(
device
->
blit_priv
,
context
,
src_surface
,
NULL
);
...
...
@@ -2550,9 +2552,9 @@ static void surface_blt_to_drawable(const struct wined3d_device *device,
/* For P8 surfaces, the alpha component contains the palette index.
* Which means that the colorkey is one of the palette entries. In
* other cases pixels that should be masked away have alpha set to 0. */
if
(
src_
surfac
e
->
resource
.
format
->
id
==
WINED3DFMT_P8_UINT
)
if
(
src_
textur
e
->
resource
.
format
->
id
==
WINED3DFMT_P8_UINT
)
gl_info
->
gl_ops
.
gl
.
p_glAlphaFunc
(
GL_NOTEQUAL
,
(
float
)
src_
surface
->
container
->
async
.
src_blt_color_key
.
color_space_low_value
/
255
.
0
f
);
(
float
)
src_
texture
->
async
.
src_blt_color_key
.
color_space_low_value
/
255
.
0
f
);
else
gl_info
->
gl_ops
.
gl
.
p_glAlphaFunc
(
GL_NOTEQUAL
,
0
.
0
f
);
checkGLcall
(
"glAlphaFunc"
);
...
...
@@ -2575,8 +2577,7 @@ static void surface_blt_to_drawable(const struct wined3d_device *device,
device
->
blitter
->
unset_shader
(
context
->
gl_info
);
if
(
wined3d_settings
.
strict_draw_ordering
||
(
dst_surface
->
container
->
swapchain
&&
dst_surface
->
container
->
swapchain
->
front_buffer
==
dst_surface
->
container
))
||
(
dst_texture
->
swapchain
&&
dst_texture
->
swapchain
->
front_buffer
==
dst_texture
))
gl_info
->
gl_ops
.
gl
.
p_glFlush
();
/* Flush to ensure ordering across contexts. */
if
(
restore_rt
)
...
...
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