anv: disable replication when we don't have both VS/FS stages

Enabling this with shaders compiled separately through pipeline
libraries fails because we currently only enable it for VS and the
associated FS stage ends up with a non compatible VUE map.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34173>
This commit is contained in:
Lionel Landwerlin 2025-03-07 12:03:21 +02:00 committed by Marge Bot
parent 722ca57619
commit 25a695552a

View file

@ -329,12 +329,12 @@ anv_check_for_primitive_replication(struct anv_device *device,
/* TODO: We should be able to support replication at 'geometry' stages
* later than Vertex. In that case only the last stage can refer to
* gl_ViewIndex.
*
* If we have only vertex or only fragment (pipeline libraries), we also do
* not support primitive replication, because that would make use compute
* inconsistent VUE layout in each stage.
*/
if (stages & ~(VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT))
return false;
/* It's possible we have no vertex shader yet (with pipeline libraries) */
if (!(stages & VK_SHADER_STAGE_VERTEX_BIT))
if (stages != (VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT))
return false;
int view_count = util_bitcount(view_mask);