[PATCH 1/1] wined3d: Introduce a helper function for printing floats in GLSL shaders.
stefandoesinger at gmail.com
Tue Jun 11 02:52:00 CDT 2013
Am 11.06.2013 um 09:27 schrieb Henri Verbeet:
> We always want to use '.' as decimal separator in GLSL, instead of the locale
> specific one. Reported on IRC.
I think this should be added as a code comment above shader_glsl_ftoa, I don't think the reason why we need our own conversion function is obvious.
The ARB shader backend will need this as well, but I can take care of this. What external software triggers this behavior?
> case WINED3D_DATA_FLOAT:
> - sprintf(register_name, "%.8e", *(const float *)reg->immconst_data);
> + shader_glsl_ftoa(*(const float *)reg->immconst_data, register_name);
shader_glsl_ftoa doesn't handle inf or nan. I assume that's intentional because they would only trigger a parser error.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the wine-devel