Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hatmajster opened this issue Aug 28, 2023 · 2 comments

Comments

@hatmajster
Copy link

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 hatmajster changed the title Swizzling do not work in output registers Swizzling do not work in output registers - and only manual knows about it Aug 28, 2023
@hatmajster
Copy link
Author

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

@Tilka
Copy link
Contributor

Tilka commented Sep 3, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants