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
12066a21
Commit
12066a21
authored
Sep 21, 2022
by
Matteo Bruni
Committed by
Alexandre Julliard
Dec 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add a bunch of d3d_perf traces.
parent
295c577f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
cs.c
dlls/wined3d/cs.c
+8
-1
No files found.
dlls/wined3d/cs.c
View file @
12066a21
...
@@ -1128,6 +1128,7 @@ static void wined3d_cs_exec_flush(struct wined3d_cs *cs, const void *data)
...
@@ -1128,6 +1128,7 @@ static void wined3d_cs_exec_flush(struct wined3d_cs *cs, const void *data)
{
{
struct
wined3d_context
*
context
;
struct
wined3d_context
*
context
;
TRACE_
(
d3d_perf
)(
"Flushing adapter.
\n
"
);
context
=
context_acquire
(
cs
->
c
.
device
,
NULL
,
0
);
context
=
context_acquire
(
cs
->
c
.
device
,
NULL
,
0
);
cs
->
c
.
device
->
adapter
->
adapter_ops
->
adapter_flush_context
(
context
);
cs
->
c
.
device
->
adapter
->
adapter_ops
->
adapter_flush_context
(
context
);
context_release
(
context
);
context_release
(
context
);
...
@@ -2475,6 +2476,8 @@ HRESULT wined3d_device_context_emit_map(struct wined3d_device_context *context,
...
@@ -2475,6 +2476,8 @@ HRESULT wined3d_device_context_emit_map(struct wined3d_device_context *context,
return
WINED3D_OK
;
return
WINED3D_OK
;
}
}
TRACE_
(
d3d_perf
)(
"Mapping resource %p (type %u), flags %#x through the CS.
\n
"
,
resource
,
resource
->
type
,
flags
);
wined3d_resource_wait_idle
(
resource
);
wined3d_resource_wait_idle
(
resource
);
/* We might end up invalidating the resource on the CS thread. */
/* We might end up invalidating the resource on the CS thread. */
...
@@ -2527,6 +2530,8 @@ HRESULT wined3d_device_context_emit_unmap(struct wined3d_device_context *context
...
@@ -2527,6 +2530,8 @@ HRESULT wined3d_device_context_emit_unmap(struct wined3d_device_context *context
wined3d_not_from_cs
(
context
->
device
->
cs
);
wined3d_not_from_cs
(
context
->
device
->
cs
);
TRACE_
(
d3d_perf
)(
"Unmapping resource %p (type %u) through the CS.
\n
"
,
resource
,
resource
->
type
);
if
(
!
(
op
=
wined3d_device_context_require_space
(
context
,
sizeof
(
*
op
),
WINED3D_CS_QUEUE_MAP
)))
if
(
!
(
op
=
wined3d_device_context_require_space
(
context
,
sizeof
(
*
op
),
WINED3D_CS_QUEUE_MAP
)))
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
op
->
opcode
=
WINED3D_CS_OP_UNMAP
;
op
->
opcode
=
WINED3D_CS_OP_UNMAP
;
...
@@ -3279,7 +3284,7 @@ static void *wined3d_cs_queue_require_space(struct wined3d_cs_queue *queue, size
...
@@ -3279,7 +3284,7 @@ static void *wined3d_cs_queue_require_space(struct wined3d_cs_queue *queue, size
if
(
new_pos
<
tail
&&
new_pos
)
if
(
new_pos
<
tail
&&
new_pos
)
break
;
break
;
TRACE
(
"Waiting for free space. Head %lu, tail %lu, packet size %Iu.
\n
"
,
TRACE
_
(
d3d_perf
)
(
"Waiting for free space. Head %lu, tail %lu, packet size %Iu.
\n
"
,
head
,
tail
,
packet_size
);
head
,
tail
,
packet_size
);
}
}
...
@@ -3307,8 +3312,10 @@ static void wined3d_cs_mt_finish(struct wined3d_device_context *context, enum wi
...
@@ -3307,8 +3312,10 @@ static void wined3d_cs_mt_finish(struct wined3d_device_context *context, enum wi
if
(
cs
->
thread_id
==
GetCurrentThreadId
())
if
(
cs
->
thread_id
==
GetCurrentThreadId
())
return
wined3d_cs_st_finish
(
context
,
queue_id
);
return
wined3d_cs_st_finish
(
context
,
queue_id
);
TRACE_
(
d3d_perf
)(
"Waiting for queue %u to be empty.
\n
"
,
queue_id
);
while
(
cs
->
queue
[
queue_id
].
head
!=
*
(
volatile
ULONG
*
)
&
cs
->
queue
[
queue_id
].
tail
)
while
(
cs
->
queue
[
queue_id
].
head
!=
*
(
volatile
ULONG
*
)
&
cs
->
queue
[
queue_id
].
tail
)
wined3d_pause
(
&
spin_count
);
wined3d_pause
(
&
spin_count
);
TRACE_
(
d3d_perf
)(
"Queue is now empty.
\n
"
);
}
}
static
const
struct
wined3d_device_context_ops
wined3d_cs_mt_ops
=
static
const
struct
wined3d_device_context_ops
wined3d_cs_mt_ops
=
...
...
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