Cycles OpenCL hardware raytracing intersection for AMD Rx 6000 series #82557

Closed
opened 2020-11-10 01:58:13 +01:00 by Brian Savery (AMD) · 19 comments

Overview

AMD Radeon RDNA2 architecture adds support for hardware accelerated ray intersection and BVH traversal. This is exposed in OpenCL via a “hardware intrinsic”. We will use this to modify the existing OpenCL path in Cycles to use a separate hardware accelerated code path when device support is present.

From a user point of view, they continue using the OpenCL version of cycles, and we automatically enable hw raytracing if available.

Design
Enablement:

  • A flag in the make file
WITH_CYCLES_DEVICE_AMD_HW
  • If the cmake flag is set, device capabilities are assessed for HW raytracing and if available, HW RT is enabled

Host side, BVH

  • Addition of a new BVH layout mask (bvh_amd)
  • Addition of a new bvh class to generate hw compatible bvh and pack instances accordingly
    • QBVH based with top level bounding boxes, up to depth 5, with full precision and the rest with half precision

Host side, Device

more details to come...

Detecting device compatibility

When AMD HW raytracing flag is set, the hardware ray tracing capability is queried in the OpenCLDevice constructor. The result of the query is checked when assigning the BVH layout and when kernels are compiled. The BVH layout routes the BVH creation to BVHAMD class and later in the BVH building, methods of this class are used to pack nodes and generate the hardware compatible BVH. The compiler options routes the intersection calls to the appropriate BVH function where AMD hardware supported intersection functionality is used.

(Patch to be public soon)

**Overview** AMD Radeon RDNA2 architecture adds support for hardware accelerated ray intersection and BVH traversal. This is exposed in OpenCL via a “hardware intrinsic”. We will use this to modify the existing OpenCL path in Cycles to use a separate hardware accelerated code path when device support is present. From a user point of view, they continue using the OpenCL version of cycles, and we automatically enable hw raytracing if available. **Design** Enablement: - A flag in the make file ``` WITH_CYCLES_DEVICE_AMD_HW ``` - If the cmake flag is set, device capabilities are assessed for HW raytracing and if available, HW RT is enabled Host side, BVH - Addition of a new BVH layout mask (bvh_amd) - Addition of a new bvh class to generate hw compatible bvh and pack instances accordingly - QBVH based with top level bounding boxes, up to depth 5, with full precision and the rest with half precision Host side, Device more details to come... **Detecting device compatibility** When AMD HW raytracing flag is set, the hardware ray tracing capability is queried in the OpenCLDevice constructor. The result of the query is checked when assigning the BVH layout and when kernels are compiled. The BVH layout routes the BVH creation to BVHAMD class and later in the BVH building, methods of this class are used to pack nodes and generate the hardware compatible BVH. The compiler options routes the intersection calls to the appropriate BVH function where AMD hardware supported intersection functionality is used. (Patch to be public soon)
Brian Savery (AMD) self-assigned this 2020-11-10 01:58:13 +01:00
Author
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Author
Member

Added subscribers: @BrianSavery, @brecht

Added subscribers: @BrianSavery, @brecht

#82543 was marked as duplicate of this issue

#82543 was marked as duplicate of this issue

Added subscriber: @GeorgiaPacific

Added subscriber: @GeorgiaPacific

Added subscriber: @Jaydead

Added subscriber: @Jaydead
Member

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker
Member

Added subscriber: @Stefan_Werner

Added subscriber: @Stefan_Werner

Added subscriber: @PietroEliaAppeddu

Added subscriber: @PietroEliaAppeddu

Added subscriber: @dabuxian

Added subscriber: @dabuxian

Added subscriber: @AndreaMonzini

Added subscriber: @AndreaMonzini

Added subscriber: @boberfly

Added subscriber: @boberfly

Hello, i would gently ask info about GNU/Linux design support for the hardware raytracing in Blender for the Rx 6000 :

  • support the AMDGPU-Pro ?
  • support the AMDGPU + OpenCL part from AMDGPU-Pro ?
  • support the new ROCm 4.0 ?

The Rx 6000 seem to be supported in ROCm :
https://www.phoronix.com/scan.php?page=article&item=amd-rx6800-opencl&num=1

Personally i hope for a working solution with free and open source drivers.

EDIT: it appears that from Mesa 20.3 ( AMDGPU ) we will have support for "Clover" OpenCL 1.2 !

Anyway thank you for your work !

Andrea

Hello, i would gently ask info about GNU/Linux design support for the hardware raytracing in Blender for the Rx 6000 : - support the AMDGPU-Pro ? - support the AMDGPU + OpenCL part from AMDGPU-Pro ? - support the new ROCm 4.0 ? The Rx 6000 seem to be supported in ROCm : https://www.phoronix.com/scan.php?page=article&item=amd-rx6800-opencl&num=1 Personally i hope for a working solution with free and open source drivers. EDIT: it appears that from Mesa 20.3 ( AMDGPU ) we will have support for "Clover" OpenCL 1.2 ! Anyway thank you for your work ! Andrea

Added subscriber: @Pliou

Added subscriber: @Pliou

Added subscriber: @rsgnz

Added subscriber: @rsgnz

Added subscriber: @Beryesa

Added subscriber: @Beryesa

Added subscriber: @itf

Added subscriber: @itf

Added subscriber: @INdek-2

Added subscriber: @INdek-2

Changed status from 'Confirmed' to: 'Archived'

Changed status from 'Confirmed' to: 'Archived'

Superseded by #91571 (Cycles HIP device).

Superseded by #91571 (Cycles HIP device).
Thomas Dinges added this to the 2.90 milestone 2023-02-08 16:25:39 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
16 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#82557
No description provided.