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

CmdSetSampleMaskEXT is not passing address of sampleMask[0] to trampoline #17

Closed
bbredesen opened this issue Mar 7, 2023 · 0 comments · Fixed by #22
Closed

CmdSetSampleMaskEXT is not passing address of sampleMask[0] to trampoline #17

bbredesen opened this issue Mar 7, 2023 · 0 comments · Fixed by #22
Labels
bug/med Needs fixing but there is a possible workaround

Comments

@bbredesen
Copy link
Owner

Signature: func CmdSetSampleMaskEXT(commandBuffer CommandBuffer, samples SampleCountFlagBits, sampleMask []SampleMask)

sampleMask is correctly defined as a slice. This function is unusual because the size of the slice is encoded in a bitfield, rather than directly provided.

The pointer being provided to the trampoline is a direct assignment of the slice, rather than the address first element.

Currently generated code:

	var pSampleMask *SampleMask
	if sampleMask != nil {
		pSampleMask = sampleMask
	}

Expected output:

	var pSampleMask *SampleMask
	if sampleMask != nil {
		pSampleMask = &sampleMask[0]
	}
@bbredesen bbredesen added the bug/med Needs fixing but there is a possible workaround label Mar 7, 2023
bbredesen added a commit that referenced this issue Mar 8, 2023
bbredesen added a commit that referenced this issue Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/med Needs fixing but there is a possible workaround
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant