summaryrefslogtreecommitdiffstats
path: root/src/glsl/builtin_function.cpp
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-07-01 10:37:11 -0700
committerEric Anholt <[email protected]>2010-07-01 11:07:22 -0700
commitd925c9173009e9e5d48df30b30aaef22753183aa (patch)
treee42ee590b44d75b69fb67ee7de8b42ce05ee1c11 /src/glsl/builtin_function.cpp
parent5e4dd061d17563828bcce5525400a0ce363aa15d (diff)
glsl2: Add ir_unop_fract as an expression type.
Most backends will prefer seeing this to seeing (a - floor(a)), so represent it explicitly.
Diffstat (limited to 'src/glsl/builtin_function.cpp')
-rw-r--r--src/glsl/builtin_function.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/glsl/builtin_function.cpp b/src/glsl/builtin_function.cpp
index b7dbc6b34f5..30ba6a52677 100644
--- a/src/glsl/builtin_function.cpp
+++ b/src/glsl/builtin_function.cpp
@@ -781,22 +781,22 @@ static const char *builtins_110_fract = {
" (signature float\n"
" (parameters\n"
" (declare (in) float x))\n"
- " ((return (expression float - (var_ref x) (expression float floor (var_ref x))))))\n"
+ " ((return (expression float fract (var_ref x)))))\n"
"\n"
" (signature vec2\n"
" (parameters\n"
" (declare (in) vec2 x))\n"
- " ((return (expression vec2 - (var_ref x) (expression vec2 floor (var_ref x))))))\n"
+ " ((return (expression vec2 fract (var_ref x)))))\n"
"\n"
" (signature vec3\n"
" (parameters\n"
" (declare (in) vec3 x))\n"
- " ((return (expression vec3 - (var_ref x) (expression vec3 floor (var_ref x))))))\n"
+ " ((return (expression vec3 fract (var_ref x)))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) vec4 x))\n"
- " ((return (expression vec4 - (var_ref x) (expression vec4 floor (var_ref x))))))\n"
+ " ((return (expression vec4 fract (var_ref x)))))\n"
"))\n"
"\n"
};