diff options
| author | skallweitNV <64953474+skallweitNV@users.noreply.github.com> | 2024-05-12 00:11:44 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-11 15:11:44 -0700 |
| commit | e0054151b5b1b4bc44312e3ca737aa2a9a04ff35 (patch) | |
| tree | 8d063554fd9c71e9bad3b76a806d604f28dbf4b1 /tools/gfx | |
| parent | 86a9da1573e1eea62fbaeddc97521f2b97ebc255 (diff) | |
add missing Result to IRayTracingCommandEncoder::bindPipline (#4148)
Diffstat (limited to 'tools/gfx')
| -rw-r--r-- | tools/gfx/d3d12/d3d12-command-encoder.cpp | 4 | ||||
| -rw-r--r-- | tools/gfx/d3d12/d3d12-command-encoder.h | 2 | ||||
| -rw-r--r-- | tools/gfx/debug-layer/debug-command-encoder.cpp | 5 | ||||
| -rw-r--r-- | tools/gfx/debug-layer/debug-command-encoder.h | 2 | ||||
| -rw-r--r-- | tools/gfx/gfx.slang | 2 | ||||
| -rw-r--r-- | tools/gfx/vulkan/vk-command-encoder.cpp | 4 | ||||
| -rw-r--r-- | tools/gfx/vulkan/vk-command-encoder.h | 2 |
7 files changed, 11 insertions, 10 deletions
diff --git a/tools/gfx/d3d12/d3d12-command-encoder.cpp b/tools/gfx/d3d12/d3d12-command-encoder.cpp index e4d03193b..b88bf3168 100644 --- a/tools/gfx/d3d12/d3d12-command-encoder.cpp +++ b/tools/gfx/d3d12/d3d12-command-encoder.cpp @@ -1339,10 +1339,10 @@ void RayTracingCommandEncoderImpl::deserializeAccelerationStructure( D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_DESERIALIZE); } -void RayTracingCommandEncoderImpl::bindPipeline( +Result RayTracingCommandEncoderImpl::bindPipeline( IPipelineState* state, IShaderObject** outRootObject) { - bindPipelineImpl(state, outRootObject); + return bindPipelineImpl(state, outRootObject); } Result RayTracingCommandEncoderImpl::dispatchRays( diff --git a/tools/gfx/d3d12/d3d12-command-encoder.h b/tools/gfx/d3d12/d3d12-command-encoder.h index 0632084cf..034749946 100644 --- a/tools/gfx/d3d12/d3d12-command-encoder.h +++ b/tools/gfx/d3d12/d3d12-command-encoder.h @@ -328,7 +328,7 @@ public: serializeAccelerationStructure(DeviceAddress dest, IAccelerationStructure* source) override; virtual SLANG_NO_THROW void SLANG_MCALL deserializeAccelerationStructure( IAccelerationStructure* dest, DeviceAddress source) override; - virtual SLANG_NO_THROW void SLANG_MCALL + virtual SLANG_NO_THROW Result SLANG_MCALL bindPipeline(IPipelineState* state, IShaderObject** outRootObject) override; virtual SLANG_NO_THROW Result SLANG_MCALL bindPipelineWithRootObject(IPipelineState* state, IShaderObject* rootObject) override diff --git a/tools/gfx/debug-layer/debug-command-encoder.cpp b/tools/gfx/debug-layer/debug-command-encoder.cpp index b7b06c2f4..6838732a0 100644 --- a/tools/gfx/debug-layer/debug-command-encoder.cpp +++ b/tools/gfx/debug-layer/debug-command-encoder.cpp @@ -470,16 +470,17 @@ void DebugRayTracingCommandEncoder::deserializeAccelerationStructure( baseObject->deserializeAccelerationStructure(getInnerObj(dest), source); } -void DebugRayTracingCommandEncoder::bindPipeline( +Result DebugRayTracingCommandEncoder::bindPipeline( IPipelineState* state, IShaderObject** outRootObject) { SLANG_GFX_API_FUNC; auto innerPipeline = getInnerObj(state); IShaderObject* innerRootObject = nullptr; commandBuffer->rootObject.reset(); - baseObject->bindPipeline(innerPipeline, &innerRootObject); + Result result = baseObject->bindPipeline(innerPipeline, &innerRootObject); commandBuffer->rootObject.baseObject.attach(innerRootObject); *outRootObject = &commandBuffer->rootObject; + return result; } Result DebugRayTracingCommandEncoder::bindPipelineWithRootObject( diff --git a/tools/gfx/debug-layer/debug-command-encoder.h b/tools/gfx/debug-layer/debug-command-encoder.h index a0c03e84c..152a1a733 100644 --- a/tools/gfx/debug-layer/debug-command-encoder.h +++ b/tools/gfx/debug-layer/debug-command-encoder.h @@ -276,7 +276,7 @@ public: virtual SLANG_NO_THROW void SLANG_MCALL deserializeAccelerationStructure( IAccelerationStructure* dest, DeviceAddress source) override; - virtual SLANG_NO_THROW void SLANG_MCALL + virtual SLANG_NO_THROW Result SLANG_MCALL bindPipeline(IPipelineState* state, IShaderObject** outRootObject) override; virtual SLANG_NO_THROW Result SLANG_MCALL bindPipelineWithRootObject(IPipelineState* state, IShaderObject* rootObject) override; diff --git a/tools/gfx/gfx.slang b/tools/gfx/gfx.slang index 37ae5182d..7bdf4cff7 100644 --- a/tools/gfx/gfx.slang +++ b/tools/gfx/gfx.slang @@ -1519,7 +1519,7 @@ public interface IRayTracingCommandEncoder : IResourceCommandEncoder public void serializeAccelerationStructure(DeviceAddress dest, IAccelerationStructure source); public void deserializeAccelerationStructure(IAccelerationStructure dest, DeviceAddress source); - public void bindPipeline(IPipelineState state, out IShaderObject rootObject); + public Result bindPipeline(IPipelineState state, out IShaderObject rootObject); // Sets the current pipeline state along with a pre-created mutable root shader object. public Result bindPipelineWithRootObject(IPipelineState state, IShaderObject rootObject); diff --git a/tools/gfx/vulkan/vk-command-encoder.cpp b/tools/gfx/vulkan/vk-command-encoder.cpp index b415f59d7..d0fc0a4fd 100644 --- a/tools/gfx/vulkan/vk-command-encoder.cpp +++ b/tools/gfx/vulkan/vk-command-encoder.cpp @@ -1443,9 +1443,9 @@ void RayTracingCommandEncoder::deserializeAccelerationStructure( m_commandBuffer->m_commandBuffer, ©Info); } -void RayTracingCommandEncoder::bindPipeline(IPipelineState* pipeline, IShaderObject** outRootObject) +Result RayTracingCommandEncoder::bindPipeline(IPipelineState* pipeline, IShaderObject** outRootObject) { - setPipelineStateImpl(pipeline, outRootObject); + return setPipelineStateImpl(pipeline, outRootObject); } Result RayTracingCommandEncoder::bindPipelineWithRootObject( diff --git a/tools/gfx/vulkan/vk-command-encoder.h b/tools/gfx/vulkan/vk-command-encoder.h index ae6d510ea..05c47920e 100644 --- a/tools/gfx/vulkan/vk-command-encoder.h +++ b/tools/gfx/vulkan/vk-command-encoder.h @@ -336,7 +336,7 @@ public: virtual SLANG_NO_THROW void SLANG_MCALL deserializeAccelerationStructure( IAccelerationStructure* dest, DeviceAddress source) override; - virtual SLANG_NO_THROW void SLANG_MCALL + virtual SLANG_NO_THROW Result SLANG_MCALL bindPipeline(IPipelineState* pipeline, IShaderObject** outRootObject) override; virtual SLANG_NO_THROW Result SLANG_MCALL bindPipelineWithRootObject( |
