summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2013-07-22 18:08:48 +0100
committerJosé Fonseca <[email protected]>2013-07-22 18:11:39 +0100
commit7bae56c5c2bc27ab018223b9d6cec46016d9d218 (patch)
tree6a653e6565dca5e80380fbe828991d6f4ccc271e /src
parent2a650611be93872d6aaa40e96a955c72150c3808 (diff)
llvmpipe: Ensure FTZ/DAZ flags are set on deferred draw flushes.
Tested-by: José Fonseca <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast.c8
1 files changed, 8 insertions, 0 deletions
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 {