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

Set negative GPURenderPassColorAttachmentDescriptor.loadValue for unsigned integer formats #965

@Jiawei-Shao

Description

@Jiawei-Shao

Hi WebGPU CG,

I'd like to report an issue about clearing the color attachments with unsigned integer formats in WebGPU in a render pass. When we use a negative value in the loadValue for the color attachments in unsigned integer formats, we will see different behaviors on D3D12 and Metal. According to my experiments, on D3D12 this value will always be treated as 0, but on Metal it won't.

Note that on Vulkan we can always set the correct clear color with the union members of VkClearColor for float, signed integer and unsigned integer formats, so it is not a problem for Vulkan.

So it seems we need some validations on the loadValue to ensure we have the same definite behavior on D3D12, Metal and Vulkan. What do you think?

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions