[PATCH 3/5] wined3d: Implement WINED3DSIH_ROUND_NI in the GLSL shader backend.
matteo.mystral at gmail.com
Fri Oct 19 08:35:27 CDT 2012
2012/10/19 Henri Verbeet <hverbeet at gmail.com>:
> On 19 October 2012 15:20, Matteo Bruni <matteo.mystral at gmail.com> wrote:
>> 2012/10/18 Henri Verbeet <hverbeet at codeweavers.com>:
>>> dlls/wined3d/glsl_shader.c | 3 ++-
>>> 1 files changed, 2 insertions(+), 1 deletions(-)
>>> diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
>>> index 57119e1..993b547 100644
>>> --- a/dlls/wined3d/glsl_shader.c
>>> +++ b/dlls/wined3d/glsl_shader.c
>>> @@ -2530,6 +2530,7 @@ static void shader_glsl_map2gl(const struct wined3d_shader_instruction *ins)
>>> case WINED3DSIH_EXP: instruction = "exp2"; break;
>>> case WINED3DSIH_DSX: instruction = "dFdx"; break;
>>> case WINED3DSIH_DSY: instruction = "ycorrection.y * dFdy"; break;
>>> + case WINED3DSIH_ROUND_NI: instruction = "floor"; break;
>> Hmm, does ROUND_NI really translate to floor() (as opposed to round())
>> or is that because round() is not supported in GLSL 1.20?
>> In the latter case maybe a FIXME would help.
> ROUND_NI rounds toward -INF, which is what floor() does. You're
> probably thinking of ROUND_NE which would translate to roundEven().
More information about the wine-devel