mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-16 02:49:17 +01:00
Allow supplying push constants to GetPipeline
This commit is contained in:
parent
1c8863ec3b
commit
cb0b132486
@ -315,7 +315,7 @@ namespace skyline::gpu::cache {
|
||||
|
||||
GraphicsPipelineCache::CompiledPipeline::CompiledPipeline(const PipelineCacheEntry &entry) : descriptorSetLayout(*entry.descriptorSetLayout), pipelineLayout(*entry.pipelineLayout), pipeline(*entry.pipeline) {}
|
||||
|
||||
GraphicsPipelineCache::CompiledPipeline GraphicsPipelineCache::GetCompiledPipeline(const PipelineState &state, span<vk::DescriptorSetLayoutBinding> layoutBindings) {
|
||||
GraphicsPipelineCache::CompiledPipeline GraphicsPipelineCache::GetCompiledPipeline(const PipelineState &state, span<const vk::DescriptorSetLayoutBinding> layoutBindings, span<const vk::PushConstantRange> pushConstantRanges) {
|
||||
std::unique_lock lock(mutex);
|
||||
|
||||
auto it{pipelineCache.find(state)};
|
||||
@ -333,6 +333,8 @@ namespace skyline::gpu::cache {
|
||||
vk::raii::PipelineLayout pipelineLayout{gpu.vkDevice, vk::PipelineLayoutCreateInfo{
|
||||
.pSetLayouts = &*descriptorSetLayout,
|
||||
.setLayoutCount = 1,
|
||||
.pPushConstantRanges = pushConstantRanges.data(),
|
||||
.pushConstantRangeCount = static_cast<u32>(pushConstantRanges.size()),
|
||||
}};
|
||||
|
||||
boost::container::small_vector<vk::AttachmentDescription, 8> attachmentDescriptions;
|
||||
|
@ -155,6 +155,6 @@ namespace skyline::gpu::cache {
|
||||
* @note Shader specializiation constants are **not** supported and will result in UB
|
||||
* @note Input/Resolve attachments are **not** supported and using them with the supplied pipeline will result in UB
|
||||
*/
|
||||
CompiledPipeline GetCompiledPipeline(const PipelineState& state, span<vk::DescriptorSetLayoutBinding> layoutBindings);
|
||||
CompiledPipeline GetCompiledPipeline(const PipelineState& state, span<const vk::DescriptorSetLayoutBinding> layoutBindings, span<const vk::PushConstantRange> pushConstantRanges = {});
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user