Overv / VulkanTutorial

Tutorial for the Vulkan graphics and compute API
https://vulkan-tutorial.com
Creative Commons Attribution Share Alike 4.0 International
3.08k stars 513 forks source link

I met a segmentation fault #228

Open fake-rookie opened 3 years ago

fake-rookie commented 3 years ago

Following is code:

#include <cstdlib>
#include <iostream>
#include <stdexcept>
#include <GLFW/glfw3.h>
#include <vulkan/vulkan.h>

#define GLFW_INCLUDE_VULKAN

const uint32_t WIDTH  = 800;
const uint32_t HEIGHT = 600;

class HTA {
public:
    void run();
private:
    GLFWwindow *window;
    VkInstance instance;

    void initWindow();
    void initVulkan();
    void mainLoop();
    void cleanUp();
    void createInstance();
};

void HTA::run()
{
    initWindow();
    initVulkan();
    mainLoop();
    cleanUp();
}

void HTA::initWindow()
{
    glfwInit();

    glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
    glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);

    window = glfwCreateWindow(WIDTH, HEIGHT, "Vulkan Triangle", nullptr, nullptr);
}

void HTA::initVulkan()
{
    createInstance();
}

void HTA::mainLoop()
{
    while (!glfwWindowShouldClose(window)) {
        glfwPollEvents();
    }
}

void HTA::cleanUp()
{
    vkDestroyInstance(instance, nullptr);
    glfwDestroyWindow(window);
    glfwTerminate();
}

void HTA::createInstance()

{
    VkApplicationInfo appInfo{};
    appInfo.sType              = VK_STRUCTURE_TYPE_APPLICATION_INFO;
    appInfo.apiVersion         = VK_API_VERSION_1_0;
    appInfo.pEngineName        = "No Engine";
    appInfo.engineVersion      = VK_MAKE_VERSION(1, 0, 0);
    appInfo.pApplicationName   = "Hello Triangle";
    appInfo.applicationVersion = VK_MAKE_VERSION(1, 0, 0);

    VkInstanceCreateInfo createInfo;
    createInfo.sType            = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
    createInfo.pApplicationInfo = &appInfo;

    uint32_t glfwExtensionCount        = 0;
    const char **glfwExtensions        = glfwGetRequiredInstanceExtensions(&glfwExtensionCount);
    createInfo.enabledExtensionCount   = glfwExtensionCount;
    createInfo.ppEnabledExtensionNames = glfwExtensions;
    createInfo.enabledLayerCount       = 0;

    if (vkCreateInstance(&createInfo, nullptr, &instance) != VK_SUCCESS) {
        throw std::runtime_error("failed to create Vulkan Instance!");
    }
}

int main()
{
    HTA app;

    try {
        app.run();
    } catch (const std::exception &e) {
        std::cerr << e.what() << "\n";
        return EXIT_FAILURE;
    }

    return EXIT_SUCCESS;
}

compile with:

g++ --std=c++17 -Wall -Wextra -O2 -lglfw -lvulkan -ldl -lpthread -lX11 -lXxf86vm -lXrandr -lXi -o 00base 00base.cpp

gcc version is 10.2

show me the segmentation fault when i run it

zsh: segmentation fault (core dumped) ./00base

what's the problem?

Krenodeno commented 3 years ago

Can you run it with debugger to see where it comes from ? it's always a good way to find a bug.

I can see a thing from the code standpoint: the GLFW_INCLUDE_VULKAN define have to be defined before including glfw, but you either include vulkan yourself or let glfw do it for you with the define, but don't do the two.

fake-rookie commented 3 years ago

I already add -g option to compiled and run with gdb. Set many breakpoint and run it. But no found. (also no coredump file generator)

I tried to change GLFW_INCLUDE_VULKAN as your suggested. The same result.

Krenodeno commented 3 years ago

Okay, can you modify the glfw initialization step like this :

void HTA::initWindow()
{
    if (!glfwInit()) {
        exit -1;
    }
    glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
    glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);

    window = glfwCreateWindow(WIDTH, HEIGHT, "Vulkan Triangle", nullptr, nullptr);
    if (window == NULL) {
        exit -2;
    }
}

It should help telling if it comes from glfw.

Krenodeno commented 3 years ago

I just tested your exemple, and I did not get any error, so I suggest you verify if your installation is correct: GLFW is installed as a library and a development library, and same for vulkan (or via the sdk).

fake-rookie commented 3 years ago

I tested this code:

void HTA::initWindow()
{
    if (!glfwInit()) {
        exit -1;
    }
    glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
    glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);

    window = glfwCreateWindow(WIDTH, HEIGHT, "Vulkan Triangle", nullptr, nullptr);
    if (window == NULL) {
        exit -2;
    }
}

Also the same result.


I think the GLFW is no problem with installation.

I wrote other GLFW program can work as normal.

Maybe the Vulkancan has problem.

But i run the vkcube is normal.

Following is what Vulkan package i installed.

extra/spirv-tools 2020.6-1 (vulkan-devel) [installed]
extra/vulkan-headers 1:1.2.171-1 (vulkan-devel) [installed]
extra/vulkan-icd-loader 1.2.171-1 [installed]
extra/vulkan-intel 20.3.4-3 [installed]
extra/vulkan-tools 1.2.171-1 (vulkan-devel) [installed]
extra/vulkan-validation-layers 1.2.166-1 (vulkan-devel) [installed]

I use Arch Linux and installed that with pacman.

Did not download the SDK directly.

Is that a problem?

Krenodeno commented 3 years ago

It's odd, I also developed some Vulkan programs on an Arch machine and never had this behavior.

Are the examples running ? like vulkaninfo or vkcube

mj-saunders commented 3 years ago

@fake-rookie do you have more than one GPU?

Since I updated kernel recently, I got segfaults that I don't remember having before. I've got an intel GPU and discrete nvidia in my laptop, running Arch.

Have a feeling this is different from your issue, as you can run vkcube without something like the following.

VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/intel_icd.x86_64.json vkcube ^ the icd file may of course be different

fake-rookie commented 3 years ago

The information of vulkaninfo:

==========
VULKANINFO
==========

Vulkan Instance Version: 1.2.171

Instance Extensions: count = 18
===============================
        VK_EXT_acquire_xlib_display            : extension revision 1
        VK_EXT_debug_report                    : extension revision 6
        VK_EXT_debug_utils                     : extension revision 2
        VK_EXT_direct_mode_display             : extension revision 1
        VK_EXT_display_surface_counter         : extension revision 1
        VK_KHR_device_group_creation           : extension revision 1
        VK_KHR_display                         : extension revision 21
        VK_KHR_external_fence_capabilities     : extension revision 1
        VK_KHR_external_memory_capabilities    : extension revision 1
        VK_KHR_external_semaphore_capabilities : extension revision 1
        VK_KHR_get_display_properties2         : extension revision 1
        VK_KHR_get_physical_device_properties2 : extension revision 1
        VK_KHR_get_surface_capabilities2       : extension revision 1
        VK_KHR_surface                         : extension revision 25
        VK_KHR_surface_protected_capabilities  : extension revision 1
        VK_KHR_wayland_surface                 : extension revision 6
        VK_KHR_xcb_surface                     : extension revision 6
        VK_KHR_xlib_surface                    : extension revision 6

