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
15d53761
Commit
15d53761
authored
Jan 31, 2017
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 31, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Do not pin system memory in wined3d_buffer_load_location().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7ebe59b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
buffer.c
dlls/wined3d/buffer.c
+9
-8
No files found.
dlls/wined3d/buffer.c
View file @
15d53761
...
...
@@ -604,7 +604,6 @@ BOOL wined3d_buffer_load_location(struct wined3d_buffer *buffer,
GL_EXTCALL
(
glGetBufferSubData
(
buffer
->
buffer_type_hint
,
0
,
buffer
->
resource
.
size
,
buffer
->
resource
.
heap_memory
));
checkGLcall
(
"buffer download"
);
buffer
->
flags
|=
WINED3D_BUFFER_PIN_SYSMEM
;
break
;
case
WINED3D_LOCATION_BUFFER
:
...
...
@@ -623,7 +622,8 @@ BOOL wined3d_buffer_load_location(struct wined3d_buffer *buffer,
/* Context activation is done by the caller. */
BYTE
*
wined3d_buffer_load_sysmem
(
struct
wined3d_buffer
*
buffer
,
struct
wined3d_context
*
context
)
{
wined3d_buffer_load_location
(
buffer
,
context
,
WINED3D_LOCATION_SYSMEM
);
if
(
wined3d_buffer_load_location
(
buffer
,
context
,
WINED3D_LOCATION_SYSMEM
))
buffer
->
flags
|=
WINED3D_BUFFER_PIN_SYSMEM
;
return
buffer
->
resource
.
heap_memory
;
}
...
...
@@ -655,7 +655,6 @@ DWORD wined3d_buffer_get_memory(struct wined3d_buffer *buffer,
static
void
buffer_unload
(
struct
wined3d_resource
*
resource
)
{
struct
wined3d_buffer
*
buffer
=
buffer_from_resource
(
resource
);
DWORD
flags
=
buffer
->
flags
;
TRACE
(
"buffer %p.
\n
"
,
buffer
);
...
...
@@ -665,11 +664,7 @@ static void buffer_unload(struct wined3d_resource *resource)
context
=
context_acquire
(
resource
->
device
,
NULL
);
/* Download the buffer, but don't permanently enable double buffering. */
wined3d_buffer_load_location
(
buffer
,
context
,
WINED3D_LOCATION_SYSMEM
);
if
(
!
(
flags
&
WINED3D_BUFFER_PIN_SYSMEM
))
buffer
->
flags
&=
~
WINED3D_BUFFER_PIN_SYSMEM
;
wined3d_buffer_invalidate_location
(
buffer
,
WINED3D_LOCATION_BUFFER
);
buffer_destroy_buffer_object
(
buffer
,
context
);
buffer_clear_dirty_areas
(
buffer
);
...
...
@@ -825,7 +820,12 @@ static void buffer_conversion_upload(struct wined3d_buffer *buffer, struct wined
unsigned
int
i
,
j
,
range_idx
,
start
,
end
,
vertex_count
;
BYTE
*
data
;
wined3d_buffer_load_location
(
buffer
,
context
,
WINED3D_LOCATION_SYSMEM
);
if
(
!
wined3d_buffer_load_location
(
buffer
,
context
,
WINED3D_LOCATION_SYSMEM
))
{
ERR
(
"Failed to load system memory.
\n
"
);
return
;
}
buffer
->
flags
|=
WINED3D_BUFFER_PIN_SYSMEM
;
/* Now for each vertex in the buffer that needs conversion. */
vertex_count
=
buffer
->
resource
.
size
/
buffer
->
stride
;
...
...
@@ -1106,6 +1106,7 @@ static HRESULT wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UI
{
TRACE
(
"Falling back to doublebuffered operation.
\n
"
);
wined3d_buffer_load_location
(
buffer
,
context
,
WINED3D_LOCATION_SYSMEM
);
buffer
->
flags
|=
WINED3D_BUFFER_PIN_SYSMEM
;
}
TRACE
(
"New pointer is %p.
\n
"
,
buffer
->
resource
.
heap_memory
);
buffer
->
map_ptr
=
NULL
;
...
...
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