Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
7d3f493d
Commit
7d3f493d
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 surface_download_data().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
be91fcd8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
surface.c
dlls/wined3d/surface.c
+3
-2
No files found.
dlls/wined3d/surface.c
View file @
7d3f493d
...
...
@@ -1054,8 +1054,8 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
if
(
texture
->
flags
&
WINED3D_TEXTURE_COND_NP2_EMULATED
)
{
const
BYTE
*
src_data
;
unsigned
int
h
,
y
;
BYTE
*
dst_data
;
UINT
y
;
/*
* Some games (e.g. warhammer 40k) don't work properly with the odd pitches, preventing
* the surface pitch from being used to box non-power2 textures. Instead we have to use a hack to
...
...
@@ -1104,7 +1104,8 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
src_data
=
mem
;
dst_data
=
data
.
addr
;
TRACE
(
"Repacking the surface data from pitch %u to pitch %u.
\n
"
,
src_row_pitch
,
dst_row_pitch
);
for
(
y
=
0
;
y
<
surface
->
resource
.
height
;
++
y
)
h
=
wined3d_texture_get_level_height
(
texture
,
surface
->
texture_level
);
for
(
y
=
0
;
y
<
h
;
++
y
)
{
memcpy
(
dst_data
,
src_data
,
dst_row_pitch
);
src_data
+=
src_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