i965: Don't request untyped atomic writeback message if the destination is null.
authorFrancisco Jerez <currojerez@riseup.net>
Thu, 26 Feb 2015 15:41:46 +0000 (17:41 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Mon, 4 May 2015 12:05:20 +0000 (15:05 +0300)
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs_generator.cpp
src/mesa/drivers/dri/i965/brw_vec4_generator.cpp

index ff7e85fbb715e6ea9abe6765390185b13e3d257b..5b6633a7fa1e5e35dadfc2e406969c44afdd3517 100644 (file)
@@ -2018,7 +2018,7 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width)
          assert(src[1].file == BRW_IMMEDIATE_VALUE &&
                 src[2].file == BRW_IMMEDIATE_VALUE);
          brw_untyped_atomic(p, dst, src[0], src[2], src[1].dw1.ud,
-                            inst->mlen, true);
+                            inst->mlen, !inst->dst.is_null());
          brw_mark_surface_used(prog_data, src[2].dw1.ud);
          break;
 
index de7e06c76173c2f7f6b52271360d2783232d961a..b847254f3dc977ceb40a5b4582c2dcaa04a55c62 100644 (file)
@@ -1472,7 +1472,8 @@ vec4_generator::generate_code(const cfg_t *cfg)
          assert(src[0].file == BRW_IMMEDIATE_VALUE &&
                 src[1].file == BRW_IMMEDIATE_VALUE);
          brw_untyped_atomic(p, dst, brw_message_reg(inst->base_mrf),
-                            src[1], src[0].dw1.ud, inst->mlen, true);
+                            src[1], src[0].dw1.ud, inst->mlen,
+                            !inst->dst.is_null());
          brw_mark_surface_used(&prog_data->base, src[1].dw1.ud);
          break;