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
aa8e4dd8
Commit
aa8e4dd8
authored
Jul 08, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 08, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Use unsafe_impl_from_IDirect3DVertexBuffer8 for app provided ifaces.
parent
23dd500a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
buffer.c
dlls/d3d8/buffer.c
+9
-0
d3d8_private.h
dlls/d3d8/d3d8_private.h
+1
-0
device.c
dlls/d3d8/device.c
+3
-3
No files found.
dlls/d3d8/buffer.c
View file @
aa8e4dd8
...
@@ -298,6 +298,15 @@ HRESULT vertexbuffer_init(IDirect3DVertexBuffer8Impl *buffer, IDirect3DDevice8Im
...
@@ -298,6 +298,15 @@ HRESULT vertexbuffer_init(IDirect3DVertexBuffer8Impl *buffer, IDirect3DDevice8Im
return
D3D_OK
;
return
D3D_OK
;
}
}
IDirect3DVertexBuffer8Impl
*
unsafe_impl_from_IDirect3DVertexBuffer8
(
IDirect3DVertexBuffer8
*
iface
)
{
if
(
!
iface
)
return
NULL
;
assert
(
iface
->
lpVtbl
==
&
Direct3DVertexBuffer8_Vtbl
);
return
impl_from_IDirect3DVertexBuffer8
(
iface
);
}
static
inline
IDirect3DIndexBuffer8Impl
*
impl_from_IDirect3DIndexBuffer8
(
IDirect3DIndexBuffer8
*
iface
)
static
inline
IDirect3DIndexBuffer8Impl
*
impl_from_IDirect3DIndexBuffer8
(
IDirect3DIndexBuffer8
*
iface
)
{
{
return
CONTAINING_RECORD
(
iface
,
IDirect3DIndexBuffer8Impl
,
IDirect3DIndexBuffer8_iface
);
return
CONTAINING_RECORD
(
iface
,
IDirect3DIndexBuffer8Impl
,
IDirect3DIndexBuffer8_iface
);
...
...
dlls/d3d8/d3d8_private.h
View file @
aa8e4dd8
...
@@ -277,6 +277,7 @@ struct IDirect3DVertexBuffer8Impl
...
@@ -277,6 +277,7 @@ struct IDirect3DVertexBuffer8Impl
HRESULT
vertexbuffer_init
(
IDirect3DVertexBuffer8Impl
*
buffer
,
IDirect3DDevice8Impl
*
device
,
HRESULT
vertexbuffer_init
(
IDirect3DVertexBuffer8Impl
*
buffer
,
IDirect3DDevice8Impl
*
device
,
UINT
size
,
DWORD
usage
,
DWORD
fvf
,
D3DPOOL
pool
)
DECLSPEC_HIDDEN
;
UINT
size
,
DWORD
usage
,
DWORD
fvf
,
D3DPOOL
pool
)
DECLSPEC_HIDDEN
;
IDirect3DVertexBuffer8Impl
*
unsafe_impl_from_IDirect3DVertexBuffer8
(
IDirect3DVertexBuffer8
*
iface
)
DECLSPEC_HIDDEN
;
/* --------------------- */
/* --------------------- */
/* IDirect3DIndexBuffer8 */
/* IDirect3DIndexBuffer8 */
...
...
dlls/d3d8/device.c
View file @
aa8e4dd8
...
@@ -2005,8 +2005,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_ProcessVertices(IDirect3DDevice8 *ifa
...
@@ -2005,8 +2005,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_ProcessVertices(IDirect3DDevice8 *ifa
DWORD
Flags
)
DWORD
Flags
)
{
{
IDirect3DDevice8Impl
*
This
=
impl_from_IDirect3DDevice8
(
iface
);
IDirect3DDevice8Impl
*
This
=
impl_from_IDirect3DDevice8
(
iface
);
IDirect3DVertexBuffer8Impl
*
dest
=
unsafe_impl_from_IDirect3DVertexBuffer8
(
pDestBuffer
);
HRESULT
hr
;
HRESULT
hr
;
IDirect3DVertexBuffer8Impl
*
dest
=
(
IDirect3DVertexBuffer8Impl
*
)
pDestBuffer
;
TRACE
(
"iface %p, src_start_idx %u, dst_idx %u, vertex_count %u, dst_buffer %p, flags %#x.
\n
"
,
TRACE
(
"iface %p, src_start_idx %u, dst_idx %u, vertex_count %u, dst_buffer %p, flags %#x.
\n
"
,
iface
,
SrcStartIndex
,
DestIndex
,
VertexCount
,
pDestBuffer
,
Flags
);
iface
,
SrcStartIndex
,
DestIndex
,
VertexCount
,
pDestBuffer
,
Flags
);
...
@@ -2683,6 +2683,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetStreamSource(IDirect3DDevice8 *ifa
...
@@ -2683,6 +2683,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetStreamSource(IDirect3DDevice8 *ifa
UINT
StreamNumber
,
IDirect3DVertexBuffer8
*
pStreamData
,
UINT
Stride
)
UINT
StreamNumber
,
IDirect3DVertexBuffer8
*
pStreamData
,
UINT
Stride
)
{
{
IDirect3DDevice8Impl
*
This
=
impl_from_IDirect3DDevice8
(
iface
);
IDirect3DDevice8Impl
*
This
=
impl_from_IDirect3DDevice8
(
iface
);
IDirect3DVertexBuffer8Impl
*
streamdata
=
unsafe_impl_from_IDirect3DVertexBuffer8
(
pStreamData
);
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"iface %p, stream_idx %u, buffer %p, stride %u.
\n
"
,
TRACE
(
"iface %p, stream_idx %u, buffer %p, stride %u.
\n
"
,
...
@@ -2690,8 +2691,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetStreamSource(IDirect3DDevice8 *ifa
...
@@ -2690,8 +2691,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetStreamSource(IDirect3DDevice8 *ifa
wined3d_mutex_lock
();
wined3d_mutex_lock
();
hr
=
wined3d_device_set_stream_source
(
This
->
wined3d_device
,
StreamNumber
,
hr
=
wined3d_device_set_stream_source
(
This
->
wined3d_device
,
StreamNumber
,
pStreamData
?
((
IDirect3DVertexBuffer8Impl
*
)
pStreamData
)
->
wineD3DVertexBuffer
:
NULL
,
streamdata
?
streamdata
->
wineD3DVertexBuffer
:
NULL
,
0
/* Offset in bytes */
,
Stride
);
0
/* Offset in bytes */
,
Stride
);
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