From 7bae56c5c2bc27ab018223b9d6cec46016d9d218 Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Mon, 22 Jul 2013 18:08:48 +0100 Subject: [PATCH] llvmpipe: Ensure FTZ/DAZ flags are set on deferred draw flushes. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Tested-by: José Fonseca --- src/gallium/drivers/llvmpipe/lp_rast.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c index 772c9d7c681..49cdbfeff8e 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.c +++ b/src/gallium/drivers/llvmpipe/lp_rast.c @@ -697,6 +697,12 @@ lp_rast_queue_scene( struct lp_rasterizer *rast, if (rast->num_threads == 0) { /* no threading */ + unsigned fpstate = util_fpstate_get(); + + /* Make sure that denorms are treated like zeros. This is + * the behavior required by D3D10. OpenGL doesn't care. + */ + util_fpstate_set_denorms_to_zero(fpstate); lp_rast_begin( rast, scene ); @@ -704,6 +710,8 @@ lp_rast_queue_scene( struct lp_rasterizer *rast, lp_rast_end( rast ); + util_fpstate_set(fpstate); + rast->curr_scene = NULL; } else { -- 2.30.2