nir/xfb: adding varyings on nir_xfb_info and gather_info
In order to be used for OpenGL (right now for ARB_gl_spirv). This commit adds two new structures: * nir_xfb_varying_info: that identifies each individual varying. For each one, we need to know the type, buffer and xfb_offset * nir_xfb_buffer_info: as now for each buffer, in addition to the stride, we need to know how many varyings are assigned to it. For this patch, the only case where num_outputs != num_varyings is with the case of doubles, that for dvec3/4 could require more than one output. There are more cases though (like aoa), that will be handled on following patches. v2: updated after new nir general XFB support introduced for "anv: Add support for VK_EXT_transform_feedback" v3: compute num_varyings beforehand for allocating, instead of relying on num_outputs as approximate value (Timothy Arceri) Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
@@ -519,7 +519,7 @@ gather_xfb_info(const nir_shader *nir, struct radv_shader_info *info)
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < NIR_MAX_XFB_BUFFERS; i++) {
|
||||
so->strides[i] = xfb->strides[i] / 4;
|
||||
so->strides[i] = xfb->buffers[i].stride / 4;
|
||||
}
|
||||
|
||||
ralloc_free(xfb);
|
||||
|
Reference in New Issue
Block a user