zink: handle max_vertices=0 in geometry shader
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Mon, 11 Jul 2022 16:04:22 +0000 (12:04 -0400)
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Wed, 20 Jul 2022 13:21:30 +0000 (09:21 -0400)
commit5b58f8df538f9bb7489486d262a6e603ddfa1f65
tree91b7a3a655e333b029fcc916b55b2e109b3ed0c1
parentefc827ceead5228a1b6310b8a03c0193add5f00d
zink: handle max_vertices=0 in geometry shader

this is a weird corner case where glsl permits a zero value, so clamp to 1
and then don't emit any vertices to avoid driver hangs

affects:
dEQP-GL45-ES31.functional.geometry_shading.emit.points_emit_0_end_0

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17639>
src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c