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
d5dd78a4
Commit
d5dd78a4
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 read_from_framebuffer().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4ef9f113
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
surface.c
dlls/wined3d/surface.c
+6
-4
No files found.
dlls/wined3d/surface.c
View file @
d5dd78a4
...
...
@@ -1858,6 +1858,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
struct
wined3d_context
*
context
=
old_ctx
;
struct
wined3d_surface
*
restore_rt
=
NULL
;
unsigned
int
row_pitch
,
slice_pitch
;
unsigned
int
width
,
height
;
BYTE
*
mem
;
BYTE
*
row
,
*
top
,
*
bottom
;
int
i
;
...
...
@@ -1909,8 +1910,9 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
gl_info
->
gl_ops
.
gl
.
p_glPixelStorei
(
GL_PACK_ROW_LENGTH
,
row_pitch
/
texture
->
resource
.
format
->
byte_count
);
checkGLcall
(
"glPixelStorei"
);
gl_info
->
gl_ops
.
gl
.
p_glReadPixels
(
0
,
0
,
surface
->
resource
.
width
,
surface
->
resource
.
height
,
width
=
wined3d_texture_get_level_width
(
texture
,
surface
->
texture_level
);
height
=
wined3d_texture_get_level_height
(
texture
,
surface
->
texture_level
);
gl_info
->
gl_ops
.
gl
.
p_glReadPixels
(
0
,
0
,
width
,
height
,
texture
->
resource
.
format
->
glFormat
,
texture
->
resource
.
format
->
glType
,
data
.
addr
);
checkGLcall
(
"glReadPixels"
);
...
...
@@ -1936,8 +1938,8 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
mem
=
data
.
addr
;
top
=
mem
;
bottom
=
mem
+
row_pitch
*
(
surface
->
resource
.
height
-
1
);
for
(
i
=
0
;
i
<
surface
->
resource
.
height
/
2
;
i
++
)
bottom
=
mem
+
row_pitch
*
(
height
-
1
);
for
(
i
=
0
;
i
<
height
/
2
;
i
++
)
{
memcpy
(
row
,
top
,
row_pitch
);
memcpy
(
top
,
bottom
,
row_pitch
);
...
...
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