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
05914424
Commit
05914424
authored
Mar 31, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 31, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Care for things like pitch and blocksize when copying DXT surfaces.
parent
9ef184c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
2 deletions
+35
-2
surface_base.c
dlls/wined3d/surface_base.c
+35
-2
No files found.
dlls/wined3d/surface_base.c
View file @
05914424
...
...
@@ -1664,6 +1664,10 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_BltFast(IWineD3DSurface *iface, DWORD dst
/* Handle first the FOURCC surfaces... */
if
(
sEntry
->
Flags
&
dEntry
->
Flags
&
WINED3DFMT_FLAG_FOURCC
)
{
UINT
block_width
;
UINT
block_height
;
UINT
block_byte_size
;
TRACE
(
"Fourcc -> Fourcc copy
\n
"
);
if
(
trans
)
FIXME
(
"trans arg not supported when a FOURCC surface is involved
\n
"
);
...
...
@@ -1675,8 +1679,37 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_BltFast(IWineD3DSurface *iface, DWORD dst
ret
=
WINED3DERR_WRONGTEXTUREFORMAT
;
goto
error
;
}
/* FIXME: Watch out that the size is correct for FOURCC surfaces */
memcpy
(
dbuf
,
sbuf
,
This
->
resource
.
size
);
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
;
}
for
(
y
=
0
;
y
<
h
;
y
+=
block_height
)
{
memcpy
(
dbuf
,
sbuf
,
(
w
/
block_width
)
*
block_byte_size
);
dbuf
+=
dlock
.
Pitch
;
sbuf
+=
slock
.
Pitch
;
}
goto
error
;
}
if
((
sEntry
->
Flags
&
WINED3DFMT_FLAG_FOURCC
)
&&
!
(
dEntry
->
Flags
&
WINED3DFMT_FLAG_FOURCC
))
...
...
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