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
d1187889
Commit
d1187889
authored
Mar 06, 2017
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Check rectangle alignment in wined3d_surface_blt().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fbff59ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
surface.c
dlls/wined3d/surface.c
+16
-16
No files found.
dlls/wined3d/surface.c
View file @
d1187889
...
...
@@ -3183,22 +3183,6 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
goto
release
;
}
if
(
!
wined3d_texture_check_block_align
(
src_texture
,
src_sub_resource_idx
%
src_texture
->
level_count
,
src_box
))
{
WARN
(
"Source rectangle not block-aligned.
\n
"
);
hr
=
WINED3DERR_INVALIDCALL
;
goto
release
;
}
if
(
!
wined3d_texture_check_block_align
(
dst_texture
,
dst_sub_resource_idx
%
dst_texture
->
level_count
,
dst_box
))
{
WARN
(
"Destination rectangle not block-aligned.
\n
"
);
hr
=
WINED3DERR_INVALIDCALL
;
goto
release
;
}
hr
=
surface_cpu_blt_compressed
(
sbase
,
dbuf
,
src_map
.
row_pitch
,
dst_map
.
row_pitch
,
dst_width
,
dst_height
,
src_format
,
flags
,
fx
);
...
...
@@ -3684,6 +3668,14 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
return
WINEDDERR_INVALIDRECT
;
}
if
((
dst_texture
->
resource
.
format_flags
&
WINED3DFMT_FLAG_BLOCKS
)
&&
!
wined3d_texture_check_block_align
(
dst_texture
,
dst_sub_resource_idx
%
dst_texture
->
level_count
,
&
dst_box
))
{
WARN
(
"Destination rectangle not block-aligned.
\n
"
);
return
WINED3DERR_INVALIDCALL
;
}
if
(
src_texture
)
{
src_w
=
wined3d_texture_get_level_width
(
src_texture
,
src_surface
->
texture_level
);
...
...
@@ -3696,6 +3688,14 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
WARN
(
"The application gave us a bad source rectangle.
\n
"
);
return
WINEDDERR_INVALIDRECT
;
}
if
((
src_texture
->
resource
.
format_flags
&
WINED3DFMT_FLAG_BLOCKS
)
&&
!
wined3d_texture_check_block_align
(
src_texture
,
src_sub_resource_idx
%
src_texture
->
level_count
,
&
src_box
))
{
WARN
(
"Source rectangle not block-aligned.
\n
"
);
return
WINED3DERR_INVALIDCALL
;
}
}
if
(
!
fx
||
!
(
fx
->
fx
))
...
...
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