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
f9756519
Commit
f9756519
authored
Feb 16, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 16, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Drop buffer objects from the stream info as well when PreLoad drops them.
parent
974f888d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
12 deletions
+22
-12
device.c
dlls/wined3d/device.c
+22
-12
No files found.
dlls/wined3d/device.c
View file @
f9756519
...
...
@@ -179,8 +179,6 @@ void device_stream_info_from_declaration(IWineD3DDeviceImpl *This,
{
/* We need to deal with frequency data! */
IWineD3DVertexDeclarationImpl
*
declaration
=
(
IWineD3DVertexDeclarationImpl
*
)
This
->
stateBlock
->
vertexDecl
;
UINT
stream_count
=
This
->
stateBlock
->
streamIsUP
?
0
:
declaration
->
num_streams
;
const
DWORD
*
streams
=
declaration
->
streams
;
unsigned
int
i
;
stream_info
->
use_map
=
0
;
...
...
@@ -307,17 +305,29 @@ void device_stream_info_from_declaration(IWineD3DDeviceImpl *This,
}
}
/* Now call PreLoad on all the vertex buffers. In the very rare case
* that the buffers stopps converting PreLoad will dirtify the VDECL again.
* The vertex buffer can now use the strided structure in the device instead of finding its
* own again.
*
* NULL streams won't be recorded in the array, UP streams won't be either. A stream is only
* once in there. */
for
(
i
=
0
;
i
<
stream_count
;
++
i
)
if
(
!
This
->
stateBlock
->
streamIsUP
)
{
IWineD3DBuffer
*
vb
=
This
->
stateBlock
->
streamSource
[
streams
[
i
]];
if
(
vb
)
IWineD3DBuffer_PreLoad
(
vb
);
WORD
map
=
stream_info
->
use_map
;
/* PreLoad all the vertex buffers. */
for
(
i
=
0
;
map
;
map
>>=
1
,
++
i
)
{
struct
wined3d_stream_info_element
*
element
;
struct
wined3d_buffer
*
buffer
;
if
(
!
(
map
&
1
))
continue
;
element
=
&
stream_info
->
elements
[
i
];
buffer
=
(
struct
wined3d_buffer
*
)
This
->
stateBlock
->
streamSource
[
element
->
stream_idx
];
IWineD3DBuffer_PreLoad
((
IWineD3DBuffer
*
)
buffer
);
/* If PreLoad dropped the buffer object, update the stream info. */
if
(
buffer
->
buffer_object
!=
element
->
buffer_object
)
{
element
->
buffer_object
=
0
;
element
->
data
=
buffer_get_sysmem
(
buffer
)
+
(
ptrdiff_t
)
element
->
data
;
}
}
}
}
...
...
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