@@ -103,8 +103,8 @@ inject_params ()
103
103
104
104
105
105
106
- static int
107
- add_shader ( int argc, const char *argv[] )
106
+ static void
107
+ set_shadingsys_options ( )
108
108
{
109
109
shadingsys->attribute (" debug" , debug2 ? 2 : (debug ? 1 : 0 ));
110
110
shadingsys->attribute (" compile_report" , debug|debug2);
@@ -116,6 +116,14 @@ add_shader (int argc, const char *argv[])
116
116
shadingsys->attribute (" lockgeom" , 1 );
117
117
shadingsys->attribute (" debug_nan" , debugnan);
118
118
shadingsys->attribute (" debug_uninit" , debug_uninit);
119
+ }
120
+
121
+
122
+
123
+ static int
124
+ add_shader (int argc, const char *argv[])
125
+ {
126
+ set_shadingsys_options ();
119
127
120
128
for (int i = 0 ; i < argc; i++) {
121
129
inject_params ();
@@ -250,11 +258,11 @@ action_groupspec (int argc, const char *argv[])
250
258
groupspec += line + " \n " ;
251
259
}
252
260
in.close ();
261
+ set_shadingsys_options ();
253
262
}
254
263
if (verbose)
255
264
std::cout << " Processing group specification:\n ---\n "
256
265
<< groupspec << " \n ---\n " ;
257
- add_shader (0 , NULL ); // becuase this is what sets the options
258
266
shadergroup = shadingsys->ShaderGroupBegin (groupname, " surface" , groupspec);
259
267
}
260
268
0 commit comments