Skip to content

beginRenderPass should validate that the attachment don't alias #1358

Closed

Description

@Kangz

Currently the specification allows using the same view for multiple attachments of a render pass. This seems like an issue, for example what does it mean if the same view is loadValue: "load" and loadOp: [1.0, 0.0, 0.0, 1.0]?

Activity

  1. added this to the MVP milestone on Jan 21, 2021
  2. kvark commented on Jan 21, 2021

    @kvark
    Contributor

    This is actually covered formally right now:

    1. The [=texture subresource=] seen by |colorAttachment|.{{GPURenderPassColorAttachmentDescriptor/attachment}}
      is considered to be used as [=internal usage/attachment=] for the
      duration of the render pass.

    Then:

    During command encoding, every usage of a subresource is recorded in one of the
    [=usage scopes=] in the command buffer.
    For each [=usage scope=], the implementation performs
    usage scope validation by composing the list of all
    [=internal usage=] flags of each [=subresource=] used in the [=usage scope=].
    If any of those lists is not a [=compatible usage list=],
    {{GPUCommandEncoder/finish()|GPUCommandEncoder.finish()}}
    generates a {{GPUValidationError}} in the current error scope.

    And finally in the compatible usage lists:

    • |U| contains exactly one element: [=internal usage/attachment=].

    However, I do believe that we should state that clearly in beginRenderPass. Better be redundant than confusing :)

  3. Kangz commented on Jan 21, 2021

    @Kangz
    ContributorAuthor

    Wow that's quite deep indeed. I always considered U as a set so the duplicate attachments would be a single one. Yeah it would be good to call it out.

  4. added
    copyediting
    on Nov 24, 2021
  5. added a commit that references this issue on Dec 23, 2021
    0a608ab
  6. self-assigned this
    on Dec 23, 2021
  7. added a commit that references this issue on Dec 28, 2021
    85eb9a0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugcopyediting

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions