summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_nir.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
index 350cf3fd5fa..aab74298fae 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
@@ -1325,9 +1325,20 @@ fs_visitor::nir_emit_intrinsic(nir_intrinsic_instr *instr)
break;
}
- case nir_intrinsic_load_sample_pos:
- case nir_intrinsic_load_sample_id:
- assert(!"TODO");
+ case nir_intrinsic_load_sample_pos: {
+ fs_reg *reg = emit_samplepos_setup();
+ dest.type = reg->type;
+ emit(MOV(dest, *reg));
+ emit(MOV(offset(dest, 1), offset(*reg, 1)));
+ break;
+ }
+
+ case nir_intrinsic_load_sample_id: {
+ fs_reg *reg = emit_sampleid_setup();
+ dest.type = reg->type;
+ emit(MOV(dest, *reg));
+ break;
+ }
case nir_intrinsic_load_uniform_vec1:
case nir_intrinsic_load_uniform_vec2: