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
aa1d24f0
Commit
aa1d24f0
authored
May 12, 2013
by
Christian Costa
Committed by
Alexandre Julliard
May 14, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9_36: Report D3DFMT_P8 for image with indexed colors in D3DGetImageInfoFromFileInMemory.
parent
4b9d81b4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
surface.c
dlls/d3dx9_36/surface.c
+3
-3
surface.c
dlls/d3dx9_36/tests/surface.c
+5
-5
No files found.
dlls/d3dx9_36/surface.c
View file @
aa1d24f0
...
...
@@ -37,9 +37,9 @@ static const struct
const
GUID
*
wic_guid
;
D3DFORMAT
d3dformat
;
}
wic_pixel_formats
[]
=
{
{
&
GUID_WICPixelFormat8bppIndexed
,
D3DFMT_
L
8
},
{
&
GUID_WICPixelFormat1bppIndexed
,
D3DFMT_
L
8
},
{
&
GUID_WICPixelFormat4bppIndexed
,
D3DFMT_
L
8
},
{
&
GUID_WICPixelFormat8bppIndexed
,
D3DFMT_
P
8
},
{
&
GUID_WICPixelFormat1bppIndexed
,
D3DFMT_
P
8
},
{
&
GUID_WICPixelFormat4bppIndexed
,
D3DFMT_
P
8
},
{
&
GUID_WICPixelFormat16bppBGR555
,
D3DFMT_X1R5G5B5
},
{
&
GUID_WICPixelFormat16bppBGR565
,
D3DFMT_R5G6B5
},
{
&
GUID_WICPixelFormat24bppBGR
,
D3DFMT_R8G8B8
},
...
...
dlls/d3dx9_36/tests/surface.c
View file @
aa1d24f0
...
...
@@ -481,17 +481,17 @@ static void test_D3DXGetImageInfo(void)
hr
=
D3DXGetImageInfoFromFileInMemory
(
bmp_1bpp
,
sizeof
(
bmp_1bpp
),
&
info
);
ok
(
hr
==
D3D_OK
,
"D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
ok
(
info
.
Depth
==
1
,
"Got depth %u, expected 1
\n
"
,
info
.
Depth
);
todo_wine
ok
(
info
.
Format
==
D3DFMT_P8
,
"Got format %u, expected %u
\n
"
,
info
.
Format
,
D3DFMT_P8
);
ok
(
info
.
Format
==
D3DFMT_P8
,
"Got format %u, expected %u
\n
"
,
info
.
Format
,
D3DFMT_P8
);
hr
=
D3DXGetImageInfoFromFileInMemory
(
bmp_2bpp
,
sizeof
(
bmp_2bpp
),
&
info
);
ok
(
hr
==
D3DXERR_INVALIDDATA
,
"D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x
\n
"
,
hr
,
D3DXERR_INVALIDDATA
);
hr
=
D3DXGetImageInfoFromFileInMemory
(
bmp_4bpp
,
sizeof
(
bmp_4bpp
),
&
info
);
ok
(
hr
==
D3D_OK
,
"D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
ok
(
info
.
Depth
==
1
,
"Got depth %u, expected 1
\n
"
,
info
.
Depth
);
todo_wine
ok
(
info
.
Format
==
D3DFMT_P8
,
"Got format %u, expected %u
\n
"
,
info
.
Format
,
D3DFMT_P8
);
ok
(
info
.
Format
==
D3DFMT_P8
,
"Got format %u, expected %u
\n
"
,
info
.
Format
,
D3DFMT_P8
);
hr
=
D3DXGetImageInfoFromFileInMemory
(
bmp_8bpp
,
sizeof
(
bmp_8bpp
),
&
info
);
ok
(
hr
==
D3D_OK
,
"D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
ok
(
info
.
Depth
==
1
,
"Got depth %u, expected 1
\n
"
,
info
.
Depth
);
todo_wine
ok
(
info
.
Format
==
D3DFMT_P8
,
"Got format %u, expected %u
\n
"
,
info
.
Format
,
D3DFMT_P8
);
ok
(
info
.
Format
==
D3DFMT_P8
,
"Got format %u, expected %u
\n
"
,
info
.
Format
,
D3DFMT_P8
);
/* test DDS support */
hr
=
D3DXGetImageInfoFromFileInMemory
(
dds_24bit
,
sizeof
(
dds_24bit
),
&
info
);
...
...
@@ -646,7 +646,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
/* D3DXLoadSurfaceFromFile */
if
(
testbitmap_ok
)
{
hr
=
D3DXLoadSurfaceFromFileA
(
surf
,
NULL
,
NULL
,
"testbitmap.bmp"
,
NULL
,
D3DX_DEFAULT
,
0
,
NULL
);
ok
(
hr
==
D3D_OK
,
"D3DXLoadSurfaceFromFile returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
todo_wine
ok
(
hr
==
D3D_OK
,
"D3DXLoadSurfaceFromFile returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
hr
=
D3DXLoadSurfaceFromFileA
(
NULL
,
NULL
,
NULL
,
"testbitmap.bmp"
,
NULL
,
D3DX_DEFAULT
,
0
,
NULL
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"D3DXLoadSurfaceFromFile returned %#x, expected %#x
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
...
...
@@ -683,7 +683,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
/* D3DXLoadSurfaceFromFileInMemory */
hr
=
D3DXLoadSurfaceFromFileInMemory
(
surf
,
NULL
,
NULL
,
bmp_1bpp
,
sizeof
(
bmp_1bpp
),
NULL
,
D3DX_DEFAULT
,
0
,
NULL
);
ok
(
hr
==
D3D_OK
,
"D3DXLoadSurfaceFromFileInMemory returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
todo_wine
ok
(
hr
==
D3D_OK
,
"D3DXLoadSurfaceFromFileInMemory returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
hr
=
D3DXLoadSurfaceFromFileInMemory
(
surf
,
NULL
,
NULL
,
noimage
,
sizeof
(
noimage
),
NULL
,
D3DX_DEFAULT
,
0
,
NULL
);
ok
(
hr
==
D3DXERR_INVALIDDATA
,
"D3DXLoadSurfaceFromFileInMemory returned %#x, expected %#x
\n
"
,
hr
,
D3DXERR_INVALIDDATA
);
...
...
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