mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 13:00:09 +01:00
venus: allow vtest socket being specified by env variable
Signed-off-by: Simon Fels <simon.fels@canonical.com> Reviewed-by: Corentin Noël <corentin.noel@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20736>
This commit is contained in:
parent
530a62ce73
commit
501309ef32
1 changed files with 5 additions and 1 deletions
|
|
@ -16,6 +16,7 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#include "util/os_file.h"
|
||||
#include "util/os_misc.h"
|
||||
#include "util/sparse_array.h"
|
||||
#include "util/u_process.h"
|
||||
#define VIRGL_RENDERER_UNSTABLE_APIS
|
||||
|
|
@ -1032,13 +1033,16 @@ vtest_init_protocol_version(struct vtest *vtest)
|
|||
static VkResult
|
||||
vtest_init(struct vtest *vtest)
|
||||
{
|
||||
const char* socket_name = os_get_option("VTEST_SOCKET_NAME");
|
||||
|
||||
util_sparse_array_init(&vtest->shmem_array, sizeof(struct vtest_shmem),
|
||||
1024);
|
||||
util_sparse_array_init(&vtest->bo_array, sizeof(struct vtest_bo), 1024);
|
||||
|
||||
mtx_init(&vtest->sock_mutex, mtx_plain);
|
||||
vtest->sock_fd =
|
||||
vtest_connect_socket(vtest->instance, VTEST_DEFAULT_SOCKET_NAME);
|
||||
vtest_connect_socket(vtest->instance, socket_name ?
|
||||
socket_name : VTEST_DEFAULT_SOCKET_NAME);
|
||||
if (vtest->sock_fd < 0)
|
||||
return VK_ERROR_INITIALIZATION_FAILED;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue