glsl: Fix packing of matrices for XFB
The CAP for packed transform feedback concerns packing of unrelated variables into the same varying slot. (On Mali, transform feedback is implemented on a per-slot basis, so different variables need different slots to be written to different buffers.) However, this requirement is tangential to the packing of arrays, matrices, and structures inherent to GLSL. These array-like values need to be packed /within/ their slot, even though drivers using the CAP (just Panfrost) cannot pack independent values in the slot. Transform feedback of individual elements is not independent, after all. Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10778>
This commit is contained in:
parent
538ab8c571
commit
4d44d4179e
|
@ -2097,7 +2097,8 @@ varying_matches::assign_locations(struct gl_shader_program *prog,
|
|||
} else {
|
||||
if ((this->disable_varying_packing &&
|
||||
!is_varying_packing_safe(type, var)) ||
|
||||
(this->disable_xfb_packing && var->data.is_xfb) ||
|
||||
(this->disable_xfb_packing && var->data.is_xfb &&
|
||||
!(type->is_array() || type->is_struct() || type->is_matrix())) ||
|
||||
var->data.must_be_shader_input) {
|
||||
num_components = type->count_attribute_slots(false) * 4;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue