vulkan-go / vulkan

Vulkan API bindings for Go programming language
MIT License
742 stars 55 forks source link

GetPhysicalDeviceSurfaceCapabilities() does not return anything #54

Open neurlang opened 3 years ago

neurlang commented 3 years ago

hello, at minimum 3 rows needs inserting into GetPhysicalDeviceSurfaceCapabilities()

+   pSurfaceCapabilities.SupportedCompositeAlpha = CompositeAlphaFlags(cpSurfaceCapabilities.supportedCompositeAlpha)
+   pSurfaceCapabilities.MinImageCount = uint32(cpSurfaceCapabilities.minImageCount)
+   pSurfaceCapabilities.MaxImageCount = uint32(cpSurfaceCapabilities.maxImageCount)
    return __v

this is required to make it return a value using the result pointer. thanks

neurlang commented 3 years ago

Same problem here, MemoryTypeBits is not filled

func GetBufferMemoryRequirements(device Device, buffer Buffer, pMemoryRequirements *MemoryRequirements) {
    cdevice, _ := *(*C.VkDevice)(unsafe.Pointer(&device)), cgoAllocsUnknown
    cbuffer, _ := *(*C.VkBuffer)(unsafe.Pointer(&buffer)), cgoAllocsUnknown
    cpMemoryRequirements, _ := pMemoryRequirements.PassRef()
    C.callVkGetBufferMemoryRequirements(cdevice, cbuffer, cpMemoryRequirements)

+   pMemoryRequirements.MemoryTypeBits = uint32(cpMemoryRequirements.memoryTypeBits)
}
neurlang commented 3 years ago

I think it is a more general problem, same at the end of GetPhysicalDeviceSurfaceFormats()

+   for i := range pSurfaceFormats {
+       pSurfaceFormats[i].Format = Format(pSurfaceFormats[i].refedaf82ca.format)
+       pSurfaceFormats[i].ColorSpace = ColorSpace(pSurfaceFormats[i].refedaf82ca.colorSpace)
+   }
    return __v
}
xlab commented 3 years ago

Yep, something's missing. I'll look into that

Generally, if something is not there in generated code, that's a bug in the generator. Or misconfiguration. I'll check for the latter.