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
8141f893
Commit
8141f893
authored
Oct 26, 2023
by
Zebediah Figura
Committed by
Alexandre Julliard
Nov 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8/tests: Do not test sysmem textures in test_mipmap_upload().
This does not work reliably on Windows. The application in question uses a managed texture.
parent
4e1da07b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
45 deletions
+31
-45
visual.c
dlls/d3d8/tests/visual.c
+31
-45
No files found.
dlls/d3d8/tests/visual.c
View file @
8141f893
...
@@ -12129,11 +12129,11 @@ static void test_managed_reset(void)
...
@@ -12129,11 +12129,11 @@ static void test_managed_reset(void)
release_test_context
(
&
context
);
release_test_context
(
&
context
);
}
}
/* Some applications
lock a mipmapped texture at level 0, write every level at
/* Some applications
(Vivisector, Cryostasis) lock a mipmapped managed texture
* once, and expect it to be uploaded. */
*
at level 0, write every level at
once, and expect it to be uploaded. */
static
void
test_mipmap_upload
(
void
)
static
void
test_mipmap_upload
(
void
)
{
{
unsigned
int
i
,
j
,
width
,
level_count
;
unsigned
int
j
,
width
,
level_count
;
struct
d3d8_test_context
context
;
struct
d3d8_test_context
context
;
IDirect3DTexture8
*
texture
;
IDirect3DTexture8
*
texture
;
D3DLOCKED_RECT
locked_rect
;
D3DLOCKED_RECT
locked_rect
;
...
@@ -12141,64 +12141,50 @@ static void test_mipmap_upload(void)
...
@@ -12141,64 +12141,50 @@ static void test_mipmap_upload(void)
unsigned
int
*
mem
;
unsigned
int
*
mem
;
HRESULT
hr
;
HRESULT
hr
;
static
const
D3DPOOL
pools
[]
=
{
D3DPOOL_MANAGED
,
D3DPOOL_SYSTEMMEM
,
};
if
(
!
init_test_context
(
&
context
))
if
(
!
init_test_context
(
&
context
))
return
;
return
;
device
=
context
.
device
;
device
=
context
.
device
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
pools
);
++
i
)
hr
=
IDirect3DDevice8_CreateTexture
(
device
,
32
,
32
,
0
,
0
,
{
D3DFMT_A8R8G8B8
,
D3DPOOL_MANAGED
,
&
texture
);
winetest_push_context
(
"pool %#x"
,
pools
[
i
]);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IDirect3DDevice8_CreateTexture
(
device
,
32
,
32
,
0
,
0
,
D3DFMT_A8R8G8B8
,
pools
[
i
],
&
texture
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
level_count
=
IDirect3DBaseTexture8_GetLevelCount
(
texture
);
hr
=
IDirect3DTexture8_LockRect
(
texture
,
0
,
&
locked_rect
,
NULL
,
0
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
mem
=
locked_rect
.
pBits
;
level_count
=
IDirect3DBaseTexture8_GetLevelCount
(
texture
)
;
for
(
j
=
0
;
j
<
level_count
;
++
j
)
hr
=
IDirect3DTexture8_LockRect
(
texture
,
0
,
&
locked_rect
,
NULL
,
0
);
{
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
width
=
32
>>
j
;
memset
(
mem
,
0x11
*
(
j
+
1
),
width
*
width
*
4
);
mem
+=
width
*
width
;
}
hr
=
IDirect3DTexture8_UnlockRect
(
texture
,
0
);
mem
=
locked_rect
.
pBits
;
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
for
(
j
=
0
;
j
<
level_count
;
++
j
)
for
(
j
=
0
;
j
<
level_count
;
++
j
)
{
{
winetest_push_context
(
"level %u"
,
j
);
width
=
32
>>
j
;
memset
(
mem
,
0x11
*
(
j
+
1
),
width
*
width
*
4
);
mem
+=
width
*
width
;
}
hr
=
IDirect3DDevice8_Clear
(
device
,
0
,
NULL
,
D3DCLEAR_TARGET
,
0xffff0000
,
0
.
0
,
0
);
hr
=
IDirect3DTexture8_UnlockRect
(
texture
,
0
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IDirect3DDevice8_SetTextureStageState
(
device
,
0
,
D3DTSS_MIPFILTER
,
D3DTEXF_POINT
);
for
(
j
=
0
;
j
<
level_count
;
++
j
)
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
{
hr
=
IDirect3DDevice8_SetTextureStageState
(
device
,
0
,
D3DTSS_MAXMIPLEVEL
,
j
);
winetest_push_context
(
"level %u"
,
j
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
draw_textured_quad
(
&
context
,
texture
);
hr
=
IDirect3DDevice8_Clear
(
device
,
0
,
NULL
,
D3DCLEAR_TARGET
,
0xffff0000
,
0
.
0
,
0
);
/* AMD Windows drivers don't sample from sysmem textures. */
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
check_rt_color_broken
(
context
.
backbuffer
,
0x00111111
*
(
j
+
1
),
0x00000000
,
pools
[
i
]
==
D3DPOOL_SYSTEMMEM
);
winetest_pop_context
();
hr
=
IDirect3DDevice8_SetTextureStageState
(
device
,
0
,
D3DTSS_MIPFILTER
,
D3DTEXF_POINT
);
}
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IDirect3DDevice8_SetTextureStageState
(
device
,
0
,
D3DTSS_MAXMIPLEVEL
,
j
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
IDirect3DTexture8_Release
(
texture
);
draw_textured_quad
(
&
context
,
texture
);
check_rt_color
(
context
.
backbuffer
,
0x00111111
*
(
j
+
1
));
winetest_pop_context
();
winetest_pop_context
();
}
}
IDirect3DTexture8_Release
(
texture
);
release_test_context
(
&
context
);
release_test_context
(
&
context
);
}
}
...
...
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