[PATCH vkd3d v2 3/9] vkd3d-shader/hlsl: Abort on inconsistent types in write_sm4_cast().

Matteo Bruni matteo.mystral at gmail.com
Wed Apr 6 11:55:12 CDT 2022


On Wed, Apr 6, 2022 at 2:06 PM Giovanni Mascellani
<gmascellani at codeweavers.com> wrote:
>
> Hi,
>
> Il 05/04/22 12:47, Matteo Bruni ha scritto:
> > One option to make these asserts more descriptive is to do something like:
> >
> > assert(!"Non-numeric source expression");
>
> What I'd really use for this kind of "control should never get here"
> construct is rather a helper marked as noreturn, so you don't have to
> add some awkward "return 0" or "break" just below to silence "non-void
> function does not return" warnings or similar. But I've never decided it
> was worthy enough of my time to actually write such a patch.

Mesa has unreachable() for this kind of thing, we could probably pick
it up in vkd3d.



More information about the wine-devel mailing list