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
6187de01
Commit
6187de01
authored
Feb 08, 2018
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 08, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Use wined3d_buffer_create() in vertexbuffer_init().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
74490bd9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
buffer.c
dlls/d3d9/buffer.c
+12
-8
No files found.
dlls/d3d9/buffer.c
View file @
6187de01
...
...
@@ -274,25 +274,29 @@ static const struct wined3d_parent_ops d3d9_vertexbuffer_wined3d_parent_ops =
HRESULT
vertexbuffer_init
(
struct
d3d9_vertexbuffer
*
buffer
,
struct
d3d9_device
*
device
,
UINT
size
,
UINT
usage
,
DWORD
fvf
,
D3DPOOL
pool
)
{
enum
wined3d_pool
wined3d_pool
;
DWORD
wined3d_usage
;
struct
wined3d_buffer_desc
desc
;
HRESULT
hr
;
wined3d_pool
=
pool
;
wined3d_usage
=
usage
&
WINED3DUSAGE_MASK
;
if
(
pool
==
D3DPOOL_SCRATCH
)
{
wined3d_pool
=
WINED3D_POOL_SYSTEM_MEM
;
wined3d_usage
|=
WINED3DUSAGE_SCRATCH
;
WARN
(
"Vertex buffer with D3DPOOL_SCRATCH requested.
\n
"
)
;
return
D3DERR_INVALIDCALL
;
}
buffer
->
IDirect3DVertexBuffer9_iface
.
lpVtbl
=
&
d3d9_vertexbuffer_vtbl
;
buffer
->
fvf
=
fvf
;
d3d9_resource_init
(
&
buffer
->
resource
);
desc
.
byte_width
=
size
;
desc
.
usage
=
usage
&
WINED3DUSAGE_MASK
;
desc
.
bind_flags
=
WINED3D_BIND_VERTEX_BUFFER
;
desc
.
access
=
wined3daccess_from_d3dpool
(
pool
);
desc
.
misc_flags
=
0
;
desc
.
structure_byte_stride
=
0
;
wined3d_mutex_lock
();
hr
=
wined3d_buffer_create
_vb
(
device
->
wined3d_device
,
size
,
wined3d_usage
,
wined3d_pool
,
buffer
,
&
d3d9_vertexbuffer_wined3d_parent_ops
,
&
buffer
->
wined3d_buffer
);
hr
=
wined3d_buffer_create
(
device
->
wined3d_device
,
&
desc
,
NULL
,
buffer
,
&
d3d9_vertexbuffer_wined3d_parent_ops
,
&
buffer
->
wined3d_buffer
);
wined3d_mutex_unlock
();
if
(
FAILED
(
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