From c6f6ce12ec522b193b42bcd12d3a2540c7a6ff92 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 28 Jul 2021 12:24:12 -0700 Subject: Experimental DXR1.0 support in gfx. (#1915) * Experimental DXR1.0 support in gfx. - Add `dispatchRays` command. - Add `createRayTracingPipelineState` method to construct a D3D ray tracing state object from a linked slang program and user specified shader table. Limitations/simplifications: no local root signature support, shader table entries contains only shader identifiers and is specified at pipeline creation time, owned by the pipeline state object. * Root object binding for raytracing pipelines. * `maybeSpecializePipeline` implementation for raytracing pipelines. * Add ray-tracing-pipeline example. * Fixes. * Update README.md * Update comments on the lifespan of specialized pipelines Co-authored-by: Yong He Co-authored-by: jsmall-nvidia --- tools/gfx/renderer-shared.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tools/gfx/renderer-shared.cpp') diff --git a/tools/gfx/renderer-shared.cpp b/tools/gfx/renderer-shared.cpp index 2eb19b6e9..bb80c4f53 100644 --- a/tools/gfx/renderer-shared.cpp +++ b/tools/gfx/renderer-shared.cpp @@ -605,6 +605,14 @@ Result RendererBase::maybeSpecializePipeline( pipelineDesc, specializedPipelineComPtr.writeRef())); break; } + case PipelineType::RayTracing: + { + auto pipelineDesc = currentPipeline->desc.rayTracing; + pipelineDesc.program = specializedProgram; + SLANG_RETURN_ON_FAIL(createRayTracingPipelineState( + pipelineDesc, specializedPipelineComPtr.writeRef())); + break; + } default: break; } -- cgit v1.2.3