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
3dc55010
Commit
3dc55010
authored
Apr 19, 2009
by
Stefan Dösinger
Committed by
Alexandre Julliard
Apr 28, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Fix a few more direct buffer accesses.
parent
9296b1e9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
23 deletions
+3
-23
device.c
dlls/wined3d/device.c
+2
-22
state.c
dlls/wined3d/state.c
+1
-1
No files found.
dlls/wined3d/device.c
View file @
3dc55010
...
...
@@ -220,7 +220,7 @@ void device_stream_info_from_declaration(IWineD3DDeviceImpl *This,
{
WARN
(
"loadBaseVertexIndex is < 0 (%d), not using vbos
\n
"
,
This
->
stateBlock
->
loadBaseVertexIndex
);
buffer_object
=
0
;
data
=
((
struct
wined3d_buffer
*
)
This
->
stateBlock
->
streamSource
[
element
->
input_slot
])
->
resource
.
allocatedMemory
;
data
=
buffer_get_sysmem
((
struct
wined3d_buffer
*
)
This
->
stateBlock
->
streamSource
[
element
->
input_slot
])
;
if
((
UINT_PTR
)
data
<
-
This
->
stateBlock
->
loadBaseVertexIndex
*
stride
)
{
FIXME
(
"System memory vertex data load offset is negative!
\n
"
);
...
...
@@ -4531,27 +4531,7 @@ static HRESULT process_vertices_strided(IWineD3DDeviceImpl *This, DWORD dwDestIn
ENTER_GL
();
if
(
dest
->
resource
.
allocatedMemory
==
NULL
)
{
/* This may happen if we do direct locking into a vbo. Unlikely,
* but theoretically possible(ddraw processvertices test)
*/
dest
->
resource
.
allocatedMemory
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dest
->
resource
.
size
);
if
(
!
dest
->
resource
.
allocatedMemory
)
{
LEAVE_GL
();
ERR
(
"Out of memory
\n
"
);
return
E_OUTOFMEMORY
;
}
if
(
dest
->
buffer_object
)
{
const
void
*
src
;
GL_EXTCALL
(
glBindBufferARB
(
GL_ARRAY_BUFFER_ARB
,
dest
->
buffer_object
));
checkGLcall
(
"glBindBufferARB"
);
src
=
GL_EXTCALL
(
glMapBufferARB
(
GL_ARRAY_BUFFER_ARB
,
GL_READ_ONLY_ARB
));
if
(
src
)
{
memcpy
(
dest
->
resource
.
allocatedMemory
,
src
,
dest
->
resource
.
size
);
}
GL_EXTCALL
(
glUnmapBufferARB
(
GL_ARRAY_BUFFER_ARB
));
checkGLcall
(
"glUnmapBufferARB"
);
}
buffer_get_sysmem
(
dest
);
}
/* Get a pointer into the destination vbo(create one if none exists) and
...
...
dlls/wined3d/state.c
View file @
3dc55010
...
...
@@ -3913,7 +3913,7 @@ static inline void loadNumberedArrays(IWineD3DStateBlockImpl *stateblock,
if
(
stream_info
->
elements
[
i
].
buffer_object
)
{
vb
=
(
struct
wined3d_buffer
*
)
stateblock
->
streamSource
[
stream_info
->
elements
[
i
].
stream_idx
];
ptr
+=
(
long
)
vb
->
resource
.
allocatedMemory
;
ptr
+=
(
long
)
buffer_get_sysmem
(
vb
)
;
}
if
(
context
->
numbered_array_mask
&
(
1
<<
i
))
unload_numbered_array
(
stateblock
,
context
,
i
);
...
...
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