vkr: add experimental venus renderer

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
macos/master
Chia-I Wu 5 years ago
parent 2eefe15310
commit 9b2d22b584
  1. 3
      src/meson.build
  2. 4052
      src/vkr_renderer.c
  3. 74
      src/vkr_renderer.h

@ -75,9 +75,12 @@ vrend_winsys_glx_sources = [
]
venus_sources = [
'venus-protocol/vn_protocol_renderer.h',
'vkr_cs.c',
'vkr_cs.h',
'vkr_object.h',
'vkr_renderer.c',
'vkr_renderer.h',
'vkr_ring.c',
'vkr_ring.h',
]

File diff suppressed because it is too large Load Diff

@ -0,0 +1,74 @@
/*
* Copyright 2020 Google LLC
* SPDX-License-Identifier: MIT
*/
#ifndef VKR_RENDERER_H
#define VKR_RENDERER_H
#include "config.h"
#include <stddef.h>
#include <stdint.h>
#include "os/os_misc.h"
#define VKR_RENDERER_THREAD_SYNC (1u << 0)
#define VKR_RENDERER_MULTI_PROCESS (1u << 1)
struct virgl_context;
#ifdef ENABLE_VENUS
int
vkr_renderer_init(uint32_t flags);
void
vkr_renderer_fini(void);
void
vkr_renderer_reset(void);
size_t
vkr_get_capset(void *capset);
struct virgl_context *
vkr_context_create(size_t debug_len, const char *debug_name);
#else /* ENABLE_VENUS */
#include <stdio.h>
static inline int
vkr_renderer_init(UNUSED uint32_t flags)
{
fprintf(stderr, "Vulkan support was not enabled in virglrenderer\n");
return -1;
}
static inline void
vkr_renderer_fini(void)
{
}
static inline void
vkr_renderer_reset(void)
{
}
static inline size_t
vkr_get_capset(UNUSED void *capset)
{
return 0;
}
static inline struct virgl_context *
vkr_context_create(UNUSED size_t debug_len,
UNUSED const char *debug_name)
{
return NULL;
}
#endif /* ENABLE_VENUS */
#endif /* VKR_RENDERER_H */
Loading…
Cancel
Save