Skip to content

Conversation

@spencer-lunarg
Copy link
Contributor

More updates from https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/7455

cc @alan-baker @Tobski hopefully this is the final chapter of the Location saga

Copy link

@Tobski Tobski left a comment

Choose a reason for hiding this comment

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

Pending resolution of the internal MR but this is a necessary update if/when that lands.

A matrix is viewed as an array, which consume all 4 components.

So something like
A matrix is viewed as an array of vector, this means something like
Copy link

Choose a reason for hiding this comment

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

Suggested change
A matrix is viewed as an array of vector, this means something like
A matrix is stored as an array of vector, this means something like

"Viewed as" implies something else.

----

From a `Location`/`Component` point-of-view looks like
from a `Location`/`Component` point-of-view looks like
Copy link

Choose a reason for hiding this comment

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

Suggested change
from a `Location`/`Component` point-of-view looks like
consumes locations and components identically to

----

As stated above, arrays consume the whole `Location` so the following is **not** allowed.
Just like vector, depending on the size, it may not consume the whole `Location`. This means the following is allowed.
Copy link

Choose a reason for hiding this comment

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

Suggested change
Just like vector, depending on the size, it may not consume the whole `Location`. This means the following is allowed.
which in turn is stored identically to
[source,glsl]
----
// Each vector consumes only the first 2 components of each location
layout(location = 0) vec2 a0;
layout(location = 1) vec2 a1;
layout(location = 2) vec2 a2;
----
This means the following is allowed:

Also the "Arrays consume whole location" comment above is wrong - where did that come from?

Comment on lines +162 to +163
You don't need to worry about things going "in front" of a matrix because the `Component` decoration
link:https://godbolt.org/z/f81PvP538[can not be applied on a matrix type].
Copy link

Choose a reason for hiding this comment

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

Suggested change
You don't need to worry about things going "in front" of a matrix because the `Component` decoration
link:https://godbolt.org/z/f81PvP538[can not be applied on a matrix type].
Unlike arrays or independent vectors, link:https://godbolt.org/z/f81PvP538[matrices cannot be decorated with `Component`], so will always be packed from component 0.

Maybe? "In front" seems overly vague to me.

@marty-johnson59
Copy link
Contributor

Hi @spencer-lunarg, anything you need to get this ready to merge? Thx

@spencer-lunarg
Copy link
Contributor Author

Hi @spencer-lunarg, anything you need to get this ready to merge? Thx

this is still pending spec clarification which is pending CTS... so might be open for a bit long

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