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
c26c9bad
Commit
c26c9bad
authored
Jan 30, 2018
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 30, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use the resource access flags in buffer_init().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e29678da
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
buffer.c
dlls/wined3d/buffer.c
+4
-3
wined3d_private.h
dlls/wined3d/wined3d_private.h
+5
-0
No files found.
dlls/wined3d/buffer.c
View file @
c26c9bad
...
...
@@ -1365,7 +1365,8 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device
buffer
,
buffer
->
resource
.
size
,
buffer
->
resource
.
usage
,
debug_d3dformat
(
buffer
->
resource
.
format
->
id
),
buffer
->
resource
.
heap_memory
);
if
(
device
->
create_parms
.
flags
&
WINED3DCREATE_SOFTWARE_VERTEXPROCESSING
||
pool
==
WINED3D_POOL_MANAGED
)
if
(
device
->
create_parms
.
flags
&
WINED3DCREATE_SOFTWARE_VERTEXPROCESSING
||
wined3d_resource_access_is_managed
(
buffer
->
resource
.
access
))
{
/* SWvp and managed buffers always return the same pointer in buffer
* maps and retain data in DISCARD maps. Keep a system memory copy of
...
...
@@ -1383,9 +1384,9 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device
{
TRACE
(
"Not creating a BO because GL_ARB_vertex_buffer is not supported.
\n
"
);
}
else
if
(
buffer
->
resource
.
pool
==
WINED3D_POOL_SYSTEM_MEM
)
else
if
(
!
(
buffer
->
resource
.
access
&
WINED3D_RESOURCE_ACCESS_GPU
)
)
{
TRACE
(
"Not creating a BO because the buffer is
in system memory
.
\n
"
);
TRACE
(
"Not creating a BO because the buffer is
not GPU accessible
.
\n
"
);
}
else
if
(
!
dynamic_buffer_ok
&&
(
buffer
->
resource
.
usage
&
WINED3DUSAGE_DYNAMIC
))
{
...
...
dlls/wined3d/wined3d_private.h
View file @
c26c9bad
...
...
@@ -2965,6 +2965,11 @@ static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD sta
#define WINED3D_RESOURCE_ACCESS_CPU 0x2u
#define WINED3D_RESOURCE_ACCESS_MAP 0x4u
static
inline
BOOL
wined3d_resource_access_is_managed
(
unsigned
int
access
)
{
return
!
(
~
access
&
(
WINED3D_RESOURCE_ACCESS_GPU
|
WINED3D_RESOURCE_ACCESS_CPU
));
}
struct
wined3d_resource_ops
{
ULONG
(
*
resource_incref
)(
struct
wined3d_resource
*
resource
);
...
...
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