Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
12140b51
Commit
12140b51
authored
Apr 19, 2011
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jun 17, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Drop the VBO when the GL alignment doesn't fit on dynamic buffers.
parent
ae5ca837
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
buffer.c
dlls/wined3d/buffer.c
+16
-3
No files found.
dlls/wined3d/buffer.c
View file @
12140b51
...
@@ -1053,8 +1053,7 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
...
@@ -1053,8 +1053,7 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
if
(((
DWORD_PTR
)
buffer
->
resource
.
allocatedMemory
)
&
(
RESOURCE_ALIGNMENT
-
1
))
if
(((
DWORD_PTR
)
buffer
->
resource
.
allocatedMemory
)
&
(
RESOURCE_ALIGNMENT
-
1
))
{
{
WARN
(
"Pointer %p is not %u byte aligned, falling back to double buffered operation.
\n
"
,
WARN
(
"Pointer %p is not %u byte aligned.
\n
"
,
buffer
->
resource
.
allocatedMemory
,
RESOURCE_ALIGNMENT
);
buffer
->
resource
.
allocatedMemory
,
RESOURCE_ALIGNMENT
);
ENTER_GL
();
ENTER_GL
();
GL_EXTCALL
(
glUnmapBufferARB
(
buffer
->
buffer_type_hint
));
GL_EXTCALL
(
glUnmapBufferARB
(
buffer
->
buffer_type_hint
));
...
@@ -1062,7 +1061,21 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
...
@@ -1062,7 +1061,21 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
LEAVE_GL
();
LEAVE_GL
();
buffer
->
resource
.
allocatedMemory
=
NULL
;
buffer
->
resource
.
allocatedMemory
=
NULL
;
buffer_get_sysmem
(
buffer
,
gl_info
);
if
(
buffer
->
resource
.
usage
&
WINED3DUSAGE_DYNAMIC
)
{
/* The extra copy is more expensive than not using VBOs at
* all on the Nvidia Linux driver, which is the only driver
* that returns unaligned pointers
*/
TRACE
(
"Dynamic buffer, dropping VBO
\n
"
);
buffer_unload
(
&
buffer
->
resource
);
buffer
->
flags
&=
~
WINED3D_BUFFER_CREATEBO
;
}
else
{
TRACE
(
"Falling back to doublebuffered operation
\n
"
);
buffer_get_sysmem
(
buffer
,
gl_info
);
}
TRACE
(
"New pointer is %p.
\n
"
,
buffer
->
resource
.
allocatedMemory
);
TRACE
(
"New pointer is %p.
\n
"
,
buffer
->
resource
.
allocatedMemory
);
}
}
context_release
(
context
);
context_release
(
context
);
...
...
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