Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl.y:
+static bool intrinsic_fwidth(struct hlsl_ctx *ctx,
const struct parse_initializer *params, const struct vkd3d_shader_location *loc)
+{
- struct hlsl_ir_function_decl *func;
- struct hlsl_type *type;
- char *body;
- static const char template[] =
"%s fwidth(%s x)\n"
"{\n"
" return abs(ddx(x)) + abs(ddy(x));\n"
"}";
- if (!(type = elementwise_intrinsic_get_common_type(ctx, params, loc)))
return false;
What's the point of this with a single parameter? Am I missing anything?