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
e5102126
Commit
e5102126
authored
Apr 05, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 06, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use the texture dimension helpers in fb_copy_to_texture_direct().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f05febcb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
surface.c
dlls/wined3d/surface.c
+4
-2
No files found.
dlls/wined3d/surface.c
View file @
e5102126
...
...
@@ -2082,6 +2082,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
struct
wined3d_context
*
context
;
BOOL
upsidedown
=
FALSE
;
RECT
dst_rect
=
*
dst_rect_in
;
unsigned
int
src_height
;
/* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag
* glCopyTexSubImage is a bit picky about the parameters we pass to it
...
...
@@ -2128,6 +2129,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
ERR
(
"Texture filtering not supported in direct blit
\n
"
);
}
src_height
=
wined3d_texture_get_level_height
(
src_texture
,
src_surface
->
texture_level
);
if
(
upsidedown
&&
!
((
xrel
-
1
.
0
f
<
-
eps
)
||
(
xrel
-
1
.
0
f
>
eps
))
&&
!
((
yrel
-
1
.
0
f
<
-
eps
)
||
(
yrel
-
1
.
0
f
>
eps
)))
...
...
@@ -2135,13 +2137,13 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
/* Upside down copy without stretching is nice, one glCopyTexSubImage call will do. */
gl_info
->
gl_ops
.
gl
.
p_glCopyTexSubImage2D
(
dst_surface
->
texture_target
,
dst_surface
->
texture_level
,
dst_rect
.
left
/*xoffset */
,
dst_rect
.
top
/* y offset */
,
src_rect
->
left
,
src_
surface
->
resource
.
height
-
src_rect
->
bottom
,
src_rect
->
left
,
src_height
-
src_rect
->
bottom
,
dst_rect
.
right
-
dst_rect
.
left
,
dst_rect
.
bottom
-
dst_rect
.
top
);
}
else
{
LONG
row
;
UINT
yoffset
=
src_
surface
->
resource
.
height
-
src_rect
->
top
+
dst_rect
.
top
-
1
;
UINT
yoffset
=
src_height
-
src_rect
->
top
+
dst_rect
.
top
-
1
;
/* I have to process this row by row to swap the image,
* otherwise it would be upside down, so stretching in y direction
* doesn't cost extra time
...
...
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