mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Lower narrowing casts to swizzles.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com> Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
0a4e948453
commit
a33439f1a0
@@ -1298,9 +1298,8 @@ static void write_sm4_expr(struct hlsl_ctx *ctx,
|
||||
{
|
||||
const struct hlsl_type *src_type = arg1->data_type;
|
||||
|
||||
/* Narrowing casts need to be lowered. */
|
||||
if (src_type->dimx != expr->node.data_type->dimx)
|
||||
hlsl_fixme(ctx, expr->node.loc, "Narrowing cast.\n");
|
||||
/* Narrowing casts were already lowered. */
|
||||
assert(src_type->dimx == expr->node.data_type->dimx);
|
||||
|
||||
switch (src_type->base_type)
|
||||
{
|
||||
@@ -1388,9 +1387,8 @@ static void write_sm4_expr(struct hlsl_ctx *ctx,
|
||||
{
|
||||
const struct hlsl_type *src_type = arg1->data_type;
|
||||
|
||||
/* Narrowing casts need to be lowered. */
|
||||
if (src_type->dimx != expr->node.data_type->dimx)
|
||||
hlsl_fixme(ctx, expr->node.loc, "Narrowing cast.");
|
||||
/* Narrowing casts were already lowered. */
|
||||
assert(src_type->dimx == expr->node.data_type->dimx);
|
||||
|
||||
switch (src_type->base_type)
|
||||
{
|
||||
@@ -1433,9 +1431,8 @@ static void write_sm4_expr(struct hlsl_ctx *ctx,
|
||||
{
|
||||
const struct hlsl_type *src_type = arg1->data_type;
|
||||
|
||||
/* Narrowing casts need to be lowered. */
|
||||
if (src_type->dimx != expr->node.data_type->dimx)
|
||||
hlsl_fixme(ctx, expr->node.loc, "SM4 narrowing cast.\n");
|
||||
/* Narrowing casts were already lowered. */
|
||||
assert(src_type->dimx == expr->node.data_type->dimx);
|
||||
|
||||
switch (src_type->base_type)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user