Signed-off-by: Jan Sikorski jsikorski@codeweavers.com --- dlls/wined3d/cs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 338479825d1..9e102a040b5 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -3478,7 +3478,7 @@ static DWORD WINAPI wined3d_cs_run(void *ctx) enum wined3d_cs_op opcode; HMODULE wined3d_module; unsigned int poll = 0; - LONG tail; + SIZE_T tail;
TRACE("Started.\n");
@@ -3512,7 +3512,7 @@ static DWORD WINAPI wined3d_cs_run(void *ctx) spin_count = 0;
tail = queue->tail; - packet = (struct wined3d_cs_packet *)&queue->data[tail]; + packet = wined3d_next_cs_packet(queue->data, &tail); if (packet->size) { opcode = *(const enum wined3d_cs_op *)packet->data; @@ -3531,7 +3531,6 @@ static DWORD WINAPI wined3d_cs_run(void *ctx) TRACE("%s executed.\n", debug_cs_op(opcode)); }
- tail += FIELD_OFFSET(struct wined3d_cs_packet, data[packet->size]); tail &= (WINED3D_CS_QUEUE_SIZE - 1); InterlockedExchange(&queue->tail, tail); }