Skip to content

Commit 6ef53cc

Browse files
marsupiallgritz
authored andcommitted
Respect lockgeom default when building from commands. Remove ASSERT during ReParameter (#1032)
1 parent 9b5cc9b commit 6ef53cc

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/liboslexec/shadingsys.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2323,7 +2323,7 @@ ShadingSystemImpl::ShaderGroupBegin (string_view groupname,
23232323
}
23242324
}
23252325
string_view paramname (paramname_string);
2326-
int lockgeom = true;
2326+
int lockgeom = m_lockgeom_default;
23272327
// For speed, reserve space. Note that for "unsized" arrays, we only
23282328
// preallocate 1 slot and let it grow as needed. That's ok. For
23292329
// everything else, we will reserve the right amount up front.
@@ -2512,8 +2512,13 @@ ShadingSystemImpl::ReParameter (ShaderGroup &group, string_view layername_,
25122512
int paramindex = layer->findparam (ustring(paramname));
25132513
if (paramindex < 0)
25142514
return false; // could not find the named parameter
2515+
25152516
Symbol *sym = layer->symbol (paramindex);
2516-
ASSERT (sym != NULL);
2517+
if (!sym) {
2518+
// Can have a paramindex >= 0, but no symbol when it's a master-symbol
2519+
DASSERT(layer->mastersymbol(paramindex) && "No symbol for paramindex");
2520+
return false;
2521+
}
25172522

25182523
// Check for mismatch versus previously-declared type
25192524
if (!equivalent(sym->typespec(), type))

0 commit comments

Comments
 (0)