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
c3ee85b6
Commit
c3ee85b6
authored
Dec 19, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Dec 21, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Test GenerateMipSubLevels() on a managed texture.
parent
1a9c1d59
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
visual.c
dlls/d3d9/tests/visual.c
+34
-0
No files found.
dlls/d3d9/tests/visual.c
View file @
c3ee85b6
...
...
@@ -27876,6 +27876,39 @@ static void test_managed_reset(void)
release_test_context
(
&
context
);
}
static
void
test_managed_generate_mipmap
(
void
)
{
struct
d3d9_test_context
context
;
IDirect3DTexture9
*
texture
;
IDirect3DDevice9
*
device
;
HRESULT
hr
;
if
(
!
init_test_context
(
&
context
))
return
;
device
=
context
.
device
;
hr
=
IDirect3DDevice9_CreateTexture
(
device
,
16
,
16
,
0
,
D3DUSAGE_AUTOGENMIPMAP
,
D3DFMT_A8R8G8B8
,
D3DPOOL_MANAGED
,
&
texture
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
fill_texture
(
texture
,
0x0000ff00
,
0
);
IDirect3DTexture9_GenerateMipSubLevels
(
texture
);
hr
=
IDirect3DDevice9_Clear
(
device
,
0
,
NULL
,
D3DCLEAR_TARGET
,
0xffff0000
,
0
.
0
,
0
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_SetSamplerState
(
device
,
0
,
D3DSAMP_MIPFILTER
,
D3DTEXF_POINT
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_SetSamplerState
(
device
,
0
,
D3DSAMP_MAXMIPLEVEL
,
1
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
draw_textured_quad
(
&
context
,
texture
);
check_rt_color_todo
(
context
.
backbuffer
,
0x0000ff00
);
IDirect3DTexture9_Release
(
texture
);
release_test_context
(
&
context
);
}
START_TEST
(
visual
)
{
D3DADAPTER_IDENTIFIER9
identifier
;
...
...
@@ -28028,4 +28061,5 @@ START_TEST(visual)
test_dynamic_map_synchronization
();
test_filling_convention
();
test_managed_reset
();
test_managed_generate_mipmap
();
}
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