On 14 June 2016 at 10:09, Józef Kucia joseph.kucia@gmail.com wrote:
In my opinion, we do not want to solve the issue with immediate constant buffers this way. However, this patch might still be useful. Some games (Magicka 2) use shaders which contain NaN values in immediate constants. This patch represents a one way to solve the issue with NaN values in immediate constants. If we decide that we want to apply this change we should be more careful though. We probably want to use this for SM4+ shaders only, or use it only when GL_ARB_shader_bit_encoding is available.
Note that SM3 and earlier shaders have a similar issue. (In particular, see "lconst_inf_or_nan" and "load_local_constsF" in struct wined3d_shader.) It seems tempting to always use unsigned integers for immediate values if we have ARB_shader_bit_encoding.