mojoshader_compiler.c
changeset 999 1ac98e90b53e
parent 998 8f82dca9a374
child 1000 0f4a8ec6bd9b
equal deleted inserted replaced
998:8f82dca9a374 999:1ac98e90b53e
  3880     ADD_INTRINSIC_VECTOR_FLOAT(add_intrinsic3(ctx, fn, dt, dt, dt, dt));
  3880     ADD_INTRINSIC_VECTOR_FLOAT(add_intrinsic3(ctx, fn, dt, dt, dt, dt));
  3881 } // add_intrinsic_SAME1_Vf_SAME1_SAME1
  3881 } // add_intrinsic_SAME1_Vf_SAME1_SAME1
  3882 
  3882 
  3883 static void add_intrinsic_SAME1_Vf_SAME1_f(Context *ctx, const char *fn)
  3883 static void add_intrinsic_SAME1_Vf_SAME1_f(Context *ctx, const char *fn)
  3884 {
  3884 {
  3885     ADD_INTRINSIC_VECTOR_FLOAT(add_intrinsic3(ctx, fn, dt, dt, dt, dt->vector.base));
  3885     ADD_INTRINSIC_VECTOR_FLOAT(add_intrinsic3(ctx, fn, dt, dt, dt, dt->user.details->vector.base));
  3886 } // add_intrinsic_SAME1_Vf_SAME1_f
  3886 } // add_intrinsic_SAME1_Vf_SAME1_f
  3887 
  3887 
  3888 static void add_intrinsic_VOID_ANYf(Context *ctx, const char *fn)
  3888 static void add_intrinsic_VOID_ANYf(Context *ctx, const char *fn)
  3889 {
  3889 {
  3890     ADD_INTRINSIC_ANY_FLOAT(add_intrinsic1(ctx, fn, NULL, dt));
  3890     ADD_INTRINSIC_ANY_FLOAT(add_intrinsic1(ctx, fn, NULL, dt));
  3903     add_intrinsic1(ctx, fn, &ctx->dt_float, get_usertype(ctx, "float4x4"));
  3903     add_intrinsic1(ctx, fn, &ctx->dt_float, get_usertype(ctx, "float4x4"));
  3904 } // add_intrinsic_f_SQUAREMATRIXf
  3904 } // add_intrinsic_f_SQUAREMATRIXf
  3905 
  3905 
  3906 static void add_intrinsic_f_Vf(Context *ctx, const char *fn)
  3906 static void add_intrinsic_f_Vf(Context *ctx, const char *fn)
  3907 {
  3907 {
  3908     ADD_INTRINSIC_VECTOR_FLOAT(add_intrinsic1(ctx, fn, dt->vector.base, dt));
  3908     ADD_INTRINSIC_VECTOR_FLOAT(add_intrinsic1(ctx, fn, dt->user.details->vector.base, dt));
  3909 } // add_intrinsic_f_Vf
  3909 } // add_intrinsic_f_Vf
  3910 
  3910 
  3911 static void add_intrinsic_fi_Vfi_SAME1(Context *ctx, const char *fn)
  3911 static void add_intrinsic_fi_Vfi_SAME1(Context *ctx, const char *fn)
  3912 {
  3912 {
  3913     ADD_INTRINSIC_VECTOR_INT(add_intrinsic2(ctx, fn, dt->vector.base, dt, dt));
  3913     ADD_INTRINSIC_VECTOR_INT(add_intrinsic2(ctx, fn, dt->user.details->vector.base, dt, dt));
  3914     ADD_INTRINSIC_VECTOR_FLOAT(add_intrinsic2(ctx, fn, dt->vector.base, dt, dt));
  3914     ADD_INTRINSIC_VECTOR_FLOAT(add_intrinsic2(ctx, fn, dt->user.details->vector.base, dt, dt));
  3915 } // add_intrinsic_fi_Vfi_SAME1
  3915 } // add_intrinsic_fi_Vfi_SAME1
  3916 
  3916 
  3917 static void add_intrinsic_f_Vf_SAME1(Context *ctx, const char *fn)
  3917 static void add_intrinsic_f_Vf_SAME1(Context *ctx, const char *fn)
  3918 {
  3918 {
  3919     ADD_INTRINSIC_VECTOR_FLOAT(add_intrinsic2(ctx, fn, dt->vector.base, dt, dt));
  3919     ADD_INTRINSIC_VECTOR_FLOAT(add_intrinsic2(ctx, fn, dt->user.details->vector.base, dt, dt));
  3920 } // add_intrinsic_f_Vf_SAME1
  3920 } // add_intrinsic_f_Vf_SAME1
  3921 
  3921 
  3922 static void add_intrinsic_3f_3f_3f(Context *ctx, const char *fn)
  3922 static void add_intrinsic_3f_3f_3f(Context *ctx, const char *fn)
  3923 {
  3923 {
  3924     const MOJOSHADER_astDataType *dt = get_usertype(ctx, "float3");
  3924     const MOJOSHADER_astDataType *dt = get_usertype(ctx, "float3");