2012/10/18 Henri Verbeet hverbeet@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.
On 19 October 2012 15:20, Matteo Bruni matteo.mystral@gmail.com wrote:
2012/10/18 Henri Verbeet hverbeet@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().
2012/10/19 Henri Verbeet hverbeet@gmail.com:
On 19 October 2012 15:20, Matteo Bruni matteo.mystral@gmail.com wrote:
2012/10/18 Henri Verbeet hverbeet@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().
Indeed...