Suppress D3D12 Debug Layer warning D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VERTEX_BUFFER_NOT_SET

In the end2end test BufferZeroInitTests.PaddingInitialized, the case use
drawIndex to access OOB vertexBuffer to see whether the padding part has
been set to zero. The case use
'renderPass.SetVertexBuffer(0, vertexBuffer, vertexBufferOffset)' to set
the vertexBuffer.

But when the vertexBufferOffset == vertexBufferSize, this SetVertexBuffer
won't create any vertex buffer view on D3D12 backend. And it turns out
input slot 0 has nothing.

This warning has been reported by win11 full debug layer. But this
behaviour is allowed by WebGPU.

So this CL suppress the warning
D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VERTEX_BUFFER_NOT_SET in D3D12 adapter.

Bug: dawn:1255
Change-Id: I0dcf816b284cf7d7013f633186d010bae8fa6523
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/77640
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
This commit is contained in:
Yan Shaobo 2022-01-24 10:04:24 +00:00 committed by Dawn LUCI CQ
parent 9f12af2918
commit 25fe51a2ae
1 changed files with 6 additions and 0 deletions

View File

@ -351,6 +351,12 @@ namespace dawn::native::d3d12 {
// WebGPU allows OOB vertex buffer access and relies on D3D12's robust buffer access
// behavior.
D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VERTEX_BUFFER_TOO_SMALL,
// WebGPU allows setVertexBuffer with offset that equals to the whole vertex buffer
// size.
// Even this means that no vertex buffer view has been set in D3D12 backend.
// https://crbug.com/dawn/1255
D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VERTEX_BUFFER_NOT_SET,
};
// Create a retrieval filter with a deny list to suppress messages.