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
d4275e87
Commit
d4275e87
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 static buffer declarations.
parent
63326b19
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
5 deletions
+9
-5
direct3d.c
dlls/ddraw/direct3d.c
+5
-1
buffer.c
dlls/wined3d/buffer.c
+1
-2
device.c
dlls/wined3d/device.c
+2
-2
wined3d.idl
include/wine/wined3d.idl
+1
-0
No files found.
dlls/ddraw/direct3d.c
View file @
d4275e87
...
@@ -970,6 +970,7 @@ IDirect3DImpl_7_CreateVertexBuffer(IDirect3D7 *iface,
...
@@ -970,6 +970,7 @@ IDirect3DImpl_7_CreateVertexBuffer(IDirect3D7 *iface,
IDirectDrawImpl
*
This
=
ddraw_from_d3d7
(
iface
);
IDirectDrawImpl
*
This
=
ddraw_from_d3d7
(
iface
);
IDirect3DVertexBufferImpl
*
object
;
IDirect3DVertexBufferImpl
*
object
;
HRESULT
hr
;
HRESULT
hr
;
DWORD
usage
;
TRACE
(
"(%p)->(%p,%p,%08x)
\n
"
,
This
,
Desc
,
VertexBuffer
,
Flags
);
TRACE
(
"(%p)->(%p,%p,%08x)
\n
"
,
This
,
Desc
,
VertexBuffer
,
Flags
);
TRACE
(
"(%p) Vertex buffer description:
\n
"
,
This
);
TRACE
(
"(%p) Vertex buffer description:
\n
"
,
This
);
...
@@ -1009,10 +1010,13 @@ IDirect3DImpl_7_CreateVertexBuffer(IDirect3D7 *iface,
...
@@ -1009,10 +1010,13 @@ IDirect3DImpl_7_CreateVertexBuffer(IDirect3D7 *iface,
object
->
ddraw
=
This
;
object
->
ddraw
=
This
;
object
->
fvf
=
Desc
->
dwFVF
;
object
->
fvf
=
Desc
->
dwFVF
;
usage
=
Desc
->
dwCaps
&
D3DVBCAPS_WRITEONLY
?
WINED3DUSAGE_WRITEONLY
:
0
;
usage
|=
WINED3DUSAGE_STATICDECL
;
EnterCriticalSection
(
&
ddraw_cs
);
EnterCriticalSection
(
&
ddraw_cs
);
hr
=
IWineD3DDevice_CreateVertexBuffer
(
This
->
wineD3DDevice
,
hr
=
IWineD3DDevice_CreateVertexBuffer
(
This
->
wineD3DDevice
,
get_flexible_vertex_size
(
Desc
->
dwFVF
)
*
Desc
->
dwNumVertices
,
get_flexible_vertex_size
(
Desc
->
dwFVF
)
*
Desc
->
dwNumVertices
,
Desc
->
dwCaps
&
D3DVBCAPS_WRITEONLY
?
WINED3DUSAGE_WRITEONLY
:
0
,
Desc
->
dwFVF
,
usage
,
Desc
->
dwFVF
,
Desc
->
dwCaps
&
D3DVBCAPS_SYSTEMMEMORY
?
WINED3DPOOL_SYSTEMMEM
:
WINED3DPOOL_DEFAULT
,
Desc
->
dwCaps
&
D3DVBCAPS_SYSTEMMEMORY
?
WINED3DPOOL_SYSTEMMEM
:
WINED3DPOOL_DEFAULT
,
&
object
->
wineD3DVertexBuffer
,
(
IUnknown
*
)
object
,
&
ddraw_null_wined3d_parent_ops
);
&
object
->
wineD3DVertexBuffer
,
(
IUnknown
*
)
object
,
&
ddraw_null_wined3d_parent_ops
);
if
(
hr
!=
D3D_OK
)
if
(
hr
!=
D3D_OK
)
...
...
dlls/wined3d/buffer.c
View file @
d4275e87
...
@@ -325,8 +325,7 @@ static BOOL buffer_find_decl(struct wined3d_buffer *This)
...
@@ -325,8 +325,7 @@ static BOOL buffer_find_decl(struct wined3d_buffer *This)
*/
*/
if
(
This
->
flags
&
WINED3D_BUFFER_HASDESC
)
if
(
This
->
flags
&
WINED3D_BUFFER_HASDESC
)
{
{
if
(((
IWineD3DImpl
*
)
device
->
wineD3D
)
->
dxVersion
==
7
||
if
(
This
->
resource
.
usage
&
WINED3DUSAGE_STATICDECL
)
return
FALSE
;
This
->
resource
.
format_desc
->
format
!=
WINED3DFMT_VERTEXDATA
)
return
FALSE
;
}
}
TRACE
(
"Finding vertex buffer conversion information
\n
"
);
TRACE
(
"Finding vertex buffer conversion information
\n
"
);
...
...
dlls/wined3d/device.c
View file @
d4275e87
...
@@ -569,8 +569,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateIndexBuffer(IWineD3DDevice *iface
...
@@ -569,8 +569,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateIndexBuffer(IWineD3DDevice *iface
return
WINED3DERR_OUTOFVIDEOMEMORY
;
return
WINED3DERR_OUTOFVIDEOMEMORY
;
}
}
hr
=
buffer_init
(
object
,
This
,
Length
,
Usage
,
WINED3DFMT_UNKNOWN
,
hr
=
buffer_init
(
object
,
This
,
Length
,
Usage
|
WINED3DUSAGE_STATICDECL
,
Pool
,
GL_ELEMENT_ARRAY_BUFFER_ARB
,
NULL
,
parent
,
parent_ops
);
WINED3DFMT_UNKNOWN
,
Pool
,
GL_ELEMENT_ARRAY_BUFFER_ARB
,
NULL
,
parent
,
parent_ops
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
{
{
WARN
(
"Failed to initialize buffer, hr %#x
\n
"
,
hr
);
WARN
(
"Failed to initialize buffer, hr %#x
\n
"
,
hr
);
...
...
include/wine/wined3d.idl
View file @
d4275e87
...
@@ -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_STATICDECL
=
0
x20000000
;
const
UINT
WINED3DUSAGE_OPTIMIZE
=
0
x40000000
;
const
UINT
WINED3DUSAGE_OPTIMIZE
=
0
x40000000
;
const
UINT
WINED3DUSAGE_OVERLAY
=
0
x80000000
;
const
UINT
WINED3DUSAGE_OVERLAY
=
0
x80000000
;
...
...
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