Skip to content

nir: don't try to optimize exclusive min/max scan to inclusive

Georg Lehmann requested to merge DadSchoorse/mesa:nir-i-hate-spirv-fmin into main

SPIR-V rules for fmax/fmin scans are very stupid. The required identity is Inf instead of NaN but if one input is NaN, the other value has to be returned.

This means for invocation 0:

min(subgroupExclusiveMin(NaN), NaN) -> Inf

subgroupInclusiveMin(NaN) -> undefined (NaN for any sane backend)

Merge request reports