vrend: Add host check for clear_texture

Signed-off-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
macos/master
Elie Tournier 5 years ago
parent 66b5e91c10
commit e8d6f6a96a
  1. 1
      src/virgl_hw.h
  2. 5
      src/vrend_renderer.c

@ -402,6 +402,7 @@ enum virgl_formats {
#define VIRGL_CAP_CLIP_HALFZ (1 << 27)
#define VIRGL_CAP_APP_TWEAK_SUPPORT (1 << 28)
#define VIRGL_CAP_BGRA_SRGB_IS_EMULATED (1 << 29)
#define VIRGL_CAP_CLEAR_TEXTURE (1 << 30)
/* virgl bind flags - these are compatible with mesa 10.5 gallium.
* but are fixed, no other should be passed to virgl either.

@ -108,6 +108,7 @@ enum features_id
feat_barrier,
feat_bind_vertex_buffers,
feat_bit_encoding,
feat_clear_texture,
feat_clip_control,
feat_compute_shader,
feat_copy_image,
@ -198,6 +199,7 @@ static const struct {
FEAT(barrier, 42, 31, NULL),
FEAT(bind_vertex_buffers, 44, UNAVAIL, NULL),
FEAT(bit_encoding, 33, UNAVAIL, "GL_ARB_shader_bit_encoding" ),
FEAT(clear_texture, 44, UNAVAIL, "GL_ARB_clear_texture", "GL_EXT_clear_texture"),
FEAT(clip_control, 45, UNAVAIL, "GL_ARB_clip_control", "GL_EXT_clip_control"),
FEAT(compute_shader, 43, 31, "GL_ARB_compute_shader" ),
FEAT(copy_image, 43, 32, "GL_ARB_copy_image", "GL_EXT_copy_image", "GL_OES_copy_image" ),
@ -9907,6 +9909,9 @@ static void vrend_renderer_fill_caps_v2(int gl_ver, int gles_ver, union virgl_c
set_format_bit(&caps->v2.scanout, fmt);
}
if (has_feature(feat_clear_texture))
caps->v2.capability_bits |= VIRGL_CAP_CLEAR_TEXTURE;
if (has_feature(feat_clip_control))
caps->v2.capability_bits |= VIRGL_CAP_CLIP_HALFZ;

Loading…
Cancel
Save