Layers: count = 2
=================
VK_LAYER_KHRONOS_validation (Khronos Validation Layer) Vulkan version 1.2.166, layer version 1:
        Layer Extensions: count = 3
                VK_EXT_debug_report        : extension revision 9
                VK_EXT_debug_utils         : extension revision 1
                VK_EXT_validation_features : extension revision 2
        Devices: count = 1
                GPU id = 0 (Intel(R) HD Graphics 530 (SKL GT2))
                Layer-Device Extensions: count = 3
                        VK_EXT_debug_marker     : extension revision 4
                        VK_EXT_tooling_info     : extension revision 1
                        VK_EXT_validation_cache : extension revision 1

VK_LAYER_LUNARG_vktrace (Vktrace tracing library) Vulkan version 1.2.141, layer version 1:
        Layer Extensions: count = 0
        Devices: count = 1
                GPU id = 0 (Intel(R) HD Graphics 530 (SKL GT2))
                Layer-Device Extensions: count = 0

Presentable Surfaces:
=====================
GPU id : 0 (Intel(R) HD Graphics 530 (SKL GT2)):
        Surface types: count = 2
                VK_KHR_xcb_surface
                VK_KHR_xlib_surface
        Formats: count = 2
                SurfaceFormat[0]:
                        format = FORMAT_B8G8R8A8_SRGB
                        colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
                SurfaceFormat[1]:
                        format = FORMAT_B8G8R8A8_UNORM
                        colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
        Present Modes: count = 4
                PRESENT_MODE_IMMEDIATE_KHR
                PRESENT_MODE_MAILBOX_KHR
                PRESENT_MODE_FIFO_KHR
                PRESENT_MODE_FIFO_RELAXED_KHR
        VkSurfaceCapabilitiesKHR:
        -------------------------
                minImageCount       = 3
                maxImageCount       = 0
                currentExtent:
                        width  = 256
                        height = 256
                minImageExtent:
                        width  = 256
                        height = 256
                maxImageExtent:
                        width  = 256
                        height = 256
                maxImageArrayLayers = 1
                supportedTransforms: count = 1
                        SURFACE_TRANSFORM_IDENTITY_BIT_KHR
                currentTransform    = SURFACE_TRANSFORM_IDENTITY_BIT_KHR
                supportedCompositeAlpha: count = 2
                        COMPOSITE_ALPHA_OPAQUE_BIT_KHR
                        COMPOSITE_ALPHA_INHERIT_BIT_KHR
                supportedUsageFlags: count = 5
                        IMAGE_USAGE_TRANSFER_SRC_BIT
                        IMAGE_USAGE_TRANSFER_DST_BIT
                        IMAGE_USAGE_SAMPLED_BIT
                        IMAGE_USAGE_STORAGE_BIT
                        IMAGE_USAGE_COLOR_ATTACHMENT_BIT
        VkSurfaceCapabilities2EXT:
        --------------------------
                supportedSurfaceCounters: count = 0
                        None
        VkSurfaceProtectedCapabilitiesKHR:
        ----------------------------------
                supportsProtected = false

Device Groups:
==============
Group 0:
        Properties:
                physicalDevices: count = 1
                        Intel(R) HD Graphics 530 (SKL GT2) (ID: 0)
                subsetAllocation = 0

        Present Capabilities:
                Intel(R) HD Graphics 530 (SKL GT2) (ID: 0):
                        Can present images from the following devices: count = 1
                                Intel(R) HD Graphics 530 (SKL GT2) (ID: 0)
                Present modes: count = 1
                        DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR

Device Properties and Extensions:
=================================
GPU0:
VkPhysicalDeviceProperties:
---------------------------
        apiVersion     = 4202641 (1.2.145)
        driverVersion  = 83898372 (0x5003004)
        vendorID       = 0x8086
        deviceID       = 0x191b
        deviceType     = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
        deviceName     = Intel(R) HD Graphics 530 (SKL GT2)

