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
537e20e0
Commit
537e20e0
authored
Dec 01, 2021
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Map OpenGL adapter BOs persistently on 64-bit architectures.
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f6cefaa9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
context_gl.c
dlls/wined3d/context_gl.c
+22
-1
No files found.
dlls/wined3d/context_gl.c
View file @
537e20e0
...
...
@@ -2705,10 +2705,22 @@ static void *wined3d_bo_gl_map(struct wined3d_bo_gl *bo, struct wined3d_context_
wined3d_context_gl_wait_command_fence
(
context_gl
,
bo
->
command_fence_id
);
map:
if
(
bo
->
b
.
map_ptr
)
return
(
uint8_t
*
)
bo
->
b
.
map_ptr
;
gl_info
=
context_gl
->
gl_info
;
wined3d_context_gl_bind_bo
(
context_gl
,
bo
->
binding
,
bo
->
id
);
if
(
gl_info
->
supported
[
ARB_MAP_BUFFER_RANGE
])
if
(
gl_info
->
supported
[
ARB_BUFFER_STORAGE
])
{
if
((
map_ptr
=
GL_EXTCALL
(
glMapBufferRange
(
bo
->
binding
,
0
,
bo
->
size
,
GL_MAP_PERSISTENT_BIT
|
GL_MAP_COHERENT_BIT
|
wined3d_resource_gl_map_flags
(
bo
,
flags
)))))
{
if
(
wined3d_map_persistent
())
bo
->
b
.
map_ptr
=
map_ptr
;
}
}
else
if
(
gl_info
->
supported
[
ARB_MAP_BUFFER_RANGE
])
{
map_ptr
=
GL_EXTCALL
(
glMapBufferRange
(
bo
->
binding
,
0
,
bo
->
size
,
wined3d_resource_gl_map_flags
(
bo
,
flags
)));
}
...
...
@@ -2791,6 +2803,9 @@ void wined3d_context_gl_unmap_bo_address(struct wined3d_context_gl *context_gl,
flush_bo_ranges
(
context_gl
,
wined3d_const_bo_address
(
data
),
range_count
,
ranges
);
if
(
bo
->
b
.
map_ptr
)
return
;
gl_info
=
context_gl
->
gl_info
;
wined3d_context_gl_bind_bo
(
context_gl
,
bo
->
binding
,
bo
->
id
);
GL_EXTCALL
(
glUnmapBuffer
(
bo
->
binding
));
...
...
@@ -2908,9 +2923,15 @@ bool wined3d_context_gl_create_bo(struct wined3d_context_gl *context_gl, GLsizei
}
if
(
gl_info
->
supported
[
ARB_BUFFER_STORAGE
])
{
if
(
flags
&
(
GL_MAP_READ_BIT
|
GL_MAP_WRITE_BIT
))
flags
|=
GL_MAP_PERSISTENT_BIT
|
GL_MAP_COHERENT_BIT
;
GL_EXTCALL
(
glBufferStorage
(
binding
,
size
,
NULL
,
flags
|
GL_DYNAMIC_STORAGE_BIT
));
}
else
{
GL_EXTCALL
(
glBufferData
(
binding
,
size
,
NULL
,
usage
));
}
wined3d_context_gl_bind_bo
(
context_gl
,
binding
,
0
);
checkGLcall
(
"buffer object creation"
);
...
...
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