nir/glsl: Use rzalloc for nir_xfb_info
authorJason Ekstrand <jason.ekstrand@collabora.com>
Wed, 1 Jun 2022 18:26:46 +0000 (13:26 -0500)
committerMarge Bot <emma+marge@anholt.net>
Thu, 2 Jun 2022 14:06:31 +0000 (14:06 +0000)
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@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16819>

src/compiler/glsl/gl_nir_link_xfb.c

index b191a69..a611d24 100644 (file)
@@ -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;