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
1ec8788b
Commit
1ec8788b
authored
May 26, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jun 12, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Hold the lock in IDirect3DIndexBuffer8 methods.
parent
e96287e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
65 additions
and
10 deletions
+65
-10
indexbuffer.c
dlls/d3d8/indexbuffer.c
+65
-10
No files found.
dlls/d3d8/indexbuffer.c
View file @
1ec8788b
...
...
@@ -56,7 +56,9 @@ static ULONG WINAPI IDirect3DIndexBuffer8Impl_Release(LPDIRECT3DINDEXBUFFER8 ifa
TRACE
(
"(%p) : ReleaseRef to %d
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
EnterCriticalSection
(
&
d3d8_cs
);
IWineD3DIndexBuffer_Release
(
This
->
wineD3DIndexBuffer
);
LeaveCriticalSection
(
&
d3d8_cs
);
IUnknown_Release
(
This
->
parentDevice
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
@@ -66,69 +68,122 @@ static ULONG WINAPI IDirect3DIndexBuffer8Impl_Release(LPDIRECT3DINDEXBUFFER8 ifa
/* IDirect3DIndexBuffer8 IDirect3DResource8 Interface follow: */
static
HRESULT
WINAPI
IDirect3DIndexBuffer8Impl_GetDevice
(
LPDIRECT3DINDEXBUFFER8
iface
,
IDirect3DDevice8
**
ppDevice
)
{
IDirect3DIndexBuffer8Impl
*
This
=
(
IDirect3DIndexBuffer8Impl
*
)
iface
;
HRESULT
hr
;
TRACE
(
"(%p) Relay
\n
"
,
This
);
return
IDirect3DResource8Impl_GetDevice
((
LPDIRECT3DRESOURCE8
)
This
,
ppDevice
);
EnterCriticalSection
(
&
d3d8_cs
);
hr
=
IDirect3DResource8Impl_GetDevice
((
LPDIRECT3DRESOURCE8
)
This
,
ppDevice
);
LeaveCriticalSection
(
&
d3d8_cs
);
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DIndexBuffer8Impl_SetPrivateData
(
LPDIRECT3DINDEXBUFFER8
iface
,
REFGUID
refguid
,
CONST
void
*
pData
,
DWORD
SizeOfData
,
DWORD
Flags
)
{
IDirect3DIndexBuffer8Impl
*
This
=
(
IDirect3DIndexBuffer8Impl
*
)
iface
;
HRESULT
hr
;
TRACE
(
"(%p) Relay
\n
"
,
This
);
return
IWineD3DIndexBuffer_SetPrivateData
(
This
->
wineD3DIndexBuffer
,
refguid
,
pData
,
SizeOfData
,
Flags
);
EnterCriticalSection
(
&
d3d8_cs
);
hr
=
IWineD3DIndexBuffer_SetPrivateData
(
This
->
wineD3DIndexBuffer
,
refguid
,
pData
,
SizeOfData
,
Flags
);
LeaveCriticalSection
(
&
d3d8_cs
);
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DIndexBuffer8Impl_GetPrivateData
(
LPDIRECT3DINDEXBUFFER8
iface
,
REFGUID
refguid
,
void
*
pData
,
DWORD
*
pSizeOfData
)
{
IDirect3DIndexBuffer8Impl
*
This
=
(
IDirect3DIndexBuffer8Impl
*
)
iface
;
HRESULT
hr
;
TRACE
(
"(%p) Relay
\n
"
,
This
);
return
IWineD3DIndexBuffer_GetPrivateData
(
This
->
wineD3DIndexBuffer
,
refguid
,
pData
,
pSizeOfData
);
EnterCriticalSection
(
&
d3d8_cs
);
hr
=
IWineD3DIndexBuffer_GetPrivateData
(
This
->
wineD3DIndexBuffer
,
refguid
,
pData
,
pSizeOfData
);
LeaveCriticalSection
(
&
d3d8_cs
);
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DIndexBuffer8Impl_FreePrivateData
(
LPDIRECT3DINDEXBUFFER8
iface
,
REFGUID
refguid
)
{
IDirect3DIndexBuffer8Impl
*
This
=
(
IDirect3DIndexBuffer8Impl
*
)
iface
;
HRESULT
hr
;
TRACE
(
"(%p) Relay
\n
"
,
This
);
return
IWineD3DIndexBuffer_FreePrivateData
(
This
->
wineD3DIndexBuffer
,
refguid
);
EnterCriticalSection
(
&
d3d8_cs
);
hr
=
IWineD3DIndexBuffer_FreePrivateData
(
This
->
wineD3DIndexBuffer
,
refguid
);
LeaveCriticalSection
(
&
d3d8_cs
);
return
hr
;
}
static
DWORD
WINAPI
IDirect3DIndexBuffer8Impl_SetPriority
(
LPDIRECT3DINDEXBUFFER8
iface
,
DWORD
PriorityNew
)
{
IDirect3DIndexBuffer8Impl
*
This
=
(
IDirect3DIndexBuffer8Impl
*
)
iface
;
DWORD
ret
;
TRACE
(
"(%p) Relay
\n
"
,
This
);
return
IWineD3DIndexBuffer_SetPriority
(
This
->
wineD3DIndexBuffer
,
PriorityNew
);
EnterCriticalSection
(
&
d3d8_cs
);
ret
=
IWineD3DIndexBuffer_SetPriority
(
This
->
wineD3DIndexBuffer
,
PriorityNew
);
LeaveCriticalSection
(
&
d3d8_cs
);
return
ret
;
}
static
DWORD
WINAPI
IDirect3DIndexBuffer8Impl_GetPriority
(
LPDIRECT3DINDEXBUFFER8
iface
)
{
IDirect3DIndexBuffer8Impl
*
This
=
(
IDirect3DIndexBuffer8Impl
*
)
iface
;
DWORD
ret
;
TRACE
(
"(%p) Relay
\n
"
,
This
);
return
IWineD3DIndexBuffer_GetPriority
(
This
->
wineD3DIndexBuffer
);
EnterCriticalSection
(
&
d3d8_cs
);
ret
=
IWineD3DIndexBuffer_GetPriority
(
This
->
wineD3DIndexBuffer
);
LeaveCriticalSection
(
&
d3d8_cs
);
return
ret
;
}
static
void
WINAPI
IDirect3DIndexBuffer8Impl_PreLoad
(
LPDIRECT3DINDEXBUFFER8
iface
)
{
IDirect3DIndexBuffer8Impl
*
This
=
(
IDirect3DIndexBuffer8Impl
*
)
iface
;
TRACE
(
"(%p) Relay
\n
"
,
This
);
EnterCriticalSection
(
&
d3d8_cs
);
IWineD3DIndexBuffer_PreLoad
(
This
->
wineD3DIndexBuffer
);
LeaveCriticalSection
(
&
d3d8_cs
);
}
static
D3DRESOURCETYPE
WINAPI
IDirect3DIndexBuffer8Impl_GetType
(
LPDIRECT3DINDEXBUFFER8
iface
)
{
IDirect3DIndexBuffer8Impl
*
This
=
(
IDirect3DIndexBuffer8Impl
*
)
iface
;
D3DRESOURCETYPE
type
;
TRACE
(
"(%p) Relay
\n
"
,
This
);
return
IWineD3DIndexBuffer_GetType
(
This
->
wineD3DIndexBuffer
);
EnterCriticalSection
(
&
d3d8_cs
);
type
=
IWineD3DIndexBuffer_GetType
(
This
->
wineD3DIndexBuffer
);
LeaveCriticalSection
(
&
d3d8_cs
);
return
type
;
}
/* IDirect3DIndexBuffer8 Interface follow: */
static
HRESULT
WINAPI
IDirect3DIndexBuffer8Impl_Lock
(
LPDIRECT3DINDEXBUFFER8
iface
,
UINT
OffsetToLock
,
UINT
SizeToLock
,
BYTE
**
ppbData
,
DWORD
Flags
)
{
IDirect3DIndexBuffer8Impl
*
This
=
(
IDirect3DIndexBuffer8Impl
*
)
iface
;
HRESULT
hr
;
TRACE
(
"(%p) Relay
\n
"
,
This
);
return
IWineD3DIndexBuffer_Lock
(
This
->
wineD3DIndexBuffer
,
OffsetToLock
,
SizeToLock
,
ppbData
,
Flags
);
EnterCriticalSection
(
&
d3d8_cs
);
hr
=
IWineD3DIndexBuffer_Lock
(
This
->
wineD3DIndexBuffer
,
OffsetToLock
,
SizeToLock
,
ppbData
,
Flags
);
LeaveCriticalSection
(
&
d3d8_cs
);
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DIndexBuffer8Impl_Unlock
(
LPDIRECT3DINDEXBUFFER8
iface
)
{
IDirect3DIndexBuffer8Impl
*
This
=
(
IDirect3DIndexBuffer8Impl
*
)
iface
;
HRESULT
hr
;
TRACE
(
"(%p) Relay
\n
"
,
This
);
return
IWineD3DIndexBuffer_Unlock
(
This
->
wineD3DIndexBuffer
);
EnterCriticalSection
(
&
d3d8_cs
);
hr
=
IWineD3DIndexBuffer_Unlock
(
This
->
wineD3DIndexBuffer
);
LeaveCriticalSection
(
&
d3d8_cs
);
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DIndexBuffer8Impl_GetDesc
(
LPDIRECT3DINDEXBUFFER8
iface
,
D3DINDEXBUFFER_DESC
*
pDesc
)
{
IDirect3DIndexBuffer8Impl
*
This
=
(
IDirect3DIndexBuffer8Impl
*
)
iface
;
HRESULT
hr
;
TRACE
(
"(%p) Relay
\n
"
,
This
);
return
IWineD3DIndexBuffer_GetDesc
(
This
->
wineD3DIndexBuffer
,
(
WINED3DINDEXBUFFER_DESC
*
)
pDesc
);
EnterCriticalSection
(
&
d3d8_cs
);
hr
=
IWineD3DIndexBuffer_GetDesc
(
This
->
wineD3DIndexBuffer
,
(
WINED3DINDEXBUFFER_DESC
*
)
pDesc
);
LeaveCriticalSection
(
&
d3d8_cs
);
return
hr
;
}
...
...
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