Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dxgi: Add DXGI_OUTDUPL_FLAG enum annotation to DuplicateOutput1() #1981

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions generation/WinSDK/Partitions/Dxgi/settings.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ _D3DCOLORVALUE
--namespace
Windows.Win32.Graphics.Dxgi
--with-attribute
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inversely, could we also have all the =AssociatedEnum in here? It seems much nicer to me to have configuration in the namespace-specific settings.rsp than in one humongous global file, if possible?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. The scraper and the emitter have different roles and supporting toolchains.

Copy link
Contributor Author

@MarijnS95 MarijnS95 Sep 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any complete docs on what configures the scraper (probably the namespace-specific settings.rsp) and what configures the emitter (probably the glboal emitter.settings.rsp... 🙂), and when to use either?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@MarijnS95 MarijnS95 Sep 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mikebattista unfortunately that doesn't explain directly which flags are available, nor what precedence I should stick to. Searching further in the repo shows that --enumMakeFlags is a feature of ClangSharpSourceToWinmd so it makes sense that that only works via emitter settings (and likewise, --with-attribute seems to be a feature of the scraper).

The question remains: do we prefer to set the Flags attribute on the emitter via --enumMakeFlags, or do we prefer to set it earlier via --with-attribute on the scraper as done before this PR?

DXGI_ADAPTER_FLAG=Flags
DXGI_DEBUG_RLO_FLAGS=Flags
DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS=Flags
DXGI_OFFER_RESOURCE_FLAGS=Flags
DXGI_OUTDUPL_FLAG=Flags
Expand Down
17 changes: 8 additions & 9 deletions generation/WinSDK/emitter.settings.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ DELETE_SNAPSHOT_VHDSET_FLAG
DEPENDENT_DISK_FLAG
DETACH_VIRTUAL_DISK_FLAG
DRAWPROGRESSFLAGS
DXGI_ADAPTER_FLAG
DXGI_DEBUG_RLO_FLAGS
EXPAND_VIRTUAL_DISK_FLAG
FILEOPENDIALOGOPTIONS
FORK_VIRTUAL_DISK_FLAG
Expand Down Expand Up @@ -1829,24 +1827,25 @@ DXGI_ADAPTER_DESC2::Flags=[AssociatedEnum("DXGI_ADAPTER_FLAG")]
DXGI_DECODE_SWAP_CHAIN_DESC::Flags=[AssociatedEnum("DXGI_SWAP_CHAIN_FLAG")]
DXGI_SWAP_CHAIN_DESC::Flags=[AssociatedEnum("DXGI_SWAP_CHAIN_FLAG")]
DXGI_SWAP_CHAIN_DESC1::Flags=[AssociatedEnum("DXGI_SWAP_CHAIN_FLAG")]
IDXGIDevice4::OfferResources1::Flags=[AssociatedEnum("DXGI_OFFER_RESOURCE_FLAGS")]
IDXGIOutput3::CheckOverlaySupport::pFlags=[AssociatedEnum("DXGI_OVERLAY_SUPPORT_FLAG")]
IDXGIOutput4::CheckOverlayColorSpaceSupport::pFlags=[AssociatedEnum("DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG")]
IDXGIOutput6::CheckHardwareCompositionSupport::pFlags=[AssociatedEnum("DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAGS")]
IDXGISwapChain::ResizeBuffers::SwapChainFlags=[AssociatedEnum("DXGI_SWAP_CHAIN_FLAG")]
IDXGISwapChain3::CheckColorSpaceSupport::pColorSpaceSupport=[AssociatedEnum("DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG")]
IDXGISwapChain3::ResizeBuffers1::SwapChainFlags=[AssociatedEnum("DXGI_SWAP_CHAIN_FLAG")]
IDXGIAdapter::GetDesc::pDesc=[RetVal]
IDXGIAdapter1::GetDesc1::pDesc=[RetVal]
IDXGIAdapter2::GetDesc2::pDesc=[RetVal]
IDXGIAdapter4::GetDesc3::pDesc=[RetVal]
IDXGIDevice4::OfferResources1::Flags=[AssociatedEnum("DXGI_OFFER_RESOURCE_FLAGS")]
IDXGIOutput::GetDesc::pDesc=[RetVal]
IDXGIOutput3::CheckOverlaySupport::pFlags=[AssociatedEnum("DXGI_OVERLAY_SUPPORT_FLAG")]
IDXGIOutput4::CheckOverlayColorSpaceSupport::pFlags=[AssociatedEnum("DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG")]
IDXGIOutput5::DuplicateOutput1::Flags=[AssociatedEnum("DXGI_OUTDUPL_FLAG")]
IDXGIOutput6::CheckHardwareCompositionSupport::pFlags=[AssociatedEnum("DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAGS")]
IDXGIOutput6::GetDesc1::pDesc=[RetVal]
IDXGIOutputDuplication::GetDesc::pDesc=[RetVal]
IDXGISurface::GetDesc::pDesc=[RetVal]
IDXGISwapChain::GetDesc::pDesc=[RetVal]
IDXGISwapChain::ResizeBuffers::SwapChainFlags=[AssociatedEnum("DXGI_SWAP_CHAIN_FLAG")]
IDXGISwapChain1::GetDesc1::pDesc=[RetVal]
IDXGISwapChain1::GetFullscreenDesc::pDesc=[RetVal]
IDXGISwapChain3::CheckColorSpaceSupport::pColorSpaceSupport=[AssociatedEnum("DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG")]
IDXGISwapChain3::ResizeBuffers1::SwapChainFlags=[AssociatedEnum("DXGI_SWAP_CHAIN_FLAG")]
LPWPUCLOSEEVENT::hEvent=WSAEVENT
LPWPUCREATEEVENT::return=WSAEVENT
LPWPURESETEVENT::hEvent=WSAEVENT
Expand Down
2 changes: 2 additions & 0 deletions scripts/ChangesSinceLastRelease.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2720,3 +2720,5 @@ Windows.Win32.Security.Cryptography.Apis.GetKeyDerivationInterface added
Windows.Win32.Security.Cryptography.Apis.GetRngInterface added
Windows.Win32.Security.Cryptography.Apis.GetSecretAgreementInterface added
Windows.Win32.Security.Cryptography.Apis.GetSignatureInterface added
# dxgi: Add DXGI_OUTDUPL_FLAG enum annotation to DuplicateOutput1()
Windows.Win32.Graphics.Dxgi.IDXGIOutput5.DuplicateOutput1 : Flags : [In] => [AssociatedEnum(DXGI_OUTDUPL_FLAG),In]