This is probably not the correct way to lower the division. The lowering should be enable only for r600g and not in the parser.
The division don't pass the piglit test due to the rcp implementation. Signed-off-by: Elie Tournier <elie.tourn...@collabora.com> --- src/compiler/glsl/glsl_parser_extras.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp index cfb214e440..ac50737986 100644 --- a/src/compiler/glsl/glsl_parser_extras.cpp +++ b/src/compiler/glsl/glsl_parser_extras.cpp @@ -2169,6 +2169,7 @@ do_common_optimization(exec_list *ir, bool linked, } while (false) OPT(lower_instructions, ir, SUB_TO_ADD_NEG); + OPT(lower_instructions, ir, DDIV_TO_MUL_RCP); if (linked) { OPT(do_function_inlining, ir); -- 2.14.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev