Mesa (main): nir/glsl: Use rzalloc for nir_xfb_info
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jun 2 14:44:50 UTC 2022
Module: Mesa
Branch: main
Commit: 7c876a6b2f104ef5b6e006abcb47901cdbcc24fa
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7c876a6b2f104ef5b6e006abcb47901cdbcc24fa
Author: Jason Ekstrand <jason.ekstrand at collabora.com>
Date: Wed Jun 1 13:26:46 2022 -0500
nir/glsl: Use rzalloc for nir_xfb_info
A lot of the fields get fully overwritten but outputs/buffers_written
are both bitfields that we set one bit at a time.
Fixes: 7c5dc0b11a11 ("glsl/nir: Populate nir_shader::xfb_info after linking varyings")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16819>
---
src/compiler/glsl/gl_nir_link_xfb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/compiler/glsl/gl_nir_link_xfb.c b/src/compiler/glsl/gl_nir_link_xfb.c
index b191a698583..a611d24b5e5 100644
--- a/src/compiler/glsl/gl_nir_link_xfb.c
+++ b/src/compiler/glsl/gl_nir_link_xfb.c
@@ -203,7 +203,7 @@ gl_to_nir_xfb_info(struct gl_transform_feedback_info *info, void *mem_ctx)
return NULL;
nir_xfb_info *xfb =
- ralloc_size(mem_ctx, nir_xfb_info_size(info->NumOutputs));
+ rzalloc_size(mem_ctx, nir_xfb_info_size(info->NumOutputs));
xfb->output_count = info->NumOutputs;
More information about the mesa-commit
mailing list