vulkan icon indicating copy to clipboard operation
vulkan copied to clipboard

GetPhysicalDeviceSurfaceCapabilities() does not return anything

Open neurlang opened this issue 4 years ago • 3 comments

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 avatar Apr 12 '21 21:04 neurlang

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 avatar Apr 13 '21 17:04 neurlang

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
}

neurlang avatar Apr 13 '21 20:04 neurlang

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.

xlab avatar Apr 13 '21 22:04 xlab