mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Use mul only for two scalars for dot().
This commit is contained in:
parent
0e60f4cc69
commit
99acf5038e
Notes:
Alexandre Julliard
2023-02-15 22:19:57 +01:00
Approved-by: Zebediah Figura (@zfigura) Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/90
@ -1638,7 +1638,7 @@ static struct hlsl_ir_node *add_binary_dot_expr(struct hlsl_ctx *ctx, struct lis
|
|||||||
|
|
||||||
if (arg1->data_type->type == HLSL_CLASS_SCALAR)
|
if (arg1->data_type->type == HLSL_CLASS_SCALAR)
|
||||||
dim = arg2->data_type->dimx;
|
dim = arg2->data_type->dimx;
|
||||||
else if (arg1->data_type->type == HLSL_CLASS_SCALAR)
|
else if (arg2->data_type->type == HLSL_CLASS_SCALAR)
|
||||||
dim = arg1->data_type->dimx;
|
dim = arg1->data_type->dimx;
|
||||||
else
|
else
|
||||||
dim = min(arg1->data_type->dimx, arg2->data_type->dimx);
|
dim = min(arg1->data_type->dimx, arg2->data_type->dimx);
|
||||||
|
@ -43,6 +43,21 @@ uniform 4 float4 10.0 11.0 12.0 13.0
|
|||||||
draw quad
|
draw quad
|
||||||
probe all rgba (92.0, 92.0, 92.0, 92.0)
|
probe all rgba (92.0, 92.0, 92.0, 92.0)
|
||||||
|
|
||||||
|
[pixel shader]
|
||||||
|
uniform float4 x;
|
||||||
|
uniform float y;
|
||||||
|
|
||||||
|
float4 main() : SV_TARGET
|
||||||
|
{
|
||||||
|
return dot(x, y);
|
||||||
|
}
|
||||||
|
|
||||||
|
[test]
|
||||||
|
uniform 0 float4 10.0 11.0 12.0 13.0
|
||||||
|
uniform 4 float4 2.0 0.0 0.0 0.0
|
||||||
|
draw quad
|
||||||
|
probe all rgba (92.0, 92.0, 92.0, 92.0)
|
||||||
|
|
||||||
[pixel shader]
|
[pixel shader]
|
||||||
uniform float x;
|
uniform float x;
|
||||||
uniform float y;
|
uniform float y;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user