vrend: silence warnings when compiling with egl disabled

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
macos/master
Gert Wollny 4 years ago
parent 1c9a7a52e0
commit 869454e550
  1. 5
      src/vrend_renderer.c
  2. 11
      src/vrend_winsys.c

@ -11083,6 +11083,7 @@ int vrend_renderer_create_ctx0_fence(uint32_t fence_id)
VIRGL_RENDERER_FENCE_FLAG_MERGEABLE, fence_cookie); VIRGL_RENDERER_FENCE_FLAG_MERGEABLE, fence_cookie);
} }
#ifdef HAVE_EPOXY_EGL_H
static bool find_ctx0_fence_locked(struct list_head *fence_list, static bool find_ctx0_fence_locked(struct list_head *fence_list,
void *fence_cookie, void *fence_cookie,
bool *seen_first, bool *seen_first,
@ -11109,6 +11110,7 @@ static bool find_ctx0_fence_locked(struct list_head *fence_list,
return false; return false;
} }
#endif
int vrend_renderer_export_ctx0_fence(uint32_t fence_id, int* out_fd) { int vrend_renderer_export_ctx0_fence(uint32_t fence_id, int* out_fd) {
#ifdef HAVE_EPOXY_EGL_H #ifdef HAVE_EPOXY_EGL_H
@ -11145,6 +11147,9 @@ int vrend_renderer_export_ctx0_fence(uint32_t fence_id, int* out_fd) {
else else
return virgl_egl_export_signaled_fence(egl, out_fd) ? 0 : -EINVAL; return virgl_egl_export_signaled_fence(egl, out_fd) ? 0 : -EINVAL;
} }
#else
(void)fence_id;
(void)out_fd;
#endif #endif
return -EINVAL; return -EINVAL;
} }

@ -72,6 +72,7 @@ int vrend_winsys_init(uint32_t flags, int preferred_fd)
use_context = CONTEXT_EGL; use_context = CONTEXT_EGL;
#else #else
(void)preferred_fd;
vrend_printf( "EGL is not supported on this platform\n"); vrend_printf( "EGL is not supported on this platform\n");
return -1; return -1;
#endif #endif
@ -171,6 +172,10 @@ int vrend_winsys_get_fourcc_for_texture(uint32_t tex_id, uint32_t format, int *f
#ifdef HAVE_EPOXY_EGL_H #ifdef HAVE_EPOXY_EGL_H
if (use_context == CONTEXT_EGL) if (use_context == CONTEXT_EGL)
return virgl_egl_get_fourcc_for_texture(egl, tex_id, format, fourcc); return virgl_egl_get_fourcc_for_texture(egl, tex_id, format, fourcc);
#else
(void)tex_id;
(void)format;
(void)fourcc;
#endif #endif
return 0; return 0;
} }
@ -183,6 +188,8 @@ int vrend_winsys_get_fd_for_texture(uint32_t tex_id, int *fd)
return virgl_egl_get_fd_for_texture(egl, tex_id, fd); return virgl_egl_get_fd_for_texture(egl, tex_id, fd);
#else #else
(void)tex_id;
(void)fd;
return -1; return -1;
#endif #endif
} }
@ -195,6 +202,10 @@ int vrend_winsys_get_fd_for_texture2(uint32_t tex_id, int *fd, int *stride, int
return virgl_egl_get_fd_for_texture2(egl, tex_id, fd, stride, offset); return virgl_egl_get_fd_for_texture2(egl, tex_id, fd, stride, offset);
#else #else
(void)tex_id;
(void)fd;
(void)stride;
(void)offset;
return -1; return -1;
#endif #endif
} }

Loading…
Cancel
Save