VkPhysicalDeviceLimits:
-----------------------
        maxImageDimension1D                             = 16384
        maxImageDimension2D                             = 16384
        maxImageDimension3D                             = 2048
        maxImageDimensionCube                           = 16384
        maxImageArrayLayers                             = 2048
        maxTexelBufferElements                          = 134217728
        maxUniformBufferRange                           = 134217728
        maxStorageBufferRange                           = 1073741824
        maxPushConstantsSize                            = 128
        maxMemoryAllocationCount                        = 4294967295
        maxSamplerAllocationCount                       = 65536
        bufferImageGranularity                          = 0x00000040
        sparseAddressSpaceSize                          = 0x00000000
        maxBoundDescriptorSets                          = 8
        maxPerStageDescriptorSamplers                   = 65535
        maxPerStageDescriptorUniformBuffers             = 64
        maxPerStageDescriptorStorageBuffers             = 65535
        maxPerStageDescriptorSampledImages              = 65535
        maxPerStageDescriptorStorageImages              = 65535
        maxPerStageDescriptorInputAttachments           = 64
        maxPerStageResources                            = 4294967295
        maxDescriptorSetSamplers                        = 393210
        maxDescriptorSetUniformBuffers                  = 384
        maxDescriptorSetUniformBuffersDynamic           = 8
        maxDescriptorSetStorageBuffers                  = 393210
        maxDescriptorSetStorageBuffersDynamic           = 8
        maxDescriptorSetSampledImages                   = 393210
        maxDescriptorSetStorageImages                   = 393210
        maxDescriptorSetInputAttachments                = 256
        maxVertexInputAttributes                        = 28
        maxVertexInputBindings                          = 28
        maxVertexInputAttributeOffset                   = 2047
        maxVertexInputBindingStride                     = 2048
        maxVertexOutputComponents                       = 128
        maxTessellationGenerationLevel                  = 64
        maxTessellationPatchSize                        = 32
        maxTessellationControlPerVertexInputComponents  = 128
        maxTessellationControlPerVertexOutputComponents = 128
        maxTessellationControlPerPatchOutputComponents  = 128
        maxTessellationControlTotalOutputComponents     = 2048
        maxTessellationEvaluationInputComponents        = 128
        maxTessellationEvaluationOutputComponents       = 128
        maxGeometryShaderInvocations                    = 32
        maxGeometryInputComponents                      = 64
        maxGeometryOutputComponents                     = 128
        maxGeometryOutputVertices                       = 256
        maxGeometryTotalOutputComponents                = 1024
        maxFragmentInputComponents                      = 116
        maxFragmentOutputAttachments                    = 8
        maxFragmentDualSrcAttachments                   = 1
        maxFragmentCombinedOutputResources              = 8
        maxComputeSharedMemorySize                      = 65536
        maxComputeWorkGroupCount: count = 3
                65535
                65535
                65535
        maxComputeWorkGroupInvocations                  = 1792
        maxComputeWorkGroupSize: count = 3
                1792
                1792
                1792
        subPixelPrecisionBits                           = 8
        subTexelPrecisionBits                           = 8
        mipmapPrecisionBits                             = 8
        maxDrawIndexedIndexValue                        = 4294967295
        maxDrawIndirectCount                            = 4294967295
        maxSamplerLodBias                               = 16
        maxSamplerAnisotropy                            = 16
        maxViewports                                    = 16
        maxViewportDimensions: count = 2
                16384
                16384
        viewportBoundsRange: count = 2
                -32768
                32767
        viewportSubPixelBits                            = 13
        minMemoryMapAlignment                           = 4096
        minTexelBufferOffsetAlignment                   = 0x00000010
        minUniformBufferOffsetAlignment                 = 0x00000040
        minStorageBufferOffsetAlignment                 = 0x00000004
        minTexelOffset                                  = -8
        maxTexelOffset                                  = 7
        minTexelGatherOffset                            = -32
        maxTexelGatherOffset                            = 31
        minInterpolationOffset                          = -0.5
        maxInterpolationOffset                          = 0.4375
        subPixelInterpolationOffsetBits                 = 4
        maxFramebufferWidth                             = 16384
        maxFramebufferHeight                            = 16384
        maxFramebufferLayers                            = 2048
        framebufferColorSampleCounts: count = 5
                SAMPLE_COUNT_1_BIT
                SAMPLE_COUNT_2_BIT
                SAMPLE_COUNT_4_BIT
                SAMPLE_COUNT_8_BIT
                SAMPLE_COUNT_16_BIT
        framebufferDepthSampleCounts: count = 5
                SAMPLE_COUNT_1_BIT
                SAMPLE_COUNT_2_BIT
                SAMPLE_COUNT_4_BIT
                SAMPLE_COUNT_8_BIT
                SAMPLE_COUNT_16_BIT
        framebufferStencilSampleCounts: count = 5
                SAMPLE_COUNT_1_BIT
                SAMPLE_COUNT_2_BIT
                SAMPLE_COUNT_4_BIT
                SAMPLE_COUNT_8_BIT
                SAMPLE_COUNT_16_BIT
        framebufferNoAttachmentsSampleCounts: count = 5
                SAMPLE_COUNT_1_BIT
                SAMPLE_COUNT_2_BIT
                SAMPLE_COUNT_4_BIT
                SAMPLE_COUNT_8_BIT
                SAMPLE_COUNT_16_BIT
        maxColorAttachments                             = 8
        sampledImageColorSampleCounts: count = 5
                SAMPLE_COUNT_1_BIT
                SAMPLE_COUNT_2_BIT
                SAMPLE_COUNT_4_BIT
                SAMPLE_COUNT_8_BIT
                SAMPLE_COUNT_16_BIT
        sampledImageIntegerSampleCounts: count = 5
                SAMPLE_COUNT_1_BIT
                SAMPLE_COUNT_2_BIT
                SAMPLE_COUNT_4_BIT
                SAMPLE_COUNT_8_BIT
                SAMPLE_COUNT_16_BIT
        sampledImageDepthSampleCounts: count = 5
                SAMPLE_COUNT_1_BIT
                SAMPLE_COUNT_2_BIT
                SAMPLE_COUNT_4_BIT
                SAMPLE_COUNT_8_BIT
                SAMPLE_COUNT_16_BIT
        sampledImageStencilSampleCounts: count = 5
                SAMPLE_COUNT_1_BIT
                SAMPLE_COUNT_2_BIT
                SAMPLE_COUNT_4_BIT
                SAMPLE_COUNT_8_BIT
                SAMPLE_COUNT_16_BIT
        storageImageSampleCounts: count = 1
                SAMPLE_COUNT_1_BIT
        maxSampleMaskWords                              = 1
        timestampComputeAndGraphics                     = true
        timestampPeriod                                 = 83.3333
        maxClipDistances                                = 8
        maxCullDistances                                = 8
        maxCombinedClipAndCullDistances                 = 8
        discreteQueuePriorities                         = 2
        pointSizeRange: count = 2
                0.125
                255.875
        lineWidthRange: count = 2
                0
                2047.99
        pointSizeGranularity                            = 0.125
        lineWidthGranularity                            = 0.0078125
        strictLines                                     = false
        standardSampleLocations                         = true
        optimalBufferCopyOffsetAlignment                = 0x00000080
        optimalBufferCopyRowPitchAlignment              = 0x00000080
        nonCoherentAtomSize                             = 0x00000040

VkPhysicalDeviceSparseProperties:
---------------------------------
        residencyStandard2DBlockShape            = false
        residencyStandard2DMultisampleBlockShape = false
        residencyStandard3DBlockShape            = false
        residencyAlignedMipSize                  = false
        residencyNonResidentStrict               = false

VkPhysicalDeviceCustomBorderColorPropertiesEXT:
-----------------------------------------------
        maxCustomBorderColorSamplers = 4096

VkPhysicalDeviceDepthStencilResolveProperties:
----------------------------------------------
        supportedDepthResolveModes: count = 4
                RESOLVE_MODE_SAMPLE_ZERO_BIT
                RESOLVE_MODE_AVERAGE_BIT
                RESOLVE_MODE_MIN_BIT
                RESOLVE_MODE_MAX_BIT
        supportedStencilResolveModes: count = 3
                RESOLVE_MODE_SAMPLE_ZERO_BIT
                RESOLVE_MODE_MIN_BIT
                RESOLVE_MODE_MAX_BIT
        independentResolveNone = true
        independentResolve     = true

VkPhysicalDeviceDescriptorIndexingProperties:
---------------------------------------------
        maxUpdateAfterBindDescriptorsInAllPools              = 1048576
        shaderUniformBufferArrayNonUniformIndexingNative     = false
        shaderSampledImageArrayNonUniformIndexingNative      = false
        shaderStorageBufferArrayNonUniformIndexingNative     = true
        shaderStorageImageArrayNonUniformIndexingNative      = false
        shaderInputAttachmentArrayNonUniformIndexingNative   = false
        robustBufferAccessUpdateAfterBind                    = true
        quadDivergentImplicitLod                             = false
        maxPerStageDescriptorUpdateAfterBindSamplers         = 1048576
        maxPerStageDescriptorUpdateAfterBindUniformBuffers   = 64
        maxPerStageDescriptorUpdateAfterBindStorageBuffers   = 4294967295
        maxPerStageDescriptorUpdateAfterBindSampledImages    = 1048576
        maxPerStageDescriptorUpdateAfterBindStorageImages    = 1048576
        maxPerStageDescriptorUpdateAfterBindInputAttachments = 64
        maxPerStageUpdateAfterBindResources                  = 4294967295
        maxDescriptorSetUpdateAfterBindSamplers              = 1048576
        maxDescriptorSetUpdateAfterBindUniformBuffers        = 384
        maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = 8
        maxDescriptorSetUpdateAfterBindStorageBuffers        = 4294967295
        maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = 8
        maxDescriptorSetUpdateAfterBindSampledImages         = 1048576
        maxDescriptorSetUpdateAfterBindStorageImages         = 1048576
        maxDescriptorSetUpdateAfterBindInputAttachments      = 256

