Mesa (main): st/mesa: round down MaxUniformBlockSize to a multiple of 4 for piglit
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jun 7 05:19:49 UTC 2022
Module: Mesa
Branch: main
Commit: 2a151238a08eb98ebf3b4b0162dde21024277d51
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2a151238a08eb98ebf3b4b0162dde21024277d51
Author: Marek Olšák <marek.olsak at amd.com>
Date: Mon Jun 6 00:26:35 2022 -0400
st/mesa: round down MaxUniformBlockSize to a multiple of 4 for piglit
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16881>
---
src/mesa/state_tracker/st_extensions.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 1761f9e38de..a24358d5753 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -167,6 +167,11 @@ void st_init_limits(struct pipe_screen *screen,
can_ubo = false;
}
+ /* Round down to a multiple of 4 to make piglit happy. Bytes are not
+ * addressible by UBOs anyway.
+ */
+ c->MaxUniformBlockSize &= ~3;
+
for (sh = 0; sh < PIPE_SHADER_TYPES; ++sh) {
const gl_shader_stage stage = tgsi_processor_to_shader_stage(sh);
struct gl_shader_compiler_options *options =
More information about the mesa-commit
mailing list