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
413ccc82
Commit
413ccc82
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: Load WINED3D_LOCATION_BUFFER if needed in wined3d_buffer_map().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e2dbbec1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
buffer.c
dlls/wined3d/buffer.c
+11
-6
No files found.
dlls/wined3d/buffer.c
View file @
413ccc82
...
...
@@ -1034,6 +1034,7 @@ static HRESULT wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UI
}
if
(
!
(
flags
&
(
WINED3D_MAP_NOOVERWRITE
|
WINED3D_MAP_DISCARD
|
WINED3D_MAP_READONLY
))
||
((
flags
&
WINED3D_MAP_READONLY
)
&&
(
buffer
->
locations
&
WINED3D_LOCATION_SYSMEM
))
||
buffer
->
flags
&
WINED3D_BUFFER_PIN_SYSMEM
)
{
if
(
!
(
buffer
->
locations
&
WINED3D_LOCATION_SYSMEM
))
...
...
@@ -1048,6 +1049,14 @@ static HRESULT wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UI
}
else
{
const
struct
wined3d_gl_info
*
gl_info
;
context
=
context_acquire
(
device
,
NULL
);
gl_info
=
context
->
gl_info
;
if
(
!
(
flags
&
WINED3D_MAP_DISCARD
))
wined3d_buffer_load_location
(
buffer
,
context
,
WINED3D_LOCATION_BUFFER
);
if
(
!
(
flags
&
WINED3D_MAP_READONLY
))
buffer_invalidate_bo_range
(
buffer
,
dirty_offset
,
dirty_size
);
...
...
@@ -1056,11 +1065,6 @@ static HRESULT wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UI
if
(
count
==
1
)
{
const
struct
wined3d_gl_info
*
gl_info
;
context
=
context_acquire
(
device
,
NULL
);
gl_info
=
context
->
gl_info
;
buffer_bind
(
buffer
,
context
);
if
(
gl_info
->
supported
[
ARB_MAP_BUFFER_RANGE
])
...
...
@@ -1105,8 +1109,9 @@ static HRESULT wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UI
TRACE
(
"New pointer is %p.
\n
"
,
buffer
->
resource
.
heap_memory
);
buffer
->
map_ptr
=
NULL
;
}
context_release
(
context
);
}
context_release
(
context
);
}
if
(
flags
&
WINED3D_MAP_DISCARD
)
...
...
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