Commit 34e7def8 authored by Gurchetan Singh's avatar Gurchetan Singh 💬

virgl: without shm, fallback to protocol version -1

Signed-off-by: Gurchetan Singh's avatarGurchetan Singh <gurchetansingh@chromium.org>
Reviewed-By: Gert Wollny's avatarGert Wollny <gert.wollny@collabora.com>
parent c3b0a155
......@@ -34,7 +34,9 @@
#include <sys/uio.h>
#include "vtest.h"
#include "vtest_shm.h"
#include "vtest_protocol.h"
#include "util.h"
#include "util/u_debug.h"
#include "util/u_math.h"
......@@ -243,6 +245,12 @@ int vtest_protocol_version(UNUSED uint32_t length_dw)
renderer.protocol_version = 0;
}
/* Protocol version 2 requires shm support. */
if (!vtest_shm_check()) {
printf("Shared memory not supported, fallbacking to protocol version 0\n");
renderer.protocol_version = 0;
}
hdr_buf[VTEST_CMD_LEN] = VCMD_PROTOCOL_VERSION_SIZE;
hdr_buf[VTEST_CMD_ID] = VCMD_PROTOCOL_VERSION;
......
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