Merge remote-tracking branch 'akihikodaki/macos' into macos/master

macos/master
Nikita Tokarchuk 3 years ago
commit 96a8334cdd
Signed by: mainnika
GPG Key ID: A595FB7E3E56911C
  1. 6
      .gitlab-ci/expectations/host/piglit-virgl-gles-fails.txt
  2. 66
      .gitlab-ci/expectations/virt/piglit-virgl-gles-fails.txt
  3. 4
      meson.build
  4. 3
      src/meson.build
  5. 8
      src/virglrenderer.c
  6. 8
      src/virglrenderer.h
  7. 15
      src/vrend_blitter.h
  8. 49
      src/vrend_renderer.c
  9. 6
      src/vrend_renderer.h
  10. 9
      src/vrend_winsys.c
  11. 6
      src/vrend_winsys_gbm.h

@ -20,6 +20,8 @@ spec@arb_color_buffer_float@gl_rgba8_snorm-render,Fail
spec@arb_color_buffer_float@gl_rgba8_snorm-render-fog,Fail
spec@arb_compute_shader@execution@min-dvec4-double-large-group-size,Fail
spec@arb_copy_image@arb_copy_image-formats,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=2,Crash
spec@arb_copy_image@arb_copy_image-formats --samples=4,Crash
spec@arb_copy_image@arb_copy_image-formats@Source: GL_ALPHA16/Destination: GL_ALPHA16,Fail
spec@arb_copy_image@arb_copy_image-formats@Source: GL_COMPRESSED_RED_RGTC1/Destination: GL_COMPRESSED_RED_RGTC1,Fail
spec@arb_copy_image@arb_copy_image-formats@Source: GL_COMPRESSED_RED_RGTC1/Destination: GL_RGBA16_SNORM,Fail
@ -562,7 +564,7 @@ spec@ext_framebuffer_multisample@draw-buffers-alpha-to-coverage 2,Fail
spec@ext_framebuffer_multisample@draw-buffers-alpha-to-one 2,Fail
spec@ext_framebuffer_multisample@draw-buffers-alpha-to-one 4,Fail
spec@ext_framebuffer_multisample@enable-flag,Fail
spec@ext_framebuffer_multisample@fast-clear,Fail
spec@ext_framebuffer_multisample@fast-clear,Crash
spec@ext_framebuffer_multisample@formats 2,Fail
spec@ext_framebuffer_multisample@formats 4,Fail
spec@ext_framebuffer_multisample@formats all_samples,Fail
@ -2482,6 +2484,8 @@ spec@khr_texture_compression_astc@sliced-3d-miptree-gl srgb-fp@sRGB decode full
spec@khr_texture_compression_astc@sliced-3d-miptree-gl srgb@sRGB decode,ExpectedFail
spec@khr_texture_compression_astc@void-extent-dl-bug,Fail
spec@nv_copy_image@nv_copy_image-formats,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=2,Crash
spec@nv_copy_image@nv_copy_image-formats --samples=4,Crash
spec@nv_copy_image@nv_copy_image-formats@Source: GL_ALPHA16/Destination: GL_ALPHA16,Fail
spec@nv_copy_image@nv_copy_image-formats@Source: GL_COMPRESSED_RED_RGTC1/Destination: GL_COMPRESSED_RED_RGTC1,Fail
spec@nv_copy_image@nv_copy_image-formats@Source: GL_COMPRESSED_RGBA_BPTC_UNORM/Destination: GL_COMPRESSED_RGBA_BPTC_UNORM,Fail

