summaryrefslogtreecommitdiff
path: root/tools/gfx/vulkan/render-vk.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gfx/vulkan/render-vk.cpp')
-rw-r--r--tools/gfx/vulkan/render-vk.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/gfx/vulkan/render-vk.cpp b/tools/gfx/vulkan/render-vk.cpp
index 0a66c653b..ebf25513b 100644
--- a/tools/gfx/vulkan/render-vk.cpp
+++ b/tools/gfx/vulkan/render-vk.cpp
@@ -2530,6 +2530,14 @@ public:
return SLANG_OK;
}
+ Result setPipelineStateWithRootObjectImpl(IPipelineState* state, IShaderObject* inObject)
+ {
+ IShaderObject* rootObject = nullptr;
+ SLANG_RETURN_ON_FAIL(setPipelineStateImpl(state, &rootObject));
+ static_cast<ShaderObjectBase*>(rootObject)->copyFrom(inObject, m_commandBuffer->m_transientHeap);
+ return SLANG_OK;
+ }
+
void flushBindingState(VkPipelineBindPoint pipelineBindPoint)
{
auto& api = *m_api;
@@ -5098,6 +5106,12 @@ public:
return setPipelineStateImpl(pipelineState, outRootObject);
}
+ virtual SLANG_NO_THROW Result SLANG_MCALL
+ bindPipelineWithRootObject(IPipelineState* pipelineState, IShaderObject* rootObject) override
+ {
+ return setPipelineStateWithRootObjectImpl(pipelineState, rootObject);
+ }
+
virtual SLANG_NO_THROW void SLANG_MCALL
setViewports(uint32_t count, const Viewport* viewports) override
{
@@ -5380,6 +5394,12 @@ public:
return setPipelineStateImpl(pipelineState, outRootObject);
}
+ virtual SLANG_NO_THROW Result SLANG_MCALL bindPipelineWithRootObject(
+ IPipelineState* pipelineState, IShaderObject* rootObject) override
+ {
+ return setPipelineStateWithRootObjectImpl(pipelineState, rootObject);
+ }
+
virtual SLANG_NO_THROW void SLANG_MCALL dispatchCompute(int x, int y, int z) override
{
auto pipeline = static_cast<PipelineStateImpl*>(m_currentPipeline.Ptr());
@@ -5653,6 +5673,13 @@ public:
setPipelineStateImpl(pipeline, outRootObject);
}
+ virtual SLANG_NO_THROW Result SLANG_MCALL bindPipelineWithRootObject(
+ IPipelineState* pipelineState, IShaderObject* rootObject) override
+ {
+ return setPipelineStateWithRootObjectImpl(pipelineState, rootObject);
+ }
+
+ // TODO: Implement after implementing createRayTracingPipelineState
virtual SLANG_NO_THROW void SLANG_MCALL dispatchRays(
uint32_t raygenShaderIndex,
IShaderTable* shaderTable,