Support binding pipelines in state updater

This commit is contained in:
Billy Laws 2022-09-29 20:35:34 +01:00
parent f42a0df72c
commit 0867c593be

View File

@ -230,6 +230,15 @@ namespace skyline::gpu::interconnect::maxwell3d {
};
using SetDescriptorSetWithUpdateCmd = CmdHolder<SetDescriptorSetWithUpdateCmdImpl>;
struct SetPipelineCmdImpl {
void Record(GPU &gpu, vk::raii::CommandBuffer &commandBuffer) {
commandBuffer.bindPipeline(vk::PipelineBindPoint::eGraphics, pipeline);
}
vk::Pipeline pipeline;
};
using SetPipelineCmd = CmdHolder<SetPipelineCmdImpl>;
/**
* @brief Single-use helper for recording a batch of state updates into a command buffer
*/
@ -413,5 +422,11 @@ namespace skyline::gpu::interconnect::maxwell3d {
.dstSet = dstSet,
});
}
void SetPipeline(vk::Pipeline pipeline) {
AppendCmd<SetPipelineCmd>({
.pipeline = pipeline,
});
}
};
}