You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
1.2 KiB
76 lines
1.2 KiB
5 years ago
|
/*
|
||
|
* 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"
|
||
4 years ago
|
#include "vrend_debug.h"
|
||
5 years ago
|
|
||
4 years ago
|
#define VKR_RENDERER_THREAD_SYNC (1u << 0)
|
||
|
#define VKR_RENDERER_MULTI_PROCESS (1u << 1)
|
||
3 years ago
|
#define VKR_RENDERER_ASYNC_FENCE_CB (1u << 2)
|
||
5 years ago
|
|
||
|
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)
|
||
|
{
|
||
4 years ago
|
vrend_printf("Vulkan support was not enabled in virglrenderer\n");
|
||
5 years ago
|
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 *
|
||
4 years ago
|
vkr_context_create(UNUSED size_t debug_len, UNUSED const char *debug_name)
|
||
5 years ago
|
{
|
||
|
return NULL;
|
||
|
}
|
||
|
|
||
|
#endif /* ENABLE_VENUS */
|
||
|
|
||
|
#endif /* VKR_RENDERER_H */
|