Skip to content

nir/lower_subgroups: add a flag for GLSL -> SPIRV conversion of ballot intrinsic

Mike Blumenkrantz requested to merge zmike/mesa:nir-subgrouphahas into main

GLSL uses a single 64bit uint for ballot, but SPIRV is a vec4, so in order to seamlessly mimic this, drivers (like zink) can set ballot_bit_size==32 and lower_ballot_to_vec, which will rewrite the ballot instrunction as a vec4, then cast that back to a dvec2, then extract the first component, which is the same value that we started with, except that it doesn't violate spec or explode vtn

Edited by Matt Turner

Merge request reports