[Mesa-dev] [PATCH] radv/ac: canonicalize the output for 32-bit float min/max.

Dave Airlie airlied at gmail.com
Wed May 3 00:54:46 UTC 2017


On 17 March 2017 at 18:24, Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl> wrote:
> Where do you see that they are required to flush denormals to 0? I
> can't find it in the GLSL extensions for SPIR-V, and the vulkan spec
> has the following note:
>
> "Any denormalized value input into a shader or potentially generated
> by any instruction in a shader may be flushed to 0."
>
> Which very much sounds optional.

So I've gotten back to this, and the problem seems to be that we don't
compare denormals properly
so we should just flush instead.

if you have min (0, denorm) and 0 is the minimum, we currently return
the positive denorm,

Hence flushing is the workaround for the comparisons not working,
rather than the optional may in the spec.

Dave.


More information about the mesa-dev mailing list