[Mesa-dev] [PATCH 41/45] i965/fs: Use half_precision data_format on 16-bit fb writes

Alejandro PiƱeiro apinheiro at igalia.com
Thu Jul 13 14:35:45 UTC 2017


---
 src/intel/compiler/brw_fs_visitor.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/intel/compiler/brw_fs_visitor.cpp b/src/intel/compiler/brw_fs_visitor.cpp
index 758c8bf..e39bafd 100644
--- a/src/intel/compiler/brw_fs_visitor.cpp
+++ b/src/intel/compiler/brw_fs_visitor.cpp
@@ -439,6 +439,12 @@ fs_visitor::emit_fb_writes()
       inst = emit_single_fb_write(abld, this->outputs[target],
                                   this->dual_src_output, src0_alpha, 4);
       inst->target = target;
+
+      /* Enables half-precision data_format for 16-bit outputs on
+       * Render Target Write Messages. Supported since cherry-view and
+       * Skylake.
+       */
+      inst->data_format = type_sz(this->outputs[target].type) == 2;
    }
 
    prog_data->dual_src_blend = (this->dual_src_output.file != BAD_FILE);
-- 
2.9.3



More information about the mesa-dev mailing list