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
e328e24d
Commit
e328e24d
authored
Jan 12, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jan 15, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Better tracking of vertex buffer assignments.
parent
03389acc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
11 deletions
+6
-11
device.c
dlls/wined3d/device.c
+2
-6
vertexbuffer.c
dlls/wined3d/vertexbuffer.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+3
-4
No files found.
dlls/wined3d/device.c
View file @
e328e24d
...
...
@@ -2243,14 +2243,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetStreamSource(IWineD3DDevice *iface,
so for now, just count internally */
if
(
pStreamData
!=
NULL
)
{
IWineD3DVertexBufferImpl
*
vbImpl
=
(
IWineD3DVertexBufferImpl
*
)
pStreamData
;
if
(
(
vbImpl
->
Flags
&
VBFLAG_STREAM
)
&&
vbImpl
->
stream
!=
StreamNumber
)
{
WARN
(
"Assigning a Vertex Buffer to stream %d which is already assigned to stream %d
\n
"
,
StreamNumber
,
vbImpl
->
stream
);
}
vbImpl
->
stream
=
StreamNumber
;
vbImpl
->
Flags
|=
VBFLAG_STREAM
;
InterlockedIncrement
(
&
vbImpl
->
bindCount
);
}
if
(
oldSrc
!=
NULL
)
{
((
IWineD3DVertexBufferImpl
*
)
oldSrc
)
->
Flags
&=
~
VBFLAG_STREAM
;
InterlockedDecrement
(
&
((
IWineD3DVertexBufferImpl
*
)
oldSrc
)
->
bindCount
)
;
}
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_STREAMSRC
);
...
...
dlls/wined3d/vertexbuffer.c
View file @
e328e24d
...
...
@@ -266,7 +266,7 @@ static void WINAPI IWineD3DVertexBufferImpl_PreLoad(IWineD3DVertexBuffer *if
}
/* Reading the declaration makes only sense if the stateblock is finalized and the buffer bound to a stream */
if
(
This
->
resource
.
wineD3DDevice
->
isInDraw
&&
This
->
Flags
&
VBFLAG_STREAM
)
{
if
(
This
->
resource
.
wineD3DDevice
->
isInDraw
&&
This
->
bindCount
>
0
)
{
declChanged
=
IWineD3DVertexBufferImpl_FindDecl
(
This
);
}
else
if
(
This
->
Flags
&
VBFLAG_HASDESC
)
{
/* Reuse the declaration stored in the buffer. It will most likely not change, and if it does
...
...
dlls/wined3d/wined3d_private.h
View file @
e328e24d
...
...
@@ -751,7 +751,7 @@ typedef struct IWineD3DVertexBufferImpl
/* Vertex buffer object support */
GLuint
vbo
;
BYTE
Flags
;
UINT
stream
;
LONG
bindCount
;
UINT
dirtystart
,
dirtyend
;
LONG
lockcount
;
...
...
@@ -766,9 +766,8 @@ extern const IWineD3DVertexBufferVtbl IWineD3DVertexBuffer_Vtbl;
#define VBFLAG_LOAD 0x01
/* Data is written from allocatedMemory to the VBO */
#define VBFLAG_OPTIMIZED 0x02
/* Optimize has been called for the VB */
#define VBFLAG_DIRTY 0x04
/* Buffer data has been modified */
#define VBFLAG_STREAM 0x08
/* The vertex buffer is in a stream */
#define VBFLAG_HASDESC 0x10
/* A vertex description has been found */
#define VBFLAG_VBOCREATEFAIL 0x20
/* An attempt to create a vbo has failed */
#define VBFLAG_HASDESC 0x08
/* A vertex description has been found */
#define VBFLAG_VBOCREATEFAIL 0x10
/* An attempt to create a vbo has failed */
/*****************************************************************************
* IWineD3DIndexBuffer implementation structure (extends IWineD3DResourceImpl)
...
...
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