Skip to content

Commit c5a355a

Browse files
authored
Merge pull request #523 from GPUOpen-LibrariesAndSDKs/develop
Develop
2 parents 6b1db21 + 31eb1da commit c5a355a

82 files changed

Lines changed: 3921 additions & 1031 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
build/*
2-
pxr/imaging/plugin/hdRpr/python/__pycache__/
2+
pxr/imaging/plugin/hdRpr/python/__pycache__/
3+
.vscode

CHANGELOG.MD

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
# Change Log
22

3+
## Version 2.2
4+
### New Features:
5+
- Support of Houdini 19. Houdini 19 adds MaterialX nodes which Radeon ProRender supports through the plug-in.
6+
- Updates to the Render Quality modes:
7+
- RPR Interactive is a new mode supporting GPUs which use the Vulkan ray tracing extension, and is optimized for fast viewport rendering;
8+
- RPR Final, previously Full” mode. It is intended “” for final rendering the utmost physical correctness and image quality;
9+
- Both modes render similar images;
10+
- Both modes support full MaterialX shader networks.
11+
12+
### Bugs Fixed
13+
- Support of camera aperture offset has been added.
14+
- Multiple render devices as well as CPU + GPU rendering can now be selected.
15+
- Single color VDB volumes now work using the “gain” parameter.
16+
- The performance of rendering in the RPR Final mode using adaptive sampling has been improved by optimizing the active pixels check.
17+
- The new Gamma Tonemap filter has been added.
18+
- A setting for using UV to generate Outline renders has been added.
19+
- An issue of incorrect Subsurface Scattering on Vega GPUS has been added.
20+
- Black rendering of toon shaders on macOS has been fixed.
21+
- A crash that could occur when processing emission shaders objects with subdivision added has been eliminated.
22+
- The startup time for CPU rendering has been reduced.
23+
- Low utilization on macOS with CPU + GPU rendering has been eliminated.
24+
- Performance in scenes with multiple transparent materials has been improved.
25+
- An issue with artifacts in alpha texture masks has been fixed.
26+
- The render performance on Vega and Polaris GPUs has been improved.
27+
- Particle motion blur on GPUs has been fixed.
28+
- A crash that could occur when using .tif textures with zip compression has been eliminated.
29+
- An issue with emission shaders disappearing in volume objects has been eliminated.
30+
31+
332
## Version 2.1
433
### New Features:
534
- Subsurface Scattering and Volume shaders now work in RPR 2.0. This allows the rendering of organic materials, such as skin, which absorb light into their interior.

INSTALL.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ Add a new Houdini package with such configuration json:
99
{
1010
"env":[
1111
{
12-
"RPR":"path-to-the-package"
12+
"HDRPR_DIR":"path-to-the-package"
1313
},
1414
{
15-
"HOUDINI_PATH":"$RPR/houdini"
15+
"HOUDINI_PATH":"$HDRPR_DIR/houdini"
1616
},
1717
{
18-
"PATH":"$RPR/lib"
18+
"PATH":"$HDRPR_DIR/lib"
1919
},
2020
{
21-
"PYTHONPATH":"$RPR/lib/python"
21+
"PYTHONPATH":"$HDRPR_DIR/lib/python"
2222
}
2323
]
2424
}
@@ -35,7 +35,6 @@ More info here https://www.sidefx.com/docs/houdini/ref/plugins.html
3535

3636
Here and next, HDRPR_PACKAGE_DIR is a path to the root of the package.
3737

38-
* Set `RPR` environment variable to `HDRPR_PACKAGE_DIR`
3938
* Add `HDRPR_PACKAGE_DIR/plugin` path entry to the `PXR_PLUGINPATH_NAME` environment variable
4039
* Add `HDRPR_PACKAGE_DIR/lib/python` path entry to the `PYTHONPATH` environment variable
4140
* Windows only: add the `HDRPR_PACKAGE_DIR/lib` path entry to the `PATH` environment variable

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Cloning into 'RadeonProRenderUSD'...
5050

5151
Provide USD in one of two ways:
5252

53-
* An installation of USD. Define pxr_DIR to point to it when running cmake, if required. You can download USD to build yourself from [GitHub](https://www.github.com/PixarAnimationStudios/USD).
53+
* An installation of USD. Define pxr_DIR to point to it when running cmake, if required. You can download USD to build yourself from [GitHub](https://www.github.com/PixarAnimationStudios/USD). It should be built with OpenEXR libraries and usdGenSchema tool.
5454
* The USD which is provided with Houdini. The HFS environment variable should point to the Houdini installation (the correct way is to run cmake from Houdini's `Command Line Tools` or by sourcing `houdini_setup`). You can download Houdini installer from [Downloads | SideFX](https://www.sidefx.com/download).
5555

5656
##### MaterialX Component

cmake/defaults/Packages.cmake

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,22 @@ if(NOT pxr_FOUND AND NOT HoudiniUSD_FOUND AND NOT USDMonolithic_FOUND)
5454
message(FATAL_ERROR "Required: USD install or Houdini with included USD.")
5555
endif()
5656

57+
if(NOT HoudiniUSD_FOUND)
58+
list(APPEND CMAKE_PREFIX_PATH ${pxr_DIR})
59+
find_program(USD_SCHEMA_GENERATOR
60+
NAMES usdGenSchema.py usdGenSchema
61+
PATHS ${pxr_DIR}/bin
62+
REQUIRED
63+
NO_DEFAULT_PATH)
64+
if(USD_SCHEMA_GENERATOR)
65+
list(PREPEND USD_SCHEMA_GENERATOR python)
66+
endif()
67+
endif()
68+
69+
if(NOT USD_SCHEMA_GENERATOR)
70+
message(FATAL_ERROR "Failed to find usd schema generator - usdGenSchema")
71+
endif()
72+
5773
find_package(Rpr REQUIRED)
5874
find_package(Rif REQUIRED)
5975

@@ -69,13 +85,25 @@ set(PXR_THREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}")
6985

7086
if(HoudiniUSD_FOUND)
7187
set(HOUDINI_ROOT "$ENV{HFS}" CACHE PATH "Houdini installation dir")
72-
find_package(Houdini REQUIRED CONFIG PATHS ${HOUDINI_ROOT}/toolkit/cmake)
88+
set(HOUDINI_CONFIG_DIR ${HOUDINI_ROOT}/toolkit/cmake)
89+
if(APPLE)
90+
file(COPY
91+
${HOUDINI_ROOT}/toolkit/cmake/HoudiniConfigVersion.cmake
92+
DESTINATION
93+
${CMAKE_CURRENT_BINARY_DIR})
94+
file(READ ${HOUDINI_ROOT}/toolkit/cmake/HoudiniConfig.cmake HOUDINI_CONFIG)
95+
string(REPLACE "_houdini_use_framework TRUE" "_houdini_use_framework FALSE" HOUDINI_CONFIG "${HOUDINI_CONFIG}")
96+
string(REPLACE "\${CMAKE_CURRENT_LIST_DIR}" "\${HOUDINI_ROOT}/toolkit/cmake" HOUDINI_CONFIG "${HOUDINI_CONFIG}")
97+
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/HoudiniConfig.cmake "${HOUDINI_CONFIG}")
98+
set(HOUDINI_CONFIG_DIR ${CMAKE_CURRENT_BINARY_DIR})
99+
endif()
100+
find_package(Houdini REQUIRED CONFIG PATHS ${HOUDINI_CONFIG_DIR})
73101

74102
set(OPENEXR_LOCATION ${Houdini_USD_INCLUDE_DIR})
75103
set(OPENEXR_LIB_LOCATION ${Houdini_LIB_DIR})
76104
else()
77105
# We are using python to generate source files
78-
find_package(PythonInterp 2.7 REQUIRED)
106+
find_package(PythonInterp 2.7)
79107
endif()
80108

81109
if (NOT PXR_MALLOC_LIBRARY)
@@ -84,7 +112,13 @@ if (NOT PXR_MALLOC_LIBRARY)
84112
endif()
85113
endif()
86114

87-
find_package(MaterialX QUIET)
115+
if(NOT MaterialX_FOUND)
116+
find_package(MaterialX QUIET)
117+
endif()
118+
119+
if(MaterialX_FOUND)
120+
set(RPR_DISABLE_CUSTOM_MATERIALX_LOADER ON)
121+
endif()
88122

89123
if(RPR_ENABLE_VULKAN_INTEROP_SUPPORT)
90124
find_package(Vulkan REQUIRED)

cmake/defaults/Version.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@
2424
# Versioning information
2525
set(HD_RPR_MAJOR_VERSION "2")
2626
set(HD_RPR_MINOR_VERSION "2")
27-
set(HD_RPR_PATCH_VERSION "0")
27+
set(HD_RPR_PATCH_VERSION "20")

cmake/defaults/msvcdefaults.cmake

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,20 @@ set(_PXR_CXX_FLAGS "${_PXR_CXX_FLAGS} /EHsc")
2727

2828
# Standards compliant.
2929
set(_PXR_CXX_FLAGS "${_PXR_CXX_FLAGS} /Zc:rvalueCast
30-
/Zc:strictStrings
31-
/Zc:inline")
30+
/Zc:strictStrings")
31+
32+
# The /Zc:inline option strips out the "arch_ctor_<name>" symbols used for
33+
# library initialization by ARCH_CONSTRUCTOR starting in Visual Studio 2019,
34+
# causing release builds to fail. Disable the option for this and later
35+
# versions.
36+
#
37+
# For more details, see:
38+
# https://developercommunity.visualstudio.com/content/problem/914943/zcinline-removes-extern-symbols-inside-anonymous-n.html
39+
if (MSVC_VERSION GREATER_EQUAL 1920)
40+
set(_PXR_CXX_FLAGS "${_PXR_CXX_FLAGS} /Zc:inline-")
41+
else()
42+
set(_PXR_CXX_FLAGS "${_PXR_CXX_FLAGS} /Zc:inline")
43+
endif()
3244

3345
# Turn on all but informational warnings.
3446
set(_PXR_CXX_FLAGS "${_PXR_CXX_FLAGS} /W3")

cmake/macros/Private.cmake

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,14 @@ function(_copy_headers LIBRARY_NAME)
4444
if( NOT "${_args_FILES}" STREQUAL "")
4545
set(files_copied "")
4646
foreach (f ${_args_FILES})
47-
set(infile "${CMAKE_CURRENT_SOURCE_DIR}/${f}")
48-
set(outfile "${header_dest_dir}/${f}")
47+
if(IS_ABSOLUTE ${f})
48+
set(infile "${f}")
49+
get_filename_component(f_name ${f} NAME)
50+
set(outfile "${header_dest_dir}/${f_name}")
51+
else()
52+
set(infile "${CMAKE_CURRENT_SOURCE_DIR}/${f}")
53+
set(outfile "${header_dest_dir}/${f}")
54+
endif()
4955
get_filename_component(dir_to_create "${outfile}" PATH)
5056
add_custom_command(
5157
OUTPUT ${outfile}

cmake/modules/FindHoudiniUSD.cmake

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,38 @@ else()
113113
set(Houdini_LIB_DIR ${HOUDINI_ROOT}/dsolib)
114114
endif()
115115

116+
find_path(Houdini_MTLX_INCLUDE_DIR
117+
"MaterialXCore/Document.h"
118+
PATHS ${HOUDINI_ROOT}
119+
PATH_SUFFIXES "toolkit/include"
120+
NO_DEFAULT_PATH)
121+
if(Houdini_MTLX_INCLUDE_DIR)
122+
if(WIN32)
123+
find_path(Houdini_MTLX_IMPLIB_DIR
124+
"MaterialXCore.lib"
125+
PATHS ${HOUDINI_ROOT}
126+
PATH_SUFFIXES "custom/houdini/dsolib"
127+
NO_DEFAULT_PATH)
128+
list(APPEND HUSD_REQ_VARS "Houdini_MTLX_IMPLIB_DIR")
129+
else()
130+
set(_MTLX_LIB_PREFIX "lib")
131+
endif()
132+
133+
foreach(targetName MaterialXCore MaterialXFormat)
134+
add_library(${targetName} SHARED IMPORTED)
135+
set_target_properties(${targetName} PROPERTIES
136+
IMPORTED_LOCATION "${Houdini_USD_LIB_DIR}/${_MTLX_LIB_PREFIX}${targetName}${CMAKE_SHARED_LIBRARY_SUFFIX}"
137+
INTERFACE_INCLUDE_DIRECTORIES ${Houdini_MTLX_INCLUDE_DIR})
138+
target_compile_definitions(${targetName} INTERFACE -DMATERIALX_BUILD_SHARED_LIBS)
139+
if(WIN32)
140+
set_target_properties(${targetName} PROPERTIES
141+
IMPORTED_IMPLIB "${Houdini_MTLX_IMPLIB_DIR}/${targetName}.lib")
142+
endif()
143+
endforeach()
144+
145+
set(MaterialX_FOUND 1)
146+
endif()
147+
116148
include(FindPackageHandleStandardArgs)
117149

118150
find_package_handle_standard_args(
@@ -125,9 +157,18 @@ if(HoudiniUSD_FOUND)
125157
message(STATUS " Houdini Python includes: ${Houdini_Python_INCLUDE_DIR}")
126158
message(STATUS " Houdini Python lib: ${Houdini_Python_LIB}")
127159
message(STATUS " Houdini Boost.Python lib: ${Houdini_Boostpython_LIB}")
160+
if(MaterialX_FOUND)
161+
message(STATUS " Houdini MaterialX: ${Houdini_MTLX_INCLUDE_DIR}")
162+
endif()
128163
endif()
129164

130165
if(HoudiniUSD_FOUND AND NOT TARGET hd)
166+
set(version_file ${Houdini_USD_INCLUDE_DIR}/pxr/pxr.h)
167+
file(STRINGS "${version_file}" PXR_VERSION
168+
REGEX "^#define[\t ]+PXR_VERSION[\t ]+.*")
169+
string(REGEX REPLACE "^.*PXR_VERSION[\t ]+([0-9]*).*$" "\\1"
170+
PXR_VERSION "${PXR_VERSION}")
171+
131172
# Generic creation of the usd targets. This is not meant to be perfect. The
132173
# criteria is "does it work for our use". Also, these names match the ones
133174
# of the USD distribution so we can use either without many conditions.
@@ -136,8 +177,8 @@ if(HoudiniUSD_FOUND AND NOT TARGET hd)
136177
foreach(targetName
137178
arch tf gf js trace work plug vt ar kind sdf ndr sdr pcp usd usdGeom
138179
usdVol usdLux usdMedia usdShade usdRender usdHydra usdRi usdSkel usdUI
139-
usdUtils garch hf hio cameraUtil pxOsd glf hgi hgiGL hd hdSt hdx
140-
usdImaging usdImagingGL usdRiImaging usdSkelImaging usdVolImaging
180+
usdUtils garch hf hio cameraUtil pxOsd glf hgi hgiGL hd hdSt hdMtlx hdx
181+
usdImaging usdImagingGL usdRiImaging usdSkelImaging usdVolI maging
141182
usdAppUtils usdviewq)
142183
add_library(${targetName} SHARED IMPORTED)
143184
set_target_properties(${targetName} PROPERTIES
@@ -175,4 +216,16 @@ if(HoudiniUSD_FOUND AND NOT TARGET hd)
175216
endif(APPLE)
176217
# By default Boost links libraries implicitly for the user via pragma's, we do not want this
177218
target_compile_definitions(tf INTERFACE -DHBOOST_ALL_NO_LIB)
219+
220+
set(HOUDINI_BIN ${HOUDINI_ROOT}/bin)
221+
find_program(USD_SCHEMA_GENERATOR
222+
NAMES
223+
usdGenSchema.py usdGenSchema
224+
PATHS
225+
${HOUDINI_BIN}
226+
REQUIRED
227+
NO_DEFAULT_PATH)
228+
if(USD_SCHEMA_GENERATOR)
229+
set(USD_SCHEMA_GENERATOR ${HOUDINI_BIN}/hython ${USD_SCHEMA_GENERATOR})
230+
endif()
178231
endif()

cmake/modules/FindRif.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,22 @@ find_library(RIF_LIBRARY
3535
if(WIN32)
3636
set(RIF_BINARIES
3737
${RIF_LOCATION_LIB}/dxcompiler.dll
38+
${RIF_LOCATION_LIB}/dxil.dll
3839
${RIF_LOCATION_LIB}/MIOpen.dll
3940
${RIF_LOCATION_LIB}/RadeonImageFilters.dll
41+
${RIF_LOCATION_LIB}/RadeonML.dll
4042
${RIF_LOCATION_LIB}/RadeonML_MIOpen.dll
4143
${RIF_LOCATION_LIB}/RadeonML_DirectML.dll)
4244
else(WIN32)
4345
if(APPLE)
4446
set(RIF_DEPENDENCY_LIBRARIES
47+
${RIF_LOCATION_LIB}/libRadeonML.dylib
4548
${RIF_LOCATION_LIB}/libRadeonML_MPS.dylib)
4649
else()
4750
set(RIF_DEPENDENCY_LIBRARIES
4851
${RIF_LOCATION_LIB}/libMIOpen.so
49-
${RIF_LOCATION_LIB}/libRadeonML_MIOpen.so)
52+
${RIF_LOCATION_LIB}/libRadeonML_MIOpen.so
53+
${RIF_LOCATION_LIB}/libRadeonML.so.0)
5054
endif(APPLE)
5155
endif(WIN32)
5256

0 commit comments

Comments
 (0)