diff options
| author | Yong He <yonghe@outlook.com> | 2021-07-28 12:24:12 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-28 12:24:12 -0700 |
| commit | c6f6ce12ec522b193b42bcd12d3a2540c7a6ff92 (patch) | |
| tree | d5f77aa02df88c71ef4f898db40434bf4c1f3010 /tools/gfx/debug-layer.cpp | |
| parent | 23d406f8a3b325f91fecd9ad52bd510ded5f49a7 (diff) | |
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 <yhe@nvidia.com>
Co-authored-by: jsmall-nvidia <jsmall@nvidia.com>
Diffstat (limited to 'tools/gfx/debug-layer.cpp')
| -rw-r--r-- | tools/gfx/debug-layer.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/gfx/debug-layer.cpp b/tools/gfx/debug-layer.cpp index 067581559..50cacc6c2 100644 --- a/tools/gfx/debug-layer.cpp +++ b/tools/gfx/debug-layer.cpp @@ -705,6 +705,7 @@ DebugCommandBuffer::DebugCommandBuffer() m_renderCommandEncoder.commandBuffer = this; m_computeCommandEncoder.commandBuffer = this; m_resourceCommandEncoder.commandBuffer = this; + m_rayTracingCommandEncoder.commandBuffer = this; } void DebugCommandBuffer::encodeRenderCommands( @@ -1084,6 +1085,25 @@ void DebugRayTracingCommandEncoder::memoryBarrier( baseObject->memoryBarrier(count, innerAS.getBuffer(), sourceAccess, destAccess); } +void DebugRayTracingCommandEncoder::bindPipeline( + IPipelineState* state, IShaderObject** outRootObject) +{ + SLANG_GFX_API_FUNC; + auto innerPipeline = getInnerObj(state); + baseObject->bindPipeline(innerPipeline, commandBuffer->rootObject.baseObject.writeRef()); + *outRootObject = &commandBuffer->rootObject; +} + +void DebugRayTracingCommandEncoder::dispatchRays( + const char* rayGenShaderName, + int32_t width, + int32_t height, + int32_t depth) +{ + SLANG_GFX_API_FUNC; + baseObject->dispatchRays(rayGenShaderName, width, height, depth); +} + const ICommandQueue::Desc& DebugCommandQueue::getDesc() { SLANG_GFX_API_FUNC; |
