picasso icon indicating copy to clipboard operation
picasso copied to clipboard

Swizzling do not work in output registers - and only manual knows about it

Open hatmajster opened this issue 2 years ago • 2 comments

From manual:

Output parameters have an output mask instead of a swizzling mask. This allows the shader to write to some components of a register without affecting the others. In picasso, the output mask is parsed exactly the same way as the swizzling mask, enabling write access for the components that are used in it. By default it is also xyzw; that is, writing to all components.

Normally, what is not forbidden is allowed. Therefore I wrote: mov r0.yx, r1.xy But this doesn't work as expected and you can only find out by reading documentation. It will work like this as I understand: mov r0.xy, r1.xy Which is not programmer's intention.

I think changing the order of values in output register is a clear mistake and should be reported by picasso as an error (or at least warning).

hatmajster avatar Aug 28 '23 17:08 hatmajster

I can try and implement this feature, but I need some feedback - maybe I am missing something

hatmajster avatar Sep 03 '23 11:09 hatmajster

You're not missing anything, it is indeed an issue.

Tilka avatar Sep 03 '23 14:09 Tilka