[PATCH vkd3d v2 3/9] vkd3d-shader/hlsl: Abort on inconsistent types in write_sm4_cast().
Matteo Bruni
matteo.mystral at gmail.com
Tue Apr 5 05:47:06 CDT 2022
On Mon, Mar 28, 2022 at 10:59 AM Giovanni Mascellani
<gmascellani at codeweavers.com> wrote:
>
> Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>
> ---
> v2:
> * Renamed (it was "Abort when an unexpected type appears.")
> ---
> libs/vkd3d-shader/hlsl_sm4.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/libs/vkd3d-shader/hlsl_sm4.c b/libs/vkd3d-shader/hlsl_sm4.c
> index fa845dc4..af5c777f 100644
> --- a/libs/vkd3d-shader/hlsl_sm4.c
> +++ b/libs/vkd3d-shader/hlsl_sm4.c
> @@ -1468,7 +1468,7 @@ static void write_sm4_cast(struct hlsl_ctx *ctx,
> break;
>
> default:
> - break;
> + assert(0);
> }
> break;
>
One option to make these asserts more descriptive is to do something like:
assert(!"Non-numeric source expression");
More information about the wine-devel
mailing list