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
63326b19
Commit
63326b19
authored
Oct 20, 2009
by
Stefan Dösinger
Committed by
Alexandre Julliard
Nov 03, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add a usage flag for vertex buffer optimization.
parent
90e44375
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
5 deletions
+7
-5
vertexbuffer.c
dlls/d3d8/vertexbuffer.c
+2
-1
vertexbuffer.c
dlls/d3d9/vertexbuffer.c
+2
-1
device.c
dlls/wined3d/device.c
+2
-3
wined3d.idl
include/wine/wined3d.idl
+1
-0
No files found.
dlls/d3d8/vertexbuffer.c
View file @
63326b19
...
@@ -277,7 +277,8 @@ HRESULT vertexbuffer_init(IDirect3DVertexBuffer8Impl *buffer, IDirect3DDevice8Im
...
@@ -277,7 +277,8 @@ HRESULT vertexbuffer_init(IDirect3DVertexBuffer8Impl *buffer, IDirect3DDevice8Im
wined3d_mutex_lock
();
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreateVertexBuffer
(
device
->
WineD3DDevice
,
size
,
hr
=
IWineD3DDevice_CreateVertexBuffer
(
device
->
WineD3DDevice
,
size
,
usage
&
WINED3DUSAGE_MASK
,
0
,
(
WINED3DPOOL
)
pool
,
&
buffer
->
wineD3DVertexBuffer
,
(
usage
&
WINED3DUSAGE_MASK
)
|
WINED3DUSAGE_OPTIMIZE
,
0
,
(
WINED3DPOOL
)
pool
,
&
buffer
->
wineD3DVertexBuffer
,
(
IUnknown
*
)
buffer
,
&
d3d8_vertexbuffer_wined3d_parent_ops
);
(
IUnknown
*
)
buffer
,
&
d3d8_vertexbuffer_wined3d_parent_ops
);
wined3d_mutex_unlock
();
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
...
...
dlls/d3d9/vertexbuffer.c
View file @
63326b19
...
@@ -278,7 +278,8 @@ HRESULT vertexbuffer_init(IDirect3DVertexBuffer9Impl *buffer, IDirect3DDevice9Im
...
@@ -278,7 +278,8 @@ HRESULT vertexbuffer_init(IDirect3DVertexBuffer9Impl *buffer, IDirect3DDevice9Im
wined3d_mutex_lock
();
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreateVertexBuffer
(
device
->
WineD3DDevice
,
size
,
hr
=
IWineD3DDevice_CreateVertexBuffer
(
device
->
WineD3DDevice
,
size
,
usage
&
WINED3DUSAGE_MASK
,
0
,
(
WINED3DPOOL
)
pool
,
&
buffer
->
wineD3DVertexBuffer
,
(
usage
&
WINED3DUSAGE_MASK
)
|
WINED3DUSAGE_OPTIMIZE
,
0
,
(
WINED3DPOOL
)
pool
,
&
buffer
->
wineD3DVertexBuffer
,
(
IUnknown
*
)
buffer
,
&
d3d9_vertexbuffer_wined3d_parent_ops
);
(
IUnknown
*
)
buffer
,
&
d3d9_vertexbuffer_wined3d_parent_ops
);
wined3d_mutex_unlock
();
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
...
...
dlls/wined3d/device.c
View file @
63326b19
...
@@ -485,7 +485,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *ifac
...
@@ -485,7 +485,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *ifac
{
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
struct
wined3d_buffer
*
object
;
struct
wined3d_buffer
*
object
;
int
dxVersion
=
(
(
IWineD3DImpl
*
)
This
->
wineD3D
)
->
dxVersion
;
HRESULT
hr
;
HRESULT
hr
;
BOOL
conv
;
BOOL
conv
;
...
@@ -543,8 +542,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *ifac
...
@@ -543,8 +542,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *ifac
TRACE
(
"Not creating a vbo because the vertex buffer is in system memory
\n
"
);
TRACE
(
"Not creating a vbo because the vertex buffer is in system memory
\n
"
);
}
else
if
(
Usage
&
WINED3DUSAGE_DYNAMIC
)
{
}
else
if
(
Usage
&
WINED3DUSAGE_DYNAMIC
)
{
TRACE
(
"Not creating a vbo because the buffer has dynamic usage
\n
"
);
TRACE
(
"Not creating a vbo because the buffer has dynamic usage
\n
"
);
}
else
if
(
dxVersion
<=
7
&&
conv
)
{
}
else
if
(
!
(
Usage
&
WINED3DUSAGE_OPTIMIZE
)
&&
conv
)
{
TRACE
(
"Not creating a vbo because
dxVersion is 7 and the fvf needs conversion
\n
"
);
TRACE
(
"Not creating a vbo because
the fvf needs conversion, but VB optimization is disabled
\n
"
);
}
else
{
}
else
{
object
->
flags
|=
WINED3D_BUFFER_CREATEBO
;
object
->
flags
|=
WINED3D_BUFFER_CREATEBO
;
}
}
...
...
include/wine/wined3d.idl
View file @
63326b19
...
@@ -901,6 +901,7 @@ const UINT WINED3DUSAGE_DYNAMIC = 0x00000200;
...
@@ -901,6 +901,7 @@ const UINT WINED3DUSAGE_DYNAMIC = 0x00000200;
const
UINT
WINED3DUSAGE_AUTOGENMIPMAP
=
0
x00000400
;
const
UINT
WINED3DUSAGE_AUTOGENMIPMAP
=
0
x00000400
;
const
UINT
WINED3DUSAGE_DMAP
=
0
x00004000
;
const
UINT
WINED3DUSAGE_DMAP
=
0
x00004000
;
const
UINT
WINED3DUSAGE_MASK
=
0
x00004fff
;
const
UINT
WINED3DUSAGE_MASK
=
0
x00004fff
;
const
UINT
WINED3DUSAGE_OPTIMIZE
=
0
x40000000
;
const
UINT
WINED3DUSAGE_OVERLAY
=
0
x80000000
;
const
UINT
WINED3DUSAGE_OVERLAY
=
0
x80000000
;
const
UINT
WINED3DUSAGE_QUERY_LEGACYBUMPMAP
=
0
x00008000
;
const
UINT
WINED3DUSAGE_QUERY_LEGACYBUMPMAP
=
0
x00008000
;
...
...
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