[Mesa-dev] [PATCH 032/133] nir/glsl: Add support for coarse and fine derivatives

Jason Ekstrand jason at jlekstrand.net
Mon Dec 15 22:04:42 PST 2014


---
 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 60a24bc..d6306e7 100644
--- a/src/glsl/nir/glsl_to_nir.cpp
+++ b/src/glsl/nir/glsl_to_nir.cpp
@@ -1083,8 +1083,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.2.0



More information about the mesa-dev mailing list