From 5b683ba19ac77d6c7dfd8de478678d0b90ba764f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corentin=20No=C3=ABl?= Date: Fri, 8 Jul 2022 12:06:26 +0200 Subject: [PATCH] virgl: Only progagate the uniform numbers if the numbers are actually right MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the field was first introduces, the numbers were reporting the number of vec4 instead of the number of float. Do not propagate them if they are wrong. Fixes: d92c1ca01b326d8f0ff210828830d6542f9e67f7 Signed-off-by: Corentin Noël Reviewed-by: Gert Wollny Part-of: --- src/gallium/drivers/virgl/virgl_screen.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c index 348fe79596c..d7f1762352e 100644 --- a/src/gallium/drivers/virgl/virgl_screen.c +++ b/src/gallium/drivers/virgl/virgl_screen.c @@ -421,6 +421,8 @@ virgl_get_shader_param(struct pipe_screen *screen, case PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH: return 32; case PIPE_SHADER_CAP_MAX_CONST_BUFFER0_SIZE: + if (vscreen->caps.caps.v2.host_feature_check_version < 12) + return 4096 * sizeof(float[4]); return vscreen->caps.caps.v2.max_const_buffer_size[shader]; case PIPE_SHADER_CAP_MAX_SHADER_BUFFERS: if (shader == PIPE_SHADER_FRAGMENT || shader == PIPE_SHADER_COMPUTE)