nir/glsl: Add support for coarse and fine derivatives
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 15 Oct 2014 23:57:10 +0000 (16:57 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 15 Jan 2015 15:18:59 +0000 (07:18 -0800)
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/glsl/nir/glsl_to_nir.cpp

index 7155a9df08a8c8e7bb44112f35b559c151f01907..40cb2448cf86dd8f02f7bb52342b854dd0be4a80 100644 (file)
@@ -1078,8 +1078,12 @@ nir_visitor::visit(ir_expression *ir)
    case ir_unop_cos_reduced:
       emit(nir_op_fcos_reduced, dest_size, srcs);
       break;
-   case ir_unop_dFdx:  emit(nir_op_fddx,   dest_size, srcs); break;
-   case ir_unop_dFdy:  emit(nir_op_fddy,   dest_size, srcs); break;
+   case ir_unop_dFdx:        emit(nir_op_fddx,        dest_size, srcs); break;
+   case ir_unop_dFdy:        emit(nir_op_fddy,        dest_size, srcs); break;
+   case ir_unop_dFdx_fine:   emit(nir_op_fddx_fine,   dest_size, srcs); break;
+   case ir_unop_dFdy_fine:   emit(nir_op_fddy_fine,   dest_size, srcs); break;
+   case ir_unop_dFdx_coarse: emit(nir_op_fddx_coarse, dest_size, srcs); break;
+   case ir_unop_dFdy_coarse: emit(nir_op_fddy_coarse, dest_size, srcs); break;
    case ir_unop_pack_snorm_2x16:
       emit(nir_op_pack_snorm_2x16, dest_size, srcs);
       break;