载入中...
搜索中...
未找到
eve::graphics::raytracing::VulkanRayTracing类 参考final

Vulkan implementation of IRayTracing (KHR ray-tracing pipeline). 更多...

#include <VulkanRayTracing.h>

类 eve::graphics::raytracing::VulkanRayTracing 继承关系图:
eve::graphics::IRayTracing

Public 成员函数

 VulkanRayTracing ()=default
 Constructs a VulkanRayTracing.
 
 ~VulkanRayTracing () override
 Releases VulkanRayTracing resources.
 
 VulkanRayTracing (const VulkanRayTracing &)=delete
 
VulkanRayTracing & operator= (const VulkanRayTracing &)=delete
 
bool isAvailable () const override
 True when available.
 
RayTracingCaps caps () const override
 Caps.
 
Result< PathSceneToken > preparePathScene (Graphics *gfx, const PathSceneDescription &scene) override
 Prepare and publish a path-tracing scene. @ownership Inputs are borrowed for this call; GPU snapshot is backend-owned. @thread Render thread, outside frame recording; no reentrancy. @cost GPU uploads/builds proportional to geometry, amortized across frames.
 
Result< PathSceneToken > updatePathInstances (PathSceneToken token, std::span< const PathInstance > instances) override
 Replace instances while retaining prepared geometry. @ownership Input is borrowed for the call; the provider retains geometry resources. @thread Render thread, outside frame recording; no reentrancy. @cost Rebuilds the instance hierarchy and emitter data per changed instance set, reusing BLAS.
 
Result< void > renderPaths (PathSceneToken token, Canvas *dest, const PathTraceView &view) override
 Render a prepared sample batch. @ownership Destination is borrowed for the call; history is backend-owned. @thread Render thread, outside frame recording; no reentrancy. @cost GPU work proportional to pixels, samples and bounces; waits once per batch.
 
Result< PathFrameToken > preparePathFrame (PathSceneToken scene, uint32_t width, uint32_t height) override
 Prepare owned normal-frame output.
 
Result< Texture * > recordPathFrame (PathSceneToken scene, PathFrameToken output, const PathTraceView &view) override
 Record normal-frame tracing.
 
Result< void > applyReflections (Graphics *gfx, Texture *sceneColor, Texture *hwDepth, Texture *worldNormal, Canvas *dest, const glm::mat4 &invViewProj, const glm::mat4 &viewProj, const glm::vec3 &eyeWorld) override
 Applies reflections.
 
Result< void > rebuildScene () override
 Rebuild scene.
 
Result< uint32_t > addTriangleMesh (const float *positionsXYZ, int vertexCount, const uint32_t *indices, int indexCount, const glm::mat4 &transform) override
 Adds triangle mesh.
 
Result< uint32_t > addMesh (Mesh *mesh, const glm::mat4 &transform) override
 Adds mesh.
 
void clearScene () override
 Clears scene.
 
void detachFromGraphics () override
 Detaches from graphics.
 
void attachDevice (vkb::Device *device, const RayTracingCaps &caps, vk::CommandPool uploadPool, vk::Queue graphicsQueue)
 Bind to the live Vulkan Graphics device (call after init). @ownership device is borrowed; Graphics remains the owner. @lifetime device, uploadPool, and graphicsQueue must outlive this backend until detachDevice(). @thread Render thread only.
 
void detachDevice ()
 Drop GPU resources when Graphics tears down.
 
Result< void > ensureAttached ()
 Lazily bind to the process Graphics singleton when RT is available.
 
- Public 成员函数 继承自 eve::graphics::IRayTracing
virtual ~IRayTracing ()=default
 I ray tracing.
 

额外继承的成员函数

- 静态 Public 属性 继承自 eve::graphics::IRayTracing
static constexpr const char * capabilityName = "IRayTracing"
 

详细描述

Vulkan implementation of IRayTracing (KHR ray-tracing pipeline).

在文件 VulkanRayTracing.h 第 139 行定义.

构造及析构函数说明

◆ VulkanRayTracing() [1/2]

eve::graphics::raytracing::VulkanRayTracing::VulkanRayTracing ( )
default

Constructs a VulkanRayTracing.

◆ ~VulkanRayTracing()

eve::graphics::raytracing::VulkanRayTracing::~VulkanRayTracing ( )
override

Releases VulkanRayTracing resources.

在文件 VulkanRayTracing.cpp 第 197 行定义.

引用了 detachDevice().

◆ VulkanRayTracing() [2/2]

eve::graphics::raytracing::VulkanRayTracing::VulkanRayTracing ( const VulkanRayTracing &  )
delete

成员函数说明

◆ addMesh()

Result< uint32_t > eve::graphics::raytracing::VulkanRayTracing::addMesh ( Mesh *  mesh,
const glm::mat4 &  transform 
)
overridevirtual

◆ addTriangleMesh()

Result< uint32_t > eve::graphics::raytracing::VulkanRayTracing::addTriangleMesh ( const float *  positionsXYZ,
int  vertexCount,
const uint32_t *  indices,
int  indexCount,
const glm::mat4 &  transform 
)
overridevirtual

◆ applyReflections()

Result< void > eve::graphics::raytracing::VulkanRayTracing::applyReflections ( Graphics *  gfx,
Texture *  sceneColor,
Texture *  hwDepth,
Texture *  worldNormal,
Canvas *  dest,
const glm::mat4 &  invViewProj,
const glm::mat4 &  viewProj,
const glm::vec3 &  eyeWorld 
)
overridevirtual

◆ attachDevice()

void eve::graphics::raytracing::VulkanRayTracing::attachDevice ( vkb::Device *  device,
const RayTracingCaps &  caps,
vk::CommandPool  uploadPool,
vk::Queue  graphicsQueue 
)

Bind to the live Vulkan Graphics device (call after init). @ownership device is borrowed; Graphics remains the owner. @lifetime device, uploadPool, and graphicsQueue must outlive this backend until detachDevice(). @thread Render thread only.

在文件 VulkanRayTracing.cpp 第 233 行定义.

引用了 caps(), detachDevice() , 以及 device.

被这些函数引用 ensureAttached().

◆ caps()

RayTracingCaps eve::graphics::raytracing::VulkanRayTracing::caps ( ) const
overridevirtual

◆ clearScene()

void eve::graphics::raytracing::VulkanRayTracing::clearScene ( )
overridevirtual

◆ detachDevice()

void eve::graphics::raytracing::VulkanRayTracing::detachDevice ( )

◆ detachFromGraphics()

void eve::graphics::raytracing::VulkanRayTracing::detachFromGraphics ( )
inlineoverridevirtual

Detaches from graphics.

重载 eve::graphics::IRayTracing .

在文件 VulkanRayTracing.h 第 199 行定义.

引用了 detachDevice().

◆ ensureAttached()

Result< void > eve::graphics::raytracing::VulkanRayTracing::ensureAttached ( )

Lazily bind to the process Graphics singleton when RT is available.

返回
Success when attached and RT is usable; Unsupported otherwise.

在文件 VulkanRayTracing.cpp 第 199 行定义.

引用了 attachDevice(), current, eve::Diagnostic::error(), eve::Result< T >::failure(), isAvailable(), eve::graphics::RayTracingCaps::rayTracingAvailable(), eve::Result< T >::success() , 以及 eve::Unsupported.

被这些函数引用 addMesh(), addTriangleMesh(), applyReflections() , 以及 rebuildScene().

◆ isAvailable()

bool eve::graphics::raytracing::VulkanRayTracing::isAvailable ( ) const
overridevirtual

◆ operator=()

VulkanRayTracing & eve::graphics::raytracing::VulkanRayTracing::operator= ( const VulkanRayTracing &  )
delete

◆ preparePathFrame()

Result< PathFrameToken > eve::graphics::raytracing::VulkanRayTracing::preparePathFrame ( PathSceneToken  scene,
uint32_t  width,
uint32_t  height 
)
overridevirtual

