diff --git a/src/virgl_hw.h b/src/virgl_hw.h index df4188c..bebf4ad 100644 --- a/src/virgl_hw.h +++ b/src/virgl_hw.h @@ -367,6 +367,7 @@ struct virgl_caps_v2 { uint32_t max_atomic_counter_buffers[6]; uint32_t max_combined_atomic_counters; uint32_t max_combined_atomic_counter_buffers; + uint32_t host_feature_check_version; }; union virgl_caps { diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index af1e70c..ab62264 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -8508,6 +8508,12 @@ static void vrend_renderer_fill_caps_v2(int gl_ver, int gles_ver, union virgl_c GLint max; GLfloat range[2]; + /* Count this up when you add a feature flag that is used to set a CAP in + * the guest that was set unconditionally before. Then check that flag and + * this value to avoid regressions when a guest with a new mesa version is + * run on an old virgl host */ + caps->v2.host_feature_check_version = 1; + glGetFloatv(GL_ALIASED_POINT_SIZE_RANGE, range); caps->v2.min_aliased_point_size = range[0]; caps->v2.max_aliased_point_size = range[1];