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
071eb50f
Commit
071eb50f
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: Fix locking flags usage for DXGI buffers.
parent
df660e80
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
buffer.c
dlls/mfplat/buffer.c
+7
-0
mfplat.c
dlls/mfplat/tests/mfplat.c
+0
-4
No files found.
dlls/mfplat/buffer.c
View file @
071eb50f
...
...
@@ -1041,9 +1041,13 @@ static HRESULT dxgi_surface_buffer_lock(struct buffer *buffer, MF2DBuffer_LockFl
hr
=
MF_E_UNEXPECTED
;
else
if
(
!
buffer
->
_2d
.
locks
)
hr
=
dxgi_surface_buffer_map
(
buffer
);
else
if
(
buffer
->
_2d
.
lock_flags
==
MF2DBuffer_LockFlags_Write
&&
flags
!=
MF2DBuffer_LockFlags_Write
)
hr
=
HRESULT_FROM_WIN32
(
ERROR_WAS_LOCKED
);
if
(
SUCCEEDED
(
hr
))
{
if
(
!
buffer
->
_2d
.
locks
)
buffer
->
_2d
.
lock_flags
=
flags
;
buffer
->
_2d
.
locks
++
;
*
scanline0
=
buffer
->
dxgi_surface
.
map_desc
.
pData
;
*
pitch
=
buffer
->
dxgi_surface
.
map_desc
.
RowPitch
;
...
...
@@ -1087,7 +1091,10 @@ static HRESULT WINAPI dxgi_surface_buffer_Unlock2D(IMF2DBuffer2 *iface)
if
(
buffer
->
_2d
.
locks
)
{
if
(
!--
buffer
->
_2d
.
locks
)
{
dxgi_surface_buffer_unmap
(
buffer
);
buffer
->
_2d
.
lock_flags
=
0
;
}
}
else
hr
=
HRESULT_FROM_WIN32
(
ERROR_WAS_UNLOCKED
);
...
...
dlls/mfplat/tests/mfplat.c
View file @
071eb50f
...
...
@@ -7529,13 +7529,10 @@ 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
);
hr
=
IMF2DBuffer2_Lock2DSize
(
_2dbuffer2
,
MF2DBuffer_LockFlags_ReadWrite
,
&
data
,
&
pitch
,
&
data2
,
&
length
);
todo_wine
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_WAS_LOCKED
),
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer2_Lock2DSize
(
_2dbuffer2
,
MF2DBuffer_LockFlags_Read
,
&
data
,
&
pitch
,
&
data2
,
&
length
);
todo_wine
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_WAS_LOCKED
),
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer_Lock2D
(
_2d_buffer
,
&
data
,
&
pitch
);
todo_wine
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_WAS_LOCKED
),
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer2_Unlock2D
(
_2dbuffer2
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
...
...
@@ -7543,7 +7540,6 @@ static void test_d3d11_surface_buffer(void)
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMF2DBuffer2_Unlock2D
(
_2dbuffer2
);
todo_wine
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_WAS_UNLOCKED
),
"Unexpected hr %#lx.
\n
"
,
hr
);
IMF2DBuffer2_Release
(
_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