vkd3d-shader/fx: Make sure to set error message for unimplemented cases.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Nikolay Sivov 2024-02-23 14:55:34 +01:00 committed by Alexandre Julliard
parent 8c5db57ea7
commit 437ef0896f
Notes: Alexandre Julliard 2024-03-06 23:29:49 +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/676

View File

@ -284,6 +284,7 @@ static uint32_t get_fx_4_numeric_type_description(const struct hlsl_type *type,
[HLSL_TYPE_UINT ] = 3,
[HLSL_TYPE_BOOL ] = 4,
};
struct hlsl_ctx *ctx = fx->ctx;
uint32_t value = 0;
switch (type->class)
@ -294,8 +295,7 @@ static uint32_t get_fx_4_numeric_type_description(const struct hlsl_type *type,
value |= numeric_type_class[type->class];
break;
default:
FIXME("Unexpected type class %u.\n", type->class);
set_status(fx, VKD3D_ERROR_NOT_IMPLEMENTED);
hlsl_fixme(ctx, &ctx->location, "Not implemented for type class %u.\n", type->class);
return 0;
}
@ -308,8 +308,7 @@ static uint32_t get_fx_4_numeric_type_description(const struct hlsl_type *type,
value |= (numeric_base_type[type->base_type] << NUMERIC_BASE_TYPE_SHIFT);
break;
default:
FIXME("Unexpected base type %u.\n", type->base_type);
set_status(fx, VKD3D_ERROR_NOT_IMPLEMENTED);
hlsl_fixme(ctx, &ctx->location, "Not implemented for base type %u.\n", type->base_type);
return 0;
}
@ -358,6 +357,7 @@ static uint32_t write_fx_4_type(const struct hlsl_type *type, struct fx_write_co
[HLSL_SAMPLER_DIM_BUFFER] = "RWBuffer",
[HLSL_SAMPLER_DIM_STRUCTURED_BUFFER] = "RWStructuredBuffer",
};
struct hlsl_ctx *ctx = fx->ctx;
/* Resolve arrays to element type and number of elements. */
if (type->class == HLSL_CLASS_ARRAY)
@ -386,8 +386,7 @@ static uint32_t write_fx_4_type(const struct hlsl_type *type, struct fx_write_co
put_u32_unaligned(buffer, variable_type[type->class]);
break;
default:
FIXME("Writing type class %u is not implemented.\n", type->class);
set_status(fx, VKD3D_ERROR_NOT_IMPLEMENTED);
hlsl_fixme(ctx, &ctx->location, "Writing type class %u is not implemented.\n", type->class);
return 0;
}
@ -465,8 +464,7 @@ static uint32_t write_fx_4_type(const struct hlsl_type *type, struct fx_write_co
put_u32_unaligned(buffer, uav_type[type->sampler_dim]);
break;
default:
FIXME("Object type %u is not supported.\n", type->base_type);
set_status(fx, VKD3D_ERROR_NOT_IMPLEMENTED);
hlsl_fixme(ctx, &ctx->location, "Object type %u is not supported.\n", type->base_type);
return 0;
}
}