i965/nir: Add support for nir_intrinsic_load_front_face
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 14 Feb 2015 20:09:31 +0000 (12:09 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Sat, 14 Feb 2015 21:47:16 +0000 (13:47 -0800)
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_fs_nir.cpp

index 3014e3ef1c2ca632ec675f19959f36dc39e55021..13be83ecbe1ce302a61d81c390707019a7b1819f 100644 (file)
@@ -1206,7 +1206,9 @@ fs_visitor::nir_emit_intrinsic(nir_intrinsic_instr *instr)
    }
 
    case nir_intrinsic_load_front_face:
-      assert(!"TODO");
+      emit(MOV(retype(dest, BRW_REGISTER_TYPE_D),
+               *emit_frontfacing_interpolation()));
+      break;
 
    case nir_intrinsic_load_sample_mask_in: {
       fs_reg sample_mask_in = nir_system_values[SYSTEM_VALUE_SAMPLE_MASK_IN];