[PATCH 3/5] d3dcompiler: Coerce the RHS before unwrapping swizzles.

Matteo Bruni matteo.mystral at gmail.com
Fri Jun 5 04:41:47 CDT 2020


On Thu, Jun 4, 2020 at 4:12 AM Zebediah Figura <z.figura12 at gmail.com> wrote:
>
> Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
> ---
>  dlls/d3dcompiler_43/utils.c | 43 +++++++++++--------------------------
>  1 file changed, 12 insertions(+), 31 deletions(-)

This patch is a clear improvement and the dropped FIXME() didn't
really make sense given that, if you have a swizzle on the lhs, that
means you have a vector.

Still, you can have matrix swizzles and those aren't handled correctly
yet. One nasty example (which could be a test):

float4 main() : COLOR
{
    float4x4 ret = float4x4(0.0, 0.0, 0.0, 0.0,
            0.0, 0.0, 0.0, 0.0,
            0.0, 0.0, 0.0, 0.0,
            0.0, 0.0, 0.0, 0.0);
    ret._11_22_33 = float3(0.1, 0.2, 0.3);
    return ret[0];
}

Nothing you need to care about right now, clearly (and probably not
something that you'd handle in this area of the compiler either), just
putting it out there for another day...



More information about the wine-devel mailing list