From d40b5ca5c50796c168aba0e0e3dd4a0f695a9e3b Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 15 Oct 2014 16:57:10 -0700 Subject: [PATCH] nir/glsl: Add support for coarse and fine derivatives Reviewed-by: Connor Abbott --- src/glsl/nir/glsl_to_nir.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp index 7155a9df08a..40cb2448cf8 100644 --- a/src/glsl/nir/glsl_to_nir.cpp +++ b/src/glsl/nir/glsl_to_nir.cpp @@ -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; -- 2.30.2