I am Creating a swapchain in go vulkan im not sure why the above error is occuring below is the piece of code the error occur in vulkan CreateSwapchain function
createInfo := vk.SwapchainCreateInfo{ SType: vk.StructureTypeSwapchainCreateInfo, Surface: p.Surface, MinImageCount: imageCount, ImageFormat: p.SurfaceFrormat.Format, ImageColorSpace: p.SurfaceFrormat.ColorSpace, ImageExtent: p.Extend, ImageArrayLayers: 1, ImageUsage: vk.ImageUsageFlags(vk.ImageUsageColorAttachmentBit),}indices := p.findQueueFamily()var queuefamilyIndices []uint32queuefamilyIndices = append(queuefamilyIndices, *indices.graphicsFamily)queuefamilyIndices = append(queuefamilyIndices, *indices.presentFamily)if *indices.presentFamily != *indices.graphicsFamily { createInfo.ImageSharingMode = vk.SharingMode(vk.SharingModeConcurrent) createInfo.QueueFamilyIndexCount = 1 createInfo.PQueueFamilyIndices = queuefamilyIndices} else { createInfo.ImageSharingMode = vk.SharingMode(vk.SharingModeExclusive)}createInfo.PreTransform = swapchainSupport.sCapabilities.CurrentTransformcreateInfo.CompositeAlpha = vk.CompositeAlphaFlagBits(vk.CompositeAlphaOpaqueBit)createInfo.PresentMode = p.PresentModecreateInfo.Clipped = vk.TruecreateInfo.Ref()result := vk.CreateSwapchain(p.LogicalDevice, &createInfo, nil, &p.Swapchain)if result != vk.Success { panic(handleVkError(result))}
I tried Free() Deref() on the createinfo struct its not working Note i am not using New() anywherethis is happening in go-Vulkan