mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-10-08 22:44:56 +00:00
shader_recompiler: gl_PrimitiveId scatter for geometry-stage stream compaction (#4330)
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
This commit is contained in:
committed by
crueter
parent
1bd6656b3c
commit
d0a6e951ff
@@ -13,6 +13,7 @@ struct HostTranslateInfo;
|
||||
namespace Shader::Optimization {
|
||||
|
||||
void CollectShaderInfoPass(Environment& env, IR::Program& program);
|
||||
void CompactionFallbackPass(IR::Program& program, const HostTranslateInfo& host_info);
|
||||
void ConditionalBarrierPass(IR::Program& program);
|
||||
void ConstantPropagationPass(Environment& env, IR::Program& program);
|
||||
void DeadCodeEliminationPass(IR::Program& program);
|
||||
|
||||
Reference in New Issue
Block a user