can't use shared_ptr on SDL_Window
This commit is contained in:
13
external/parallel-rdp/ParallelRDPWrapper.cpp
vendored
13
external/parallel-rdp/ParallelRDPWrapper.cpp
vendored
@@ -23,8 +23,7 @@ Program *fullscreen_quad_program;
|
||||
|
||||
// Copied and modified from WSI::init_context_from_platform
|
||||
Util::IntrusivePtr<Context> InitVulkanContext(WSIPlatform *platform, unsigned num_thread_indices,
|
||||
const Context::SystemHandles &system_handles,
|
||||
InstanceFactory *instance_factory) {
|
||||
const Context::SystemHandles &system_handles) {
|
||||
VK_ASSERT(platform);
|
||||
auto instance_ext = platform->get_instance_extensions();
|
||||
auto device_ext = platform->get_device_extensions();
|
||||
@@ -33,9 +32,6 @@ Util::IntrusivePtr<Context> InitVulkanContext(WSIPlatform *platform, unsigned nu
|
||||
new_context->set_application_info(platform->get_application_info());
|
||||
new_context->set_num_thread_indices(num_thread_indices);
|
||||
new_context->set_system_handles(system_handles);
|
||||
if (instance_factory) {
|
||||
new_context->set_instance_factory(instance_factory);
|
||||
}
|
||||
|
||||
if (!new_context->init_instance(instance_ext.data(), instance_ext.size(), CONTEXT_CREATION_ENABLE_ADVANCED_WSI_BIT)) {
|
||||
Util::panic("Failed to create Vulkan instance.\n");
|
||||
@@ -57,8 +53,7 @@ Util::IntrusivePtr<Context> InitVulkanContext(WSIPlatform *platform, unsigned nu
|
||||
return new_context;
|
||||
}
|
||||
|
||||
void ParallelRDP::LoadWSIPlatform(const std::shared_ptr<InstanceFactory> &instanceFactory,
|
||||
const std::shared_ptr<WSIPlatform> &wsi_platform,
|
||||
void ParallelRDP::LoadWSIPlatform(const std::shared_ptr<WSIPlatform> &wsi_platform,
|
||||
const std::shared_ptr<WindowInfo> &newWindowInfo) {
|
||||
wsi = std::make_shared<WSI>();
|
||||
wsi->set_backbuffer_srgb(false);
|
||||
@@ -66,7 +61,7 @@ void ParallelRDP::LoadWSIPlatform(const std::shared_ptr<InstanceFactory> &instan
|
||||
wsi->set_present_mode(PresentMode::SyncToVBlank);
|
||||
Context::SystemHandles handles;
|
||||
|
||||
if (!wsi->init_from_existing_context(InitVulkanContext(wsi_platform.get(), 1, handles, instanceFactory.get()))) {
|
||||
if (!wsi->init_from_existing_context(InitVulkanContext(wsi_platform.get(), 1, handles))) {
|
||||
Util::panic("Failed to initialize WSI: init_from_existing_context() failed");
|
||||
}
|
||||
|
||||
@@ -83,7 +78,7 @@ void ParallelRDP::LoadWSIPlatform(const std::shared_ptr<InstanceFactory> &instan
|
||||
|
||||
void ParallelRDP::Init(const std::shared_ptr<WSIPlatform> &wsiPlatform,
|
||||
const std::shared_ptr<WindowInfo> &newWindowInfo, const u8 *rdram) {
|
||||
LoadWSIPlatform(nullptr, wsiPlatform, newWindowInfo);
|
||||
LoadWSIPlatform(wsiPlatform, newWindowInfo);
|
||||
|
||||
ResourceLayout vertLayout;
|
||||
ResourceLayout fragLayout;
|
||||
|
||||
Reference in New Issue
Block a user