From 285920a388b50a80ae82f6e68ba1972458b55aef Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 7 Jun 2018 10:30:43 +1000 Subject: [PATCH] expose ARB_texture_view support to guest Reviewed-by: Gert Wollny --- src/virgl_hw.h | 1 + src/vrend_renderer.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/virgl_hw.h b/src/virgl_hw.h index ba0f758..589cd73 100644 --- a/src/virgl_hw.h +++ b/src/virgl_hw.h @@ -214,6 +214,7 @@ enum virgl_formats { /* These are used by the capability_bits field in virgl_caps_v2. */ #define VIRGL_CAP_NONE 0 #define VIRGL_CAP_TGSI_INVARIANT (1 << 0) +#define VIRGL_CAP_TEXTURE_VIEW (1 << 1) struct virgl_caps_bool_set1 { unsigned indep_blend_enable:1; diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 49bad08..33e8478 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -7541,6 +7541,9 @@ void vrend_renderer_fill_caps(uint32_t set, uint32_t version, } caps->v2.capability_bits |= VIRGL_CAP_TGSI_INVARIANT; + + if (gl_ver >= 43 || epoxy_has_gl_extension("GL_ARB_texture_view")) + caps->v2.capability_bits |= VIRGL_CAP_TEXTURE_VIEW; } GLint64 vrend_renderer_get_timestamp(void)