[Mesa-dev] [PATCH] i965/fs: Fix conversions float->bool, int->bool

2012-06-21 Thread Kenneth Graunke
From: Chad Versace Fixes gles2conform GL.equal.equal_bvec2_frag. This fixes brw_fs_visitor's translation of ir_unop_f2b. It used CMP to convert the float to one of 0 or ~0. However, the convention in the compiler is that true is represented by 1, not ~0. This patch adds an AND to convert ~0 to

[Mesa-dev] [PATCH] i965/fs: Fix conversions float->bool, int->bool

2012-06-15 Thread Chad Versace
Fixes gles2conform GL.equal.equal_bvec2_frag. This fixes brw_fs_visitor's translation of ir_unop_f2b. It used CMP to convert the float to one of 0 or ~0. However, the convention in the compiler is that true is represented by 1, not ~0. This patch adds an AND to convert ~0 to 1. By inspection, a