VkPhysicalDeviceDriverProperties:
---------------------------------
        driverID           = DRIVER_ID_INTEL_OPEN_SOURCE_MESA
        driverName         = Intel open-source Mesa driver
        driverInfo         = Mesa 20.3.4
        conformanceVersion = 1.2.0.0

VkPhysicalDeviceExternalMemoryHostPropertiesEXT:
------------------------------------------------
        minImportedHostPointerAlignment = 0x00001000

VkPhysicalDeviceFloatControlsProperties:
----------------------------------------
        denormBehaviorIndependence            = SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL
        roundingModeIndependence              = SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE
        shaderSignedZeroInfNanPreserveFloat16 = true
        shaderSignedZeroInfNanPreserveFloat32 = true
        shaderSignedZeroInfNanPreserveFloat64 = true
        shaderDenormPreserveFloat16           = true
        shaderDenormPreserveFloat32           = true
        shaderDenormPreserveFloat64           = true
        shaderDenormFlushToZeroFloat16        = false
        shaderDenormFlushToZeroFloat32        = true
        shaderDenormFlushToZeroFloat64        = true
        shaderRoundingModeRTEFloat16          = true
        shaderRoundingModeRTEFloat32          = true
        shaderRoundingModeRTEFloat64          = true
        shaderRoundingModeRTZFloat16          = true
        shaderRoundingModeRTZFloat32          = true
        shaderRoundingModeRTZFloat64          = true

VkPhysicalDeviceIDProperties:
-----------------------------
        deviceUUID      = 0112d384-bb34-477c-d4d9-3834ee059975
        driverUUID      = 222f4573-0cc7-4afd-1e64-6feddc42ab47
        deviceNodeMask  = 0
        deviceLUIDValid = false

VkPhysicalDeviceInlineUniformBlockPropertiesEXT:
------------------------------------------------
        maxInlineUniformBlockSize                               = 4096
        maxPerStageDescriptorInlineUniformBlocks                = 32
        maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks = 32
        maxDescriptorSetInlineUniformBlocks                     = 32
        maxDescriptorSetUpdateAfterBindInlineUniformBlocks      = 32

VkPhysicalDeviceLineRasterizationPropertiesEXT:
-----------------------------------------------
        lineSubPixelPrecisionBits = 4

VkPhysicalDeviceMaintenance3Properties:
---------------------------------------
        maxPerSetDescriptors    = 1024
        maxMemoryAllocationSize = 0x80000000

VkPhysicalDeviceMultiviewProperties:
------------------------------------
        maxMultiviewViewCount     = 16
        maxMultiviewInstanceIndex = 268435455

VkPhysicalDevicePCIBusInfoPropertiesEXT:
----------------------------------------
        pciDomain   = 0
        pciBus      = 0
        pciDevice   = 2
        pciFunction = 0

VkPhysicalDevicePointClippingProperties:
----------------------------------------
        pointClippingBehavior = POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY

VkPhysicalDeviceProtectedMemoryProperties:
------------------------------------------
        protectedNoFault = false

VkPhysicalDevicePushDescriptorPropertiesKHR:
--------------------------------------------
        maxPushDescriptors = 32

VkPhysicalDeviceRobustness2PropertiesEXT:
-----------------------------------------
        robustStorageBufferAccessSizeAlignment = 0x00000004
        robustUniformBufferAccessSizeAlignment = 0x00000040

VkPhysicalDeviceSamplerFilterMinmaxProperties:
----------------------------------------------
        filterMinmaxSingleComponentFormats = true
        filterMinmaxImageComponentMapping  = true

VkPhysicalDeviceSubgroupProperties:
-----------------------------------
        subgroupSize              = 32
        supportedStages: count = 8
                SHADER_STAGE_VERTEX_BIT
                SHADER_STAGE_TESSELLATION_CONTROL_BIT
                SHADER_STAGE_TESSELLATION_EVALUATION_BIT
                SHADER_STAGE_GEOMETRY_BIT
                SHADER_STAGE_FRAGMENT_BIT
                SHADER_STAGE_COMPUTE_BIT
                SHADER_STAGE_ALL_GRAPHICS
                SHADER_STAGE_ALL
        supportedOperations: count = 8
                SUBGROUP_FEATURE_BASIC_BIT
                SUBGROUP_FEATURE_VOTE_BIT
                SUBGROUP_FEATURE_ARITHMETIC_BIT
                SUBGROUP_FEATURE_BALLOT_BIT
                SUBGROUP_FEATURE_SHUFFLE_BIT
                SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT
                SUBGROUP_FEATURE_CLUSTERED_BIT
                SUBGROUP_FEATURE_QUAD_BIT
        quadOperationsInAllStages = true

VkPhysicalDeviceSubgroupSizeControlPropertiesEXT:
-------------------------------------------------
        minSubgroupSize              = 8
        maxSubgroupSize              = 32
        maxComputeWorkgroupSubgroups = 56
        requiredSubgroupSizeStages: count = 2
                SHADER_STAGE_COMPUTE_BIT
                SHADER_STAGE_ALL

VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT:
--------------------------------------------------
        storageTexelBufferOffsetAlignmentBytes       = 0x00000010
        storageTexelBufferOffsetSingleTexelAlignment = true
        uniformTexelBufferOffsetAlignmentBytes       = 0x00000001
        uniformTexelBufferOffsetSingleTexelAlignment = false

VkPhysicalDeviceTimelineSemaphoreProperties:
--------------------------------------------
        maxTimelineSemaphoreValueDifference = 18446744073709551615

VkPhysicalDeviceTransformFeedbackPropertiesEXT:
-----------------------------------------------
        maxTransformFeedbackStreams                = 4
        maxTransformFeedbackBuffers                = 4
        maxTransformFeedbackBufferSize             = 0x100000000
        maxTransformFeedbackStreamDataSize         = 512
        maxTransformFeedbackBufferDataSize         = 512
        maxTransformFeedbackBufferDataStride       = 2048
        transformFeedbackQueries                   = true
        transformFeedbackStreamsLinesTriangles     = false
        transformFeedbackRasterizationStreamSelect = false
        transformFeedbackDraw                      = true

VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT:
----------------------------------------------------
        maxVertexAttribDivisor = 268435455

VkPhysicalDeviceVulkan11Properties:
-----------------------------------
        deviceUUID                        = 0112d384-bb34-477c-d4d9-3834ee059975
        driverUUID                        = 222f4573-0cc7-4afd-1e64-6feddc42ab47
        deviceNodeMask                    = 0
        deviceLUIDValid                   = false
        subgroupSize                      = 32
        subgroupSupportedStages: count = 8
                SHADER_STAGE_VERTEX_BIT
                SHADER_STAGE_TESSELLATION_CONTROL_BIT
                SHADER_STAGE_TESSELLATION_EVALUATION_BIT
                SHADER_STAGE_GEOMETRY_BIT
                SHADER_STAGE_FRAGMENT_BIT
                SHADER_STAGE_COMPUTE_BIT
                SHADER_STAGE_ALL_GRAPHICS
                SHADER_STAGE_ALL
        subgroupSupportedOperations: count = 8
                SUBGROUP_FEATURE_BASIC_BIT
                SUBGROUP_FEATURE_VOTE_BIT
                SUBGROUP_FEATURE_ARITHMETIC_BIT
                SUBGROUP_FEATURE_BALLOT_BIT
                SUBGROUP_FEATURE_SHUFFLE_BIT
                SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT
                SUBGROUP_FEATURE_CLUSTERED_BIT
                SUBGROUP_FEATURE_QUAD_BIT
        subgroupQuadOperationsInAllStages = true
        pointClippingBehavior             = POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY
        maxMultiviewViewCount             = 16
        maxMultiviewInstanceIndex         = 268435455
        protectedNoFault                  = false
        maxPerSetDescriptors              = 1024
        maxMemoryAllocationSize           = 0x80000000

VkPhysicalDeviceVulkan12Properties:
-----------------------------------
        driverID                                             = DRIVER_ID_INTEL_OPEN_SOURCE_MESA
        driverName                                           = Intel open-source Mesa driver
        driverInfo                                           = Mesa 20.3.4
        conformanceVersion                                   = 1.2.0.0
        denormBehaviorIndependence                           = SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL
        roundingModeIndependence                             = SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE
        shaderSignedZeroInfNanPreserveFloat16                = true
        shaderSignedZeroInfNanPreserveFloat32                = true
        shaderSignedZeroInfNanPreserveFloat64                = true
        shaderDenormPreserveFloat16                          = true
        shaderDenormPreserveFloat32                          = true
        shaderDenormPreserveFloat64                          = true
        shaderDenormFlushToZeroFloat16                       = false
        shaderDenormFlushToZeroFloat32                       = true
        shaderDenormFlushToZeroFloat64                       = true
        shaderRoundingModeRTEFloat16                         = true
        shaderRoundingModeRTEFloat32                         = true
        shaderRoundingModeRTEFloat64                         = true
        shaderRoundingModeRTZFloat16                         = true
        shaderRoundingModeRTZFloat32                         = true
:
        shaderRoundingModeRTZFloat64                         = true
        maxUpdateAfterBindDescriptorsInAllPools              = 1048576
        shaderUniformBufferArrayNonUniformIndexingNative     = false
        shaderSampledImageArrayNonUniformIndexingNative      = false
        shaderStorageBufferArrayNonUniformIndexingNative     = true
        shaderStorageImageArrayNonUniformIndexingNative      = false
        shaderInputAttachmentArrayNonUniformIndexingNative   = false
        robustBufferAccessUpdateAfterBind                    = true
        quadDivergentImplicitLod                             = false
        maxPerStageDescriptorUpdateAfterBindSamplers         = 1048576
        maxPerStageDescriptorUpdateAfterBindUniformBuffers   = 64
        maxPerStageDescriptorUpdateAfterBindStorageBuffers   = 4294967295
        maxPerStageDescriptorUpdateAfterBindSampledImages    = 1048576
        maxPerStageDescriptorUpdateAfterBindStorageImages    = 1048576
        maxPerStageDescriptorUpdateAfterBindInputAttachments = 64
        maxPerStageUpdateAfterBindResources                  = 4294967295
        maxDescriptorSetUpdateAfterBindSamplers              = 1048576
        maxDescriptorSetUpdateAfterBindUniformBuffers        = 384
        maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = 8
        maxDescriptorSetUpdateAfterBindStorageBuffers        = 4294967295
        maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = 8
        maxDescriptorSetUpdateAfterBindSampledImages         = 1048576
        maxDescriptorSetUpdateAfterBindStorageImages         = 1048576
        maxDescriptorSetUpdateAfterBindInputAttachments      = 256
        supportedDepthResolveModes: count = 4
                RESOLVE_MODE_SAMPLE_ZERO_BIT
                RESOLVE_MODE_AVERAGE_BIT
                RESOLVE_MODE_MIN_BIT
                RESOLVE_MODE_MAX_BIT
        supportedStencilResolveModes: count = 3
                RESOLVE_MODE_SAMPLE_ZERO_BIT
                RESOLVE_MODE_MIN_BIT
                RESOLVE_MODE_MAX_BIT
        independentResolveNone                               = true
        independentResolve                                   = true
        filterMinmaxSingleComponentFormats                   = true
        filterMinmaxImageComponentMapping                    = true
        maxTimelineSemaphoreValueDifference                  = 18446744073709551615
        framebufferIntegerColorSampleCounts: count = 5
                SAMPLE_COUNT_1_BIT
                SAMPLE_COUNT_2_BIT
                SAMPLE_COUNT_4_BIT
                SAMPLE_COUNT_8_BIT
                SAMPLE_COUNT_16_BIT

