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
b2666a63
Commit
b2666a63
authored
Aug 26, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 26, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Send resource preloads through the command stream.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
94070761
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
1 deletion
+32
-1
cs.c
dlls/wined3d/cs.c
+30
-0
resource.c
dlls/wined3d/resource.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/cs.c
View file @
b2666a63
...
...
@@ -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_PRELOAD_RESOURCE
,
WINED3D_CS_OP_UNLOAD_RESOURCE
,
};
...
...
@@ -276,6 +277,12 @@ struct wined3d_cs_query_issue
DWORD
flags
;
};
struct
wined3d_cs_preload_resource
{
enum
wined3d_cs_op
opcode
;
struct
wined3d_resource
*
resource
;
};
struct
wined3d_cs_unload_resource
{
enum
wined3d_cs_op
opcode
;
...
...
@@ -1250,6 +1257,28 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
cs
->
ops
->
submit
(
cs
);
}
static
void
wined3d_cs_exec_preload_resource
(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
{
const
struct
wined3d_cs_preload_resource
*
op
=
data
;
struct
wined3d_resource
*
resource
=
op
->
resource
;
resource
->
resource_ops
->
resource_preload
(
resource
);
wined3d_resource_release
(
resource
);
}
void
wined3d_cs_emit_preload_resource
(
struct
wined3d_cs
*
cs
,
struct
wined3d_resource
*
resource
)
{
struct
wined3d_cs_preload_resource
*
op
;
op
=
cs
->
ops
->
require_space
(
cs
,
sizeof
(
*
op
));
op
->
opcode
=
WINED3D_CS_OP_PRELOAD_RESOURCE
;
op
->
resource
=
resource
;
wined3d_resource_acquire
(
resource
);
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
;
...
...
@@ -1303,6 +1332,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_PRELOAD_RESOURCE */
wined3d_cs_exec_preload_resource
,
/* WINED3D_CS_OP_UNLOAD_RESOURCE */
wined3d_cs_exec_unload_resource
,
};
...
...
dlls/wined3d/resource.c
View file @
b2666a63
...
...
@@ -329,7 +329,7 @@ HRESULT CDECL wined3d_resource_unmap(struct wined3d_resource *resource, unsigned
void
CDECL
wined3d_resource_preload
(
struct
wined3d_resource
*
resource
)
{
resource
->
resource_ops
->
resource_preload
(
resource
);
wined3d_cs_emit_preload_resource
(
resource
->
device
->
cs
,
resource
);
}
BOOL
wined3d_resource_allocate_sysmem
(
struct
wined3d_resource
*
resource
)
...
...
dlls/wined3d/wined3d_private.h
View file @
b2666a63
...
...
@@ -3048,6 +3048,7 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs,
void
(
*
callback
)(
void
*
object
),
void
*
object
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_draw
(
struct
wined3d_cs
*
cs
,
int
base_vertex_idx
,
unsigned
int
start_idx
,
unsigned
int
index_count
,
unsigned
int
start_instance
,
unsigned
int
instance_count
,
BOOL
indexed
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_preload_resource
(
struct
wined3d_cs
*
cs
,
struct
wined3d_resource
*
resource
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_present
(
struct
wined3d_cs
*
cs
,
struct
wined3d_swapchain
*
swapchain
,
const
RECT
*
src_rect
,
const
RECT
*
dst_rect
,
HWND
dst_window_override
,
DWORD
flags
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_query_issue
(
struct
wined3d_cs
*
cs
,
struct
wined3d_query
*
query
,
DWORD
flags
)
DECLSPEC_HIDDEN
;
...
...
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