Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
3aafba2b
Commit
3aafba2b
authored
Feb 07, 2018
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Use wined3d_buffer_create() in d3d_device_prepare_vertex_buffer().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f181da61
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
device.c
dlls/ddraw/device.c
+11
-4
No files found.
dlls/ddraw/device.c
View file @
3aafba2b
...
...
@@ -3465,15 +3465,22 @@ static HRESULT d3d_device_prepare_vertex_buffer(struct d3d_device *device, UINT
if
(
device
->
vertex_buffer_size
<
min_size
||
!
device
->
vertex_buffer
)
{
UINT
size
=
max
(
device
->
vertex_buffer_size
*
2
,
min_size
);
struct
wined3d_buffer_desc
desc
;
struct
wined3d_buffer
*
buffer
;
TRACE
(
"Growing vertex buffer to %u bytes
\n
"
,
size
);
hr
=
wined3d_buffer_create_vb
(
device
->
wined3d_device
,
size
,
WINED3DUSAGE_DYNAMIC
|
WINED3DUSAGE_WRITEONLY
,
WINED3D_POOL_DEFAULT
,
NULL
,
&
ddraw_null_wined3d_parent_ops
,
&
buffer
);
if
(
FAILED
(
hr
))
desc
.
byte_width
=
size
;
desc
.
usage
=
WINED3DUSAGE_DYNAMIC
|
WINED3DUSAGE_WRITEONLY
;
desc
.
bind_flags
=
WINED3D_BIND_VERTEX_BUFFER
;
desc
.
access
=
WINED3D_RESOURCE_ACCESS_GPU
;
desc
.
misc_flags
=
0
;
desc
.
structure_byte_stride
=
0
;
if
(
FAILED
(
hr
=
wined3d_buffer_create
(
device
->
wined3d_device
,
&
desc
,
NULL
,
NULL
,
&
ddraw_null_wined3d_parent_ops
,
&
buffer
)))
{
ERR
(
"
(%p) wined3d_buffer_create_vb failed with hr = %08x
\n
"
,
device
,
hr
);
ERR
(
"
Failed to create vertex buffer, hr %#x.
\n
"
,
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