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

Metal Buffer reinterpret with offset = 1 #19

Open
pixelnerve opened this issue Mar 22, 2017 · 2 comments
Open

Metal Buffer reinterpret with offset = 1 #19

pixelnerve opened this issue Mar 22, 2017 · 2 comments

Comments

@pixelnerve
Copy link

I had to change this offset to 0. I'm not really sure what's going on there, but maybe it is a bug, maybe not. It was for me.

https://github.com/Unity-Technologies/HLSLcc/blob/master/src/toMetalDeclaration.cpp#L1019

@aet
Copy link
Contributor

aet commented Dec 27, 2018

This is because the Unity implementation allocates a bit of extra into compute buffers. The first 4 bytes are always reserved for compute counters to make things simple. To use current implementation as-is, some offset handling in the Metal runtime code is required

@Xottab-DUTY
Copy link

Probably, we can add some option or something like this?

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

3 participants