mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-10-17 17:06:17 +00:00
d0a6e951ff
Guest shaders that reserve a compacted output slot via subgroup ballot -> popcount -> atomic add cannot preserve the originating primitives' relative order once run through the single-invocation subgroup fallback for stages without subgroup support. gl_PrimitiveId is already hardware-guaranteed unique and monotonically increasing per primitive, so CompactionFallbackPass rewrites that pattern into a gl_PrimitiveId-indexed scatter instead. Confirmed fixing corrupted/order-scrambled compacted draws in NieR Automata on a device without geometry-stage subgroup support. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4330