panfrost/midgard: Lower f2b32 to fne
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Mon, 25 Mar 2019 00:53:46 +0000 (00:53 +0000)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Tue, 26 Mar 2019 23:35:24 +0000 (23:35 +0000)
Fixes
dEQP-GLES2.functional.shaders.swizzles.vector_swizzles.mediump_bvec2_x_vertex

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
src/gallium/drivers/panfrost/midgard/midgard_compile.c

index 70ad32dce83e8752e926cb7c06ec1301691f79d9..bef4454f7597afe35ccd5e5269c93d4ddc0e0ce8 100644 (file)
@@ -987,6 +987,13 @@ emit_alu(compiler_context *ctx, nir_alu_instr *instr)
                 ALU_CASE(ine32, ine);
                 ALU_CASE(ilt32, ilt);
 
+                /* Likewise, we don't have a dedicated f2b32 instruction, but
+                 * we can do a "not equal to 0.0" test. Since an inline
+                 * constant vec4(0.0) is the default, we don't need to do any
+                 * special lowering */
+
+                ALU_CASE(f2b32, fne);
+
                 ALU_CASE(frcp, frcp);
                 ALU_CASE(frsq, frsqrt);
                 ALU_CASE(fsqrt, fsqrt);