diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 829d8ec..4ff74aa 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -125,6 +125,7 @@ enum features_id feat_ssbo, feat_ssbo_barrier, feat_stencil_texturing, + feat_storage_multisample, feat_tessellation, feat_texture_array, feat_texture_buffer_range, @@ -187,6 +188,7 @@ static const struct { [feat_ssbo] = { 43, 31, { "GL_ARB_shader_storage_buffer_object" } }, [feat_ssbo_barrier] = { 43, 31, {} }, [feat_stencil_texturing] = { 43, 31, { "GL_ARB_stencil_texturing" } }, + [feat_storage_multisample] = { 43, 31, { "GL_ARB_texture_storage_multisample" } }, [feat_tessellation] = { 40, UNAVAIL, { "GL_ARB_tessellation_shader" } }, [feat_texture_array] = { 30, 30, { "GL_EXT_texture_array" } }, [feat_texture_buffer_range] = { 43, UNAVAIL, { "GL_ARB_texture_buffer_range" } }, @@ -8117,7 +8119,8 @@ static void vrend_renderer_fill_caps_v2(int gl_ver, int gles_ver, union virgl_c glGetIntegerv(GL_MAX_IMAGE_SAMPLES, (GLint*)&caps->v2.max_image_samples); } - caps->v1.max_samples = vrend_renderer_query_multisample_caps(caps->v1.max_samples, &caps->v2); + if (has_feature(feat_storage_multisample)) + caps->v1.max_samples = vrend_renderer_query_multisample_caps(caps->v1.max_samples, &caps->v2); caps->v2.capability_bits |= VIRGL_CAP_TGSI_INVARIANT | VIRGL_CAP_SET_MIN_SAMPLES | VIRGL_CAP_TGSI_PRECISE;