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
9f2e0fa2
Commit
9f2e0fa2
authored
Jan 06, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jan 08, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Do not try to read the vertex decl when the stateblock isn't finalized.
parent
2e55c196
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletion
+21
-1
drawprim.c
dlls/wined3d/drawprim.c
+6
-0
vertexbuffer.c
dlls/wined3d/vertexbuffer.c
+14
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/drawprim.c
View file @
9f2e0fa2
...
...
@@ -1247,6 +1247,9 @@ void drawPrimitive(IWineD3DDevice *iface,
DWORD
dirtyState
,
idx
;
BYTE
shift
;
/* Signals other modules that a drawing is in progress and the stateblock finalized */
This
->
isInDraw
=
TRUE
;
/* Invalidate the back buffer memory so LockRect will read it the next time */
for
(
i
=
0
;
i
<
IWineD3DDevice_GetNumberOfSwapChains
(
iface
);
i
++
)
{
IWineD3DDevice_GetSwapChain
(
iface
,
i
,
(
IWineD3DSwapChain
**
)
&
swapchain
);
...
...
@@ -1340,4 +1343,7 @@ void drawPrimitive(IWineD3DDevice *iface,
++
primCounter
;
}
#endif
/* Control goes back to the device, stateblock values may change again */
This
->
isInDraw
=
FALSE
;
}
dlls/wined3d/vertexbuffer.c
View file @
9f2e0fa2
...
...
@@ -258,7 +258,20 @@ static void WINAPI IWineD3DVertexBufferImpl_PreLoad(IWineD3DVertexBuffer *if
return
;
/* Not doing any conversion */
}
declChanged
=
IWineD3DVertexBufferImpl_FindDecl
(
This
);
/* 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
)
{
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
* the stream source state handler will call PreLoad again and the change will be cought
*/
}
else
{
/* Cannot get a declaration, and no declaration is stored in the buffer. It is pointless to preload
* now. When the buffer is used, PreLoad will be called by the stream source state handler and a valid
* declaration for the buffer can be found
*/
return
;
}
/* If applications change the declaration over and over, reconverting all the time is a huge
* performance hit. So count the declaration changes and release the VBO if there are too much
...
...
dlls/wined3d/wined3d_private.h
View file @
9f2e0fa2
...
...
@@ -588,6 +588,7 @@ typedef struct IWineD3DDeviceImpl
BOOL
isRecordingState
;
IWineD3DStateBlockImpl
*
stateBlock
;
IWineD3DStateBlockImpl
*
updateStateBlock
;
BOOL
isInDraw
;
/* Internal use fields */
WINED3DDEVICE_CREATION_PARAMETERS
createParms
;
...
...
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