-
Notifications
You must be signed in to change notification settings - Fork 850
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
Emit OpModfStruct
for GLSL EOpModf
instead of OpModf
#3757
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
Managed to get the |
@arcady-lunarg any updates on getting this merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code actually looks fine, I don't really like the way the comments are worded though, could you please reword them?
SPIRV/GlslangToSpv.cpp
Outdated
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can be removed, the code is kind of self-explanatory
SPIRV/GlslangToSpv.cpp
Outdated
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@arcady-lunarg addressed nits as of 5c784d6 |
My attempt at fixing #3756.
Also updated the tests to account for the new type getting added.