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

shader_recompiler: Implement V_MUL_HI_I32 #1911

Closed
wants to merge 1 commit into from

Conversation

mikusp
Copy link
Contributor

@mikusp mikusp commented Dec 26, 2024

No description provided.

@squidbus
Copy link
Collaborator

I believe this needs a bit of extra work, SPIR-V op OpSMulExtended used by IMulExt when signed requires the output type components to be the same as the inputs. Currently it uses the type here which is made of 2 s32s, but there is nothing in place to make sure the values passed to it here are also s32. This results in the following error:

Expected both operands to be of Result Type member type: SMulExtended
  %162 = OpSMulExtended %full_result_i32x2 %u32_id_1717986919 %160

@mikusp
Copy link
Contributor Author

mikusp commented Dec 27, 2024

Thank you, I see what the problem is but I cannot see how to resolve that. IREmitter does not define a S32 type, I don't see a way to check what type a given Id was defined as, and blindly applying an OpBitcast wouldn't work either as result type must be different from the source type and if the source type is already i32 that is invalid code.

Is there any example in the code base on how to solve that?

@georgemoralis
Copy link
Collaborator

closed as inactive and missing correct implementation

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

Successfully merging this pull request may close these issues.

3 participants