Emit OpModfStruct for GLSL EOpModf instead of OpModf #3757
Merged
Conversation
07489fb to
b3fc56a
Compare
OpModfStruct for GLSL EOpModf instead of OpModf (fixes #3756)OpModfStruct for GLSL EOpModf instead of OpModf
This comment was marked as resolved.
This comment was marked as resolved.
6511ab2 to
ec04400
Compare
Contributor
Author
|
Managed to get the |
Contributor
Author
|
@arcady-lunarg any updates on getting this merged? |
arcady-lunarg
requested changes
Oct 21, 2024
Contributor
arcady-lunarg
left a comment
There was a problem hiding this comment.
The code actually looks fine, I don't really like the way the comments are worded though, could you please reword them?
| assert(builder.isFloatType(builder.getScalarTypeId(typeId0))); | ||
| int width = builder.getScalarTypeWidth(typeId0); | ||
| if (width == 16) | ||
| // Using 16-bit whole number operand, enable extension E_SPV_AMD_gpu_shader_half_float |
Contributor
There was a problem hiding this comment.
I think this can be removed, the code is kind of self-explanatory
| if (width == 16) | ||
| // Using 16-bit whole number operand, enable extension E_SPV_AMD_gpu_shader_half_float | ||
| builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float); | ||
| // The two members of the returned struct and x must all be the same type. |
Contributor
There was a problem hiding this comment.
This comment should maybe be more like "The returned struct has two members of the same type as the first argument"
ec04400 to
5c784d6
Compare
Contributor
Author
|
@arcady-lunarg addressed nits as of 5c784d6 |
arcady-lunarg
approved these changes
Oct 25, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
My attempt at fixing #3756.
Also updated the tests to account for the new type getting added.