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
cac28d32
Commit
cac28d32
authored
Aug 05, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 05, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Evict managed resources through the command stream.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
00728308
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
1 deletion
+29
-1
cs.c
dlls/wined3d/cs.c
+27
-0
device.c
dlls/wined3d/device.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/cs.c
View file @
cac28d32
...
...
@@ -55,6 +55,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_RESET_STATE
,
WINED3D_CS_OP_DESTROY_OBJECT
,
WINED3D_CS_OP_QUERY_ISSUE
,
WINED3D_CS_OP_UNLOAD_RESOURCE
,
};
struct
wined3d_cs_present
...
...
@@ -275,6 +276,12 @@ struct wined3d_cs_query_issue
DWORD
flags
;
};
struct
wined3d_cs_unload_resource
{
enum
wined3d_cs_op
opcode
;
struct
wined3d_resource
*
resource
;
};
static
void
wined3d_cs_exec_present
(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
{
const
struct
wined3d_cs_present
*
op
=
data
;
...
...
@@ -1243,6 +1250,25 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
cs
->
ops
->
submit
(
cs
);
}
static
void
wined3d_cs_exec_unload_resource
(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
{
const
struct
wined3d_cs_unload_resource
*
op
=
data
;
struct
wined3d_resource
*
resource
=
op
->
resource
;
resource
->
resource_ops
->
resource_unload
(
resource
);
}
void
wined3d_cs_emit_unload_resource
(
struct
wined3d_cs
*
cs
,
struct
wined3d_resource
*
resource
)
{
struct
wined3d_cs_unload_resource
*
op
;
op
=
cs
->
ops
->
require_space
(
cs
,
sizeof
(
*
op
));
op
->
opcode
=
WINED3D_CS_OP_UNLOAD_RESOURCE
;
op
->
resource
=
resource
;
cs
->
ops
->
submit
(
cs
);
}
static
void
(
*
const
wined3d_cs_op_handlers
[])(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
=
{
/* WINED3D_CS_OP_PRESENT */
wined3d_cs_exec_present
,
...
...
@@ -1274,6 +1300,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_RESET_STATE */
wined3d_cs_exec_reset_state
,
/* WINED3D_CS_OP_DESTROY_OBJECT */
wined3d_cs_exec_destroy_object
,
/* WINED3D_CS_OP_QUERY_ISSUE */
wined3d_cs_exec_query_issue
,
/* WINED3D_CS_OP_UNLOAD_RESOURCE */
wined3d_cs_exec_unload_resource
,
};
static
void
*
wined3d_cs_st_require_space
(
struct
wined3d_cs
*
cs
,
size_t
size
)
...
...
dlls/wined3d/device.c
View file @
cac28d32
...
...
@@ -4544,7 +4544,7 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
if
(
resource
->
pool
==
WINED3D_POOL_MANAGED
&&
!
resource
->
map_count
)
{
TRACE
(
"Evicting %p.
\n
"
,
resource
);
resource
->
resource_ops
->
resource_unload
(
resource
);
wined3d_cs_emit_unload_resource
(
device
->
cs
,
resource
);
}
}
}
...
...
dlls/wined3d/wined3d_private.h
View file @
cac28d32
...
...
@@ -3090,6 +3090,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
void
wined3d_cs_emit_set_vertex_declaration
(
struct
wined3d_cs
*
cs
,
struct
wined3d_vertex_declaration
*
declaration
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_set_viewport
(
struct
wined3d_cs
*
cs
,
const
struct
wined3d_viewport
*
viewport
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_unload_resource
(
struct
wined3d_cs
*
cs
,
struct
wined3d_resource
*
resource
)
DECLSPEC_HIDDEN
;
static
inline
void
wined3d_cs_push_constants
(
struct
wined3d_cs
*
cs
,
enum
wined3d_push_constants
p
,
unsigned
int
start_idx
,
unsigned
int
count
,
const
void
*
constants
)
...
...
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