On Wed Oct 18 20:59:26 2023 +0000, Henri Verbeet wrote:
Source width is now derived from a write mask, so additional types
were removed. Makes sense to me like this. There's perhaps an open question about how something like "mov r0.zw, r1.zw" should be represented on the IR level. I think the current MR effectively stores that as "mov r0.zw, r1.zwxx", but there's something to be said for storing it as "mov r0.zw, r1.xyzw" or "mov r0.zw, r1.xxzw" instead, which would preserve how write masks and swizzles currently work on the IR level. That's a bit moot as long as d3d-asm is the only possible target, but might become a bit more relevant if we want to start actually executing these.
I haven't checked how bad it is, but my concern for compiling to tx_1_0 is to handled exactly this mismatch of destination sizes. I'm assuming currently it's determined by return types, so e.g. dot() will use a single component. Maybe it's easy to tweak at allocation phase. My concern specifically is to awareness of such destination size behavior must come in at some point, without us having to conditionally change types everywhere.