diff options
| author | Yong He <yonghe@outlook.com> | 2022-01-21 10:17:39 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-21 10:17:39 -0800 |
| commit | f85bc7ae98486b37518958e659f659f1ff9b125c (patch) | |
| tree | b18f40a62ac51ee77bdf651a6d9a26f277019ab4 /tools/gfx/debug-layer.cpp | |
| parent | 11d248293f1b56a790faadead1e3d94de81f29a2 (diff) | |
GFX: seperated ShaderTable. (#2090)
Diffstat (limited to 'tools/gfx/debug-layer.cpp')
| -rw-r--r-- | tools/gfx/debug-layer.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tools/gfx/debug-layer.cpp b/tools/gfx/debug-layer.cpp index fa8fc6fda..53deec385 100644 --- a/tools/gfx/debug-layer.cpp +++ b/tools/gfx/debug-layer.cpp @@ -140,7 +140,7 @@ SLANG_GFX_DEBUG_GET_INTERFACE_IMPL(TransientResourceHeap) SLANG_GFX_DEBUG_GET_INTERFACE_IMPL(QueryPool) SLANG_GFX_DEBUG_GET_INTERFACE_IMPL_PARENT(AccelerationStructure, ResourceView) SLANG_GFX_DEBUG_GET_INTERFACE_IMPL(Fence) - +SLANG_GFX_DEBUG_GET_INTERFACE_IMPL(ShaderTable) #undef SLANG_GFX_DEBUG_GET_INTERFACE_IMPL #undef SLANG_GFX_DEBUG_GET_INTERFACE_IMPL_PARENT @@ -179,6 +179,7 @@ SLANG_GFX_DEBUG_GET_OBJ_IMPL(TransientResourceHeap) SLANG_GFX_DEBUG_GET_OBJ_IMPL(QueryPool) SLANG_GFX_DEBUG_GET_OBJ_IMPL(AccelerationStructure) SLANG_GFX_DEBUG_GET_OBJ_IMPL(Fence) +SLANG_GFX_DEBUG_GET_OBJ_IMPL(ShaderTable) #undef SLANG_GFX_DEBUG_GET_OBJ_IMPL @@ -802,6 +803,15 @@ Result DebugDevice::getTextureAllocationInfo( return baseObject->getTextureAllocationInfo(desc, outSize, outAlignment); } +Result DebugDevice::createShaderTable(const IShaderTable::Desc& desc, IShaderTable** outTable) +{ + SLANG_GFX_API_FUNC; + RefPtr<DebugShaderTable> result = new DebugShaderTable(); + SLANG_RETURN_ON_FAIL(baseObject->createShaderTable(desc, result->baseObject.writeRef())); + returnComPtr(outTable, result); + return SLANG_OK; +} + IResource::Type DebugBufferResource::getType() { SLANG_GFX_API_FUNC; @@ -1477,13 +1487,14 @@ void DebugRayTracingCommandEncoder::bindPipeline( } void DebugRayTracingCommandEncoder::dispatchRays( - const char* rayGenShaderName, + uint32_t rayGenShaderIndex, + IShaderTable* shaderTable, int32_t width, int32_t height, int32_t depth) { SLANG_GFX_API_FUNC; - baseObject->dispatchRays(rayGenShaderName, width, height, depth); + baseObject->dispatchRays(rayGenShaderIndex, getInnerObj(shaderTable), width, height, depth); } const ICommandQueue::Desc& DebugCommandQueue::getDesc() |
