Skip to content

Conversation

@kainino0x
Copy link
Contributor

@kainino0x kainino0x commented Apr 28, 2021

@kainino0x kainino0x requested review from kvark and toji April 28, 2021 23:12
@kainino0x kainino0x marked this pull request as ready for review April 28, 2021 23:12
@kainino0x
Copy link
Contributor Author

PTAL

Copy link
Contributor

@kvark kvark left a comment

Choose a reason for hiding this comment

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

I think the idea of having a dedicated mini-section, explaining the binding limits, is a good one.
I'm concerned however about the "cost" term used here. It's associated with something that can fluctuate (e.g. cost of an item in free market). Can we reword this to use more of a "limit" term instead? I.e. "this bindings counts towards Xxx limit", just like Vulkan does it.

@kainino0x
Copy link
Contributor Author

kainino0x commented Apr 29, 2021

I think the clarify benefits a lot from having a specific word to define the binding cost. I don't personally think the connotation of "cost" is that important here, it's quite clear that it's a fixed integer value. An alternative might be to define it in terms of the "currency" ("takes N uniformBuffer binding slots"?) instead of the "cost"/"price", though not sure how it would shake out.

Copy link
Member

@toji toji left a comment

Choose a reason for hiding this comment

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

This is great, thanks!

spec/index.bs Outdated
of [=supported limits=] |limits|
if any of the following are true:

- Let |cost| be the [=binding cost=] of |entries|.
Copy link
Member

Choose a reason for hiding this comment

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

It feels just a little weird to use the same cost structure for testing against both layout-level limits and stage-level limits. It's not really a problem, just surprised me at first.

spec/index.bs Outdated
</table>

<div algorithm="binding cost">
The <dfn>binding cost</dfn> for a [=list=] |entries| of {{GPUBindGroupLayoutEntry}} values
Copy link
Member

Choose a reason for hiding this comment

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

I don't have the same mental association of "cost" meaning a potentially fluctuating thing that @kvark mentioned, but for whatever reason the term "cost" here still reads awkwardly to me when paired with "limits" of a particular resource. I don't have a good explanation as to why.

Other potential terms that I can think of:

  • binding requirements
  • binding uses
  • binding counts

@kainino0x
Copy link
Contributor Author

Editors: Try to rephrase this as "uses N slots toward X limit"

@kainino0x kainino0x requested review from kvark and toji May 4, 2021 01:00
Copy link
Member

@toji toji left a comment

Choose a reason for hiding this comment

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

This is great, thanks!

@kainino0x kainino0x merged commit 7d2888c into gpuweb:main May 5, 2021
@kainino0x kainino0x deleted the binding-cost branch May 5, 2021 01:34
@kainino0x kainino0x changed the title Refactor binding limits in terms of "binding cost" Refactor binding limit validation spec May 6, 2021
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