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
9f85b5f8
Commit
9f85b5f8
authored
Sep 01, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 02, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Send resource maps through the command stream.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4987ef49
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
1 deletion
+45
-1
cs.c
dlls/wined3d/cs.c
+42
-0
resource.c
dlls/wined3d/resource.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-0
No files found.
dlls/wined3d/cs.c
View file @
9f85b5f8
...
...
@@ -57,6 +57,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_QUERY_ISSUE
,
WINED3D_CS_OP_PRELOAD_RESOURCE
,
WINED3D_CS_OP_UNLOAD_RESOURCE
,
WINED3D_CS_OP_MAP
,
};
struct
wined3d_cs_present
...
...
@@ -289,6 +290,17 @@ struct wined3d_cs_unload_resource
struct
wined3d_resource
*
resource
;
};
struct
wined3d_cs_map
{
enum
wined3d_cs_op
opcode
;
struct
wined3d_resource
*
resource
;
unsigned
int
sub_resource_idx
;
struct
wined3d_map_desc
*
map_desc
;
const
struct
wined3d_box
*
box
;
DWORD
flags
;
HRESULT
*
hr
;
};
static
void
wined3d_cs_exec_present
(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
{
const
struct
wined3d_cs_present
*
op
=
data
;
...
...
@@ -1301,6 +1313,35 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
cs
->
ops
->
submit
(
cs
);
}
static
void
wined3d_cs_exec_map
(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
{
const
struct
wined3d_cs_map
*
op
=
data
;
struct
wined3d_resource
*
resource
=
op
->
resource
;
*
op
->
hr
=
resource
->
resource_ops
->
resource_sub_resource_map
(
resource
,
op
->
sub_resource_idx
,
op
->
map_desc
,
op
->
box
,
op
->
flags
);
}
HRESULT
wined3d_cs_map
(
struct
wined3d_cs
*
cs
,
struct
wined3d_resource
*
resource
,
unsigned
int
sub_resource_idx
,
struct
wined3d_map_desc
*
map_desc
,
const
struct
wined3d_box
*
box
,
unsigned
int
flags
)
{
struct
wined3d_cs_map
*
op
;
HRESULT
hr
;
op
=
cs
->
ops
->
require_space
(
cs
,
sizeof
(
*
op
));
op
->
opcode
=
WINED3D_CS_OP_MAP
;
op
->
resource
=
resource
;
op
->
sub_resource_idx
=
sub_resource_idx
;
op
->
map_desc
=
map_desc
;
op
->
box
=
box
;
op
->
flags
=
flags
;
op
->
hr
=
&
hr
;
cs
->
ops
->
submit
(
cs
);
return
hr
;
}
static
void
(
*
const
wined3d_cs_op_handlers
[])(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
=
{
/* WINED3D_CS_OP_PRESENT */
wined3d_cs_exec_present
,
...
...
@@ -1334,6 +1375,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* 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
,
/* WINED3D_CS_OP_MAP */
wined3d_cs_exec_map
,
};
static
void
*
wined3d_cs_st_require_space
(
struct
wined3d_cs
*
cs
,
size_t
size
)
...
...
dlls/wined3d/resource.c
View file @
9f85b5f8
...
...
@@ -317,7 +317,7 @@ HRESULT CDECL wined3d_resource_map(struct wined3d_resource *resource, unsigned i
TRACE
(
"resource %p, sub_resource_idx %u, map_desc %p, box %s, flags %#x.
\n
"
,
resource
,
sub_resource_idx
,
map_desc
,
debug_box
(
box
),
flags
);
return
resource
->
resource_ops
->
resource_sub_resource_map
(
resource
,
sub_resource_idx
,
map_desc
,
box
,
flags
);
return
wined3d_cs_map
(
resource
->
device
->
cs
,
resource
,
sub_resource_idx
,
map_desc
,
box
,
flags
);
}
HRESULT
CDECL
wined3d_resource_unmap
(
struct
wined3d_resource
*
resource
,
unsigned
int
sub_resource_idx
)
...
...
dlls/wined3d/wined3d_private.h
View file @
9f85b5f8
...
...
@@ -3096,6 +3096,8 @@ 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
;
HRESULT
wined3d_cs_map
(
struct
wined3d_cs
*
cs
,
struct
wined3d_resource
*
resource
,
unsigned
int
sub_resource_idx
,
struct
wined3d_map_desc
*
map_desc
,
const
struct
wined3d_box
*
box
,
unsigned
int
flags
)
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