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

Problem with UBFE overwriting own operand #44

Open
MDeiml opened this issue Oct 1, 2019 · 0 comments
Open

Problem with UBFE overwriting own operand #44

MDeiml opened this issue Oct 1, 2019 · 0 comments

Comments

@MDeiml
Copy link

MDeiml commented Oct 1, 2019

Sometimes when converting an UBFE opcode to GLSL code like this is generated:

u_xlatu0.x = bitfieldExtract(u_xlatu0.y, int(16), int(8));
u_xlatu0.y = bitfieldExtract(u_xlatu0.x, int(16), int(8));
u_xlatu0.z = bitfieldExtract(u_xlatu0.x, int(8), int(8));
u_xlatu0.w = bitfieldExtract(u_xlatu0.y, int(8), int(8));

This is wrong because u_xlatu0.y and u_xlatu0.z will always be zero.
I think this is caused by having to split the instruction into 4 calls to bitfieldExtract.

// Need to open this up, GLSL bitfieldextract uses same offset and width for all components

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

1 participant