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
078aefdd
Commit
078aefdd
authored
Apr 25, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 26, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Return early in d3d_device7_DrawPrimitiveVB() with a 0 vertex count.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
69eafe63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
device.c
dlls/ddraw/device.c
+13
-13
No files found.
dlls/ddraw/device.c
View file @
078aefdd
...
...
@@ -4256,28 +4256,28 @@ static HRESULT WINAPI d3d_device3_DrawIndexedPrimitiveStrided(IDirect3DDevice3 *
* DDERR_INVALIDPARAMS if D3DVertexBuf is NULL
*
*****************************************************************************/
static
HRESULT
d3d_device7_DrawPrimitiveVB
(
IDirect3DDevice7
*
iface
,
D3DPRIMITIVETYPE
PrimitiveT
ype
,
IDirect3DVertexBuffer7
*
D3DVertexBuf
,
DWORD
StartVertex
,
DWORD
NumVertices
,
DWORD
F
lags
)
static
HRESULT
d3d_device7_DrawPrimitiveVB
(
IDirect3DDevice7
*
iface
,
D3DPRIMITIVETYPE
primitive_t
ype
,
IDirect3DVertexBuffer7
*
vb
,
DWORD
start_vertex
,
DWORD
vertex_count
,
DWORD
f
lags
)
{
struct
d3d_device
*
device
=
impl_from_IDirect3DDevice7
(
iface
);
struct
d3d_vertex_buffer
*
vb
=
unsafe_impl_from_IDirect3DVertexBuffer7
(
D3DVertexBuf
);
struct
d3d_vertex_buffer
*
vb
_impl
=
unsafe_impl_from_IDirect3DVertexBuffer7
(
vb
);
HRESULT
hr
;
DWORD
stride
;
TRACE
(
"iface %p, primitive_type %#x, vb %p, start_vertex %u, vertex_count %u, flags %#x.
\n
"
,
iface
,
PrimitiveType
,
D3DVertexBuf
,
StartVertex
,
NumVertices
,
F
lags
);
iface
,
primitive_type
,
vb
,
start_vertex
,
vertex_count
,
f
lags
);
/* Sanity checks */
if
(
!
vb
)
if
(
!
vertex_count
)
{
WARN
(
"
No Vertex buffer specified
.
\n
"
);
return
D
DERR_INVALIDPARAMS
;
WARN
(
"
0 vertex count
.
\n
"
);
return
D
3D_OK
;
}
stride
=
get_flexible_vertex_size
(
vb
->
fvf
);
stride
=
get_flexible_vertex_size
(
vb_impl
->
fvf
);
wined3d_mutex_lock
();
wined3d_device_set_vertex_declaration
(
device
->
wined3d_device
,
vb
->
wineD3DVertexDeclaration
);
hr
=
wined3d_device_set_stream_source
(
device
->
wined3d_device
,
0
,
vb
->
wineD3DVertexBuffer
,
0
,
stride
);
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
))
{
WARN
(
"Failed to set stream source, hr %#x.
\n
"
,
hr
);
...
...
@@ -4286,8 +4286,8 @@ static HRESULT d3d_device7_DrawPrimitiveVB(IDirect3DDevice7 *iface, D3DPRIMITIVE
}
/* Now draw the primitives */
wined3d_device_set_primitive_type
(
device
->
wined3d_device
,
PrimitiveT
ype
);
hr
=
wined3d_device_draw_primitive
(
device
->
wined3d_device
,
StartVertex
,
NumVertices
);
wined3d_device_set_primitive_type
(
device
->
wined3d_device
,
primitive_t
ype
);
hr
=
wined3d_device_draw_primitive
(
device
->
wined3d_device
,
start_vertex
,
vertex_count
);
wined3d_mutex_unlock
();
...
...
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