virgl: limit command length to 16 bits
authorGurchetan Singh <gurchetansingh@chromium.org>
Thu, 24 Jan 2019 02:11:41 +0000 (18:11 -0800)
committerGert Wollny <gert.wollny@collabora.com>
Fri, 15 Feb 2019 10:19:05 +0000 (11:19 +0100)
commit35515985a9b82134c2b2f2f501ec45d29f67ec97
treec8e0b69d9cdab88f5ac2e2b1b390a8cd501937c6
parent503ffe46bb3961996c514b2650390d8263893579
virgl: limit command length to 16 bits

Much of our logic is based around the idea the upper 16 bits
of a command dword can encode the length of the command.

Now that the command buffer >= 2^16 - 1, we should check for
this.

v2: alignment, and only check VIRGL_ENCODE_MAX_DWORDS
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
src/gallium/drivers/virgl/virgl_encode.c
src/gallium/drivers/virgl/virgl_protocol.h