From ae7f7e6163f14ecab2c8217be41c1d1bc7513d5f Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Tue, 22 Feb 2022 21:23:09 +0900 Subject: [PATCH] vrend: Limit max texture image units Signed-off-by: Akihiko Odaki Reviewed-by: Gert Wollny --- src/vrend_renderer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 0ef692b..3cc8c20 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -11000,7 +11000,7 @@ static void vrend_renderer_fill_caps_v2(int gl_ver, int gles_ver, union virgl_c } glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &max); - caps->v2.max_texture_image_units = max; + caps->v2.max_texture_image_units = MIN2(max, PIPE_MAX_SHADER_SAMPLER_VIEWS); } void vrend_renderer_fill_caps(uint32_t set, uint32_t version,