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
f443b9e0
Commit
f443b9e0
authored
Apr 17, 2023
by
Giovanni Mascellani
Committed by
Alexandre Julliard
Apr 26, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat/tests: Test that the content of DXGI buffers is discarded when locking for writing.
parent
d073d3ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
mfplat.c
dlls/mfplat/tests/mfplat.c
+10
-1
No files found.
dlls/mfplat/tests/mfplat.c
View file @
f443b9e0
...
...
@@ -7442,7 +7442,8 @@ static void test_d3d11_surface_buffer(void)
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
/* Lock flags are honored, so reads and writes are discarded if
* the flags are not correct. */
* the flags are not correct. Also, previous content is discarded
* when locking for writing and not for reading. */
put_d3d11_texture_color
(
texture
,
0
,
0
,
0xcdcdcdcd
);
hr
=
IMF2DBuffer2_Lock2DSize
(
_2dbuffer2
,
MF2DBuffer_LockFlags_Read
,
&
data
,
&
pitch
,
&
data2
,
&
length
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
...
...
@@ -7458,6 +7459,14 @@ static void test_d3d11_surface_buffer(void)
hr
=
IMF2DBuffer2_Lock2DSize
(
_2dbuffer2
,
MF2DBuffer_LockFlags_Write
,
&
data
,
&
pitch
,
&
data2
,
&
length
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
*
(
DWORD
*
)
data
!=
0xefefefef
,
"Unexpected leading dword.
\n
"
);
IMF2DBuffer2_Unlock2D
(
_2dbuffer2
);
color
=
get_d3d11_texture_color
(
texture
,
0
,
0
);
ok
(
color
!=
0xefefefef
,
"Unexpected leading dword.
\n
"
);
hr
=
IMF2DBuffer2_Lock2DSize
(
_2dbuffer2
,
MF2DBuffer_LockFlags_Write
,
&
data
,
&
pitch
,
&
data2
,
&
length
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
*
(
DWORD
*
)
data
!=
0xefefefef
,
"Unexpected leading dword.
\n
"
);
memset
(
data
,
0x89
,
4
);
IMF2DBuffer2_Unlock2D
(
_2dbuffer2
);
...
...
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