Mesa (main): virgl: Only progagate the uniform numbers if the numbers are actually right

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jul 8 13:17:46 UTC 2022


Module: Mesa
Branch: main
Commit: 5b683ba19ac77d6c7dfd8de478678d0b90ba764f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5b683ba19ac77d6c7dfd8de478678d0b90ba764f

Author: Corentin Noël <corentin.noel at collabora.com>
Date:   Fri Jul  8 12:06:26 2022 +0200

virgl: Only progagate the uniform numbers if the numbers are actually right

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 <corentin.noel at collabora.com>
Reviewed-by: Gert Wollny <gert.wollny at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17415>

---

 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)



More information about the mesa-commit mailing list