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
cbd1aaaf
Commit
cbd1aaaf
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_execute_buffer_SetExecuteData().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3aafba2b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
executebuffer.c
dlls/ddraw/executebuffer.c
+16
-8
No files found.
dlls/ddraw/executebuffer.c
View file @
cbd1aaaf
...
...
@@ -617,17 +617,25 @@ static HRESULT WINAPI d3d_execute_buffer_SetExecuteData(IDirect3DExecuteBuffer *
{
unsigned
int
new_size
=
max
(
data
->
dwVertexCount
,
buffer
->
vertex_size
*
2
);
struct
wined3d_buffer
*
src_buffer
,
*
dst_buffer
;
struct
wined3d_buffer_desc
desc
;
hr
=
wined3d_buffer_create_vb
(
buffer
->
d3ddev
->
wined3d_device
,
new_size
*
sizeof
(
D3DVERTEX
),
WINED3DUSAGE_DYNAMIC
|
WINED3DUSAGE_WRITEONLY
,
WINED3D_POOL_SYSTEM_MEM
,
NULL
,
&
ddraw_null_wined3d_parent_ops
,
&
src_buffer
);
if
(
FAILED
(
hr
))
desc
.
byte_width
=
new_size
*
sizeof
(
D3DVERTEX
);
desc
.
usage
=
WINED3DUSAGE_DYNAMIC
|
WINED3DUSAGE_WRITEONLY
;
desc
.
bind_flags
=
WINED3D_BIND_VERTEX_BUFFER
;
desc
.
access
=
WINED3D_RESOURCE_ACCESS_CPU
|
WINED3D_RESOURCE_ACCESS_MAP
;
desc
.
misc_flags
=
0
;
desc
.
structure_byte_stride
=
0
;
if
(
FAILED
(
hr
=
wined3d_buffer_create
(
buffer
->
d3ddev
->
wined3d_device
,
&
desc
,
NULL
,
NULL
,
&
ddraw_null_wined3d_parent_ops
,
&
src_buffer
)))
return
hr
;
hr
=
wined3d_buffer_create_vb
(
buffer
->
d3ddev
->
wined3d_device
,
new_size
*
sizeof
(
D3DTLVERTEX
),
WINED3DUSAGE_STATICDECL
,
WINED3D_POOL_DEFAULT
,
NULL
,
&
ddraw_null_wined3d_parent_ops
,
&
dst_buffer
);
if
(
FAILED
(
hr
))
desc
.
byte_width
=
new_size
*
sizeof
(
D3DTLVERTEX
);
desc
.
usage
=
WINED3DUSAGE_STATICDECL
;
desc
.
access
=
WINED3D_RESOURCE_ACCESS_GPU
;
if
(
FAILED
(
hr
=
wined3d_buffer_create
(
buffer
->
d3ddev
->
wined3d_device
,
&
desc
,
NULL
,
NULL
,
&
ddraw_null_wined3d_parent_ops
,
&
dst_buffer
)))
{
wined3d_buffer_decref
(
src_buffer
);
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