Skip to content

Problem with UBFE overwriting own operand #44

Description

@MDeiml

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions