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
550abd41
Commit
550abd41
authored
Oct 06, 2010
by
Matteo Bruni
Committed by
Alexandre Julliard
Oct 18, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Fix D3DXFilterTexture return value.
parent
ebbf519b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
16 deletions
+7
-16
texture.c
dlls/d3dx9_36/tests/texture.c
+7
-13
texture.c
dlls/d3dx9_36/texture.c
+0
-3
No files found.
dlls/d3dx9_36/tests/texture.c
View file @
550abd41
...
...
@@ -359,11 +359,10 @@ static void test_D3DXCreateTexture(IDirect3DDevice9 *device)
hr
=
D3DXCreateTextureFromResourceA
(
device
,
NULL
,
MAKEINTRESOURCEA
(
IDB_BITMAP_1x1
),
&
texture
);
ok
(
hr
==
D3D_OK
,
"D3DXCreateTextureFromResource returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
if
(
SUCCEEDED
(
hr
))
IDirect3DTexture9_Release
(
texture
);
hr
=
D3DXCreateTextureFromResourceA
(
device
,
NULL
,
MAKEINTRESOURCEA
(
IDD_BITMAPDATA_1x1
),
&
texture
);
ok
(
hr
==
D3D_OK
,
"D3DXCreateTextureFromResource returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
if
(
SUCCEEDED
(
hr
))
IDirect3DTexture9_Release
(
texture
);
}
hr
=
D3DXCreateTextureFromResourceA
(
device
,
NULL
,
MAKEINTRESOURCEA
(
IDD_BITMAPDATA_1x1
),
&
texture
);
ok
(
hr
==
D3D_OK
,
"D3DXCreateTextureFromResource returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
if
(
SUCCEEDED
(
hr
))
IDirect3DTexture9_Release
(
texture
);
hr
=
D3DXCreateTextureFromResourceA
(
device
,
NULL
,
MAKEINTRESOURCEA
(
IDS_STRING
),
&
texture
);
ok
(
hr
==
D3DXERR_INVALIDDATA
,
"D3DXCreateTextureFromResource returned %#x, expected %#x
\n
"
,
hr
,
D3DXERR_INVALIDDATA
);
...
...
@@ -379,11 +378,9 @@ static void test_D3DXCreateTexture(IDirect3DDevice9 *device)
/* D3DXCreateTextureFromResourceEx */
todo_wine
{
hr
=
D3DXCreateTextureFromResourceExA
(
device
,
NULL
,
MAKEINTRESOURCEA
(
IDD_BITMAPDATA_1x1
),
D3DX_DEFAULT
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
D3DFMT_UNKNOWN
,
D3DPOOL_MANAGED
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
NULL
,
NULL
,
&
texture
);
ok
(
hr
==
D3D_OK
,
"D3DXCreateTextureFromResourceEx returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
if
(
SUCCEEDED
(
hr
))
IDirect3DTexture9_Release
(
texture
);
}
hr
=
D3DXCreateTextureFromResourceExA
(
device
,
NULL
,
MAKEINTRESOURCEA
(
IDD_BITMAPDATA_1x1
),
D3DX_DEFAULT
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
D3DFMT_UNKNOWN
,
D3DPOOL_MANAGED
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
NULL
,
NULL
,
&
texture
);
ok
(
hr
==
D3D_OK
,
"D3DXCreateTextureFromResourceEx returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
if
(
SUCCEEDED
(
hr
))
IDirect3DTexture9_Release
(
texture
);
hr
=
D3DXCreateTextureFromResourceExA
(
device
,
NULL
,
MAKEINTRESOURCEA
(
IDS_STRING
),
D3DX_DEFAULT
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
D3DFMT_UNKNOWN
,
D3DPOOL_MANAGED
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
NULL
,
NULL
,
&
texture
);
ok
(
hr
==
D3DXERR_INVALIDDATA
,
"D3DXCreateTextureFromResourceEx returned %#x, expected %#x
\n
"
,
hr
,
D3DXERR_INVALIDDATA
);
...
...
@@ -413,10 +410,7 @@ static void test_D3DXFilterTexture(IDirect3DDevice9 *device)
hr
=
D3DXFilterTexture
((
IDirect3DBaseTexture9
*
)
tex
,
NULL
,
0
,
D3DX_FILTER_BOX
+
1
);
/* Invalid filter */
ok
(
hr
==
D3DERR_INVALIDCALL
,
"D3DXFilterTexture returned %#x, expected %#x
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
hr
=
D3DXFilterTexture
((
IDirect3DBaseTexture9
*
)
tex
,
NULL
,
5
,
D3DX_FILTER_NONE
);
/* Last miplevel */
ok
(
hr
==
D3DERR_INVALIDCALL
,
"D3DXFilterTexture returned %#x, expected %#x
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
hr
=
D3DXFilterTexture
((
IDirect3DBaseTexture9
*
)
tex
,
NULL
,
20
,
D3DX_FILTER_NONE
);
/* Invalid miplevel */
hr
=
D3DXFilterTexture
((
IDirect3DBaseTexture9
*
)
tex
,
NULL
,
5
,
D3DX_FILTER_NONE
);
/* Invalid miplevel */
ok
(
hr
==
D3DERR_INVALIDCALL
,
"D3DXFilterTexture returned %#x, expected %#x
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
}
else
...
...
dlls/d3dx9_36/texture.c
View file @
550abd41
...
...
@@ -99,9 +99,6 @@ HRESULT WINAPI D3DXFilterTexture(LPDIRECT3DBASETEXTURE9 texture,
IDirect3DSurface9_Release
(
topsurf
);
if
(
level
==
srclevel
+
1
)
return
D3DERR_INVALIDCALL
;
return
D3D_OK
;
}
...
...
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