mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 03:20:30 +00:00
wined3d: Align CS packet size to the header size.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ef66c4488f
commit
9c190f8118
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue