Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetPhysicalDeviceSurfaceCapabilities() does not return anything #54

Open
neurlang opened this issue Apr 12, 2021 · 3 comments
Open

GetPhysicalDeviceSurfaceCapabilities() does not return anything #54

neurlang opened this issue Apr 12, 2021 · 3 comments

Comments

@neurlang
Copy link
Contributor

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
Copy link
Contributor Author

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
Copy link
Contributor Author

neurlang commented Apr 13, 2021

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
Copy link
Member

xlab commented Apr 13, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants