From c31e6facde437b479b8fbf6ce632f76a151ed6f2 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Fri, 17 Aug 2018 09:58:32 +0200 Subject: [PATCH] vrend, caps: multisample images are not available on GLES Consequently calling glGetIntegerv with GL_MAX_IMAGE_SAMPLES would results in an error state on GLES that is not cleaned up and this has consequences for the following processing. Closes: #28 Fixes: 950de33c32d58285e73d811f21b6cf980813fa88 renderer: add image support. (v4) Signed-off-by: Gert Wollny Reviewed-by: Jakob Bornecrantz Signed-off-by: Dave Airlie --- src/vrend_renderer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 347b21c..3b38a58 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -8139,7 +8139,8 @@ static void vrend_renderer_fill_caps_v2(int gl_ver, int gles_ver, union virgl_c max = PIPE_MAX_SHADER_IMAGES; caps->v2.max_shader_image_frag_compute = max; - glGetIntegerv(GL_MAX_IMAGE_SAMPLES, (GLint*)&caps->v2.max_image_samples); + if (gl_ver > 0) /* Seems GLES doesn't support multisample images */ + glGetIntegerv(GL_MAX_IMAGE_SAMPLES, (GLint*)&caps->v2.max_image_samples); } if (has_feature(feat_storage_multisample))