From: Kenneth Graunke Date: Wed, 9 Jun 2010 21:06:56 +0000 (-0700) Subject: Add a completely bogus implementation of the noise[1234] builtins. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c476ba8fe26c499d4cdbc686e45ffe548fe65cd8;p=mesa.git Add a completely bogus implementation of the noise[1234] builtins. idr suggested this. Eventually we will need a real one. --- diff --git a/builtin_function.cpp b/builtin_function.cpp index 083fd314c75..bc0409035a0 100644 --- a/builtin_function.cpp +++ b/builtin_function.cpp @@ -1419,6 +1419,85 @@ static const char *builtins_110_mod = { "))\n" }; +static const char *builtins_110_noise_fake = { + "((function noise1\n" + " (signature float\n" + " (parameters\n" + " (declare (in) float x))\n" + " ((return (constant float (0)))))\n" + " (signature float\n" + " (parameters\n" + " (declare (in) vec2 x))\n" + " ((return (constant float (0)))))\n" + " (signature float\n" + " (parameters\n" + " (declare (in) vec3 x))\n" + " ((return (constant float (0)))))\n" + " (signature float\n" + " (parameters\n" + " (declare (in) vec4 x))\n" + " ((return (constant float (0)))))\n" + " )\n" + "\n" + " (function noise2\n" + " (signature vec2\n" + " (parameters\n" + " (declare (in) float x))\n" + " ((return (constant vec2 (0 0)))))\n" + " (signature vec2\n" + " (parameters\n" + " (declare (in) vec2 x))\n" + " ((return (constant vec2 (0 0)))))\n" + " (signature vec2\n" + " (parameters\n" + " (declare (in) vec3 x))\n" + " ((return (constant vec2 (0 0)))))\n" + " (signature vec2\n" + " (parameters\n" + " (declare (in) vec4 x))\n" + " ((return (constant vec2 (0 0)))))\n" + " )\n" + "\n" + " (function noise3\n" + " (signature vec3\n" + " (parameters\n" + " (declare (in) float x))\n" + " ((return (constant vec3 (0 0 0)))))\n" + " (signature vec3\n" + " (parameters\n" + " (declare (in) vec2 x))\n" + " ((return (constant vec3 (0 0 0)))))\n" + " (signature vec3\n" + " (parameters\n" + " (declare (in) vec3 x))\n" + " ((return (constant vec3 (0 0 0)))))\n" + " (signature vec3\n" + " (parameters\n" + " (declare (in) vec4 x))\n" + " ((return (constant vec3 (0 0 0)))))\n" + " )\n" + "\n" + " (function noise4\n" + " (signature vec4\n" + " (parameters\n" + " (declare (in) float x))\n" + " ((return (constant vec4 (0 0 0 0)))))\n" + " (signature vec4\n" + " (parameters\n" + " (declare (in) vec2 x))\n" + " ((return (constant vec4 (0 0 0 0)))))\n" + " (signature vec4\n" + " (parameters\n" + " (declare (in) vec3 x))\n" + " ((return (constant vec4 (0 0 0 0)))))\n" + " (signature vec4\n" + " (parameters\n" + " (declare (in) vec4 x))\n" + " ((return (constant vec4 (0 0 0 0)))))\n" + " )\n" + ")\n" +}; + static const char *builtins_110_normalize = { "((function normalize\n" " (signature float\n" @@ -2293,6 +2372,7 @@ static const char *functions_for_110 [] = { builtins_110_min, builtins_110_mix, builtins_110_mod, + builtins_110_noise_fake, builtins_110_normalize, builtins_110_not, builtins_110_notEqual, diff --git a/builtins/110/noise_fake b/builtins/110/noise_fake new file mode 100644 index 00000000000..bcfb17b04b8 --- /dev/null +++ b/builtins/110/noise_fake @@ -0,0 +1,76 @@ +((function noise1 + (signature float + (parameters + (declare (in) float x)) + ((return (constant float (0))))) + (signature float + (parameters + (declare (in) vec2 x)) + ((return (constant float (0))))) + (signature float + (parameters + (declare (in) vec3 x)) + ((return (constant float (0))))) + (signature float + (parameters + (declare (in) vec4 x)) + ((return (constant float (0))))) + ) + + (function noise2 + (signature vec2 + (parameters + (declare (in) float x)) + ((return (constant vec2 (0 0))))) + (signature vec2 + (parameters + (declare (in) vec2 x)) + ((return (constant vec2 (0 0))))) + (signature vec2 + (parameters + (declare (in) vec3 x)) + ((return (constant vec2 (0 0))))) + (signature vec2 + (parameters + (declare (in) vec4 x)) + ((return (constant vec2 (0 0))))) + ) + + (function noise3 + (signature vec3 + (parameters + (declare (in) float x)) + ((return (constant vec3 (0 0 0))))) + (signature vec3 + (parameters + (declare (in) vec2 x)) + ((return (constant vec3 (0 0 0))))) + (signature vec3 + (parameters + (declare (in) vec3 x)) + ((return (constant vec3 (0 0 0))))) + (signature vec3 + (parameters + (declare (in) vec4 x)) + ((return (constant vec3 (0 0 0))))) + ) + + (function noise4 + (signature vec4 + (parameters + (declare (in) float x)) + ((return (constant vec4 (0 0 0 0))))) + (signature vec4 + (parameters + (declare (in) vec2 x)) + ((return (constant vec4 (0 0 0 0))))) + (signature vec4 + (parameters + (declare (in) vec3 x)) + ((return (constant vec4 (0 0 0 0))))) + (signature vec4 + (parameters + (declare (in) vec4 x)) + ((return (constant vec4 (0 0 0 0))))) + ) +)