Results 1 to 3 of 3

Thread: VK_KHR_swapchain extension missing (unable to create a logical device)?

  1. #1
    Newbie Newbie
    Join Date
    Nov 2018
    Posts
    2

    VK_KHR_swapchain extension missing (unable to create a logical device)?

    Hello!

    I am unable to create a logical device when I add VK_KHR_SWAPCHAIN_EXTENSION_NAME to ppEnabledExtensionNames (in the VkDeviceCreateInfo struct). At first I was suspicious that I was missing a driver but the spinning cube demo that came with the installation works just fine.

    Here is the header code:
    Code :
    std::vector<const char*> deviceExtensions;

    The constructor code:
    Code :
    const char* deviceExtensionsString = "VK_KHR_swapchain"; //VK_KHR_SWAPCHAIN_EXTENSION_NAME; (I've tried both!)
    deviceExtensions.push_back(standardValidationString);

    And the logical device creation code:
    Code :
    ...
     
    createInfo.enabledExtensionCount = static_cast<uint32_t>(deviceExtensions.size());
    createInfo.ppEnabledExtensionNames = deviceExtensions.data();
     
    if (vkCreateDevice(physicalDevice, &createInfo, nullptr, &device) != VK_SUCCESS) 
    {
        throw std::runtime_error("[CRITICAL ERROR] Failed to create logical device!");
    }

    Thanks for any help!
    Alek

  2. #2
    Senior Member Regular Contributor
    Join Date
    Mar 2016
    Posts
    351
    Code :
    const char* deviceExtensionsString = "VK_KHR_swapchain"; //VK_KHR_SWAPCHAIN_EXTENSION_NAME; (I've tried both!)
    deviceExtensions.push_back(standardValidationString);

    You are pushing to the vector a different variable. Furthemore standardValidationString probably contains something unsupported, which is causing the error.

  3. #3
    Newbie Newbie
    Join Date
    Nov 2018
    Posts
    2
    Hahahaha thank you, can't believe I missed that typo for two hours of debugging!

Similar Threads

  1. Device Groups and Logical Device
    By bryanmcconkey in forum Vulkan
    Replies: 2
    Last Post: 04-04-2018, 06:59 AM
  2. Unable to create core profile
    By The Chosen Half in forum OpenGL: Windows
    Replies: 7
    Last Post: 05-10-2015, 09:55 AM
  3. The DOM was unable to create an element
    By rumblepak in forum COLLADA
    Replies: 3
    Last Post: 02-05-2006, 11:59 AM
  4. Missing gl/device.h
    By Ball in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 11-02-2004, 08:07 AM
  5. MIssing gl/device.h
    By Ball in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 11-02-2004, 05:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean