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

Specification clarification regarding "discard" storeOp with MSAA? #5168

@mwyrzykowski

Description

@mwyrzykowski

I was looking at the history of previous discussions and in #1376 (comment) it is noted:

storeOp to be "clear" (which discards the multisampled data, and only keeps the resolved data)

Assuming the reference to "clear" here now maps to "discard", does this mean that when colorAttachment.resolveTarget is set but storeOp == "discard", then the MSAA contents are still resolved to GPURenderPassColorAttachment.view but the contents of the resolveTarget are discarded?

That would be preferred but I couldn't find definitive language in the specification confirming this.

I read the wording in https://www.w3.org/TR/webgpu/#render-pass-encoder-finalization though I don't understand the wording:

If colorAttachment.loadOp is:

"store"
Ensure the contents of the framebuffer memory associated with colorSubregion are stored in colorSubregion.
"discard"
Set every texel of colorSubregion to zero.

Assuming loadOp should be storeOp then it seems like that is not the case? Though it would be preferred if it was

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiWebGPU APIcopyeditingPure editorial stuff (copyediting, *.bs file syntax, etc.)

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions