Skip to content

Commit

Permalink
Merge pull request #315 from GPUOpen-LibrariesAndSDKs/develop
Browse files Browse the repository at this point in the history
Merge 3.2
  • Loading branch information
bsavery committed Jul 6, 2021
2 parents a97dfb4 + aaa5f96 commit dc56bdb
Show file tree
Hide file tree
Showing 57 changed files with 1,471 additions and 795 deletions.
35 changes: 35 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
# Version 3.2
## New Features:
- 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. Volume shaders can now also be used for simple fog boxes. Also the Volume Scatter node is supported.
- Viewport denoising and upscaling improves the interactivity and speed of Viewport rendering. With the use of the Radeon Image Filter Library, this allows Radeon ProRender to render at half resolution faster, and then upscale to the full size of the Viewport.
- Deformation motion blur gives accurate motion blur to objects which are being deformed, for example, a flag flapping in the wind or a ball squashing. Besides, motion blur export has been optimized, and a setting for disabling deformation motion blur has been added.
- A new RPR Toon Shader has been added. This enables cartoon-style shading for a non-photorealistic look. Toon shaders can be used in a “simple” mode for just setting a color or a gradient of different colors for shadow vs lit areas of the object.
- Support for Blender 2.93 has been added.
- The look of “blocky” displacements has been significantly improved by enabling subdivision by default on objects with displacement shaders. However, this does render slower, and can be overridden with the RPR Object Subdivision settings.
- Support has been added for Reflection Catcher and Transparent background in the Viewport in the Full mode.
- Outline rendering (formerly called Contour rendering) is now moved to the view layer AOV section. Outline rendering can be enabled just as the other AOVs. The rendering process with Outline rendering enabled will take two passes per view layer, with the second doing the Outline rendering.
- Support for (Shutter) Position in the Motion Blur settings has been added. This uses the cycles setting to control the shutter opening around the frame number.
- Support for the Voronoi Texture node is added.

## Issues Fixed:
- Improve prop name readability in Object visibility UI.
- Texture compression was causing artifacts in some scenes. A “texture compression” setting has been added and defaulted to False. You can enable this setting for faster renders, but make sure that there are no texture artifacts.
- The issue with the add-on not loading in versions of Blender downloaded from the Windows app store has been fixed.
- Objects set as Reflection Catchers now work in the Full mode.
- Overbright edges of objects with Uber shaders in metalness mode ― fixed.
- Shaders with high roughness could have artifacts with reflection or refraction ― fixed.
- Tiled rendering with a transparent background in the Full render quality has been fixed.
- Occasional issues in starting the add-on in certain OSs have been fixed.
- The option "Viewport Denoising and Upscaling" is saved to the scene settings.
- Memory leak in Viewport rendering with the Upscale filter enabled has been fixed.
- Image filters on Ubuntu20 have been fixed.
- Iterating all of view layers when baking all objects have been fixed.
- Fixed a crash in the viewport render if an object with hair and modifiers was not enabled for viewport display.
- Fixed an error with math nodes set to “Smooth min” or “Compare” modes.

## Known Issues:
- In RPR 2.0, heterogenous volumes, smoke and fire simulations or VDB files are not yet supported.
- Subsurface scattering and volume shader are currently disabled on macOS due to long compile times.
- Some AOVs may have artifacts on AMD cards with drivers earlier than 21.6.1


# Version 3.1
## New Features:
- Support for AMD Radeon™ RX 6700 XT graphics cards has been added.
Expand Down
53 changes: 35 additions & 18 deletions RPRBlenderHelper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ set (CMAKE_CXX_STANDARD 11)
set(RPR_SDK_DIR ${CMAKE_SOURCE_DIR}/../.sdk/rpr)
set(RPRTOOLS_DIR ${RPR_SDK_DIR}/rprTools)
set(SHARED_DIR ${CMAKE_SOURCE_DIR}/../RadeonProRenderSharedComponents)
set(OPENVDB_SDK_PATH ${SHARED_DIR}/OpenVdb)

