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
70f4e66f
Commit
70f4e66f
authored
Oct 15, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: IWineD3DBuffer_Unmap() can't fail.
parent
1fa33658
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
41 deletions
+17
-41
buffer.c
dlls/d3d8/buffer.c
+4
-8
buffer.c
dlls/d3d9/buffer.c
+4
-8
device.c
dlls/ddraw/device.c
+1
-7
vertexbuffer.c
dlls/ddraw/vertexbuffer.c
+2
-3
buffer.c
dlls/wined3d/buffer.c
+5
-14
wined3d.idl
include/wine/wined3d.idl
+1
-1
No files found.
dlls/d3d8/buffer.c
View file @
70f4e66f
...
...
@@ -197,15 +197,13 @@ static HRESULT WINAPI d3d8_vertexbuffer_Lock(IDirect3DVertexBuffer8 *iface,
static
HRESULT
WINAPI
d3d8_vertexbuffer_Unlock
(
IDirect3DVertexBuffer8
*
iface
)
{
HRESULT
hr
;
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
hr
=
IWineD3DBuffer_Unmap
(((
IDirect3DVertexBuffer8Impl
*
)
iface
)
->
wineD3DVertexBuffer
);
IWineD3DBuffer_Unmap
(((
IDirect3DVertexBuffer8Impl
*
)
iface
)
->
wineD3DVertexBuffer
);
wined3d_mutex_unlock
();
return
hr
;
return
D3D_OK
;
}
static
HRESULT
WINAPI
d3d8_vertexbuffer_GetDesc
(
IDirect3DVertexBuffer8
*
iface
,
D3DVERTEXBUFFER_DESC
*
desc
)
...
...
@@ -461,15 +459,13 @@ static HRESULT WINAPI d3d8_indexbuffer_Lock(IDirect3DIndexBuffer8 *iface,
static
HRESULT
WINAPI
d3d8_indexbuffer_Unlock
(
IDirect3DIndexBuffer8
*
iface
)
{
HRESULT
hr
;
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
hr
=
IWineD3DBuffer_Unmap
(((
IDirect3DIndexBuffer8Impl
*
)
iface
)
->
wineD3DIndexBuffer
);
IWineD3DBuffer_Unmap
(((
IDirect3DIndexBuffer8Impl
*
)
iface
)
->
wineD3DIndexBuffer
);
wined3d_mutex_unlock
();
return
hr
;
return
D3D_OK
;
}
static
HRESULT
WINAPI
d3d8_indexbuffer_GetDesc
(
IDirect3DIndexBuffer8
*
iface
,
D3DINDEXBUFFER_DESC
*
desc
)
...
...
dlls/d3d9/buffer.c
View file @
70f4e66f
...
...
@@ -199,15 +199,13 @@ static HRESULT WINAPI d3d9_vertexbuffer_Lock(IDirect3DVertexBuffer9 *iface,
static
HRESULT
WINAPI
d3d9_vertexbuffer_Unlock
(
IDirect3DVertexBuffer9
*
iface
)
{
HRESULT
hr
;
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
hr
=
IWineD3DBuffer_Unmap
(((
IDirect3DVertexBuffer9Impl
*
)
iface
)
->
wineD3DVertexBuffer
);
IWineD3DBuffer_Unmap
(((
IDirect3DVertexBuffer9Impl
*
)
iface
)
->
wineD3DVertexBuffer
);
wined3d_mutex_unlock
();
return
hr
;
return
D3D_OK
;
}
static
HRESULT
WINAPI
d3d9_vertexbuffer_GetDesc
(
IDirect3DVertexBuffer9
*
iface
,
D3DVERTEXBUFFER_DESC
*
desc
)
...
...
@@ -463,15 +461,13 @@ static HRESULT WINAPI d3d9_indexbuffer_Lock(IDirect3DIndexBuffer9 *iface,
static
HRESULT
WINAPI
d3d9_indexbuffer_Unlock
(
IDirect3DIndexBuffer9
*
iface
)
{
HRESULT
hr
;
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
hr
=
IWineD3DBuffer_Unmap
(((
IDirect3DIndexBuffer9Impl
*
)
iface
)
->
wineD3DIndexBuffer
);
IWineD3DBuffer_Unmap
(((
IDirect3DIndexBuffer9Impl
*
)
iface
)
->
wineD3DIndexBuffer
);
wined3d_mutex_unlock
();
return
hr
;
return
D3D_OK
;
}
static
HRESULT
WINAPI
d3d9_indexbuffer_GetDesc
(
IDirect3DIndexBuffer9
*
iface
,
D3DINDEXBUFFER_DESC
*
desc
)
...
...
dlls/ddraw/device.c
View file @
70f4e66f
...
...
@@ -4364,13 +4364,7 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveVB(IDirect3DDevice7 *iface,
return
hr
;
}
memcpy
(
LockedIndices
,
Indices
,
IndexCount
*
sizeof
(
WORD
));
hr
=
IWineD3DBuffer_Unmap
(
This
->
indexbuffer
);
if
(
hr
!=
D3D_OK
)
{
ERR
(
"(%p) IWineD3DBuffer::Unmap failed with hr = %08x
\n
"
,
This
,
hr
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr
;
}
IWineD3DBuffer_Unmap
(
This
->
indexbuffer
);
/* Set the index stream */
IWineD3DDevice_SetBaseVertexIndex
(
This
->
wineD3DDevice
,
StartVertex
);
...
...
dlls/ddraw/vertexbuffer.c
View file @
70f4e66f
...
...
@@ -266,15 +266,14 @@ static HRESULT WINAPI
IDirect3DVertexBufferImpl_Unlock
(
IDirect3DVertexBuffer7
*
iface
)
{
IDirect3DVertexBufferImpl
*
This
=
(
IDirect3DVertexBufferImpl
*
)
iface
;
HRESULT
hr
;
TRACE
(
"iface %p.
\n
"
,
iface
);
EnterCriticalSection
(
&
ddraw_cs
);
hr
=
IWineD3DBuffer_Unmap
(
This
->
wineD3DVertexBuffer
);
IWineD3DBuffer_Unmap
(
This
->
wineD3DVertexBuffer
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr
;
return
D3D_OK
;
}
static
HRESULT
WINAPI
...
...
dlls/wined3d/buffer.c
View file @
70f4e66f
...
...
@@ -1338,7 +1338,7 @@ static HRESULT STDMETHODCALLTYPE buffer_Map(IWineD3DBuffer *iface, UINT offset,
return
WINED3D_OK
;
}
static
HRESULT
STDMETHODCALLTYPE
buffer_Unmap
(
IWineD3DBuffer
*
iface
)
static
void
STDMETHODCALLTYPE
buffer_Unmap
(
IWineD3DBuffer
*
iface
)
{
struct
wined3d_buffer
*
This
=
(
struct
wined3d_buffer
*
)
iface
;
ULONG
i
;
...
...
@@ -1351,15 +1351,15 @@ static HRESULT STDMETHODCALLTYPE buffer_Unmap(IWineD3DBuffer *iface)
* the next call (this will happen if the lock_count is < 0). */
if
(
!
This
->
lock_count
)
{
TRACE
(
"Unmap called without a previous Map call!
\n
"
);
return
WINED3D_OK
;
WARN
(
"Unmap called without a previous Map call.
\n
"
);
return
;
}
if
(
InterlockedDecrement
(
&
This
->
lock_count
))
{
/* Delay loading the buffer until everything is unlocked */
TRACE
(
"Ignoring unlock
\n
"
);
return
WINED3D_OK
;
return
;
}
if
(
!
(
This
->
flags
&
WINED3D_BUFFER_DOUBLEBUFFER
)
&&
This
->
buffer_object
)
...
...
@@ -1410,8 +1410,6 @@ static HRESULT STDMETHODCALLTYPE buffer_Unmap(IWineD3DBuffer *iface)
{
buffer_PreLoad
(
iface
);
}
return
WINED3D_OK
;
}
static
void
STDMETHODCALLTYPE
buffer_GetDesc
(
IWineD3DBuffer
*
iface
,
WINED3DBUFFER_DESC
*
desc
)
...
...
@@ -1520,14 +1518,7 @@ HRESULT buffer_init(struct wined3d_buffer *buffer, IWineD3DDeviceImpl *device,
memcpy
(
ptr
,
data
,
size
);
hr
=
IWineD3DBuffer_Unmap
((
IWineD3DBuffer
*
)
buffer
);
if
(
FAILED
(
hr
))
{
ERR
(
"Failed to unmap buffer, hr %#x
\n
"
,
hr
);
buffer_UnLoad
((
IWineD3DBuffer
*
)
buffer
);
resource_cleanup
((
IWineD3DResource
*
)
buffer
);
return
hr
;
}
IWineD3DBuffer_Unmap
((
IWineD3DBuffer
*
)
buffer
);
}
buffer
->
maps
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
buffer
->
maps
));
...
...
include/wine/wined3d.idl
View file @
70f4e66f
...
...
@@ -2731,7 +2731,7 @@ interface IWineD3DBuffer : IWineD3DResource
[
out
]
BYTE
**
data
,
[
in
]
DWORD
flags
)
;
HRESULT
Unmap
(
void
Unmap
(
)
;
void
GetDesc
(
[
out
]
WINED3DBUFFER_DESC
*
desc
...
...
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