From: Zack Rusin Date: Mon, 22 Jul 2013 17:08:48 +0000 (+0100) Subject: llvmpipe: Ensure FTZ/DAZ flags are set on deferred draw flushes. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7bae56c5c2bc27ab018223b9d6cec46016d9d218;p=mesa.git llvmpipe: Ensure FTZ/DAZ flags are set on deferred draw flushes. Tested-by: José Fonseca --- 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 {