Skip to content

pRects parameter of ID3D12GraphicsCommandList::ClearRenderTargetView method should be nullable #55

Description

@odorovskoy

Its documentation says:

An array of D3D12_RECT structures for the rectangles in the resource view to clear.
If NULL, ClearRenderTargetView clears the entire resource view.

I forked the latest version of zigwin32, changed the type from [*]const RECT to ?[*]const RECT and passed null - works fine.

Investigating a bit further, this parameter has only two attributes in win32json: "Attrs":["In","Const"], so it lacks Optional attribute:

https://github.com/marlersoft/win32json/blob/ca9dd560f598062be334f4b5687764a85de1416c/api/Graphics.Direct3D12.json#L7547-L7561

According to build.json, JSON metadata above is generated from a file at https://www.nuget.org/api/v2/package/Microsoft.Windows.SDK.Win32Metadata/31.0.4-preview. Looks like that file lacks Optional attribute for the parameter in question.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions