Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert commits 0009e41..17bbad3 inclusive #210

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.vcxproj
App/App.vcxproj.user
*.filters
*.obj
*.tlog
Expand All @@ -11,12 +12,29 @@
*.cache
*.idb
*.user
Bin/Debug/x64/App64D.exe
Bin/Release/x64/App64.exe
*.dll
*.exe
*.opendb
*.db
*.sln
*.d

*.o

*.a
*.so

*.so

App/Makefile

Bin/Release/x64/

CLW/Makefile

Calc/Makefile

Gtest/Makefile

Makefile
161 changes: 142 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,156 @@
# RadeonRays 4.0
# Important
Sample renderer has been moved from RadeonRays repo into a separate one here: [Baikal](https://github.com/GPUOpen-LibrariesAndSDKs/RadeonProRender-Baikal)

## Important
# Summary
Radeon Rays is ray intersection acceleration library provided by AMD which makes the most of the hardware and allows for efficient ray queries. Three backends support a range of use cases.

RadeonRays 2.0 SDK (OpenCL) has been moved to 'legacy-2.0' branch.
# Description
Radeon Rays has three backends,
- OpenCL
- Vulkan
- Embree

## Summary
OpenCL uses GPUs and CPUs that support at least OpenCL 1.2
Vulkan supports GPUs with Vulkan 1.0 or greater
Embree uses Intels Optimized CPU ray casting software for x86 and x64 devices

RadeonRays is a ray intersection acceleration library for heterogeneous hardware and software systems. AMD developed RadeonRays to help developers make the most of GPU, APUs and CPUs, and to eliminate the need to maintain hardware-dependent code.
The source tree consist of the following subdirectories:

The library offers a well-defined C API for scene building and performing asynchronous ray intersection queries.
- Radeon Rays: library binaries

RadeonRays is not limited to AMD hardware, a specific operating system or graphics framework. The library helps assure compatibility and best performance across a wide range of hardware platforms.
- App: Standalone sample/application featuring Radeon Rays OpenCL to implement a path tracer.

## Backends
# Preliminaries
## System requirements
The library is cross-platform and the following compilers are supported:

The library supports the following graphics and GPGPU frameworks as its backends:
- Visual Studio 2015

- DirectX 12
- Metal
- Vulkan
- Xcode 4 and later

- GCC 4.8 and later

- CMake 3.8 and later

- Python (for --embed_kernels option only)

- [Anvil](https://github.com/GPUOpen-LibrariesAndSDKs/Anvil) for Vulkan backend only

- [Embree](https://github.com/embree/embree) for Embree backend only

- AMD OpenCL APP SDK 2.0+ is also required for the standalone app build.

## Set up OpenCL
Set environmental variable. GPU_MAX_ALLOC_PERCENT = 100. This is necessary to allocate a large buffers.

## Set up Vulkan
Anvil is set as a submodule and will be downloaded by using `git submodule update --init --recursive` from the command line.
Some gui clients (github app for example) may do this automatically for you

## Multiple Backends
You can either choose a particular backend (OpenCL, Vulkan or Embree) or compile any combination of them and pick at run-time. By default OpenCL only will be compiled in (see Options below to enable other backends).
At runtime OpenCL devices will appear first, then Vulkan devices (if enabled) with the Embree device last (if enabled).

If the default behaviour is not what you want, an API call `IntersectionApi::SetPlatform( backend )` takes a backend argument bitfield allows you to specify exactly which backends device will be enumurated.

## Build

### Windows
- Create Visual Studio 2015 Solution

`cmake -G "Visual Studio 14 2015 Win64"`

### OSX
- Install Homebrew

`/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"`

- Install OpenImageIO

`brew install homebrew/science/openimageio`

- Make build folder and generate make files

`mkdir build`

`cd build`

`cmake -DCMAKE_BUILD_TYPE=<Release or Debug> ..`

`make`

### Linux
on Ubuntu:
install complimentary libraries:

`sudo apt-get install g++`

install build dependencies:

`sudo apt-get install libopenimageio-dev libglew-dev freeglut3-dev`

Also make sure you have the `opencl-dev` headers installed. Then create the Makefile:

`mkdir build`

`cd build`

`cmake -DCMAKE_BUILD_TYPE=<Release ro Debug> ..`

`make`

### Options
Available premake options:
- `RR_USE_EMBREE` will enable the embree backend. Embree device will be the last one in IntersectionApi device list.
example of usage :
`cmake -DCMAKE_BUILD_TYPE=<Release ro Debug> -DRR_USE_EMBREE=ON ..`

- `RR_USE_OPENCL` will enable the OpenCL backend. If no other option is provided, this is the default

- `RR_SHARED_CALC` will build Calc (Compute Abstraction Layer) as a shared object. This means RadeonRays library does not directly depend on OpenCL and can be used on the systems where OpenCL is not available (with Embree backend).

## Run unit tests
They need to be run from the <Radeon Rays_SDK path>/UnitTest path.
CMake should be runned with the `RR_SAFE_MATH` option.

# Hardware support

The library has been tested on the following hardware and OSes:

## Linux
- Ubuntu Linux 14.04
- AMD FirePro driver 15.201: W9100, W8100, W9000, W7000, W7100, S9300x2, W5100
- AMD Radeon driver 15.302: R9 Nano, R9 Fury X, R9 290
- NVIDIA driver 352.79: GeForce GTX970, Titan X

## Windows
- Windows 7/8.1/10
- AMD FirePro driver 15.201: W9100, W8100, W9000, W7000, W7100, S9300x2, W5100
- AMD Radeon driver 16.4: R9 Nano, R9 Fury X, R9 290, Pro Duo
- NVIDIA driver 364.72: GeForce GTX970, Titan X

## OSX
- OSX El Capitan 10.11.4
- Mac Pro (Late 2013) AMD FirePro D500 x2
- Macbook Pro Retina 13" (Early 2013) Intel HD 4300
- Macbook 12" (Early 2015) Intel HD 5300

---
# Known Issues
## Vulkan

## System Requirements
- Currently the public Anvil has a [bug](https://github.com/GPUOpen-LibrariesAndSDKs/Anvil/issues/3) that causes a crash on exit. Its already been fixed in an internal branch which will which will move to public when its cooked and ready. For now just comment out the free of the layout manager in Anvil::BasePipelineManager::Pipeline::release_vulkan_objects()

RadeonRays requires a PC with the following software and hardware:
## Windows

- DirectX12: a 64-bit version of Windows� 10, and a GPU and drivers that supports DirectX12 features
- Metal: a 64-bit version of MacOS� X 10.15 or later, and a discrete GPU that supports the MPS acceleration structure
- Vulkan: a 64-bit version of Windows� 10 or Linux, and a GPU and drivers that support Vulkan version 1.2
## OSX

## Documentation
## Linux

[Documentation page](https://radeon-pro.github.io/RadeonProRenderDocs/rr/about.html)
- If <CL/cl.h> is missing try to specify OpenCL SDK location.
- If your are experiencing problems creating your CL context with a default config chances are CL-GL interop is broken on your system, try running the sample app with -interop 0 command line option (expect performance drop).

AMD:
`export $AMDAPPSDKROOT=<SDK_PATH>`
NVIDIA:
`export $CUDA_PATH=<SDK_PATH>`
Binary file removed radeonrays/bin/WinPixEventRuntime.dll
Binary file not shown.
Binary file removed radeonrays/bin/dxcompiler.dll
Binary file not shown.
Binary file removed radeonrays/bin/fmt.dll
Binary file not shown.
Binary file removed radeonrays/bin/libradeonrays.dylib
Binary file not shown.
Binary file removed radeonrays/bin/radeonrays.dll
Binary file not shown.
Loading