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
d2b782f4
Commit
d2b782f4
authored
Aug 26, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 26, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Rename "wineD3DVertexBuffer" to "wined3d_buffer".
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
db42c500
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
18 deletions
+17
-18
ddraw_private.h
dlls/ddraw/ddraw_private.h
+1
-1
device.c
dlls/ddraw/device.c
+4
-4
vertexbuffer.c
dlls/ddraw/vertexbuffer.c
+12
-13
No files found.
dlls/ddraw/ddraw_private.h
View file @
d2b782f4
...
...
@@ -552,7 +552,7 @@ struct d3d_vertex_buffer
LONG
ref
;
/*** WineD3D and ddraw links ***/
struct
wined3d_buffer
*
wine
D3DVertexB
uffer
;
struct
wined3d_buffer
*
wine
d3d_b
uffer
;
struct
wined3d_vertex_declaration
*
wineD3DVertexDeclaration
;
struct
ddraw
*
ddraw
;
...
...
dlls/ddraw/device.c
View file @
d2b782f4
...
...
@@ -4277,8 +4277,8 @@ static HRESULT d3d_device7_DrawPrimitiveVB(IDirect3DDevice7 *iface, D3DPRIMITIVE
wined3d_mutex_lock
();
wined3d_device_set_vertex_declaration
(
device
->
wined3d_device
,
vb_impl
->
wineD3DVertexDeclaration
);
hr
=
wined3d_device_set_stream_source
(
device
->
wined3d_device
,
0
,
vb_impl
->
wineD3DVertexBuffer
,
0
,
stride
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
=
wined3d_device_set_stream_source
(
device
->
wined3d_device
,
0
,
vb_impl
->
wined3d_buffer
,
0
,
stride
)
))
{
WARN
(
"Failed to set stream source, hr %#x.
\n
"
,
hr
);
wined3d_mutex_unlock
();
...
...
@@ -4409,8 +4409,8 @@ static HRESULT d3d_device7_DrawIndexedPrimitiveVB(IDirect3DDevice7 *iface,
wined3d_device_set_index_buffer
(
device
->
wined3d_device
,
device
->
index_buffer
,
WINED3DFMT_R16_UINT
,
0
);
/* Set the vertex stream source */
hr
=
wined3d_device_set_stream_source
(
device
->
wined3d_device
,
0
,
vb_impl
->
wineD3DVertexBuffer
,
0
,
stride
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
=
wined3d_device_set_stream_source
(
device
->
wined3d_device
,
0
,
vb_impl
->
wined3d_buffer
,
0
,
stride
)
))
{
ERR
(
"(%p) IDirect3DDevice::SetStreamSource failed with hr = %08x
\n
"
,
device
,
hr
);
wined3d_mutex_unlock
();
...
...
dlls/ddraw/vertexbuffer.c
View file @
d2b782f4
...
...
@@ -155,11 +155,11 @@ static ULONG WINAPI d3d_vertex_buffer7_Release(IDirect3DVertexBuffer7 *iface)
wined3d_mutex_lock
();
wined3d_device_get_stream_source
(
buffer
->
ddraw
->
wined3d_device
,
0
,
&
curVB
,
&
offset
,
&
stride
);
if
(
curVB
==
buffer
->
wine
D3DVertexB
uffer
)
if
(
curVB
==
buffer
->
wine
d3d_b
uffer
)
wined3d_device_set_stream_source
(
buffer
->
ddraw
->
wined3d_device
,
0
,
NULL
,
0
,
0
);
wined3d_vertex_declaration_decref
(
buffer
->
wineD3DVertexDeclaration
);
wined3d_buffer_decref
(
buffer
->
wine
D3DVertexB
uffer
);
wined3d_buffer_decref
(
buffer
->
wine
d3d_b
uffer
);
wined3d_mutex_unlock
();
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
...
...
@@ -253,8 +253,8 @@ static HRESULT WINAPI d3d_vertex_buffer7_Lock(IDirect3DVertexBuffer7 *iface,
if
(
SUCCEEDED
(
hr
))
{
buffer
->
dynamic
=
TRUE
;
wined3d_buffer_decref
(
buffer
->
wine
D3DVertexB
uffer
);
buffer
->
wine
D3DVertexB
uffer
=
new_buffer
;
wined3d_buffer_decref
(
buffer
->
wine
d3d_b
uffer
);
buffer
->
wine
d3d_b
uffer
=
new_buffer
;
}
else
{
...
...
@@ -268,12 +268,12 @@ static HRESULT WINAPI d3d_vertex_buffer7_Lock(IDirect3DVertexBuffer7 *iface,
if
(
data_size
)
{
/* Get the size, for returning it, and for locking */
wined3d_resource
=
wined3d_buffer_get_resource
(
buffer
->
wine
D3DVertexB
uffer
);
wined3d_resource
=
wined3d_buffer_get_resource
(
buffer
->
wine
d3d_b
uffer
);
wined3d_resource_get_desc
(
wined3d_resource
,
&
wined3d_desc
);
*
data_size
=
wined3d_desc
.
size
;
}
hr
=
wined3d_buffer_map
(
buffer
->
wine
D3DVertexB
uffer
,
0
,
0
,
(
BYTE
**
)
data
,
wined3d_flags
);
hr
=
wined3d_buffer_map
(
buffer
->
wine
d3d_b
uffer
,
0
,
0
,
(
BYTE
**
)
data
,
wined3d_flags
);
wined3d_mutex_unlock
();
...
...
@@ -306,7 +306,7 @@ static HRESULT WINAPI d3d_vertex_buffer7_Unlock(IDirect3DVertexBuffer7 *iface)
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
wined3d_buffer_unmap
(
buffer
->
wine
D3DVertexB
uffer
);
wined3d_buffer_unmap
(
buffer
->
wine
d3d_b
uffer
);
wined3d_mutex_unlock
();
return
D3D_OK
;
...
...
@@ -382,10 +382,10 @@ static HRESULT WINAPI d3d_vertex_buffer7_ProcessVertices(IDirect3DVertexBuffer7
wined3d_device_set_render_state
(
device_impl
->
wined3d_device
,
WINED3D_RS_CLIPPING
,
doClip
);
wined3d_device_set_stream_source
(
device_impl
->
wined3d_device
,
0
,
src_buffer_impl
->
wine
D3DVertexB
uffer
,
0
,
get_flexible_vertex_size
(
src_buffer_impl
->
fvf
));
0
,
src_buffer_impl
->
wine
d3d_b
uffer
,
0
,
get_flexible_vertex_size
(
src_buffer_impl
->
fvf
));
wined3d_device_set_vertex_declaration
(
device_impl
->
wined3d_device
,
src_buffer_impl
->
wineD3DVertexDeclaration
);
hr
=
wined3d_device_process_vertices
(
device_impl
->
wined3d_device
,
src_idx
,
dst_idx
,
count
,
dst_buffer_impl
->
wine
D3DVertexB
uffer
,
NULL
,
flags
,
dst_buffer_impl
->
fvf
);
count
,
dst_buffer_impl
->
wine
d3d_b
uffer
,
NULL
,
flags
,
dst_buffer_impl
->
fvf
);
/* Restore the states if needed */
if
(
doClip
!=
oldClip
)
...
...
@@ -436,7 +436,7 @@ static HRESULT WINAPI d3d_vertex_buffer7_GetVertexBufferDesc(IDirect3DVertexBuff
if
(
!
desc
)
return
DDERR_INVALIDPARAMS
;
wined3d_mutex_lock
();
wined3d_resource
=
wined3d_buffer_get_resource
(
buffer
->
wine
D3DVertexB
uffer
);
wined3d_resource
=
wined3d_buffer_get_resource
(
buffer
->
wine
d3d_b
uffer
);
wined3d_resource_get_desc
(
wined3d_resource
,
&
wined3d_desc
);
wined3d_mutex_unlock
();
...
...
@@ -595,8 +595,7 @@ HRESULT d3d_vertex_buffer_create(struct d3d_vertex_buffer **vertex_buf,
wined3d_mutex_lock
();
hr
=
d3d_vertex_buffer_create_wined3d_buffer
(
buffer
,
FALSE
,
&
buffer
->
wineD3DVertexBuffer
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
=
d3d_vertex_buffer_create_wined3d_buffer
(
buffer
,
FALSE
,
&
buffer
->
wined3d_buffer
)))
{
WARN
(
"Failed to create wined3d vertex buffer, hr %#x.
\n
"
,
hr
);
if
(
hr
==
WINED3DERR_INVALIDCALL
)
...
...
@@ -608,7 +607,7 @@ HRESULT d3d_vertex_buffer_create(struct d3d_vertex_buffer **vertex_buf,
if
(
!
buffer
->
wineD3DVertexDeclaration
)
{
ERR
(
"Failed to find vertex declaration for fvf %#x.
\n
"
,
desc
->
dwFVF
);
wined3d_buffer_decref
(
buffer
->
wine
D3DVertexB
uffer
);
wined3d_buffer_decref
(
buffer
->
wine
d3d_b
uffer
);
hr
=
DDERR_INVALIDPARAMS
;
goto
end
;
}
...
...
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