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
365948bf
Commit
365948bf
authored
Mar 02, 2018
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Explicitly pass the sub-resource level to surface_is_full_rect().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
97c7b6ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
surface.c
dlls/wined3d/surface.c
+6
-6
No files found.
dlls/wined3d/surface.c
View file @
365948bf
...
...
@@ -246,14 +246,14 @@ static void get_color_masks(const struct wined3d_format *format, DWORD *masks)
masks
[
2
]
=
((
1u
<<
format
->
blue_size
)
-
1
)
<<
format
->
blue_offset
;
}
static
BOOL
surface_is_full_rect
(
const
struct
wined3d_surface
*
surface
,
const
RECT
*
r
)
static
BOOL
texture2d_is_full_rect
(
const
struct
wined3d_texture
*
texture
,
unsigned
int
level
,
const
RECT
*
r
)
{
unsigned
int
t
;
t
=
wined3d_texture_get_level_width
(
surface
->
container
,
surface
->
texture_
level
);
t
=
wined3d_texture_get_level_width
(
texture
,
level
);
if
((
r
->
left
&&
r
->
right
)
||
abs
(
r
->
right
-
r
->
left
)
!=
t
)
return
FALSE
;
t
=
wined3d_texture_get_level_height
(
surface
->
container
,
surface
->
texture_
level
);
t
=
wined3d_texture_get_level_height
(
texture
,
level
);
if
((
r
->
top
&&
r
->
bottom
)
||
abs
(
r
->
bottom
-
r
->
top
)
!=
t
)
return
FALSE
;
return
TRUE
;
...
...
@@ -313,7 +313,7 @@ static void surface_depth_blt_fbo(const struct wined3d_device *device,
/* Make sure the locations are up-to-date. Loading the destination
* surface isn't required if the entire surface is overwritten. */
wined3d_texture_load_location
(
src_texture
,
src_sub_resource_idx
,
context
,
src_location
);
if
(
!
surface_is_full_rect
(
dst_surface
,
dst_rect
))
if
(
!
texture2d_is_full_rect
(
dst_texture
,
dst_sub_resource_idx
%
dst_texture
->
level_count
,
dst_rect
))
wined3d_texture_load_location
(
dst_texture
,
dst_sub_resource_idx
,
context
,
dst_location
);
else
wined3d_texture_prepare_location
(
dst_texture
,
dst_sub_resource_idx
,
context
,
dst_location
);
...
...
@@ -419,7 +419,7 @@ static void surface_blt_fbo(const struct wined3d_device *device,
* in fact harmful if we're being called by surface_load_location() with
* the purpose of loading the destination surface.) */
wined3d_texture_load_location
(
src_texture
,
src_sub_resource_idx
,
old_ctx
,
src_location
);
if
(
!
surface_is_full_rect
(
dst_surface
,
&
dst_rect
))
if
(
!
texture2d_is_full_rect
(
dst_texture
,
dst_sub_resource_idx
%
dst_texture
->
level_count
,
&
dst_rect
))
wined3d_texture_load_location
(
dst_texture
,
dst_sub_resource_idx
,
old_ctx
,
dst_location
);
else
wined3d_texture_prepare_location
(
dst_texture
,
dst_sub_resource_idx
,
old_ctx
,
dst_location
);
...
...
@@ -2679,7 +2679,7 @@ static DWORD raw_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_blit
if
(
!
location
)
location
=
dst_texture
->
flags
&
WINED3D_TEXTURE_IS_SRGB
?
WINED3D_LOCATION_TEXTURE_SRGB
:
WINED3D_LOCATION_TEXTURE_RGB
;
if
(
surface_is_full_rect
(
dst_surface
,
dst_rect
))
if
(
texture2d_is_full_rect
(
dst_texture
,
dst_level
,
dst_rect
))
{
if
(
!
wined3d_texture_prepare_location
(
dst_texture
,
dst_sub_resource_idx
,
context
,
location
))
ERR
(
"Failed to prepare the destination sub-resource into %s.
\n
"
,
wined3d_debug_location
(
location
));
...
...
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