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
156d24c6
Commit
156d24c6
authored
Aug 21, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 22, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add compressed surface support to surface_cpu_blt().
parent
8e904f95
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
9 deletions
+34
-9
surface.c
dlls/wined3d/surface.c
+34
-9
No files found.
dlls/wined3d/surface.c
View file @
156d24c6
...
...
@@ -6569,15 +6569,6 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
wined3d_surface_map
(
dst_surface
,
&
dlock
,
NULL
,
0
);
}
if
(
src_format
->
flags
&
dst_format
->
flags
&
WINED3DFMT_FLAG_FOURCC
)
{
if
(
!
dst_rect
||
src_surface
==
dst_surface
)
{
memcpy
(
dlock
.
pBits
,
slock
.
pBits
,
dst_surface
->
resource
.
size
);
goto
release
;
}
}
bpp
=
dst_surface
->
resource
.
format
->
byte_count
;
srcheight
=
xsrc
.
bottom
-
xsrc
.
top
;
srcwidth
=
xsrc
.
right
-
xsrc
.
left
;
...
...
@@ -6585,6 +6576,40 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
dstwidth
=
xdst
.
right
-
xdst
.
left
;
width
=
(
xdst
.
right
-
xdst
.
left
)
*
bpp
;
if
(
src_format
->
flags
&
dst_format
->
flags
&
WINED3DFMT_FLAG_COMPRESSED
)
{
UINT
row_block_count
;
if
(
flags
||
src_surface
==
dst_surface
)
{
FIXME
(
"Only plain blits supported on compressed surfaces.
\n
"
);
hr
=
E_NOTIMPL
;
goto
release
;
}
TRACE
(
"%s -> %s copy.
\n
"
,
debug_d3dformat
(
src_format
->
id
),
debug_d3dformat
(
dst_format
->
id
));
if
(
srcheight
!=
dstheight
||
srcwidth
!=
dstwidth
)
{
WARN
(
"Stretching not supported on compressed surfaces.
\n
"
);
hr
=
WINED3DERR_INVALIDCALL
;
goto
release
;
}
dbuf
=
dlock
.
pBits
;
sbuf
=
slock
.
pBits
;
row_block_count
=
(
dstwidth
+
dst_format
->
block_width
-
1
)
/
dst_format
->
block_width
;
for
(
y
=
0
;
y
<
dstheight
;
y
+=
dst_format
->
block_height
)
{
memcpy
(
dbuf
,
sbuf
,
row_block_count
*
dst_format
->
block_byte_count
);
dbuf
+=
dlock
.
Pitch
;
sbuf
+=
slock
.
Pitch
;
}
goto
release
;
}
if
(
dst_rect
&&
src_surface
!=
dst_surface
)
dbuf
=
dlock
.
pBits
;
else
...
...
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