Skip to content

Commit e2d7c5d

Browse files
committed
Merge remote-tracking branch 'aswf/main' into mac_ci_rendering
2 parents 9ed89da + 6029ef4 commit e2d7c5d

4 files changed

Lines changed: 9 additions & 18 deletions

File tree

source/MaterialXGenOsl/CMakeLists.txt

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
1-
file(GLOB_RECURSE materialx_source
2-
"${CMAKE_CURRENT_SOURCE_DIR}/OslShaderGenerator.cpp"
3-
"${CMAKE_CURRENT_SOURCE_DIR}/OslSyntax.cpp"
4-
"${CMAKE_CURRENT_SOURCE_DIR}/OslNetworkShaderGenerator.cpp"
5-
"${CMAKE_CURRENT_SOURCE_DIR}/OslNetworkSyntax.cpp"
6-
"${CMAKE_CURRENT_SOURCE_DIR}/Nodes/OsoNode.cpp")
7-
8-
file(GLOB_RECURSE materialx_headers
9-
"${CMAKE_CURRENT_SOURCE_DIR}/OslShaderGenerator.h"
10-
"${CMAKE_CURRENT_SOURCE_DIR}/OslSyntax.h"
11-
"${CMAKE_CURRENT_SOURCE_DIR}/OslNetworkShaderGenerator.h"
12-
"${CMAKE_CURRENT_SOURCE_DIR}/OslNetworkSyntax.h"
13-
"${CMAKE_CURRENT_SOURCE_DIR}/Nodes/OsoNode.h"
14-
"${CMAKE_CURRENT_SOURCE_DIR}/Export.h")
1+
file(GLOB_RECURSE materialx_source "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
2+
file(GLOB_RECURSE materialx_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h*")
3+
4+
list(REMOVE_ITEM materialx_source "${CMAKE_CURRENT_SOURCE_DIR}/LibsToOso.cpp")
155

166
mx_add_library(MaterialXGenOsl
177
SOURCE_FILES
@@ -25,7 +15,7 @@ mx_add_library(MaterialXGenOsl
2515
MATERIALX_GENOSL_EXPORTS)
2616

2717
# FIXME: LibsToOso has a dependency on the OslRenderer.
28-
if (MATERIALX_BUILD_RENDER)
18+
if (MATERIALX_BUILD_OSOS AND MATERIALX_BUILD_RENDER)
2919
file(GLOB GenNodes_SRC "${CMAKE_CURRENT_SOURCE_DIR}/LibsToOso.cpp")
3020

3121
set(MATERIALX_LIBRARIES

source/MaterialXGenOsl/LibsToOso.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ int main(int argc, char* const argv[])
335335
mx::NodeGraphPtr librariesDocGraph = librariesDoc->addNodeGraph("librariesDocGraph");
336336

337337
// Loop over all the `NodeDef` gathered in our documents from the provided libraries.
338-
for (const mx::NodeDefPtr& nodeDef : librariesDoc->getNodeDefs())
338+
for (mx::NodeDefPtr nodeDef : librariesDoc->getNodeDefs())
339339
{
340340
std::string nodeName = nodeDef->getName();
341341

source/MaterialXRenderOsl/OslRenderer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ OslRendererPtr OslRenderer::create(unsigned int width, unsigned int height, Imag
2828
OslRenderer::OslRenderer(unsigned int width, unsigned int height, Image::BaseType baseType) :
2929
ShaderRenderer(width, height, baseType),
3030
_useTestRender(true),
31+
_useOSLCmdStr(false),
3132
_raysPerPixelLit(1),
3233
_raysPerPixelUnlit(1)
3334
{

source/MaterialXTest/MaterialXRenderMsl/RenderMsl.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ bool runRenderer(const std::string& shaderName,
165165
std::ostream& log,
166166
const GenShaderUtil::TestSuiteOptions& testOptions,
167167
RenderUtil::RenderProfileTimes& profileTimes,
168-
const mx::FileSearchPath& /*imageSearchPath*/,
168+
const mx::FileSearchPath& imageSearchPath,
169169
const std::string& outputPath,
170170
mx::ImageVec* imageVec)
171171
{
@@ -351,7 +351,7 @@ bool runRenderer(const std::string& shaderName,
351351

352352
{
353353
mx::ScopedTimer renderTimer(&profileTimes.languageTimes.renderTime);
354-
_renderer->getImageHandler()->setSearchPath(mx::getDefaultDataSearchPath());
354+
_renderer->getImageHandler()->setSearchPath(imageSearchPath);
355355
unsigned int width = (unsigned int) testOptions.renderSize[0] * supersampleFactor;
356356
unsigned int height = (unsigned int) testOptions.renderSize[1] * supersampleFactor;
357357
_renderer->setSize(width, height);

0 commit comments

Comments
 (0)