Prepare owned normal-frame output.

返回
Output identity, invalidated by resize, full scene replacement or device detach.

实现了 eve::graphics::IRayTracing.

在文件 VulkanPathTracing.cpp 第 1221 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), height, eve::InvalidArgument, scene, eve::Result< T >::success() , 以及 width.

◆ preparePathScene()

Result< PathSceneToken > eve::graphics::raytracing::VulkanRayTracing::preparePathScene ( Graphics *  gfx,
const PathSceneDescription &  scene 
)
overridevirtual

Prepare and publish a path-tracing scene. @ownership Inputs are borrowed for this call; GPU snapshot is backend-owned. @thread Render thread, outside frame recording; no reentrancy. @cost GPU uploads/builds proportional to geometry, amortized across frames.

实现了 eve::graphics::IRayTracing.

在文件 VulkanPathTracing.cpp 第 703 行定义.

引用了 b, description, error, eve::Diagnostic::error(), EV_PROFILE_MODULE, eve::Failed, eve::Result< T >::failure(), flags, g, geometry, gpu, graphics, identity, indices, eve::InvalidArgument, eve::graphics::Linear, mesh, message, eve::graphics::Mirror, normals, owned, positions, preparePathScene(), resolved, revision, sampler, scene, eve::Result< T >::success(), t, texture, u, eve::Unsupported, uv, v, values , 以及 vertices.

被这些函数引用 preparePathScene().

◆ rebuildScene()

Result< void > eve::graphics::raytracing::VulkanRayTracing::rebuildScene ( )
overridevirtual

Rebuild scene.

实现了 eve::graphics::IRayTracing.

在文件 VulkanRayTracing.cpp 第 557 行定义.

引用了 ensureAttached() , 以及 eve::Result< void >::ok().

◆ recordPathFrame()

Result< Texture * > eve::graphics::raytracing::VulkanRayTracing::recordPathFrame ( PathSceneToken  scene,
PathFrameToken  output,
const PathTraceView &  view 
)
overridevirtual

Record normal-frame tracing.

返回
Sampleable output for same-frame composition, or a structured failure. Success is recording, not completion.

The caller submits the normal frame. Reset history if a previous recording was not submitted. Subsequent 3D raster draws are not permitted; 2D UI overlays remain supported.

实现了 eve::graphics::IRayTracing.

在文件 VulkanPathTracing.cpp 第 1233 行定义.

引用了 eve::graphics::raytracing::path::Constants::counts, eve::graphics::raytracing::path::Constants::environment, error, eve::Diagnostic::error(), EV_PROFILE_MODULE, eve::graphics::raytracing::path::Constants::eye, eve::Failed, eve::Result< T >::failure(), eve::InvalidArgument, eve::graphics::raytracing::path::Constants::invViewProj, message, eve::graphics::None, output, eve::graphics::raytracing::path::Constants::sampling, scene, sequence, eve::Result< T >::success(), texture, u, valid , 以及 view.

◆ renderPaths()

Result< void > eve::graphics::raytracing::VulkanRayTracing::renderPaths ( PathSceneToken  token,
Canvas *  dest,
const PathTraceView &  view 
)
overridevirtual

◆ updatePathInstances()

Result< PathSceneToken > eve::graphics::raytracing::VulkanRayTracing::updatePathInstances ( PathSceneToken  token,
std::span< const PathInstance >  instances 
)
overridevirtual

Replace instances while retaining prepared geometry. @ownership Input is borrowed for the call; the provider retains geometry resources. @thread Render thread, outside frame recording; no reentrancy. @cost Rebuilds the instance hierarchy and emitter data per changed instance set, reusing BLAS.

实现了 eve::graphics::IRayTracing.

在文件 VulkanPathTracing.cpp 第 658 行定义.

引用了 error, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::graphics::vulkan::Graphics::hasOpenPresentFrame(), eve::InvalidArgument , 以及 token.


该类的文档由以下文件生成: