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

Spec allows resolveTarget to be 3d but doesn't allow selecting a depth slice #4600

@kainino0x

Description

@kainino0x

In #4254 we allowed view to be 3d and added depthSlice to select which slice of view to render to.

However the change to allow 3d views in the "renderable texture views" algorithm also applies to resolveTarget. So the spec now says resolveTarget can be 3d, but there is no way to select a depth slice of it.

3d textures cannot be multisampled, but there is one scenario in which this matters: view is 2d multisampled, and resolveTarget is 3d. I do not know if this is actually possible, but the spec seems to allow it.

There are several options here depending on what the backends can support:

  • Disallow resolveTarget from being 3d
  • Similarly, require view and resolveTarget to have the same dimensionality, then this scenario doesn't work
    • (but it could be an issue later if 3d textures become multisample-able)
  • Add a resolveTargetDepthSlice

cc @haoxli

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiWebGPU APIapi resolvedResolved - waiting for a change to the API specificationbugneeds-cts-issueThis change requires tests (or would need tests if accepted), but may not have a CTS issue filed yet

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions