[Mesa-dev] [PATCH 1/3] i965/nir: Add support for nir_intrinsic_load_front_face
Jason Ekstrand
jason at jlekstrand.net
Sat Feb 14 12:51:02 PST 2015
---
src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
index da81b61..28a5f64 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
@@ -1205,8 +1205,11 @@ fs_visitor::nir_emit_intrinsic(nir_intrinsic_instr *instr)
break;
}
- case nir_intrinsic_load_front_face:
- assert(!"TODO");
+ case nir_intrinsic_load_front_face: {
+ fs_reg *reg = emit_frontfacing_interpolation();
+ emit(MOV(retype(dest, BRW_REGISTER_TYPE_D), *reg));
+ break;
+ }
case nir_intrinsic_load_sample_mask_in: {
fs_reg sample_mask_in = nir_system_values[SYSTEM_VALUE_SAMPLE_MASK_IN];
--
2.2.2
More information about the mesa-dev
mailing list