Skip to content

Commit ca0c6df

Browse files
authored
Fix slightly broken overload resolution (#845)
1 parent 967960d commit ca0c6df

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

src/shaders/stdosl.h

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,17 @@ PERCOMP2 (atan2)
9696
PERCOMP1 (cosh)
9797
PERCOMP1 (sinh)
9898
PERCOMP1 (tanh)
99-
PERCOMP2F (pow)
100-
PERCOMP2 (pow)
99+
100+
normal pow (normal x, normal y) BUILTIN;
101+
vector pow (vector x, vector y) BUILTIN;
102+
point pow (point x, point y) BUILTIN;
103+
color pow (color x, color y) BUILTIN;
104+
normal pow (normal x, float y) BUILTIN;
105+
vector pow (vector x, float y) BUILTIN;
106+
point pow (point x, float y) BUILTIN;
107+
color pow (color x, float y) BUILTIN;
108+
float pow (float x, float y) BUILTIN;
109+
101110
PERCOMP1 (exp)
102111
PERCOMP1 (exp2)
103112
PERCOMP1 (expm1)
@@ -122,8 +131,17 @@ PERCOMP1 (floor)
122131
PERCOMP1 (ceil)
123132
PERCOMP1 (round)
124133
PERCOMP1 (trunc)
125-
PERCOMP2 (fmod)
126-
PERCOMP2F (fmod)
134+
135+
normal fmod (normal x, normal y) BUILTIN;
136+
vector fmod (vector x, vector y) BUILTIN;
137+
point fmod (point x, point y) BUILTIN;
138+
color fmod (color x, color y) BUILTIN;
139+
normal fmod (normal x, float y) BUILTIN;
140+
vector fmod (vector x, float y) BUILTIN;
141+
point fmod (point x, float y) BUILTIN;
142+
color fmod (color x, float y) BUILTIN;
143+
float fmod (float x, float y) BUILTIN;
144+
127145
int mod (int a, int b) { return a - b*(int)floor(a/b); }
128146
point mod (point a, point b) { return a - b*floor(a/b); }
129147
vector mod (vector a, vector b) { return a - b*floor(a/b); }

0 commit comments

Comments
 (0)