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
a849cc1b
Commit
a849cc1b
authored
Apr 22, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 25, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Return early in d3d_device7_DrawPrimitive() with a 0 vertex count.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d71132ed
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
5 deletions
+8
-5
device.c
dlls/ddraw/device.c
+5
-2
ddraw2.c
dlls/ddraw/tests/ddraw2.c
+1
-1
ddraw4.c
dlls/ddraw/tests/ddraw4.c
+1
-1
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+1
-1
No files found.
dlls/ddraw/device.c
View file @
a849cc1b
...
@@ -3508,8 +3508,11 @@ static HRESULT d3d_device7_DrawPrimitive(IDirect3DDevice7 *iface,
...
@@ -3508,8 +3508,11 @@ static HRESULT d3d_device7_DrawPrimitive(IDirect3DDevice7 *iface,
TRACE
(
"iface %p, primitive_type %#x, fvf %#x, vertices %p, vertex_count %u, flags %#x.
\n
"
,
TRACE
(
"iface %p, primitive_type %#x, fvf %#x, vertices %p, vertex_count %u, flags %#x.
\n
"
,
iface
,
primitive_type
,
fvf
,
vertices
,
vertex_count
,
flags
);
iface
,
primitive_type
,
fvf
,
vertices
,
vertex_count
,
flags
);
if
(
!
vertices
)
if
(
!
vertex_count
)
return
DDERR_INVALIDPARAMS
;
{
WARN
(
"0 vertex count.
\n
"
);
return
D3D_OK
;
}
/* Get the stride */
/* Get the stride */
stride
=
get_flexible_vertex_size
(
fvf
);
stride
=
get_flexible_vertex_size
(
fvf
);
...
...
dlls/ddraw/tests/ddraw2.c
View file @
a849cc1b
...
@@ -10134,7 +10134,7 @@ static void test_draw_primitive(void)
...
@@ -10134,7 +10134,7 @@ static void test_draw_primitive(void)
hr
=
IDirect3DDevice2_DrawIndexedPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
NULL
,
0
,
NULL
,
0
,
0
);
hr
=
IDirect3DDevice2_DrawIndexedPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
NULL
,
0
,
NULL
,
0
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice2_DrawPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
NULL
,
0
,
0
);
hr
=
IDirect3DDevice2_DrawPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
NULL
,
0
,
0
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice2_DrawIndexedPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
NULL
,
0
,
indices
,
4
,
0
);
hr
=
IDirect3DDevice2_DrawIndexedPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
NULL
,
0
,
indices
,
4
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
...
...
dlls/ddraw/tests/ddraw4.c
View file @
a849cc1b
...
@@ -11427,7 +11427,7 @@ static void test_draw_primitive(void)
...
@@ -11427,7 +11427,7 @@ static void test_draw_primitive(void)
hr
=
IDirect3DDevice3_DrawIndexedPrimitiveVB
(
device
,
D3DPT_TRIANGLESTRIP
,
vb
,
NULL
,
0
,
0
);
hr
=
IDirect3DDevice3_DrawIndexedPrimitiveVB
(
device
,
D3DPT_TRIANGLESTRIP
,
vb
,
NULL
,
0
,
0
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice3_DrawPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
NULL
,
0
,
0
);
hr
=
IDirect3DDevice3_DrawPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
NULL
,
0
,
0
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice3_DrawPrimitiveStrided
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
&
strided
,
0
,
0
);
hr
=
IDirect3DDevice3_DrawPrimitiveStrided
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
&
strided
,
0
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice3_DrawPrimitiveVB
(
device
,
D3DPT_TRIANGLESTRIP
,
vb
,
0
,
0
,
0
);
hr
=
IDirect3DDevice3_DrawPrimitiveVB
(
device
,
D3DPT_TRIANGLESTRIP
,
vb
,
0
,
0
,
0
);
...
...
dlls/ddraw/tests/ddraw7.c
View file @
a849cc1b
...
@@ -11694,7 +11694,7 @@ static void test_draw_primitive(void)
...
@@ -11694,7 +11694,7 @@ static void test_draw_primitive(void)
hr
=
IDirect3DDevice7_DrawIndexedPrimitiveVB
(
device
,
D3DPT_TRIANGLESTRIP
,
vb
,
0
,
0
,
NULL
,
0
,
0
);
hr
=
IDirect3DDevice7_DrawIndexedPrimitiveVB
(
device
,
D3DPT_TRIANGLESTRIP
,
vb
,
0
,
0
,
NULL
,
0
,
0
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice7_DrawPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
NULL
,
0
,
0
);
hr
=
IDirect3DDevice7_DrawPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
NULL
,
0
,
0
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice7_DrawPrimitiveStrided
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
&
strided
,
0
,
0
);
hr
=
IDirect3DDevice7_DrawPrimitiveStrided
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
&
strided
,
0
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice7_DrawPrimitiveVB
(
device
,
D3DPT_TRIANGLESTRIP
,
vb
,
0
,
0
,
0
);
hr
=
IDirect3DDevice7_DrawPrimitiveVB
(
device
,
D3DPT_TRIANGLESTRIP
,
vb
,
0
,
0
,
0
);
...
...
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