Skip to content

Commit

Permalink
Fix buglet in recent testshade -group change
Browse files Browse the repository at this point in the history
  • Loading branch information
lgritz committed Dec 4, 2014
1 parent 42ad0c8 commit 695362a
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/testshade/testshade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ inject_params ()



static int
add_shader (int argc, const char *argv[])
static void
set_shadingsys_options ()
{
shadingsys->attribute ("debug", debug2 ? 2 : (debug ? 1 : 0));
shadingsys->attribute ("compile_report", debug|debug2);
Expand All @@ -116,6 +116,14 @@ add_shader (int argc, const char *argv[])
shadingsys->attribute ("lockgeom", 1);
shadingsys->attribute ("debug_nan", debugnan);
shadingsys->attribute ("debug_uninit", debug_uninit);
}



static int
add_shader (int argc, const char *argv[])
{
set_shadingsys_options ();

for (int i = 0; i < argc; i++) {
inject_params ();
Expand Down Expand Up @@ -250,11 +258,11 @@ action_groupspec (int argc, const char *argv[])
groupspec += line + "\n";
}
in.close ();
set_shadingsys_options ();
}
if (verbose)
std::cout << "Processing group specification:\n---\n"
<< groupspec << "\n---\n";
add_shader (0, NULL); // becuase this is what sets the options
shadergroup = shadingsys->ShaderGroupBegin (groupname, "surface", groupspec);
}

Expand Down

0 comments on commit 695362a

Please sign in to comment.