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

generator: pSampleMask setter should write NULL if slice is empty #432

Merged
merged 1 commit into from
May 11, 2021

Conversation

MarijnS95
Copy link
Collaborator

@MarijnS95 MarijnS95 commented May 9, 2021

Fixes #256

As per #256 no explicit length field is available for pSampleMask, this is based on ceil(rasterizationSamples/32) instead. It is valid to not set an array for pSampleMask (under normal circumestances this is signaled by setting the length to zero, and the array pointer is ignored) but this has to happen by setting the pointer to NULL.

EDIT: And so Erupt followed suit 😬 https://gitlab.com/Friz64/erupt/-/commit/5a0574a0f0c29330f15803dc0475c06bd88438c7 👀

As per [1] no explicit length field is available for `pSampleMask`, this
is based on `ceil(rasterizationSamples/32)` instead.  It is valid to not
set an array for `pSampleMask` (under normal circumestances this is
signaled by setting the length to zero, and the array pointer is
ignored) but this has to happen by setting the pointer to `NULL`.

[1]: #256
@MaikKlein MaikKlein merged commit 4ba8637 into master May 11, 2021
@MarijnS95 MarijnS95 deleted the psamplemask-null branch May 11, 2021 19:43
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

Successfully merging this pull request may close these issues.

empty slices don't always result in null pointers
3 participants