From f69d4a865f926aa5c4a9c55cfe4d2dbc10746e5c Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Thu, 9 Dec 2021 21:17:33 +0100 Subject: [PATCH] wined3d: Trace CS packet pointers. This makes it easier to "unwind" through the CS thread when debugging. Signed-off-by: Zebediah Figura Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/cs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 2edaff01446..bb629d9b27f 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -3217,6 +3217,7 @@ static void wined3d_cs_queue_submit(struct wined3d_cs_queue *queue, struct wined size_t packet_size; packet = (struct wined3d_cs_packet *)&queue->data[queue->head]; + TRACE("Queuing op %s at %p.\n", debug_cs_op(*(const enum wined3d_cs_op *)packet->data), packet); packet_size = FIELD_OFFSET(struct wined3d_cs_packet, data[packet->size]); InterlockedExchange(&queue->head, (queue->head + packet_size) & (WINED3D_CS_QUEUE_SIZE - 1)); @@ -3429,7 +3430,7 @@ static DWORD WINAPI wined3d_cs_run(void *ctx) { opcode = *(const enum wined3d_cs_op *)packet->data; - TRACE("Executing %s.\n", debug_cs_op(opcode)); + TRACE("Executing %s at %p.\n", debug_cs_op(opcode), packet); if (opcode >= WINED3D_CS_OP_STOP) { if (opcode > WINED3D_CS_OP_STOP) @@ -3440,7 +3441,7 @@ static DWORD WINAPI wined3d_cs_run(void *ctx) wined3d_cs_command_lock(cs); wined3d_cs_op_handlers[opcode](cs, packet->data); wined3d_cs_command_unlock(cs); - TRACE("%s executed.\n", debug_cs_op(opcode)); + TRACE("%s at %p executed.\n", debug_cs_op(opcode), packet); } tail &= (WINED3D_CS_QUEUE_SIZE - 1);