xuxiandi / angleproject

Automatically exported from code.google.com/p/angleproject
Other
0 stars 0 forks source link

incorrect HLSL translation for mod(vec2,vec2) #258

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
GLSL provides both mod(vector, float) and mod(vector, vector) utility 
functions. ANGLE translates both to mod(vector, float).

Attached patch should fix the issue.

Original issue reported on code.google.com by sam@hocevar.net on 24 Nov 2011 at 11:00

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for reporting this and providing a patch! It generally looks good, but 
to avoid adding unused function definitions to the HLSL perhaps you could split 
the mUsesMod# flags into scalar and vector variants?

A second patch for that would be ok. I'll see what I can do to get the first 
one in soon...

Original comment by nicolas....@gmail.com on 24 Nov 2011 at 4:11

GoogleCodeExporter commented 9 years ago
Sure! It was actually my first version, then I decided the granularity was 
maybe a bit too high. But here it is!

Original comment by sam@hocevar.net on 24 Nov 2011 at 4:56

Attachments:

GoogleCodeExporter commented 9 years ago
Committed in r890.  Thanks for the patch!

Original comment by dan...@transgaming.com on 24 Nov 2011 at 10:36

GoogleCodeExporter commented 9 years ago

Original comment by dan...@transgaming.com on 24 Nov 2011 at 10:36