Device Extensions: count = 92
        VK_EXT_4444_formats                       : extension revision 1
        VK_EXT_buffer_device_address              : extension revision 2
        VK_EXT_calibrated_timestamps              : extension revision 1
        VK_EXT_conditional_rendering              : extension revision 2
        VK_EXT_custom_border_color                : extension revision 12
        VK_EXT_depth_clip_enable                  : extension revision 1
        VK_EXT_descriptor_indexing                : extension revision 2
        VK_EXT_display_control                    : extension revision 1
        VK_EXT_extended_dynamic_state             : extension revision 1
        VK_EXT_external_memory_dma_buf            : extension revision 1
        VK_EXT_external_memory_host               : extension revision 1
        VK_EXT_fragment_shader_interlock          : extension revision 1
        VK_EXT_global_priority                    : extension revision 2
        VK_EXT_host_query_reset                   : extension revision 1
        VK_EXT_image_robustness                   : extension revision 1
        VK_EXT_index_type_uint8                   : extension revision 1
        VK_EXT_inline_uniform_block               : extension revision 1
        VK_EXT_line_rasterization                 : extension revision 1
        VK_EXT_memory_budget                      : extension revision 1
        VK_EXT_pci_bus_info                       : extension revision 2
        VK_EXT_pipeline_creation_cache_control    : extension revision 3
        VK_EXT_pipeline_creation_feedback         : extension revision 1
        VK_EXT_post_depth_coverage                : extension revision 1
        VK_EXT_private_data                       : extension revision 1
        VK_EXT_robustness2                        : extension revision 1
        VK_EXT_sampler_filter_minmax              : extension revision 2
        VK_EXT_scalar_block_layout                : extension revision 1
        VK_EXT_separate_stencil_usage             : extension revision 1
        VK_EXT_shader_atomic_float                : extension revision 1
        VK_EXT_shader_demote_to_helper_invocation : extension revision 1
        VK_EXT_shader_stencil_export              : extension revision 1
        VK_EXT_shader_subgroup_ballot             : extension revision 1
        VK_EXT_shader_subgroup_vote               : extension revision 1
        VK_EXT_shader_viewport_index_layer        : extension revision 1
        VK_EXT_subgroup_size_control              : extension revision 2
        VK_EXT_texel_buffer_alignment             : extension revision 1
        VK_EXT_transform_feedback                 : extension revision 1
        VK_EXT_vertex_attribute_divisor           : extension revision 3
        VK_EXT_ycbcr_image_arrays                 : extension revision 1
        VK_GOOGLE_decorate_string                 : extension revision 1
        VK_GOOGLE_hlsl_functionality1             : extension revision 1
        VK_GOOGLE_user_type                       : extension revision 1
        VK_INTEL_shader_integer_functions2        : extension revision 1
        VK_KHR_16bit_storage                      : extension revision 1
        VK_KHR_8bit_storage                       : extension revision 1
        VK_KHR_bind_memory2                       : extension revision 1
        VK_KHR_buffer_device_address              : extension revision 1
        VK_KHR_copy_commands2                     : extension revision 1
        VK_KHR_create_renderpass2                 : extension revision 1
        VK_KHR_dedicated_allocation               : extension revision 3
        VK_KHR_depth_stencil_resolve              : extension revision 1
        VK_KHR_descriptor_update_template         : extension revision 1
        VK_KHR_device_group                       : extension revision 4
        VK_KHR_draw_indirect_count                : extension revision 1
        VK_KHR_driver_properties                  : extension revision 1
        VK_KHR_external_fence                     : extension revision 1
        VK_KHR_external_fence_fd                  : extension revision 1
        VK_KHR_external_memory                    : extension revision 1
        VK_KHR_external_memory_fd                 : extension revision 1
        VK_KHR_external_semaphore                 : extension revision 1
        VK_KHR_external_semaphore_fd              : extension revision 1
        VK_KHR_get_memory_requirements2           : extension revision 1
        VK_KHR_image_format_list                  : extension revision 1
        VK_KHR_imageless_framebuffer              : extension revision 1
        VK_KHR_incremental_present                : extension revision 1
        VK_KHR_maintenance1                       : extension revision 2
        VK_KHR_maintenance2                       : extension revision 1
        VK_KHR_maintenance3                       : extension revision 1
        VK_KHR_multiview                          : extension revision 1
        VK_KHR_pipeline_executable_properties     : extension revision 1
        VK_KHR_push_descriptor                    : extension revision 2
        VK_KHR_relaxed_block_layout               : extension revision 1
        VK_KHR_sampler_mirror_clamp_to_edge       : extension revision 3
        VK_KHR_sampler_ycbcr_conversion           : extension revision 14
        VK_KHR_separate_depth_stencil_layouts     : extension revision 1
        VK_KHR_shader_atomic_int64                : extension revision 1
        VK_KHR_shader_clock                       : extension revision 1
        VK_KHR_shader_draw_parameters             : extension revision 1
        VK_KHR_shader_float16_int8                : extension revision 1
        VK_KHR_shader_float_controls              : extension revision 4
        VK_KHR_shader_non_semantic_info           : extension revision 1
        VK_KHR_shader_subgroup_extended_types     : extension revision 1
        VK_KHR_shader_terminate_invocation        : extension revision 1
        VK_KHR_spirv_1_4                          : extension revision 1
        VK_KHR_storage_buffer_storage_class       : extension revision 1
        VK_KHR_swapchain                          : extension revision 70
        VK_KHR_swapchain_mutable_format           : extension revision 1
        VK_KHR_timeline_semaphore                 : extension revision 2
        VK_KHR_uniform_buffer_standard_layout     : extension revision 1
        VK_KHR_variable_pointers                  : extension revision 1
        VK_KHR_vulkan_memory_model                : extension revision 3
        VK_NV_compute_shader_derivatives          : extension revision 1

VkQueueFamilyProperties:
========================
        queueProperties[0]:
        -------------------
                minImageTransferGranularity = (1,1,1)
                queueCount                  = 1
                queueFlags                  = QUEUE_GRAPHICS | QUEUE_COMPUTE | QUEUE_TRANSFER
                timestampValidBits          = 36
                present support             = true

VkPhysicalDeviceMemoryProperties:
=================================
memoryHeaps: count = 1
        memoryHeaps[0]:
                size   = 1952466944 (0x74604800) (1.82 GiB)
                budget = 1952448512 (0x74600000) (1.82 GiB)
                usage  = 0 (0x00000000) (0.00 B)
                flags: count = 1
                        MEMORY_HEAP_DEVICE_LOCAL_BIT
memoryTypes: count = 1
        memoryTypes[0]:
                heapIndex     = 0
                propertyFlags = 0x000f: count = 4
                        MEMORY_PROPERTY_DEVICE_LOCAL_BIT
                        MEMORY_PROPERTY_HOST_VISIBLE_BIT
                        MEMORY_PROPERTY_HOST_COHERENT_BIT
                        MEMORY_PROPERTY_HOST_CACHED_BIT
                usable for:
                        IMAGE_TILING_OPTIMAL:
                                color images
                                FORMAT_D16_UNORM
                                FORMAT_X8_D24_UNORM_PACK32
                                FORMAT_D32_SFLOAT
                                FORMAT_S8_UINT
                                FORMAT_D24_UNORM_S8_UINT
                                FORMAT_D32_SFLOAT_S8_UINT
                                (non-sparse)
                        IMAGE_TILING_LINEAR:
                                color images
                                (non-sparse)

VkPhysicalDeviceFeatures:
=========================
        robustBufferAccess                      = true
        fullDrawIndexUint32                     = true
        imageCubeArray                          = true
        independentBlend                        = true
        geometryShader                          = true
        tessellationShader                      = true
        sampleRateShading                       = true
        dualSrcBlend                            = true
        logicOp                                 = true
        multiDrawIndirect                       = true
        drawIndirectFirstInstance               = true
        depthClamp                              = true
        depthBiasClamp                          = true
        fillModeNonSolid                        = true
        depthBounds                             = false
        wideLines                               = true
        largePoints                             = true
        alphaToOne                              = true
        multiViewport                           = true
        samplerAnisotropy                       = true
        textureCompressionETC2                  = true
        textureCompressionASTC_LDR              = true
        textureCompressionBC                    = true
        occlusionQueryPrecise                   = true
        pipelineStatisticsQuery                 = true
        vertexPipelineStoresAndAtomics          = true
        fragmentStoresAndAtomics                = true
        shaderTessellationAndGeometryPointSize  = true
        shaderImageGatherExtended               = true
        shaderStorageImageExtendedFormats       = true
        shaderStorageImageMultisample           = false
        shaderStorageImageReadWithoutFormat     = false
        shaderStorageImageWriteWithoutFormat    = true
        shaderUniformBufferArrayDynamicIndexing = true
        shaderSampledImageArrayDynamicIndexing  = true
        shaderStorageBufferArrayDynamicIndexing = true
        shaderStorageImageArrayDynamicIndexing  = true
        shaderClipDistance                      = true
        shaderCullDistance                      = true
        shaderFloat64                           = true
        shaderInt64                             = true
        shaderInt16                             = true
        shaderResourceResidency                 = false
        shaderResourceMinLod                    = true
        sparseBinding                           = false
        sparseResidencyBuffer                   = false
        sparseResidencyImage2D                  = false
        sparseResidencyImage3D                  = false
        sparseResidency2Samples                 = false
        sparseResidency4Samples                 = false
        sparseResidency8Samples                 = false
        sparseResidency16Samples                = false
        sparseResidencyAliased                  = false
        variableMultisampleRate                 = true
        inheritedQueries                        = true

