Commit e418b1f5 authored by Jan Sikorski's avatar Jan Sikorski Committed by Alexandre Julliard

wined3d: Use wined3d_next_cs_packet() in wined3d_cs_exec_execute_command_list().

parent 6ebbc4a8
...@@ -3112,14 +3112,14 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void ...@@ -3112,14 +3112,14 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
static void wined3d_cs_exec_execute_command_list(struct wined3d_cs *cs, const void *data) static void wined3d_cs_exec_execute_command_list(struct wined3d_cs *cs, const void *data)
{ {
const struct wined3d_cs_execute_command_list *op = data; const struct wined3d_cs_execute_command_list *op = data;
size_t start = 0, end = op->list->data_size; SIZE_T start = 0, end = op->list->data_size;
const BYTE *cs_data = op->list->data; const BYTE *cs_data = op->list->data;
TRACE("Executing command list %p.\n", op->list); TRACE("Executing command list %p.\n", op->list);
while (start < end) while (start < end)
{ {
const struct wined3d_cs_packet *packet = (const struct wined3d_cs_packet *)&cs_data[start]; const struct wined3d_cs_packet *packet = wined3d_next_cs_packet(cs_data, &start);
enum wined3d_cs_op opcode = *(const enum wined3d_cs_op *)packet->data; enum wined3d_cs_op opcode = *(const enum wined3d_cs_op *)packet->data;
if (opcode >= WINED3D_CS_OP_STOP) if (opcode >= WINED3D_CS_OP_STOP)
...@@ -3127,8 +3127,6 @@ static void wined3d_cs_exec_execute_command_list(struct wined3d_cs *cs, const vo ...@@ -3127,8 +3127,6 @@ static void wined3d_cs_exec_execute_command_list(struct wined3d_cs *cs, const vo
else else
wined3d_cs_op_handlers[opcode](cs, packet->data); wined3d_cs_op_handlers[opcode](cs, packet->data);
TRACE("%s executed.\n", debug_cs_op(opcode)); TRACE("%s executed.\n", debug_cs_op(opcode));
start += offsetof(struct wined3d_cs_packet, data[packet->size]);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment