From: Giovanni Mascellani Subject: Re: [PATCH vkd3d v2 07/10] vkd3d-shader/hlsl: Support complex numeric initializers. Message-Id: Date: Wed, 12 Jan 2022 17:48:07 +0100 In-Reply-To: <7ddb2af1-3120-cafd-337f-1e414fc8a25b@codeweavers.com> References: <20220110193318.267854-7-fcasas@codeweavers.com> <7ddb2af1-3120-cafd-337f-1e414fc8a25b@codeweavers.com> Hi again, On 12/01/22 17:35, Giovanni Mascellani wrote: > In other words, it seems that here you have to test for > "v->initializer.args_count == 1", not "size == 1". But do your own > research. Actually, I noticed that this shader does not compile on native: --- float4 main() : SV_TARGET { float3 x = {float4(71, 72, 73, 74)}; return float4(x, 74); } --- (the only difference with my previous email is the pair of braces around the initializer) So it seems that the condition you want to discriminate on is whether the initializer is specified as a list (in which case you have to fully unpack and match in order) or as a single object (in which case you treat it as an assignment). I guess, at least. However, I think we sometimes tolerate being more permissive than native, so maybe you can ignore this corner case. Senior developers will tell. Giovanni.