[Mesa-dev] [PATCH 15/16] i965/fs: Add support for removing MOV.NZ instructions.

Matt Turner mattst88 at gmail.com
Tue Jan 20 16:02:35 PST 2015


On Tue, Jan 20, 2015 at 3:51 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> Except typeless...  We need some sort of assurance that the result of a NIR
> comparison is always 0 or ~0.

Help me understand how this is a different situation from what we have today?

Let's take for instance a vec2 == vec2 comparison. On Gen4/5 we
generate two CMPs an AND to combine their results and a single
resolving AND.NZ with 1 to generate the flag.

Look at generated_tests/spec/glsl-1.10/execution/built-in-functions/fs-op-eq-vec2-vec2-using-if.shader_test
for example.

Why should NIR necessitate doing any of that differently?


More information about the mesa-dev mailing list