We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It seems like there's an issue with applying swizzles to integer literals.
The following GLSL fragment shader:
layout(binding = 0, std140) uniform ubo { int my_int; }; layout(location = 0) out ivec2 color; void main() { color = ivec2(my_int) * 2; }
Compiles to this HLSL:
cbuffer _12 : register(b0, space0) { int ubo_my_int : packoffset(c0); }; static int2 color; struct SPIRV_Cross_Output { int2 color : SV_Target0; }; void frag_main() { color = ubo_my_int.xx * 2.xx; } SPIRV_Cross_Output main() { frag_main(); SPIRV_Cross_Output stage_output; stage_output.color = color; return stage_output; }
2.xx seems like invalid syntax. It produces this error with FXC:
2.xx
C:\msys64\home\rossy\glsl\test.ps.hlsl(15,31-32): error X3000: syntax error: unexpected token 'xx'
The text was updated successfully, but these errors were encountered:
Sigh, didn't think of integers ... it works with float though ... <_< Trivial fix, but on holiday.
Sorry, something went wrong.
Great, thanks. Can confirm this fixed my bug.
No branches or pull requests
It seems like there's an issue with applying swizzles to integer literals.
The following GLSL fragment shader:
Compiles to this HLSL:
2.xx
seems like invalid syntax. It produces this error with FXC:The text was updated successfully, but these errors were encountered: