这是indexloc提供的服务,不要输入任何密码
Skip to content

[Immediates] Should the limit be fixed at exactly 64? #5430

@kainino0x

Description

@kainino0x

maxImmediateSize has a minimum of 64, but no maximum. However, in backends have hard limits, for example in D3D12 we can't really do any more than 64 - unless we move them out of the root descriptor, which is possible, but not intended.

Typically when discussing a new optional feature-name feature, we won't add them if there's any backend where it never exists due to API-level constraints. For portability reasons, I think limits should be treated similarly, such that browsers (generally) don't expose a limit on one backend that's impossible on another.1

We could either specify that the limit can't go over 64, or we could remove the limit name entirely and hardcode it as 64. We could add it back later if we wanted. (I'm probably in favor of keeping the limit, so that native and experimental implementations have an easy place to increase the limit on some backends.)

Antonio pointed out that technically if it were hardcoded it might even be possible to remove the size from the pipeline layout and hardcode that at 64 too. I am not proposing that here, though as an aside, I do wonder if there would be any cost to immediateSize defaulting to 64 instead of 0.

Footnotes

  1. We haven't tried to enforce this in the past, but depending on this discussion, perhaps we consider adding spec-level limits on how high limits can go.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiWebGPU API

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions