Skip to content

Conversation

karjonas
Copy link
Contributor

@karjonas karjonas commented Mar 6, 2019

No description provided.

@karjonas karjonas requested review from dnachbaur and hernando March 6, 2019 10:02

memcpy(buffer->map(), src, bufferSize);
buffer->unmap();
if (src != nullptr && bufferSize > 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't the bufferSize > 0 check also go in the previous if? maybe a combined if all conditions are true, then do something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think creating a zero-sized buffer is preferred over creating no buffer at all since OptiX usually fails if buffers are unset even if they are unused.

@karjonas karjonas merged commit bec0ba5 into BlueBrain:master Mar 8, 2019
@karjonas karjonas deleted the zero_memcpy branch March 8, 2019 08:52
dnachbaur pushed a commit to dnachbaur/Brayns that referenced this pull request Apr 26, 2019
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.

3 participants