@ -21,6 +21,36 @@ spec@arb_color_buffer_float@gl_rgba8_snorm-render,Fail
spec@arb_color_buffer_float@gl_rgba8_snorm-render-fog,Fail
spec@arb_compute_shader@execution@min-dvec4-double-large-group-size,Fail
spec@arb_copy_image@arb_copy_image-formats,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=2,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=2@Source: GL_ALPHA12/Destination: GL_ALPHA12,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=2@Source: GL_ALPHA16/Destination: GL_ALPHA16,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=2@Source: GL_INTENSITY/Destination: GL_INTENSITY,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=2@Source: GL_INTENSITY12/Destination: GL_INTENSITY12,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=2@Source: GL_INTENSITY16/Destination: GL_INTENSITY16,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=2@Source: GL_INTENSITY8/Destination: GL_INTENSITY8,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=2@Source: GL_LUMINANCE/Destination: GL_LUMINANCE,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=2@Source: GL_LUMINANCE12/Destination: GL_LUMINANCE12,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=2@Source: GL_LUMINANCE12_ALPHA12/Destination: GL_LUMINANCE12_ALPHA12,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=2@Source: GL_LUMINANCE16/Destination: GL_LUMINANCE16,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=2@Source: GL_LUMINANCE16_ALPHA16/Destination: GL_LUMINANCE16_ALPHA16,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=2@Source: GL_LUMINANCE8/Destination: GL_LUMINANCE8,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=2@Source: GL_LUMINANCE8_ALPHA8/Destination: GL_LUMINANCE8_ALPHA8,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=2@Source: GL_LUMINANCE_ALPHA/Destination: GL_LUMINANCE_ALPHA,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=4,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=4@Source: GL_ALPHA12/Destination: GL_ALPHA12,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=4@Source: GL_ALPHA16/Destination: GL_ALPHA16,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=4@Source: GL_INTENSITY/Destination: GL_INTENSITY,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=4@Source: GL_INTENSITY12/Destination: GL_INTENSITY12,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=4@Source: GL_INTENSITY16/Destination: GL_INTENSITY16,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=4@Source: GL_INTENSITY8/Destination: GL_INTENSITY8,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=4@Source: GL_LUMINANCE/Destination: GL_LUMINANCE,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=4@Source: GL_LUMINANCE12/Destination: GL_LUMINANCE12,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=4@Source: GL_LUMINANCE12_ALPHA12/Destination: GL_LUMINANCE12_ALPHA12,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=4@Source: GL_LUMINANCE16/Destination: GL_LUMINANCE16,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=4@Source: GL_LUMINANCE16_ALPHA16/Destination: GL_LUMINANCE16_ALPHA16,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=4@Source: GL_LUMINANCE8/Destination: GL_LUMINANCE8,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=4@Source: GL_LUMINANCE8_ALPHA8/Destination: GL_LUMINANCE8_ALPHA8,Fail
spec@arb_copy_image@arb_copy_image-formats --samples=4@Source: GL_LUMINANCE_ALPHA/Destination: GL_LUMINANCE_ALPHA,Fail
spec@arb_copy_image@arb_copy_image-formats@Source: GL_ALPHA16/Destination: GL_ALPHA16,Fail
spec@arb_copy_image@arb_copy_image-formats@Source: GL_COMPRESSED_RED_RGTC1/Destination: GL_COMPRESSED_RED_RGTC1,Fail
spec@arb_copy_image@arb_copy_image-formats@Source: GL_COMPRESSED_RED_RGTC1/Destination: GL_RGBA16_SNORM,Fail
@ -321,11 +351,6 @@ spec@arb_shader_image_load_store@host-mem-barrier@Pixel/RaW/full barrier test/64
spec@arb_shader_image_load_store@host-mem-barrier@Pixel/RaW/one bit barrier test/16x16,Fail
spec@arb_shader_image_load_store@host-mem-barrier@Pixel/RaW/one bit barrier test/4x4,Fail
spec@arb_shader_image_load_store@host-mem-barrier@Pixel/RaW/one bit barrier test/64x64,Fail
spec@arb_shader_image_load_store@host-mem-barrier@Pixel/WaW/full barrier test/16x16,Fail
spec@arb_shader_image_load_store@host-mem-barrier@Pixel/WaW/full barrier test/4x4,Fail
spec@arb_shader_image_load_store@host-mem-barrier@Pixel/WaW/one bit barrier test/16x16,Fail
spec@arb_shader_image_load_store@host-mem-barrier@Pixel/WaW/one bit barrier test/4x4,Fail
spec@arb_shader_image_load_store@host-mem-barrier@Pixel/WaW/one bit barrier test/64x64,Fail
spec@arb_shader_image_load_store@host-mem-barrier@Texture fetch/RaW/full barrier test/16x16,Fail
spec@arb_shader_image_load_store@host-mem-barrier@Texture fetch/RaW/full barrier test/4x4,Fail
spec@arb_shader_image_load_store@host-mem-barrier@Texture fetch/RaW/full barrier test/64x64,Fail
@ -2525,6 +2550,36 @@ spec@khr_texture_compression_astc@sliced-3d-miptree-gl srgb-fp@sRGB decode full
spec@khr_texture_compression_astc@sliced-3d-miptree-gl srgb@sRGB decode,ExpectedFail
spec@khr_texture_compression_astc@void-extent-dl-bug,Fail
spec@nv_copy_image@nv_copy_image-formats,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=2,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=2@Source: GL_ALPHA12/Destination: GL_ALPHA12,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=2@Source: GL_ALPHA16/Destination: GL_ALPHA16,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=2@Source: GL_INTENSITY/Destination: GL_INTENSITY,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=2@Source: GL_INTENSITY12/Destination: GL_INTENSITY12,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=2@Source: GL_INTENSITY16/Destination: GL_INTENSITY16,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=2@Source: GL_INTENSITY8/Destination: GL_INTENSITY8,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=2@Source: GL_LUMINANCE/Destination: GL_LUMINANCE,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=2@Source: GL_LUMINANCE12/Destination: GL_LUMINANCE12,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=2@Source: GL_LUMINANCE12_ALPHA12/Destination: GL_LUMINANCE12_ALPHA12,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=2@Source: GL_LUMINANCE16/Destination: GL_LUMINANCE16,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=2@Source: GL_LUMINANCE16_ALPHA16/Destination: GL_LUMINANCE16_ALPHA16,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=2@Source: GL_LUMINANCE8/Destination: GL_LUMINANCE8,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=2@Source: GL_LUMINANCE8_ALPHA8/Destination: GL_LUMINANCE8_ALPHA8,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=2@Source: GL_LUMINANCE_ALPHA/Destination: GL_LUMINANCE_ALPHA,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=4,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=4@Source: GL_ALPHA12/Destination: GL_ALPHA12,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=4@Source: GL_ALPHA16/Destination: GL_ALPHA16,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=4@Source: GL_INTENSITY/Destination: GL_INTENSITY,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=4@Source: GL_INTENSITY12/Destination: GL_INTENSITY12,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=4@Source: GL_INTENSITY16/Destination: GL_INTENSITY16,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=4@Source: GL_INTENSITY8/Destination: GL_INTENSITY8,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=4@Source: GL_LUMINANCE/Destination: GL_LUMINANCE,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=4@Source: GL_LUMINANCE12/Destination: GL_LUMINANCE12,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=4@Source: GL_LUMINANCE12_ALPHA12/Destination: GL_LUMINANCE12_ALPHA12,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=4@Source: GL_LUMINANCE16/Destination: GL_LUMINANCE16,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=4@Source: GL_LUMINANCE16_ALPHA16/Destination: GL_LUMINANCE16_ALPHA16,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=4@Source: GL_LUMINANCE8/Destination: GL_LUMINANCE8,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=4@Source: GL_LUMINANCE8_ALPHA8/Destination: GL_LUMINANCE8_ALPHA8,Fail
spec@nv_copy_image@nv_copy_image-formats --samples=4@Source: GL_LUMINANCE_ALPHA/Destination: GL_LUMINANCE_ALPHA,Fail
spec@nv_copy_image@nv_copy_image-formats@Source: GL_ALPHA16/Destination: GL_ALPHA16,Fail
spec@nv_copy_image@nv_copy_image-formats@Source: GL_COMPRESSED_RED_RGTC1/Destination: GL_COMPRESSED_RED_RGTC1,Fail
spec@nv_copy_image@nv_copy_image-formats@Source: GL_COMPRESSED_RGBA_BPTC_UNORM/Destination: GL_COMPRESSED_RGBA_BPTC_UNORM,Fail
@ -3379,7 +3434,6 @@ spec@!opengl 1.5@draw-vertices-user,Fail
spec@!opengl 2.0@gl-2.0-edgeflag,Fail
spec@!opengl 2.0@gl-2.0-edgeflag-immediate,Fail
spec@!opengl 2.0@gl-2.0-large-point-fs,Fail
spec@!opengl 2.0@gl-2.0-vertexattribpointer,Fail
spec@!opengl 2.0@occlusion-query-discard,Fail
spec@!opengl 3.0@required-texture-attachment-formats,Fail
spec@!opengl 3.0@sampler-cube-shadow,Fail

