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
8c30612d
Commit
8c30612d
authored
Apr 11, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 12, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use the texture dimension helpers in surface_load_location().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c4f7bdcf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
surface.c
dlls/wined3d/surface.c
+7
-4
No files found.
dlls/wined3d/surface.c
View file @
8c30612d
...
...
@@ -3219,14 +3219,17 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
unsigned
int
sub_resource_idx
=
surface_get_sub_resource_idx
(
surface
);
struct
wined3d_texture
*
texture
=
surface
->
container
;
struct
wined3d_texture_sub_resource
*
sub_resource
;
unsigned
int
surface_w
,
surface_h
;
HRESULT
hr
;
TRACE
(
"surface %p, location %s.
\n
"
,
surface
,
wined3d_debug_location
(
location
));
surface_w
=
wined3d_texture_get_level_width
(
texture
,
surface
->
texture_level
);
surface_h
=
wined3d_texture_get_level_height
(
texture
,
surface
->
texture_level
);
sub_resource
=
&
texture
->
sub_resources
[
sub_resource_idx
];
if
(
sub_resource
->
locations
&
location
&&
(
!
(
texture
->
resource
.
usage
&
WINED3DUSAGE_DEPTHSTENCIL
)
||
(
surface
->
ds_current_size
.
cx
==
surface
->
resource
.
width
&&
surface
->
ds_current_size
.
cy
==
surface
->
resource
.
height
)))
||
(
surface
->
ds_current_size
.
cx
==
surface_w
&&
surface
->
ds_current_size
.
cy
==
surface_h
)))
{
TRACE
(
"Location (%#x) is already up to date.
\n
"
,
location
);
return
WINED3D_OK
;
...
...
@@ -3306,8 +3309,8 @@ done:
if
(
texture
->
resource
.
usage
&
WINED3DUSAGE_DEPTHSTENCIL
)
{
surface
->
ds_current_size
.
cx
=
surface
->
resource
.
width
;
surface
->
ds_current_size
.
cy
=
surface
->
resource
.
height
;
surface
->
ds_current_size
.
cx
=
surface
_w
;
surface
->
ds_current_size
.
cy
=
surface
_h
;
}
if
(
location
!=
WINED3D_LOCATION_SYSMEM
&&
(
sub_resource
->
locations
&
WINED3D_LOCATION_SYSMEM
))
...
...
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