#include <dali/graphics/vulkan/vulkan-shader.h>
#include <dali/graphics/vulkan/vulkan-descriptor-set.h>
#include <dali/graphics/vulkan/vulkan-framebuffer.h>
-#include <dali/graphics/vulkan/vulkan-graphics-controller.h>
+#include <dali/graphics/vulkan/api/vulkan-api-controller.h>
+#include <dali/graphics/vulkan/vulkan-pipeline-cache.h>
#include <dali/graphics-api/graphics-api-controller.h>
#define VK_KHR_XCB_SURFACE_EXTENSION_NAME "VK_KHR_xcb_surface"
#endif
-#include <iostream>
-
namespace Dali
{
namespace Graphics
};
Graphics::Graphics() = default;
-
Graphics::~Graphics() = default;
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wframe-larger-than="
Platform Graphics::GetDefaultPlatform() const
{
{
if(!mGfxController)
{
- mGfxController = Dali::Graphics::Vulkan::Controller::New(*this);
+ mGfxController = Dali::Graphics::VulkanAPI::Controller::New(*this);
}
- return *mGfxController.get();
+ return *mGfxController;
}
std::vector<const char*> Graphics::PrepareDefaultInstanceExtensions()
mDeviceMemoryManager = GpuMemoryManager::New( *this );
}
-#pragma GCC diagnostic pop
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wframe-larger-than="
void Graphics::GetPhysicalDeviceProperties()
{
// store data on heap to keep object smaller
mPhysicalDeviceFeatures =
MakeUnique<vk::PhysicalDeviceFeatures>(mPhysicalDevice.getFeatures());
}
-#pragma GCC diagnostic pop
void Graphics::GetQueueFamilyProperties()
{
- mQueueFamilyProperties = std::move(mPhysicalDevice.getQueueFamilyProperties());
+ mQueueFamilyProperties = mPhysicalDevice.getQueueFamilyProperties();
}
FBID Graphics::CreateSurface(std::unique_ptr< SurfaceFactory > surfaceFactory)
{
auto swapchain = Swapchain::New( *this,
GetGraphicsQueue(0u),
- surface, 2, 0 );
+ surface, 4, 0 );
// store swapchain in the correct pair
for( auto&& val : mSurfaceFBIDMap )
return mSurfaceFBIDMap[surfaceId].swapchain;
}
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wframe-larger-than="
std::vector< vk::DeviceQueueCreateInfo > Graphics::GetQueueCreateInfos()
{
// surface is needed in order to find a family that supports presentation to this surface
return queueInfos;
}
-#pragma GCC diagnostic pop
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wframe-larger-than="
void Graphics::CreateDevice()
{
auto queueInfos = GetQueueCreateInfos();
// todo: present queue
}
}
+
+ mPipelineDatabase = std::make_unique<PipelineCache>( *this );
}
-#pragma GCC diagnostic pop
vk::Device Graphics::GetDevice() const
{