Commit 9f174eb2 authored by Hyunjun Ko's avatar Hyunjun Ko Committed by Marge Bot

nir: fix wrong assignment to buffer in xfb_varyings_info

Tested with dEQP-VK.transform_feedback.fuzz.various_buffers.buffers100_instance_array_vertex
Signed-off-by: Hyunjun Ko's avatarHyunjun Ko <zzoon@igalia.com>
Reviewed-by: Tapani Pälli's avatarTapani Pälli <tapani.palli@intel.com>
Cc: mesa-stable@lists.freedesktop.org
Tested-by: Marge Bot <!4459>
Part-of: <!4459>
parent 84e845c9
Pipeline #128840 failed with stages
in 27 minutes and 22 seconds
......@@ -28,7 +28,7 @@
static void
add_var_xfb_varying(nir_xfb_info *xfb,
nir_xfb_varyings_info *varyings,
nir_variable *var,
unsigned buffer,
unsigned offset,
const struct glsl_type *type)
{
......@@ -38,9 +38,9 @@ add_var_xfb_varying(nir_xfb_info *xfb,
nir_xfb_varying_info *varying = &varyings->varyings[varyings->varying_count++];
varying->type = type;
varying->buffer = var->data.xfb.buffer;
varying->buffer = buffer;
varying->offset = offset;
xfb->buffers[var->data.xfb.buffer].varying_count++;
xfb->buffers[buffer].varying_count++;
}
......@@ -83,7 +83,7 @@ add_var_xfb_outputs(nir_xfb_info *xfb,
if (!glsl_type_is_array(child_type) &&
!glsl_type_is_struct(child_type)) {
add_var_xfb_varying(xfb, varyings, var, *offset, type);
add_var_xfb_varying(xfb, varyings, buffer, *offset, type);
varying_added = true;
}
......@@ -138,7 +138,7 @@ add_var_xfb_outputs(nir_xfb_info *xfb,
unsigned comp_offset = var->data.location_frac;
if (!varying_added) {
add_var_xfb_varying(xfb, varyings, var, *offset, type);
add_var_xfb_varying(xfb, varyings, buffer, *offset, type);
}
while (comp_mask) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment