anv/gen10: Enable float blend optimization
authorAnuj Phogat <anuj.phogat@gmail.com>
Fri, 10 Nov 2017 22:22:44 +0000 (14:22 -0800)
committerAnuj Phogat <anuj.phogat@gmail.com>
Tue, 14 Nov 2017 21:23:18 +0000 (13:23 -0800)
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
src/intel/vulkan/genX_state.c

index f56c686ed3347dc0eb9e6f1f6bcfda503c2ba58a..54fb8634fdc84ffae839f15fe23c6d0da0330264 100644 (file)
@@ -121,6 +121,18 @@ genX(init_device_state)(struct anv_device *device)
    }
 #endif
 
+#if GEN_GEN == 10
+   uint32_t cache_mode_ss;
+   anv_pack_struct(&cache_mode_ss, GENX(CACHE_MODE_SS),
+                   .FloatBlendOptimizationEnable = true,
+                   .FloatBlendOptimizationEnableMask = true);
+
+   anv_batch_emit(&batch, GENX(MI_LOAD_REGISTER_IMM), lri) {
+      lri.RegisterOffset = GENX(CACHE_MODE_SS_num);
+      lri.DataDWord      = cache_mode_ss;
+   }
+#endif
+
    anv_batch_emit(&batch, GENX(3DSTATE_AA_LINE_PARAMETERS), aa);
 
    anv_batch_emit(&batch, GENX(3DSTATE_DRAWING_RECTANGLE), rect) {