nir/xfb: Fix offset accounting for dvec3/4

Before, we were double-counting the component slots when we had a dvec3
or dvec4.  Instead, just add them in once and manually offset the
recorded output offset.

Fixes: 19064b8c "nir: Add a pass for gathering transform feedback info"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
This commit is contained in:
Jason Ekstrand 2018-12-06 16:49:27 -06:00
parent 96fa23bca5
commit 4f99ac9144
1 changed files with 2 additions and 2 deletions

View File

@ -76,13 +76,13 @@ add_var_xfb_outputs(nir_xfb_info *xfb,
nir_xfb_output_info *output = &xfb->outputs[xfb->output_count++];
output->buffer = var->data.xfb_buffer;
output->offset = *offset;
output->offset = *offset + s * 16;
output->location = *location;
output->component_mask = (comp_mask >> (s * 4)) & 0xf;
(*location)++;
*offset += comp_slots * 4;
}
*offset += comp_slots * 4;
}
}