i965: add handling for imageSamples
authorIlia Mirkin <imirkin@alum.mit.edu>
Fri, 28 Aug 2015 03:34:47 +0000 (23:34 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Thu, 10 Sep 2015 21:38:55 +0000 (17:38 -0400)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs_nir.cpp

index 0902e1c396e0df84b4be556f0c021f8adcd92532..1cc7b0219289bc9d2530fdf6bd3a79a42b1c8b52 100644 (file)
@@ -1436,6 +1436,11 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr
       break;
    }
 
+   case nir_intrinsic_image_samples:
+      /* The driver does not support multi-sampled images. */
+      bld.MOV(retype(dest, BRW_REGISTER_TYPE_D), fs_reg(1));
+      break;
+
    case nir_intrinsic_load_front_face:
       bld.MOV(retype(dest, BRW_REGISTER_TYPE_D),
               *emit_frontfacing_interpolation());