VkPhysicalDevice16BitStorageFeatures:
-------------------------------------
        storageBuffer16BitAccess           = true
        uniformAndStorageBuffer16BitAccess = true
        storagePushConstant16              = true
        storageInputOutput16               = false

VkPhysicalDevice4444FormatsFeaturesEXT:
---------------------------------------
        formatA4R4G4B4 = true
        formatA4B4G4R4 = false

VkPhysicalDevice8BitStorageFeatures:
------------------------------------
        storageBuffer8BitAccess           = true
        uniformAndStorageBuffer8BitAccess = true
        storagePushConstant8              = true

VkPhysicalDeviceBufferDeviceAddressFeatures:
--------------------------------------------
        bufferDeviceAddress              = true
        bufferDeviceAddressCaptureReplay = true
        bufferDeviceAddressMultiDevice   = false

VkPhysicalDeviceBufferDeviceAddressFeaturesEXT:
-----------------------------------------------
        bufferDeviceAddress              = true
        bufferDeviceAddressCaptureReplay = false
        bufferDeviceAddressMultiDevice   = false

VkPhysicalDeviceConditionalRenderingFeaturesEXT:
------------------------------------------------
        conditionalRendering          = true
        inheritedConditionalRendering = true

VkPhysicalDeviceCustomBorderColorFeaturesEXT:
---------------------------------------------
        customBorderColors             = true
        customBorderColorWithoutFormat = true

VkPhysicalDeviceDepthClipEnableFeaturesEXT:
-------------------------------------------
        depthClipEnable = true

VkPhysicalDeviceDescriptorIndexingFeatures:
-------------------------------------------
        shaderInputAttachmentArrayDynamicIndexing          = false
        shaderUniformTexelBufferArrayDynamicIndexing       = true
        shaderStorageTexelBufferArrayDynamicIndexing       = true
        shaderUniformBufferArrayNonUniformIndexing         = false
        shaderSampledImageArrayNonUniformIndexing          = true
        shaderStorageBufferArrayNonUniformIndexing         = true
        shaderStorageImageArrayNonUniformIndexing          = true
        shaderInputAttachmentArrayNonUniformIndexing       = false
        shaderUniformTexelBufferArrayNonUniformIndexing    = true
        shaderStorageTexelBufferArrayNonUniformIndexing    = true
        descriptorBindingUniformBufferUpdateAfterBind      = false
        descriptorBindingSampledImageUpdateAfterBind       = true
        descriptorBindingStorageImageUpdateAfterBind       = true
        descriptorBindingStorageBufferUpdateAfterBind      = true
        descriptorBindingUniformTexelBufferUpdateAfterBind = true
        descriptorBindingStorageTexelBufferUpdateAfterBind = true
        descriptorBindingUpdateUnusedWhilePending          = true
        descriptorBindingPartiallyBound                    = true
        descriptorBindingVariableDescriptorCount           = true
        runtimeDescriptorArray                             = true

VkPhysicalDeviceExtendedDynamicStateFeaturesEXT:
------------------------------------------------
        extendedDynamicState = true

VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT:
---------------------------------------------------
        fragmentShaderSampleInterlock      = true
        fragmentShaderPixelInterlock       = true
        fragmentShaderShadingRateInterlock = false

VkPhysicalDeviceHostQueryResetFeatures:
---------------------------------------
        hostQueryReset = true

VkPhysicalDeviceImageRobustnessFeaturesEXT:
-------------------------------------------
        robustImageAccess = true

VkPhysicalDeviceImagelessFramebufferFeatures:
---------------------------------------------
        imagelessFramebuffer = true

VkPhysicalDeviceIndexTypeUint8FeaturesEXT:
------------------------------------------
        indexTypeUint8 = true

VkPhysicalDeviceInlineUniformBlockFeaturesEXT:
----------------------------------------------
        inlineUniformBlock                                 = true
        descriptorBindingInlineUniformBlockUpdateAfterBind = true

VkPhysicalDeviceLineRasterizationFeaturesEXT:
---------------------------------------------
        rectangularLines         = true
        bresenhamLines           = true
        smoothLines              = true
        stippledRectangularLines = false
        stippledBresenhamLines   = true
        stippledSmoothLines      = false

VkPhysicalDeviceMultiviewFeatures:
----------------------------------
        multiview                   = true
        multiviewGeometryShader     = true
        multiviewTessellationShader = true

VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT:
--------------------------------------------------------
        pipelineCreationCacheControl = true

VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR:
--------------------------------------------------------
        pipelineExecutableInfo = true

VkPhysicalDevicePrivateDataFeaturesEXT:
---------------------------------------
        privateData = true

VkPhysicalDeviceProtectedMemoryFeatures:
----------------------------------------
        protectedMemory = false

VkPhysicalDeviceRobustness2FeaturesEXT:
---------------------------------------
        robustBufferAccess2 = true
        robustImageAccess2  = true
        nullDescriptor      = true

VkPhysicalDeviceSamplerYcbcrConversionFeatures:
-----------------------------------------------
        samplerYcbcrConversion = true

VkPhysicalDeviceScalarBlockLayoutFeatures:
------------------------------------------
        scalarBlockLayout = true

VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures:
----------------------------------------------------
        separateDepthStencilLayouts = true

VkPhysicalDeviceShaderAtomicFloatFeaturesEXT:
---------------------------------------------
        shaderBufferFloat32Atomics   = true
        shaderBufferFloat32AtomicAdd = false
        shaderBufferFloat64Atomics   = false
        shaderBufferFloat64AtomicAdd = false
        shaderSharedFloat32Atomics   = true
        shaderSharedFloat32AtomicAdd = false
        shaderSharedFloat64Atomics   = false
        shaderSharedFloat64AtomicAdd = false
        shaderImageFloat32Atomics    = true
        shaderImageFloat32AtomicAdd  = false
        sparseImageFloat32Atomics    = false
        sparseImageFloat32AtomicAdd  = false

VkPhysicalDeviceShaderAtomicInt64Features:
------------------------------------------
        shaderBufferInt64Atomics = true
        shaderSharedInt64Atomics = false

VkPhysicalDeviceShaderClockFeaturesKHR:
---------------------------------------
        shaderSubgroupClock = true
        shaderDeviceClock   = false

VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT:
----------------------------------------------------------
        shaderDemoteToHelperInvocation = true

VkPhysicalDeviceShaderDrawParametersFeatures:
---------------------------------------------
        shaderDrawParameters = true

