anv: Fix VK_EXT_transform_feedback working with gl_Layer

Transform feedback did not handle that VARYING_SLOT_LAYER and VARYING_SLOT_VIEWPORT are packed into VARYING_SLOT_PSIZ.

I'm not sure that VARYING_SLOT_VIEWPORT should be handled here since Vulkan spec for VK_EXT_transform_feedback states:

RESOLVED: Transform feedback cannot be made active in a render pass with multiview enabled.

  1. How should queries be done?

However could this varying exist in shader without multiview being enabled?

The issue with VARYING_SLOT_LAYER was found in RenderDoc since it uses transform feedback to fetch GS outputs.

Merge request reports