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
e83fa982
Commit
e83fa982
authored
Jun 10, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 10, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use the format info for doing compressed surface blits in BltFast().
parent
61fd875b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
36 deletions
+10
-36
surface_base.c
dlls/wined3d/surface_base.c
+10
-36
No files found.
dlls/wined3d/surface_base.c
View file @
e83fa982
...
...
@@ -1650,65 +1650,39 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_BltFast(IWineD3DSurface *iface, DWORD dst
dEntry
=
This
->
resource
.
format_desc
;
}
/* Handle
first the FOURCC surfaces
... */
if
(
sEntry
->
Flags
&
dEntry
->
Flags
&
WINED3DFMT_FLAG_
FOURCC
)
/* Handle
compressed surfaces first
... */
if
(
sEntry
->
Flags
&
dEntry
->
Flags
&
WINED3DFMT_FLAG_
COMPRESSED
)
{
UINT
block_width
;
UINT
block_height
;
UINT
block_byte_size
;
UINT
row_block_count
;
TRACE
(
"
Fourcc -> Fourcc
copy
\n
"
);
TRACE
(
"
compressed -> compressed
copy
\n
"
);
if
(
trans
)
FIXME
(
"trans arg not supported when a
FOURCC
surface is involved
\n
"
);
FIXME
(
"trans arg not supported when a
compressed
surface is involved
\n
"
);
if
(
dstx
||
dsty
)
FIXME
(
"offset for destination surface is not supported
\n
"
);
if
(
Src
->
resource
.
format_desc
->
format
!=
This
->
resource
.
format_desc
->
format
)
{
FIXME
(
"
FOURCC->FOURCC
copy only supported for the same type of surface
\n
"
);
FIXME
(
"
compressed -> compressed
copy only supported for the same type of surface
\n
"
);
ret
=
WINED3DERR_WRONGTEXTUREFORMAT
;
goto
error
;
}
if
(
This
->
resource
.
format_desc
->
format
==
WINED3DFMT_DXT1
)
{
block_width
=
4
;
block_height
=
4
;
block_byte_size
=
8
;
}
else
if
(
This
->
resource
.
format_desc
->
format
==
WINED3DFMT_DXT2
||
This
->
resource
.
format_desc
->
format
==
WINED3DFMT_DXT3
||
This
->
resource
.
format_desc
->
format
==
WINED3DFMT_DXT4
||
This
->
resource
.
format_desc
->
format
==
WINED3DFMT_DXT5
)
{
block_width
=
4
;
block_height
=
4
;
block_byte_size
=
16
;
}
else
{
FIXME
(
"Unsupported FourCC format %s.
\n
"
,
debug_d3dformat
(
This
->
resource
.
format_desc
->
format
));
block_width
=
1
;
block_height
=
1
;
block_byte_size
=
This
->
resource
.
format_desc
->
byte_count
;
}
row_block_count
=
(
w
+
block_width
-
1
)
/
block_width
;
for
(
y
=
0
;
y
<
h
;
y
+=
block_height
)
row_block_count
=
(
w
+
dEntry
->
block_width
-
1
)
/
dEntry
->
block_width
;
for
(
y
=
0
;
y
<
h
;
y
+=
dEntry
->
block_height
)
{
memcpy
(
dbuf
,
sbuf
,
row_block_count
*
block_byte_size
);
memcpy
(
dbuf
,
sbuf
,
row_block_count
*
dEntry
->
block_byte_count
);
dbuf
+=
dlock
.
Pitch
;
sbuf
+=
slock
.
Pitch
;
}
goto
error
;
}
if
((
sEntry
->
Flags
&
WINED3DFMT_FLAG_
FOURCC
)
&&
!
(
dEntry
->
Flags
&
WINED3DFMT_FLAG_FOURCC
))
if
((
sEntry
->
Flags
&
WINED3DFMT_FLAG_
COMPRESSED
)
&&
!
(
dEntry
->
Flags
&
WINED3DFMT_FLAG_COMPRESSED
))
{
/* TODO: Use the libtxc_dxtn.so shared library to do
* software decompression
*/
ERR
(
"
DXTC decompression not supported by now
\n
"
);
ERR
(
"
Software decompression not supported.
\n
"
);
goto
error
;
}
...
...
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