VkPhysicalDeviceShaderFloat16Int8Features:
------------------------------------------
        shaderFloat16 = true
        shaderInt8    = true

VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures:
----------------------------------------------------
        shaderSubgroupExtendedTypes = true

VkPhysicalDeviceShaderTerminateInvocationFeaturesKHR:
-----------------------------------------------------
        shaderTerminateInvocation = true

VkPhysicalDeviceSubgroupSizeControlFeaturesEXT:
-----------------------------------------------
        subgroupSizeControl  = true
        computeFullSubgroups = true

VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT:
------------------------------------------------
        texelBufferAlignment = true

VkPhysicalDeviceTimelineSemaphoreFeatures:
------------------------------------------
        timelineSemaphore = true

VkPhysicalDeviceTransformFeedbackFeaturesEXT:
---------------------------------------------
        transformFeedback = true
        geometryStreams   = true

VkPhysicalDeviceUniformBufferStandardLayoutFeatures:
----------------------------------------------------
        uniformBufferStandardLayout = true

VkPhysicalDeviceVariablePointersFeatures:
-----------------------------------------
        variablePointersStorageBuffer = true
        variablePointers              = true

VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT:
--------------------------------------------------
        vertexAttributeInstanceRateDivisor     = true
        vertexAttributeInstanceRateZeroDivisor = true

VkPhysicalDeviceVulkan11Features:
---------------------------------
        storageBuffer16BitAccess           = true
        uniformAndStorageBuffer16BitAccess = true
        storagePushConstant16              = true
        storageInputOutput16               = false
        multiview                          = true
        multiviewGeometryShader            = true
        multiviewTessellationShader        = true
        variablePointersStorageBuffer      = true
        variablePointers                   = true
        protectedMemory                    = false
        samplerYcbcrConversion             = true
        shaderDrawParameters               = true

VkPhysicalDeviceVulkan12Features:
---------------------------------
        samplerMirrorClampToEdge                           = true
        drawIndirectCount                                  = true
        storageBuffer8BitAccess                            = true
        uniformAndStorageBuffer8BitAccess                  = true
        storagePushConstant8                               = true
        shaderBufferInt64Atomics                           = true
        shaderSharedInt64Atomics                           = false
        shaderFloat16                                      = true
        shaderInt8                                         = true
        descriptorIndexing                                 = true
        shaderInputAttachmentArrayDynamicIndexing          = false
        shaderUniformTexelBufferArrayDynamicIndexing       = true
        shaderStorageTexelBufferArrayDynamicIndexing       = true
        shaderUniformBufferArrayNonUniformIndexing         = false
        shaderSampledImageArrayNonUniformIndexing          = true
        shaderStorageBufferArrayNonUniformIndexing         = true
        shaderStorageImageArrayNonUniformIndexing          = true
        shaderInputAttachmentArrayNonUniformIndexing       = false
        shaderUniformTexelBufferArrayNonUniformIndexing    = true
        shaderStorageTexelBufferArrayNonUniformIndexing    = true
        descriptorBindingUniformBufferUpdateAfterBind      = false
        descriptorBindingSampledImageUpdateAfterBind       = true
        descriptorBindingStorageImageUpdateAfterBind       = true
        descriptorBindingStorageBufferUpdateAfterBind      = true
        descriptorBindingUniformTexelBufferUpdateAfterBind = true
        descriptorBindingStorageTexelBufferUpdateAfterBind = true
        descriptorBindingUpdateUnusedWhilePending          = true
        descriptorBindingPartiallyBound                    = true
        descriptorBindingVariableDescriptorCount           = true
        runtimeDescriptorArray                             = true
        samplerFilterMinmax                                = true
        scalarBlockLayout                                  = true
        imagelessFramebuffer                               = true
        uniformBufferStandardLayout                        = true
        shaderSubgroupExtendedTypes                        = true
        separateDepthStencilLayouts                        = true
        hostQueryReset                                     = true
        timelineSemaphore                                  = true
        bufferDeviceAddress                                = true
        bufferDeviceAddressCaptureReplay                   = true
        bufferDeviceAddressMultiDevice                     = false
        vulkanMemoryModel                                  = true
        vulkanMemoryModelDeviceScope                       = true
        vulkanMemoryModelAvailabilityVisibilityChains      = true
        shaderOutputViewportIndex                          = true
        shaderOutputLayer                                  = true
        subgroupBroadcastDynamicId                         = true

VkPhysicalDeviceVulkanMemoryModelFeatures:
------------------------------------------
        vulkanMemoryModel                             = true
        vulkanMemoryModelDeviceScope                  = true
        vulkanMemoryModelAvailabilityVisibilityChains = true

VkPhysicalDeviceYcbcrImageArraysFeaturesEXT:
--------------------------------------------
        ycbcrImageArrays = true

The picture of running vkcube:

vkcube1

vkcube2

charles-lunarg commented 3 years ago

The issue is an uninitialized pNext pointer in VkInstanceCreateInfo createInfo;

Change it to VkInstanceCreateInfo createInfo{}; and the crash will go away. ALWAYS initialize vulkan structs (even if to zero). Many of them have pointers in them that the driver nor validation layers have no clue if they are valid or not. If they aren't null, they assume its valid because there is no other way to check. So always initializing everything to zero (just by putting {} after the name) is good practice.

fake-rookie commented 3 years ago

@ mj-saunders

Yes. Has two GPUs on my laptop. Same of one Intel and one Nvidia.

And the F****** Nvidia driver also bothered me. One times make me reinstall the OS.

charles-lunarg commented 3 years ago

Replace this code

    VkInstanceCreateInfo createInfo;
    createInfo.sType            = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
    createInfo.pApplicationInfo = &appInfo;

with this.


    VkInstanceCreateInfo createInfo{}; //Note the {} after the name
    createInfo.sType            = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
    createInfo.pApplicationInfo = &appInfo;

The crash will go away. VkInstanceCreateInfo has a member called pNext of type const void*. When you don't provide a value for it (or don't use {} to reset it to zero), the value is uninitialized. This means the value is literally whatever was in the memory before hand. And because there is no way to tell if a pointer 'is valid', eg points to something inside the process address space, the driver will try to dereference it. When it does this, you get a crash because it isn't a valid pointer.

fake-rookie commented 3 years ago

@charles-lunarg

Thanks!

I'll try it.

CaesarXInsanium commented 1 year ago

Replace this code

    VkInstanceCreateInfo createInfo;
    createInfo.sType            = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
    createInfo.pApplicationInfo = &appInfo;

with this.


    VkInstanceCreateInfo createInfo{}; //Note the {} after the name
    createInfo.sType            = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
    createInfo.pApplicationInfo = &appInfo;

The crash will go away. VkInstanceCreateInfo has a member called pNext of type const void*. When you don't provide a value for it (or don't use {} to reset it to zero), the value is uninitialized. This means the value is literally whatever was in the memory before hand. And because there is no way to tell if a pointer 'is valid', eg points to something inside the process address space, the driver will try to dereference it. When it does this, you get a crash because it isn't a valid pointer.

Thank you!!!!!!