set(SOURCES
RPRBlenderHelper/RPRBlenderHelper.cpp
Expand All @@ -26,32 +25,52 @@ include_directories(

if(WIN32)
list(APPEND SOURCES
RPRBlenderHelper/OpenVdb.cpp
RPRBlenderHelper/dllmain.cpp
)
include_directories(
${OPENVDB_SDK_PATH}/include
${SHARED_DIR}/RadeonProRenderLibs/rprLibs
)

set(LIBS
${RPR_SDK_DIR}/lib/RadeonProRender64.lib
${OPENVDB_SDK_PATH}/Windows/lib/openvdb.lib
${OPENVDB_SDK_PATH}/Windows/lib/Half-2_3.lib
${OPENVDB_SDK_PATH}/Windows/lib/tbb.lib
)

elseif(${APPLE})
list(APPEND SOURCES
RPRBlenderHelper/OpenVdb.cpp
)
include_directories(
${OPENVDB_SDK_PATH}/include
${SHARED_DIR}/RadeonProRenderLibs/rprLibs
)

set(LIBS
${RPR_SDK_DIR}/bin/libRadeonProRender64.dylib
)

else() # Linux
set(LIBS ${RPR_SDK_DIR}/bin/libRadeonProRender64.so)

endif()

add_library(RPRBlenderHelper SHARED ${SOURCES})
add_definitions(-DBLENDER_PLUGIN)
target_link_libraries(RPRBlenderHelper ${LIBS})


# Building RPRBlenderHelper with OPENVDB support
set(OPENVDB_SDK_PATH ${SHARED_DIR}/OpenVdb)

list(APPEND SOURCES
RPRBlenderHelper/OpenVdb.cpp
)
include_directories(
${OPENVDB_SDK_PATH}/include
)

if(WIN32)
list(APPEND LIBS
${OPENVDB_SDK_PATH}/Windows/lib/openvdb.lib
${OPENVDB_SDK_PATH}/Windows/lib/Half-2_3.lib
${OPENVDB_SDK_PATH}/Windows/lib/tbb.lib
)

elseif(${APPLE})
list(APPEND LIBS
${OPENVDB_SDK_PATH}/OSX/lib/libopenvdb.a
${OPENVDB_SDK_PATH}/OSX/lib/libz.a
${OPENVDB_SDK_PATH}/OSX/lib/libblosc.a
Expand All @@ -60,13 +79,11 @@ elseif(${APPLE})
${OPENVDB_SDK_PATH}/OSX/lib/libtbb.a
)

else() # Linux
set(LIBS ${RPR_SDK_DIR}/bin/libRadeonProRender64.so)
else()
return()

endif()

add_library(RPRBlenderHelper SHARED ${SOURCES})

add_library(RPRBlenderHelper_vdb SHARED ${SOURCES})
add_definitions(-DBLENDER_PLUGIN)

target_link_libraries(RPRBlenderHelper ${LIBS})
target_link_libraries(RPRBlenderHelper_vdb ${LIBS})
2 changes: 1 addition & 1 deletion RadeonProImageProcessingSDK
Submodule RadeonProImageProcessingSDK updated 93 files
+1 −1 CentOS7/Dynamic/libMIOpen.so.2
+ CentOS7/Dynamic/libMIOpen.so.2.0.5
+ CentOS7/Dynamic/libOpenImageDenoise.so.0.9.0
+1 −1 CentOS7/Dynamic/libRadeonImageFilters.so.1
+ CentOS7/Dynamic/libRadeonImageFilters.so.1.6.1
+ CentOS7/Dynamic/libRadeonImageFilters.so.1.7.1
+1 −0 CentOS7/Dynamic/libRadeonML.so
+1 −0 CentOS7/Dynamic/libRadeonML.so.0
+ CentOS7/Dynamic/libRadeonML.so.0.9.12
+1 −1 CentOS7/Dynamic/libRadeonML_MIOpen.so.0
+ CentOS7/Dynamic/libRadeonML_MIOpen.so.0.9.12
+ CentOS7/Static/libRadeonImageFilters.a
+ OSX/Dynamic/libRadeonImageFilters.1.6.1.dylib
+ OSX/Dynamic/libRadeonImageFilters.1.7.1.dylib
+1 −1 OSX/Dynamic/libRadeonImageFilters.1.dylib
+ OSX/Dynamic/libRadeonML.0.9.12.dylib
+1 −0 OSX/Dynamic/libRadeonML.0.dylib
+1 −0 OSX/Dynamic/libRadeonML.dylib
+ OSX/Dynamic/libRadeonML_MPS.0.9.12.dylib
+1 −1 OSX/Dynamic/libRadeonML_MPS.0.dylib
+ OSX/Static/libRadeonImageFilters.a
+12 −0 RELEASENOTES1.6.2.md
+11 −0 RELEASENOTES1.7.0.md
+9 −0 RELEASENOTES1.7.1.md
+1 −0 Ubuntu18-Clang/Dynamic/libMIOpen.so
+1 −0 Ubuntu18-Clang/Dynamic/libMIOpen.so.2
+ Ubuntu18-Clang/Dynamic/libMIOpen.so.2.0.5
+1 −0 Ubuntu18-Clang/Dynamic/libOpenImageDenoise.so
+1 −0 Ubuntu18-Clang/Dynamic/libOpenImageDenoise.so.0
+ Ubuntu18-Clang/Dynamic/libOpenImageDenoise.so.0.9.0
+1 −0 Ubuntu18-Clang/Dynamic/libRadeonImageFilters.so
+1 −0 Ubuntu18-Clang/Dynamic/libRadeonImageFilters.so.1
+ Ubuntu18-Clang/Dynamic/libRadeonImageFilters.so.1.7.1
+1 −0 Ubuntu18-Clang/Dynamic/libRadeonML.so
+1 −0 Ubuntu18-Clang/Dynamic/libRadeonML.so.0
+ Ubuntu18-Clang/Dynamic/libRadeonML.so.0.9.12
+1 −0 Ubuntu18-Clang/Dynamic/libRadeonML_MIOpen.so
+1 −0 Ubuntu18-Clang/Dynamic/libRadeonML_MIOpen.so.0
+ Ubuntu18-Clang/Dynamic/libRadeonML_MIOpen.so.0.9.12
+1 −1 Ubuntu18/Dynamic/libMIOpen.so.2
+ Ubuntu18/Dynamic/libMIOpen.so.2.0.5
+1 −1 Ubuntu18/Dynamic/libRadeonImageFilters.so.1
+ Ubuntu18/Dynamic/libRadeonImageFilters.so.1.6.1
+ Ubuntu18/Dynamic/libRadeonImageFilters.so.1.7.0
+1 −0 Ubuntu18/Dynamic/libRadeonML.so
+1 −0 Ubuntu18/Dynamic/libRadeonML.so.0
+ Ubuntu18/Dynamic/libRadeonML.so.0.9.11
+1 −1 Ubuntu18/Dynamic/libRadeonML_MIOpen.so.0
+ Ubuntu18/Dynamic/libRadeonML_MIOpen.so.0.9.11
+ Ubuntu18/Static/libRadeonImageFilters.a
+1 −0 Ubuntu20/Dynamic/libMIOpen.so
+1 −0 Ubuntu20/Dynamic/libMIOpen.so.2
+ Ubuntu20/Dynamic/libMIOpen.so.2.0.5
+1 −0 Ubuntu20/Dynamic/libOpenImageDenoise.so
+1 −0 Ubuntu20/Dynamic/libOpenImageDenoise.so.0
+ Ubuntu20/Dynamic/libOpenImageDenoise.so.0.9.0
+1 −0 Ubuntu20/Dynamic/libRadeonImageFilters.so
+1 −0 Ubuntu20/Dynamic/libRadeonImageFilters.so.1
+ Ubuntu20/Dynamic/libRadeonImageFilters.so.1.7.1
+1 −0 Ubuntu20/Dynamic/libRadeonML.so
+1 −0 Ubuntu20/Dynamic/libRadeonML.so.0
+ Ubuntu20/Dynamic/libRadeonML.so.0.9.12
+1 −0 Ubuntu20/Dynamic/libRadeonML_MIOpen.so
+1 −0 Ubuntu20/Dynamic/libRadeonML_MIOpen.so.0
+ Ubuntu20/Dynamic/libRadeonML_MIOpen.so.0.9.12
+ Windows/Dynamic-MT/MIOpen.dll
+ Windows/Dynamic-MT/OpenImageDenoise.dll
+ Windows/Dynamic-MT/RadeonImageFilters.dll
+ Windows/Dynamic-MT/RadeonImageFilters.lib
+ Windows/Dynamic-MT/RadeonML.dll
+ Windows/Dynamic-MT/RadeonML.lib
+ Windows/Dynamic-MT/RadeonML_DirectML.dll
+ Windows/Dynamic-MT/RadeonML_MIOpen.dll
+ Windows/Dynamic-MT/dxcompiler.dll
+ Windows/Dynamic-MT/dxil.dll
+ Windows/Dynamic/MIOpen.dll
+ Windows/Dynamic/RadeonImageFilters.dll
+ Windows/Dynamic/RadeonImageFilters.lib
+ Windows/Dynamic/RadeonML.dll
+ Windows/Dynamic/RadeonML.lib
+ Windows/Dynamic/RadeonML_DirectML.dll
+ Windows/Dynamic/RadeonML_MIOpen.dll
+ Windows/Dynamic/dxcompiler.dll
+ Windows/Dynamic/dxil.dll
+71 −8 include/RadeonImageFilters.h
+5 −5 include/RadeonImageFilters_version.h
+ models/denoise_c3_hdr_gamma_2.5.pb
+ models/denoise_c3_hdr_gamma_2.5_f16.onnx
+ models/denoise_c3_ldr_float16.onnx
+ models/denoise_c9_hdr_gamma_2.5.pb
+ models/denoise_c9_hdr_gamma_2.5_f16.onnx
+ models/denoise_c9_ldr_f16.onnx
+3 −3 samples/CMakeLists.txt
2 changes: 1 addition & 1 deletion RadeonProRenderSDK
Submodule RadeonProRenderSDK updated 92 files
+ RadeonProRender/binCentOS7/Hybrid.so
+ RadeonProRender/binCentOS7/RprTextureCompiler64
+ RadeonProRender/binCentOS7/RprsRender64
+ RadeonProRender/binCentOS7/libNorthstar64.so
+ RadeonProRender/binCentOS7/libRadeonProRender64.so
+ RadeonProRender/binCentOS7/libRprLoadStore64.so
+ RadeonProRender/binCentOS7/libTahoe64.so
+ RadeonProRender/binMacOS/RprTextureCompiler64
+ RadeonProRender/binMacOS/RprsRender64
+ RadeonProRender/binMacOS/libNorthstar64.dylib
+ RadeonProRender/binMacOS/libRadeonProRender64.dylib
+ RadeonProRender/binMacOS/libRprLoadStore64.dylib
+ RadeonProRender/binMacOS/libTahoe64.dylib
+ RadeonProRender/binUbuntu18/Hybrid.so
+ RadeonProRender/binUbuntu18/RprTextureCompiler64
+ RadeonProRender/binUbuntu18/RprsRender64
+ RadeonProRender/binUbuntu18/libNorthstar64.so
+ RadeonProRender/binUbuntu18/libRadeonProRender64.so
+ RadeonProRender/binUbuntu18/libRprLoadStore64.so
+ RadeonProRender/binUbuntu18/libTahoe64.so
+ RadeonProRender/binWin64/Hybrid.dll
+ RadeonProRender/binWin64/Northstar64.dll
+ RadeonProRender/binWin64/RadeonProRender64.dll
+ RadeonProRender/binWin64/RprLoadStore64.dll
+ RadeonProRender/binWin64/RprTextureCompiler64.exe
+ RadeonProRender/binWin64/RprsRender64.exe
+ RadeonProRender/binWin64/Tahoe64.dll
+3 −3 RadeonProRender/inc/Math/float2.h
+3 −3 RadeonProRender/inc/Math/float3.h
+3 −3 RadeonProRender/inc/Math/int2.h
+3 −3 RadeonProRender/inc/Math/mathutils.h
+4 −8 RadeonProRender/inc/Math/matrix.h
+3 −3 RadeonProRender/inc/Math/quaternion.h
+11 −0 RadeonProRender/inc/ProRenderGLTF.h
+65 −10 RadeonProRender/inc/RadeonProRender.cs
+53 −10 RadeonProRender/inc/RadeonProRender.h
+52 −4 RadeonProRender/inc/RadeonProRender_Baikal.h
+1 −6 RadeonProRender/inc/RadeonProRender_CL.h
+1 −6 RadeonProRender/inc/RadeonProRender_GL.h
+1 −6 RadeonProRender/inc/RadeonProRender_Metal.h
+1 −9 RadeonProRender/inc/RadeonProRender_VK.h
+57 −10 RadeonProRender/inc/RadeonProRender_v2.h
+23 −8 RadeonProRender/inc/RprLoadStore.cs
+20 −6 RadeonProRender/inc/RprLoadStore.h
+11 −0 RadeonProRender/inc/rprDeprecatedApi.h
+ RadeonProRender/libWin64/RadeonProRender64.exp
+ RadeonProRender/libWin64/RadeonProRender64.lib
+ RadeonProRender/libWin64/RprLoadStore64.exp
+ RadeonProRender/libWin64/RprLoadStore64.lib
+26 −1 RadeonProRender/rprTools/RPRStringIDMapper.cpp
+11 −0 RadeonProRender/rprTools/RPRStringIDMapper.h
+11 −0 RadeonProRender/rprTools/RadeonProRender.hpp
+11 −0 RadeonProRender/rprTools/RadeonProRenderCpp.cpp
+10 −0 RadeonProRender/rprTools/RprTools.cpp
+10 −1 RadeonProRender/rprTools/RprTools.h
+78 −63 RadeonProRender/rprTools/rprMaterialXML.cpp
+10 −1 RadeonProRender/rprTools/rprMaterialXML.h
+11 −0 RadeonProRender/rprTools/rprMtlxLoader.cpp
+11 −0 RadeonProRender/rprTools/rprMtlxLoader.h
+3 −8 license.txt
+4 −1 readme.md
+89 −0 release_notes.txt
+1 −6 tutorials/00_context_creation/main.cpp
+1 −6 tutorials/01_camera_setup/main.cpp
+1 −6 tutorials/02_mesh/main.cpp
+1 −6 tutorials/03_instance/main.cpp
+1 −6 tutorials/04_deformation_motion_blur/main.cpp
+1 −6 tutorials/10_light_point/main.cpp
+1 −6 tutorials/11_light_mesh/main.cpp
+1 −6 tutorials/12_light_environment/main.cpp
+1 −6 tutorials/20_material_textured/main.cpp
+1 −6 tutorials/21_material_layered/main.cpp
+1 −6 tutorials/22_material_uber/main.cpp
+1 −1 tutorials/23_material_uber_sss/main.cpp
+1 −6 tutorials/30_tiled_render/main.cpp
+1 −6 tutorials/31_framebuffer_access/main.cpp
+11 −0 tutorials/32_gl_interop/ShaderManager.cpp
+1 −6 tutorials/32_gl_interop/ShaderManager.h
+154 −31 tutorials/32_gl_interop/main.cpp
+1 −0 tutorials/32_gl_interop/premake4.lua
+1 −6 tutorials/33_aov/main.cpp
+1 −6 tutorials/40_postprocess_bloom/main.cpp
+1 −6 tutorials/41_postprocess_gamma/main.cpp
+1 −6 tutorials/50_curve/main.cpp
+1 −6 tutorials/51_volume/main.cpp
+1 −6 tutorials/60_mesh_export/main.cpp
+1 −6 tutorials/61_mesh_import/main.cpp
+1 −6 tutorials/62_matball_demo/main.cpp
+1 −6 tutorials/63_hybrid/main.cpp
+1 −6 tutorials/64_mesh_obj_demo/main.cpp
+16 −0 tutorials/common/common.h
+1 −1 tutorials/parameters_enumeration/parameters_enumeration.cpp
1 change: 1 addition & 0 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ py -3.7 src\bindings\pyrpr\src\pyrprapi.py %castxml%
set bindingsOk=.\bindings-ok
if exist %bindingsOk% (
py -3.7 build.py
py -3.9 build.py
) else (
echo Compiling bindings failed
)
22 changes: 10 additions & 12 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import platform
import subprocess
from pathlib import Path
import shutil


arch = platform.architecture()
Expand All @@ -37,18 +36,17 @@
os.chdir(str(pyrpr_path))
pyrpr_build_dir = Path('.build')

if Path('.build').exists():
shutil.rmtree(str(pyrpr_build_dir))

subprocess.check_call([sys.executable, 'rpr.py'])
subprocess.check_call([sys.executable, 'rpr_load_store.py'])
os.chdir(cwd)

os.chdir('RPRBlenderHelper')
os.makedirs('.build', exist_ok=True)
os.chdir('.build')
if 'Windows' == platform.system():
subprocess.check_call(['cmake', '-G', 'Visual Studio 14 2015 Win64', '..'])
else:
subprocess.check_call(['cmake', '..'])
subprocess.check_call(['cmake', '--build', '.', '--config', 'Release', '--clean-first'])
if sys.version_info.major == 3 and sys.version_info.minor == 7:
# we are going to build RPRBlenderHelper only for python 3.7
os.chdir('RPRBlenderHelper')
os.makedirs('.build', exist_ok=True)
os.chdir('.build')
if 'Windows' == platform.system():
subprocess.check_call(['cmake', '-G', 'Visual Studio 14 2015 Win64', '..'])
else:
subprocess.check_call(['cmake', '..'])
subprocess.check_call(['cmake', '--build', '.', '--config', 'Release', '--clean-first'])
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ if [ -f "$cxml" ]; then
python3.7 src/bindings/pyrpr/src/pyrprapi.py $cxml
if [ -f "./bindings-ok" ]; then
python3.7 build.py
python3.9 build.py
else
echo Compiling bindings failed
fi
Expand Down
1 change: 1 addition & 0 deletions build_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ if [ -f "$cxml" ]; then
python3.7 src/bindings/pyrpr/src/pyrprapi.py $cxml
if [ -f "./bindings-ok" ]; then
python3.7 build.py
python3.9 build.py
#sh osx/postbuild.sh
else
echo Compiling bindings failed
Expand Down
25 changes: 17 additions & 8 deletions cmd_tools/create_sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ def recreate_sdk():
copy_rif_sdk()


def find_file(path, glob):
return next(f for f in path.glob(glob) if not f.is_symlink())


def copy_rpr_sdk():
rpr_dir = Path("RadeonProRenderSDK/RadeonProRender")

Expand Down Expand Up @@ -85,7 +89,7 @@ def copy_rif_sdk():
# getting rif bin_dir
os_str = {
'Windows': "Windows",
'Linux': "Ubuntu18",
'Linux': "Ubuntu20",
'Darwin': "OSX"
}[OS]
bin_dir = rif_dir / os_str / "Dynamic"
Expand All @@ -109,27 +113,32 @@ def copy_rif_sdk():
shutil.copy(str(lib), str(sdk_lib_dir))

elif OS == 'Linux':
shutil.copy(str(bin_dir / "libRadeonImageFilters.so.1.6.1"),
shutil.copy(str(find_file(bin_dir, "libRadeonImageFilters.so*")),
str(sdk_bin_dir / "libRadeonImageFilters.so"))
shutil.copy(str(bin_dir / "libRadeonML_MIOpen.so.0.9.8"),
shutil.copy(str(find_file(bin_dir, "libRadeonML_MIOpen.so*")),
str(sdk_bin_dir / "libRadeonML_MIOpen.so"))
shutil.copy(str(bin_dir / "libOpenImageDenoise.so.0.9.0"),
shutil.copy(str(find_file(bin_dir, "libOpenImageDenoise.so*")),
str(sdk_bin_dir / "libOpenImageDenoise.so"))
shutil.copy(str(bin_dir / "libMIOpen.so.2.0.4"),
shutil.copy(str(find_file(bin_dir, "libMIOpen.so.2*")),
str(sdk_bin_dir / "libMIOpen.so.2"))
shutil.copy(str(find_file(bin_dir, "libRadeonML.so.0*")),
str(sdk_bin_dir / "libRadeonML.so.0"))

elif OS == 'Darwin':
shutil.copy(str(bin_dir / "libRadeonImageFilters.1.6.1.dylib"),
shutil.copy(str(find_file(bin_dir, "libRadeonImageFilters*.dylib")),
str(sdk_bin_dir / "libRadeonImageFilters.dylib"))
shutil.copy(str(bin_dir / "libOpenImageDenoise.0.9.0.dylib"),
shutil.copy(str(find_file(bin_dir, "libOpenImageDenoise*.dylib")),
str(sdk_bin_dir / "libOpenImageDenoise.dylib"))
shutil.copy(str(bin_dir / "libRadeonML_MPS.0.9.8.dylib"),
shutil.copy(str(find_file(bin_dir, "libRadeonML_MPS*.dylib")),
str(sdk_bin_dir / "libRadeonML_MPS.dylib"))
shutil.copy(str(find_file(bin_dir, "libRadeonML.0*.dylib")),
str(sdk_bin_dir / "libRadeonML.0.dylib"))

# adjusting id of RIF libs
install_name_tool('-id', "@rpath/libRadeonImageFilters.dylib", sdk_bin_dir / "libRadeonImageFilters.dylib")
install_name_tool('-id', "@rpath/libOpenImageDenoise.dylib", sdk_bin_dir / "libOpenImageDenoise.dylib")
install_name_tool('-id', "@rpath/libRadeonML_MPS.dylib", sdk_bin_dir / "libRadeonML_MPS.dylib")
install_name_tool('-id', "@rpath/libRadeonML.0.dylib", sdk_bin_dir / "libRadeonML.0.dylib")

else:
raise KeyError("Unsupported OS", OS)
Expand Down
3 changes: 3 additions & 0 deletions run_blender_with_rpr.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ REM *******************************************************************

if ""=="%BLENDER_EXE%" goto error

REM set Debug Mode flag
set RPR_BLENDER_DEBUG=1

py cmd_tools/run_blender.py "%BLENDER_EXE%" cmd_tools/test_rpr.py
pause
REM it's much easier to get issue traceback on crash if pause is present; remove if not needed
Expand Down
1 change: 1 addition & 0 deletions run_blender_with_rpr_Ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ function main()
{
init

export RPR_BLENDER_DEBUG=1
export LD_LIBRARY_PATH="$WORK_DIR:$LD_LIBRARY_PATH"

python3 cmd_tools/run_blender.py "$BLENDER_EXE" cmd_tools/test_rpr.py
Expand Down
2 changes: 2 additions & 0 deletions run_blender_with_rpr_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ if [ -x "${BLENDER_EXE}" ]; then
CDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
DIST_LIB="$CDIR/distlib"

# set Debug Mode flag
export RPR_BLENDER_DEBUG=1
export LD_LIBRARY_PATH="$DIST_LIB"

python3 cmd_tools/run_blender.py "$BLENDER_EXE" cmd_tools/test_rpr.py "$DEBUGGER_EXE"
Expand Down
1 change: 1 addition & 0 deletions src/RPRBlender.pyproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
<Compile Include="rprblender\engine\image_filter.py" />
<Compile Include="rprblender\engine\preview_engine.py" />
<Compile Include="rprblender\engine\render_engine.py" />
<Compile Include="rprblender\engine\render_engine_2.py" />
<Compile Include="rprblender\engine\render_engine_hybrid.py" />
<Compile Include="rprblender\engine\viewport_engine.py" />
<Compile Include="rprblender\engine\viewport_engine_2.py" />
Expand Down
14 changes: 9 additions & 5 deletions src/bindings/pyrpr/rpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ def export(json_file_name, dependencies, header_file_name, cffi_name, output_nam

ffi.cdef(Path('rprapi.h').read_text())

lib_names = ['RadeonProRender64', 'RadeonImageFilters', 'python37']

lib_names = ['RadeonProRender64', 'RadeonImageFilters',
f'python{sys.version_info.major}{sys.version_info.minor}']

inc_dir = [str(base / "src/bindings/pyrpr"),
str(rpr_sdk['inc']),
Expand Down Expand Up @@ -89,7 +91,11 @@ def export(json_file_name, dependencies, header_file_name, cffi_name, output_nam
shutil.copy(_cffi_backend.__file__, str(build_dir))

if 'Linux' == platform.system():
for path in (Path(_cffi_backend.__file__).parent / '.libs_cffi_backend').iterdir():
cffi_libs_dir = Path(_cffi_backend.__file__).parent / '.libs_cffi_backend'
if not cffi_libs_dir.is_dir():
cffi_libs_dir = Path(_cffi_backend.__file__).parent / 'cffi.libs'

for path in cffi_libs_dir.iterdir():
if '.so' in path.suffixes:
# copy library needed for cffi backend
ffi_lib = str(path)
Expand Down Expand Up @@ -133,10 +139,8 @@ def write_api(api_desc_fpath, f, abi_mode):
else:
print('typedef ', t.type, name, ';', file=f)
for name, t in api.functions.items():
if 'rprxGetLog' == name:
continue
if 'rifContextExecuteCommandQueue' == name:
print('rif_int rifContextExecuteCommandQueue(rif_context context, rif_command_queue command_queue, void *executeFinishedCallbackFunction(void* userdata), void* data, float* time);', file=f)
print('rif_int rifContextExecuteCommandQueue(rif_context context, rif_command_queue command_queue, void *executeFinishedCallbackFunction(void* userdata), void* data, rif_performance_statistic* statistics);', file=f)
continue
print(name, [(arg.name, arg.type) for arg in t.args])
print(t.restype, name, '(' + ', '.join(arg.type + ' ' + arg.name for arg in t.args) + ');', file=f)
Expand Down
10 changes: 10 additions & 0 deletions src/bindings/pyrpr/src/pyhybrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,16 @@ class Camera(pyrpr.Camera):
pass


@class_ignore_unsupported
class ImageData(pyrpr.ImageData):
pass


@class_ignore_unsupported
class ImageFile(pyrpr.ImageFile):
pass


@class_ignore_unsupported
class MaterialNode(pyrpr.MaterialNode):
def set_input(self, name, value):
Expand Down
Loading

0 comments on commit dc56bdb

Please sign in to comment.