Commit 9c190f81 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

wined3d: Align CS packet size to the header size.

parent ef66c448
......@@ -2651,8 +2651,9 @@ static void *wined3d_cs_queue_require_space(struct wined3d_cs_queue *queue, size
struct wined3d_cs_packet *packet;
header_size = FIELD_OFFSET(struct wined3d_cs_packet, data[0]);
size = (size + header_size - 1) & ~(header_size - 1);
packet_size = FIELD_OFFSET(struct wined3d_cs_packet, data[size]);
packet_size = (packet_size + header_size - 1) & ~(header_size - 1);
size = packet_size - header_size;
if (packet_size >= WINED3D_CS_QUEUE_SIZE)
{
ERR("Packet size %lu >= queue size %u.\n",
......
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