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
a5ee9f19
Commit
a5ee9f19
authored
Jun 16, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 17, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Implement IDirect3DIndexBuffer9 private data handling on top of wined3d_resource.
parent
469eba24
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
buffer.c
dlls/d3d9/buffer.c
+17
-5
No files found.
dlls/d3d9/buffer.c
View file @
a5ee9f19
...
@@ -299,6 +299,11 @@ HRESULT vertexbuffer_init(IDirect3DVertexBuffer9Impl *buffer, IDirect3DDevice9Im
...
@@ -299,6 +299,11 @@ HRESULT vertexbuffer_init(IDirect3DVertexBuffer9Impl *buffer, IDirect3DDevice9Im
return
D3D_OK
;
return
D3D_OK
;
}
}
static
inline
IDirect3DIndexBuffer9Impl
*
impl_from_IDirect3DIndexBuffer9
(
IDirect3DIndexBuffer9
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirect3DIndexBuffer9Impl
,
lpVtbl
);
}
static
HRESULT
WINAPI
d3d9_indexbuffer_QueryInterface
(
IDirect3DIndexBuffer9
*
iface
,
REFIID
riid
,
void
**
object
)
static
HRESULT
WINAPI
d3d9_indexbuffer_QueryInterface
(
IDirect3DIndexBuffer9
*
iface
,
REFIID
riid
,
void
**
object
)
{
{
TRACE
(
"iface %p, riid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
object
);
TRACE
(
"iface %p, riid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
object
);
...
@@ -373,14 +378,16 @@ static HRESULT WINAPI d3d9_indexbuffer_GetDevice(IDirect3DIndexBuffer9 *iface, I
...
@@ -373,14 +378,16 @@ static HRESULT WINAPI d3d9_indexbuffer_GetDevice(IDirect3DIndexBuffer9 *iface, I
static
HRESULT
WINAPI
d3d9_indexbuffer_SetPrivateData
(
IDirect3DIndexBuffer9
*
iface
,
static
HRESULT
WINAPI
d3d9_indexbuffer_SetPrivateData
(
IDirect3DIndexBuffer9
*
iface
,
REFGUID
guid
,
const
void
*
data
,
DWORD
data_size
,
DWORD
flags
)
REFGUID
guid
,
const
void
*
data
,
DWORD
data_size
,
DWORD
flags
)
{
{
IDirect3DIndexBuffer9Impl
*
buffer
=
impl_from_IDirect3DIndexBuffer9
(
iface
);
struct
wined3d_resource
*
resource
;
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"iface %p, guid %s, data %p, data_size %u, flags %#x.
\n
"
,
TRACE
(
"iface %p, guid %s, data %p, data_size %u, flags %#x.
\n
"
,
iface
,
debugstr_guid
(
guid
),
data
,
data_size
,
flags
);
iface
,
debugstr_guid
(
guid
),
data
,
data_size
,
flags
);
wined3d_mutex_lock
();
wined3d_mutex_lock
();
hr
=
wined3d_buffer_set_private_data
(((
IDirect3DIndexBuffer9Impl
*
)
iface
)
->
wineD3DIndexBuffer
,
resource
=
wined3d_buffer_get_resource
(
buffer
->
wineD3DIndexBuffer
);
guid
,
data
,
data_size
,
flags
);
hr
=
wined3d_resource_set_private_data
(
resource
,
guid
,
data
,
data_size
,
flags
);
wined3d_mutex_unlock
();
wined3d_mutex_unlock
();
return
hr
;
return
hr
;
...
@@ -389,14 +396,16 @@ static HRESULT WINAPI d3d9_indexbuffer_SetPrivateData(IDirect3DIndexBuffer9 *ifa
...
@@ -389,14 +396,16 @@ static HRESULT WINAPI d3d9_indexbuffer_SetPrivateData(IDirect3DIndexBuffer9 *ifa
static
HRESULT
WINAPI
d3d9_indexbuffer_GetPrivateData
(
IDirect3DIndexBuffer9
*
iface
,
static
HRESULT
WINAPI
d3d9_indexbuffer_GetPrivateData
(
IDirect3DIndexBuffer9
*
iface
,
REFGUID
guid
,
void
*
data
,
DWORD
*
data_size
)
REFGUID
guid
,
void
*
data
,
DWORD
*
data_size
)
{
{
IDirect3DIndexBuffer9Impl
*
buffer
=
impl_from_IDirect3DIndexBuffer9
(
iface
);
struct
wined3d_resource
*
resource
;
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"iface %p, guid %s, data %p, data_size %p.
\n
"
,
TRACE
(
"iface %p, guid %s, data %p, data_size %p.
\n
"
,
iface
,
debugstr_guid
(
guid
),
data
,
data_size
);
iface
,
debugstr_guid
(
guid
),
data
,
data_size
);
wined3d_mutex_lock
();
wined3d_mutex_lock
();
hr
=
wined3d_buffer_get_private_data
(((
IDirect3DIndexBuffer9Impl
*
)
iface
)
->
wineD3DIndexBuffer
,
resource
=
wined3d_buffer_get_resource
(
buffer
->
wineD3DIndexBuffer
);
guid
,
data
,
data_size
);
hr
=
wined3d_resource_get_private_data
(
resource
,
guid
,
data
,
data_size
);
wined3d_mutex_unlock
();
wined3d_mutex_unlock
();
return
hr
;
return
hr
;
...
@@ -404,12 +413,15 @@ static HRESULT WINAPI d3d9_indexbuffer_GetPrivateData(IDirect3DIndexBuffer9 *ifa
...
@@ -404,12 +413,15 @@ static HRESULT WINAPI d3d9_indexbuffer_GetPrivateData(IDirect3DIndexBuffer9 *ifa
static
HRESULT
WINAPI
d3d9_indexbuffer_FreePrivateData
(
IDirect3DIndexBuffer9
*
iface
,
REFGUID
guid
)
static
HRESULT
WINAPI
d3d9_indexbuffer_FreePrivateData
(
IDirect3DIndexBuffer9
*
iface
,
REFGUID
guid
)
{
{
IDirect3DIndexBuffer9Impl
*
buffer
=
impl_from_IDirect3DIndexBuffer9
(
iface
);
struct
wined3d_resource
*
resource
;
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"iface %p, guid %s.
\n
"
,
iface
,
debugstr_guid
(
guid
));
TRACE
(
"iface %p, guid %s.
\n
"
,
iface
,
debugstr_guid
(
guid
));
wined3d_mutex_lock
();
wined3d_mutex_lock
();
hr
=
wined3d_buffer_free_private_data
(((
IDirect3DIndexBuffer9Impl
*
)
iface
)
->
wineD3DIndexBuffer
,
guid
);
resource
=
wined3d_buffer_get_resource
(
buffer
->
wineD3DIndexBuffer
);
hr
=
wined3d_resource_free_private_data
(
resource
,
guid
);
wined3d_mutex_unlock
();
wined3d_mutex_unlock
();
return
hr
;
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