[Vulkan] graphics controller, multiple pipelines
[platform/core/uifw/dali-core.git] / dali / graphics / vulkan / vulkan-command-buffer.cpp
index db38136..ff64a71 100644 (file)
@@ -140,7 +140,6 @@ struct CommandBuffer::Impl
     mGraphics.GetDevice().freeCommandBuffers( mOwnerCommandPool.GetPool(), mCommandBuffer );
   }
 
-#pragma GCC diagnostic pop
 
   /** Push wait semaphores */
   void PushWaitSemaphores( const std::vector<vk::Semaphore>&          semaphores,
@@ -293,7 +292,7 @@ struct CommandBuffer::Impl
       for( auto&& imageBarrier : imageBarriers )
       {
         ImageRef imageResource{};
-        if( imageResource = mGraphics.FindImage( imageBarrier.image ) )
+        if( (imageResource = mGraphics.FindImage( imageBarrier.image )) )
         {
           PushResource( imageResource );
         }
@@ -447,7 +446,7 @@ void CommandBuffer::BindIndexBuffer( BufferRef buffer, uint32_t offset, vk::Inde
 }
 
 void CommandBuffer::BindVertexBuffer( uint32_t                               binding,
-                                      Dali::Graphics::Vulkan::Handle<Buffer> buffer,
+                                      const Dali::Graphics::Vulkan::Handle<Buffer>& buffer,
                                       vk::DeviceSize                         offset )
 {
   mImpl->BindVertexBuffers( binding, 1, std::vector<Handle<Buffer>>( {buffer} ), &offset );
@@ -535,6 +534,7 @@ vk::ImageMemoryBarrier CommandBuffer::ImageLayoutTransitionBarrier( ImageRef ima
 }
 
 vk::ImageMemoryBarrier CommandBuffer::ImageLayoutTransitionBarrier( ImageRef image,
+                                                     vk::ImageLayout        oldLayout,
                                                      vk::ImageLayout        newLayout,
                                                      vk::ImageAspectFlags   aspectMask
 ) const
@@ -543,8 +543,6 @@ vk::ImageMemoryBarrier CommandBuffer::ImageLayoutTransitionBarrier( ImageRef ima
   vk::AccessFlags  srcAccessMask, dstAccessMask;
   vk::PipelineStageFlags srcStageMask, dstStageMask;
 
-  auto oldLayout = image->GetVkImageLayout();
-
   switch( oldLayout )
   {
     case vk::ImageLayout::ePreinitialized: