-
Notifications
You must be signed in to change notification settings - Fork 13
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
Relation between sref and sloc #31
Comments
Hi, You should think of the reference as being the descriptor used to access a range of memory, rather than being specific to a memory location. So from that point of view, it's clear that sref is not a subset of sloc. For example, you could use a uniform buffer and a storage buffer to access the same location. There's a change in progress in the Vulkan spec to clarify the definition of reference, which hopefully will make this more clear. |
I take as an outcome that the inclusion holds (and thus However, your example confused me: the uniform buffer and the storage buffer would be different references (thus their accesses won't be in Will the change in the spec have any impact in the formal model? Or is it just a clarification on the definition? |
Why do you say that? I was saying that the inclusion doesn't hold. A reference is more like a descriptor, spanning multiple memory locations. And a memory location can be used with multiple distinct references.
Just a clarification of what a reference is in Vulkan. No change to the formal model. |
Because you wrote "So from that point of view, it's clear that sref is a subset of sloc." Imagine you have something like this
I would definitely expect (a) My question is: can we infer from (a) that |
My apologies! I meant to say that it's not a subset. Sorry for the confusion, I'll edit the comment. In your example, if you say y is an alias to x, then aren't you implicitly assuming they're the same location? |
This example fits in what I initially wrote about seeing Here is another example where I expect both
What I am missing is an example where
Here definitely |
There's nothing in the model about sref being related to virtual memory. It reflects what descriptor is used to access memory, and descriptors span a range of memory. So you can have two accesses that use the same reference (descriptor) but distinct memory locations within the span of that descriptor. |
The last comment was useful, and I think I am starting to understand this. Is the following correct? I can have two instructions accessing the same buffer (reference) and thus they are in |
Yes, that's pretty much correct. But to nitpick a bit - just being the same buffer isn't necessarily the same reference, it needs to be the same buffer/offset/range which together fully define the descriptor and in turn the reference. |
But wouldn't the offset/range tell you precisely which location you end up accessing? Or could still be the case that the same buffer/offset/range (i.e., reference) access two different locations? |
The same buffer/offset/range can be used to access multiple locations within that range. |
Great. This clarifies it for me. Thanks @jeffbolznv for bearing with me 😅 |
@jeffbolznv it seems that even if The initial value of
so I think the inclusion also holds here. |
I am trying to understand if the property
sref <= sloc
holds (where<=
means subset of) and thus havingsloc & sref
in the definition ofmutordatom
is redundant.If I think of
sref
andsloc
as virtual an physical memory, I think the property should hold. However, it seems that on the device,sref
can be other things. Thus, I'm not completely sure if the property should also hold for those cases.The text was updated successfully, but these errors were encountered: