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
6a9476b6
Commit
6a9476b6
authored
Aug 15, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 16, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Correctly calculate the resource size for ATI2N surfaces.
parent
3a360130
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
surface_base.c
dlls/wined3d/surface_base.c
+4
-2
utils.c
dlls/wined3d/utils.c
+5
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/surface_base.c
View file @
6a9476b6
...
...
@@ -327,7 +327,8 @@ DWORD WINAPI IWineD3DBaseSurfaceImpl_GetPitch(IWineD3DSurface *iface) {
DWORD
ret
;
TRACE
(
"(%p)
\n
"
,
This
);
if
(
format_desc
->
Flags
&
WINED3DFMT_FLAG_COMPRESSED
)
if
((
format_desc
->
Flags
&
(
WINED3DFMT_FLAG_COMPRESSED
|
WINED3DFMT_FLAG_BROKEN_PITCH
))
==
WINED3DFMT_FLAG_COMPRESSED
)
{
/* Since compressed formats are block based, pitch means the amount of
* bytes to the next row of block rather than the next row of pixels. */
...
...
@@ -1860,7 +1861,8 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED3DL
TRACE
(
"Lock Rect (%p) = l %d, t %d, r %d, b %d
\n
"
,
pRect
,
pRect
->
left
,
pRect
->
top
,
pRect
->
right
,
pRect
->
bottom
);
if
(
format_desc
->
Flags
&
WINED3DFMT_FLAG_COMPRESSED
)
if
((
format_desc
->
Flags
&
(
WINED3DFMT_FLAG_COMPRESSED
|
WINED3DFMT_FLAG_BROKEN_PITCH
))
==
WINED3DFMT_FLAG_COMPRESSED
)
{
/* Compressed textures are block based, so calculate the offset of
* the block that contains the top-left pixel of the locked rectangle. */
...
...
dlls/wined3d/utils.c
View file @
6a9476b6
...
...
@@ -139,6 +139,9 @@ struct wined3d_format_base_flags
DWORD
flags
;
};
/* The ATI2N format behaves like an uncompressed format in LockRect(), but
* still needs to use the correct block based calculation for e.g. the
* resource size. */
static
const
struct
wined3d_format_base_flags
format_base_flags
[]
=
{
{
WINED3DFMT_UYVY
,
WINED3DFMT_FLAG_FOURCC
},
...
...
@@ -163,7 +166,7 @@ static const struct wined3d_format_base_flags format_base_flags[] =
{
WINED3DFMT_B4G4R4X4_UNORM
,
WINED3DFMT_FLAG_GETDC
},
{
WINED3DFMT_R8G8B8A8_UNORM
,
WINED3DFMT_FLAG_GETDC
},
{
WINED3DFMT_R8G8B8X8_UNORM
,
WINED3DFMT_FLAG_GETDC
},
{
WINED3DFMT_ATI2N
,
WINED3DFMT_FLAG_FOURCC
},
{
WINED3DFMT_ATI2N
,
WINED3DFMT_FLAG_FOURCC
|
WINED3DFMT_FLAG_BROKEN_PITCH
},
{
WINED3DFMT_NVHU
,
WINED3DFMT_FLAG_FOURCC
},
{
WINED3DFMT_NVHS
,
WINED3DFMT_FLAG_FOURCC
},
{
WINED3DFMT_R32_FLOAT
,
WINED3DFMT_FLAG_FLOAT
},
...
...
@@ -192,7 +195,7 @@ static const struct wined3d_format_compression_info format_compression_info[] =
{
WINED3DFMT_DXT3
,
4
,
4
,
16
},
{
WINED3DFMT_DXT4
,
4
,
4
,
16
},
{
WINED3DFMT_DXT5
,
4
,
4
,
16
},
{
WINED3DFMT_ATI2N
,
1
,
1
,
1
},
{
WINED3DFMT_ATI2N
,
4
,
4
,
16
},
};
struct
wined3d_format_vertex_info
...
...
dlls/wined3d/wined3d_private.h
View file @
6a9476b6
...
...
@@ -2942,6 +2942,7 @@ extern WINED3DFORMAT pixelformat_for_depth(DWORD depth) DECLSPEC_HIDDEN;
#define WINED3DFMT_FLAG_VTF 0x00002000
#define WINED3DFMT_FLAG_SHADOW 0x00004000
#define WINED3DFMT_FLAG_COMPRESSED 0x00008000
#define WINED3DFMT_FLAG_BROKEN_PITCH 0x00010000
struct
wined3d_format_desc
{
...
...
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