X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fbackends%2Fvulkan%2Fcommands_backend.cpp;h=84bc104a3e372fd1f19832d8a9a52562ec7411c4;hp=a5f2ceb5ad9dcd38789c14801cf0ca759a83b2ce;hb=bbdf52425b736a59d01dda215458c3a1c9bdb320;hpb=37076ae3c42e963d8ee90e54f06da1227d85129f diff --git a/source/backends/vulkan/commands_backend.cpp b/source/backends/vulkan/commands_backend.cpp index a5f2ceb5..84bc104a 100644 --- a/source/backends/vulkan/commands_backend.cpp +++ b/source/backends/vulkan/commands_backend.cpp @@ -195,8 +195,6 @@ void VulkanCommands::use_pipeline(const PipelineState *ps) end_render_pass(); pipeline_state = ps; - if(pipeline_state) - pipeline_state->refresh(); } void VulkanCommands::clear(const ClearValue *values) @@ -222,6 +220,7 @@ void VulkanCommands::draw_instanced(const Batch &batch, unsigned count) if(!framebuffer) begin_render_pass(false, 0); + pipeline_state->refresh(); pipeline_state->apply(current_buffer); unsigned first_index = batch.get_offset()/batch.get_index_size(); vk.CmdDrawIndexed(current_buffer, batch.size(), count, first_index, 0, 0);