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
1e8befdb
Commit
1e8befdb
authored
Mar 19, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get resource info from the texture in read_from_framebuffer().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d65446af
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 @
1e8befdb
...
...
@@ -1992,7 +1992,8 @@ do { \
static
void
read_from_framebuffer
(
struct
wined3d_surface
*
surface
,
struct
wined3d_context
*
old_ctx
,
DWORD
dst_location
)
{
struct
wined3d_device
*
device
=
surface
->
resource
.
device
;
struct
wined3d_texture
*
texture
=
surface
->
container
;
struct
wined3d_device
*
device
=
texture
->
resource
.
device
;
const
struct
wined3d_gl_info
*
gl_info
;
struct
wined3d_context
*
context
=
old_ctx
;
struct
wined3d_surface
*
restore_rt
=
NULL
;
...
...
@@ -2018,7 +2019,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
* There is no need to keep track of the current read buffer or reset it, every part of the code
* that reads sets the read buffer as desired.
*/
if
(
wined3d_resource_is_offscreen
(
&
surface
->
container
->
resource
))
if
(
wined3d_resource_is_offscreen
(
&
texture
->
resource
))
{
/* Mapping the primary render target which is not on a swapchain.
* Read from the back buffer. */
...
...
@@ -2042,16 +2043,16 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
checkGLcall
(
"glBindBuffer"
);
}
wined3d_texture_get_pitch
(
surface
->
container
,
surface
->
texture_level
,
&
row_pitch
,
&
slice_pitch
);
wined3d_texture_get_pitch
(
texture
,
surface
->
texture_level
,
&
row_pitch
,
&
slice_pitch
);
/* Setup pixel store pack state -- to glReadPixels into the correct place */
gl_info
->
gl_ops
.
gl
.
p_glPixelStorei
(
GL_PACK_ROW_LENGTH
,
row_pitch
/
surfac
e
->
resource
.
format
->
byte_count
);
gl_info
->
gl_ops
.
gl
.
p_glPixelStorei
(
GL_PACK_ROW_LENGTH
,
row_pitch
/
textur
e
->
resource
.
format
->
byte_count
);
checkGLcall
(
"glPixelStorei"
);
gl_info
->
gl_ops
.
gl
.
p_glReadPixels
(
0
,
0
,
surface
->
resource
.
width
,
surface
->
resource
.
height
,
surfac
e
->
resource
.
format
->
glFormat
,
surfac
e
->
resource
.
format
->
glType
,
data
.
addr
);
textur
e
->
resource
.
format
->
glFormat
,
textur
e
->
resource
.
format
->
glType
,
data
.
addr
);
checkGLcall
(
"glReadPixels"
);
/* Reset previous pixel store pack state */
...
...
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