Skip to content

Commit 695362a

Browse files
committed
Fix buglet in recent testshade -group change
1 parent 42ad0c8 commit 695362a

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/testshade/testshade.cpp

+11-3
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ inject_params ()
103103

104104

105105

106-
static int
107-
add_shader (int argc, const char *argv[])
106+
static void
107+
set_shadingsys_options ()
108108
{
109109
shadingsys->attribute ("debug", debug2 ? 2 : (debug ? 1 : 0));
110110
shadingsys->attribute ("compile_report", debug|debug2);
@@ -116,6 +116,14 @@ add_shader (int argc, const char *argv[])
116116
shadingsys->attribute ("lockgeom", 1);
117117
shadingsys->attribute ("debug_nan", debugnan);
118118
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 ();
119127

120128
for (int i = 0; i < argc; i++) {
121129
inject_params ();
@@ -250,11 +258,11 @@ action_groupspec (int argc, const char *argv[])
250258
groupspec += line + "\n";
251259
}
252260
in.close ();
261+
set_shadingsys_options ();
253262
}
254263
if (verbose)
255264
std::cout << "Processing group specification:\n---\n"
256265
<< groupspec << "\n---\n";
257-
add_shader (0, NULL); // becuase this is what sets the options
258266
shadergroup = shadingsys->ShaderGroupBegin (groupname, "surface", groupspec);
259267
}
260268

0 commit comments

Comments
 (0)