Add fallback for pipeline creation
Wait... you have to check an extra boolean to know if the extension is actually supported?! What were they thinking?!
This commit is contained in:
parent
dd782038e4
commit
b1a61d5f30
2 changed files with 7 additions and 1 deletions
|
|
@ -374,6 +374,11 @@ void VkRenderPassManager::CreateZMinMaxPipeline()
|
|||
|
||||
VkRenderPassSetup::VkRenderPassSetup(VulkanRenderDevice* fb, const VkRenderPassKey &key) : PassKey(key), fb(fb)
|
||||
{
|
||||
const auto device = fb->GetDevice();
|
||||
|
||||
UsePipelineLibrary = device->SupportsExtension(VK_EXT_GRAPHICS_PIPELINE_LIBRARY_EXTENSION_NAME) // Is this supported?
|
||||
&& device->EnabledFeatures.GraphicsPipelineLibrary.graphicsPipelineLibrary; // Well yes, but actually no.
|
||||
|
||||
// Precompile material fragment shaders:
|
||||
if (gl_ubershaders)
|
||||
{
|
||||
|
|
@ -576,7 +581,7 @@ PipelineData* VkRenderPassSetup::GetGeneralizedPipeline(const VkPipelineKey& key
|
|||
if (item == GeneralizedPipelines.end())
|
||||
{
|
||||
UniformStructHolder uniforms;
|
||||
auto pipeline = LinkPipeline(gkey, true, uniforms);
|
||||
auto pipeline = UsePipelineLibrary ? LinkPipeline(gkey, true, uniforms) : CreateWithStats(*CreatePipeline(gkey, true, uniforms), "Generalized (no pipeline library)");
|
||||
auto ptr = pipeline.get();
|
||||
auto& value = GeneralizedPipelines[gkey];
|
||||
value.pipeline = std::move(pipeline);
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@ private:
|
|||
void AddFragmentOutputInterface(GraphicsPipelineBuilder& builder, FRenderStyle renderStyle, VkColorComponentFlags colorMask);
|
||||
void AddDynamicState(GraphicsPipelineBuilder& builder);
|
||||
|
||||
bool UsePipelineLibrary = false;
|
||||
VulkanRenderDevice* fb = nullptr;
|
||||
VkRenderPassKey PassKey;
|
||||
std::unique_ptr<VulkanRenderPass> RenderPasses[8];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue