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
23cfa8a2
Commit
23cfa8a2
authored
Mar 25, 2023
by
Stefan Dösinger
Committed by
Alexandre Julliard
Mar 28, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw/tests: Native 64 bit ddraw has a video memory leak.
parent
723cd0a4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+10
-4
No files found.
dlls/ddraw/tests/ddraw7.c
View file @
23cfa8a2
...
...
@@ -9034,12 +9034,18 @@ static void test_create_surface_pitch(void)
hr
=
IDirectDraw7_CreateSurface
(
ddraw
,
&
surface_desc
,
&
primary
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create a primary surface, hr %#lx.
\n
"
,
hr
);
hr
=
IDirectDraw7_GetAvailableVidMem
(
ddraw
,
&
vidmem_caps
,
&
vidmem_total
,
&
vidmem_free
);
ok
(
SUCCEEDED
(
hr
)
||
hr
==
DDERR_NODIRECTDRAWHW
,
"Failed to get available video memory, hr %#lx.
\n
"
,
hr
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
test_data
);
++
i
)
{
/* 64 bit ddraw can leak video memory when trying to create a DDSCAPS_TEXTURE surface.
* Surface creation fails, but video memory is consumed anyway. Update the free vidmem
* every iteration.
*
* This E_NOINTERFACE texture creation failure does not happen in earlier versions of
* the API, so we get to release the surface and avoid the vidmem leak. */
hr
=
IDirectDraw7_GetAvailableVidMem
(
ddraw
,
&
vidmem_caps
,
&
vidmem_total
,
&
vidmem_free
);
ok
(
SUCCEEDED
(
hr
)
||
hr
==
DDERR_NODIRECTDRAWHW
,
"Failed to get available video memory, hr %#lx.
\n
"
,
hr
);
memset
(
&
surface_desc
,
0
,
sizeof
(
surface_desc
));
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
surface_desc
.
dwFlags
=
DDSD_CAPS
|
DDSD_WIDTH
|
DDSD_HEIGHT
|
DDSD_PIXELFORMAT
|
test_data
[
i
].
flags_in
;
...
...
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