mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Use add_unary_arithmetic_expr() in intrinsic_pow().
Using add_unary_arithmetic_expr() instead of hlsl_new_unary_expr() allows the intrinsic to work with matrices. Otherwise we get: E5017: Aborting due to not yet implemented feature: Copying from unsupported node type. because an HLSL_IR_EXPR reaches split_matrix_copies().
This commit is contained in:
parent
6770ecbdf4
commit
5b1030e0cb
Notes:
Alexandre Julliard
2023-01-11 22:39:00 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Zebediah Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/53
@ -2661,16 +2661,15 @@ static bool intrinsic_pow(struct hlsl_ctx *ctx,
|
||||
if (!elementwise_intrinsic_float_convert_args(ctx, params, loc))
|
||||
return false;
|
||||
|
||||
if (!(log = hlsl_new_unary_expr(ctx, HLSL_OP1_LOG2, params->args[0], *loc)))
|
||||
if (!(log = add_unary_arithmetic_expr(ctx, params->instrs, HLSL_OP1_LOG2, params->args[0], loc)))
|
||||
return false;
|
||||
list_add_tail(params->instrs, &log->entry);
|
||||
|
||||
if (!(mul = add_binary_arithmetic_expr(ctx, params->instrs, HLSL_OP2_MUL, params->args[1], log, loc)))
|
||||
return false;
|
||||
|
||||
if (!(exp = hlsl_new_unary_expr(ctx, HLSL_OP1_EXP2, mul, *loc)))
|
||||
if (!(exp = add_unary_arithmetic_expr(ctx, params->instrs, HLSL_OP1_EXP2, mul, loc)))
|
||||
return false;
|
||||
list_add_tail(params->instrs, &exp->entry);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ draw quad
|
||||
probe all rgba (0.512, 0.101192884, 0.64, 0.25) 4
|
||||
|
||||
|
||||
[pixel shader todo]
|
||||
[pixel shader]
|
||||
float4 main() : sv_target
|
||||
{
|
||||
float2x3 a = {1, 2, 3, 4, 5, 6};
|
||||
@ -21,8 +21,8 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
todo draw quad
|
||||
todo probe all rgba (1.0, 32.0, 256.0, 125.0)
|
||||
draw quad
|
||||
probe all rgba (1.0, 32.0, 256.0, 125.0) 2
|
||||
|
||||
|
||||
[pixel shader fail]
|
||||
|
Loading…
Reference in New Issue
Block a user