@ -74,7 +74,6 @@ endforeach
prog_python = import('python').find_installation('python3')
libdrm_dep = dependency('libdrm', version : '>=2.4.50')
thread_dep = dependency('threads')
epoxy_dep = dependency('epoxy', version: '>= 1.5.4')
m_dep = cc.find_library('m')
@ -210,8 +209,9 @@ endif
if with_egl
if cc.has_header('epoxy/egl.h', dependencies: epoxy_dep) and epoxy_dep.get_pkgconfig_variable('epoxy_has_egl') == '1'
libdrm_dep = dependency('libdrm', required: require_egl, version : '>=2.4.50')
gbm_dep = dependency('gbm', version: '>= ' + _gbm_ver, required: require_egl)
have_egl = gbm_dep.found()
have_egl = libdrm_dep.found() and gbm_dep.found()
if (have_egl)
conf_data.set('HAVE_EPOXY_EGL_H', 1)
else

@ -145,7 +145,6 @@ proxy_sources = [
virgl_depends = [
gallium_dep,
epoxy_dep,
libdrm_dep,
thread_dep,
m_dep,
]
@ -162,7 +161,7 @@ virgl_sources += vrend_sources
if have_egl
virgl_sources += vrend_winsys_egl_sources
virgl_depends += [gbm_dep]
virgl_depends += [libdrm_dep, gbm_dep]
endif
if have_glx

@ -453,8 +453,8 @@ void virgl_renderer_ctx_detach_resource(int ctx_id, int res_handle)
ctx->detach_resource(ctx, res);
}
int virgl_renderer_resource_get_info(int res_handle,
struct virgl_renderer_resource_info *info)
int virgl_renderer_borrow_texture_for_scanout(int res_handle,
struct virgl_renderer_texture_info *info)
{
TRACE_FUNC();
struct virgl_resource *res = virgl_resource_lookup(res_handle);
@ -464,8 +464,8 @@ int virgl_renderer_resource_get_info(int res_handle,
if (!info)
return EINVAL;
vrend_renderer_resource_get_info(res->pipe_resource,
(struct vrend_renderer_resource_info *)info);
vrend_renderer_borrow_texture_for_scanout(res->pipe_resource,
(struct vrend_renderer_texture_info *)info);
info->handle = res_handle;
if (state.winsys_initialized) {

@ -275,9 +275,9 @@ VIRGL_EXPORT void virgl_renderer_ctx_detach_resource(int ctx_id, int res_handle)
VIRGL_EXPORT virgl_debug_callback_type virgl_set_debug_callback(virgl_debug_callback_type cb);
/* return information about a resource */
/* borrow a texture for scanout */
struct virgl_renderer_resource_info {
struct virgl_renderer_texture_info {
uint32_t handle;
uint32_t virgl_format;
uint32_t width;
@ -289,8 +289,8 @@ struct virgl_renderer_resource_info {
int drm_fourcc;
};
VIRGL_EXPORT int virgl_renderer_resource_get_info(int res_handle,
struct virgl_renderer_resource_info *info);
VIRGL_EXPORT int virgl_renderer_borrow_texture_for_scanout(int res_handle,
struct virgl_renderer_texture_info *info);
VIRGL_EXPORT void virgl_renderer_cleanup(void *cookie);

@ -35,6 +35,12 @@
"%s" \
#define FS_HEADER_GLES \
"#version 300 es\n" \
"// Blitter\n" \
"%s" \
"precision mediump float;\n" \
#define FS_HEADER_GLES_MS \
"#version 310 es\n" \
"// Blitter\n" \
"%s" \
@ -52,6 +58,11 @@
"// Blitter\n" \
#define HEADER_GLES \
"#version 300 es\n" \
"// Blitter\n" \
"precision mediump float;\n" \
#define HEADER_GLES_MS \
"#version 310 es\n" \
"// Blitter\n" \
"precision mediump float;\n" \
@ -145,7 +156,7 @@
"}\n"
#define FS_TEXFETCH_COL_MSAA_GL FS_HEADER_GL FS_TEXFETCH_COL_MSAA_BODY
#define FS_TEXFETCH_COL_MSAA_GLES FS_HEADER_GLES FS_TEXFETCH_COL_MSAA_BODY
#define FS_TEXFETCH_COL_MSAA_GLES FS_HEADER_GLES_MS FS_TEXFETCH_COL_MSAA_BODY
#define FS_TEXFETCH_COL_MSAA_ARRAY_GLES FS_HEADER_GLES_MS_ARRAY FS_TEXFETCH_COL_MSAA_BODY
#define FS_TEXFETCH_DS_BODY \
@ -178,7 +189,7 @@ struct vrend_context;
struct vrend_resource;
struct vrend_blit_info;
#define FS_TEXFETCH_DS_MSAA_GL HEADER_GL FS_TEXFETCH_DS_MSAA_BODY
#define FS_TEXFETCH_DS_MSAA_GLES HEADER_GLES FS_TEXFETCH_DS_MSAA_BODY_GLES
#define FS_TEXFETCH_DS_MSAA_GLES HEADER_GLES_MS FS_TEXFETCH_DS_MSAA_BODY_GLES
#define FS_TEXFETCH_DS_MSAA_ARRAY_GLES HEADER_GLES_MS_ARRAY FS_TEXFETCH_DS_MSAA_BODY_GLES
/* implement blitting using OpenGL. */

@ -1981,6 +1981,9 @@ int vrend_create_surface(struct vrend_context *ctx,
last_layer = 5;
}
if (vrend_resource_has_24bpp_internal_format(res))
internalformat = GL_RGB8;
VREND_DEBUG(dbg_tex, ctx, "Create texture view from %s for %s\n",
util_format_name(res->base.format),
util_format_name(surf->format));
@ -11327,21 +11330,45 @@ void vrend_context_set_debug_flags(struct vrend_context *ctx, const char *flagst
}
}
void vrend_renderer_resource_get_info(struct pipe_resource *pres,
struct vrend_renderer_resource_info *info)
void vrend_renderer_borrow_texture_for_scanout(struct pipe_resource *pres,
struct vrend_renderer_texture_info *info)
{
struct vrend_resource *res = (struct vrend_resource *)pres;
struct vrend_texture *tex = (struct vrend_texture *)pres;
struct vrend_format_table *tex_conv = &tex_conv_table[tex->base.base.format];
int elsize;
elsize = util_format_get_blocksize(res->base.format);
assert(tex->base.target == GL_TEXTURE_2D);
assert(!util_format_is_depth_or_stencil(tex->base.base.format));
elsize = util_format_get_blocksize(tex->base.base.format);
glBindTexture(GL_TEXTURE_2D, tex->base.id);
if (tex_conv->flags & VIRGL_TEXTURE_NEED_SWIZZLE) {
for (unsigned i = 0; i < ARRAY_SIZE(tex->cur_swizzle); ++i) {
GLint next_swizzle = to_gl_swizzle(tex_conv->swizzle[i]);
if (tex->cur_swizzle[i] != next_swizzle) {
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_R + i, next_swizzle);
tex->cur_swizzle[i] = next_swizzle;
}
}
}
if (tex->cur_srgb_decode != GL_DECODE_EXT && util_format_is_srgb(tex->base.base.format)) {
if (has_feature(feat_texture_srgb_decode)) {
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SRGB_DECODE_EXT,
GL_DECODE_EXT);
tex->cur_srgb_decode = GL_DECODE_EXT;
}
}
info->tex_id = res->id;
info->width = res->base.width0;
info->height = res->base.height0;
info->depth = res->base.depth0;
info->format = res->base.format;
info->flags = res->y_0_top ? VIRGL_RESOURCE_Y_0_TOP : 0;
info->stride = util_format_get_nblocksx(res->base.format, u_minify(res->base.width0, 0)) * elsize;
info->tex_id = tex->base.id;
info->width = tex->base.base.width0;
info->height = tex->base.base.height0;
info->depth = tex->base.base.depth0;
info->format = tex->base.base.format;
info->flags = tex->base.y_0_top ? VIRGL_RESOURCE_Y_0_TOP : 0;
info->stride = util_format_get_nblocksx(tex->base.base.format, u_minify(tex->base.base.width0, 0)) * elsize;
}
void vrend_renderer_get_cap_set(uint32_t cap_set, uint32_t *max_ver,

@ -447,7 +447,7 @@ void vrend_renderer_detach_res_ctx(struct vrend_context *ctx,
struct vrend_context_tweaks *vrend_get_context_tweaks(struct vrend_context *ctx);
struct vrend_renderer_resource_info {
struct vrend_renderer_texture_info {
uint32_t handle;
uint32_t format;
uint32_t width;
@ -473,8 +473,8 @@ struct vrend_blit_info {
bool needs_manual_srgb_encode;
};
void vrend_renderer_resource_get_info(struct pipe_resource *pres,
struct vrend_renderer_resource_info *info);
void vrend_renderer_borrow_texture_for_scanout(struct pipe_resource *pres,
struct vrend_renderer_texture_info *info);
void vrend_renderer_get_cap_set(uint32_t cap_set, uint32_t *max_ver,
uint32_t *max_size);

@ -22,6 +22,7 @@
*
**************************************************************************/
#include "vrend_debug.h"
#include "vrend_winsys.h"
#ifdef HAVE_EPOXY_GLX_H
@ -30,6 +31,8 @@
#include <stddef.h>
#include "util/macros.h"
enum {
CONTEXT_NONE,
CONTEXT_EGL,
@ -135,7 +138,7 @@ int vrend_winsys_init_external(void *egl_display)
return 0;
}
virgl_renderer_gl_context vrend_winsys_create_context(struct virgl_gl_ctx_param *param)
virgl_renderer_gl_context vrend_winsys_create_context(UNUSED struct virgl_gl_ctx_param *param)
{
#ifdef HAVE_EPOXY_EGL_H
if (use_context == CONTEXT_EGL)
@ -148,7 +151,7 @@ virgl_renderer_gl_context vrend_winsys_create_context(struct virgl_gl_ctx_param
return NULL;
}
void vrend_winsys_destroy_context(virgl_renderer_gl_context ctx)
void vrend_winsys_destroy_context(UNUSED virgl_renderer_gl_context ctx)
{
#ifdef HAVE_EPOXY_EGL_H
if (use_context == CONTEXT_EGL) {
@ -164,7 +167,7 @@ void vrend_winsys_destroy_context(virgl_renderer_gl_context ctx)
#endif
}
int vrend_winsys_make_context_current(virgl_renderer_gl_context ctx)
int vrend_winsys_make_context_current(UNUSED virgl_renderer_gl_context ctx)
{
#ifdef HAVE_EPOXY_EGL_H
if (use_context == CONTEXT_EGL)

@ -25,7 +25,9 @@
#ifndef VIRGL_GBM_H
#define VIRGL_GBM_H
#ifdef HAVE_EPOXY_EGL_H
#include <gbm.h>
#endif
#include "vrend_iov.h"
#include "virglrenderer.h"
@ -101,6 +103,8 @@ struct virgl_gbm {
struct gbm_device *device;
};
#ifdef HAVE_EPOXY_EGL_H
struct virgl_gbm *virgl_gbm_init(int fd);
void virgl_gbm_fini(struct virgl_gbm *gbm);
@ -124,3 +128,5 @@ bool virgl_gbm_external_allocation_preferred(uint32_t flags);
bool virgl_gbm_gpu_import_required(uint32_t flags);
#endif
#endif

Loading…
Cancel
Save