From: Brian Paul Date: Mon, 11 Aug 2008 22:13:39 +0000 (-0600) Subject: mesa: glsl: use SGE instead of SGT in step() functions X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2023f7f91d8c40bca54db972f836c969c82ffbca;p=mesa.git mesa: glsl: use SGE instead of SGT in step() functions --- diff --git a/src/mesa/shader/slang/library/slang_common_builtin.gc b/src/mesa/shader/slang/library/slang_common_builtin.gc index 3182841b1f5..45504f40894 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin.gc +++ b/src/mesa/shader/slang/library/slang_common_builtin.gc @@ -1056,45 +1056,45 @@ vec4 mix(const vec4 x, const vec4 y, const vec4 a) } -//// step (untested) +//// step float step(const float edge, const float x) { - __asm vec4_sgt __retVal.x, x, edge; + __asm vec4_sge __retVal, x, edge; } vec2 step(const vec2 edge, const vec2 x) { - __asm vec4_sgt __retVal.xy, x, edge; + __asm vec4_sge __retVal.xy, x, edge; } vec3 step(const vec3 edge, const vec3 x) { - __asm vec4_sgt __retVal.xyz, x, edge; + __asm vec4_sge __retVal.xyz, x, edge; } vec4 step(const vec4 edge, const vec4 x) { - __asm vec4_sgt __retVal, x, edge; + __asm vec4_sge __retVal, x, edge; } vec2 step(const float edge, const vec2 v) { - __asm vec4_sgt __retVal.xy, v, edge.xx; + __asm vec4_sge __retVal.xy, v, edge; } vec3 step(const float edge, const vec3 v) { - __asm vec4_sgt __retVal.xyz, v, edge.xxx; + __asm vec4_sge __retVal.xyz, v, edge; } vec4 step(const float edge, const vec4 v) { - __asm vec4_sgt __retVal, v, edge.xxxx; + __asm vec4_sge __retVal, v, edge; } -//// smoothstep (untested) +//// smoothstep float smoothstep(const float edge0, const float edge1, const float x) {